1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
4 %struct.FILE = type { ptr, i32, i32, i16, i16, %struct.__sbuf, i32, ptr, ptr, ptr, ptr, ptr, %struct.__sbuf, ptr, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, [4 x i8], i64 }
5 %struct.PyBoolScalarObject = type { i64, ptr, i8 }
6 %struct.PyBufferProcs = type { ptr, ptr, ptr, ptr }
7 %struct.PyGetSetDef = type { ptr, ptr, ptr, ptr, ptr }
8 %struct.PyMappingMethods = type { ptr, ptr, ptr }
9 %struct.PyMemberDef = type opaque
10 %struct.PyMethodDef = type { ptr, ptr, i32, ptr }
11 %struct.PyNumberMethods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
12 %struct.PyObject = type { i64, ptr }
13 %struct.PySequenceMethods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
14 %struct.PyTupleObject = type { i64, ptr, i64, [1 x ptr] }
15 %struct.__sFILEX = type opaque
16 %struct.__sbuf = type { ptr, i32 }
17 %struct._typeobject = type { i64, ptr, i64, ptr, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
18 @PyArray_API = external global ptr ; <ptr> [#uses=4]
19 @PyUFunc_API = external global ptr ; <ptr> [#uses=4]
20 @.str5 = external constant [14 x i8] ; <ptr> [#uses=1]
22 define ptr @ubyte_divmod(ptr %a, ptr %b) {
23 ; CHECK-LABEL: ubyte_divmod:
24 ; CHECK: ## %bb.0: ## %entry
25 ; CHECK-NEXT: pushq %rbp
26 ; CHECK-NEXT: .cfi_def_cfa_offset 16
27 ; CHECK-NEXT: pushq %r15
28 ; CHECK-NEXT: .cfi_def_cfa_offset 24
29 ; CHECK-NEXT: pushq %r14
30 ; CHECK-NEXT: .cfi_def_cfa_offset 32
31 ; CHECK-NEXT: pushq %r12
32 ; CHECK-NEXT: .cfi_def_cfa_offset 40
33 ; CHECK-NEXT: pushq %rbx
34 ; CHECK-NEXT: .cfi_def_cfa_offset 48
35 ; CHECK-NEXT: subq $32, %rsp
36 ; CHECK-NEXT: .cfi_def_cfa_offset 80
37 ; CHECK-NEXT: .cfi_offset %rbx, -48
38 ; CHECK-NEXT: .cfi_offset %r12, -40
39 ; CHECK-NEXT: .cfi_offset %r14, -32
40 ; CHECK-NEXT: .cfi_offset %r15, -24
41 ; CHECK-NEXT: .cfi_offset %rbp, -16
42 ; CHECK-NEXT: movq %rsi, %rbx
43 ; CHECK-NEXT: movq %rdi, %r14
44 ; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rsi
45 ; CHECK-NEXT: callq __ubyte_convert_to_ctype
46 ; CHECK-NEXT: testl %eax, %eax
47 ; CHECK-NEXT: js LBB0_4
48 ; CHECK-NEXT: ## %bb.1: ## %cond_next.i
49 ; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rsi
50 ; CHECK-NEXT: movq %rbx, %rdi
51 ; CHECK-NEXT: callq __ubyte_convert_to_ctype
52 ; CHECK-NEXT: movl %eax, %ecx
53 ; CHECK-NEXT: sarl $31, %ecx
54 ; CHECK-NEXT: andl %eax, %ecx
55 ; CHECK-NEXT: cmpl $-2, %ecx
56 ; CHECK-NEXT: je LBB0_8
57 ; CHECK-NEXT: ## %bb.2: ## %cond_next.i
58 ; CHECK-NEXT: cmpl $-1, %ecx
59 ; CHECK-NEXT: jne LBB0_6
60 ; CHECK-NEXT: LBB0_3: ## %bb4
61 ; CHECK-NEXT: movq _PyArray_API@GOTPCREL(%rip), %rax
62 ; CHECK-NEXT: movq (%rax), %rax
63 ; CHECK-NEXT: movq 16(%rax), %rax
64 ; CHECK-NEXT: jmp LBB0_10
65 ; CHECK-NEXT: LBB0_4: ## %_ubyte_convert2_to_ctypes.exit
66 ; CHECK-NEXT: cmpl $-2, %eax
67 ; CHECK-NEXT: je LBB0_8
68 ; CHECK-NEXT: ## %bb.5: ## %_ubyte_convert2_to_ctypes.exit
69 ; CHECK-NEXT: cmpl $-1, %eax
70 ; CHECK-NEXT: je LBB0_3
71 ; CHECK-NEXT: LBB0_6: ## %bb35
72 ; CHECK-NEXT: movq _PyUFunc_API@GOTPCREL(%rip), %r14
73 ; CHECK-NEXT: movq (%r14), %rax
74 ; CHECK-NEXT: callq *216(%rax)
75 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %edx
76 ; CHECK-NEXT: testb %dl, %dl
77 ; CHECK-NEXT: je LBB0_11
78 ; CHECK-NEXT: ## %bb.7: ## %cond_false.i
79 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %esi
80 ; CHECK-NEXT: movzbl %sil, %ecx
81 ; CHECK-NEXT: movl %ecx, %eax
82 ; CHECK-NEXT: divb %dl
83 ; CHECK-NEXT: movl %eax, %r15d
84 ; CHECK-NEXT: testb %cl, %cl
85 ; CHECK-NEXT: jne LBB0_12
86 ; CHECK-NEXT: jmp LBB0_14
87 ; CHECK-NEXT: LBB0_8: ## %bb17
88 ; CHECK-NEXT: callq _PyErr_Occurred
89 ; CHECK-NEXT: testq %rax, %rax
90 ; CHECK-NEXT: jne LBB0_27
91 ; CHECK-NEXT: ## %bb.9: ## %cond_next
92 ; CHECK-NEXT: movq _PyArray_API@GOTPCREL(%rip), %rax
93 ; CHECK-NEXT: movq (%rax), %rax
94 ; CHECK-NEXT: movq 80(%rax), %rax
95 ; CHECK-NEXT: LBB0_10: ## %bb4
96 ; CHECK-NEXT: movq 96(%rax), %rax
97 ; CHECK-NEXT: movq %r14, %rdi
98 ; CHECK-NEXT: movq %rbx, %rsi
99 ; CHECK-NEXT: callq *40(%rax)
100 ; CHECK-NEXT: jmp LBB0_28
101 ; CHECK-NEXT: LBB0_11: ## %cond_true.i
102 ; CHECK-NEXT: movl $4, %edi
103 ; CHECK-NEXT: callq _feraiseexcept
104 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %edx
105 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %esi
106 ; CHECK-NEXT: xorl %r15d, %r15d
107 ; CHECK-NEXT: testb %sil, %sil
108 ; CHECK-NEXT: je LBB0_14
109 ; CHECK-NEXT: LBB0_12: ## %cond_false.i
110 ; CHECK-NEXT: testb %dl, %dl
111 ; CHECK-NEXT: je LBB0_14
112 ; CHECK-NEXT: ## %bb.13: ## %cond_next17.i
113 ; CHECK-NEXT: movzbl %sil, %eax
114 ; CHECK-NEXT: divb %dl
115 ; CHECK-NEXT: movzbl %ah, %ebx
116 ; CHECK-NEXT: jmp LBB0_18
117 ; CHECK-NEXT: LBB0_14: ## %cond_true.i200
118 ; CHECK-NEXT: testb %dl, %dl
119 ; CHECK-NEXT: jne LBB0_17
120 ; CHECK-NEXT: ## %bb.16: ## %cond_true14.i
121 ; CHECK-NEXT: movl $4, %edi
122 ; CHECK-NEXT: callq _feraiseexcept
123 ; CHECK-NEXT: LBB0_17: ## %ubyte_ctype_remainder.exit
124 ; CHECK-NEXT: xorl %ebx, %ebx
125 ; CHECK-NEXT: LBB0_18: ## %ubyte_ctype_remainder.exit
126 ; CHECK-NEXT: movq (%r14), %rax
127 ; CHECK-NEXT: callq *224(%rax)
128 ; CHECK-NEXT: testl %eax, %eax
129 ; CHECK-NEXT: je LBB0_21
130 ; CHECK-NEXT: ## %bb.19: ## %cond_true61
131 ; CHECK-NEXT: movl %eax, %ebp
132 ; CHECK-NEXT: movq (%r14), %rax
133 ; CHECK-NEXT: movq _.str5@GOTPCREL(%rip), %rdi
134 ; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rsi
135 ; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
136 ; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
137 ; CHECK-NEXT: callq *200(%rax)
138 ; CHECK-NEXT: testl %eax, %eax
139 ; CHECK-NEXT: js LBB0_27
140 ; CHECK-NEXT: ## %bb.20: ## %cond_next73
141 ; CHECK-NEXT: movl $1, {{[0-9]+}}(%rsp)
142 ; CHECK-NEXT: movq (%r14), %rax
143 ; CHECK-NEXT: movq {{[0-9]+}}(%rsp), %rsi
144 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %edi
145 ; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
146 ; CHECK-NEXT: movl %ebp, %edx
147 ; CHECK-NEXT: callq *232(%rax)
148 ; CHECK-NEXT: testl %eax, %eax
149 ; CHECK-NEXT: jne LBB0_27
150 ; CHECK-NEXT: LBB0_21: ## %cond_next89
151 ; CHECK-NEXT: movl $2, %edi
152 ; CHECK-NEXT: callq _PyTuple_New
153 ; CHECK-NEXT: testq %rax, %rax
154 ; CHECK-NEXT: je LBB0_27
155 ; CHECK-NEXT: ## %bb.22: ## %cond_next97
156 ; CHECK-NEXT: movq %rax, %r14
157 ; CHECK-NEXT: movq _PyArray_API@GOTPCREL(%rip), %r12
158 ; CHECK-NEXT: movq (%r12), %rax
159 ; CHECK-NEXT: movq 200(%rax), %rdi
160 ; CHECK-NEXT: xorl %esi, %esi
161 ; CHECK-NEXT: callq *304(%rdi)
162 ; CHECK-NEXT: testq %rax, %rax
163 ; CHECK-NEXT: je LBB0_25
164 ; CHECK-NEXT: ## %bb.23: ## %cond_next135
165 ; CHECK-NEXT: movb %r15b, 16(%rax)
166 ; CHECK-NEXT: movq %rax, 24(%r14)
167 ; CHECK-NEXT: movq (%r12), %rax
168 ; CHECK-NEXT: movq 200(%rax), %rdi
169 ; CHECK-NEXT: xorl %esi, %esi
170 ; CHECK-NEXT: callq *304(%rdi)
171 ; CHECK-NEXT: testq %rax, %rax
172 ; CHECK-NEXT: je LBB0_25
173 ; CHECK-NEXT: ## %bb.24: ## %cond_next182
174 ; CHECK-NEXT: movb %bl, 16(%rax)
175 ; CHECK-NEXT: movq %rax, 32(%r14)
176 ; CHECK-NEXT: movq %r14, %rax
177 ; CHECK-NEXT: jmp LBB0_28
178 ; CHECK-NEXT: LBB0_25: ## %cond_true113
179 ; CHECK-NEXT: decq (%r14)
180 ; CHECK-NEXT: jne LBB0_27
181 ; CHECK-NEXT: ## %bb.26: ## %cond_true126
182 ; CHECK-NEXT: movq 8(%r14), %rax
183 ; CHECK-NEXT: movq %r14, %rdi
184 ; CHECK-NEXT: callq *48(%rax)
185 ; CHECK-NEXT: LBB0_27: ## %UnifiedReturnBlock
186 ; CHECK-NEXT: xorl %eax, %eax
187 ; CHECK-NEXT: LBB0_28: ## %UnifiedReturnBlock
188 ; CHECK-NEXT: addq $32, %rsp
189 ; CHECK-NEXT: popq %rbx
190 ; CHECK-NEXT: popq %r12
191 ; CHECK-NEXT: popq %r14
192 ; CHECK-NEXT: popq %r15
193 ; CHECK-NEXT: popq %rbp
196 %arg1 = alloca i8, align 1 ; <ptr> [#uses=3]
197 %arg2 = alloca i8, align 1 ; <ptr> [#uses=3]
198 %first = alloca i32, align 4 ; <ptr> [#uses=2]
199 %bufsize = alloca i32, align 4 ; <ptr> [#uses=1]
200 %errmask = alloca i32, align 4 ; <ptr> [#uses=2]
201 %errobj = alloca ptr, align 8 ; <ptr> [#uses=2]
202 %tmp3.i = call fastcc i32 @_ubyte_convert_to_ctype( ptr %a, ptr %arg1 ) ; <i32> [#uses=2]
203 %tmp5.i = icmp slt i32 %tmp3.i, 0 ; <i1> [#uses=1]
204 br i1 %tmp5.i, label %_ubyte_convert2_to_ctypes.exit, label %cond_next.i
206 cond_next.i: ; preds = %entry
207 %tmp11.i = call fastcc i32 @_ubyte_convert_to_ctype( ptr %b, ptr %arg2 ) ; <i32> [#uses=2]
208 %tmp13.i = icmp slt i32 %tmp11.i, 0 ; <i1> [#uses=1]
209 %retval.i = select i1 %tmp13.i, i32 %tmp11.i, i32 0 ; <i32> [#uses=1]
210 switch i32 %retval.i, label %bb35 [
215 _ubyte_convert2_to_ctypes.exit: ; preds = %entry
216 switch i32 %tmp3.i, label %bb35 [
221 bb4: ; preds = %_ubyte_convert2_to_ctypes.exit, %cond_next.i
222 %tmp5 = load ptr, ptr @PyArray_API, align 8 ; <ptr> [#uses=1]
223 %tmp6 = getelementptr ptr, ptr %tmp5, i64 2 ; <ptr> [#uses=1]
224 %tmp7 = load ptr, ptr %tmp6 ; <ptr> [#uses=1]
225 %tmp9 = getelementptr %struct._typeobject, ptr %tmp7, i32 0, i32 12 ; <ptr> [#uses=1]
226 %tmp10 = load ptr, ptr %tmp9 ; <ptr> [#uses=1]
227 %tmp11 = getelementptr %struct.PyNumberMethods, ptr %tmp10, i32 0, i32 5 ; <ptr> [#uses=1]
228 %tmp12 = load ptr, ptr %tmp11 ; <ptr> [#uses=1]
229 %tmp15 = call ptr %tmp12( ptr %a, ptr %b ) ; <ptr> [#uses=1]
232 bb17: ; preds = %_ubyte_convert2_to_ctypes.exit, %cond_next.i
233 %tmp18 = call ptr @PyErr_Occurred( ) ; <ptr> [#uses=1]
234 %tmp19 = icmp eq ptr %tmp18, null ; <i1> [#uses=1]
235 br i1 %tmp19, label %cond_next, label %UnifiedReturnBlock
237 cond_next: ; preds = %bb17
238 %tmp22 = load ptr, ptr @PyArray_API, align 8 ; <ptr> [#uses=1]
239 %tmp23 = getelementptr ptr, ptr %tmp22, i64 10 ; <ptr> [#uses=1]
240 %tmp24 = load ptr, ptr %tmp23 ; <ptr> [#uses=1]
241 %tmp26 = getelementptr %struct._typeobject, ptr %tmp24, i32 0, i32 12 ; <ptr> [#uses=1]
242 %tmp27 = load ptr, ptr %tmp26 ; <ptr> [#uses=1]
243 %tmp28 = getelementptr %struct.PyNumberMethods, ptr %tmp27, i32 0, i32 5 ; <ptr> [#uses=1]
244 %tmp29 = load ptr, ptr %tmp28 ; <ptr> [#uses=1]
245 %tmp32 = call ptr %tmp29( ptr %a, ptr %b ) ; <ptr> [#uses=1]
248 bb35: ; preds = %_ubyte_convert2_to_ctypes.exit, %cond_next.i
249 %tmp36 = load ptr, ptr @PyUFunc_API, align 8 ; <ptr> [#uses=1]
250 %tmp37 = getelementptr ptr, ptr %tmp36, i64 27 ; <ptr> [#uses=1]
251 %tmp38 = load ptr, ptr %tmp37 ; <ptr> [#uses=1]
253 %tmp40 = load i8, ptr %arg2, align 1 ; <i8> [#uses=4]
254 %tmp1.i = icmp eq i8 %tmp40, 0 ; <i1> [#uses=2]
255 br i1 %tmp1.i, label %cond_true.i, label %cond_false.i
257 cond_true.i: ; preds = %bb35
258 %tmp3.i196 = call i32 @feraiseexcept( i32 4 ) ; <i32> [#uses=0]
259 %tmp46207 = load i8, ptr %arg2, align 1 ; <i8> [#uses=3]
260 %tmp48208 = load i8, ptr %arg1, align 1 ; <i8> [#uses=2]
261 %tmp1.i197210 = icmp eq i8 %tmp48208, 0 ; <i1> [#uses=1]
262 %tmp4.i212 = icmp eq i8 %tmp46207, 0 ; <i1> [#uses=1]
263 %tmp7.i198213 = or i1 %tmp1.i197210, %tmp4.i212 ; <i1> [#uses=1]
264 br i1 %tmp7.i198213, label %cond_true.i200, label %cond_next17.i
266 cond_false.i: ; preds = %bb35
267 %tmp42 = load i8, ptr %arg1, align 1 ; <i8> [#uses=3]
268 %tmp7.i = udiv i8 %tmp42, %tmp40 ; <i8> [#uses=2]
269 %tmp1.i197 = icmp eq i8 %tmp42, 0 ; <i1> [#uses=1]
270 %tmp7.i198 = or i1 %tmp1.i197, %tmp1.i ; <i1> [#uses=1]
271 br i1 %tmp7.i198, label %cond_true.i200, label %cond_next17.i
273 cond_true.i200: ; preds = %cond_false.i, %cond_true.i
274 %out.0 = phi i8 [ 0, %cond_true.i ], [ %tmp7.i, %cond_false.i ] ; <i8> [#uses=2]
275 %tmp46202.0 = phi i8 [ %tmp46207, %cond_true.i ], [ %tmp40, %cond_false.i ] ; <i8> [#uses=1]
276 %tmp11.i199 = icmp eq i8 %tmp46202.0, 0 ; <i1> [#uses=1]
277 br i1 %tmp11.i199, label %cond_true14.i, label %ubyte_ctype_remainder.exit
279 cond_true14.i: ; preds = %cond_true.i200
280 %tmp15.i = call i32 @feraiseexcept( i32 4 ) ; <i32> [#uses=0]
281 br label %ubyte_ctype_remainder.exit
283 cond_next17.i: ; preds = %cond_false.i, %cond_true.i
284 %out.1 = phi i8 [ 0, %cond_true.i ], [ %tmp7.i, %cond_false.i ] ; <i8> [#uses=1]
285 %tmp46202.1 = phi i8 [ %tmp46207, %cond_true.i ], [ %tmp40, %cond_false.i ] ; <i8> [#uses=1]
286 %tmp48205.1 = phi i8 [ %tmp48208, %cond_true.i ], [ %tmp42, %cond_false.i ] ; <i8> [#uses=1]
287 %tmp20.i = urem i8 %tmp48205.1, %tmp46202.1 ; <i8> [#uses=1]
288 br label %ubyte_ctype_remainder.exit
290 ubyte_ctype_remainder.exit: ; preds = %cond_next17.i, %cond_true14.i, %cond_true.i200
291 %out2.0 = phi i8 [ %tmp20.i, %cond_next17.i ], [ 0, %cond_true14.i ], [ 0, %cond_true.i200 ] ; <i8> [#uses=1]
292 %out.2 = phi i8 [ %out.1, %cond_next17.i ], [ %out.0, %cond_true14.i ], [ %out.0, %cond_true.i200 ] ; <i8> [#uses=1]
293 %tmp52 = load ptr, ptr @PyUFunc_API, align 8 ; <ptr> [#uses=1]
294 %tmp53 = getelementptr ptr, ptr %tmp52, i64 28 ; <ptr> [#uses=1]
295 %tmp54 = load ptr, ptr %tmp53 ; <ptr> [#uses=1]
296 %tmp56 = call i32 %tmp54( ) ; <i32> [#uses=2]
297 %tmp58 = icmp eq i32 %tmp56, 0 ; <i1> [#uses=1]
298 br i1 %tmp58, label %cond_next89, label %cond_true61
300 cond_true61: ; preds = %ubyte_ctype_remainder.exit
301 %tmp62 = load ptr, ptr @PyUFunc_API, align 8 ; <ptr> [#uses=1]
302 %tmp63 = getelementptr ptr, ptr %tmp62, i64 25 ; <ptr> [#uses=1]
303 %tmp64 = load ptr, ptr %tmp63 ; <ptr> [#uses=1]
304 %tmp67 = call i32 %tmp64( ptr @.str5, ptr %bufsize, ptr %errmask, ptr %errobj ) ; <i32> [#uses=1]
305 %tmp68 = icmp slt i32 %tmp67, 0 ; <i1> [#uses=1]
306 br i1 %tmp68, label %UnifiedReturnBlock, label %cond_next73
308 cond_next73: ; preds = %cond_true61
309 store i32 1, ptr %first, align 4
310 %tmp74 = load ptr, ptr @PyUFunc_API, align 8 ; <ptr> [#uses=1]
311 %tmp75 = getelementptr ptr, ptr %tmp74, i64 29 ; <ptr> [#uses=1]
312 %tmp76 = load ptr, ptr %tmp75 ; <ptr> [#uses=1]
313 %tmp79 = load ptr, ptr %errobj, align 8 ; <ptr> [#uses=1]
314 %tmp80 = load i32, ptr %errmask, align 4 ; <i32> [#uses=1]
315 %tmp82 = call i32 %tmp76( i32 %tmp80, ptr %tmp79, i32 %tmp56, ptr %first ) ; <i32> [#uses=1]
316 %tmp83 = icmp eq i32 %tmp82, 0 ; <i1> [#uses=1]
317 br i1 %tmp83, label %cond_next89, label %UnifiedReturnBlock
319 cond_next89: ; preds = %cond_next73, %ubyte_ctype_remainder.exit
320 %tmp90 = call ptr @PyTuple_New( i64 2 ) ; <ptr> [#uses=9]
321 %tmp92 = icmp eq ptr %tmp90, null ; <i1> [#uses=1]
322 br i1 %tmp92, label %UnifiedReturnBlock, label %cond_next97
324 cond_next97: ; preds = %cond_next89
325 %tmp98 = load ptr, ptr @PyArray_API, align 8 ; <ptr> [#uses=1]
326 %tmp99 = getelementptr ptr, ptr %tmp98, i64 25 ; <ptr> [#uses=1]
327 %tmp100 = load ptr, ptr %tmp99 ; <ptr> [#uses=1]
328 %tmp102 = getelementptr %struct._typeobject, ptr %tmp100, i32 0, i32 38 ; <ptr> [#uses=1]
329 %tmp103 = load ptr, ptr %tmp102 ; <ptr> [#uses=1]
330 %tmp108 = call ptr %tmp103( ptr %tmp100, i64 0 ) ; <ptr> [#uses=3]
331 %tmp110 = icmp eq ptr %tmp108, null ; <i1> [#uses=1]
332 br i1 %tmp110, label %cond_true113, label %cond_next135
334 cond_true113: ; preds = %cond_next97
335 %tmp115 = getelementptr %struct.PyObject, ptr %tmp90, i32 0, i32 0 ; <ptr> [#uses=2]
336 %tmp116 = load i64, ptr %tmp115 ; <i64> [#uses=1]
337 %tmp117 = add i64 %tmp116, -1 ; <i64> [#uses=2]
338 store i64 %tmp117, ptr %tmp115
339 %tmp123 = icmp eq i64 %tmp117, 0 ; <i1> [#uses=1]
340 br i1 %tmp123, label %cond_true126, label %UnifiedReturnBlock
342 cond_true126: ; preds = %cond_true113
343 %tmp128 = getelementptr %struct.PyObject, ptr %tmp90, i32 0, i32 1 ; <ptr> [#uses=1]
344 %tmp129 = load ptr, ptr %tmp128 ; <ptr> [#uses=1]
345 %tmp130 = getelementptr %struct._typeobject, ptr %tmp129, i32 0, i32 6 ; <ptr> [#uses=1]
346 %tmp131 = load ptr, ptr %tmp130 ; <ptr> [#uses=1]
347 call void %tmp131( ptr %tmp90 )
350 cond_next135: ; preds = %cond_next97
351 %tmp139 = getelementptr %struct.PyBoolScalarObject, ptr %tmp108, i32 0, i32 2 ; <ptr> [#uses=1]
352 store i8 %out.2, ptr %tmp139
353 %tmp143 = getelementptr %struct.PyTupleObject, ptr %tmp90, i32 0, i32 3, i64 0 ; <ptr> [#uses=1]
354 store ptr %tmp108, ptr %tmp143
355 %tmp145 = load ptr, ptr @PyArray_API, align 8 ; <ptr> [#uses=1]
356 %tmp146 = getelementptr ptr, ptr %tmp145, i64 25 ; <ptr> [#uses=1]
357 %tmp147 = load ptr, ptr %tmp146 ; <ptr> [#uses=1]
358 %tmp149 = getelementptr %struct._typeobject, ptr %tmp147, i32 0, i32 38 ; <ptr> [#uses=1]
359 %tmp150 = load ptr, ptr %tmp149 ; <ptr> [#uses=1]
360 %tmp155 = call ptr %tmp150( ptr %tmp147, i64 0 ) ; <ptr> [#uses=3]
361 %tmp157 = icmp eq ptr %tmp155, null ; <i1> [#uses=1]
362 br i1 %tmp157, label %cond_true160, label %cond_next182
364 cond_true160: ; preds = %cond_next135
365 %tmp162 = getelementptr %struct.PyObject, ptr %tmp90, i32 0, i32 0 ; <ptr> [#uses=2]
366 %tmp163 = load i64, ptr %tmp162 ; <i64> [#uses=1]
367 %tmp164 = add i64 %tmp163, -1 ; <i64> [#uses=2]
368 store i64 %tmp164, ptr %tmp162
369 %tmp170 = icmp eq i64 %tmp164, 0 ; <i1> [#uses=1]
370 br i1 %tmp170, label %cond_true173, label %UnifiedReturnBlock
372 cond_true173: ; preds = %cond_true160
373 %tmp175 = getelementptr %struct.PyObject, ptr %tmp90, i32 0, i32 1 ; <ptr> [#uses=1]
374 %tmp176 = load ptr, ptr %tmp175 ; <ptr> [#uses=1]
375 %tmp177 = getelementptr %struct._typeobject, ptr %tmp176, i32 0, i32 6 ; <ptr> [#uses=1]
376 %tmp178 = load ptr, ptr %tmp177 ; <ptr> [#uses=1]
377 call void %tmp178( ptr %tmp90 )
380 cond_next182: ; preds = %cond_next135
381 %tmp186 = getelementptr %struct.PyBoolScalarObject, ptr %tmp155, i32 0, i32 2 ; <ptr> [#uses=1]
382 store i8 %out2.0, ptr %tmp186
383 %tmp190 = getelementptr %struct.PyTupleObject, ptr %tmp90, i32 0, i32 3, i64 1 ; <ptr> [#uses=1]
384 store ptr %tmp155, ptr %tmp190
387 UnifiedReturnBlock: ; preds = %cond_true160, %cond_true113, %cond_next89, %cond_next73, %cond_true61, %bb17
391 declare i32 @feraiseexcept(i32)
393 declare fastcc i32 @_ubyte_convert_to_ctype(ptr, ptr)
395 declare ptr @PyErr_Occurred()
397 declare ptr @PyTuple_New(i64)