; LLVM IR from tezc/sc :: logger (log_test)

; 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.2 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [8 x i8], align 1
@__PRETTY_FUNCTION__.test2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [30 x i8], align 1

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

declare i32 @sc_log_term() #1

declare i32 @sc_log_init() #1

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

declare i32 @sc_log_log(i32 noundef, ptr noundef, ...) #1

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strrchr(ptr noundef, i32 noundef) #3

declare i32 @sc_log_set_file(ptr noundef, ptr noundef) #1

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

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

declare i32 @fclose(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @test2() #4 {
  %1 = alloca i32, align 4
  %2 = alloca [256 x i8], align 16
  %3 = alloca [257 x i8], align 16
  %4 = alloca [200 x i8], align 16
  %5 = alloca [1024 x i8], align 16
  %6 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 256, ptr %2) #6
  call void @llvm.memset.p0.i64(ptr align 16 %2, i8 0, i64 256, i1 false)
  call void @llvm.lifetime.start.p0(i64 257, ptr %3) #6
  call void @llvm.memset.p0.i64(ptr align 16 %3, i8 0, i64 257, i1 false)
  call void @llvm.lifetime.start.p0(i64 200, ptr %4) #6
  call void @llvm.memset.p0.i64(ptr align 16 %4, i8 0, i64 200, i1 false)
  %7 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 97, i64 255, i1 false)
  %8 = getelementptr inbounds [257 x i8], ptr %3, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 98, i64 256, i1 false)
  %9 = getelementptr inbounds [200 x i8], ptr %4, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 99, i64 199, i1 false)
  %10 = call i32 @sc_log_init()
  %11 = call i32 @sc_log_set_file(ptr noundef @.str.31, ptr noundef @.str.32)
  %12 = call ptr @strrchr(ptr noundef @.str.8, i32 noundef 47) #7
  %13 = getelementptr inbounds i8, ptr %12, i64 1
  %14 = call i32 (i32, ptr, ...) @sc_log_log(i32 noundef 1, ptr noundef @.str.33, ptr noundef %13, i32 noundef 125, ptr noundef @.str.9)
  %15 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %16 = getelementptr inbounds [200 x i8], ptr %4, i64 0, i64 0
  %17 = call i32 @sc_log_set_file(ptr noundef %15, ptr noundef %16)
  store i32 %17, ptr %1, align 4, !tbaa !5
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %21

20:                                               ; preds = %0
  br label %22

21:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.2, i32 noundef 128, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

22:                                               ; preds = %20
  %23 = call ptr @strrchr(ptr noundef @.str.8, i32 noundef 47) #7
  %24 = getelementptr inbounds i8, ptr %23, i64 1
  %25 = call i32 (i32, ptr, ...) @sc_log_log(i32 noundef 1, ptr noundef @.str.35, ptr noundef %24, i32 noundef 129, ptr noundef @.str.9)
  %26 = call i32 @sc_log_set_file(ptr noundef @.str.31, ptr noundef @.str.32)
  store i32 %26, ptr %1, align 4, !tbaa !5
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %22
  br label %31

30:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str.2, i32 noundef 132, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

31:                                               ; preds = %29
  %32 = call ptr @strrchr(ptr noundef @.str.8, i32 noundef 47) #7
  %33 = getelementptr inbounds i8, ptr %32, i64 1
  %34 = call i32 (i32, ptr, ...) @sc_log_log(i32 noundef 1, ptr noundef @.str.37, ptr noundef %33, i32 noundef 133, ptr noundef @.str.9)
  %35 = getelementptr inbounds [200 x i8], ptr %4, i64 0, i64 0
  %36 = getelementptr inbounds [256 x i8], ptr %2, i64 0, i64 0
  %37 = call i32 @sc_log_set_file(ptr noundef %35, ptr noundef %36)
  store i32 %37, ptr %1, align 4, !tbaa !5
  %38 = load i32, ptr %1, align 4, !tbaa !5
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %31
  br label %42

41:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.2, i32 noundef 136, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

42:                                               ; preds = %40
  %43 = call ptr @strrchr(ptr noundef @.str.8, i32 noundef 47) #7
  %44 = getelementptr inbounds i8, ptr %43, i64 1
  %45 = call i32 (i32, ptr, ...) @sc_log_log(i32 noundef 1, ptr noundef @.str.38, ptr noundef %44, i32 noundef 137, ptr noundef @.str.9)
  %46 = call i32 @sc_log_set_file(ptr noundef @.str.31, ptr noundef @.str.32)
  store i32 %46, ptr %1, align 4, !tbaa !5
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %42
  br label %51

50:                                               ; preds = %42
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str.2, i32 noundef 140, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

51:                                               ; preds = %49
  %52 = call ptr @strrchr(ptr noundef @.str.8, i32 noundef 47) #7
  %53 = getelementptr inbounds i8, ptr %52, i64 1
  %54 = call i32 (i32, ptr, ...) @sc_log_log(i32 noundef 1, ptr noundef @.str.39, ptr noundef %53, i32 noundef 141, ptr noundef @.str.9)
  %55 = call i32 @sc_log_term()
  store i32 %55, ptr %1, align 4, !tbaa !5
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %51
  br label %60

59:                                               ; preds = %51
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str.2, i32 noundef 144, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 1024, ptr %5) #6
  call void @llvm.memset.p0.i64(ptr align 16 %5, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %61 = call noalias ptr @fopen(ptr noundef @.str.32, ptr noundef @.str.27)
  store ptr %61, ptr %6, align 8, !tbaa !9
  %62 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %63 = load ptr, ptr %6, align 8, !tbaa !9
  %64 = call i64 @fread(ptr noundef %62, i64 noundef 1024, i64 noundef 1, ptr noundef %63)
  %65 = load ptr, ptr %6, align 8, !tbaa !9
  %66 = call i32 @fclose(ptr noundef %65)
  %67 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %68 = call ptr @strstr(ptr noundef %67, ptr noundef @.str.40) #7
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %71

70:                                               ; preds = %60
  br label %72

71:                                               ; preds = %60
  call void @__assert_fail(ptr noundef @.str.41, ptr noundef @.str.2, i32 noundef 151, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

72:                                               ; preds = %70
  %73 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %74 = call ptr @strstr(ptr noundef %73, ptr noundef @.str.42) #7
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %77

76:                                               ; preds = %72
  br label %78

77:                                               ; preds = %72
  call void @__assert_fail(ptr noundef @.str.43, ptr noundef @.str.2, i32 noundef 152, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

78:                                               ; preds = %76
  %79 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %80 = call ptr @strstr(ptr noundef %79, ptr noundef @.str.44) #7
  %81 = icmp ne ptr %80, null
  br i1 %81, label %82, label %83

82:                                               ; preds = %78
  br label %84

83:                                               ; preds = %78
  call void @__assert_fail(ptr noundef @.str.45, ptr noundef @.str.2, i32 noundef 153, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

84:                                               ; preds = %82
  %85 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %86 = call ptr @strstr(ptr noundef %85, ptr noundef @.str.46) #7
  %87 = icmp eq ptr %86, null
  br i1 %87, label %88, label %89

88:                                               ; preds = %84
  br label %90

89:                                               ; preds = %84
  call void @__assert_fail(ptr noundef @.str.47, ptr noundef @.str.2, i32 noundef 154, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

90:                                               ; preds = %88
  %91 = getelementptr inbounds [1024 x i8], ptr %5, i64 0, i64 0
  %92 = call ptr @strstr(ptr noundef %91, ptr noundef @.str.48) #7
  %93 = icmp eq ptr %92, null
  br i1 %93, label %94, label %95

94:                                               ; preds = %90
  br label %96

95:                                               ; preds = %90
  call void @__assert_fail(ptr noundef @.str.49, ptr noundef @.str.2, i32 noundef 155, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

96:                                               ; preds = %94
  %97 = call i32 @sc_log_init()
  %98 = getelementptr inbounds [257 x i8], ptr %3, i64 0, i64 0
  %99 = getelementptr inbounds [200 x i8], ptr %4, i64 0, i64 0
  %100 = call i32 @sc_log_set_file(ptr noundef %98, ptr noundef %99)
  store i32 %100, ptr %1, align 4, !tbaa !5
  %101 = load i32, ptr %1, align 4, !tbaa !5
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %96
  br label %105

104:                                              ; preds = %96
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.2, i32 noundef 159, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

105:                                              ; preds = %103
  %106 = getelementptr inbounds [200 x i8], ptr %4, i64 0, i64 0
  %107 = getelementptr inbounds [257 x i8], ptr %3, i64 0, i64 0
  %108 = call i32 @sc_log_set_file(ptr noundef %106, ptr noundef %107)
  store i32 %108, ptr %1, align 4, !tbaa !5
  %109 = load i32, ptr %1, align 4, !tbaa !5
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %112

111:                                              ; preds = %105
  br label %113

112:                                              ; preds = %105
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.2, i32 noundef 161, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

113:                                              ; preds = %111
  %114 = call i32 @sc_log_term()
  store i32 %114, ptr %1, align 4, !tbaa !5
  %115 = load i32, ptr %1, align 4, !tbaa !5
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %118

117:                                              ; preds = %113
  br label %119

118:                                              ; preds = %113
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str.2, i32 noundef 163, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

119:                                              ; preds = %117
  %120 = call i32 @sc_log_term()
  store i32 %120, ptr %1, align 4, !tbaa !5
  %121 = load i32, ptr %1, align 4, !tbaa !5
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %119
  br label %125

124:                                              ; preds = %119
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.2, i32 noundef 165, ptr noundef @__PRETTY_FUNCTION__.test2) #8
  unreachable

125:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 257, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strstr(ptr noundef, ptr noundef) #3

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


; 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.2 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [8 x i8], align 1
@__PRETTY_FUNCTION__.test2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [30 x i8], align 1

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

declare i32 @sc_log_term() local_unnamed_addr #1

declare i32 @sc_log_init() local_unnamed_addr #1

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

declare i32 @sc_log_log(i32 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strrchr(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @sc_log_set_file(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @test2() local_unnamed_addr #5 {
  %1 = alloca [256 x i8], align 16
  %2 = alloca [257 x i8], align 16
  %3 = alloca [200 x i8], align 16
  %4 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %1) #7
  %5 = getelementptr inbounds i8, ptr %1, i64 240
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %5, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 257, ptr nonnull %2) #7
  %6 = getelementptr inbounds i8, ptr %2, i64 256
  store i8 0, ptr %6, align 16
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %3) #7
  %7 = getelementptr inbounds i8, ptr %3, i64 192
  store i64 0, ptr %7, align 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(255) %1, i8 97, i64 255, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %2, i8 98, i64 256, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(199) %3, i8 99, i64 199, i1 false)
  %8 = tail call i32 @sc_log_init() #7
  %9 = tail call i32 @sc_log_set_file(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.32) #7
  %10 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef 47) #8
  %11 = getelementptr inbounds i8, ptr %10, i64 1
  %12 = tail call i32 (i32, ptr, ...) @sc_log_log(i32 noundef 1, ptr noundef nonnull @.str.33, ptr noundef nonnull %11, i32 noundef 125, ptr noundef nonnull @.str.9) #7
  %13 = call i32 @sc_log_set_file(ptr noundef nonnull %1, ptr noundef nonnull %3) #7
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %14, label %15

14:                                               ; preds = %0
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.2, i32 noundef 128, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

15:                                               ; preds = %0
  %16 = call i32 (i32, ptr, ...) @sc_log_log(i32 noundef 1, ptr noundef nonnull @.str.35, ptr noundef nonnull %11, i32 noundef 129, ptr noundef nonnull @.str.9) #7
  %17 = call i32 @sc_log_set_file(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.32) #7
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str.2, i32 noundef 132, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

20:                                               ; preds = %15
  %21 = call i32 (i32, ptr, ...) @sc_log_log(i32 noundef 1, ptr noundef nonnull @.str.37, ptr noundef nonnull %11, i32 noundef 133, ptr noundef nonnull @.str.9) #7
  %22 = call i32 @sc_log_set_file(ptr noundef nonnull %3, ptr noundef nonnull %1) #7
  %.not10 = icmp eq i32 %22, 0
  br i1 %.not10, label %23, label %24

23:                                               ; preds = %20
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.2, i32 noundef 136, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

24:                                               ; preds = %20
  %25 = call i32 (i32, ptr, ...) @sc_log_log(i32 noundef 1, ptr noundef nonnull @.str.38, ptr noundef nonnull %11, i32 noundef 137, ptr noundef nonnull @.str.9) #7
  %26 = call i32 @sc_log_set_file(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.32) #7
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str.2, i32 noundef 140, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

29:                                               ; preds = %24
  %30 = call i32 (i32, ptr, ...) @sc_log_log(i32 noundef 1, ptr noundef nonnull @.str.39, ptr noundef nonnull %11, i32 noundef 141, ptr noundef nonnull @.str.9) #7
  %31 = call i32 @sc_log_term() #7
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str.2, i32 noundef 144, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %4, i8 0, i64 1024, i1 false)
  %35 = call noalias ptr @fopen(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.27)
  %36 = call i64 @fread(ptr noundef nonnull %4, i64 noundef 1024, i64 noundef 1, ptr noundef %35)
  %37 = call i32 @fclose(ptr noundef %35)
  %38 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.40) #8
  %.not11 = icmp eq ptr %38, null
  br i1 %.not11, label %39, label %40

39:                                               ; preds = %34
  call void @__assert_fail(ptr noundef nonnull @.str.41, ptr noundef nonnull @.str.2, i32 noundef 151, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

40:                                               ; preds = %34
  %41 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.42) #8
  %.not12 = icmp eq ptr %41, null
  br i1 %.not12, label %42, label %43

42:                                               ; preds = %40
  call void @__assert_fail(ptr noundef nonnull @.str.43, ptr noundef nonnull @.str.2, i32 noundef 152, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

43:                                               ; preds = %40
  %44 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.44) #8
  %.not13 = icmp eq ptr %44, null
  br i1 %.not13, label %45, label %46

45:                                               ; preds = %43
  call void @__assert_fail(ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.2, i32 noundef 153, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

46:                                               ; preds = %43
  %47 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.46) #8
  %48 = icmp eq ptr %47, null
  br i1 %48, label %50, label %49

49:                                               ; preds = %46
  call void @__assert_fail(ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.2, i32 noundef 154, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

50:                                               ; preds = %46
  %51 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.48) #8
  %52 = icmp eq ptr %51, null
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  call void @__assert_fail(ptr noundef nonnull @.str.49, ptr noundef nonnull @.str.2, i32 noundef 155, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

54:                                               ; preds = %50
  %55 = call i32 @sc_log_init() #7
  %56 = call i32 @sc_log_set_file(ptr noundef nonnull %2, ptr noundef nonnull %3) #7
  %.not14 = icmp eq i32 %56, 0
  br i1 %.not14, label %57, label %58

57:                                               ; preds = %54
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.2, i32 noundef 159, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

58:                                               ; preds = %54
  %59 = call i32 @sc_log_set_file(ptr noundef nonnull %3, ptr noundef nonnull %2) #7
  %.not15 = icmp eq i32 %59, 0
  br i1 %.not15, label %60, label %61

60:                                               ; preds = %58
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.2, i32 noundef 161, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

61:                                               ; preds = %58
  %62 = call i32 @sc_log_term() #7
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str.2, i32 noundef 163, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

65:                                               ; preds = %61
  %66 = call i32 @sc_log_term() #7
  %.not16 = icmp eq i32 %66, 0
  br i1 %.not16, label %67, label %68

67:                                               ; preds = %65
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.2, i32 noundef 165, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #9
  unreachable

68:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 257, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %1) #7
  ret void
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #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 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn 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)"}


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