1; RUN: llc < %s -mtriple=thumbv7-apple-darwin
2
3@.str41196 = external constant [2 x i8], align 4  ; <[2 x i8]*> [#uses=1]
4
5declare void @syStopraw(i32) nounwind
6
7declare i32 @SyFopen(i8*, i8*) nounwind
8
9declare i8* @SyFgets(i8*, i32) nounwind
10
11define void @SyHelp(i8* nocapture %topic, i32 %fin) nounwind {
12entry:
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
18
19bb:                                               ; preds = %entry
20  br i1 undef, label %bb2, label %bb3
21
22bb2:                                              ; preds = %bb, %entry
23  br label %bb3
24
25bb3:                                              ; preds = %bb2, %bb
26  %storemerge = phi i32 [ 0, %bb2 ], [ 1, %bb ]   ; <i32> [#uses=1]
27  br i1 undef, label %bb19, label %bb20
28
29bb19:                                             ; preds = %bb3
30  br label %bb20
31
32bb20:                                             ; preds = %bb19, %bb3
33  br i1 undef, label %bb25, label %bb26
34
35bb25:                                             ; preds = %bb20
36  br label %bb26
37
38bb26:                                             ; preds = %bb25, %bb20
39  %offset.2 = phi i32 [ -2, %bb25 ], [ 0, %bb20 ] ; <i32> [#uses=1]
40  br i1 undef, label %bb.nph508, label %bb49
41
42bb.nph508:                                        ; preds = %bb26
43  unreachable
44
45bb49:                                             ; preds = %bb26
46  br i1 undef, label %bb51, label %bb50
47
48bb50:                                             ; preds = %bb49
49  br i1 undef, label %bb51, label %bb104
50
51bb51:                                             ; preds = %bb50, %bb49
52  unreachable
53
54bb104:                                            ; preds = %bb50
55  br i1 undef, label %bb106, label %bb105
56
57bb105:                                            ; preds = %bb104
58  br i1 undef, label %bb106, label %bb161
59
60bb106:                                            ; preds = %bb105, %bb104
61  unreachable
62
63bb161:                                            ; preds = %bb105
64  br i1 false, label %bb163, label %bb162
65
66bb162:                                            ; preds = %bb161
67  br i1 undef, label %bb163, label %bb224
68
69bb163:                                            ; preds = %bb162, %bb161
70  unreachable
71
72bb224:                                            ; 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
75
76bb297:                                            ; preds = %bb224
77  unreachable
78
79bb300:                                            ; preds = %bb224
80  %1 = icmp eq i32 %offset.2, -1                  ; <i1> [#uses=1]
81  br label %bb440
82
83bb307:                                            ; preds = %isdigit1498.exit67
84  br label %bb308
85
86bb308:                                            ; preds = %bb440, %bb307
87  br i1 undef, label %bb309, label %isdigit1498.exit67
88
89isdigit1498.exit67:                               ; preds = %bb308
90  br i1 undef, label %bb309, label %bb307
91
92bb309:                                            ; preds = %isdigit1498.exit67, %bb308
93  br i1 undef, label %bb310, label %bb313
94
95bb310:                                            ; preds = %bb309
96  br label %bb313
97
98bb313:                                            ; preds = %bb310, %bb309
99  br i1 false, label %bb318, label %bb317
100
101bb317:                                            ; preds = %bb313
102  %2 = icmp sgt i8 undef, -1                      ; <i1> [#uses=1]
103  br i1 %2, label %bb.i.i73, label %bb1.i.i74
104
105bb.i.i73:                                         ; preds = %bb317
106  br i1 false, label %bb318, label %bb329.outer
107
108bb1.i.i74:                                        ; preds = %bb317
109  unreachable
110
111bb318:                                            ; preds = %bb.i.i73, %bb313
112  ret void
113
114bb329.outer:                                      ; preds = %bb.i.i73
115  br i1 undef, label %bb333, label %bb329.us.us
116
117bb329.us.us:                                      ; preds = %bb329.us.us, %bb329.outer
118  br i1 undef, label %bb333, label %bb329.us.us
119
120bb333:                                            ; 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
123
124bb335:                                            ; preds = %bb333
125  %3 = and i1 undef, %1                           ; <i1> [#uses=1]
126  br i1 %3, label %bb339, label %bb348
127
128bb339:                                            ; preds = %bb335
129  br i1 false, label %bb340, label %bb345
130
131bb340:                                            ; preds = %bb339
132  br i1 undef, label %return, label %bb341
133
134bb341:                                            ; preds = %bb340
135  ret void
136
137bb345:                                            ; 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
144
145bb347:                                            ; preds = %bb345
146  br label %bb348
147
148bb348:                                            ; preds = %bb347, %bb335
149  br i1 false, label %bb352, label %bb356
150
151bb352:                                            ; preds = %bb348
152  unreachable
153
154bb356:                                            ; preds = %bb348
155  br i1 undef, label %bb360, label %bb369
156
157bb360:                                            ; preds = %bb356
158  br i1 false, label %bb361, label %bb366
159
160bb361:                                            ; preds = %bb360
161  br i1 undef, label %return, label %bb362
162
163bb362:                                            ; preds = %bb361
164  ret void
165
166bb366:                                            ; 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
172
173bb368:                                            ; preds = %bb366
174  br label %bb369
175
176bb369:                                            ; preds = %bb368, %bb356
177  br i1 undef, label %bb373, label %bb388
178
179bb373:                                            ; 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
183
184bb375:                                            ; preds = %bb373
185  %9 = icmp eq i32 %storemerge, 0                 ; <i1> [#uses=1]
186  br i1 %9, label %return, label %bb376
187
188bb376:                                            ; preds = %bb375
189  ret void
190
191bb383:                                            ; 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
195
196bb388:                                            ; preds = %bb383, %bb369, %bb333
197  %match.1140 = phi i32 [ %match.0.lcssa, %bb369 ], [ 0, %bb333 ], [ %match.0.lcssa, %bb383 ] ; <i32> [#uses=1]
198  br label %bb391
199
200bb390:                                            ; preds = %isdigit1498.exit83, %bb392
201  %indvar.next725 = add i32 %indvar724, 1         ; <i32> [#uses=1]
202  br label %bb391
203
204bb391:                                            ; 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
208
209bb392:                                            ; preds = %bb391
210  br i1 undef, label %bb390, label %isdigit1498.exit83
211
212isdigit1498.exit83:                               ; preds = %bb392
213  br i1 undef, label %bb390, label %bb395
214
215bb394:                                            ; preds = %isdigit1498.exit87
216  br label %bb395
217
218bb395:                                            ; 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
222
223isdigit1498.exit87:                               ; preds = %bb395
224  br i1 false, label %bb400, label %bb394
225
226bb400:                                            ; preds = %isdigit1498.exit87, %bb395
227  br i1 undef, label %bb402, label %bb403
228
229bb402:                                            ; preds = %bb400
230  %12 = getelementptr inbounds i8, i8* %p.26, i32 undef ; <i8*> [#uses=1]
231  br label %bb403
232
233bb403:                                            ; preds = %bb402, %bb400
234  %p.29 = phi i8* [ %12, %bb402 ], [ undef, %bb400 ] ; <i8*> [#uses=0]
235  br i1 undef, label %bb405, label %bb404
236
237bb404:                                            ; preds = %bb403
238  br i1 undef, label %bb405, label %bb407
239
240bb405:                                            ; preds = %bb404, %bb403
241  br i1 undef, label %return, label %bb406
242
243bb406:                                            ; preds = %bb405
244  call  void @syStopraw(i32 %fin) nounwind
245  ret void
246
247bb407:                                            ; preds = %bb404
248  %cond = icmp eq i32 %match.1140, 2              ; <i1> [#uses=1]
249  br i1 %cond, label %bb408, label %bb428
250
251bb408:                                            ; preds = %bb407
252  unreachable
253
254bb428:                                            ; preds = %bb407
255  br label %bb440
256
257bb440:                                            ; preds = %bb428, %bb300
258  %13 = call  i8* @SyFgets(i8* undef, i32 %0) nounwind ; <i8*> [#uses=0]
259  br i1 false, label %bb442, label %bb308
260
261bb442:                                            ; preds = %bb440
262  unreachable
263
264return:                                           ; preds = %bb405, %bb375, %bb361, %bb340
265  ret void
266}
267