; ModuleID = 'autogen_tmp/test_pass.bc'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
target triple = "i386-pc-linux-gnu"

define void @dummy_call() nounwind {
  call void @fw_data_get(i32 0, i32 0, i32 0, i32 0, float* null, i32 0, i32 0, i32 0)
  %1 = call i32 @fw_init_fw(i32 0)
  call void @fw_data_init(i32 0, i32 0, i32 0, i32 0, float* null, i32 %1, i32 %1, i32 0, float 0.000000e+00)
  call void @fw_op_start(i32 0)
  call void @fw_init_table()
  ret void
}

declare void @fw_data_get(i32, i32, i32, i32, float*, i32, i32, i32)

declare i32 @fw_init_fw(i32)

declare void @fw_data_init(i32, i32, i32, i32, float*, i32, i32, i32, float)

declare void @fw_op_start(i32)

declare void @fw_init_table()

define float @bar(float %c) nounwind readnone {
  %1 = fmul float %c, %c
  ret float %1
}

define float @foo(float* nocapture %c, float* nocapture %a, float* nocapture %b) nounwind {
  br label %codeRepl

codeRepl:                                         ; preds = %0
  call void @foo_(float* %a, float* %c, float* %b)
  br label %1

; <label>:1                                       ; preds = %codeRepl
  %2 = getelementptr inbounds float* %b, i32 3
  %3 = load float* %2, align 4, !tbaa !0
  %4 = getelementptr inbounds float* %b, i32 5
  store float %3, float* %4, align 4, !tbaa !0
  %5 = load float* %2, align 4, !tbaa !0
  ret float %5
}

define void @foo2(float* nocapture %c, float* nocapture %a, float* nocapture %b) nounwind {
  br label %codeRepl

codeRepl:                                         ; preds = %0
  call void @foo2_(float* %b, float* %a, float* %c)
  br label %1

; <label>:1                                       ; preds = %codeRepl
  %2 = getelementptr inbounds float* %b, i32 2
  %3 = load float* %2, align 4, !tbaa !0
  %4 = getelementptr inbounds float* %b, i32 5
  store float %3, float* %4, align 4, !tbaa !0
  ret void
}

define float @foo_bar(float* nocapture %b, float* nocapture %a, float* nocapture %c) nounwind {
  br label %codeRepl

codeRepl:                                         ; preds = %0
  call void @foo_bar_(float* %a, float* %c, float* %b)
  br label %1

; <label>:1                                       ; preds = %codeRepl
  %2 = getelementptr inbounds float* %a, i32 6
  %3 = load float* %2, align 4, !tbaa !0
  %4 = getelementptr inbounds float* %b, i32 3
  store float %3, float* %4, align 4, !tbaa !0
  ret float %3
}

define void @compute(float* nocapture %a, float* nocapture %b, float* nocapture %c, i32 %decide) nounwind {
  %1 = icmp eq i32 %decide, 0
  br i1 %1, label %4, label %2

; <label>:2                                       ; preds = %0
  %3 = tail call float @foo(float* %c, float* %a, float* %b)
  br label %5

; <label>:4                                       ; preds = %0
  tail call void @foo2(float* %b, float* %a, float* %c)
  br label %5

; <label>:5                                       ; preds = %4, %2
  ret void
}

define i32 @main() nounwind {
  %a = alloca [256 x float], align 4
  %b = alloca [256 x float], align 4
  %c = alloca [256 x float], align 4
  br label %codeRepl1

codeRepl1:                                        ; preds = %0
  call void @main_1([256 x float]* %c, [256 x float]* %b, [256 x float]* %a)
  br label %1

; <label>:1                                       ; preds = %codeRepl1
  %2 = getelementptr inbounds [256 x float]* %a, i32 0, i32 1
  %3 = ptrtoint float* %2 to i32
  %4 = and i32 %3, -8
  %5 = inttoptr i32 %4 to float*
  %6 = getelementptr inbounds [256 x float]* %b, i32 0, i32 1
  %7 = ptrtoint float* %6 to i32
  %8 = and i32 %7, -8
  %9 = inttoptr i32 %8 to float*
  %10 = getelementptr inbounds [256 x float]* %c, i32 0, i32 1
  %11 = ptrtoint float* %10 to i32
  %12 = and i32 %11, -8
  %13 = inttoptr i32 %12 to float*
  br label %codeRepl

codeRepl:                                         ; preds = %1
  call void @main_(float* %5, float* %9, float* %13)
  br label %14

; <label>:14                                      ; preds = %codeRepl
  ret i32 0
}

define internal void @foo_(float* %a, float* %c, float* %b) nounwind {
newFuncRoot:
  br label %man_block_0

man_block_0:                                      ; preds = %newFuncRoot
  call void @fw_init_table()
  %wrk_id = call i32 @fw_init_fw(i32 0)
  call void @fw_data_init(i32 %wrk_id, i32 0, i32 1, i32 1, float* %b, i32 0, i32 0, i32 250, float 0.000000e+00)
  call void @fw_data_init(i32 %wrk_id, i32 255, i32 1, i32 1, float* %c, i32 0, i32 0, i32 250, float 0.000000e+00)
  call void @fw_data_init(i32 %wrk_id, i32 0, i32 2, i32 1, float* %a, i32 0, i32 0, i32 250, float 0.000000e+00)
  call void @fw_op_start(i32 %wrk_id)
  call void @fw_data_get(i32 %wrk_id, i32 0, i32 1, i32 1, float* %a, i32 0, i32 0, i32 250)
  br label %.exitStub

.exitStub:                                        ; preds = %man_block_0
  ret void
}

define internal void @foo2_(float* %b, float* %a, float* %c) nounwind {
newFuncRoot:
  br label %man_block_1

man_block_1:                                      ; preds = %newFuncRoot
  call void @fw_init_table()
  %wrk_id = call i32 @fw_init_fw(i32 1)
  call void @fw_data_init(i32 %wrk_id, i32 0, i32 1, i32 1, float* %c, i32 0, i32 0, i32 250, float 0.000000e+00)
  call void @fw_data_init(i32 %wrk_id, i32 255, i32 1, i32 1, float* %a, i32 0, i32 0, i32 250, float 0.000000e+00)
  call void @fw_data_init(i32 %wrk_id, i32 0, i32 2, i32 0, float* null, i32 0, i32 0, i32 250, float 0x4003333340000000)
  call void @fw_op_start(i32 %wrk_id)
  call void @fw_data_get(i32 %wrk_id, i32 0, i32 1, i32 1, float* %b, i32 0, i32 0, i32 250)
  br label %.exitStub

.exitStub:                                        ; preds = %man_block_1
  ret void
}

define internal void @foo_bar_(float* %a, float* %c, float* %b) nounwind {
newFuncRoot:
  br label %man_block_2

man_block_2:                                      ; preds = %newFuncRoot
  call void @fw_init_table()
  %wrk_id = call i32 @fw_init_fw(i32 2)
  call void @fw_data_init(i32 %wrk_id, i32 0, i32 1, i32 1, float* %b, i32 0, i32 0, i32 250, float 0.000000e+00)
  call void @fw_data_init(i32 %wrk_id, i32 255, i32 1, i32 2, float* %c, i32 2, i32 0, i32 250, float 0.000000e+00)
  call void @fw_op_start(i32 %wrk_id)
  call void @fw_data_get(i32 %wrk_id, i32 0, i32 1, i32 2, float* %a, i32 2, i32 0, i32 250)
  br label %.exitStub

.exitStub:                                        ; preds = %man_block_2
  ret void
}

define internal void @main_(float*, float*, float*) nounwind {
newFuncRoot:
  br label %3

.exitStub:                                        ; preds = %3
  ret void

; <label>:3                                       ; preds = %3, %newFuncRoot
  %i.11 = phi i32 [ 0, %newFuncRoot ], [ %4, %3 ]
  call void @compute(float* %0, float* %1, float* %2, i32 0)
  %4 = add nsw i32 %i.11, 1
  %exitcond1 = icmp eq i32 %4, 10000
  br i1 %exitcond1, label %.exitStub, label %3
}

define internal void @main_1([256 x float]* %c, [256 x float]* %b, [256 x float]* %a) nounwind {
newFuncRoot:
  br label %0

.exitStub:                                        ; preds = %0
  ret void

; <label>:0                                       ; preds = %0, %newFuncRoot
  %i.02 = phi i32 [ 0, %newFuncRoot ], [ %1, %0 ]
  %scevgep = getelementptr [256 x float]* %c, i32 0, i32 %i.02
  %scevgep2 = getelementptr [256 x float]* %b, i32 0, i32 %i.02
  %scevgep3 = getelementptr [256 x float]* %a, i32 0, i32 %i.02
  store float 1.000000e+01, float* %scevgep3, align 4, !tbaa !0
  store float 2.000000e+00, float* %scevgep2, align 4, !tbaa !0
  store float 1.000000e+00, float* %scevgep, align 4, !tbaa !0
  %1 = add nsw i32 %i.02, 1
  %exitcond = icmp eq i32 %1, 256
  br i1 %exitcond, label %.exitStub, label %0
}

!0 = metadata !{metadata !"float", metadata !1}
!1 = metadata !{metadata !"omnipotent char", metadata !2}
!2 = metadata !{metadata !"Simple C/C++ TBAA", null}
