; LLVM IR from tleonhardt/practical_cryptography_engineering :: mbedtls (ssl_tls)

; 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.mbedtls_ssl_handshake_params = type { %struct.mbedtls_ssl_sig_hash_set_t, %struct.mbedtls_dhm_context, %struct.mbedtls_ecdh_context, ptr, ptr, i64, ptr, i32, ptr, ptr, ptr, i32, i32, ptr, i8, ptr, i32, i8, ptr, ptr, i32, ptr, [8 x i8], %struct.mbedtls_md5_context, %struct.mbedtls_sha1_context, %struct.mbedtls_sha256_context, %struct.mbedtls_sha512_context, ptr, ptr, ptr, ptr, i64, [64 x i8], [1060 x i8], i32, i32, i32, i32, i32, i32 }
%struct.mbedtls_ssl_sig_hash_set_t = type { i32, i32 }
%struct.mbedtls_dhm_context = type { i64, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi }
%struct.mbedtls_mpi = type { i32, i64, ptr }
%struct.mbedtls_ecdh_context = type { %struct.mbedtls_ecp_group, %struct.mbedtls_mpi, %struct.mbedtls_ecp_point, %struct.mbedtls_ecp_point, %struct.mbedtls_mpi, i32, %struct.mbedtls_ecp_point, %struct.mbedtls_ecp_point, %struct.mbedtls_mpi }
%struct.mbedtls_ecp_group = type { i32, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_ecp_point, %struct.mbedtls_mpi, i64, i64, i32, ptr, ptr, ptr, ptr, ptr, i64 }
%struct.mbedtls_ecp_point = type { %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi }
%struct.mbedtls_md5_context = type { [2 x i32], [4 x i32], [64 x i8] }
%struct.mbedtls_sha1_context = type { [2 x i32], [5 x i32], [64 x i8] }
%struct.mbedtls_sha256_context = type { [2 x i32], [8 x i32], [64 x i8], i32 }
%struct.mbedtls_sha512_context = type { [2 x i64], [8 x i64], [128 x i8], i32 }
%struct.mbedtls_ssl_key_cert = type { ptr, ptr, ptr }

; 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: nounwind uwtable
declare hidden void @mbedtls_zeroize(ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @ssl_flight_free(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @mbedtls_ssl_handshake_free(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %8

7:                                                ; preds = %1
  br label %68

8:                                                ; preds = %1
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %9, i32 0, i32 23
  call void @mbedtls_md5_free(ptr noundef %10)
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %11, i32 0, i32 24
  call void @mbedtls_sha1_free(ptr noundef %12)
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %13, i32 0, i32 25
  call void @mbedtls_sha256_free(ptr noundef %14)
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %15, i32 0, i32 26
  call void @mbedtls_sha512_free(ptr noundef %16)
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %17, i32 0, i32 1
  call void @mbedtls_dhm_free(ptr noundef %18)
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %19, i32 0, i32 2
  call void @mbedtls_ecdh_free(ptr noundef %20)
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %21, i32 0, i32 3
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  call void @free(ptr noundef %23) #4
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %24, i32 0, i32 4
  %26 = load ptr, ptr %25, align 8, !tbaa !23
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %38

28:                                               ; preds = %8
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %29, i32 0, i32 4
  %31 = load ptr, ptr %30, align 8, !tbaa !23
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %32, i32 0, i32 5
  %34 = load i64, ptr %33, align 8, !tbaa !24
  call void @mbedtls_zeroize(ptr noundef %31, i64 noundef %34)
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %35, i32 0, i32 4
  %37 = load ptr, ptr %36, align 8, !tbaa !23
  call void @free(ptr noundef %37) #4
  br label %38

38:                                               ; preds = %28, %8
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %39, i32 0, i32 8
  %41 = load ptr, ptr %40, align 8, !tbaa !25
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %57

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %44, i32 0, i32 8
  %46 = load ptr, ptr %45, align 8, !tbaa !25
  store ptr %46, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  br label %47

47:                                               ; preds = %50, %43
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %56

50:                                               ; preds = %47
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.mbedtls_ssl_key_cert, ptr %51, i32 0, i32 2
  %53 = load ptr, ptr %52, align 8, !tbaa !26
  store ptr %53, ptr %4, align 8, !tbaa !5
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %54) #4
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %55, ptr %3, align 8, !tbaa !5
  br label %47, !llvm.loop !28

56:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %57

57:                                               ; preds = %56, %38
  %58 = load ptr, ptr %2, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %58, i32 0, i32 13
  %60 = load ptr, ptr %59, align 8, !tbaa !30
  call void @free(ptr noundef %60) #4
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %61, i32 0, i32 15
  %63 = load ptr, ptr %62, align 8, !tbaa !31
  call void @free(ptr noundef %63) #4
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %64, i32 0, i32 18
  %66 = load ptr, ptr %65, align 8, !tbaa !32
  call void @ssl_flight_free(ptr noundef %66)
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  call void @mbedtls_zeroize(ptr noundef %67, i64 noundef 2712)
  br label %68

68:                                               ; preds = %57, %7
  ret void
}

declare void @mbedtls_md5_free(ptr noundef) #3

declare void @mbedtls_sha1_free(ptr noundef) #3

declare void @mbedtls_sha256_free(ptr noundef) #3

declare void @mbedtls_sha512_free(ptr noundef) #3

declare void @mbedtls_dhm_free(ptr noundef) #3

declare void @mbedtls_ecdh_free(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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, !6, i64 872}
!10 = !{!"mbedtls_ssl_handshake_params", !11, i64 0, !13, i64 8, !16, i64 256, !6, i64 872, !6, i64 880, !14, i64 888, !6, i64 896, !12, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !12, i64 936, !12, i64 940, !6, i64 944, !7, i64 952, !6, i64 960, !12, i64 968, !7, i64 972, !6, i64 976, !6, i64 984, !12, i64 992, !6, i64 1000, !7, i64 1008, !19, i64 1016, !20, i64 1104, !21, i64 1196, !22, i64 1304, !6, i64 1520, !6, i64 1528, !6, i64 1536, !6, i64 1544, !14, i64 1552, !7, i64 1560, !7, i64 1624, !12, i64 2684, !12, i64 2688, !12, i64 2692, !12, i64 2696, !12, i64 2700, !12, i64 2704}
!11 = !{!"mbedtls_ssl_sig_hash_set_t", !12, i64 0, !12, i64 4}
!12 = !{!"int", !7, i64 0}
!13 = !{!"", !14, i64 0, !15, i64 8, !15, i64 32, !15, i64 56, !15, i64 80, !15, i64 104, !15, i64 128, !15, i64 152, !15, i64 176, !15, i64 200, !15, i64 224}
!14 = !{!"long", !7, i64 0}
!15 = !{!"", !12, i64 0, !14, i64 8, !6, i64 16}
!16 = !{!"", !17, i64 0, !15, i64 248, !18, i64 272, !18, i64 344, !15, i64 416, !12, i64 440, !18, i64 448, !18, i64 520, !15, i64 592}
!17 = !{!"", !12, i64 0, !15, i64 8, !15, i64 32, !15, i64 56, !18, i64 80, !15, i64 152, !14, i64 176, !14, i64 184, !12, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !14, i64 240}
!18 = !{!"", !15, i64 0, !15, i64 24, !15, i64 48}
!19 = !{!"", !7, i64 0, !7, i64 8, !7, i64 24}
!20 = !{!"", !7, i64 0, !7, i64 8, !7, i64 28}
!21 = !{!"", !7, i64 0, !7, i64 8, !7, i64 40, !12, i64 104}
!22 = !{!"", !7, i64 0, !7, i64 16, !7, i64 80, !12, i64 208}
!23 = !{!10, !6, i64 880}
!24 = !{!10, !14, i64 888}
!25 = !{!10, !6, i64 912}
!26 = !{!27, !6, i64 16}
!27 = !{!"mbedtls_ssl_key_cert", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!10, !6, i64 944}
!31 = !{!10, !6, i64 960}
!32 = !{!10, !6, i64 976}


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

; Function Attrs: nounwind uwtable
declare hidden void @mbedtls_zeroize(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @ssl_flight_free(ptr noundef) 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: nounwind uwtable
define dso_local void @mbedtls_ssl_handshake_free(ptr noundef %0) local_unnamed_addr #0 {
  %2 = icmp eq ptr %0, null
  br i1 %2, label %29, label %3

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 1016
  tail call void @mbedtls_md5_free(ptr noundef nonnull %4) #3
  %5 = getelementptr inbounds i8, ptr %0, i64 1104
  tail call void @mbedtls_sha1_free(ptr noundef nonnull %5) #3
  %6 = getelementptr inbounds i8, ptr %0, i64 1196
  tail call void @mbedtls_sha256_free(ptr noundef nonnull %6) #3
  %7 = getelementptr inbounds i8, ptr %0, i64 1304
  tail call void @mbedtls_sha512_free(ptr noundef nonnull %7) #3
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @mbedtls_dhm_free(ptr noundef nonnull %8) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 256
  tail call void @mbedtls_ecdh_free(ptr noundef nonnull %9) #3
  %10 = getelementptr inbounds i8, ptr %0, i64 872
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  tail call void @free(ptr noundef %11) #3
  %12 = getelementptr inbounds i8, ptr %0, i64 880
  %13 = load ptr, ptr %12, align 8, !tbaa !22
  %.not = icmp eq ptr %13, null
  br i1 %.not, label %18, label %14

14:                                               ; preds = %3
  %15 = getelementptr inbounds i8, ptr %0, i64 888
  %16 = load i64, ptr %15, align 8, !tbaa !23
  tail call void @mbedtls_zeroize(ptr noundef nonnull %13, i64 noundef %16)
  %17 = load ptr, ptr %12, align 8, !tbaa !22
  tail call void @free(ptr noundef %17) #3
  br label %18

18:                                               ; preds = %14, %3
  %19 = getelementptr inbounds i8, ptr %0, i64 912
  %20 = load ptr, ptr %19, align 8, !tbaa !24
  %.not25 = icmp eq ptr %20, null
  br i1 %.not25, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %18, %.preheader
  %.027 = phi ptr [ %22, %.preheader ], [ %20, %18 ]
  %21 = getelementptr inbounds i8, ptr %.027, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !25
  tail call void @free(ptr noundef nonnull %.027) #3
  %.not26 = icmp eq ptr %22, null
  br i1 %.not26, label %.loopexit, label %.preheader, !llvm.loop !27

.loopexit:                                        ; preds = %.preheader, %18
  %23 = getelementptr inbounds i8, ptr %0, i64 944
  %24 = load ptr, ptr %23, align 8, !tbaa !29
  tail call void @free(ptr noundef %24) #3
  %25 = getelementptr inbounds i8, ptr %0, i64 960
  %26 = load ptr, ptr %25, align 8, !tbaa !30
  tail call void @free(ptr noundef %26) #3
  %27 = getelementptr inbounds i8, ptr %0, i64 976
  %28 = load ptr, ptr %27, align 8, !tbaa !31
  tail call void @ssl_flight_free(ptr noundef %28)
  tail call void @mbedtls_zeroize(ptr noundef nonnull %0, i64 noundef 2712)
  br label %29

29:                                               ; preds = %1, %.loopexit
  ret void
}

declare void @mbedtls_md5_free(ptr noundef) local_unnamed_addr #2

declare void @mbedtls_sha1_free(ptr noundef) local_unnamed_addr #2

declare void @mbedtls_sha256_free(ptr noundef) local_unnamed_addr #2

declare void @mbedtls_sha512_free(ptr noundef) local_unnamed_addr #2

declare void @mbedtls_dhm_free(ptr noundef) local_unnamed_addr #2

declare void @mbedtls_ecdh_free(ptr noundef) local_unnamed_addr #2

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 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 = { "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 }

!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, !14, i64 872}
!6 = !{!"mbedtls_ssl_handshake_params", !7, i64 0, !11, i64 8, !15, i64 256, !14, i64 872, !14, i64 880, !12, i64 888, !14, i64 896, !8, i64 904, !14, i64 912, !14, i64 920, !14, i64 928, !8, i64 936, !8, i64 940, !14, i64 944, !9, i64 952, !14, i64 960, !8, i64 968, !9, i64 972, !14, i64 976, !14, i64 984, !8, i64 992, !14, i64 1000, !9, i64 1008, !18, i64 1016, !19, i64 1104, !20, i64 1196, !21, i64 1304, !14, i64 1520, !14, i64 1528, !14, i64 1536, !14, i64 1544, !12, i64 1552, !9, i64 1560, !9, i64 1624, !8, i64 2684, !8, i64 2688, !8, i64 2692, !8, i64 2696, !8, i64 2700, !8, i64 2704}
!7 = !{!"mbedtls_ssl_sig_hash_set_t", !8, i64 0, !8, i64 4}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"", !12, i64 0, !13, i64 8, !13, i64 32, !13, i64 56, !13, i64 80, !13, i64 104, !13, i64 128, !13, i64 152, !13, i64 176, !13, i64 200, !13, i64 224}
!12 = !{!"long", !9, i64 0}
!13 = !{!"", !8, i64 0, !12, i64 8, !14, i64 16}
!14 = !{!"any pointer", !9, i64 0}
!15 = !{!"", !16, i64 0, !13, i64 248, !17, i64 272, !17, i64 344, !13, i64 416, !8, i64 440, !17, i64 448, !17, i64 520, !13, i64 592}
!16 = !{!"", !8, i64 0, !13, i64 8, !13, i64 32, !13, i64 56, !17, i64 80, !13, i64 152, !12, i64 176, !12, i64 184, !8, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224, !14, i64 232, !12, i64 240}
!17 = !{!"", !13, i64 0, !13, i64 24, !13, i64 48}
!18 = !{!"", !9, i64 0, !9, i64 8, !9, i64 24}
!19 = !{!"", !9, i64 0, !9, i64 8, !9, i64 28}
!20 = !{!"", !9, i64 0, !9, i64 8, !9, i64 40, !8, i64 104}
!21 = !{!"", !9, i64 0, !9, i64 16, !9, i64 80, !8, i64 208}
!22 = !{!6, !14, i64 880}
!23 = !{!6, !12, i64 888}
!24 = !{!6, !14, i64 912}
!25 = !{!26, !14, i64 16}
!26 = !{!"mbedtls_ssl_key_cert", !14, i64 0, !14, i64 8, !14, i64 16}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!6, !14, i64 944}
!30 = !{!6, !14, i64 960}
!31 = !{!6, !14, i64 976}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass