just finish MCizing FnStubInfo which cleans it up and simplifies it.
[oota-llvm.git] / test / CodeGen / X86 / stack-color-with-reg.ll
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -relocation-model=pic -disable-fp-elim -color-ss-with-regs -stats -info-output-file - > %t
2 ; RUN:   grep stackcoloring %t | grep "stack slot refs replaced with reg refs"  | grep 9
3
4         type { [62 x %struct.Bitvec*] }         ; type %0
5         type { i8* }            ; type %1
6         type { double }         ; type %2
7         %struct..5sPragmaType = type { i8*, i32 }
8         %struct.AggInfo = type { i8, i8, i32, %struct.ExprList*, i32, %struct.AggInfo_col*, i32, i32, i32, %struct.AggInfo_func*, i32, i32 }
9         %struct.AggInfo_col = type { %struct.Table*, i32, i32, i32, i32, %struct.Expr* }
10         %struct.AggInfo_func = type { %struct.Expr*, %struct.FuncDef*, i32, i32 }
11         %struct.AuxData = type { i8*, void (i8*)* }
12         %struct.Bitvec = type { i32, i32, i32, %0 }
13         %struct.BtCursor = type { %struct.Btree*, %struct.BtShared*, %struct.BtCursor*, %struct.BtCursor*, i32 (i8*, i32, i8*, i32, i8*)*, i8*, i32, %struct.MemPage*, i32, %struct.CellInfo, i8, i8, i8*, i64, i32, i8, i32* }
14         %struct.BtLock = type { %struct.Btree*, i32, i8, %struct.BtLock* }
15         %struct.BtShared = type { %struct.Pager*, %struct.sqlite3*, %struct.BtCursor*, %struct.MemPage*, i8, i8, i8, i8, i8, i8, i8, i8, i32, i16, i16, i32, i32, i32, i32, i8, i32, i8*, void (i8*)*, %struct.sqlite3_mutex*, %struct.BusyHandler, i32, %struct.BtShared*, %struct.BtLock*, %struct.Btree* }
16         %struct.Btree = type { %struct.sqlite3*, %struct.BtShared*, i8, i8, i8, i32, %struct.Btree*, %struct.Btree* }
17         %struct.BtreeMutexArray = type { i32, [11 x %struct.Btree*] }
18         %struct.BusyHandler = type { i32 (i8*, i32)*, i8*, i32 }
19         %struct.CellInfo = type { i8*, i64, i32, i32, i16, i16, i16, i16 }
20         %struct.CollSeq = type { i8*, i8, i8, i8*, i32 (i8*, i32, i8*, i32, i8*)*, void (i8*)* }
21         %struct.Column = type { i8*, %struct.Expr*, i8*, i8*, i8, i8, i8, i8 }
22         %struct.Context = type { i64, i32, %struct.Fifo }
23         %struct.CountCtx = type { i64 }
24         %struct.Cursor = type { %struct.BtCursor*, i32, i64, i64, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i64, %struct.Btree*, i32, i8*, i64, i8*, %struct.KeyInfo*, i32, i64, %struct.sqlite3_vtab_cursor*, %struct.sqlite3_module*, i32, i32, i32*, i32*, i8* }
25         %struct.Db = type { i8*, %struct.Btree*, i8, i8, i8*, void (i8*)*, %struct.Schema* }
26         %struct.DbPage = type { %struct.Pager*, i32, %struct.DbPage*, %struct.DbPage*, %struct.PagerLruLink, %struct.DbPage*, i8, i8, i8, i8, i8, i16, %struct.DbPage*, %struct.DbPage*, i8* }
27         %struct.Expr = type { i8, i8, i16, %struct.CollSeq*, %struct.Expr*, %struct.Expr*, %struct.ExprList*, %struct..5sPragmaType, %struct..5sPragmaType, i32, i32, %struct.AggInfo*, i32, i32, %struct.Select*, %struct.Table*, i32 }
28         %struct.ExprList = type { i32, i32, i32, %struct.ExprList_item* }
29         %struct.ExprList_item = type { %struct.Expr*, i8*, i8, i8, i8 }
30         %struct.FKey = type { %struct.Table*, %struct.FKey*, i8*, %struct.FKey*, i32, %struct.sColMap*, i8, i8, i8, i8 }
31         %struct.Fifo = type { i32, %struct.FifoPage*, %struct.FifoPage* }
32         %struct.FifoPage = type { i32, i32, i32, %struct.FifoPage*, [1 x i64] }
33         %struct.FuncDef = type { i16, i8, i8, i8, i8*, %struct.FuncDef*, void (%struct.sqlite3_context*, i32, %struct.Mem**)*, void (%struct.sqlite3_context*, i32, %struct.Mem**)*, void (%struct.sqlite3_context*)*, [1 x i8] }
34         %struct.Hash = type { i8, i8, i32, i32, %struct.HashElem*, %struct._ht* }
35         %struct.HashElem = type { %struct.HashElem*, %struct.HashElem*, i8*, i8*, i32 }
36         %struct.IdList = type { %struct..5sPragmaType*, i32, i32 }
37         %struct.Index = type { i8*, i32, i32*, i32*, %struct.Table*, i32, i8, i8, i8*, %struct.Index*, %struct.Schema*, i8*, i8** }
38         %struct.KeyInfo = type { %struct.sqlite3*, i8, i8, i8, i32, i8*, [1 x %struct.CollSeq*] }
39         %struct.Mem = type { %struct.CountCtx, double, %struct.sqlite3*, i8*, i32, i16, i8, i8, void (i8*)* }
40         %struct.MemPage = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i16, i16, i16, i16, i16, [5 x %struct._OvflCell], %struct.BtShared*, i8*, %struct.DbPage*, i32, %struct.MemPage* }
41         %struct.Module = type { %struct.sqlite3_module*, i8*, i8*, void (i8*)* }
42         %struct.Op = type { i8, i8, i8, i8, i32, i32, i32, %1 }
43         %struct.Pager = type { %struct.sqlite3_vfs*, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.Bitvec*, %struct.Bitvec*, i8*, i8*, i8*, i8*, %struct.sqlite3_file*, %struct.sqlite3_file*, %struct.sqlite3_file*, %struct.BusyHandler*, %struct.PagerLruList, %struct.DbPage*, %struct.DbPage*, %struct.DbPage*, i64, i64, i64, i64, i64, i32, void (%struct.DbPage*, i32)*, void (%struct.DbPage*, i32)*, i32, %struct.DbPage**, i8*, [16 x i8] }
44         %struct.PagerLruLink = type { %struct.DbPage*, %struct.DbPage* }
45         %struct.PagerLruList = type { %struct.DbPage*, %struct.DbPage*, %struct.DbPage* }
46         %struct.Schema = type { i32, %struct.Hash, %struct.Hash, %struct.Hash, %struct.Hash, %struct.Table*, i8, i8, i16, i32, %struct.sqlite3* }
47         %struct.Select = type { %struct.ExprList*, i8, i8, i8, i8, i8, i8, i8, %struct.SrcList*, %struct.Expr*, %struct.ExprList*, %struct.Expr*, %struct.ExprList*, %struct.Select*, %struct.Select*, %struct.Select*, %struct.Expr*, %struct.Expr*, i32, i32, [3 x i32] }
48         %struct.SrcList = type { i16, i16, [1 x %struct.SrcList_item] }
49         %struct.SrcList_item = type { i8*, i8*, i8*, %struct.Table*, %struct.Select*, i8, i8, i32, %struct.Expr*, %struct.IdList*, i64 }
50         %struct.Table = type { i8*, i32, %struct.Column*, i32, %struct.Index*, i32, %struct.Select*, i32, %struct.Trigger*, %struct.FKey*, i8*, %struct.Expr*, i32, i8, i8, i8, i8, i8, i8, i8, %struct.Module*, %struct.sqlite3_vtab*, i32, i8**, %struct.Schema* }
51         %struct.Trigger = type { i8*, i8*, i8, i8, %struct.Expr*, %struct.IdList*, %struct..5sPragmaType, %struct.Schema*, %struct.Schema*, %struct.TriggerStep*, %struct.Trigger* }
52         %struct.TriggerStep = type { i32, i32, %struct.Trigger*, %struct.Select*, %struct..5sPragmaType, %struct.Expr*, %struct.ExprList*, %struct.IdList*, %struct.TriggerStep*, %struct.TriggerStep* }
53         %struct.Vdbe = type { %struct.sqlite3*, %struct.Vdbe*, %struct.Vdbe*, i32, i32, %struct.Op*, i32, i32, i32*, %struct.Mem**, %struct.Mem*, i32, %struct.Cursor**, i32, %struct.Mem*, i8**, i32, i32, i32, %struct.Mem*, i32, i32, %struct.Fifo, i32, i32, %struct.Context*, i32, i32, i32, i32, i32, [25 x i32], i32, i32, i8**, i8*, %struct.Mem*, i8, i8, i8, i8, i8, i8, i32, i64, i32, %struct.BtreeMutexArray, i32, i8*, i32 }
54         %struct.VdbeFunc = type { %struct.FuncDef*, i32, [1 x %struct.AuxData] }
55         %struct._OvflCell = type { i8*, i16 }
56         %struct._ht = type { i32, %struct.HashElem* }
57         %struct.sColMap = type { i32, i8* }
58         %struct.sqlite3 = type { %struct.sqlite3_vfs*, i32, %struct.Db*, i32, i32, i32, i32, i8, i8, i8, i8, i32, %struct.CollSeq*, i64, i64, i32, i32, i32, %struct.sqlite3_mutex*, %struct.sqlite3InitInfo, i32, i8**, %struct.Vdbe*, i32, void (i8*, i8*)*, i8*, void (i8*, i8*, i64)*, i8*, i8*, i32 (i8*)*, i8*, void (i8*)*, i8*, void (i8*, i32, i8*, i8*, i64)*, void (i8*, %struct.sqlite3*, i32, i8*)*, void (i8*, %struct.sqlite3*, i32, i8*)*, i8*, %struct.Mem*, i8*, i8*, %2, i32 (i8*, i32, i8*, i8*, i8*, i8*)*, i8*, i32 (i8*)*, i8*, i32, %struct.Hash, %struct.Table*, %struct.sqlite3_vtab**, i32, %struct.Hash, %struct.Hash, %struct.BusyHandler, i32, [2 x %struct.Db], i8 }
59         %struct.sqlite3InitInfo = type { i32, i32, i8 }
60         %struct.sqlite3_context = type { %struct.FuncDef*, %struct.VdbeFunc*, %struct.Mem, %struct.Mem*, i32, %struct.CollSeq* }
61         %struct.sqlite3_file = type { %struct.sqlite3_io_methods* }
62         %struct.sqlite3_index_constraint = type { i32, i8, i8, i32 }
63         %struct.sqlite3_index_constraint_usage = type { i32, i8 }
64         %struct.sqlite3_index_info = type { i32, %struct.sqlite3_index_constraint*, i32, %struct.sqlite3_index_constraint_usage*, %struct.sqlite3_index_constraint_usage*, i32, i8*, i32, i32, double }
65         %struct.sqlite3_io_methods = type { i32, i32 (%struct.sqlite3_file*)*, i32 (%struct.sqlite3_file*, i8*, i32, i64)*, i32 (%struct.sqlite3_file*, i8*, i32, i64)*, i32 (%struct.sqlite3_file*, i64)*, i32 (%struct.sqlite3_file*, i32)*, i32 (%struct.sqlite3_file*, i64*)*, i32 (%struct.sqlite3_file*, i32)*, i32 (%struct.sqlite3_file*, i32)*, i32 (%struct.sqlite3_file*)*, i32 (%struct.sqlite3_file*, i32, i8*)*, i32 (%struct.sqlite3_file*)*, i32 (%struct.sqlite3_file*)* }
66         %struct.sqlite3_module = type { i32, i32 (%struct.sqlite3*, i8*, i32, i8**, %struct.sqlite3_vtab**, i8**)*, i32 (%struct.sqlite3*, i8*, i32, i8**, %struct.sqlite3_vtab**, i8**)*, i32 (%struct.sqlite3_vtab*, %struct.sqlite3_index_info*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*, %struct.sqlite3_vtab_cursor**)*, i32 (%struct.sqlite3_vtab_cursor*)*, i32 (%struct.sqlite3_vtab_cursor*, i32, i8*, i32, %struct.Mem**)*, i32 (%struct.sqlite3_vtab_cursor*)*, i32 (%struct.sqlite3_vtab_cursor*)*, i32 (%struct.sqlite3_vtab_cursor*, %struct.sqlite3_context*, i32)*, i32 (%struct.sqlite3_vtab_cursor*, i64*)*, i32 (%struct.sqlite3_vtab*, i32, %struct.Mem**, i64*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*)*, i32 (%struct.sqlite3_vtab*, i32, i8*, void (%struct.sqlite3_context*, i32, %struct.Mem**)**, i8**)*, i32 (%struct.sqlite3_vtab*, i8*)* }
67         %struct.sqlite3_mutex = type opaque
68         %struct.sqlite3_vfs = type { i32, i32, i32, %struct.sqlite3_vfs*, i8*, i8*, i32 (%struct.sqlite3_vfs*, i8*, %struct.sqlite3_file*, i32, i32*)*, i32 (%struct.sqlite3_vfs*, i8*, i32)*, i32 (%struct.sqlite3_vfs*, i8*, i32)*, i32 (%struct.sqlite3_vfs*, i32, i8*)*, i32 (%struct.sqlite3_vfs*, i8*, i32, i8*)*, i8* (%struct.sqlite3_vfs*, i8*)*, void (%struct.sqlite3_vfs*, i32, i8*)*, i8* (%struct.sqlite3_vfs*, i8*, i8*)*, void (%struct.sqlite3_vfs*, i8*)*, i32 (%struct.sqlite3_vfs*, i32, i8*)*, i32 (%struct.sqlite3_vfs*, i32)*, i32 (%struct.sqlite3_vfs*, double*)* }
69         %struct.sqlite3_vtab = type { %struct.sqlite3_module*, i32, i8* }
70         %struct.sqlite3_vtab_cursor = type { %struct.sqlite3_vtab* }
71 @llvm.used = appending global [1 x i8*] [i8* bitcast (void (%struct.MemPage*, i32, i32)* @dropCell to i8*)], section "llvm.metadata"            ; <[1 x i8*]*> [#uses=0]
72
73 define fastcc void @dropCell(%struct.MemPage* nocapture %pPage, i32 %idx, i32 %sz) nounwind ssp {
74 entry:
75         %0 = getelementptr %struct.MemPage* %pPage, i64 0, i32 18               ; <i8**> [#uses=1]
76         %1 = load i8** %0, align 8              ; <i8*> [#uses=34]
77         %2 = getelementptr %struct.MemPage* %pPage, i64 0, i32 12               ; <i16*> [#uses=1]
78         %3 = load i16* %2, align 2              ; <i16> [#uses=1]
79         %4 = zext i16 %3 to i32         ; <i32> [#uses=2]
80         %5 = shl i32 %idx, 1            ; <i32> [#uses=2]
81         %6 = add i32 %4, %5             ; <i32> [#uses=1]
82         %7 = sext i32 %6 to i64         ; <i64> [#uses=2]
83         %8 = getelementptr i8* %1, i64 %7               ; <i8*> [#uses=1]
84         %9 = load i8* %8, align 1               ; <i8> [#uses=2]
85         %10 = zext i8 %9 to i32         ; <i32> [#uses=1]
86         %11 = shl i32 %10, 8            ; <i32> [#uses=1]
87         %.sum3 = add i64 %7, 1          ; <i64> [#uses=1]
88         %12 = getelementptr i8* %1, i64 %.sum3          ; <i8*> [#uses=1]
89         %13 = load i8* %12, align 1             ; <i8> [#uses=2]
90         %14 = zext i8 %13 to i32                ; <i32> [#uses=1]
91         %15 = or i32 %11, %14           ; <i32> [#uses=3]
92         %16 = icmp slt i32 %sz, 4               ; <i1> [#uses=1]
93         %size_addr.0.i = select i1 %16, i32 4, i32 %sz          ; <i32> [#uses=3]
94         %17 = getelementptr %struct.MemPage* %pPage, i64 0, i32 8               ; <i8*> [#uses=5]
95         %18 = load i8* %17, align 8             ; <i8> [#uses=1]
96         %19 = zext i8 %18 to i32                ; <i32> [#uses=4]
97         %20 = add i32 %19, 1            ; <i32> [#uses=2]
98         br label %bb3.i
99
100 bb3.i:          ; preds = %bb3.i, %entry
101         %addr.0.i = phi i32 [ %20, %entry ], [ %29, %bb3.i ]            ; <i32> [#uses=1]
102         %21 = sext i32 %addr.0.i to i64         ; <i64> [#uses=2]
103         %22 = getelementptr i8* %1, i64 %21             ; <i8*> [#uses=2]
104         %23 = load i8* %22, align 1             ; <i8> [#uses=2]
105         %24 = zext i8 %23 to i32                ; <i32> [#uses=1]
106         %25 = shl i32 %24, 8            ; <i32> [#uses=1]
107         %.sum34.i = add i64 %21, 1              ; <i64> [#uses=1]
108         %26 = getelementptr i8* %1, i64 %.sum34.i               ; <i8*> [#uses=2]
109         %27 = load i8* %26, align 1             ; <i8> [#uses=2]
110         %28 = zext i8 %27 to i32                ; <i32> [#uses=1]
111         %29 = or i32 %25, %28           ; <i32> [#uses=3]
112         %.not.i = icmp uge i32 %29, %15         ; <i1> [#uses=1]
113         %30 = icmp eq i32 %29, 0                ; <i1> [#uses=1]
114         %or.cond.i = or i1 %30, %.not.i         ; <i1> [#uses=1]
115         br i1 %or.cond.i, label %bb5.i, label %bb3.i
116
117 bb5.i:          ; preds = %bb3.i
118         store i8 %9, i8* %22, align 1
119         store i8 %13, i8* %26, align 1
120         %31 = zext i32 %15 to i64               ; <i64> [#uses=2]
121         %32 = getelementptr i8* %1, i64 %31             ; <i8*> [#uses=1]
122         store i8 %23, i8* %32, align 1
123         %.sum32.i = add i64 %31, 1              ; <i64> [#uses=1]
124         %33 = getelementptr i8* %1, i64 %.sum32.i               ; <i8*> [#uses=1]
125         store i8 %27, i8* %33, align 1
126         %34 = add i32 %15, 2            ; <i32> [#uses=1]
127         %35 = zext i32 %34 to i64               ; <i64> [#uses=2]
128         %36 = getelementptr i8* %1, i64 %35             ; <i8*> [#uses=1]
129         %37 = lshr i32 %size_addr.0.i, 8                ; <i32> [#uses=1]
130         %38 = trunc i32 %37 to i8               ; <i8> [#uses=1]
131         store i8 %38, i8* %36, align 1
132         %39 = trunc i32 %size_addr.0.i to i8            ; <i8> [#uses=1]
133         %.sum31.i = add i64 %35, 1              ; <i64> [#uses=1]
134         %40 = getelementptr i8* %1, i64 %.sum31.i               ; <i8*> [#uses=1]
135         store i8 %39, i8* %40, align 1
136         %41 = getelementptr %struct.MemPage* %pPage, i64 0, i32 14              ; <i16*> [#uses=4]
137         %42 = load i16* %41, align 2            ; <i16> [#uses=1]
138         %43 = trunc i32 %size_addr.0.i to i16           ; <i16> [#uses=1]
139         %44 = add i16 %42, %43          ; <i16> [#uses=1]
140         store i16 %44, i16* %41, align 2
141         %45 = load i8* %17, align 8             ; <i8> [#uses=1]
142         %46 = zext i8 %45 to i32                ; <i32> [#uses=1]
143         %47 = add i32 %46, 1            ; <i32> [#uses=1]
144         br label %bb11.outer.i
145
146 bb11.outer.i:           ; preds = %bb6.i, %bb5.i
147         %addr.1.ph.i = phi i32 [ %47, %bb5.i ], [ %111, %bb6.i ]                ; <i32> [#uses=1]
148         %48 = sext i32 %addr.1.ph.i to i64              ; <i64> [#uses=2]
149         %49 = getelementptr i8* %1, i64 %48             ; <i8*> [#uses=1]
150         %.sum30.i = add i64 %48, 1              ; <i64> [#uses=1]
151         %50 = getelementptr i8* %1, i64 %.sum30.i               ; <i8*> [#uses=1]
152         br label %bb11.i
153
154 bb6.i:          ; preds = %bb11.i
155         %51 = zext i32 %111 to i64              ; <i64> [#uses=2]
156         %52 = getelementptr i8* %1, i64 %51             ; <i8*> [#uses=2]
157         %53 = load i8* %52, align 1             ; <i8> [#uses=1]
158         %54 = zext i8 %53 to i32                ; <i32> [#uses=1]
159         %55 = shl i32 %54, 8            ; <i32> [#uses=1]
160         %.sum24.i = add i64 %51, 1              ; <i64> [#uses=1]
161         %56 = getelementptr i8* %1, i64 %.sum24.i               ; <i8*> [#uses=2]
162         %57 = load i8* %56, align 1             ; <i8> [#uses=3]
163         %58 = zext i8 %57 to i32                ; <i32> [#uses=1]
164         %59 = or i32 %55, %58           ; <i32> [#uses=5]
165         %60 = add i32 %111, 2           ; <i32> [#uses=1]
166         %61 = zext i32 %60 to i64               ; <i64> [#uses=2]
167         %62 = getelementptr i8* %1, i64 %61             ; <i8*> [#uses=2]
168         %63 = load i8* %62, align 1             ; <i8> [#uses=1]
169         %64 = zext i8 %63 to i32                ; <i32> [#uses=1]
170         %65 = shl i32 %64, 8            ; <i32> [#uses=1]
171         %.sum23.i = add i64 %61, 1              ; <i64> [#uses=1]
172         %66 = getelementptr i8* %1, i64 %.sum23.i               ; <i8*> [#uses=2]
173         %67 = load i8* %66, align 1             ; <i8> [#uses=2]
174         %68 = zext i8 %67 to i32                ; <i32> [#uses=1]
175         %69 = or i32 %65, %68           ; <i32> [#uses=1]
176         %70 = add i32 %111, 3           ; <i32> [#uses=1]
177         %71 = add i32 %70, %69          ; <i32> [#uses=1]
178         %72 = icmp sge i32 %71, %59             ; <i1> [#uses=1]
179         %73 = icmp ne i32 %59, 0                ; <i1> [#uses=1]
180         %74 = and i1 %72, %73           ; <i1> [#uses=1]
181         br i1 %74, label %bb9.i, label %bb11.outer.i
182
183 bb9.i:          ; preds = %bb6.i
184         %75 = load i8* %17, align 8             ; <i8> [#uses=1]
185         %76 = zext i8 %75 to i32                ; <i32> [#uses=1]
186         %77 = add i32 %76, 7            ; <i32> [#uses=1]
187         %78 = zext i32 %77 to i64               ; <i64> [#uses=1]
188         %79 = getelementptr i8* %1, i64 %78             ; <i8*> [#uses=2]
189         %80 = load i8* %79, align 1             ; <i8> [#uses=1]
190         %81 = sub i8 %109, %57          ; <i8> [#uses=1]
191         %82 = add i8 %81, %67           ; <i8> [#uses=1]
192         %83 = add i8 %82, %80           ; <i8> [#uses=1]
193         store i8 %83, i8* %79, align 1
194         %84 = zext i32 %59 to i64               ; <i64> [#uses=2]
195         %85 = getelementptr i8* %1, i64 %84             ; <i8*> [#uses=1]
196         %86 = load i8* %85, align 1             ; <i8> [#uses=1]
197         store i8 %86, i8* %52, align 1
198         %.sum22.i = add i64 %84, 1              ; <i64> [#uses=1]
199         %87 = getelementptr i8* %1, i64 %.sum22.i               ; <i8*> [#uses=1]
200         %88 = load i8* %87, align 1             ; <i8> [#uses=1]
201         store i8 %88, i8* %56, align 1
202         %89 = add i32 %59, 2            ; <i32> [#uses=1]
203         %90 = zext i32 %89 to i64               ; <i64> [#uses=2]
204         %91 = getelementptr i8* %1, i64 %90             ; <i8*> [#uses=1]
205         %92 = load i8* %91, align 1             ; <i8> [#uses=1]
206         %93 = zext i8 %92 to i32                ; <i32> [#uses=1]
207         %94 = shl i32 %93, 8            ; <i32> [#uses=1]
208         %.sum20.i = add i64 %90, 1              ; <i64> [#uses=1]
209         %95 = getelementptr i8* %1, i64 %.sum20.i               ; <i8*> [#uses=2]
210         %96 = load i8* %95, align 1             ; <i8> [#uses=1]
211         %97 = zext i8 %96 to i32                ; <i32> [#uses=1]
212         %98 = or i32 %94, %97           ; <i32> [#uses=1]
213         %99 = sub i32 %59, %111         ; <i32> [#uses=1]
214         %100 = add i32 %99, %98         ; <i32> [#uses=1]
215         %101 = lshr i32 %100, 8         ; <i32> [#uses=1]
216         %102 = trunc i32 %101 to i8             ; <i8> [#uses=1]
217         store i8 %102, i8* %62, align 1
218         %103 = load i8* %95, align 1            ; <i8> [#uses=1]
219         %104 = sub i8 %57, %109         ; <i8> [#uses=1]
220         %105 = add i8 %104, %103                ; <i8> [#uses=1]
221         store i8 %105, i8* %66, align 1
222         br label %bb11.i
223
224 bb11.i:         ; preds = %bb9.i, %bb11.outer.i
225         %106 = load i8* %49, align 1            ; <i8> [#uses=1]
226         %107 = zext i8 %106 to i32              ; <i32> [#uses=1]
227         %108 = shl i32 %107, 8          ; <i32> [#uses=1]
228         %109 = load i8* %50, align 1            ; <i8> [#uses=3]
229         %110 = zext i8 %109 to i32              ; <i32> [#uses=1]
230         %111 = or i32 %108, %110                ; <i32> [#uses=6]
231         %112 = icmp eq i32 %111, 0              ; <i1> [#uses=1]
232         br i1 %112, label %bb12.i, label %bb6.i
233
234 bb12.i:         ; preds = %bb11.i
235         %113 = zext i32 %20 to i64              ; <i64> [#uses=2]
236         %114 = getelementptr i8* %1, i64 %113           ; <i8*> [#uses=2]
237         %115 = load i8* %114, align 1           ; <i8> [#uses=2]
238         %116 = add i32 %19, 5           ; <i32> [#uses=1]
239         %117 = zext i32 %116 to i64             ; <i64> [#uses=2]
240         %118 = getelementptr i8* %1, i64 %117           ; <i8*> [#uses=3]
241         %119 = load i8* %118, align 1           ; <i8> [#uses=1]
242         %120 = icmp eq i8 %115, %119            ; <i1> [#uses=1]
243         br i1 %120, label %bb13.i, label %bb1.preheader
244
245 bb13.i:         ; preds = %bb12.i
246         %121 = add i32 %19, 2           ; <i32> [#uses=1]
247         %122 = zext i32 %121 to i64             ; <i64> [#uses=1]
248         %123 = getelementptr i8* %1, i64 %122           ; <i8*> [#uses=1]
249         %124 = load i8* %123, align 1           ; <i8> [#uses=1]
250         %125 = add i32 %19, 6           ; <i32> [#uses=1]
251         %126 = zext i32 %125 to i64             ; <i64> [#uses=1]
252         %127 = getelementptr i8* %1, i64 %126           ; <i8*> [#uses=1]
253         %128 = load i8* %127, align 1           ; <i8> [#uses=1]
254         %129 = icmp eq i8 %124, %128            ; <i1> [#uses=1]
255         br i1 %129, label %bb14.i, label %bb1.preheader
256
257 bb14.i:         ; preds = %bb13.i
258         %130 = zext i8 %115 to i32              ; <i32> [#uses=1]
259         %131 = shl i32 %130, 8          ; <i32> [#uses=1]
260         %.sum29.i = add i64 %113, 1             ; <i64> [#uses=1]
261         %132 = getelementptr i8* %1, i64 %.sum29.i              ; <i8*> [#uses=1]
262         %133 = load i8* %132, align 1           ; <i8> [#uses=1]
263         %134 = zext i8 %133 to i32              ; <i32> [#uses=1]
264         %135 = or i32 %134, %131                ; <i32> [#uses=2]
265         %136 = zext i32 %135 to i64             ; <i64> [#uses=1]
266         %137 = getelementptr i8* %1, i64 %136           ; <i8*> [#uses=1]
267         %138 = bitcast i8* %137 to i16*         ; <i16*> [#uses=1]
268         %139 = bitcast i8* %114 to i16*         ; <i16*> [#uses=1]
269         %tmp.i = load i16* %138, align 1                ; <i16> [#uses=1]
270         store i16 %tmp.i, i16* %139, align 1
271         %140 = load i8* %118, align 1           ; <i8> [#uses=1]
272         %141 = zext i8 %140 to i32              ; <i32> [#uses=1]
273         %142 = shl i32 %141, 8          ; <i32> [#uses=1]
274         %.sum28.i = add i64 %117, 1             ; <i64> [#uses=1]
275         %143 = getelementptr i8* %1, i64 %.sum28.i              ; <i8*> [#uses=2]
276         %144 = load i8* %143, align 1           ; <i8> [#uses=2]
277         %145 = zext i8 %144 to i32              ; <i32> [#uses=1]
278         %146 = or i32 %142, %145                ; <i32> [#uses=1]
279         %147 = add i32 %135, 2          ; <i32> [#uses=1]
280         %148 = zext i32 %147 to i64             ; <i64> [#uses=2]
281         %149 = getelementptr i8* %1, i64 %148           ; <i8*> [#uses=1]
282         %150 = load i8* %149, align 1           ; <i8> [#uses=1]
283         %151 = zext i8 %150 to i32              ; <i32> [#uses=1]
284         %152 = shl i32 %151, 8          ; <i32> [#uses=1]
285         %.sum27.i = add i64 %148, 1             ; <i64> [#uses=1]
286         %153 = getelementptr i8* %1, i64 %.sum27.i              ; <i8*> [#uses=2]
287         %154 = load i8* %153, align 1           ; <i8> [#uses=1]
288         %155 = zext i8 %154 to i32              ; <i32> [#uses=1]
289         %156 = or i32 %152, %155                ; <i32> [#uses=1]
290         %157 = add i32 %156, %146               ; <i32> [#uses=1]
291         %158 = lshr i32 %157, 8         ; <i32> [#uses=1]
292         %159 = trunc i32 %158 to i8             ; <i8> [#uses=1]
293         store i8 %159, i8* %118, align 1
294         %160 = load i8* %153, align 1           ; <i8> [#uses=1]
295         %161 = add i8 %160, %144                ; <i8> [#uses=1]
296         store i8 %161, i8* %143, align 1
297         br label %bb1.preheader
298
299 bb1.preheader:          ; preds = %bb14.i, %bb13.i, %bb12.i
300         %i.08 = add i32 %idx, 1         ; <i32> [#uses=2]
301         %162 = getelementptr %struct.MemPage* %pPage, i64 0, i32 15             ; <i16*> [#uses=4]
302         %163 = load i16* %162, align 4          ; <i16> [#uses=2]
303         %164 = zext i16 %163 to i32             ; <i32> [#uses=1]
304         %165 = icmp sgt i32 %164, %i.08         ; <i1> [#uses=1]
305         br i1 %165, label %bb, label %bb2
306
307 bb:             ; preds = %bb, %bb1.preheader
308         %indvar = phi i64 [ 0, %bb1.preheader ], [ %indvar.next, %bb ]          ; <i64> [#uses=3]
309         %tmp16 = add i32 %5, %4         ; <i32> [#uses=1]
310         %tmp.17 = sext i32 %tmp16 to i64                ; <i64> [#uses=1]
311         %tmp19 = shl i64 %indvar, 1             ; <i64> [#uses=1]
312         %ctg2.sum = add i64 %tmp.17, %tmp19             ; <i64> [#uses=4]
313         %ctg229 = getelementptr i8* %1, i64 %ctg2.sum           ; <i8*> [#uses=1]
314         %ctg229.sum31 = add i64 %ctg2.sum, 2            ; <i64> [#uses=1]
315         %166 = getelementptr i8* %1, i64 %ctg229.sum31          ; <i8*> [#uses=1]
316         %167 = load i8* %166, align 1           ; <i8> [#uses=1]
317         store i8 %167, i8* %ctg229
318         %ctg229.sum30 = add i64 %ctg2.sum, 3            ; <i64> [#uses=1]
319         %168 = getelementptr i8* %1, i64 %ctg229.sum30          ; <i8*> [#uses=1]
320         %169 = load i8* %168, align 1           ; <i8> [#uses=1]
321         %ctg229.sum = add i64 %ctg2.sum, 1              ; <i64> [#uses=1]
322         %170 = getelementptr i8* %1, i64 %ctg229.sum            ; <i8*> [#uses=1]
323         store i8 %169, i8* %170, align 1
324         %indvar15 = trunc i64 %indvar to i32            ; <i32> [#uses=1]
325         %i.09 = add i32 %indvar15, %i.08                ; <i32> [#uses=1]
326         %i.0 = add i32 %i.09, 1         ; <i32> [#uses=1]
327         %171 = load i16* %162, align 4          ; <i16> [#uses=2]
328         %172 = zext i16 %171 to i32             ; <i32> [#uses=1]
329         %173 = icmp sgt i32 %172, %i.0          ; <i1> [#uses=1]
330         %indvar.next = add i64 %indvar, 1               ; <i64> [#uses=1]
331         br i1 %173, label %bb, label %bb2
332
333 bb2:            ; preds = %bb, %bb1.preheader
334         %174 = phi i16 [ %163, %bb1.preheader ], [ %171, %bb ]          ; <i16> [#uses=1]
335         %175 = add i16 %174, -1         ; <i16> [#uses=2]
336         store i16 %175, i16* %162, align 4
337         %176 = load i8* %17, align 8            ; <i8> [#uses=1]
338         %177 = zext i8 %176 to i32              ; <i32> [#uses=1]
339         %178 = add i32 %177, 3          ; <i32> [#uses=1]
340         %179 = zext i32 %178 to i64             ; <i64> [#uses=1]
341         %180 = getelementptr i8* %1, i64 %179           ; <i8*> [#uses=1]
342         %181 = lshr i16 %175, 8         ; <i16> [#uses=1]
343         %182 = trunc i16 %181 to i8             ; <i8> [#uses=1]
344         store i8 %182, i8* %180, align 1
345         %183 = load i8* %17, align 8            ; <i8> [#uses=1]
346         %184 = zext i8 %183 to i32              ; <i32> [#uses=1]
347         %185 = add i32 %184, 3          ; <i32> [#uses=1]
348         %186 = zext i32 %185 to i64             ; <i64> [#uses=1]
349         %187 = load i16* %162, align 4          ; <i16> [#uses=1]
350         %188 = trunc i16 %187 to i8             ; <i8> [#uses=1]
351         %.sum = add i64 %186, 1         ; <i64> [#uses=1]
352         %189 = getelementptr i8* %1, i64 %.sum          ; <i8*> [#uses=1]
353         store i8 %188, i8* %189, align 1
354         %190 = load i16* %41, align 2           ; <i16> [#uses=1]
355         %191 = add i16 %190, 2          ; <i16> [#uses=1]
356         store i16 %191, i16* %41, align 2
357         %192 = getelementptr %struct.MemPage* %pPage, i64 0, i32 1              ; <i8*> [#uses=1]
358         store i8 1, i8* %192, align 1
359         ret void
360 }