1 ; RUN: llvm-as < %s | opt -indvars -disable-output
4 %struct.AVClass = type { i8*, i8* (i8*)*, %struct.AVOption* }
5 %struct.AVCodec = type { i8*, i32, i32, i32, i32 (%struct.AVCodecContext*)*, i32 (%struct.AVCodecContext*, i8*, i32, i8*)*, i32 (%struct.AVCodecContext*)*, i32 (%struct.AVCodecContext*, i8*, i32*, i8*, i32)*, i32, %struct.AVCodec*, void (%struct.AVCodecContext*)*, %struct.AVCodecTag*, i32* }
6 %struct.AVCodecContext = type { %struct.AVClass*, i32, i32, i32, i32, i32, i8*, i32, %struct.AVCodecTag, i32, i32, i32, i32, i32, void (%struct.AVCodecContext*, %struct.AVFrame*, i32*, i32, i32, i32)*, i32, i32, i32, i32, i32, i32, i32, float, float, i32, i32, i32, i32, float, i32, i32, i32, %struct.AVCodec*, i8*, i32, i32, void (%struct.AVCodecContext*, i8*, i32, i32)*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, [32 x i8], i32, i32, i32, i32, i32, i32, i32, float, i32, i32 (%struct.AVCodecContext*, %struct.AVFrame*)*, void (%struct.AVCodecContext*, %struct.AVFrame*)*, i32, i32, i32, i32, i8*, i8*, float, float, i32, %struct.RcOverride*, i32, i8*, i32, i32, i32, float, float, float, float, i32, float, float, float, float, float, i32, i32, i32, i32*, i32, i32, i32, i32, %struct.AVCodecTag, %struct.AVFrame*, i32, i32, [4 x i64], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 (%struct.AVCodecContext*, i32*)*, i32, i32, i32, i32, i32, i32, i8*, i32, i32, i32, i32, i32, i32, i16*, i16*, i32, i32, i32, i32, %struct.AVPaletteControl*, i32, i32 (%struct.AVCodecContext*, %struct.AVFrame*)*, i32, i32, i32, i32, i32, i32, i32, i32 (%struct.AVCodecContext*, i32 (%struct.AVCodecContext*, i8*)*, i8**, i32*, i32)*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }
7 %struct.AVCodecTag = type { i32, i32 }
8 %struct.AVFrame = type { [4 x i8*], [4 x i32], [4 x i8*], i32, i32, i64, i32, i32, i32, i32, i32, i8*, i32, i8*, [2 x [2 x i16]*], i32*, i8, i8*, [4 x i64], i32, i32, i32, i32, i32, %struct.AVPanScan*, i32, i32, i16*, [2 x i8*] }
9 %struct.AVOption = type { i8*, i8*, i32, i32, double, double, double, i32, i8* }
10 %struct.AVPaletteControl = type { i32, [256 x i32] }
11 %struct.AVPanScan = type { i32, i32, i32, [3 x [2 x i16]] }
12 %struct.RcOverride = type { i32, i32, i32, float }
14 define i32 @smc_decode_frame(%struct.AVCodecContext* %avctx, i8* %data, i32* %data_size, i8* %buf, i32 %buf_size) {
16 br i1 false, label %cond_next, label %cond_true
18 cond_true: ; preds = %entry
21 cond_next: ; preds = %entry
22 br i1 false, label %bb.outer5.split.split.split.us, label %cond_true194.split
24 bb.outer5.split.split.split.us: ; preds = %cond_next
25 br i1 false, label %cond_next188.us503.us, label %bb.us481
27 bb275.us493.us: ; preds = %cond_next188.us503.us, %cond_next188.us503.us
30 cond_next188.us503.us: ; preds = %bb.outer5.split.split.split.us
31 switch i32 0, label %bb1401 [
32 i32 0, label %cond_next202.bb215_crit_edge.split
34 i32 32, label %bb275.us493.us
35 i32 48, label %bb275.us493.us
36 i32 64, label %cond_next202.bb417_crit_edge.split
38 i32 96, label %cond_next202.bb615_crit_edge.split
40 i32 128, label %cond_next202.bb716_crit_edge.split
42 i32 160, label %cond_next202.bb882_crit_edge.split
44 i32 192, label %cond_next202.bb1062_crit_edge.split
45 i32 208, label %bb1062
46 i32 224, label %bb1326.us.outer.outer
49 bb.us481: ; preds = %bb.outer5.split.split.split.us
52 cond_true194.split: ; preds = %cond_next
55 cond_next202.bb1062_crit_edge.split: ; preds = %cond_next188.us503.us
58 cond_next202.bb882_crit_edge.split: ; preds = %cond_next188.us503.us
61 cond_next202.bb716_crit_edge.split: ; preds = %cond_next188.us503.us
64 cond_next202.bb615_crit_edge.split: ; preds = %cond_next188.us503.us
67 cond_next202.bb417_crit_edge.split: ; preds = %cond_next188.us503.us
70 cond_next202.bb215_crit_edge.split: ; preds = %cond_next188.us503.us
73 bb215: ; preds = %cond_next188.us503.us
76 bb417: ; preds = %cond_next188.us503.us
79 bb615: ; preds = %cond_next188.us503.us
82 bb716: ; preds = %cond_next188.us503.us
85 bb882: ; preds = %cond_next188.us503.us
88 bb1062: ; preds = %cond_next188.us503.us
91 bb1326.us: ; preds = %bb1326.us.outer.outer, %bb1347.loopexit.us, %bb1326.us
92 %pixel_y.162036.us.ph = phi i32 [ %tmp1352.us, %bb1347.loopexit.us ], [ 0, %bb1326.us.outer.outer ], [ %pixel_y.162036.us.ph, %bb1326.us ] ; <i32> [#uses=2]
93 %stream_ptr.142038.us.ph = phi i32 [ %tmp1339.us, %bb1347.loopexit.us ], [ %stream_ptr.142038.us.ph.ph, %bb1326.us.outer.outer ], [ %stream_ptr.142038.us.ph, %bb1326.us ] ; <i32> [#uses=2]
94 %pixel_x.232031.us = phi i32 [ %tmp1341.us, %bb1326.us ], [ 0, %bb1326.us.outer.outer ], [ 0, %bb1347.loopexit.us ] ; <i32> [#uses=3]
95 %block_ptr.222030.us = add i32 0, %pixel_x.232031.us ; <i32> [#uses=1]
96 %stream_ptr.132032.us = add i32 %pixel_x.232031.us, %stream_ptr.142038.us.ph ; <i32> [#uses=1]
97 %tmp1341.us = add i32 %pixel_x.232031.us, 1 ; <i32> [#uses=2]
98 %tmp1344.us = icmp slt i32 %tmp1341.us, 4 ; <i1> [#uses=1]
99 br i1 %tmp1344.us, label %bb1326.us, label %bb1347.loopexit.us
101 bb1347.loopexit.us: ; preds = %bb1326.us
102 %tmp1339.us = add i32 %stream_ptr.132032.us, 1 ; <i32> [#uses=2]
103 %tmp1337.us = add i32 %block_ptr.222030.us, 1 ; <i32> [#uses=0]
104 %tmp1352.us = add i32 %pixel_y.162036.us.ph, 1 ; <i32> [#uses=2]
105 %tmp1355.us = icmp slt i32 %tmp1352.us, 4 ; <i1> [#uses=1]
106 br i1 %tmp1355.us, label %bb1326.us, label %bb1358
108 bb1358: ; preds = %bb1347.loopexit.us
109 br label %bb1326.us.outer.outer
111 bb1326.us.outer.outer: ; preds = %bb1358, %cond_next188.us503.us
112 %stream_ptr.142038.us.ph.ph = phi i32 [ %tmp1339.us, %bb1358 ], [ 0, %cond_next188.us503.us ] ; <i32> [#uses=1]
115 bb1401: ; preds = %cond_next188.us503.us