; LLVM IR from erwincoumans/tiny-differentiable-simulator :: src/visualizer/opengl/tiny_gl_instancing_renderer.ll (Z17writeTextureToPngiiPKci)

; 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"

@.str.1 = external hidden unnamed_addr constant [130 x i8], align 1
@glad_glGetError = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@__PRETTY_FUNCTION__._Z17writeTextureToPngiiPKci = external hidden unnamed_addr constant [52 x i8], align 1
@glad_glPixelStorei = external global ptr, align 8
@glad_glReadBuffer = external global ptr, align 8
@glad_glReadPixels = external global ptr, align 8

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17writeTextureToPngiiPKci(i32 noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !5
  %15 = load ptr, ptr @glad_glGetError, align 8, !tbaa !9
  %16 = call i32 %15()
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %19

18:                                               ; preds = %4
  br label %21

19:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 1535, ptr noundef @__PRETTY_FUNCTION__._Z17writeTextureToPngiiPKci) #6
  unreachable

20:                                               ; No predecessors!
  br label %21

21:                                               ; preds = %20, %18
  %22 = load ptr, ptr @glad_glPixelStorei, align 8, !tbaa !9
  call void %22(i32 noundef 3333, i32 noundef 4)
  %23 = load ptr, ptr @glad_glReadBuffer, align 8, !tbaa !9
  call void %23(i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = mul nsw i32 %24, %25
  %27 = load i32, ptr %8, align 4, !tbaa !5
  %28 = mul nsw i32 %26, %27
  %29 = mul nsw i32 %28, 4
  %30 = sext i32 %29 to i64
  %31 = call noalias ptr @malloc(i64 noundef %30) #8
  store ptr %31, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = mul nsw i32 %32, %33
  %35 = load i32, ptr %8, align 4, !tbaa !5
  %36 = mul nsw i32 %34, %35
  %37 = mul nsw i32 %36, 4
  %38 = sext i32 %37 to i64
  %39 = call noalias ptr @malloc(i64 noundef %38) #8
  store ptr %39, ptr %10, align 8, !tbaa !9
  %40 = load ptr, ptr @glad_glReadPixels, align 8, !tbaa !9
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = load ptr, ptr %9, align 8, !tbaa !9
  call void %40(i32 noundef 0, i32 noundef 0, i32 noundef %41, i32 noundef %42, i32 noundef 6402, i32 noundef 5126, ptr noundef %43)
  %44 = load ptr, ptr @glad_glGetError, align 8, !tbaa !9
  %45 = call i32 %44()
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %21
  br label %50

48:                                               ; preds = %21
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 1545, ptr noundef @__PRETTY_FUNCTION__._Z17writeTextureToPngiiPKci) #6
  unreachable

49:                                               ; No predecessors!
  br label %50

50:                                               ; preds = %49, %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %134, %50
  %52 = load i32, ptr %11, align 4, !tbaa !5
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %137

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %130, %56
  %58 = load i32, ptr %13, align 4, !tbaa !5
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %62, label %61

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

62:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %63 = load ptr, ptr %9, align 8, !tbaa !9
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = mul nsw i32 %64, %65
  %67 = load i32, ptr %13, align 4, !tbaa !5
  %68 = add nsw i32 %66, %67
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds float, ptr %63, i64 %69
  %71 = load float, ptr %70, align 4, !tbaa !11
  store float %71, ptr %14, align 4, !tbaa !11
  %72 = load float, ptr %14, align 4, !tbaa !11
  %73 = fcmp une float %72, 1.000000e+00
  br i1 %73, label %74, label %75

74:                                               ; preds = %62
  br label %75

75:                                               ; preds = %74, %62
  %76 = load ptr, ptr %9, align 8, !tbaa !9
  %77 = load i32, ptr %11, align 4, !tbaa !5
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = mul nsw i32 %77, %78
  %80 = load i32, ptr %13, align 4, !tbaa !5
  %81 = add nsw i32 %79, %80
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds float, ptr %76, i64 %82
  %84 = load float, ptr %83, align 4, !tbaa !11
  %85 = fmul float %84, 2.550000e+02
  %86 = fptosi float %85 to i8
  %87 = load ptr, ptr %10, align 8, !tbaa !9
  %88 = load i32, ptr %11, align 4, !tbaa !5
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = mul nsw i32 %88, %89
  %91 = load i32, ptr %13, align 4, !tbaa !5
  %92 = add nsw i32 %90, %91
  %93 = load i32, ptr %8, align 4, !tbaa !5
  %94 = mul nsw i32 %92, %93
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %87, i64 %95
  store i8 %86, ptr %96, align 1, !tbaa !13
  %97 = load ptr, ptr %10, align 8, !tbaa !9
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = mul nsw i32 %98, %99
  %101 = load i32, ptr %13, align 4, !tbaa !5
  %102 = add nsw i32 %100, %101
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = mul nsw i32 %102, %103
  %105 = add nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %97, i64 %106
  store i8 0, ptr %107, align 1, !tbaa !13
  %108 = load ptr, ptr %10, align 8, !tbaa !9
  %109 = load i32, ptr %11, align 4, !tbaa !5
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = mul nsw i32 %109, %110
  %112 = load i32, ptr %13, align 4, !tbaa !5
  %113 = add nsw i32 %111, %112
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = mul nsw i32 %113, %114
  %116 = add nsw i32 %115, 2
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i8, ptr %108, i64 %117
  store i8 0, ptr %118, align 1, !tbaa !13
  %119 = load ptr, ptr %10, align 8, !tbaa !9
  %120 = load i32, ptr %11, align 4, !tbaa !5
  %121 = load i32, ptr %5, align 4, !tbaa !5
  %122 = mul nsw i32 %120, %121
  %123 = load i32, ptr %13, align 4, !tbaa !5
  %124 = add nsw i32 %122, %123
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = mul nsw i32 %124, %125
  %127 = add nsw i32 %126, 3
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i8, ptr %119, i64 %128
  store i8 127, ptr %129, align 1, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %130

130:                                              ; preds = %75
  %131 = load i32, ptr %13, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %13, align 4, !tbaa !5
  br label %57, !llvm.loop !14

133:                                              ; preds = %61
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %11, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %11, align 4, !tbaa !5
  br label %51, !llvm.loop !16

137:                                              ; preds = %55
  %138 = load ptr, ptr %7, align 8, !tbaa !9
  %139 = load i32, ptr %5, align 4, !tbaa !5
  %140 = load i32, ptr %6, align 4, !tbaa !5
  %141 = load i32, ptr %8, align 4, !tbaa !5
  %142 = load ptr, ptr %10, align 8, !tbaa !9
  %143 = load i32, ptr %5, align 4, !tbaa !5
  %144 = load i32, ptr %8, align 4, !tbaa !5
  %145 = mul nsw i32 %143, %144
  %146 = call i32 @stbi_write_png(ptr noundef %138, i32 noundef %139, i32 noundef %140, i32 noundef %141, ptr noundef %142, i32 noundef %145)
  %147 = load ptr, ptr %10, align 8, !tbaa !9
  call void @free(ptr noundef %147) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  ret void
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare i32 @stbi_write_png(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nounwind allocsize(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 #4 = { "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 "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 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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"

@.str.1 = external hidden unnamed_addr constant [130 x i8], align 1
@glad_glGetError = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@__PRETTY_FUNCTION__._Z17writeTextureToPngiiPKci = external hidden unnamed_addr constant [52 x i8], align 1
@glad_glPixelStorei = external local_unnamed_addr global ptr, align 8
@glad_glReadBuffer = external local_unnamed_addr global ptr, align 8
@glad_glReadPixels = external local_unnamed_addr global ptr, align 8

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17writeTextureToPngiiPKci(i32 noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %6 = tail call i32 %5()
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %9, label %8

8:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 1535, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17writeTextureToPngiiPKci) #5
  unreachable

9:                                                ; preds = %4
  %10 = load ptr, ptr @glad_glPixelStorei, align 8, !tbaa !5
  tail call void %10(i32 noundef 3333, i32 noundef 4)
  %11 = load ptr, ptr @glad_glReadBuffer, align 8, !tbaa !5
  tail call void %11(i32 noundef 0)
  %12 = mul i32 %3, %0
  %13 = shl i32 %12, 2
  %14 = mul i32 %13, %1
  %15 = sext i32 %14 to i64
  %16 = tail call noalias ptr @malloc(i64 noundef %15) #6
  %17 = tail call noalias ptr @malloc(i64 noundef %15) #6
  %18 = load ptr, ptr @glad_glReadPixels, align 8, !tbaa !5
  tail call void %18(i32 noundef 0, i32 noundef 0, i32 noundef %0, i32 noundef %1, i32 noundef 6402, i32 noundef 5126, ptr noundef %16)
  %19 = load ptr, ptr @glad_glGetError, align 8, !tbaa !5
  %20 = tail call i32 %19()
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %.preheader54, label %58

.preheader54:                                     ; preds = %9
  %22 = icmp sgt i32 %1, 0
  %23 = icmp sgt i32 %0, 0
  %or.cond = and i1 %22, %23
  br i1 %or.cond, label %.preheader.us.preheader, label %._crit_edge57

.preheader.us.preheader:                          ; preds = %.preheader54
  %24 = sext i32 %3 to i64
  %25 = zext nneg i32 %0 to i64
  %wide.trip.count63 = zext nneg i32 %1 to i64
  %xtraiter = and i64 %25, 1
  %26 = icmp eq i32 %0, 1
  %unroll_iter = and i64 %25, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv60 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next61, %._crit_edge.us ]
  %27 = mul nuw nsw i64 %indvars.iv60, %25
  br i1 %26, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %28 = add nuw nsw i64 %indvars.iv, %27
  %29 = getelementptr inbounds float, ptr %16, i64 %28
  %30 = load float, ptr %29, align 4, !tbaa !9
  %31 = fmul float %30, 2.550000e+02
  %32 = fptosi float %31 to i8
  %33 = mul nsw i64 %28, %24
  %34 = getelementptr inbounds i8, ptr %17, i64 %33
  store i8 %32, ptr %34, align 1, !tbaa !11
  %35 = getelementptr i8, ptr %34, i64 1
  store i8 0, ptr %35, align 1, !tbaa !11
  %36 = getelementptr i8, ptr %34, i64 2
  store i8 0, ptr %36, align 1, !tbaa !11
  %37 = getelementptr i8, ptr %34, i64 3
  store i8 127, ptr %37, align 1, !tbaa !11
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %38 = add nuw nsw i64 %indvars.iv.next, %27
  %39 = getelementptr inbounds float, ptr %16, i64 %38
  %40 = load float, ptr %39, align 4, !tbaa !9
  %41 = fmul float %40, 2.550000e+02
  %42 = fptosi float %41 to i8
  %43 = mul nsw i64 %38, %24
  %44 = getelementptr inbounds i8, ptr %17, i64 %43
  store i8 %42, ptr %44, align 1, !tbaa !11
  %45 = getelementptr i8, ptr %44, i64 1
  store i8 0, ptr %45, align 1, !tbaa !11
  %46 = getelementptr i8, ptr %44, i64 2
  store i8 0, ptr %46, align 1, !tbaa !11
  %47 = getelementptr i8, ptr %44, i64 3
  store i8 127, ptr %47, align 1, !tbaa !11
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !12

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader.us.new, %.preheader.us
  %indvars.iv.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next.1, %.preheader.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %48 = add nuw nsw i64 %indvars.iv.unr, %27
  %49 = getelementptr inbounds float, ptr %16, i64 %48
  %50 = load float, ptr %49, align 4, !tbaa !9
  %51 = fmul float %50, 2.550000e+02
  %52 = fptosi float %51 to i8
  %53 = mul nsw i64 %48, %24
  %54 = getelementptr inbounds i8, ptr %17, i64 %53
  store i8 %52, ptr %54, align 1, !tbaa !11
  %55 = getelementptr i8, ptr %54, i64 1
  store i8 0, ptr %55, align 1, !tbaa !11
  %56 = getelementptr i8, ptr %54, i64 2
  store i8 0, ptr %56, align 1, !tbaa !11
  %57 = getelementptr i8, ptr %54, i64 3
  store i8 127, ptr %57, align 1, !tbaa !11
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %exitcond64.not = icmp eq i64 %indvars.iv.next61, %wide.trip.count63
  br i1 %exitcond64.not, label %._crit_edge57, label %.preheader.us, !llvm.loop !14

58:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 1545, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17writeTextureToPngiiPKci) #5
  unreachable

._crit_edge57:                                    ; preds = %._crit_edge.us, %.preheader54
  %59 = tail call i32 @stbi_write_png(ptr noundef %2, i32 noundef %0, i32 noundef %1, i32 noundef %3, ptr noundef %17, i32 noundef %12)
  tail call void @free(ptr noundef %17) #7
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

declare i32 @stbi_write_png(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #3 = { "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 #4 = { 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 #5 = { noreturn nounwind }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { 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 = !{!"float", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass