; LLVM IR from OAID/AutoKernel :: autokernel_plugin/tests/common/tengine_operations.ll (Z14load_image_stbPKci)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.image = type { i32, i32, i32, ptr }

@stderr = external global ptr, align 8
@.str.106 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @stbi_failure_reason() #0

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local ptr @stbi_load(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14load_image_stbPKci(ptr dead_on_unwind noalias writable sret(%struct.image) align 8 %0, ptr noundef %1, i32 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %1, ptr %4, align 8, !tbaa !5
  store i32 %2, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = load i32, ptr %5, align 4, !tbaa !9
  %19 = call ptr @stbi_load(ptr noundef %17, ptr noundef %6, ptr noundef %7, ptr noundef %8, i32 noundef %18)
  store ptr %19, ptr %9, align 8, !tbaa !5
  %20 = load ptr, ptr %9, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %27, label %22

22:                                               ; preds = %3
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = call ptr @stbi_failure_reason()
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.106, ptr noundef %24, ptr noundef %25) #5
  call void @exit(i32 noundef 0) #6
  unreachable

27:                                               ; preds = %3
  %28 = load i32, ptr %5, align 4, !tbaa !9
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %32

30:                                               ; preds = %27
  %31 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %31, ptr %8, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %30, %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %33 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %33, ptr %10, align 4, !tbaa !9
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = icmp sgt i32 %34, 3
  br i1 %35, label %36, label %37

36:                                               ; preds = %32
  store i32 3, ptr %8, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %36, %32
  %38 = load i32, ptr %6, align 4, !tbaa !9
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = load i32, ptr %8, align 4, !tbaa !9
  call void @_Z10make_imageiii(ptr dead_on_unwind writable sret(%struct.image) align 8 %0, i32 noundef %38, i32 noundef %39, i32 noundef %40)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %100, %37
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %103

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %96, %46
  %48 = load i32, ptr %13, align 4, !tbaa !9
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %99

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %92, %52
  %54 = load i32, ptr %14, align 4, !tbaa !9
  %55 = load i32, ptr %6, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %95

58:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %59 = load i32, ptr %14, align 4, !tbaa !9
  %60 = load i32, ptr %6, align 4, !tbaa !9
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = mul nsw i32 %60, %61
  %63 = add nsw i32 %59, %62
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = load i32, ptr %7, align 4, !tbaa !9
  %66 = mul nsw i32 %64, %65
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = mul nsw i32 %66, %67
  %69 = add nsw i32 %63, %68
  store i32 %69, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = load i32, ptr %14, align 4, !tbaa !9
  %73 = mul nsw i32 %71, %72
  %74 = add nsw i32 %70, %73
  %75 = load i32, ptr %10, align 4, !tbaa !9
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = mul nsw i32 %75, %76
  %78 = load i32, ptr %13, align 4, !tbaa !9
  %79 = mul nsw i32 %77, %78
  %80 = add nsw i32 %74, %79
  store i32 %80, ptr %16, align 4, !tbaa !9
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = load i32, ptr %16, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i8, ptr %81, i64 %83
  %85 = load i8, ptr %84, align 1, !tbaa !11
  %86 = uitofp i8 %85 to float
  %87 = getelementptr inbounds %struct.image, ptr %0, i32 0, i32 3
  %88 = load ptr, ptr %87, align 8, !tbaa !12
  %89 = load i32, ptr %15, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds float, ptr %88, i64 %90
  store float %86, ptr %91, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %92

92:                                               ; preds = %58
  %93 = load i32, ptr %14, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %14, align 4, !tbaa !9
  br label %53, !llvm.loop !16

95:                                               ; preds = %57
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %13, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %13, align 4, !tbaa !9
  br label %47, !llvm.loop !18

99:                                               ; preds = %51
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %11, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %11, align 4, !tbaa !9
  br label %41, !llvm.loop !19

103:                                              ; preds = %45
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %104) #5
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  ret void
}

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10make_imageiii(ptr dead_on_unwind noalias writable sret(%struct.image) align 8, i32 noundef, i32 noundef, i32 noundef) #2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 16}
!13 = !{!"_ZTS5image", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.image = type { i32, i32, i32, ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.106 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @stbi_failure_reason() local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local ptr @stbi_load(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14load_image_stbPKci(ptr dead_on_unwind noalias writable sret(%struct.image) align 8 %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %7 = call ptr @stbi_load(ptr noundef %1, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, i32 noundef %2)
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %8, label %12

8:                                                ; preds = %3
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = call ptr @stbi_failure_reason()
  %11 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.106, ptr noundef %1, ptr noundef %10) #7
  call void @exit(i32 noundef 0) #8
  unreachable

12:                                               ; preds = %3
  %.not28 = icmp eq i32 %2, 0
  br i1 %.not28, label %thread-pre-split, label %13

13:                                               ; preds = %12
  store i32 %2, ptr %6, align 4, !tbaa !9
  br label %14

thread-pre-split:                                 ; preds = %12
  %.pr = load i32, ptr %6, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %thread-pre-split, %13
  %15 = phi i32 [ %.pr, %thread-pre-split ], [ %2, %13 ]
  %16 = icmp sgt i32 %15, 3
  br i1 %16, label %17, label %18

17:                                               ; preds = %14
  store i32 3, ptr %6, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %17, %14
  %19 = phi i32 [ 3, %17 ], [ %15, %14 ]
  %20 = load i32, ptr %4, align 4, !tbaa !9
  %21 = load i32, ptr %5, align 4, !tbaa !9
  call void @_Z10make_imageiii(ptr dead_on_unwind writable sret(%struct.image) align 8 %0, i32 noundef %20, i32 noundef %21, i32 noundef %19)
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.preheader31.lr.ph, label %._crit_edge

.preheader31.lr.ph:                               ; preds = %18
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = icmp sgt i32 %24, 0
  %26 = load i32, ptr %4, align 4
  %27 = getelementptr inbounds i8, ptr %0, i64 16
  %28 = icmp sgt i32 %26, 0
  %or.cond = select i1 %25, i1 %28, i1 false
  br i1 %or.cond, label %.preheader31.us.us.preheader, label %._crit_edge

.preheader31.us.us.preheader:                     ; preds = %.preheader31.lr.ph
  %wide.trip.count = zext nneg i32 %26 to i64
  %29 = add nsw i64 %wide.trip.count, -1
  %30 = mul i32 %24, %26
  %31 = mul i32 %24, %26
  %32 = shl nuw nsw i64 %wide.trip.count, 2
  %scevgep49 = getelementptr i8, ptr %7, i64 %wide.trip.count
  %min.iters.check = icmp ult i32 %26, 12
  %ident.check = icmp ne i32 %15, 1
  %33 = trunc nsw i64 %29 to i32
  %34 = icmp ugt i64 %29, 4294967295
  %35 = trunc nsw i64 %29 to i32
  %n.vec = and i64 %wide.trip.count, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %36 = add nsw i64 %wide.trip.count, -1
  br label %.preheader31.us.us

.preheader31.us.us:                               ; preds = %.preheader31.us.us.preheader, %._crit_edge34.split.us.us.us
  %.035.us.us = phi i32 [ %101, %._crit_edge34.split.us.us.us ], [ 0, %.preheader31.us.us.preheader ]
  %37 = mul i32 %31, %.035.us.us
  %38 = mul i32 %30, %.035.us.us
  %39 = mul i32 %24, %.035.us.us
  %40 = load ptr, ptr %27, align 8
  %scevgep46 = getelementptr i8, ptr %40, i64 %32
  br label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %._crit_edge.us.us.us, %.preheader31.us.us
  %.02433.us.us.us = phi i32 [ 0, %.preheader31.us.us ], [ %100, %._crit_edge.us.us.us ]
  %41 = mul i32 %26, %.02433.us.us.us
  %42 = add i32 %37, %41
  %43 = sext i32 %42 to i64
  %44 = shl nsw i64 %43, 2
  %scevgep = getelementptr i8, ptr %40, i64 %44
  %scevgep47 = getelementptr i8, ptr %scevgep46, i64 %44
  %45 = add i32 %.035.us.us, %41
  %46 = sext i32 %45 to i64
  %scevgep48 = getelementptr i8, ptr %7, i64 %46
  %scevgep50 = getelementptr i8, ptr %scevgep49, i64 %46
  %reass.add.us.us.us = add i32 %39, %.02433.us.us.us
  %reass.mul.us.us.us = mul i32 %reass.add.us.us.us, %26
  %47 = mul i32 %26, %.02433.us.us.us
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.preheader.us.us.us
  %48 = mul i32 %26, %.02433.us.us.us
  %49 = add i32 %.035.us.us, %48
  %50 = add i32 %38, %48
  %51 = add i32 %50, %33
  %52 = icmp slt i32 %51, %50
  %53 = or i1 %52, %34
  %54 = add i32 %49, %35
  %55 = icmp slt i32 %54, %49
  %56 = or i1 %ident.check, %53
  %57 = or i1 %55, %56
  br i1 %57, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %bound0 = icmp ult ptr %scevgep, %scevgep50
  %bound1 = icmp ult ptr %scevgep48, %scevgep47
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.memcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.memcheck ]
  %58 = trunc i64 %index to i32
  %59 = add i32 %reass.mul.us.us.us, %58
  %60 = add i32 %47, %58
  %61 = add i32 %60, %.035.us.us
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %7, i64 %62
  %64 = getelementptr inbounds i8, ptr %63, i64 4
  %wide.load = load <4 x i8>, ptr %63, align 1, !tbaa !11, !alias.scope !12
  %wide.load51 = load <4 x i8>, ptr %64, align 1, !tbaa !11, !alias.scope !12
  %65 = uitofp <4 x i8> %wide.load to <4 x float>
  %66 = uitofp <4 x i8> %wide.load51 to <4 x float>
  %67 = sext i32 %59 to i64
  %68 = getelementptr inbounds float, ptr %40, i64 %67
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  store <4 x float> %65, ptr %68, align 4, !tbaa !15, !alias.scope !17, !noalias !12
  store <4 x float> %66, ptr %69, align 4, !tbaa !15, !alias.scope !17, !noalias !12
  %index.next = add nuw i64 %index, 8
  %70 = icmp eq i64 %index.next, %n.vec
  br i1 %70, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us.us.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %vector.scevcheck, %.preheader.us.us.us
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %vector.scevcheck ], [ 0, %.preheader.us.us.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %71 = trunc nuw nsw i64 %indvars.iv.ph to i32
  %72 = add i32 %reass.mul.us.us.us, %71
  %reass.add29.us.us.us.prol = add i32 %47, %71
  %reass.mul30.us.us.us.prol = mul i32 %reass.add29.us.us.us.prol, %15
  %73 = add i32 %reass.mul30.us.us.us.prol, %.035.us.us
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %7, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !11
  %77 = uitofp i8 %76 to float
  %78 = sext i32 %72 to i64
  %79 = getelementptr inbounds float, ptr %40, i64 %78
  store float %77, ptr %79, align 4, !tbaa !15
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %80 = icmp eq i64 %indvars.iv.ph, %36
  br i1 %80, label %._crit_edge.us.us.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %81 = trunc nuw nsw i64 %indvars.iv to i32
  %82 = add i32 %reass.mul.us.us.us, %81
  %reass.add29.us.us.us = add i32 %47, %81
  %reass.mul30.us.us.us = mul i32 %reass.add29.us.us.us, %15
  %83 = add i32 %reass.mul30.us.us.us, %.035.us.us
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %7, i64 %84
  %86 = load i8, ptr %85, align 1, !tbaa !11
  %87 = uitofp i8 %86 to float
  %88 = sext i32 %82 to i64
  %89 = getelementptr inbounds float, ptr %40, i64 %88
  store float %87, ptr %89, align 4, !tbaa !15
  %90 = trunc i64 %indvars.iv to i32
  %91 = add i32 %90, 1
  %92 = add i32 %reass.mul.us.us.us, %91
  %reass.add29.us.us.us.1 = add i32 %47, %91
  %reass.mul30.us.us.us.1 = mul i32 %reass.add29.us.us.us.1, %15
  %93 = add i32 %reass.mul30.us.us.us.1, %.035.us.us
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i8, ptr %7, i64 %94
  %96 = load i8, ptr %95, align 1, !tbaa !11
  %97 = uitofp i8 %96 to float
  %98 = sext i32 %92 to i64
  %99 = getelementptr inbounds float, ptr %40, i64 %98
  store float %97, ptr %99, align 4, !tbaa !15
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge.us.us.us, label %scalar.ph, !llvm.loop !23

._crit_edge.us.us.us:                             ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %100 = add nuw nsw i32 %.02433.us.us.us, 1
  %exitcond44.not = icmp eq i32 %100, %24
  br i1 %exitcond44.not, label %._crit_edge34.split.us.us.us, label %.preheader.us.us.us, !llvm.loop !24

._crit_edge34.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %101 = add nuw nsw i32 %.035.us.us, 1
  %exitcond45.not = icmp eq i32 %101, %22
  br i1 %exitcond45.not, label %._crit_edge, label %.preheader31.us.us, !llvm.loop !25

._crit_edge:                                      ; preds = %._crit_edge34.split.us.us.us, %.preheader31.lr.ph, %18
  call void @free(ptr noundef nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  ret void
}

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10make_imageiii(ptr dead_on_unwind noalias writable sret(%struct.image) align 8, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { cold nounwind }
attributes #8 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13}
!13 = distinct !{!13, !14}
!14 = distinct !{!14, !"LVerDomain"}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!18}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !20, !21, !22}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !20, !21}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !20}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass