Use the llvm-upgrade program to upgrade llvm assembly.
[oota-llvm.git] / test / Transforms / SimplifyCFG / 2006-10-29-InvokeCrash.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
2
3         %struct..4._102 = type { %struct.QVectorData* }
4         %struct..5._125 = type { %struct.QMapData* }
5         %struct.QAbstractTextDocumentLayout = type { %struct.QObject }
6         %struct.QBasicAtomic = type { int }
7         %struct.QFont = type { %struct.QFontPrivate*, uint }
8         %struct.QFontMetrics = type { %struct.QFontPrivate* }
9         %struct.QFontPrivate = type opaque
10         "struct.QFragmentMap<QTextBlockData>" = type { %struct.QFragmentMapData }
11         %struct.QFragmentMapData = type { "struct.QFragmentMapData::._154", int }
12         "struct.QFragmentMapData::._154" = type { "struct.QFragmentMapData::Header"* }
13         "struct.QFragmentMapData::Header" = type { uint, uint, uint, uint, uint, uint, uint, uint }
14         "struct.QHash<uint,QHashDummyValue>" = type { "struct.QHash<uint,QHashDummyValue>::._152" }
15         "struct.QHash<uint,QHashDummyValue>::._152" = type { %struct.QHashData* }
16         %struct.QHashData = type { "struct.QHashData::Node"*, "struct.QHashData::Node"**, %struct.QBasicAtomic, int, int, short, short, int, ubyte }
17         "struct.QHashData::Node" = type { "struct.QHashData::Node"*, uint }
18         "struct.QList<QObject*>::._92" = type { %struct.QListData }
19         "struct.QList<QPointer<QObject> >" = type { "struct.QList<QObject*>::._92" }
20         %struct.QListData = type { "struct.QListData::Data"* }
21         "struct.QListData::Data" = type { %struct.QBasicAtomic, int, int, int, ubyte, [1 x sbyte*] }
22         "struct.QMap<QUrl,QVariant>" = type { %struct..5._125 }
23         %struct.QMapData = type { "struct.QMapData::Node"*, [12 x "struct.QMapData::Node"*], %struct.QBasicAtomic, int, int, uint, ubyte }
24         "struct.QMapData::Node" = type { "struct.QMapData::Node"*, [1 x "struct.QMapData::Node"*] }
25         %struct.QObject = type { int (...)**, %struct.QObjectData* }
26         %struct.QObjectData = type { int (...)**, %struct.QObject*, %struct.QObject*, "struct.QList<QPointer<QObject> >", ubyte, [3 x ubyte], int, int }
27         %struct.QObjectPrivate = type { %struct.QObjectData, int, %struct.QObject*, "struct.QList<QPointer<QObject> >", "struct.QVector<QAbstractTextDocumentLayout::Selection>", %struct.QString }
28         %struct.QPaintDevice = type { int (...)**, ushort }
29         %struct.QPainter = type { %struct.QPainterPrivate* }
30         %struct.QPainterPrivate = type opaque
31         %struct.QPointF = type { double, double }
32         %struct.QPrinter = type { %struct.QPaintDevice, %struct.QPrinterPrivate* }
33         %struct.QPrinterPrivate = type opaque
34         %struct.QRectF = type { double, double, double, double }
35         "struct.QSet<uint>" = type { "struct.QHash<uint,QHashDummyValue>" }
36         "struct.QSharedDataPointer<QTextFormatPrivate>" = type { %struct.QTextFormatPrivate* }
37         %struct.QString = type { "struct.QString::Data"* }
38         "struct.QString::Data" = type { %struct.QBasicAtomic, int, int, ushort*, ubyte, ubyte, [1 x ushort] }
39         %struct.QTextBlockFormat = type { %struct.QTextFormat }
40         %struct.QTextBlockGroup = type { %struct.QAbstractTextDocumentLayout }
41         %struct.QTextDocumentConfig = type { %struct.QString }
42         %struct.QTextDocumentPrivate = type { %struct.QObjectPrivate, %struct.QString, "struct.QVector<QAbstractTextDocumentLayout::Selection>", bool, int, int, bool, int, int, int, int, bool, %struct.QTextFormatCollection, %struct.QTextBlockGroup*, %struct.QAbstractTextDocumentLayout*, "struct.QFragmentMap<QTextBlockData>", "struct.QFragmentMap<QTextBlockData>", int, "struct.QList<QPointer<QObject> >", "struct.QList<QPointer<QObject> >", "struct.QMap<QUrl,QVariant>", "struct.QMap<QUrl,QVariant>", "struct.QMap<QUrl,QVariant>", %struct.QTextDocumentConfig, bool, bool, %struct.QPointF }
43         %struct.QTextFormat = type { "struct.QSharedDataPointer<QTextFormatPrivate>", int }
44         %struct.QTextFormatCollection = type { "struct.QVector<QAbstractTextDocumentLayout::Selection>", "struct.QVector<QAbstractTextDocumentLayout::Selection>", "struct.QSet<uint>", %struct.QFont }
45         %struct.QTextFormatPrivate = type opaque
46         "struct.QVector<QAbstractTextDocumentLayout::Selection>" = type { %struct..4._102 }
47         %struct.QVectorData = type { %struct.QBasicAtomic, int, int, ubyte }
48
49 implementation   ; Functions:
50
51 void %_ZNK13QTextDocument5printEP8QPrinter(%struct.QAbstractTextDocumentLayout* %this, %struct.QPrinter* %printer) {
52 entry:
53         %tmp = alloca %struct.QPointF, align 16         ; <%struct.QPointF*> [#uses=2]
54         %tmp = alloca %struct.QRectF, align 16          ; <%struct.QRectF*> [#uses=5]
55         %tmp2 = alloca %struct.QPointF, align 16                ; <%struct.QPointF*> [#uses=3]
56         %tmp = alloca %struct.QFontMetrics, align 16            ; <%struct.QFontMetrics*> [#uses=4]
57         %tmp = alloca %struct.QFont, align 16           ; <%struct.QFont*> [#uses=4]
58         %tmp3 = alloca %struct.QPointF, align 16                ; <%struct.QPointF*> [#uses=2]
59         %p = alloca %struct.QPainter, align 16          ; <%struct.QPainter*> [#uses=14]
60         %body = alloca %struct.QRectF, align 16         ; <%struct.QRectF*> [#uses=9]
61         %pageNumberPos = alloca %struct.QPointF, align 16               ; <%struct.QPointF*> [#uses=4]
62         %scaledPageSize = alloca %struct.QPointF, align 16              ; <%struct.QPointF*> [#uses=6]
63         %printerPageSize = alloca %struct.QPointF, align 16             ; <%struct.QPointF*> [#uses=3]
64         %fmt = alloca %struct.QTextBlockFormat, align 16                ; <%struct.QTextBlockFormat*> [#uses=5]
65         %font = alloca %struct.QFont, align 16          ; <%struct.QFont*> [#uses=5]
66         %tmp = call %struct.QTextDocumentPrivate* %_ZNK13QTextDocument6d_funcEv( %struct.QAbstractTextDocumentLayout* %this )           ; <%struct.QTextDocumentPrivate*> [#uses=5]
67         %tmp = getelementptr %struct.QPrinter* %printer, int 0, uint 0          ; <%struct.QPaintDevice*> [#uses=1]
68         call void %_ZN8QPainterC1EP12QPaintDevice( %struct.QPainter* %p, %struct.QPaintDevice* %tmp )
69         %tmp = invoke bool %_ZNK8QPainter8isActiveEv( %struct.QPainter* %p )
70                         to label %invcont unwind label %cleanup329              ; <bool> [#uses=1]
71
72 invcont:                ; preds = %entry
73         br bool %tmp, label %cond_next, label %cleanup328
74
75 cond_next:              ; preds = %invcont
76         %tmp8 = invoke %struct.QAbstractTextDocumentLayout* %_ZNK13QTextDocument14documentLayoutEv( %struct.QAbstractTextDocumentLayout* %this )
77                         to label %invcont7 unwind label %cleanup329             ; <%struct.QAbstractTextDocumentLayout*> [#uses=0]
78
79 invcont7:               ; preds = %cond_next
80         %tmp10 = getelementptr %struct.QTextDocumentPrivate* %tmp, int 0, uint 26               ; <%struct.QPointF*> [#uses=1]
81         call void %_ZN7QPointFC1Edd( %struct.QPointF* %tmp, double 0.000000e+00, double 0.000000e+00 )
82         call void %_ZN6QRectFC1ERK7QPointFRK6QSizeF( %struct.QRectF* %body, %struct.QPointF* %tmp, %struct.QPointF* %tmp10 )
83         call void %_ZN7QPointFC1Ev( %struct.QPointF* %pageNumberPos )
84         %tmp12 = getelementptr %struct.QTextDocumentPrivate* %tmp, int 0, uint 26               ; <%struct.QPointF*> [#uses=1]
85         %tmp13 = call bool %_ZNK6QSizeF7isValidEv( %struct.QPointF* %tmp12 )            ; <bool> [#uses=1]
86         br bool %tmp13, label %cond_next15, label %bb
87
88 cond_next15:            ; preds = %invcont7
89         %tmp17 = getelementptr %struct.QTextDocumentPrivate* %tmp, int 0, uint 26               ; <%struct.QPointF*> [#uses=1]
90         %tmp = call double %_ZNK6QSizeF6heightEv( %struct.QPointF* %tmp17 )             ; <double> [#uses=1]
91         %tmp18 = seteq double %tmp, 0x41DFFFFFFFC00000          ; <bool> [#uses=1]
92         br bool %tmp18, label %bb, label %cond_next20
93
94 cond_next20:            ; preds = %cond_next15
95         br label %bb21
96
97 bb:             ; preds = %cond_next15, %invcont7
98         br label %bb21
99
100 bb21:           ; preds = %bb, %cond_next20
101         %iftmp.406.0 = phi bool [ false, %bb ], [ true, %cond_next20 ]          ; <bool> [#uses=1]
102         br bool %iftmp.406.0, label %cond_true24, label %cond_false
103
104 cond_true24:            ; preds = %bb21
105         %tmp = invoke int %_Z13qt_defaultDpiv( )
106                         to label %invcont25 unwind label %cleanup329            ; <int> [#uses=1]
107
108 invcont25:              ; preds = %cond_true24
109         %tmp26 = cast int %tmp to double                ; <double> [#uses=2]
110         %tmp30 = invoke %struct.QAbstractTextDocumentLayout* %_ZNK13QTextDocument14documentLayoutEv( %struct.QAbstractTextDocumentLayout* %this )
111                         to label %invcont29 unwind label %cleanup329            ; <%struct.QAbstractTextDocumentLayout*> [#uses=1]
112
113 invcont29:              ; preds = %invcont25
114         %tmp32 = invoke %struct.QPaintDevice* %_ZNK27QAbstractTextDocumentLayout11paintDeviceEv( %struct.QAbstractTextDocumentLayout* %tmp30 )
115                         to label %invcont31 unwind label %cleanup329            ; <%struct.QPaintDevice*> [#uses=3]
116
117 invcont31:              ; preds = %invcont29
118         %tmp34 = seteq %struct.QPaintDevice* %tmp32, null               ; <bool> [#uses=1]
119         br bool %tmp34, label %cond_next42, label %cond_true35
120
121 cond_true35:            ; preds = %invcont31
122         %tmp38 = invoke int %_ZNK12QPaintDevice11logicalDpiXEv( %struct.QPaintDevice* %tmp32 )
123                         to label %invcont37 unwind label %cleanup329            ; <int> [#uses=1]
124
125 invcont37:              ; preds = %cond_true35
126         %tmp38 = cast int %tmp38 to double              ; <double> [#uses=1]
127         %tmp41 = invoke int %_ZNK12QPaintDevice11logicalDpiYEv( %struct.QPaintDevice* %tmp32 )
128                         to label %invcont40 unwind label %cleanup329            ; <int> [#uses=1]
129
130 invcont40:              ; preds = %invcont37
131         %tmp41 = cast int %tmp41 to double              ; <double> [#uses=1]
132         br label %cond_next42
133
134 cond_next42:            ; preds = %invcont40, %invcont31
135         %sourceDpiY.2 = phi double [ %tmp41, %invcont40 ], [ %tmp26, %invcont31 ]               ; <double> [#uses=1]
136         %sourceDpiX.2 = phi double [ %tmp38, %invcont40 ], [ %tmp26, %invcont31 ]               ; <double> [#uses=1]
137         %tmp44 = getelementptr %struct.QPrinter* %printer, int 0, uint 0                ; <%struct.QPaintDevice*> [#uses=1]
138         %tmp46 = invoke int %_ZNK12QPaintDevice11logicalDpiXEv( %struct.QPaintDevice* %tmp44 )
139                         to label %invcont45 unwind label %cleanup329            ; <int> [#uses=1]
140
141 invcont45:              ; preds = %cond_next42
142         %tmp46 = cast int %tmp46 to double              ; <double> [#uses=1]
143         %tmp48 = fdiv double %tmp46, %sourceDpiX.2              ; <double> [#uses=2]
144         %tmp50 = getelementptr %struct.QPrinter* %printer, int 0, uint 0                ; <%struct.QPaintDevice*> [#uses=1]
145         %tmp52 = invoke int %_ZNK12QPaintDevice11logicalDpiYEv( %struct.QPaintDevice* %tmp50 )
146                         to label %invcont51 unwind label %cleanup329            ; <int> [#uses=1]
147
148 invcont51:              ; preds = %invcont45
149         %tmp52 = cast int %tmp52 to double              ; <double> [#uses=1]
150         %tmp54 = fdiv double %tmp52, %sourceDpiY.2              ; <double> [#uses=2]
151         invoke void %_ZN8QPainter5scaleEdd( %struct.QPainter* %p, double %tmp48, double %tmp54 )
152                         to label %invcont57 unwind label %cleanup329
153
154 invcont57:              ; preds = %invcont51
155         %tmp = getelementptr %struct.QPointF* %scaledPageSize, int 0, uint 0            ; <double*> [#uses=1]
156         %tmp60 = getelementptr %struct.QTextDocumentPrivate* %tmp, int 0, uint 26, uint 0               ; <double*> [#uses=1]
157         %tmp61 = load double* %tmp60            ; <double> [#uses=1]
158         store double %tmp61, double* %tmp
159         %tmp62 = getelementptr %struct.QPointF* %scaledPageSize, int 0, uint 1          ; <double*> [#uses=1]
160         %tmp63 = getelementptr %struct.QTextDocumentPrivate* %tmp, int 0, uint 26, uint 1               ; <double*> [#uses=1]
161         %tmp64 = load double* %tmp63            ; <double> [#uses=1]
162         store double %tmp64, double* %tmp62
163         %tmp65 = call double* %_ZN6QSizeF6rwidthEv( %struct.QPointF* %scaledPageSize )          ; <double*> [#uses=2]
164         %tmp67 = load double* %tmp65            ; <double> [#uses=1]
165         %tmp69 = mul double %tmp67, %tmp48              ; <double> [#uses=1]
166         store double %tmp69, double* %tmp65
167         %tmp71 = call double* %_ZN6QSizeF7rheightEv( %struct.QPointF* %scaledPageSize )         ; <double*> [#uses=2]
168         %tmp73 = load double* %tmp71            ; <double> [#uses=1]
169         %tmp75 = mul double %tmp73, %tmp54              ; <double> [#uses=1]
170         store double %tmp75, double* %tmp71
171         %tmp78 = getelementptr %struct.QPrinter* %printer, int 0, uint 0                ; <%struct.QPaintDevice*> [#uses=1]
172         %tmp80 = invoke int %_ZNK12QPaintDevice6heightEv( %struct.QPaintDevice* %tmp78 )
173                         to label %invcont79 unwind label %cleanup329            ; <int> [#uses=1]
174
175 invcont79:              ; preds = %invcont57
176         %tmp82 = getelementptr %struct.QPrinter* %printer, int 0, uint 0                ; <%struct.QPaintDevice*> [#uses=1]
177         %tmp84 = invoke int %_ZNK12QPaintDevice5widthEv( %struct.QPaintDevice* %tmp82 )
178                         to label %invcont83 unwind label %cleanup329            ; <int> [#uses=1]
179
180 invcont83:              ; preds = %invcont79
181         %tmp80 = cast int %tmp80 to double              ; <double> [#uses=1]
182         %tmp84 = cast int %tmp84 to double              ; <double> [#uses=1]
183         call void %_ZN6QSizeFC1Edd( %struct.QPointF* %printerPageSize, double %tmp84, double %tmp80 )
184         %tmp85 = call double %_ZNK6QSizeF6heightEv( %struct.QPointF* %printerPageSize )         ; <double> [#uses=1]
185         %tmp86 = call double %_ZNK6QSizeF6heightEv( %struct.QPointF* %scaledPageSize )          ; <double> [#uses=1]
186         %tmp87 = fdiv double %tmp85, %tmp86             ; <double> [#uses=1]
187         %tmp88 = call double %_ZNK6QSizeF5widthEv( %struct.QPointF* %printerPageSize )          ; <double> [#uses=1]
188         %tmp89 = call double %_ZNK6QSizeF5widthEv( %struct.QPointF* %scaledPageSize )           ; <double> [#uses=1]
189         %tmp90 = fdiv double %tmp88, %tmp89             ; <double> [#uses=1]
190         invoke void %_ZN8QPainter5scaleEdd( %struct.QPainter* %p, double %tmp90, double %tmp87 )
191                         to label %cond_next194 unwind label %cleanup329
192
193 cond_false:             ; preds = %bb21
194         %tmp = getelementptr %struct.QAbstractTextDocumentLayout* %this, int 0, uint 0          ; <%struct.QObject*> [#uses=1]
195         %tmp95 = invoke %struct.QAbstractTextDocumentLayout* %_ZNK13QTextDocument5cloneEP7QObject( %struct.QAbstractTextDocumentLayout* %this, %struct.QObject* %tmp )
196                         to label %invcont94 unwind label %cleanup329            ; <%struct.QAbstractTextDocumentLayout*> [#uses=9]
197
198 invcont94:              ; preds = %cond_false
199         %tmp99 = invoke %struct.QAbstractTextDocumentLayout* %_ZNK13QTextDocument14documentLayoutEv( %struct.QAbstractTextDocumentLayout* %tmp95 )
200                         to label %invcont98 unwind label %cleanup329            ; <%struct.QAbstractTextDocumentLayout*> [#uses=1]
201
202 invcont98:              ; preds = %invcont94
203         %tmp101 = invoke %struct.QPaintDevice* %_ZNK8QPainter6deviceEv( %struct.QPainter* %p )
204                         to label %invcont100 unwind label %cleanup329           ; <%struct.QPaintDevice*> [#uses=1]
205
206 invcont100:             ; preds = %invcont98
207         invoke void %_ZN27QAbstractTextDocumentLayout14setPaintDeviceEP12QPaintDevice( %struct.QAbstractTextDocumentLayout* %tmp99, %struct.QPaintDevice* %tmp101 )
208                         to label %invcont103 unwind label %cleanup329
209
210 invcont103:             ; preds = %invcont100
211         %tmp105 = invoke %struct.QPaintDevice* %_ZNK8QPainter6deviceEv( %struct.QPainter* %p )
212                         to label %invcont104 unwind label %cleanup329           ; <%struct.QPaintDevice*> [#uses=1]
213
214 invcont104:             ; preds = %invcont103
215         %tmp107 = invoke int %_ZNK12QPaintDevice11logicalDpiYEv( %struct.QPaintDevice* %tmp105 )
216                         to label %invcont106 unwind label %cleanup329           ; <int> [#uses=1]
217
218 invcont106:             ; preds = %invcont104
219         %tmp108 = cast int %tmp107 to double            ; <double> [#uses=1]
220         %tmp109 = mul double %tmp108, 0x3FE93264C993264C                ; <double> [#uses=1]
221         %tmp109 = cast double %tmp109 to int            ; <int> [#uses=3]
222         %tmp = call %struct.QTextBlockGroup* %_ZNK13QTextDocument9rootFrameEv( %struct.QAbstractTextDocumentLayout* %tmp95 )            ; <%struct.QTextBlockGroup*> [#uses=1]
223         invoke csretcc void %_ZNK10QTextFrame11frameFormatEv( %struct.QTextBlockFormat* %fmt, %struct.QTextBlockGroup* %tmp )
224                         to label %invcont111 unwind label %cleanup329
225
226 invcont111:             ; preds = %invcont106
227         %tmp112 = cast int %tmp109 to double            ; <double> [#uses=1]
228         invoke void %_ZN16QTextFrameFormat9setMarginEd( %struct.QTextBlockFormat* %fmt, double %tmp112 )
229                         to label %invcont114 unwind label %cleanup192
230
231 invcont114:             ; preds = %invcont111
232         %tmp116 = call %struct.QTextBlockGroup* %_ZNK13QTextDocument9rootFrameEv( %struct.QAbstractTextDocumentLayout* %tmp95 )         ; <%struct.QTextBlockGroup*> [#uses=1]
233         invoke void %_ZN10QTextFrame14setFrameFormatERK16QTextFrameFormat( %struct.QTextBlockGroup* %tmp116, %struct.QTextBlockFormat* %fmt )
234                         to label %invcont117 unwind label %cleanup192
235
236 invcont117:             ; preds = %invcont114
237         %tmp119 = invoke %struct.QPaintDevice* %_ZNK8QPainter6deviceEv( %struct.QPainter* %p )
238                         to label %invcont118 unwind label %cleanup192           ; <%struct.QPaintDevice*> [#uses=1]
239
240 invcont118:             ; preds = %invcont117
241         %tmp121 = invoke int %_ZNK12QPaintDevice6heightEv( %struct.QPaintDevice* %tmp119 )
242                         to label %invcont120 unwind label %cleanup192           ; <int> [#uses=1]
243
244 invcont120:             ; preds = %invcont118
245         %tmp121 = cast int %tmp121 to double            ; <double> [#uses=1]
246         %tmp123 = invoke %struct.QPaintDevice* %_ZNK8QPainter6deviceEv( %struct.QPainter* %p )
247                         to label %invcont122 unwind label %cleanup192           ; <%struct.QPaintDevice*> [#uses=1]
248
249 invcont122:             ; preds = %invcont120
250         %tmp125 = invoke int %_ZNK12QPaintDevice5widthEv( %struct.QPaintDevice* %tmp123 )
251                         to label %invcont124 unwind label %cleanup192           ; <int> [#uses=1]
252
253 invcont124:             ; preds = %invcont122
254         %tmp125 = cast int %tmp125 to double            ; <double> [#uses=1]
255         call void %_ZN6QRectFC1Edddd( %struct.QRectF* %tmp, double 0.000000e+00, double 0.000000e+00, double %tmp125, double %tmp121 )
256         %tmp126 = getelementptr %struct.QRectF* %body, int 0, uint 0            ; <double*> [#uses=1]
257         %tmp127 = getelementptr %struct.QRectF* %tmp, int 0, uint 0             ; <double*> [#uses=1]
258         %tmp128 = load double* %tmp127          ; <double> [#uses=1]
259         store double %tmp128, double* %tmp126
260         %tmp129 = getelementptr %struct.QRectF* %body, int 0, uint 1            ; <double*> [#uses=1]
261         %tmp130 = getelementptr %struct.QRectF* %tmp, int 0, uint 1             ; <double*> [#uses=1]
262         %tmp131 = load double* %tmp130          ; <double> [#uses=1]
263         store double %tmp131, double* %tmp129
264         %tmp132 = getelementptr %struct.QRectF* %body, int 0, uint 2            ; <double*> [#uses=1]
265         %tmp133 = getelementptr %struct.QRectF* %tmp, int 0, uint 2             ; <double*> [#uses=1]
266         %tmp134 = load double* %tmp133          ; <double> [#uses=1]
267         store double %tmp134, double* %tmp132
268         %tmp135 = getelementptr %struct.QRectF* %body, int 0, uint 3            ; <double*> [#uses=1]
269         %tmp136 = getelementptr %struct.QRectF* %tmp, int 0, uint 3             ; <double*> [#uses=1]
270         %tmp137 = load double* %tmp136          ; <double> [#uses=1]
271         store double %tmp137, double* %tmp135
272         %tmp138 = call double %_ZNK6QRectF6heightEv( %struct.QRectF* %body )            ; <double> [#uses=1]
273         %tmp139 = cast int %tmp109 to double            ; <double> [#uses=1]
274         %tmp140 = sub double %tmp138, %tmp139           ; <double> [#uses=1]
275         %tmp142 = invoke %struct.QPaintDevice* %_ZNK8QPainter6deviceEv( %struct.QPainter* %p )
276                         to label %invcont141 unwind label %cleanup192           ; <%struct.QPaintDevice*> [#uses=1]
277
278 invcont141:             ; preds = %invcont124
279         invoke csretcc void %_ZNK13QTextDocument11defaultFontEv( %struct.QFont* %tmp, %struct.QAbstractTextDocumentLayout* %tmp95 )
280                         to label %invcont144 unwind label %cleanup192
281
282 invcont144:             ; preds = %invcont141
283         invoke void %_ZN12QFontMetricsC1ERK5QFontP12QPaintDevice( %struct.QFontMetrics* %tmp, %struct.QFont* %tmp, %struct.QPaintDevice* %tmp142 )
284                         to label %invcont146 unwind label %cleanup173
285
286 invcont146:             ; preds = %invcont144
287         %tmp149 = invoke int %_ZNK12QFontMetrics6ascentEv( %struct.QFontMetrics* %tmp )
288                         to label %invcont148 unwind label %cleanup168           ; <int> [#uses=1]
289
290 invcont148:             ; preds = %invcont146
291         %tmp149 = cast int %tmp149 to double            ; <double> [#uses=1]
292         %tmp150 = add double %tmp140, %tmp149           ; <double> [#uses=1]
293         %tmp152 = invoke %struct.QPaintDevice* %_ZNK8QPainter6deviceEv( %struct.QPainter* %p )
294                         to label %invcont151 unwind label %cleanup168           ; <%struct.QPaintDevice*> [#uses=1]
295
296 invcont151:             ; preds = %invcont148
297         %tmp154 = invoke int %_ZNK12QPaintDevice11logicalDpiYEv( %struct.QPaintDevice* %tmp152 )
298                         to label %invcont153 unwind label %cleanup168           ; <int> [#uses=1]
299
300 invcont153:             ; preds = %invcont151
301         %tmp155 = mul int %tmp154, 5            ; <int> [#uses=1]
302         %tmp156 = sdiv int %tmp155, 72          ; <int> [#uses=1]
303         %tmp156 = cast int %tmp156 to double            ; <double> [#uses=1]
304         %tmp157 = add double %tmp150, %tmp156           ; <double> [#uses=1]
305         %tmp158 = call double %_ZNK6QRectF5widthEv( %struct.QRectF* %body )             ; <double> [#uses=1]
306         %tmp159 = cast int %tmp109 to double            ; <double> [#uses=1]
307         %tmp160 = sub double %tmp158, %tmp159           ; <double> [#uses=1]
308         call void %_ZN7QPointFC1Edd( %struct.QPointF* %tmp2, double %tmp160, double %tmp157 )
309         %tmp161 = getelementptr %struct.QPointF* %pageNumberPos, int 0, uint 0          ; <double*> [#uses=1]
310         %tmp162 = getelementptr %struct.QPointF* %tmp2, int 0, uint 0           ; <double*> [#uses=1]
311         %tmp163 = load double* %tmp162          ; <double> [#uses=1]
312         store double %tmp163, double* %tmp161
313         %tmp164 = getelementptr %struct.QPointF* %pageNumberPos, int 0, uint 1          ; <double*> [#uses=1]
314         %tmp165 = getelementptr %struct.QPointF* %tmp2, int 0, uint 1           ; <double*> [#uses=1]
315         %tmp166 = load double* %tmp165          ; <double> [#uses=1]
316         store double %tmp166, double* %tmp164
317         invoke void %_ZN12QFontMetricsD1Ev( %struct.QFontMetrics* %tmp )
318                         to label %cleanup171 unwind label %cleanup173
319
320 cleanup168:             ; preds = %invcont151, %invcont148, %invcont146
321         invoke void %_ZN12QFontMetricsD1Ev( %struct.QFontMetrics* %tmp )
322                         to label %cleanup173 unwind label %cleanup173
323
324 cleanup171:             ; preds = %invcont153
325         invoke void %_ZN5QFontD1Ev( %struct.QFont* %tmp )
326                         to label %finally170 unwind label %cleanup192
327
328 cleanup173:             ; preds = %cleanup168, %cleanup168, %invcont153, %invcont144
329         invoke void %_ZN5QFontD1Ev( %struct.QFont* %tmp )
330                         to label %cleanup192 unwind label %cleanup192
331
332 finally170:             ; preds = %cleanup171
333         invoke csretcc void %_ZNK13QTextDocument11defaultFontEv( %struct.QFont* %font, %struct.QAbstractTextDocumentLayout* %tmp95 )
334                         to label %invcont177 unwind label %cleanup192
335
336 invcont177:             ; preds = %finally170
337         invoke void %_ZN5QFont12setPointSizeEi( %struct.QFont* %font, int 10 )
338                         to label %invcont179 unwind label %cleanup187
339
340 invcont179:             ; preds = %invcont177
341         invoke void %_ZN13QTextDocument14setDefaultFontERK5QFont( %struct.QAbstractTextDocumentLayout* %tmp95, %struct.QFont* %font )
342                         to label %invcont181 unwind label %cleanup187
343
344 invcont181:             ; preds = %invcont179
345         call csretcc void %_ZNK6QRectF4sizeEv( %struct.QPointF* %tmp3, %struct.QRectF* %body )
346         invoke void %_ZN13QTextDocument11setPageSizeERK6QSizeF( %struct.QAbstractTextDocumentLayout* %tmp95, %struct.QPointF* %tmp3 )
347                         to label %cleanup185 unwind label %cleanup187
348
349 cleanup185:             ; preds = %invcont181
350         invoke void %_ZN5QFontD1Ev( %struct.QFont* %font )
351                         to label %cleanup190 unwind label %cleanup192
352
353 cleanup187:             ; preds = %invcont181, %invcont179, %invcont177
354         invoke void %_ZN5QFontD1Ev( %struct.QFont* %font )
355                         to label %cleanup192 unwind label %cleanup192
356
357 cleanup190:             ; preds = %cleanup185
358         invoke void %_ZN16QTextFrameFormatD1Ev( %struct.QTextBlockFormat* %fmt )
359                         to label %cond_next194 unwind label %cleanup329
360
361 cleanup192:             ; preds = %cleanup187, %cleanup187, %cleanup185, %finally170, %cleanup173, %cleanup173, %cleanup171, %invcont141, %invcont124, %invcont122, %invcont120, %invcont118, %invcont117, %invcont114, %invcont111
362         invoke void %_ZN16QTextFrameFormatD1Ev( %struct.QTextBlockFormat* %fmt )
363                         to label %cleanup329 unwind label %cleanup329
364
365 cond_next194:           ; preds = %cleanup190, %invcont83
366         %clonedDoc.1 = phi %struct.QAbstractTextDocumentLayout* [ null, %invcont83 ], [ %tmp95, %cleanup190 ]           ; <%struct.QAbstractTextDocumentLayout*> [#uses=3]
367         %doc.1 = phi %struct.QAbstractTextDocumentLayout* [ %this, %invcont83 ], [ %tmp95, %cleanup190 ]                ; <%struct.QAbstractTextDocumentLayout*> [#uses=2]
368         %tmp197 = invoke bool %_ZNK8QPrinter13collateCopiesEv( %struct.QPrinter* %printer )
369                         to label %invcont196 unwind label %cleanup329           ; <bool> [#uses=1]
370
371 invcont196:             ; preds = %cond_next194
372         br bool %tmp197, label %cond_true200, label %cond_false204
373
374 cond_true200:           ; preds = %invcont196
375         %tmp203 = invoke int %_ZNK8QPrinter9numCopiesEv( %struct.QPrinter* %printer )
376                         to label %invcont202 unwind label %cleanup329           ; <int> [#uses=1]
377
378 invcont202:             ; preds = %cond_true200
379         br label %cond_next208
380
381 cond_false204:          ; preds = %invcont196
382         %tmp207 = invoke int %_ZNK8QPrinter9numCopiesEv( %struct.QPrinter* %printer )
383                         to label %invcont206 unwind label %cleanup329           ; <int> [#uses=1]
384
385 invcont206:             ; preds = %cond_false204
386         br label %cond_next208
387
388 cond_next208:           ; preds = %invcont206, %invcont202
389         %pageCopies.0 = phi int [ %tmp203, %invcont202 ], [ 1, %invcont206 ]            ; <int> [#uses=2]
390         %docCopies.0 = phi int [ 1, %invcont202 ], [ %tmp207, %invcont206 ]             ; <int> [#uses=2]
391         %tmp211 = invoke int %_ZNK8QPrinter8fromPageEv( %struct.QPrinter* %printer )
392                         to label %invcont210 unwind label %cleanup329           ; <int> [#uses=3]
393
394 invcont210:             ; preds = %cond_next208
395         %tmp214 = invoke int %_ZNK8QPrinter6toPageEv( %struct.QPrinter* %printer )
396                         to label %invcont213 unwind label %cleanup329           ; <int> [#uses=3]
397
398 invcont213:             ; preds = %invcont210
399         %tmp216 = seteq int %tmp211, 0          ; <bool> [#uses=1]
400         br bool %tmp216, label %cond_true217, label %cond_next225
401
402 cond_true217:           ; preds = %invcont213
403         %tmp219 = seteq int %tmp214, 0          ; <bool> [#uses=1]
404         br bool %tmp219, label %cond_true220, label %cond_next225
405
406 cond_true220:           ; preds = %cond_true217
407         %tmp223 = invoke int %_ZNK13QTextDocument9pageCountEv( %struct.QAbstractTextDocumentLayout* %doc.1 )
408                         to label %invcont222 unwind label %cleanup329           ; <int> [#uses=1]
409
410 invcont222:             ; preds = %cond_true220
411         br label %cond_next225
412
413 cond_next225:           ; preds = %invcont222, %cond_true217, %invcont213
414         %toPage.1 = phi int [ %tmp223, %invcont222 ], [ %tmp214, %cond_true217 ], [ %tmp214, %invcont213 ]              ; <int> [#uses=2]
415         %fromPage.1 = phi int [ 1, %invcont222 ], [ %tmp211, %cond_true217 ], [ %tmp211, %invcont213 ]          ; <int> [#uses=2]
416         %tmp = invoke uint %_ZNK8QPrinter9pageOrderEv( %struct.QPrinter* %printer )
417                         to label %invcont227 unwind label %cleanup329           ; <uint> [#uses=1]
418
419 invcont227:             ; preds = %cond_next225
420         %tmp228 = seteq uint %tmp, 1            ; <bool> [#uses=1]
421         br bool %tmp228, label %cond_true230, label %cond_next234
422
423 cond_true230:           ; preds = %invcont227
424         br label %cond_next234
425
426 cond_next234:           ; preds = %cond_true230, %invcont227
427         %ascending.1 = phi bool [ false, %cond_true230 ], [ true, %invcont227 ]         ; <bool> [#uses=1]
428         %toPage.2 = phi int [ %fromPage.1, %cond_true230 ], [ %toPage.1, %invcont227 ]          ; <int> [#uses=1]
429         %fromPage.2 = phi int [ %toPage.1, %cond_true230 ], [ %fromPage.1, %invcont227 ]                ; <int> [#uses=1]
430         br label %bb309
431
432 bb237:          ; preds = %cond_true313, %cond_next293
433         %iftmp.410.4 = phi bool [ %iftmp.410.5, %cond_true313 ], [ %iftmp.410.1, %cond_next293 ]                ; <bool> [#uses=1]
434         %page.4 = phi int [ %fromPage.2, %cond_true313 ], [ %page.3, %cond_next293 ]            ; <int> [#uses=4]
435         br label %bb273
436
437 invcont240:             ; preds = %cond_true277
438         %tmp242 = seteq uint %tmp241, 2         ; <bool> [#uses=1]
439         br bool %tmp242, label %bb252, label %cond_next244
440
441 cond_next244:           ; preds = %invcont240
442         %tmp247 = invoke uint %_ZNK8QPrinter12printerStateEv( %struct.QPrinter* %printer )
443                         to label %invcont246 unwind label %cleanup329           ; <uint> [#uses=1]
444
445 invcont246:             ; preds = %cond_next244
446         %tmp248 = seteq uint %tmp247, 3         ; <bool> [#uses=1]
447         br bool %tmp248, label %bb252, label %bb253
448
449 bb252:          ; preds = %invcont246, %invcont240
450         br label %bb254
451
452 bb253:          ; preds = %invcont246
453         br label %bb254
454
455 bb254:          ; preds = %bb253, %bb252
456         %iftmp.410.0 = phi bool [ true, %bb252 ], [ false, %bb253 ]             ; <bool> [#uses=2]
457         br bool %iftmp.410.0, label %UserCanceled, label %cond_next258
458
459 cond_next258:           ; preds = %bb254
460         invoke fastcc void %_Z9printPageiP8QPainterPK13QTextDocumentRK6QRectFRK7QPointF( int %page.4, %struct.QPainter* %p, %struct.QAbstractTextDocumentLayout* %doc.1, %struct.QRectF* %body, %struct.QPointF* %pageNumberPos )
461                         to label %invcont261 unwind label %cleanup329
462
463 invcont261:             ; preds = %cond_next258
464         %tmp263 = add int %pageCopies.0, -1             ; <int> [#uses=1]
465         %tmp265 = setgt int %tmp263, %j.4               ; <bool> [#uses=1]
466         br bool %tmp265, label %cond_true266, label %cond_next270
467
468 cond_true266:           ; preds = %invcont261
469         %tmp269 = invoke bool %_ZN8QPrinter7newPageEv( %struct.QPrinter* %printer )
470                         to label %cond_next270 unwind label %cleanup329         ; <bool> [#uses=0]
471
472 cond_next270:           ; preds = %cond_true266, %invcont261
473         %tmp272 = add int %j.4, 1               ; <int> [#uses=1]
474         br label %bb273
475
476 bb273:          ; preds = %cond_next270, %bb237
477         %iftmp.410.1 = phi bool [ %iftmp.410.4, %bb237 ], [ %iftmp.410.0, %cond_next270 ]               ; <bool> [#uses=2]
478         %j.4 = phi int [ 0, %bb237 ], [ %tmp272, %cond_next270 ]                ; <int> [#uses=3]
479         %tmp276 = setlt int %j.4, %pageCopies.0         ; <bool> [#uses=1]
480         br bool %tmp276, label %cond_true277, label %bb280
481
482 cond_true277:           ; preds = %bb273
483         %tmp241 = invoke uint %_ZNK8QPrinter12printerStateEv( %struct.QPrinter* %printer )
484                         to label %invcont240 unwind label %cleanup329           ; <uint> [#uses=1]
485
486 bb280:          ; preds = %bb273
487         %tmp283 = seteq int %page.4, %toPage.2          ; <bool> [#uses=1]
488         br bool %tmp283, label %bb297, label %cond_next285
489
490 cond_next285:           ; preds = %bb280
491         br bool %ascending.1, label %cond_true287, label %cond_false290
492
493 cond_true287:           ; preds = %cond_next285
494         %tmp289 = add int %page.4, 1            ; <int> [#uses=1]
495         br label %cond_next293
496
497 cond_false290:          ; preds = %cond_next285
498         %tmp292 = add int %page.4, -1           ; <int> [#uses=1]
499         br label %cond_next293
500
501 cond_next293:           ; preds = %cond_false290, %cond_true287
502         %page.3 = phi int [ %tmp289, %cond_true287 ], [ %tmp292, %cond_false290 ]               ; <int> [#uses=1]
503         %tmp296 = invoke bool %_ZN8QPrinter7newPageEv( %struct.QPrinter* %printer )
504                         to label %bb237 unwind label %cleanup329                ; <bool> [#uses=0]
505
506 bb297:          ; preds = %bb280
507         %tmp299 = add int %docCopies.0, -1              ; <int> [#uses=1]
508         %tmp301 = setgt int %tmp299, %i.1               ; <bool> [#uses=1]
509         br bool %tmp301, label %cond_true302, label %cond_next306
510
511 cond_true302:           ; preds = %bb297
512         %tmp305 = invoke bool %_ZN8QPrinter7newPageEv( %struct.QPrinter* %printer )
513                         to label %cond_next306 unwind label %cleanup329         ; <bool> [#uses=0]
514
515 cond_next306:           ; preds = %cond_true302, %bb297
516         %tmp308 = add int %i.1, 1               ; <int> [#uses=1]
517         br label %bb309
518
519 bb309:          ; preds = %cond_next306, %cond_next234
520         %iftmp.410.5 = phi bool [ undef, %cond_next234 ], [ %iftmp.410.1, %cond_next306 ]               ; <bool> [#uses=1]
521         %i.1 = phi int [ 0, %cond_next234 ], [ %tmp308, %cond_next306 ]         ; <int> [#uses=3]
522         %tmp312 = setlt int %i.1, %docCopies.0          ; <bool> [#uses=1]
523         br bool %tmp312, label %cond_true313, label %UserCanceled
524
525 cond_true313:           ; preds = %bb309
526         br label %bb237
527
528 UserCanceled:           ; preds = %bb309, %bb254
529         %tmp318 = seteq %struct.QAbstractTextDocumentLayout* %clonedDoc.1, null         ; <bool> [#uses=1]
530         br bool %tmp318, label %cleanup327, label %cond_true319
531
532 cond_true319:           ; preds = %UserCanceled
533         %tmp = getelementptr %struct.QAbstractTextDocumentLayout* %clonedDoc.1, int 0, uint 0, uint 0           ; <int (...)***> [#uses=1]
534         %tmp = load int (...)*** %tmp           ; <int (...)**> [#uses=1]
535         %tmp322 = getelementptr int (...)** %tmp, int 4         ; <int (...)**> [#uses=1]
536         %tmp = load int (...)** %tmp322         ; <int (...)*> [#uses=1]
537         %tmp = cast int (...)* %tmp to void (%struct.QAbstractTextDocumentLayout*)*             ; <void (%struct.QAbstractTextDocumentLayout*)*> [#uses=1]
538         invoke void %tmp( %struct.QAbstractTextDocumentLayout* %clonedDoc.1 )
539                         to label %cleanup327 unwind label %cleanup329
540
541 cleanup327:             ; preds = %cond_true319, %UserCanceled
542         call void %_ZN8QPainterD1Ev( %struct.QPainter* %p )
543         ret void
544
545 cleanup328:             ; preds = %invcont
546         call void %_ZN8QPainterD1Ev( %struct.QPainter* %p )
547         ret void
548
549 cleanup329:             ; preds = %cond_true319, %cond_true302, %cond_next293, %cond_true277, %cond_true266, %cond_next258, %cond_next244, %cond_next225, %cond_true220, %invcont210, %cond_next208, %cond_false204, %cond_true200, %cond_next194, %cleanup192, %cleanup192, %cleanup190, %invcont106, %invcont104, %invcont103, %invcont100, %invcont98, %invcont94, %cond_false, %invcont83, %invcont79, %invcont57, %invcont51, %invcont45, %cond_next42, %invcont37, %cond_true35, %invcont29, %invcont25, %cond_true24, %cond_next, %entry
550         call void %_ZN8QPainterD1Ev( %struct.QPainter* %p )
551         unwind
552 }
553
554 declare void %_ZN6QSizeFC1Edd(%struct.QPointF*, double, double)
555
556 declare bool %_ZNK6QSizeF7isValidEv(%struct.QPointF*)
557
558 declare double %_ZNK6QSizeF5widthEv(%struct.QPointF*)
559
560 declare double %_ZNK6QSizeF6heightEv(%struct.QPointF*)
561
562 declare double* %_ZN6QSizeF6rwidthEv(%struct.QPointF*)
563
564 declare double* %_ZN6QSizeF7rheightEv(%struct.QPointF*)
565
566 declare %struct.QTextDocumentPrivate* %_ZNK13QTextDocument6d_funcEv(%struct.QAbstractTextDocumentLayout*)
567
568 declare void %_ZN7QPointFC1Ev(%struct.QPointF*)
569
570 declare void %_ZN7QPointFC1Edd(%struct.QPointF*, double, double)
571
572 declare void %_ZN16QTextFrameFormat9setMarginEd(%struct.QTextBlockFormat*, double)
573
574 declare void %_ZN6QRectFC1Edddd(%struct.QRectF*, double, double, double, double)
575
576 declare void %_ZN6QRectFC1ERK7QPointFRK6QSizeF(%struct.QRectF*, %struct.QPointF*, %struct.QPointF*)
577
578 declare double %_ZNK6QRectF5widthEv(%struct.QRectF*)
579
580 declare double %_ZNK6QRectF6heightEv(%struct.QRectF*)
581
582 declare void %_ZNK6QRectF4sizeEv(%struct.QPointF*, %struct.QRectF*)
583
584 declare void %_ZN16QTextFrameFormatD1Ev(%struct.QTextBlockFormat*)
585
586 declare void %_ZNK10QTextFrame11frameFormatEv(%struct.QTextBlockFormat*, %struct.QTextBlockGroup*)
587
588 declare void %_ZN10QTextFrame14setFrameFormatERK16QTextFrameFormat(%struct.QTextBlockGroup*, %struct.QTextBlockFormat*)
589
590 declare int %_ZNK12QPaintDevice5widthEv(%struct.QPaintDevice*)
591
592 declare int %_ZNK12QPaintDevice6heightEv(%struct.QPaintDevice*)
593
594 declare int %_ZNK12QPaintDevice11logicalDpiXEv(%struct.QPaintDevice*)
595
596 declare int %_ZNK12QPaintDevice11logicalDpiYEv(%struct.QPaintDevice*)
597
598 declare %struct.QAbstractTextDocumentLayout* %_ZNK13QTextDocument5cloneEP7QObject(%struct.QAbstractTextDocumentLayout*, %struct.QObject*)
599
600 declare void %_ZN5QFontD1Ev(%struct.QFont*)
601
602 declare %struct.QAbstractTextDocumentLayout* %_ZNK13QTextDocument14documentLayoutEv(%struct.QAbstractTextDocumentLayout*)
603
604 declare %struct.QTextBlockGroup* %_ZNK13QTextDocument9rootFrameEv(%struct.QAbstractTextDocumentLayout*)
605
606 declare int %_ZNK13QTextDocument9pageCountEv(%struct.QAbstractTextDocumentLayout*)
607
608 declare void %_ZNK13QTextDocument11defaultFontEv(%struct.QFont*, %struct.QAbstractTextDocumentLayout*)
609
610 declare void %_ZN13QTextDocument14setDefaultFontERK5QFont(%struct.QAbstractTextDocumentLayout*, %struct.QFont*)
611
612 declare void %_ZN13QTextDocument11setPageSizeERK6QSizeF(%struct.QAbstractTextDocumentLayout*, %struct.QPointF*)
613
614 declare void %_Z9printPageiP8QPainterPK13QTextDocumentRK6QRectFRK7QPointF(int, %struct.QPainter*, %struct.QAbstractTextDocumentLayout*, %struct.QRectF*, %struct.QPointF*)
615
616 declare void %_ZN12QFontMetricsD1Ev(%struct.QFontMetrics*)
617
618 declare void %_ZN8QPainterC1EP12QPaintDevice(%struct.QPainter*, %struct.QPaintDevice*)
619
620 declare bool %_ZNK8QPainter8isActiveEv(%struct.QPainter*)
621
622 declare int %_Z13qt_defaultDpiv()
623
624 declare %struct.QPaintDevice* %_ZNK27QAbstractTextDocumentLayout11paintDeviceEv(%struct.QAbstractTextDocumentLayout*)
625
626 declare void %_ZN8QPainter5scaleEdd(%struct.QPainter*, double, double)
627
628 declare %struct.QPaintDevice* %_ZNK8QPainter6deviceEv(%struct.QPainter*)
629
630 declare void %_ZN27QAbstractTextDocumentLayout14setPaintDeviceEP12QPaintDevice(%struct.QAbstractTextDocumentLayout*, %struct.QPaintDevice*)
631
632 declare void %_ZN12QFontMetricsC1ERK5QFontP12QPaintDevice(%struct.QFontMetrics*, %struct.QFont*, %struct.QPaintDevice*)
633
634 declare int %_ZNK12QFontMetrics6ascentEv(%struct.QFontMetrics*)
635
636 declare void %_ZN5QFont12setPointSizeEi(%struct.QFont*, int)
637
638 declare bool %_ZNK8QPrinter13collateCopiesEv(%struct.QPrinter*)
639
640 declare int %_ZNK8QPrinter9numCopiesEv(%struct.QPrinter*)
641
642 declare int %_ZNK8QPrinter8fromPageEv(%struct.QPrinter*)
643
644 declare int %_ZNK8QPrinter6toPageEv(%struct.QPrinter*)
645
646 declare uint %_ZNK8QPrinter9pageOrderEv(%struct.QPrinter*)
647
648 declare uint %_ZNK8QPrinter12printerStateEv(%struct.QPrinter*)
649
650 declare bool %_ZN8QPrinter7newPageEv(%struct.QPrinter*)
651
652 declare void %_ZN8QPainterD1Ev(%struct.QPainter*)