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