1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin
3 @.str41196 = external constant [2 x i8], align 4 ; <[2 x i8]*> [#uses=1]
5 declare void @syStopraw(i32) nounwind
7 declare i32 @SyFopen(i8*, i8*) nounwind
9 declare i8* @SyFgets(i8*, i32) nounwind
11 define void @SyHelp(i8* nocapture %topic, i32 %fin) nounwind {
13 %line = alloca [256 x i8], align 4 ; <[256 x i8]*> [#uses=1]
14 %secname = alloca [1024 x i8], align 4 ; <[1024 x i8]*> [#uses=0]
15 %last = alloca [256 x i8], align 4 ; <[256 x i8]*> [#uses=1]
16 %last2 = alloca [256 x i8], align 4 ; <[256 x i8]*> [#uses=1]
17 br i1 undef, label %bb, label %bb2
20 br i1 undef, label %bb2, label %bb3
22 bb2: ; preds = %bb, %entry
25 bb3: ; preds = %bb2, %bb
26 %storemerge = phi i32 [ 0, %bb2 ], [ 1, %bb ] ; <i32> [#uses=1]
27 br i1 undef, label %bb19, label %bb20
32 bb20: ; preds = %bb19, %bb3
33 br i1 undef, label %bb25, label %bb26
38 bb26: ; preds = %bb25, %bb20
39 %offset.2 = phi i32 [ -2, %bb25 ], [ 0, %bb20 ] ; <i32> [#uses=1]
40 br i1 undef, label %bb.nph508, label %bb49
42 bb.nph508: ; preds = %bb26
46 br i1 undef, label %bb51, label %bb50
49 br i1 undef, label %bb51, label %bb104
51 bb51: ; preds = %bb50, %bb49
54 bb104: ; preds = %bb50
55 br i1 undef, label %bb106, label %bb105
57 bb105: ; preds = %bb104
58 br i1 undef, label %bb106, label %bb161
60 bb106: ; preds = %bb105, %bb104
63 bb161: ; preds = %bb105
64 br i1 false, label %bb163, label %bb162
66 bb162: ; preds = %bb161
67 br i1 undef, label %bb163, label %bb224
69 bb163: ; preds = %bb162, %bb161
72 bb224: ; preds = %bb162
73 %0 = call i32 @SyFopen(i8* undef, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str41196, i32 0, i32 0)) nounwind ; <i32> [#uses=2]
74 br i1 false, label %bb297, label %bb300
76 bb297: ; preds = %bb224
79 bb300: ; preds = %bb224
80 %1 = icmp eq i32 %offset.2, -1 ; <i1> [#uses=1]
83 bb307: ; preds = %isdigit1498.exit67
86 bb308: ; preds = %bb440, %bb307
87 br i1 undef, label %bb309, label %isdigit1498.exit67
89 isdigit1498.exit67: ; preds = %bb308
90 br i1 undef, label %bb309, label %bb307
92 bb309: ; preds = %isdigit1498.exit67, %bb308
93 br i1 undef, label %bb310, label %bb313
95 bb310: ; preds = %bb309
98 bb313: ; preds = %bb310, %bb309
99 br i1 false, label %bb318, label %bb317
101 bb317: ; preds = %bb313
102 %2 = icmp sgt i8 undef, -1 ; <i1> [#uses=1]
103 br i1 %2, label %bb.i.i73, label %bb1.i.i74
105 bb.i.i73: ; preds = %bb317
106 br i1 false, label %bb318, label %bb329.outer
108 bb1.i.i74: ; preds = %bb317
111 bb318: ; preds = %bb.i.i73, %bb313
114 bb329.outer: ; preds = %bb.i.i73
115 br i1 undef, label %bb333, label %bb329.us.us
117 bb329.us.us: ; preds = %bb329.us.us, %bb329.outer
118 br i1 undef, label %bb333, label %bb329.us.us
120 bb333: ; preds = %bb329.us.us, %bb329.outer
121 %match.0.lcssa = phi i32 [ undef, %bb329.us.us ], [ 2, %bb329.outer ] ; <i32> [#uses=2]
122 br i1 undef, label %bb335, label %bb388
124 bb335: ; preds = %bb333
125 %3 = and i1 undef, %1 ; <i1> [#uses=1]
126 br i1 %3, label %bb339, label %bb348
128 bb339: ; preds = %bb335
129 br i1 false, label %bb340, label %bb345
131 bb340: ; preds = %bb339
132 br i1 undef, label %return, label %bb341
134 bb341: ; preds = %bb340
137 bb345: ; preds = %bb345, %bb339
138 %4 = phi i8 [ %5, %bb345 ], [ undef, %bb339 ] ; <i8> [#uses=0]
139 %indvar670 = phi i32 [ %tmp673, %bb345 ], [ 0, %bb339 ] ; <i32> [#uses=1]
140 %tmp673 = add i32 %indvar670, 1 ; <i32> [#uses=2]
141 %scevgep674 = getelementptr [256 x i8], [256 x i8]* %last, i32 0, i32 %tmp673 ; <i8*> [#uses=1]
142 %5 = load i8, i8* %scevgep674, align 1 ; <i8> [#uses=1]
143 br i1 undef, label %bb347, label %bb345
145 bb347: ; preds = %bb345
148 bb348: ; preds = %bb347, %bb335
149 br i1 false, label %bb352, label %bb356
151 bb352: ; preds = %bb348
154 bb356: ; preds = %bb348
155 br i1 undef, label %bb360, label %bb369
157 bb360: ; preds = %bb356
158 br i1 false, label %bb361, label %bb366
160 bb361: ; preds = %bb360
161 br i1 undef, label %return, label %bb362
163 bb362: ; preds = %bb361
166 bb366: ; preds = %bb366, %bb360
167 %indvar662 = phi i32 [ %tmp665, %bb366 ], [ 0, %bb360 ] ; <i32> [#uses=1]
168 %tmp665 = add i32 %indvar662, 1 ; <i32> [#uses=2]
169 %scevgep666 = getelementptr [256 x i8], [256 x i8]* %last2, i32 0, i32 %tmp665 ; <i8*> [#uses=1]
170 %6 = load i8, i8* %scevgep666, align 1 ; <i8> [#uses=0]
171 br i1 false, label %bb368, label %bb366
173 bb368: ; preds = %bb366
176 bb369: ; preds = %bb368, %bb356
177 br i1 undef, label %bb373, label %bb388
179 bb373: ; preds = %bb383, %bb369
180 %7 = call i8* @SyFgets(i8* undef, i32 %0) nounwind ; <i8*> [#uses=1]
181 %8 = icmp eq i8* %7, null ; <i1> [#uses=1]
182 br i1 %8, label %bb375, label %bb383
184 bb375: ; preds = %bb373
185 %9 = icmp eq i32 %storemerge, 0 ; <i1> [#uses=1]
186 br i1 %9, label %return, label %bb376
188 bb376: ; preds = %bb375
191 bb383: ; preds = %bb373
192 %10 = load i8, i8* undef, align 1 ; <i8> [#uses=1]
193 %cond1 = icmp eq i8 %10, 46 ; <i1> [#uses=1]
194 br i1 %cond1, label %bb373, label %bb388
196 bb388: ; preds = %bb383, %bb369, %bb333
197 %match.1140 = phi i32 [ %match.0.lcssa, %bb369 ], [ 0, %bb333 ], [ %match.0.lcssa, %bb383 ] ; <i32> [#uses=1]
200 bb390: ; preds = %isdigit1498.exit83, %bb392
201 %indvar.next725 = add i32 %indvar724, 1 ; <i32> [#uses=1]
204 bb391: ; preds = %bb390, %bb388
205 %indvar724 = phi i32 [ %indvar.next725, %bb390 ], [ 0, %bb388 ] ; <i32> [#uses=2]
206 %11 = load i8, i8* undef, align 1 ; <i8> [#uses=0]
207 br i1 false, label %bb395, label %bb392
209 bb392: ; preds = %bb391
210 br i1 undef, label %bb390, label %isdigit1498.exit83
212 isdigit1498.exit83: ; preds = %bb392
213 br i1 undef, label %bb390, label %bb395
215 bb394: ; preds = %isdigit1498.exit87
218 bb395: ; preds = %bb394, %isdigit1498.exit83, %bb391
219 %storemerge14.sum = add i32 %indvar724, undef ; <i32> [#uses=1]
220 %p.26 = getelementptr [256 x i8], [256 x i8]* %line, i32 0, i32 %storemerge14.sum ; <i8*> [#uses=1]
221 br i1 undef, label %bb400, label %isdigit1498.exit87
223 isdigit1498.exit87: ; preds = %bb395
224 br i1 false, label %bb400, label %bb394
226 bb400: ; preds = %isdigit1498.exit87, %bb395
227 br i1 undef, label %bb402, label %bb403
229 bb402: ; preds = %bb400
230 %12 = getelementptr inbounds i8, i8* %p.26, i32 undef ; <i8*> [#uses=1]
233 bb403: ; preds = %bb402, %bb400
234 %p.29 = phi i8* [ %12, %bb402 ], [ undef, %bb400 ] ; <i8*> [#uses=0]
235 br i1 undef, label %bb405, label %bb404
237 bb404: ; preds = %bb403
238 br i1 undef, label %bb405, label %bb407
240 bb405: ; preds = %bb404, %bb403
241 br i1 undef, label %return, label %bb406
243 bb406: ; preds = %bb405
244 call void @syStopraw(i32 %fin) nounwind
247 bb407: ; preds = %bb404
248 %cond = icmp eq i32 %match.1140, 2 ; <i1> [#uses=1]
249 br i1 %cond, label %bb408, label %bb428
251 bb408: ; preds = %bb407
254 bb428: ; preds = %bb407
257 bb440: ; preds = %bb428, %bb300
258 %13 = call i8* @SyFgets(i8* undef, i32 %0) nounwind ; <i8*> [#uses=0]
259 br i1 false, label %bb442, label %bb308
261 bb442: ; preds = %bb440
264 return: ; preds = %bb405, %bb375, %bb361, %bb340