; LLVM IR from PyCee/NUS_library :: src/render (NUS_framebuffer)

; 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.NUS_render_pass = type { ptr, %struct.NUS_binding }
%struct.NUS_binding = type { ptr, ptr, ptr, i32 }
%struct.VkFramebufferCreateInfo = type { i32, ptr, i32, ptr, i32, ptr, i32, i32, i32 }
%struct.NUS_framebuffer = type { ptr, %struct.NUS_binding }
%struct.NUS_image_view = type { ptr, %struct.NUS_binding }

@vkCreateFramebuffer = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @nus_framebuffer_build(ptr noundef %0, ptr noundef byval(%struct.NUS_render_pass) align 8 %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) #0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %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 %struct.VkFramebufferCreateInfo, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca %struct.NUS_framebuffer, align 8
  %18 = alloca %struct.VkFramebufferCreateInfo, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  store i32 %5, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #5
  %20 = load i32, ptr %10, align 4, !tbaa !9
  %21 = zext i32 %20 to i64
  %22 = call ptr @llvm.stacksave.p0()
  store ptr %22, ptr %15, align 8
  %23 = alloca ptr, i64 %21, align 16
  store i64 %21, ptr %16, align 8
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.NUS_framebuffer, ptr %17, i32 0, i32 0
  store ptr null, ptr %25, align 8, !tbaa !11
  %26 = getelementptr inbounds %struct.NUS_framebuffer, ptr %17, i32 0, i32 1
  call void @nus_get_binding(ptr dead_on_unwind writable sret(%struct.NUS_binding) align 8 %26)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %17, i64 40, i1 false), !tbaa.struct !14
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %41, %6
  %28 = load i32, ptr %13, align 4, !tbaa !9
  %29 = load i32, ptr %10, align 4, !tbaa !9
  %30 = icmp ult i32 %28, %29
  br i1 %30, label %31, label %44

31:                                               ; preds = %27
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = load i32, ptr %13, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds %struct.NUS_image_view, ptr %32, i64 %34
  %36 = getelementptr inbounds %struct.NUS_image_view, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %38 = load i32, ptr %13, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds ptr, ptr %23, i64 %39
  store ptr %37, ptr %40, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %31
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %13, align 4, !tbaa !9
  br label %27, !llvm.loop !17

44:                                               ; preds = %27
  %45 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %18, i32 0, i32 0
  store i32 37, ptr %45, align 8, !tbaa !19
  %46 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %18, i32 0, i32 1
  store ptr null, ptr %46, align 8, !tbaa !21
  %47 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %18, i32 0, i32 2
  store i32 0, ptr %47, align 8, !tbaa !22
  %48 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %18, i32 0, i32 3
  %49 = getelementptr inbounds %struct.NUS_render_pass, ptr %1, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !23
  store ptr %50, ptr %48, align 8, !tbaa !25
  %51 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %18, i32 0, i32 4
  %52 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %52, ptr %51, align 8, !tbaa !26
  %53 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %18, i32 0, i32 5
  store ptr %23, ptr %53, align 8, !tbaa !27
  %54 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %18, i32 0, i32 6
  %55 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %55, ptr %54, align 8, !tbaa !28
  %56 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %18, i32 0, i32 7
  %57 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %57, ptr %56, align 4, !tbaa !29
  %58 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %18, i32 0, i32 8
  store i32 1, ptr %58, align 8, !tbaa !30
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %18, i64 64, i1 false), !tbaa.struct !31
  %59 = load ptr, ptr @vkCreateFramebuffer, align 8, !tbaa !5
  %60 = call ptr @nus_get_bound_device()
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.NUS_framebuffer, ptr %61, i32 0, i32 0
  %63 = call i32 %59(ptr noundef %60, ptr noundef %14, ptr noundef null, ptr noundef %62)
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %67

65:                                               ; preds = %44
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  store i32 0, ptr %7, align 4
  store i32 1, ptr %19, align 4
  br label %68

67:                                               ; preds = %44
  store i32 1, ptr %7, align 4
  store i32 1, ptr %19, align 4
  br label %68

68:                                               ; preds = %67, %65
  %69 = load ptr, ptr %15, align 8
  call void @llvm.stackrestore.p0(ptr %69)
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %70 = load i32, ptr %7, align 4
  ret i32 %70
}

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #2

declare void @nus_get_binding(ptr dead_on_unwind writable sret(%struct.NUS_binding) align 8) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare ptr @nus_get_bound_device() #3

declare i32 @printf(ptr noundef, ...) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

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

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"NUS_framebuffer", !6, i64 0, !13, i64 8}
!13 = !{!"NUS_binding", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24}
!14 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 4, !9}
!15 = !{!16, !6, i64 0}
!16 = !{!"NUS_image_view", !6, i64 0, !13, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !10, i64 0}
!20 = !{!"VkFramebufferCreateInfo", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56}
!21 = !{!20, !6, i64 8}
!22 = !{!20, !10, i64 16}
!23 = !{!24, !6, i64 0}
!24 = !{!"NUS_render_pass", !6, i64 0, !13, i64 8}
!25 = !{!20, !6, i64 24}
!26 = !{!20, !10, i64 32}
!27 = !{!20, !6, i64 40}
!28 = !{!20, !10, i64 48}
!29 = !{!20, !10, i64 52}
!30 = !{!20, !10, i64 56}
!31 = !{i64 0, i64 4, !9, i64 8, i64 8, !5, i64 16, i64 4, !9, i64 24, i64 8, !5, i64 32, i64 4, !9, i64 40, i64 8, !5, i64 48, i64 4, !9, i64 52, i64 4, !9, i64 56, i64 4, !9}


; 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.NUS_render_pass = type { ptr, %struct.NUS_binding }
%struct.NUS_binding = type { ptr, ptr, ptr, i32 }
%struct.VkFramebufferCreateInfo = type { i32, ptr, i32, ptr, i32, ptr, i32, i32, i32 }
%struct.NUS_framebuffer = type { ptr, %struct.NUS_binding }
%struct.NUS_image_view = type { ptr, %struct.NUS_binding }

@vkCreateFramebuffer = external dso_local local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @nus_framebuffer_build(ptr noundef %0, ptr nocapture noundef readonly byval(%struct.NUS_render_pass) align 8 %1, ptr nocapture noundef readonly %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
  %7 = alloca %struct.VkFramebufferCreateInfo, align 8
  %8 = alloca %struct.NUS_framebuffer, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #6
  %9 = zext i32 %3 to i64
  %10 = tail call ptr @llvm.stacksave.p0()
  %11 = alloca ptr, i64 %9, align 16
  store ptr null, ptr %8, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %8, i64 8
  call void @nus_get_binding(ptr dead_on_unwind nonnull writable sret(%struct.NUS_binding) align 8 %12) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(40) %8, i64 40, i1 false), !tbaa.struct !12
  %.not19 = icmp eq i32 %3, 0
  br i1 %.not19, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %6
  %min.iters.check = icmp ult i32 %3, 5
  br i1 %min.iters.check, label %.lr.ph.preheader21, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.mod.vf = and i64 %9, 3
  %13 = icmp eq i64 %n.mod.vf, 0
  %14 = select i1 %13, i64 4, i64 %n.mod.vf
  %n.vec = sub nsw i64 %9, %14
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %15 = or disjoint i64 %index, 1
  %16 = or disjoint i64 %index, 2
  %17 = or disjoint i64 %index, 3
  %18 = getelementptr inbounds %struct.NUS_image_view, ptr %2, i64 %index
  %19 = getelementptr inbounds %struct.NUS_image_view, ptr %2, i64 %15
  %20 = getelementptr inbounds %struct.NUS_image_view, ptr %2, i64 %16
  %21 = getelementptr inbounds %struct.NUS_image_view, ptr %2, i64 %17
  %22 = load ptr, ptr %18, align 8, !tbaa !15
  %23 = load ptr, ptr %19, align 8, !tbaa !15
  %24 = insertelement <2 x ptr> poison, ptr %22, i64 0
  %25 = insertelement <2 x ptr> %24, ptr %23, i64 1
  %26 = load ptr, ptr %20, align 8, !tbaa !15
  %27 = load ptr, ptr %21, align 8, !tbaa !15
  %28 = insertelement <2 x ptr> poison, ptr %26, i64 0
  %29 = insertelement <2 x ptr> %28, ptr %27, i64 1
  %30 = getelementptr inbounds ptr, ptr %11, i64 %index
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  store <2 x ptr> %25, ptr %30, align 16, !tbaa !13
  store <2 x ptr> %29, ptr %31, align 16, !tbaa !13
  %index.next = add nuw i64 %index, 4
  %32 = icmp eq i64 %index.next, %n.vec
  br i1 %32, label %.lr.ph.preheader21, label %vector.body, !llvm.loop !17

.lr.ph.preheader21:                               ; preds = %vector.body, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %vector.body ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader21, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader21 ]
  %33 = getelementptr inbounds %struct.NUS_image_view, ptr %2, i64 %indvars.iv
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = getelementptr inbounds ptr, ptr %11, i64 %indvars.iv
  store ptr %34, ptr %35, align 8, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %9
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %.lr.ph, %6
  %36 = load ptr, ptr %1, align 8, !tbaa !22
  store i32 37, ptr %7, align 8, !tbaa !14
  %.sroa.21.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store ptr null, ptr %.sroa.21.0..sroa_idx, align 8, !tbaa !13
  %.sroa.3.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 16
  store i32 0, ptr %.sroa.3.0..sroa_idx, align 8, !tbaa !14
  %.sroa.42.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 24
  store ptr %36, ptr %.sroa.42.0..sroa_idx, align 8, !tbaa !13
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 32
  store i32 %3, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !14
  %.sroa.63.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 40
  store ptr %11, ptr %.sroa.63.0..sroa_idx, align 8, !tbaa !13
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 48
  store i32 %4, ptr %.sroa.7.0..sroa_idx, align 8, !tbaa !14
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 52
  store i32 %5, ptr %.sroa.8.0..sroa_idx, align 4, !tbaa !14
  %.sroa.9.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 56
  store i32 1, ptr %.sroa.9.0..sroa_idx, align 8, !tbaa !14
  %37 = load ptr, ptr @vkCreateFramebuffer, align 8, !tbaa !13
  %38 = call ptr @nus_get_bound_device() #6
  %39 = call i32 %37(ptr noundef %38, ptr noundef nonnull %7, ptr noundef null, ptr noundef %0) #6
  %.not = icmp eq i32 %39, 0
  br i1 %.not, label %42, label %40

40:                                               ; preds = %._crit_edge
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %42

42:                                               ; preds = %._crit_edge, %40
  %.0 = phi i32 [ 0, %40 ], [ 1, %._crit_edge ]
  call void @llvm.stackrestore.p0(ptr %10)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #6
  ret i32 %.0
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #2

declare void @nus_get_binding(ptr dead_on_unwind writable sret(%struct.NUS_binding) align 8) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare ptr @nus_get_bound_device() local_unnamed_addr #3

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

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

attributes #0 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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, !7, i64 0}
!6 = !{!"NUS_framebuffer", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"NUS_binding", !7, i64 0, !7, i64 8, !7, i64 16, !11, i64 24}
!11 = !{!"int", !8, i64 0}
!12 = !{i64 0, i64 8, !13, i64 8, i64 8, !13, i64 16, i64 8, !13, i64 24, i64 8, !13, i64 32, i64 4, !14}
!13 = !{!7, !7, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !7, i64 0}
!16 = !{!"NUS_image_view", !7, i64 0, !10, i64 8}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !18, !20, !19}
!22 = !{!23, !7, i64 0}
!23 = !{!"NUS_render_pass", !7, i64 0, !10, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass