; LLVM IR from jim-b/ECCSI-SAKKE :: src/utils (utils)

; 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.1 = external hidden unnamed_addr constant [6 x i8], align 1
@stdout = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [2 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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @utils_printUserId(i8 noundef zeroext %0, ptr noundef %1, ptr noundef %2, i8 noundef zeroext %3, ptr noundef %4, i64 noundef %5) #4 {
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca [512 x i8], align 16
  %15 = alloca i32, align 4
  %16 = alloca [1200 x i8], align 16
  %17 = alloca [1200 x i8], align 16
  %18 = alloca [1200 x i8], align 16
  %19 = alloca [1200 x i8], align 16
  %20 = alloca [1200 x i8], align 16
  %21 = alloca [1200 x i8], align 16
  %22 = alloca [1200 x i8], align 16
  %23 = alloca [1200 x i8], align 16
  %24 = alloca [1200 x i8], align 16
  %25 = alloca [1200 x i8], align 16
  store i8 %0, ptr %7, align 1, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !8
  store ptr %2, ptr %9, align 8, !tbaa !8
  store i8 %3, ptr %10, align 1, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !8
  store i64 %5, ptr %12, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 512, ptr %14) #5
  %26 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %26, i8 0, i64 512, i1 false)
  %27 = load ptr, ptr %11, align 8, !tbaa !8
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %6
  store i32 1, ptr %15, align 4
  br label %174

30:                                               ; preds = %6
  %31 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  %32 = load ptr, ptr %8, align 8, !tbaa !8
  %33 = call ptr @strcpy(ptr noundef %31, ptr noundef %32) #5
  %34 = load ptr, ptr %9, align 8, !tbaa !8
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %86

36:                                               ; preds = %30
  %37 = load i8, ptr %7, align 1, !tbaa !5
  %38 = zext i8 %37 to i32
  switch i32 %38, label %79 [
    i32 1, label %39
    i32 2, label %49
    i32 3, label %59
    i32 4, label %69
  ]

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1200, ptr %16) #5
  %40 = getelementptr inbounds [1200 x i8], ptr %16, i64 0, i64 0
  %41 = load ptr, ptr %8, align 8, !tbaa !8
  %42 = load i8, ptr %10, align 1, !tbaa !5
  %43 = zext i8 %42 to i32
  %44 = load ptr, ptr %9, align 8, !tbaa !8
  %45 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %40, i64 noundef 1200, ptr noundef @.str.1, ptr noundef %41, i32 noundef %43, ptr noundef %44) #5
  %46 = load ptr, ptr @stdout, align 8, !tbaa !8
  %47 = getelementptr inbounds [1200 x i8], ptr %16, i64 0, i64 0
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.2, ptr noundef %47) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %16) #5
  br label %85

49:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1200, ptr %17) #5
  %50 = getelementptr inbounds [1200 x i8], ptr %17, i64 0, i64 0
  %51 = load ptr, ptr %8, align 8, !tbaa !8
  %52 = load i8, ptr %10, align 1, !tbaa !5
  %53 = zext i8 %52 to i32
  %54 = load ptr, ptr %9, align 8, !tbaa !8
  %55 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %50, i64 noundef 1200, ptr noundef @.str.1, ptr noundef %51, i32 noundef %53, ptr noundef %54) #5
  %56 = load ptr, ptr @stdout, align 8, !tbaa !8
  %57 = getelementptr inbounds [1200 x i8], ptr %17, i64 0, i64 0
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef @.str.3, ptr noundef %57) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %17) #5
  br label %85

59:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1200, ptr %18) #5
  %60 = getelementptr inbounds [1200 x i8], ptr %18, i64 0, i64 0
  %61 = load ptr, ptr %8, align 8, !tbaa !8
  %62 = load i8, ptr %10, align 1, !tbaa !5
  %63 = zext i8 %62 to i32
  %64 = load ptr, ptr %9, align 8, !tbaa !8
  %65 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %60, i64 noundef 1200, ptr noundef @.str.1, ptr noundef %61, i32 noundef %63, ptr noundef %64) #5
  %66 = load ptr, ptr @stdout, align 8, !tbaa !8
  %67 = getelementptr inbounds [1200 x i8], ptr %18, i64 0, i64 0
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.4, ptr noundef %67) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %18) #5
  br label %85

69:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1200, ptr %19) #5
  %70 = getelementptr inbounds [1200 x i8], ptr %19, i64 0, i64 0
  %71 = load ptr, ptr %8, align 8, !tbaa !8
  %72 = load i8, ptr %10, align 1, !tbaa !5
  %73 = zext i8 %72 to i32
  %74 = load ptr, ptr %9, align 8, !tbaa !8
  %75 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %70, i64 noundef 1200, ptr noundef @.str.1, ptr noundef %71, i32 noundef %73, ptr noundef %74) #5
  %76 = load ptr, ptr @stdout, align 8, !tbaa !8
  %77 = getelementptr inbounds [1200 x i8], ptr %19, i64 0, i64 0
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef @.str.5, ptr noundef %77) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %19) #5
  br label %85

79:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1200, ptr %20) #5
  %80 = getelementptr inbounds [1200 x i8], ptr %20, i64 0, i64 0
  %81 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %80, i64 noundef 1200, ptr noundef @.str.9, ptr noundef @.str.20) #5
  %82 = load ptr, ptr @stdout, align 8, !tbaa !8
  %83 = getelementptr inbounds [1200 x i8], ptr %20, i64 0, i64 0
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef @.str.2, ptr noundef %83) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %20) #5
  store i32 1, ptr %15, align 4
  br label %174

85:                                               ; preds = %69, %59, %49, %39
  br label %86

86:                                               ; preds = %85, %30
  %87 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %87, i8 0, i64 512, i1 false)
  %88 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  %89 = load ptr, ptr %8, align 8, !tbaa !8
  %90 = call ptr @strcpy(ptr noundef %88, ptr noundef %89) #5
  %91 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  %92 = call i64 @strlen(ptr noundef %91) #6
  %93 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 %92
  %94 = load i8, ptr %10, align 1, !tbaa !5
  %95 = zext i8 %94 to i32
  %96 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %93, ptr noundef @.str.21, i32 noundef %95, ptr noundef @.str.8) #5
  store i32 0, ptr %13, align 4, !tbaa !12
  br label %97

97:                                               ; preds = %127, %86
  %98 = load i32, ptr %13, align 4, !tbaa !12
  %99 = zext i32 %98 to i64
  %100 = load i64, ptr %12, align 8, !tbaa !10
  %101 = icmp ult i64 %99, %100
  br i1 %101, label %102, label %130

102:                                              ; preds = %97
  %103 = load ptr, ptr %11, align 8, !tbaa !8
  %104 = load i32, ptr %13, align 4, !tbaa !12
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds i8, ptr %103, i64 %105
  %107 = load i8, ptr %106, align 1, !tbaa !5
  %108 = zext i8 %107 to i32
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %115

110:                                              ; preds = %102
  %111 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  %112 = call i64 @strlen(ptr noundef %111) #6
  %113 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 %112
  %114 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %113, ptr noundef @.str.25) #5
  br label %126

115:                                              ; preds = %102
  %116 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  %117 = call i64 @strlen(ptr noundef %116) #6
  %118 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 %117
  %119 = load ptr, ptr %11, align 8, !tbaa !8
  %120 = load i32, ptr %13, align 4, !tbaa !12
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds i8, ptr %119, i64 %121
  %123 = load i8, ptr %122, align 1, !tbaa !5
  %124 = zext i8 %123 to i32
  %125 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %118, ptr noundef @.str.15, i32 noundef %124) #5
  br label %126

126:                                              ; preds = %115, %110
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %13, align 4, !tbaa !12
  %129 = add i32 %128, 1
  store i32 %129, ptr %13, align 4, !tbaa !12
  br label %97, !llvm.loop !14

130:                                              ; preds = %97
  %131 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  %132 = load i8, ptr %131, align 16, !tbaa !5
  %133 = sext i8 %132 to i32
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %173

135:                                              ; preds = %130
  %136 = load i8, ptr %7, align 1, !tbaa !5
  %137 = zext i8 %136 to i32
  switch i32 %137, label %166 [
    i32 1, label %138
    i32 2, label %145
    i32 3, label %152
    i32 4, label %159
  ]

138:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 1200, ptr %21) #5
  %139 = getelementptr inbounds [1200 x i8], ptr %21, i64 0, i64 0
  %140 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  %141 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %139, i64 noundef 1200, ptr noundef @.str.9, ptr noundef %140) #5
  %142 = load ptr, ptr @stdout, align 8, !tbaa !8
  %143 = getelementptr inbounds [1200 x i8], ptr %21, i64 0, i64 0
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef @.str.2, ptr noundef %143) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %21) #5
  br label %172

145:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 1200, ptr %22) #5
  %146 = getelementptr inbounds [1200 x i8], ptr %22, i64 0, i64 0
  %147 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  %148 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %146, i64 noundef 1200, ptr noundef @.str.9, ptr noundef %147) #5
  %149 = load ptr, ptr @stdout, align 8, !tbaa !8
  %150 = getelementptr inbounds [1200 x i8], ptr %22, i64 0, i64 0
  %151 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %149, ptr noundef @.str.3, ptr noundef %150) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %22) #5
  br label %172

152:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 1200, ptr %23) #5
  %153 = getelementptr inbounds [1200 x i8], ptr %23, i64 0, i64 0
  %154 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  %155 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %153, i64 noundef 1200, ptr noundef @.str.9, ptr noundef %154) #5
  %156 = load ptr, ptr @stdout, align 8, !tbaa !8
  %157 = getelementptr inbounds [1200 x i8], ptr %23, i64 0, i64 0
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef @.str.4, ptr noundef %157) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %23) #5
  br label %172

159:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 1200, ptr %24) #5
  %160 = getelementptr inbounds [1200 x i8], ptr %24, i64 0, i64 0
  %161 = getelementptr inbounds [512 x i8], ptr %14, i64 0, i64 0
  %162 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %160, i64 noundef 1200, ptr noundef @.str.9, ptr noundef %161) #5
  %163 = load ptr, ptr @stdout, align 8, !tbaa !8
  %164 = getelementptr inbounds [1200 x i8], ptr %24, i64 0, i64 0
  %165 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %163, ptr noundef @.str.5, ptr noundef %164) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %24) #5
  br label %172

166:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 1200, ptr %25) #5
  %167 = getelementptr inbounds [1200 x i8], ptr %25, i64 0, i64 0
  %168 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %167, i64 noundef 1200, ptr noundef @.str.9, ptr noundef @.str.20) #5
  %169 = load ptr, ptr @stdout, align 8, !tbaa !8
  %170 = getelementptr inbounds [1200 x i8], ptr %25, i64 0, i64 0
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %169, ptr noundef @.str.2, ptr noundef %170) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %25) #5
  store i32 1, ptr %15, align 4
  br label %174

172:                                              ; preds = %159, %152, %145, %138
  br label %173

173:                                              ; preds = %172, %130
  store i32 0, ptr %15, align 4
  br label %174

174:                                              ; preds = %173, %166, %79, %29
  call void @llvm.lifetime.end.p0(i64 512, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %175 = load i32, ptr %15, align 4
  switch i32 %175, label %177 [
    i32 0, label %176
    i32 1, label %176
  ]

176:                                              ; preds = %174, %174
  ret void

177:                                              ; preds = %174
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 = { nounwind }
attributes #6 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !6, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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.1 = external hidden unnamed_addr constant [6 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [2 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

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

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

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

; Function Attrs: nofree nounwind uwtable
define dso_local void @utils_printUserId(i8 noundef zeroext %0, ptr noundef %1, ptr noundef %2, i8 noundef zeroext %3, ptr noundef readonly %4, i64 noundef %5) local_unnamed_addr #5 {
  %7 = alloca [512 x i8], align 16
  %8 = alloca [1200 x i8], align 16
  %9 = alloca [1200 x i8], align 16
  %10 = alloca [1200 x i8], align 16
  %11 = alloca [1200 x i8], align 16
  %12 = alloca [1200 x i8], align 16
  %13 = alloca [1200 x i8], align 16
  %14 = alloca [1200 x i8], align 16
  %15 = alloca [1200 x i8], align 16
  %16 = alloca [1200 x i8], align 16
  %17 = alloca [1200 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %7) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %7, i8 0, i64 512, i1 false)
  %18 = icmp eq ptr %4, null
  br i1 %18, label %90, label %19

19:                                               ; preds = %6
  %20 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) %1) #6
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %._crit_edge32, label %21

._crit_edge32:                                    ; preds = %19
  %.pre = zext i8 %3 to i32
  br label %46

21:                                               ; preds = %19
  switch i8 %0, label %42 [
    i8 1, label %22
    i8 2, label %27
    i8 3, label %32
    i8 4, label %37
  ]

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %8) #6
  %23 = zext i8 %3 to i32
  %24 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %8, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef %1, i32 noundef %23, ptr noundef nonnull %2) #6
  %25 = load ptr, ptr @stdout, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.2, ptr noundef nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %8) #6
  br label %46

27:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %9) #6
  %28 = zext i8 %3 to i32
  %29 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef %1, i32 noundef %28, ptr noundef nonnull %2) #6
  %30 = load ptr, ptr @stdout, align 8, !tbaa !5
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.3, ptr noundef nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %9) #6
  br label %46

32:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %10) #6
  %33 = zext i8 %3 to i32
  %34 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %10, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef %1, i32 noundef %33, ptr noundef nonnull %2) #6
  %35 = load ptr, ptr @stdout, align 8, !tbaa !5
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.4, ptr noundef nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %10) #6
  br label %46

37:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %11) #6
  %38 = zext i8 %3 to i32
  %39 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %11, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef %1, i32 noundef %38, ptr noundef nonnull %2) #6
  %40 = load ptr, ptr @stdout, align 8, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.5, ptr noundef nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %11) #6
  br label %46

42:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %12) #6
  %43 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %12, i64 noundef 1200, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.20) #6
  %44 = load ptr, ptr @stdout, align 8, !tbaa !5
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.2, ptr noundef nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %12) #6
  br label %90

46:                                               ; preds = %._crit_edge32, %22, %27, %32, %37
  %.pre-phi = phi i32 [ %.pre, %._crit_edge32 ], [ %23, %22 ], [ %28, %27 ], [ %33, %32 ], [ %38, %37 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %7, i8 0, i64 512, i1 false)
  %47 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) %1) #6
  %48 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %7) #7
  %49 = getelementptr inbounds [512 x i8], ptr %7, i64 0, i64 %48
  %50 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %49, ptr noundef nonnull dereferenceable(1) @.str.21, i32 noundef %.pre-phi, ptr noundef nonnull @.str.8) #6
  %.not31 = icmp eq i64 %5, 0
  br i1 %.not31, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %46, %64
  %51 = phi i64 [ %66, %64 ], [ 0, %46 ]
  %.030 = phi i32 [ %65, %64 ], [ 0, %46 ]
  %52 = getelementptr inbounds i8, ptr %4, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !9
  %54 = icmp eq i8 %53, 0
  br i1 %54, label %55, label %59

55:                                               ; preds = %.lr.ph
  %56 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %7) #7
  %57 = getelementptr inbounds [512 x i8], ptr %7, i64 0, i64 %56
  %58 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %57, ptr noundef nonnull dereferenceable(1) @.str.25) #6
  br label %64

59:                                               ; preds = %.lr.ph
  %60 = zext i8 %53 to i32
  %61 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %7) #7
  %62 = getelementptr inbounds [512 x i8], ptr %7, i64 0, i64 %61
  %63 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %62, ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %60) #6
  br label %64

64:                                               ; preds = %55, %59
  %65 = add i32 %.030, 1
  %66 = zext i32 %65 to i64
  %67 = icmp ult i64 %66, %5
  br i1 %67, label %.lr.ph, label %._crit_edge, !llvm.loop !10

._crit_edge:                                      ; preds = %64, %46
  %68 = load i8, ptr %7, align 16, !tbaa !9
  %.not29 = icmp eq i8 %68, 0
  br i1 %.not29, label %90, label %69

69:                                               ; preds = %._crit_edge
  switch i8 %0, label %86 [
    i8 1, label %70
    i8 2, label %74
    i8 3, label %78
    i8 4, label %82
  ]

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %13) #6
  %71 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %13, i64 noundef 1200, ptr noundef nonnull @.str.9, ptr noundef nonnull %7) #6
  %72 = load ptr, ptr @stdout, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.2, ptr noundef nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %13) #6
  br label %90

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %14) #6
  %75 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %14, i64 noundef 1200, ptr noundef nonnull @.str.9, ptr noundef nonnull %7) #6
  %76 = load ptr, ptr @stdout, align 8, !tbaa !5
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.3, ptr noundef nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %14) #6
  br label %90

78:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %15) #6
  %79 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %15, i64 noundef 1200, ptr noundef nonnull @.str.9, ptr noundef nonnull %7) #6
  %80 = load ptr, ptr @stdout, align 8, !tbaa !5
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.4, ptr noundef nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %15) #6
  br label %90

82:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %16) #6
  %83 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %16, i64 noundef 1200, ptr noundef nonnull @.str.9, ptr noundef nonnull %7) #6
  %84 = load ptr, ptr @stdout, align 8, !tbaa !5
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef nonnull @.str.5, ptr noundef nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %16) #6
  br label %90

86:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %17) #6
  %87 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %17, i64 noundef 1200, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.20) #6
  %88 = load ptr, ptr @stdout, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef nonnull @.str.2, ptr noundef nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %17) #6
  br label %90

90:                                               ; preds = %._crit_edge, %82, %78, %74, %70, %6, %86, %42
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %7) #6
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 memory(argmem: readwrite) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 #5 = { nofree 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 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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