1 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
3 %struct.gs_matrix = type { float, int, float, int, float, int, float, int, float, int, float, int }
4 %struct.gx_bitmap = type { ubyte*, int, int, int }
5 %struct.gx_device = type { int, %struct.gx_device_procs*, sbyte*, int, int, float, float, int, ushort, int, int }
6 %struct.gx_device_memory = type { int, %struct.gx_device_procs*, sbyte*, int, int, float, float, int, ushort, int, int, %struct.gs_matrix, int, ubyte*, ubyte**, int (%struct.gx_device_memory*, int, int, int, int, int)*, int, int, ubyte* }
7 %struct.gx_device_procs = type { int (%struct.gx_device*)*, void (%struct.gx_device*, %struct.gs_matrix*)*, int (%struct.gx_device*)*, int (%struct.gx_device*)*, int (%struct.gx_device*)*, uint (%struct.gx_device*, ushort, ushort, ushort)*, int (%struct.gx_device*, uint, ushort*)*, int (%struct.gx_device*, int, int, int, int, uint)*, int (%struct.gx_device*, %struct.gx_bitmap*, int, int, int, int, uint, uint)*, int (%struct.gx_device*, ubyte*, int, int, int, int, int, int, uint, uint)*, int (%struct.gx_device*, ubyte*, int, int, int, int, int, int)*, int (%struct.gx_device*, int, int, int, int, uint)*, int (%struct.gx_device*, int, int, int, int, int, int, uint)*, int (%struct.gx_device*, %struct.gx_bitmap*, int, int, int, int, int, int, uint, uint)* }
9 implementation ; Functions:
11 int %mem_mono_copy_mono(%struct.gx_device* %dev, ubyte* %base, int %sourcex, int %raster, int %x, int %y, int %w, int %h, uint %zero, uint %one) {
13 %raster.ui = cast int %raster to uint ; <uint> [#uses=3]
14 %tmp = seteq uint %one, %zero ; <bool> [#uses=1]
15 br bool %tmp, label %cond_true, label %cond_next
17 cond_true: ; preds = %entry
18 %tmp6 = tail call int %mem_mono_fill_rectangle( %struct.gx_device* %dev, int %x, int %y, int %w, int %h, uint %zero ) ; <int> [#uses=1]
21 cond_next: ; preds = %entry
22 %tmp8 = cast %struct.gx_device* %dev to %struct.gx_device_memory* ; <%struct.gx_device_memory*> [#uses=6]
23 %tmp = getelementptr %struct.gx_device_memory* %tmp8, int 0, uint 15 ; <int (%struct.gx_device_memory*, int, int, int, int, int)**> [#uses=1]
24 %tmp = load int (%struct.gx_device_memory*, int, int, int, int, int)** %tmp ; <int (%struct.gx_device_memory*, int, int, int, int, int)*> [#uses=2]
25 %tmp9 = seteq int (%struct.gx_device_memory*, int, int, int, int, int)* %tmp, %mem_no_fault_proc ; <bool> [#uses=1]
26 br bool %tmp9, label %cond_next46, label %cond_true10
28 cond_true10: ; preds = %cond_next
29 %tmp16 = add int %x, 7 ; <int> [#uses=1]
30 %tmp17 = add int %tmp16, %w ; <int> [#uses=1]
31 %tmp18 = shr int %tmp17, ubyte 3 ; <int> [#uses=1]
32 %tmp20 = shr int %x, ubyte 3 ; <int> [#uses=2]
33 %tmp21 = sub int %tmp18, %tmp20 ; <int> [#uses=1]
34 %tmp27 = tail call int %tmp( %struct.gx_device_memory* %tmp8, int %tmp20, int %y, int %tmp21, int %h, int 1 ) ; <int> [#uses=2]
35 %tmp29 = setlt int %tmp27, 0 ; <bool> [#uses=1]
36 br bool %tmp29, label %cond_true30, label %cond_next46
38 cond_true30: ; preds = %cond_true10
39 %tmp41 = tail call int %mem_copy_mono_recover( %struct.gx_device* %dev, ubyte* %base, int %sourcex, int %raster, int %x, int %y, int %w, int %h, uint %zero, uint %one, int %tmp27 ) ; <int> [#uses=1]
42 cond_next46: ; preds = %cond_true10, %cond_next
43 %tmp48 = setgt int %w, 0 ; <bool> [#uses=1]
44 %tmp53 = setgt int %h, 0 ; <bool> [#uses=1]
45 %bothcond = and bool %tmp53, %tmp48 ; <bool> [#uses=1]
46 br bool %bothcond, label %bb58, label %return
48 bb58: ; preds = %cond_next46
49 %tmp60 = setlt int %x, 0 ; <bool> [#uses=1]
50 br bool %tmp60, label %return, label %cond_next63
52 cond_next63: ; preds = %bb58
53 %tmp65 = getelementptr %struct.gx_device_memory* %tmp8, int 0, uint 3 ; <int*> [#uses=1]
54 %tmp66 = load int* %tmp65 ; <int> [#uses=1]
55 %tmp68 = sub int %tmp66, %w ; <int> [#uses=1]
56 %tmp70 = setlt int %tmp68, %x ; <bool> [#uses=1]
57 %tmp75 = setlt int %y, 0 ; <bool> [#uses=1]
58 %bothcond1 = or bool %tmp70, %tmp75 ; <bool> [#uses=1]
59 br bool %bothcond1, label %return, label %cond_next78
61 cond_next78: ; preds = %cond_next63
62 %tmp80 = getelementptr %struct.gx_device_memory* %tmp8, int 0, uint 4 ; <int*> [#uses=1]
63 %tmp81 = load int* %tmp80 ; <int> [#uses=1]
64 %tmp83 = sub int %tmp81, %h ; <int> [#uses=1]
65 %tmp85 = setlt int %tmp83, %y ; <bool> [#uses=1]
66 br bool %tmp85, label %return, label %bb91
68 bb91: ; preds = %cond_next78
69 %tmp93 = shr int %x, ubyte 3 ; <int> [#uses=4]
70 %tmp = getelementptr %struct.gx_device_memory* %tmp8, int 0, uint 14 ; <ubyte***> [#uses=1]
71 %tmp = load ubyte*** %tmp ; <ubyte**> [#uses=1]
72 %tmp96 = getelementptr ubyte** %tmp, int %y ; <ubyte**> [#uses=4]
73 %tmp98 = load ubyte** %tmp96 ; <ubyte*> [#uses=1]
74 %tmp100 = getelementptr ubyte* %tmp98, int %tmp93 ; <ubyte*> [#uses=3]
75 %tmp102 = shr int %sourcex, ubyte 3 ; <int> [#uses=3]
76 %tmp106 = and int %sourcex, 7 ; <int> [#uses=1]
77 %tmp107 = sub int 8, %tmp106 ; <int> [#uses=4]
78 %tmp109 = and int %x, 7 ; <int> [#uses=3]
79 %tmp110 = sub int 8, %tmp109 ; <int> [#uses=8]
80 %tmp112 = sub int 8, %tmp110 ; <int> [#uses=1]
81 %tmp112 = cast int %tmp112 to ubyte ; <ubyte> [#uses=1]
82 %tmp113464 = shr uint 255, ubyte %tmp112 ; <uint> [#uses=4]
83 %tmp116 = setgt int %tmp110, %w ; <bool> [#uses=1]
84 %tmp132 = getelementptr %struct.gx_device_memory* %tmp8, int 0, uint 16 ; <int*> [#uses=2]
85 br bool %tmp116, label %cond_true117, label %cond_false123
87 cond_true117: ; preds = %bb91
88 %tmp119 = cast int %w to ubyte ; <ubyte> [#uses=1]
89 %tmp120 = shr uint %tmp113464, ubyte %tmp119 ; <uint> [#uses=1]
90 %tmp122 = sub uint %tmp113464, %tmp120 ; <uint> [#uses=2]
91 %tmp13315 = load int* %tmp132 ; <int> [#uses=1]
92 %tmp13416 = seteq int %tmp13315, 0 ; <bool> [#uses=1]
93 br bool %tmp13416, label %cond_next151, label %cond_true135
95 cond_false123: ; preds = %bb91
96 %tmp126 = sub int %w, %tmp110 ; <int> [#uses=1]
97 %tmp126 = cast int %tmp126 to ubyte ; <ubyte> [#uses=1]
98 %tmp127 = and ubyte %tmp126, 7 ; <ubyte> [#uses=1]
99 %tmp128 = shr uint 255, ubyte %tmp127 ; <uint> [#uses=1]
100 %tmp1295 = sub uint 255, %tmp128 ; <uint> [#uses=2]
101 %tmp133 = load int* %tmp132 ; <int> [#uses=1]
102 %tmp134 = seteq int %tmp133, 0 ; <bool> [#uses=1]
103 br bool %tmp134, label %cond_next151, label %cond_true135
105 cond_true135: ; preds = %cond_false123, %cond_true117
106 %rmask.0.0 = phi uint [ undef, %cond_true117 ], [ %tmp1295, %cond_false123 ] ; <uint> [#uses=2]
107 %mask.1.0 = phi uint [ %tmp122, %cond_true117 ], [ %tmp113464, %cond_false123 ] ; <uint> [#uses=2]
108 %not.tmp137 = setne uint %zero, 4294967295 ; <bool> [#uses=1]
109 %tmp140 = cast bool %not.tmp137 to uint ; <uint> [#uses=1]
110 %zero_addr.0 = xor uint %tmp140, %zero ; <uint> [#uses=2]
111 %tmp144 = seteq uint %one, 4294967295 ; <bool> [#uses=1]
112 br bool %tmp144, label %cond_next151, label %cond_true145
114 cond_true145: ; preds = %cond_true135
115 %tmp147 = xor uint %one, 1 ; <uint> [#uses=1]
116 br label %cond_next151
118 cond_next151: ; preds = %cond_true145, %cond_true135, %cond_false123, %cond_true117
119 %rmask.0.1 = phi uint [ %rmask.0.0, %cond_true145 ], [ undef, %cond_true117 ], [ %tmp1295, %cond_false123 ], [ %rmask.0.0, %cond_true135 ] ; <uint> [#uses=4]
120 %mask.1.1 = phi uint [ %mask.1.0, %cond_true145 ], [ %tmp122, %cond_true117 ], [ %tmp113464, %cond_false123 ], [ %mask.1.0, %cond_true135 ] ; <uint> [#uses=4]
121 %one_addr.0 = phi uint [ %tmp147, %cond_true145 ], [ %one, %cond_true117 ], [ %one, %cond_false123 ], [ %one, %cond_true135 ] ; <uint> [#uses=2]
122 %zero_addr.1 = phi uint [ %zero_addr.0, %cond_true145 ], [ %zero, %cond_true117 ], [ %zero, %cond_false123 ], [ %zero_addr.0, %cond_true135 ] ; <uint> [#uses=2]
123 %tmp153 = seteq uint %zero_addr.1, 1 ; <bool> [#uses=2]
124 %tmp158 = seteq uint %one_addr.0, 0 ; <bool> [#uses=2]
125 %bothcond2 = or bool %tmp153, %tmp158 ; <bool> [#uses=1]
126 %iftmp.35.0 = select bool %bothcond2, uint 4294967295, uint 0 ; <uint> [#uses=8]
127 %tmp167 = seteq uint %zero_addr.1, 0 ; <bool> [#uses=1]
128 %bothcond3 = or bool %tmp167, %tmp158 ; <bool> [#uses=1]
129 %iftmp.36.0 = select bool %bothcond3, uint 0, uint 4294967295 ; <uint> [#uses=4]
130 %tmp186 = seteq uint %one_addr.0, 1 ; <bool> [#uses=1]
131 %bothcond4 = or bool %tmp153, %tmp186 ; <bool> [#uses=1]
132 %iftmp.37.0 = select bool %bothcond4, uint 4294967295, uint 0 ; <uint> [#uses=6]
133 %tmp196 = seteq int %tmp107, %tmp110 ; <bool> [#uses=1]
134 br bool %tmp196, label %cond_true197, label %cond_false299
136 cond_true197: ; preds = %cond_next151
137 %tmp29222 = add int %h, -1 ; <int> [#uses=3]
138 %tmp29424 = setlt int %tmp29222, 0 ; <bool> [#uses=1]
139 br bool %tmp29424, label %return, label %cond_true295.preheader
141 cond_true249.preheader: ; preds = %cond_true295
142 br label %cond_true249
144 cond_true249: ; preds = %cond_true249, %cond_true249.preheader
145 %indvar = phi uint [ 0, %cond_true249.preheader ], [ %indvar.next, %cond_true249 ] ; <uint> [#uses=2]
146 %optr.3.2 = phi ubyte* [ %tmp232, %cond_true249 ], [ %dest.1.0, %cond_true249.preheader ] ; <ubyte*> [#uses=1]
147 %bptr.3.2 = phi ubyte* [ %tmp226, %cond_true249 ], [ %line.1.0, %cond_true249.preheader ] ; <ubyte*> [#uses=1]
148 %tmp. = add int %tmp109, %w ; <int> [#uses=1]
149 %tmp.58 = mul int %indvar, -8 ; <int> [#uses=1]
150 %tmp.57 = add int %tmp., -16 ; <int> [#uses=1]
151 %tmp246.2 = add int %tmp.58, %tmp.57 ; <int> [#uses=1]
152 %tmp225 = cast ubyte* %bptr.3.2 to uint ; <uint> [#uses=1]
153 %tmp226 = add uint %tmp225, 1 ; <uint> [#uses=1]
154 %tmp226 = cast uint %tmp226 to ubyte* ; <ubyte*> [#uses=3]
155 %tmp228 = load ubyte* %tmp226 ; <ubyte> [#uses=1]
156 %tmp228 = cast ubyte %tmp228 to uint ; <uint> [#uses=1]
157 %tmp230 = xor uint %tmp228, %iftmp.35.0 ; <uint> [#uses=2]
158 %tmp231 = cast ubyte* %optr.3.2 to uint ; <uint> [#uses=1]
159 %tmp232 = add uint %tmp231, 1 ; <uint> [#uses=1]
160 %tmp232 = cast uint %tmp232 to ubyte* ; <ubyte*> [#uses=4]
161 %tmp235 = or uint %tmp230, %iftmp.36.0 ; <uint> [#uses=1]
162 %tmp235 = cast uint %tmp235 to ubyte ; <ubyte> [#uses=1]
163 %tmp237 = load ubyte* %tmp232 ; <ubyte> [#uses=1]
164 %tmp238 = and ubyte %tmp235, %tmp237 ; <ubyte> [#uses=1]
165 %tmp241 = and uint %tmp230, %iftmp.37.0 ; <uint> [#uses=1]
166 %tmp241 = cast uint %tmp241 to ubyte ; <ubyte> [#uses=1]
167 %tmp242 = or ubyte %tmp238, %tmp241 ; <ubyte> [#uses=1]
168 store ubyte %tmp242, ubyte* %tmp232
169 %tmp24629 = add int %tmp246.2, -8 ; <int> [#uses=2]
170 %tmp24831 = setlt int %tmp24629, 0 ; <bool> [#uses=1]
171 %indvar.next = add uint %indvar, 1 ; <uint> [#uses=1]
172 br bool %tmp24831, label %bb252.loopexit, label %cond_true249
174 bb252.loopexit: ; preds = %cond_true249
177 bb252: ; preds = %cond_true295, %bb252.loopexit
178 %optr.3.3 = phi ubyte* [ %dest.1.0, %cond_true295 ], [ %tmp232, %bb252.loopexit ] ; <ubyte*> [#uses=1]
179 %bptr.3.3 = phi ubyte* [ %line.1.0, %cond_true295 ], [ %tmp226, %bb252.loopexit ] ; <ubyte*> [#uses=1]
180 %tmp246.3 = phi int [ %tmp246, %cond_true295 ], [ %tmp24629, %bb252.loopexit ] ; <int> [#uses=1]
181 %tmp254 = setgt int %tmp246.3, -8 ; <bool> [#uses=1]
182 br bool %tmp254, label %cond_true255, label %cond_next280
184 cond_true255: ; preds = %bb252
185 %tmp256 = cast ubyte* %bptr.3.3 to uint ; <uint> [#uses=1]
186 %tmp257 = add uint %tmp256, 1 ; <uint> [#uses=1]
187 %tmp257 = cast uint %tmp257 to ubyte* ; <ubyte*> [#uses=1]
188 %tmp259 = load ubyte* %tmp257 ; <ubyte> [#uses=1]
189 %tmp259 = cast ubyte %tmp259 to uint ; <uint> [#uses=1]
190 %tmp261 = xor uint %tmp259, %iftmp.35.0 ; <uint> [#uses=2]
191 %tmp262 = cast ubyte* %optr.3.3 to uint ; <uint> [#uses=1]
192 %tmp263 = add uint %tmp262, 1 ; <uint> [#uses=1]
193 %tmp263 = cast uint %tmp263 to ubyte* ; <ubyte*> [#uses=2]
194 %tmp265 = cast uint %tmp261 to ubyte ; <ubyte> [#uses=1]
195 %tmp268 = or ubyte %tmp266, %tmp265 ; <ubyte> [#uses=1]
196 %tmp270 = load ubyte* %tmp263 ; <ubyte> [#uses=1]
197 %tmp271 = and ubyte %tmp268, %tmp270 ; <ubyte> [#uses=1]
198 %tmp276 = and uint %tmp274, %tmp261 ; <uint> [#uses=1]
199 %tmp276 = cast uint %tmp276 to ubyte ; <ubyte> [#uses=1]
200 %tmp277 = or ubyte %tmp271, %tmp276 ; <ubyte> [#uses=1]
201 store ubyte %tmp277, ubyte* %tmp263
202 br label %cond_next280
204 cond_next280: ; preds = %cond_true255, %bb252
205 %tmp281 = cast ubyte** %dest_line.1.0 to uint ; <uint> [#uses=1]
206 %tmp282 = add uint %tmp281, 4 ; <uint> [#uses=1]
207 %tmp282 = cast uint %tmp282 to ubyte** ; <ubyte**> [#uses=2]
208 %tmp284 = load ubyte** %tmp282 ; <ubyte*> [#uses=1]
209 %tmp286 = getelementptr ubyte* %tmp284, int %tmp93 ; <ubyte*> [#uses=1]
210 %tmp292 = add int %tmp292.0, -1 ; <int> [#uses=1]
211 %tmp294 = setlt int %tmp292, 0 ; <bool> [#uses=1]
212 %indvar.next61 = add uint %indvar60, 1 ; <uint> [#uses=1]
213 br bool %tmp294, label %return.loopexit, label %cond_true295
215 cond_true295.preheader: ; preds = %cond_true197
216 %tmp200 = sub int %w, %tmp110 ; <int> [#uses=1]
217 %tmp209 = cast uint %mask.1.1 to ubyte ; <ubyte> [#uses=1]
218 %tmp209not = xor ubyte %tmp209, 255 ; <ubyte> [#uses=1]
219 %tmp212 = cast uint %iftmp.36.0 to ubyte ; <ubyte> [#uses=2]
220 %tmp211 = or ubyte %tmp212, %tmp209not ; <ubyte> [#uses=2]
221 %tmp219 = and uint %iftmp.37.0, %mask.1.1 ; <uint> [#uses=2]
222 %tmp246 = add int %tmp200, -8 ; <int> [#uses=3]
223 %tmp248 = setlt int %tmp246, 0 ; <bool> [#uses=1]
224 %tmp264 = cast uint %rmask.0.1 to ubyte ; <ubyte> [#uses=1]
225 %tmp264not = xor ubyte %tmp264, 255 ; <ubyte> [#uses=1]
226 %tmp266 = or ubyte %tmp212, %tmp264not ; <ubyte> [#uses=2]
227 %tmp274 = and uint %iftmp.37.0, %rmask.0.1 ; <uint> [#uses=2]
228 br bool %tmp248, label %cond_true295.preheader.split.us, label %cond_true295.preheader.split
230 cond_true295.preheader.split.us: ; preds = %cond_true295.preheader
231 br label %cond_true295.us
233 cond_true295.us: ; preds = %cond_next280.us, %cond_true295.preheader.split.us
234 %indvar86 = phi uint [ 0, %cond_true295.preheader.split.us ], [ %indvar.next87, %cond_next280.us ] ; <uint> [#uses=3]
235 %dest.1.0.us = phi ubyte* [ %tmp286.us, %cond_next280.us ], [ %tmp100, %cond_true295.preheader.split.us ] ; <ubyte*> [#uses=3]
236 %dest_line.1.0.us = phi ubyte** [ %tmp282.us, %cond_next280.us ], [ %tmp96, %cond_true295.preheader.split.us ] ; <ubyte**> [#uses=1]
237 %tmp.89 = sub uint 0, %indvar86 ; <uint> [#uses=1]
238 %tmp292.0.us = add int %tmp.89, %tmp29222 ; <int> [#uses=1]
239 %tmp.91 = mul uint %indvar86, %raster.ui ; <uint> [#uses=1]
240 %tmp104.sum101 = add int %tmp102, %tmp.91 ; <int> [#uses=1]
241 %line.1.0.us = getelementptr ubyte* %base, int %tmp104.sum101 ; <ubyte*> [#uses=2]
242 %tmp.us = load ubyte* %line.1.0.us ; <ubyte> [#uses=1]
243 %tmp206.us = cast ubyte %tmp.us to uint ; <uint> [#uses=1]
244 %tmp208.us = xor uint %tmp206.us, %iftmp.35.0 ; <uint> [#uses=2]
245 %tmp210.us = cast uint %tmp208.us to ubyte ; <ubyte> [#uses=1]
246 %tmp213.us = or ubyte %tmp211, %tmp210.us ; <ubyte> [#uses=1]
247 %tmp215.us = load ubyte* %dest.1.0.us ; <ubyte> [#uses=1]
248 %tmp216.us = and ubyte %tmp213.us, %tmp215.us ; <ubyte> [#uses=1]
249 %tmp221.us = and uint %tmp219, %tmp208.us ; <uint> [#uses=1]
250 %tmp221.us = cast uint %tmp221.us to ubyte ; <ubyte> [#uses=1]
251 %tmp222.us = or ubyte %tmp216.us, %tmp221.us ; <ubyte> [#uses=1]
252 store ubyte %tmp222.us, ubyte* %dest.1.0.us
253 br bool true, label %bb252.us, label %cond_true249.preheader.us
255 cond_next280.us: ; preds = %bb252.us, %cond_true255.us
256 %tmp281.us = cast ubyte** %dest_line.1.0.us to uint ; <uint> [#uses=1]
257 %tmp282.us = add uint %tmp281.us, 4 ; <uint> [#uses=1]
258 %tmp282.us = cast uint %tmp282.us to ubyte** ; <ubyte**> [#uses=2]
259 %tmp284.us = load ubyte** %tmp282.us ; <ubyte*> [#uses=1]
260 %tmp286.us = getelementptr ubyte* %tmp284.us, int %tmp93 ; <ubyte*> [#uses=1]
261 %tmp292.us = add int %tmp292.0.us, -1 ; <int> [#uses=1]
262 %tmp294.us = setlt int %tmp292.us, 0 ; <bool> [#uses=1]
263 %indvar.next87 = add uint %indvar86, 1 ; <uint> [#uses=1]
264 br bool %tmp294.us, label %return.loopexit.us, label %cond_true295.us
266 cond_true255.us: ; preds = %bb252.us
267 %tmp256.us = cast ubyte* %bptr.3.3.us to uint ; <uint> [#uses=1]
268 %tmp257.us = add uint %tmp256.us, 1 ; <uint> [#uses=1]
269 %tmp257.us = cast uint %tmp257.us to ubyte* ; <ubyte*> [#uses=1]
270 %tmp259.us = load ubyte* %tmp257.us ; <ubyte> [#uses=1]
271 %tmp259.us = cast ubyte %tmp259.us to uint ; <uint> [#uses=1]
272 %tmp261.us = xor uint %tmp259.us, %iftmp.35.0 ; <uint> [#uses=2]
273 %tmp262.us = cast ubyte* %optr.3.3.us to uint ; <uint> [#uses=1]
274 %tmp263.us = add uint %tmp262.us, 1 ; <uint> [#uses=1]
275 %tmp263.us = cast uint %tmp263.us to ubyte* ; <ubyte*> [#uses=2]
276 %tmp265.us = cast uint %tmp261.us to ubyte ; <ubyte> [#uses=1]
277 %tmp268.us = or ubyte %tmp266, %tmp265.us ; <ubyte> [#uses=1]
278 %tmp270.us = load ubyte* %tmp263.us ; <ubyte> [#uses=1]
279 %tmp271.us = and ubyte %tmp268.us, %tmp270.us ; <ubyte> [#uses=1]
280 %tmp276.us = and uint %tmp274, %tmp261.us ; <uint> [#uses=1]
281 %tmp276.us = cast uint %tmp276.us to ubyte ; <ubyte> [#uses=1]
282 %tmp277.us = or ubyte %tmp271.us, %tmp276.us ; <ubyte> [#uses=1]
283 store ubyte %tmp277.us, ubyte* %tmp263.us
284 br label %cond_next280.us
286 bb252.us: ; preds = %bb252.loopexit.us, %cond_true295.us
287 %optr.3.3.us = phi ubyte* [ %dest.1.0.us, %cond_true295.us ], [ undef, %bb252.loopexit.us ] ; <ubyte*> [#uses=1]
288 %bptr.3.3.us = phi ubyte* [ %line.1.0.us, %cond_true295.us ], [ undef, %bb252.loopexit.us ] ; <ubyte*> [#uses=1]
289 %tmp246.3.us = phi int [ %tmp246, %cond_true295.us ], [ undef, %bb252.loopexit.us ] ; <int> [#uses=1]
290 %tmp254.us = setgt int %tmp246.3.us, -8 ; <bool> [#uses=1]
291 br bool %tmp254.us, label %cond_true255.us, label %cond_next280.us
293 cond_true249.us: ; preds = %cond_true249.preheader.us, %cond_true249.us
294 br bool undef, label %bb252.loopexit.us, label %cond_true249.us
296 cond_true249.preheader.us: ; preds = %cond_true295.us
297 br label %cond_true249.us
299 bb252.loopexit.us: ; preds = %cond_true249.us
302 return.loopexit.us: ; preds = %cond_next280.us
303 br label %return.loopexit.split
305 cond_true295.preheader.split: ; preds = %cond_true295.preheader
306 br label %cond_true295
308 cond_true295: ; preds = %cond_true295.preheader.split, %cond_next280
309 %indvar60 = phi uint [ 0, %cond_true295.preheader.split ], [ %indvar.next61, %cond_next280 ] ; <uint> [#uses=3]
310 %dest.1.0 = phi ubyte* [ %tmp286, %cond_next280 ], [ %tmp100, %cond_true295.preheader.split ] ; <ubyte*> [#uses=4]
311 %dest_line.1.0 = phi ubyte** [ %tmp282, %cond_next280 ], [ %tmp96, %cond_true295.preheader.split ] ; <ubyte**> [#uses=1]
312 %tmp.63 = sub uint 0, %indvar60 ; <uint> [#uses=1]
313 %tmp292.0 = add int %tmp.63, %tmp29222 ; <int> [#uses=1]
314 %tmp.65 = mul uint %indvar60, %raster.ui ; <uint> [#uses=1]
315 %tmp104.sum97 = add int %tmp102, %tmp.65 ; <int> [#uses=1]
316 %line.1.0 = getelementptr ubyte* %base, int %tmp104.sum97 ; <ubyte*> [#uses=3]
317 %tmp = load ubyte* %line.1.0 ; <ubyte> [#uses=1]
318 %tmp206 = cast ubyte %tmp to uint ; <uint> [#uses=1]
319 %tmp208 = xor uint %tmp206, %iftmp.35.0 ; <uint> [#uses=2]
320 %tmp210 = cast uint %tmp208 to ubyte ; <ubyte> [#uses=1]
321 %tmp213 = or ubyte %tmp211, %tmp210 ; <ubyte> [#uses=1]
322 %tmp215 = load ubyte* %dest.1.0 ; <ubyte> [#uses=1]
323 %tmp216 = and ubyte %tmp213, %tmp215 ; <ubyte> [#uses=1]
324 %tmp221 = and uint %tmp219, %tmp208 ; <uint> [#uses=1]
325 %tmp221 = cast uint %tmp221 to ubyte ; <ubyte> [#uses=1]
326 %tmp222 = or ubyte %tmp216, %tmp221 ; <ubyte> [#uses=1]
327 store ubyte %tmp222, ubyte* %dest.1.0
328 br bool false, label %bb252, label %cond_true249.preheader
330 cond_false299: ; preds = %cond_next151
331 %tmp302 = sub int %tmp107, %tmp110 ; <int> [#uses=1]
332 %tmp303 = and int %tmp302, 7 ; <int> [#uses=3]
333 %tmp305 = sub int 8, %tmp303 ; <int> [#uses=1]
334 %tmp45438 = add int %h, -1 ; <int> [#uses=2]
335 %tmp45640 = setlt int %tmp45438, 0 ; <bool> [#uses=1]
336 br bool %tmp45640, label %return, label %cond_true457.preheader
338 cond_true316: ; preds = %cond_true457
339 %tmp318 = cast ubyte %tmp318 to uint ; <uint> [#uses=1]
340 %tmp320 = shr uint %tmp318, ubyte %tmp319 ; <uint> [#uses=1]
341 br label %cond_next340
343 cond_false321: ; preds = %cond_true457
344 %tmp3188 = cast ubyte %tmp318 to uint ; <uint> [#uses=1]
345 %tmp325 = shl uint %tmp3188, ubyte %tmp324 ; <uint> [#uses=2]
346 %tmp326 = cast ubyte* %line.3.0 to uint ; <uint> [#uses=1]
347 %tmp327 = add uint %tmp326, 1 ; <uint> [#uses=1]
348 %tmp327 = cast uint %tmp327 to ubyte* ; <ubyte*> [#uses=3]
349 br bool %tmp330, label %cond_true331, label %cond_next340
351 cond_true331: ; preds = %cond_false321
352 %tmp333 = load ubyte* %tmp327 ; <ubyte> [#uses=1]
353 %tmp333 = cast ubyte %tmp333 to uint ; <uint> [#uses=1]
354 %tmp335 = shr uint %tmp333, ubyte %tmp319 ; <uint> [#uses=1]
355 %tmp337 = add uint %tmp335, %tmp325 ; <uint> [#uses=1]
356 br label %cond_next340
358 cond_next340: ; preds = %cond_true331, %cond_false321, %cond_true316
359 %bits.0 = phi uint [ %tmp320, %cond_true316 ], [ %tmp337, %cond_true331 ], [ %tmp325, %cond_false321 ] ; <uint> [#uses=1]
360 %bptr307.3 = phi ubyte* [ %line.3.0, %cond_true316 ], [ %tmp327, %cond_true331 ], [ %tmp327, %cond_false321 ] ; <ubyte*> [#uses=2]
361 %tmp343 = xor uint %bits.0, %iftmp.35.0 ; <uint> [#uses=2]
362 %tmp345 = cast uint %tmp343 to ubyte ; <ubyte> [#uses=1]
363 %tmp348 = or ubyte %tmp346, %tmp345 ; <ubyte> [#uses=1]
364 %tmp350 = load ubyte* %dest.3.0 ; <ubyte> [#uses=1]
365 %tmp351 = and ubyte %tmp348, %tmp350 ; <ubyte> [#uses=1]
366 %tmp356 = and uint %tmp354, %tmp343 ; <uint> [#uses=1]
367 %tmp356 = cast uint %tmp356 to ubyte ; <ubyte> [#uses=1]
368 %tmp357 = or ubyte %tmp351, %tmp356 ; <ubyte> [#uses=1]
369 store ubyte %tmp357, ubyte* %dest.3.0
370 %tmp362 = cast ubyte* %dest.3.0 to uint ; <uint> [#uses=1]
371 %optr309.3.in51 = add uint %tmp362, 1 ; <uint> [#uses=2]
372 %optr309.353 = cast uint %optr309.3.in51 to ubyte* ; <ubyte*> [#uses=2]
373 br bool %tmp39755, label %cond_true398.preheader, label %bb401
375 cond_true398.preheader: ; preds = %cond_next340
376 br label %cond_true398
378 cond_true398: ; preds = %cond_true398, %cond_true398.preheader
379 %indvar66 = phi uint [ 0, %cond_true398.preheader ], [ %indvar.next67, %cond_true398 ] ; <uint> [#uses=3]
380 %bptr307.4.0 = phi ubyte* [ %tmp370, %cond_true398 ], [ %bptr307.3, %cond_true398.preheader ] ; <ubyte*> [#uses=2]
381 %optr309.3.0 = phi ubyte* [ %optr309.3, %cond_true398 ], [ %optr309.353, %cond_true398.preheader ] ; <ubyte*> [#uses=2]
382 %optr309.3.in.0 = add uint %indvar66, %optr309.3.in51 ; <uint> [#uses=1]
383 %tmp.70 = add int %tmp109, %w ; <int> [#uses=1]
384 %tmp.72 = mul int %indvar66, -8 ; <int> [#uses=1]
385 %tmp.71 = add int %tmp.70, -8 ; <int> [#uses=1]
386 %count308.3.0 = add int %tmp.72, %tmp.71 ; <int> [#uses=1]
387 %tmp366 = load ubyte* %bptr307.4.0 ; <ubyte> [#uses=1]
388 %tmp366 = cast ubyte %tmp366 to uint ; <uint> [#uses=1]
389 %tmp369 = cast ubyte* %bptr307.4.0 to uint ; <uint> [#uses=1]
390 %tmp370 = add uint %tmp369, 1 ; <uint> [#uses=1]
391 %tmp370 = cast uint %tmp370 to ubyte* ; <ubyte*> [#uses=3]
392 %tmp372 = load ubyte* %tmp370 ; <ubyte> [#uses=1]
393 %tmp372 = cast ubyte %tmp372 to uint ; <uint> [#uses=1]
394 %tmp374463 = shr uint %tmp372, ubyte %tmp319 ; <uint> [#uses=1]
395 %tmp368 = shl uint %tmp366, ubyte %tmp324 ; <uint> [#uses=1]
396 %tmp377 = add uint %tmp374463, %tmp368 ; <uint> [#uses=1]
397 %tmp379 = xor uint %tmp377, %iftmp.35.0 ; <uint> [#uses=2]
398 %tmp382 = or uint %tmp379, %iftmp.36.0 ; <uint> [#uses=1]
399 %tmp382 = cast uint %tmp382 to ubyte ; <ubyte> [#uses=1]
400 %tmp384 = load ubyte* %optr309.3.0 ; <ubyte> [#uses=1]
401 %tmp385 = and ubyte %tmp382, %tmp384 ; <ubyte> [#uses=1]
402 %tmp388 = and uint %tmp379, %iftmp.37.0 ; <uint> [#uses=1]
403 %tmp388 = cast uint %tmp388 to ubyte ; <ubyte> [#uses=1]
404 %tmp389 = or ubyte %tmp385, %tmp388 ; <ubyte> [#uses=1]
405 store ubyte %tmp389, ubyte* %optr309.3.0
406 %tmp392 = add int %count308.3.0, -8 ; <int> [#uses=2]
407 %optr309.3.in = add uint %optr309.3.in.0, 1 ; <uint> [#uses=1]
408 %optr309.3 = cast uint %optr309.3.in to ubyte* ; <ubyte*> [#uses=2]
409 %tmp397 = setgt int %tmp392, 7 ; <bool> [#uses=1]
410 %indvar.next67 = add uint %indvar66, 1 ; <uint> [#uses=1]
411 br bool %tmp397, label %cond_true398, label %bb401.loopexit
413 bb401.loopexit: ; preds = %cond_true398
416 bb401: ; preds = %bb401.loopexit, %cond_next340
417 %count308.3.1 = phi int [ %tmp361, %cond_next340 ], [ %tmp392, %bb401.loopexit ] ; <int> [#uses=2]
418 %bptr307.4.1 = phi ubyte* [ %bptr307.3, %cond_next340 ], [ %tmp370, %bb401.loopexit ] ; <ubyte*> [#uses=2]
419 %optr309.3.1 = phi ubyte* [ %optr309.353, %cond_next340 ], [ %optr309.3, %bb401.loopexit ] ; <ubyte*> [#uses=2]
420 %tmp403 = setgt int %count308.3.1, 0 ; <bool> [#uses=1]
421 br bool %tmp403, label %cond_true404, label %cond_next442
423 cond_true404: ; preds = %bb401
424 %tmp406 = load ubyte* %bptr307.4.1 ; <ubyte> [#uses=1]
425 %tmp406 = cast ubyte %tmp406 to int ; <int> [#uses=1]
426 %tmp408 = shl int %tmp406, ubyte %tmp324 ; <int> [#uses=2]
427 %tmp413 = setgt int %count308.3.1, %tmp303 ; <bool> [#uses=1]
428 br bool %tmp413, label %cond_true414, label %cond_next422
430 cond_true414: ; preds = %cond_true404
431 %tmp409 = cast ubyte* %bptr307.4.1 to uint ; <uint> [#uses=1]
432 %tmp410 = add uint %tmp409, 1 ; <uint> [#uses=1]
433 %tmp410 = cast uint %tmp410 to ubyte* ; <ubyte*> [#uses=1]
434 %tmp416 = load ubyte* %tmp410 ; <ubyte> [#uses=1]
435 %tmp416 = cast ubyte %tmp416 to uint ; <uint> [#uses=1]
436 %tmp418 = shr uint %tmp416, ubyte %tmp319 ; <uint> [#uses=1]
437 %tmp420 = add int %tmp418, %tmp408 ; <int> [#uses=1]
438 br label %cond_next422
440 cond_next422: ; preds = %cond_true414, %cond_true404
441 %bits.6 = phi int [ %tmp420, %cond_true414 ], [ %tmp408, %cond_true404 ] ; <int> [#uses=1]
442 %tmp425 = xor int %bits.6, %iftmp.35.0 ; <int> [#uses=1]
443 %tmp427 = cast int %tmp425 to ubyte ; <ubyte> [#uses=2]
444 %tmp430 = or ubyte %tmp428, %tmp427 ; <ubyte> [#uses=1]
445 %tmp432 = load ubyte* %optr309.3.1 ; <ubyte> [#uses=1]
446 %tmp433 = and ubyte %tmp430, %tmp432 ; <ubyte> [#uses=1]
447 %tmp438 = and ubyte %tmp436, %tmp427 ; <ubyte> [#uses=1]
448 %tmp439 = or ubyte %tmp433, %tmp438 ; <ubyte> [#uses=1]
449 store ubyte %tmp439, ubyte* %optr309.3.1
450 br label %cond_next442
452 cond_next442: ; preds = %cond_next422, %bb401
453 %tmp443 = cast ubyte** %dest_line.3.0 to uint ; <uint> [#uses=1]
454 %tmp444 = add uint %tmp443, 4 ; <uint> [#uses=1]
455 %tmp444 = cast uint %tmp444 to ubyte** ; <ubyte**> [#uses=2]
456 %tmp446 = load ubyte** %tmp444 ; <ubyte*> [#uses=1]
457 %tmp448 = getelementptr ubyte* %tmp446, int %tmp93 ; <ubyte*> [#uses=1]
458 %tmp454 = add int %tmp454.0, -1 ; <int> [#uses=1]
459 %tmp456 = setlt int %tmp454, 0 ; <bool> [#uses=1]
460 %indvar.next75 = add uint %indvar74, 1 ; <uint> [#uses=1]
461 br bool %tmp456, label %return.loopexit56, label %cond_true457
463 cond_true457.preheader: ; preds = %cond_false299
464 %tmp315 = setlt int %tmp107, %tmp110 ; <bool> [#uses=1]
465 %tmp319 = cast int %tmp303 to ubyte ; <ubyte> [#uses=4]
466 %tmp324 = cast int %tmp305 to ubyte ; <ubyte> [#uses=3]
467 %tmp330 = setlt int %tmp107, %w ; <bool> [#uses=1]
468 %tmp344 = cast uint %mask.1.1 to ubyte ; <ubyte> [#uses=1]
469 %tmp344not = xor ubyte %tmp344, 255 ; <ubyte> [#uses=1]
470 %tmp347 = cast uint %iftmp.36.0 to ubyte ; <ubyte> [#uses=2]
471 %tmp346 = or ubyte %tmp347, %tmp344not ; <ubyte> [#uses=1]
472 %tmp354 = and uint %iftmp.37.0, %mask.1.1 ; <uint> [#uses=1]
473 %tmp361 = sub int %w, %tmp110 ; <int> [#uses=2]
474 %tmp39755 = setgt int %tmp361, 7 ; <bool> [#uses=1]
475 %tmp426 = cast uint %rmask.0.1 to ubyte ; <ubyte> [#uses=1]
476 %tmp426not = xor ubyte %tmp426, 255 ; <ubyte> [#uses=1]
477 %tmp428 = or ubyte %tmp347, %tmp426not ; <ubyte> [#uses=1]
478 %tmp436 = and uint %iftmp.37.0, %rmask.0.1 ; <uint> [#uses=1]
479 %tmp436 = cast uint %tmp436 to ubyte ; <ubyte> [#uses=1]
480 br label %cond_true457
482 cond_true457: ; preds = %cond_true457.preheader, %cond_next442
483 %indvar74 = phi uint [ 0, %cond_true457.preheader ], [ %indvar.next75, %cond_next442 ] ; <uint> [#uses=3]
484 %dest.3.0 = phi ubyte* [ %tmp448, %cond_next442 ], [ %tmp100, %cond_true457.preheader ] ; <ubyte*> [#uses=3]
485 %dest_line.3.0 = phi ubyte** [ %tmp444, %cond_next442 ], [ %tmp96, %cond_true457.preheader ] ; <ubyte**> [#uses=1]
486 %tmp.77 = sub uint 0, %indvar74 ; <uint> [#uses=1]
487 %tmp454.0 = add int %tmp.77, %tmp45438 ; <int> [#uses=1]
488 %tmp.79 = mul uint %indvar74, %raster.ui ; <uint> [#uses=1]
489 %tmp104.sum = add int %tmp102, %tmp.79 ; <int> [#uses=1]
490 %line.3.0 = getelementptr ubyte* %base, int %tmp104.sum ; <ubyte*> [#uses=3]
491 %tmp318 = load ubyte* %line.3.0 ; <ubyte> [#uses=2]
492 br bool %tmp315, label %cond_false321, label %cond_true316
494 return.loopexit: ; preds = %cond_next280
495 br label %return.loopexit.split
497 return.loopexit.split: ; preds = %return.loopexit, %return.loopexit.us
500 return.loopexit56: ; preds = %cond_next442
503 return: ; preds = %return.loopexit56, %return.loopexit.split, %cond_false299, %cond_true197, %cond_next78, %cond_next63, %bb58, %cond_next46
504 %retval.0 = phi int [ 0, %cond_next46 ], [ -1, %bb58 ], [ -1, %cond_next63 ], [ -1, %cond_next78 ], [ 0, %cond_true197 ], [ 0, %cond_false299 ], [ 0, %return.loopexit.split ], [ 0, %return.loopexit56 ] ; <int> [#uses=1]
508 declare int %mem_no_fault_proc(%struct.gx_device_memory*, int, int, int, int, int)
510 declare int %mem_mono_fill_rectangle(%struct.gx_device*, int, int, int, int, uint)
512 declare int %mem_copy_mono_recover(%struct.gx_device*, ubyte*, int, int, int, int, int, int, uint, uint, int)