; LLVM IR from simonaertssen/MIT-6.172-Performance-Engineering-of-Software-Systems :: Project 1 - Bit Hacks/everybit (tests)

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

@test_verbose = external hidden global i8, align 1
@stderr = external global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @testutil_frmstr(ptr noundef) #0

; 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 memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: nounwind uwtable
declare hidden void @testutil_expect_internal(ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @testutil_rotate(i64 noundef, i64 noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @testutil_require_valid_input(i64 noundef, i64 noundef, i64 noundef, ptr noundef, i32 noundef) #0

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

; Function Attrs: nounwind
declare ptr @strtok(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @parse_and_run_tests(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  store i8 0, ptr @test_verbose, align 1, !tbaa !11
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef @.str.20, ptr noundef %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = call noalias ptr @fopen(ptr noundef %20, ptr noundef @.str.21)
  store ptr %21, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 -1, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  store i8 0, ptr %10, align 1, !tbaa !11
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %27

24:                                               ; preds = %2
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.22) #6
  store i32 1, ptr %11, align 4
  br label %109

27:                                               ; preds = %2
  br label %28

28:                                               ; preds = %103, %101, %27
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call i64 @getline(ptr noundef %6, ptr noundef %7, ptr noundef %29)
  %31 = icmp ne i64 %30, -1
  br i1 %31, label %32, label %104

32:                                               ; preds = %28
  %33 = load i32, ptr %9, align 4, !tbaa !9
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = call ptr @strtok(ptr noundef %35, ptr noundef @.str.19) #6
  store ptr %36, ptr %12, align 8, !tbaa !5
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 0
  %39 = load i8, ptr %38, align 1, !tbaa !15
  %40 = sext i8 %39 to i32
  switch i32 %40, label %96 [
    i32 10, label %41
    i32 35, label %41
    i32 116, label %42
    i32 110, label %62
    i32 101, label %68
    i32 114, label %77
  ]

41:                                               ; preds = %32, %32
  store i32 2, ptr %11, align 4
  br label %101, !llvm.loop !16

42:                                               ; preds = %32
  %43 = call ptr @strtok(ptr noundef null, ptr noundef @.str.19) #6
  %44 = call i64 @atol(ptr noundef %43) #7
  %45 = trunc i64 %44 to i32
  store i32 %45, ptr %8, align 4, !tbaa !9
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = load i32, ptr %4, align 4, !tbaa !9
  %48 = icmp eq i32 %46, %47
  br i1 %48, label %52, label %49

49:                                               ; preds = %42
  %50 = load i32, ptr %4, align 4, !tbaa !9
  %51 = icmp eq i32 %50, -1
  br label %52

52:                                               ; preds = %49, %42
  %53 = phi i1 [ true, %42 ], [ %51, %49 ]
  %54 = zext i1 %53 to i8
  store i8 %54, ptr %10, align 1, !tbaa !11
  %55 = load i8, ptr %10, align 1, !tbaa !11, !range !18, !noundef !19
  %56 = trunc i8 %55 to i1
  br i1 %56, label %58, label %57

57:                                               ; preds = %52
  store i32 2, ptr %11, align 4
  br label %101, !llvm.loop !16

58:                                               ; preds = %52
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef @.str.23, i32 noundef %60) #6
  br label %100

62:                                               ; preds = %32
  %63 = load i8, ptr %10, align 1, !tbaa !11, !range !18, !noundef !19
  %64 = trunc i8 %63 to i1
  br i1 %64, label %66, label %65

65:                                               ; preds = %62
  store i32 2, ptr %11, align 4
  br label %101, !llvm.loop !16

66:                                               ; preds = %62
  %67 = call ptr @next_arg_char()
  call void @testutil_frmstr(ptr noundef %67)
  br label %100

68:                                               ; preds = %32
  %69 = load i8, ptr %10, align 1, !tbaa !11, !range !18, !noundef !19
  %70 = trunc i8 %69 to i1
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  store i32 2, ptr %11, align 4
  br label %101, !llvm.loop !16

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %73 = call ptr @next_arg_char()
  store ptr %73, ptr %13, align 8, !tbaa !5
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = load i32, ptr %9, align 4, !tbaa !9
  call void @testutil_expect_internal(ptr noundef %74, ptr noundef %75, i32 noundef %76)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %100

77:                                               ; preds = %32
  %78 = load i8, ptr %10, align 1, !tbaa !11, !range !18, !noundef !19
  %79 = trunc i8 %78 to i1
  br i1 %79, label %81, label %80

80:                                               ; preds = %77
  store i32 2, ptr %11, align 4
  br label %101, !llvm.loop !16

81:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %82 = call ptr @strtok(ptr noundef null, ptr noundef @.str.19) #6
  %83 = call i64 @atol(ptr noundef %82) #7
  store i64 %83, ptr %14, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %84 = call ptr @strtok(ptr noundef null, ptr noundef @.str.19) #6
  %85 = call i64 @atol(ptr noundef %84) #7
  store i64 %85, ptr %15, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %86 = call ptr @strtok(ptr noundef null, ptr noundef @.str.19) #6
  %87 = call i64 @atol(ptr noundef %86) #7
  store i64 %87, ptr %16, align 8, !tbaa !13
  %88 = load i64, ptr %14, align 8, !tbaa !13
  %89 = load i64, ptr %15, align 8, !tbaa !13
  %90 = load i64, ptr %16, align 8, !tbaa !13
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = load i32, ptr %9, align 4, !tbaa !9
  call void @testutil_require_valid_input(i64 noundef %88, i64 noundef %89, i64 noundef %90, ptr noundef %91, i32 noundef %92)
  %93 = load i64, ptr %14, align 8, !tbaa !13
  %94 = load i64, ptr %15, align 8, !tbaa !13
  %95 = load i64, ptr %16, align 8, !tbaa !13
  call void @testutil_rotate(i64 noundef %93, i64 noundef %94, i64 noundef %95)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %100

96:                                               ; preds = %32
  %97 = load ptr, ptr @stderr, align 8, !tbaa !5
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str.24, ptr noundef %98) #6
  br label %100

100:                                              ; preds = %96, %81, %72, %66, %58
  store i32 0, ptr %11, align 4
  br label %101

101:                                              ; preds = %100, %80, %71, %65, %57, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %102 = load i32, ptr %11, align 4
  switch i32 %102, label %112 [
    i32 0, label %103
    i32 2, label %28
  ]

103:                                              ; preds = %101
  br label %28, !llvm.loop !16

104:                                              ; preds = %28
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %105) #6
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef @.str.25, ptr noundef %107) #6
  store i32 0, ptr %11, align 4
  br label %109

109:                                              ; preds = %104, %24
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  %110 = load i32, ptr %11, align 4
  switch i32 %110, label %112 [
    i32 0, label %111
    i32 1, label %111
  ]

111:                                              ; preds = %109, %109
  ret void

112:                                              ; preds = %109, %101
  unreachable
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare i64 @getline(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr noundef nonnull) #5

; Function Attrs: nounwind
declare void @free(ptr noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint 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 #5 = { inlinehint nounwind willreturn memory(read) 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{i8 0, i8 2}
!19 = !{}


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

@test_verbose = external hidden local_unnamed_addr global i8, align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @testutil_frmstr(ptr noundef) local_unnamed_addr #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 memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @testutil_rotate(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @testutil_require_valid_input(i64 noundef, i64 noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nofree nounwind willreturn
declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @parse_and_run_tests(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  store i8 0, ptr @test_verbose, align 1, !tbaa !5
  %5 = load ptr, ptr @stderr, align 8, !tbaa !9
  %6 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str.20, ptr noundef %0) #7
  %7 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.21)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store ptr null, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store i64 0, ptr %4, align 8, !tbaa !11
  %8 = icmp eq ptr %7, null
  br i1 %8, label %11, label %.preheader

.preheader:                                       ; preds = %2
  %9 = call i64 @getline(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %7)
  %.not26 = icmp eq i64 %9, -1
  br i1 %.not26, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %10 = icmp eq i32 %1, -1
  br label %14

11:                                               ; preds = %2
  %12 = load ptr, ptr @stderr, align 8, !tbaa !9
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.22) #7
  br label %54

14:                                               ; preds = %.lr.ph, %49
  %.028 = phi i32 [ 0, %.lr.ph ], [ %15, %49 ]
  %.02527 = phi i8 [ 0, %.lr.ph ], [ %.2, %49 ]
  %15 = add nuw nsw i32 %.028, 1
  %16 = load ptr, ptr %3, align 8, !tbaa !9
  %17 = call ptr @strtok(ptr noundef %16, ptr noundef nonnull @.str.19) #8
  %18 = load i8, ptr %17, align 1, !tbaa !13
  switch i8 %18, label %45 [
    i8 10, label %49
    i8 35, label %49
    i8 116, label %19
    i8 110, label %28
    i8 101, label %32
    i8 114, label %36
  ], !llvm.loop !14

19:                                               ; preds = %14
  %20 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.19) #8
  %21 = call i64 @atol(ptr nocapture noundef %20) #9
  %22 = trunc i64 %21 to i32
  %23 = icmp eq i32 %22, %1
  %24 = or i1 %10, %23
  br i1 %24, label %25, label %49, !llvm.loop !14

25:                                               ; preds = %19
  %26 = load ptr, ptr @stderr, align 8, !tbaa !9
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str.23, i32 noundef %22) #7
  br label %49

28:                                               ; preds = %14
  %29 = trunc nuw i8 %.02527 to i1
  br i1 %29, label %30, label %49, !llvm.loop !14

30:                                               ; preds = %28
  %31 = call ptr @next_arg_char()
  call void @testutil_frmstr(ptr noundef %31)
  br label %49

32:                                               ; preds = %14
  %33 = trunc nuw i8 %.02527 to i1
  br i1 %33, label %34, label %49, !llvm.loop !14

34:                                               ; preds = %32
  %35 = call ptr @next_arg_char()
  call void @testutil_expect_internal(ptr noundef %35, ptr noundef %0, i32 noundef %15)
  br label %49

36:                                               ; preds = %14
  %37 = trunc nuw i8 %.02527 to i1
  br i1 %37, label %38, label %49, !llvm.loop !14

38:                                               ; preds = %36
  %39 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.19) #8
  %40 = call i64 @atol(ptr nocapture noundef %39) #9
  %41 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.19) #8
  %42 = call i64 @atol(ptr nocapture noundef %41) #9
  %43 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.19) #8
  %44 = call i64 @atol(ptr nocapture noundef %43) #9
  call void @testutil_require_valid_input(i64 noundef %40, i64 noundef %42, i64 noundef %44, ptr noundef %0, i32 noundef %15)
  call void @testutil_rotate(i64 noundef %40, i64 noundef %42, i64 noundef %44)
  br label %49

45:                                               ; preds = %14
  %46 = load ptr, ptr @stderr, align 8, !tbaa !9
  %47 = load ptr, ptr %3, align 8, !tbaa !9
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.24, ptr noundef %47) #7
  br label %49

49:                                               ; preds = %25, %30, %34, %38, %45, %36, %32, %28, %19, %14, %14
  %.2 = phi i8 [ %.02527, %14 ], [ %.02527, %14 ], [ 0, %19 ], [ %.02527, %28 ], [ %.02527, %32 ], [ %.02527, %36 ], [ %.02527, %45 ], [ %.02527, %38 ], [ %.02527, %34 ], [ %.02527, %30 ], [ 1, %25 ]
  %50 = call i64 @getline(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %7)
  %.not = icmp eq i64 %50, -1
  br i1 %.not, label %._crit_edge, label %14

._crit_edge:                                      ; preds = %49, %.preheader
  %51 = load ptr, ptr %3, align 8, !tbaa !9
  call void @free(ptr noundef %51) #8
  %52 = load ptr, ptr @stderr, align 8, !tbaa !9
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.25, ptr noundef %0) #7
  br label %54

54:                                               ; preds = %._crit_edge, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret void
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare i64 @getline(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr nocapture noundef nonnull) local_unnamed_addr #5

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

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 = { 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 #3 = { mustprogress nofree nounwind willreturn "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 = { inlinehint 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 #5 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 #6 = { 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 #7 = { cold nounwind }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

!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 = !{!"_Bool", !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 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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