; LLVM IR from asllop/AppOS :: app (main_serial)

; 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 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca [20 x i8], align 16
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca [10 x i8], align 1
  %10 = alloca [2 x i32], align 4
  %11 = alloca [1 x i32], align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [5 x i8], align 1
  %15 = alloca i64, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 20, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store ptr @.str, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  store i8 0, ptr %7, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 3, ptr %8, align 4, !tbaa !5
  call void @console_put_data(i32 noundef 27, i8 noundef signext -80, i32 noundef 2000, i32 noundef 0)
  call void @console_put_string(i8 noundef zeroext 79, ptr noundef @.str.1, i32 noundef 34, i32 noundef 1)
  %16 = load i8, ptr %7, align 1, !tbaa !11
  %17 = call i32 @serial_init(i8 noundef zeroext %16, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 9600)
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %2
  call void @core_fatal(ptr noundef @.str.2)
  br label %20

20:                                               ; preds = %19, %2
  call void @llvm.lifetime.start.p0(i64 10, ptr %9) #4
  %21 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %22 = call ptr @ansi_clear_screen(ptr noundef %21)
  %23 = load i8, ptr %7, align 1, !tbaa !11
  %24 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %25 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %26 = call i64 @strlen(ptr noundef %25) #4
  %27 = call i64 @serial_send(i8 noundef zeroext %23, ptr noundef %24, i64 noundef %26)
  %28 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %29 = call ptr @ansi_set_cursor(ptr noundef %28, i32 noundef 20, i32 noundef 10)
  %30 = load i8, ptr %7, align 1, !tbaa !11
  %31 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %32 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %33 = call i64 @strlen(ptr noundef %32) #4
  %34 = call i64 @serial_send(i8 noundef zeroext %30, ptr noundef %31, i64 noundef %33)
  %35 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  store i32 37, ptr %10, align 4, !tbaa !5
  %36 = getelementptr inbounds i32, ptr %10, i64 1
  store i32 41, ptr %36, align 4, !tbaa !5
  %37 = getelementptr inbounds [2 x i32], ptr %10, i64 0, i64 0
  %38 = call ptr @ansi_set_gfx_mode(ptr noundef %35, ptr noundef %37, i32 noundef 2)
  %39 = load i8, ptr %7, align 1, !tbaa !11
  %40 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %41 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %42 = call i64 @strlen(ptr noundef %41) #4
  %43 = call i64 @serial_send(i8 noundef zeroext %39, ptr noundef %40, i64 noundef %42)
  %44 = load i8, ptr %7, align 1, !tbaa !11
  %45 = load ptr, ptr %6, align 8, !tbaa !9
  %46 = load ptr, ptr %6, align 8, !tbaa !9
  %47 = call i64 @strlen(ptr noundef %46) #4
  %48 = call i64 @serial_send(i8 noundef zeroext %44, ptr noundef %45, i64 noundef %47)
  %49 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  store i32 0, ptr %11, align 4, !tbaa !5
  %50 = getelementptr inbounds [1 x i32], ptr %11, i64 0, i64 0
  %51 = call ptr @ansi_set_gfx_mode(ptr noundef %49, ptr noundef %50, i32 noundef 1)
  %52 = load i8, ptr %7, align 1, !tbaa !11
  %53 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %54 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %55 = call i64 @strlen(ptr noundef %54) #4
  %56 = call i64 @serial_send(i8 noundef zeroext %52, ptr noundef %53, i64 noundef %55)
  %57 = load i8, ptr %7, align 1, !tbaa !11
  %58 = load ptr, ptr %6, align 8, !tbaa !9
  %59 = load ptr, ptr %6, align 8, !tbaa !9
  %60 = call i64 @strlen(ptr noundef %59) #4
  %61 = call i64 @serial_send(i8 noundef zeroext %57, ptr noundef %58, i64 noundef %60)
  %62 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %63 = call ptr @ansi_show_cursor(ptr noundef %62)
  %64 = load i8, ptr %7, align 1, !tbaa !11
  %65 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %66 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %67 = call i64 @strlen(ptr noundef %66) #4
  %68 = call i64 @serial_send(i8 noundef zeroext %64, ptr noundef %65, i64 noundef %67)
  %69 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %70 = call ptr @ansi_report_cursor(ptr noundef %69)
  %71 = load i8, ptr %7, align 1, !tbaa !11
  %72 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %73 = getelementptr inbounds [10 x i8], ptr %9, i64 0, i64 0
  %74 = call i64 @strlen(ptr noundef %73) #4
  %75 = call i64 @serial_send(i8 noundef zeroext %71, ptr noundef %72, i64 noundef %74)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %76 = call zeroext i1 @ansi_parse_report(ptr noundef @.str.3, ptr noundef %12, ptr noundef %13)
  br i1 %76, label %77, label %86

77:                                               ; preds = %20
  %78 = load i32, ptr %12, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %81 = call ptr @itoa(i64 noundef %79, ptr noundef %80, i32 noundef 10)
  call void @console_put_string(i8 noundef zeroext 79, ptr noundef %81, i32 noundef 20, i32 noundef 4)
  %82 = load i32, ptr %13, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %85 = call ptr @itoa(i64 noundef %83, ptr noundef %84, i32 noundef 10)
  call void @console_put_string(i8 noundef zeroext 79, ptr noundef %85, i32 noundef 20, i32 noundef 5)
  br label %86

86:                                               ; preds = %77, %20
  call void @llvm.lifetime.start.p0(i64 5, ptr %14) #4
  %87 = getelementptr inbounds [5 x i8], ptr %14, i64 0, i64 0
  %88 = call i32 @core_set(ptr noundef %87, i8 noundef zeroext 0, i64 noundef 5)
  br label %89

89:                                               ; preds = %89, %86
  %90 = load i8, ptr %7, align 1, !tbaa !11
  call void @serial_wait(i8 noundef zeroext %90)
  %91 = load i32, ptr %8, align 4, !tbaa !5
  call void @console_put_string(i8 noundef zeroext 79, ptr noundef @.str.4, i32 noundef 0, i32 noundef %91)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %92 = load i8, ptr %7, align 1, !tbaa !11
  %93 = getelementptr inbounds [5 x i8], ptr %14, i64 0, i64 0
  %94 = call i64 @serial_receive(i8 noundef zeroext %92, ptr noundef %93, i64 noundef 5)
  store i64 %94, ptr %15, align 8, !tbaa !12
  %95 = load i64, ptr %15, align 8, !tbaa !12
  %96 = getelementptr inbounds [5 x i8], ptr %14, i64 0, i64 %95
  store i8 0, ptr %96, align 1, !tbaa !11
  %97 = getelementptr inbounds [5 x i8], ptr %14, i64 0, i64 0
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %8, align 4, !tbaa !5
  call void @console_put_string(i8 noundef zeroext 79, ptr noundef %97, i32 noundef 2, i32 noundef %98)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %89
}

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

declare void @console_put_data(i32 noundef, i8 noundef signext, i32 noundef, i32 noundef) #2

declare void @console_put_string(i8 noundef zeroext, ptr noundef, i32 noundef, i32 noundef) #2

declare i32 @serial_init(i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare void @core_fatal(ptr noundef) #2

declare ptr @ansi_clear_screen(ptr noundef) #2

declare i64 @serial_send(i8 noundef zeroext, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind
declare i64 @strlen(ptr noundef) #3

declare ptr @ansi_set_cursor(ptr noundef, i32 noundef, i32 noundef) #2

declare ptr @ansi_set_gfx_mode(ptr noundef, ptr noundef, i32 noundef) #2

declare ptr @ansi_show_cursor(ptr noundef) #2

declare ptr @ansi_report_cursor(ptr noundef) #2

declare zeroext i1 @ansi_parse_report(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @itoa(i64 noundef, ptr noundef, i32 noundef) #2

declare i32 @core_set(ptr noundef, i8 noundef zeroext, i64 noundef) #2

declare void @serial_wait(i8 noundef zeroext) #2

declare i64 @serial_receive(i8 noundef zeroext, ptr noundef, i64 noundef) #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 = { "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 "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}


; 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 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: noreturn nounwind uwtable
define dso_local void @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca [20 x i8], align 16
  %4 = alloca [10 x i8], align 1
  %5 = alloca [2 x i32], align 4
  %6 = alloca [1 x i32], align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [5 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %3) #4
  tail call void @console_put_data(i32 noundef 27, i8 noundef signext -80, i32 noundef 2000, i32 noundef 0) #4
  tail call void @console_put_string(i8 noundef zeroext 79, ptr noundef nonnull @.str.1, i32 noundef 34, i32 noundef 1) #4
  %10 = tail call i32 @serial_init(i8 noundef zeroext 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 9600) #4
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %12, label %11

11:                                               ; preds = %2
  tail call void @core_fatal(ptr noundef nonnull @.str.2) #4
  br label %12

12:                                               ; preds = %11, %2
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %4) #4
  %13 = call ptr @ansi_clear_screen(ptr noundef nonnull %4) #4
  %14 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #4
  %15 = call i64 @serial_send(i8 noundef zeroext 0, ptr noundef nonnull %4, i64 noundef %14) #4
  %16 = call ptr @ansi_set_cursor(ptr noundef nonnull %4, i32 noundef 20, i32 noundef 10) #4
  %17 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #4
  %18 = call i64 @serial_send(i8 noundef zeroext 0, ptr noundef nonnull %4, i64 noundef %17) #4
  store i32 37, ptr %5, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 41, ptr %19, align 4, !tbaa !5
  %20 = call ptr @ansi_set_gfx_mode(ptr noundef nonnull %4, ptr noundef nonnull %5, i32 noundef 2) #4
  %21 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #4
  %22 = call i64 @serial_send(i8 noundef zeroext 0, ptr noundef nonnull %4, i64 noundef %21) #4
  %23 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @.str) #4
  %24 = call i64 @serial_send(i8 noundef zeroext 0, ptr noundef nonnull @.str, i64 noundef %23) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  %25 = call ptr @ansi_set_gfx_mode(ptr noundef nonnull %4, ptr noundef nonnull %6, i32 noundef 1) #4
  %26 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #4
  %27 = call i64 @serial_send(i8 noundef zeroext 0, ptr noundef nonnull %4, i64 noundef %26) #4
  %28 = call i64 @serial_send(i8 noundef zeroext 0, ptr noundef nonnull @.str, i64 noundef %23) #4
  %29 = call ptr @ansi_show_cursor(ptr noundef nonnull %4) #4
  %30 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #4
  %31 = call i64 @serial_send(i8 noundef zeroext 0, ptr noundef nonnull %4, i64 noundef %30) #4
  %32 = call ptr @ansi_report_cursor(ptr noundef nonnull %4) #4
  %33 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #4
  %34 = call i64 @serial_send(i8 noundef zeroext 0, ptr noundef nonnull %4, i64 noundef %33) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %35 = call zeroext i1 @ansi_parse_report(ptr noundef nonnull @.str.3, ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  br i1 %35, label %36, label %43

36:                                               ; preds = %12
  %37 = load i32, ptr %7, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = call ptr @itoa(i64 noundef %38, ptr noundef nonnull %3, i32 noundef 10) #4
  call void @console_put_string(i8 noundef zeroext 79, ptr noundef %39, i32 noundef 20, i32 noundef 4) #4
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = call ptr @itoa(i64 noundef %41, ptr noundef nonnull %3, i32 noundef 10) #4
  call void @console_put_string(i8 noundef zeroext 79, ptr noundef %42, i32 noundef 20, i32 noundef 5) #4
  br label %43

43:                                               ; preds = %36, %12
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %9) #4
  %44 = call i32 @core_set(ptr noundef nonnull %9, i8 noundef zeroext 0, i64 noundef 5) #4
  br label %45

45:                                               ; preds = %45, %43
  %.0 = phi i32 [ 3, %43 ], [ %48, %45 ]
  call void @serial_wait(i8 noundef zeroext 0) #4
  call void @console_put_string(i8 noundef zeroext 79, ptr noundef nonnull @.str.4, i32 noundef 0, i32 noundef %.0) #4
  %46 = call i64 @serial_receive(i8 noundef zeroext 0, ptr noundef nonnull %9, i64 noundef 5) #4
  %47 = getelementptr inbounds [5 x i8], ptr %9, i64 0, i64 %46
  store i8 0, ptr %47, align 1, !tbaa !9
  %48 = add nuw nsw i32 %.0, 1
  call void @console_put_string(i8 noundef zeroext 79, ptr noundef nonnull %9, i32 noundef 2, i32 noundef %.0) #4
  br label %45
}

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

declare void @console_put_data(i32 noundef, i8 noundef signext, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @console_put_string(i8 noundef zeroext, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @serial_init(i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @core_fatal(ptr noundef) local_unnamed_addr #2

declare ptr @ansi_clear_screen(ptr noundef) local_unnamed_addr #2

declare i64 @serial_send(i8 noundef zeroext, ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

declare ptr @ansi_set_cursor(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare ptr @ansi_set_gfx_mode(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare ptr @ansi_show_cursor(ptr noundef) local_unnamed_addr #2

declare ptr @ansi_report_cursor(ptr noundef) local_unnamed_addr #2

declare zeroext i1 @ansi_parse_report(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @itoa(i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @core_set(ptr noundef, i8 noundef zeroext, i64 noundef) local_unnamed_addr #2

declare void @serial_wait(i8 noundef zeroext) local_unnamed_addr #2

declare i64 @serial_receive(i8 noundef zeroext, ptr noundef, i64 noundef) local_unnamed_addr #2

attributes #0 = { noreturn 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 = { "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 nofree nounwind willreturn memory(argmem: read) "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass