; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (parser)

; 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.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.parser_read_line = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [78 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 void @class_protect_sprintf(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

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

27:                                               ; preds = %5
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %28, align 4, !tbaa !9
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %223

29:                                               ; preds = %5
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = call ptr @strchr(ptr noundef %30, i32 noundef 35) #6
  store ptr %31, ptr %12, align 8, !tbaa !5
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %43

34:                                               ; preds = %29
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  %37 = ptrtoint ptr %35 to i64
  %38 = ptrtoint ptr %36 to i64
  %39 = sub i64 %37, %38
  %40 = icmp slt i64 %39, 2
  br i1 %40, label %41, label %43

41:                                               ; preds = %34
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %42, align 4, !tbaa !9
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %223

43:                                               ; preds = %34, %29
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %44, ptr %14, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %51, %43
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 0
  %48 = load i8, ptr %47, align 1, !tbaa !11
  %49 = sext i8 %48 to i32
  %50 = icmp eq i32 %49, 32
  br i1 %50, label %51, label %54

51:                                               ; preds = %45
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i32 1
  store ptr %53, ptr %14, align 8, !tbaa !5
  br label %45, !llvm.loop !12

54:                                               ; preds = %45
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 0
  %57 = load i8, ptr %56, align 1, !tbaa !11
  %58 = sext i8 %57 to i32
  %59 = icmp eq i32 %58, 39
  br i1 %59, label %66, label %60

60:                                               ; preds = %54
  %61 = load ptr, ptr %14, align 8, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %61, i64 0
  %63 = load i8, ptr %62, align 1, !tbaa !11
  %64 = sext i8 %63 to i32
  %65 = icmp eq i32 %64, 34
  br i1 %65, label %66, label %69

66:                                               ; preds = %60, %54
  %67 = load ptr, ptr %14, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i32 1
  store ptr %68, ptr %14, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %66, %60
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 -1
  store ptr %71, ptr %15, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %78, %69
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 0
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = sext i8 %75 to i32
  %77 = icmp eq i32 %76, 32
  br i1 %77, label %78, label %81

78:                                               ; preds = %72
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i32 -1
  store ptr %80, ptr %15, align 8, !tbaa !5
  br label %72, !llvm.loop !14

81:                                               ; preds = %72
  %82 = load ptr, ptr %15, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %82, i64 0
  %84 = load i8, ptr %83, align 1, !tbaa !11
  %85 = sext i8 %84 to i32
  %86 = icmp eq i32 %85, 39
  br i1 %86, label %93, label %87

87:                                               ; preds = %81
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %88, i64 0
  %90 = load i8, ptr %89, align 1, !tbaa !11
  %91 = sext i8 %90 to i32
  %92 = icmp eq i32 %91, 34
  br i1 %92, label %93, label %96

93:                                               ; preds = %87, %81
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i32 -1
  store ptr %95, ptr %15, align 8, !tbaa !5
  br label %96

96:                                               ; preds = %93, %87
  %97 = load ptr, ptr %15, align 8, !tbaa !5
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = ptrtoint ptr %97 to i64
  %100 = ptrtoint ptr %98 to i64
  %101 = sub i64 %99, %100
  %102 = icmp slt i64 %101, 0
  br i1 %102, label %103, label %110

103:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 2048, ptr %17) #5
  %104 = getelementptr inbounds [2048 x i8], ptr %17, i64 0, i64 0
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %104, ptr noundef @.str.16, ptr noundef %105)
  call void @llvm.lifetime.start.p0(i64 2048, ptr %18) #5
  %106 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %107 = getelementptr inbounds [2048 x i8], ptr %17, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %106, ptr noundef @.str.8, ptr noundef @.str.17, ptr noundef %107)
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %108, ptr noundef @.str.4, ptr noundef @__func__.parser_read_line, i32 noundef 131, ptr noundef %109)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %17) #5
  store i32 1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %223

110:                                              ; preds = %96
  %111 = load ptr, ptr %15, align 8, !tbaa !5
  %112 = load ptr, ptr %14, align 8, !tbaa !5
  %113 = ptrtoint ptr %111 to i64
  %114 = ptrtoint ptr %112 to i64
  %115 = sub i64 %113, %114
  %116 = add nsw i64 %115, 1
  %117 = icmp sge i64 %116, 1024
  br i1 %117, label %118, label %127

118:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 2048, ptr %19) #5
  %119 = getelementptr inbounds [2048 x i8], ptr %19, i64 0, i64 0
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  %122 = call ptr @strncpy(ptr noundef %120, ptr noundef %121, i64 noundef 1023) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %119, ptr noundef @.str.18, ptr noundef %122)
  call void @llvm.lifetime.start.p0(i64 2048, ptr %20) #5
  %123 = getelementptr inbounds [2048 x i8], ptr %20, i64 0, i64 0
  %124 = getelementptr inbounds [2048 x i8], ptr %19, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %123, ptr noundef @.str.8, ptr noundef @.str.19, ptr noundef %124)
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = getelementptr inbounds [2048 x i8], ptr %20, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %125, ptr noundef @.str.4, ptr noundef @__func__.parser_read_line, i32 noundef 135, ptr noundef %126)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %19) #5
  store i32 1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %223

127:                                              ; preds = %110
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  %129 = load ptr, ptr %14, align 8, !tbaa !5
  %130 = load ptr, ptr %15, align 8, !tbaa !5
  %131 = load ptr, ptr %14, align 8, !tbaa !5
  %132 = ptrtoint ptr %130 to i64
  %133 = ptrtoint ptr %131 to i64
  %134 = sub i64 %132, %133
  %135 = add nsw i64 %134, 1
  %136 = call ptr @strncpy(ptr noundef %128, ptr noundef %129, i64 noundef %135) #5
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = load ptr, ptr %15, align 8, !tbaa !5
  %139 = load ptr, ptr %14, align 8, !tbaa !5
  %140 = ptrtoint ptr %138 to i64
  %141 = ptrtoint ptr %139 to i64
  %142 = sub i64 %140, %141
  %143 = add nsw i64 %142, 1
  %144 = getelementptr inbounds i8, ptr %137, i64 %143
  store i8 0, ptr %144, align 1, !tbaa !11
  %145 = load ptr, ptr %13, align 8, !tbaa !5
  %146 = getelementptr inbounds i8, ptr %145, i64 1
  store ptr %146, ptr %14, align 8, !tbaa !5
  br label %147

147:                                              ; preds = %153, %127
  %148 = load ptr, ptr %14, align 8, !tbaa !5
  %149 = getelementptr inbounds i8, ptr %148, i64 0
  %150 = load i8, ptr %149, align 1, !tbaa !11
  %151 = sext i8 %150 to i32
  %152 = icmp eq i32 %151, 32
  br i1 %152, label %153, label %156

153:                                              ; preds = %147
  %154 = load ptr, ptr %14, align 8, !tbaa !5
  %155 = getelementptr inbounds i8, ptr %154, i32 1
  store ptr %155, ptr %14, align 8, !tbaa !5
  br label %147, !llvm.loop !15

156:                                              ; preds = %147
  %157 = load ptr, ptr %12, align 8, !tbaa !5
  %158 = icmp eq ptr %157, null
  br i1 %158, label %159, label %165

159:                                              ; preds = %156
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = call i64 @strlen(ptr noundef %161) #6
  %163 = getelementptr inbounds i8, ptr %160, i64 %162
  %164 = getelementptr inbounds i8, ptr %163, i64 -1
  store ptr %164, ptr %15, align 8, !tbaa !5
  br label %168

165:                                              ; preds = %156
  %166 = load ptr, ptr %12, align 8, !tbaa !5
  %167 = getelementptr inbounds i8, ptr %166, i64 -1
  store ptr %167, ptr %15, align 8, !tbaa !5
  br label %168

168:                                              ; preds = %165, %159
  br label %169

169:                                              ; preds = %175, %168
  %170 = load ptr, ptr %15, align 8, !tbaa !5
  %171 = getelementptr inbounds i8, ptr %170, i64 0
  %172 = load i8, ptr %171, align 1, !tbaa !11
  %173 = sext i8 %172 to i32
  %174 = icmp sle i32 %173, 32
  br i1 %174, label %175, label %178

175:                                              ; preds = %169
  %176 = load ptr, ptr %15, align 8, !tbaa !5
  %177 = getelementptr inbounds i8, ptr %176, i32 -1
  store ptr %177, ptr %15, align 8, !tbaa !5
  br label %169, !llvm.loop !16

178:                                              ; preds = %169
  %179 = load ptr, ptr %15, align 8, !tbaa !5
  %180 = load ptr, ptr %14, align 8, !tbaa !5
  %181 = ptrtoint ptr %179 to i64
  %182 = ptrtoint ptr %180 to i64
  %183 = sub i64 %181, %182
  %184 = icmp slt i64 %183, 0
  br i1 %184, label %185, label %187

185:                                              ; preds = %178
  %186 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %186, align 4, !tbaa !9
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %223

187:                                              ; preds = %178
  %188 = load ptr, ptr %15, align 8, !tbaa !5
  %189 = load ptr, ptr %14, align 8, !tbaa !5
  %190 = ptrtoint ptr %188 to i64
  %191 = ptrtoint ptr %189 to i64
  %192 = sub i64 %190, %191
  %193 = add nsw i64 %192, 1
  %194 = icmp sge i64 %193, 1024
  br i1 %194, label %195, label %204

195:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 2048, ptr %21) #5
  %196 = getelementptr inbounds [2048 x i8], ptr %21, i64 0, i64 0
  %197 = load ptr, ptr %10, align 8, !tbaa !5
  %198 = load ptr, ptr %14, align 8, !tbaa !5
  %199 = call ptr @strncpy(ptr noundef %197, ptr noundef %198, i64 noundef 1023) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %196, ptr noundef @.str.20, ptr noundef %199)
  call void @llvm.lifetime.start.p0(i64 2048, ptr %22) #5
  %200 = getelementptr inbounds [2048 x i8], ptr %22, i64 0, i64 0
  %201 = getelementptr inbounds [2048 x i8], ptr %21, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %200, ptr noundef @.str.8, ptr noundef @.str.19, ptr noundef %201)
  %202 = load ptr, ptr %11, align 8, !tbaa !5
  %203 = getelementptr inbounds [2048 x i8], ptr %22, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %202, ptr noundef @.str.4, ptr noundef @__func__.parser_read_line, i32 noundef 160, ptr noundef %203)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %21) #5
  store i32 1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %223

204:                                              ; preds = %187
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = load ptr, ptr %14, align 8, !tbaa !5
  %207 = load ptr, ptr %15, align 8, !tbaa !5
  %208 = load ptr, ptr %14, align 8, !tbaa !5
  %209 = ptrtoint ptr %207 to i64
  %210 = ptrtoint ptr %208 to i64
  %211 = sub i64 %209, %210
  %212 = add nsw i64 %211, 1
  %213 = call ptr @strncpy(ptr noundef %205, ptr noundef %206, i64 noundef %212) #5
  %214 = load ptr, ptr %10, align 8, !tbaa !5
  %215 = load ptr, ptr %15, align 8, !tbaa !5
  %216 = load ptr, ptr %14, align 8, !tbaa !5
  %217 = ptrtoint ptr %215 to i64
  %218 = ptrtoint ptr %216 to i64
  %219 = sub i64 %217, %218
  %220 = add nsw i64 %219, 1
  %221 = getelementptr inbounds i8, ptr %214, i64 %220
  store i8 0, ptr %221, align 1, !tbaa !11
  %222 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 1, ptr %222, align 4, !tbaa !9
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %223

223:                                              ; preds = %204, %195, %185, %118, %103, %41, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %224 = load i32, ptr %6, align 4
  ret i32 %224
}

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

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

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #4

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


; 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.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.parser_read_line = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [78 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 void @class_protect_sprintf(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: nounwind uwtable
define dso_local range(i32 0, 2) i32 @parser_read_line(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #2 {
  %6 = alloca [2048 x i8], align 16
  %7 = alloca [2048 x i8], align 16
  %8 = alloca [2048 x i8], align 16
  %9 = alloca [2048 x i8], align 16
  %10 = alloca [2048 x i8], align 16
  %11 = alloca [2048 x i8], align 16
  %12 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) %0, i32 noundef 61) #5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %5
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %69

15:                                               ; preds = %5
  %16 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) %0, i32 noundef 35) #5
  %.not = icmp ne ptr %16, null
  %17 = ptrtoint ptr %16 to i64
  %18 = ptrtoint ptr %12 to i64
  %19 = sub i64 %17, %18
  %20 = icmp slt i64 %19, 2
  %or.cond = and i1 %.not, %20
  br i1 %or.cond, label %21, label %.preheader

21:                                               ; preds = %15
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %69

.preheader:                                       ; preds = %15, %23
  %.061 = phi ptr [ %24, %23 ], [ %0, %15 ]
  %22 = load i8, ptr %.061, align 1, !tbaa !9
  switch i8 %22, label %.loopexit79 [
    i8 32, label %23
    i8 39, label %25
    i8 34, label %25
  ]

23:                                               ; preds = %.preheader
  %24 = getelementptr inbounds i8, ptr %.061, i64 1
  br label %.preheader, !llvm.loop !10

25:                                               ; preds = %.preheader, %.preheader
  %26 = getelementptr inbounds i8, ptr %.061, i64 1
  br label %.loopexit79

.loopexit79:                                      ; preds = %.preheader, %25
  %.162 = phi ptr [ %26, %25 ], [ %.061, %.preheader ]
  br label %27

27:                                               ; preds = %27, %.loopexit79
  %.pn75 = phi ptr [ %12, %.loopexit79 ], [ %.0, %27 ]
  %.0 = getelementptr inbounds i8, ptr %.pn75, i64 -1
  %28 = load i8, ptr %.0, align 1, !tbaa !9
  switch i8 %28, label %.loopexit [
    i8 32, label %27
    i8 39, label %29
    i8 34, label %29
  ]

29:                                               ; preds = %27, %27
  %30 = getelementptr inbounds i8, ptr %.pn75, i64 -2
  br label %.loopexit

.loopexit:                                        ; preds = %27, %29
  %.1 = phi ptr [ %30, %29 ], [ %.0, %27 ]
  %31 = ptrtoint ptr %.1 to i64
  %32 = ptrtoint ptr %.162 to i64
  %33 = sub i64 %31, %32
  %34 = icmp slt i64 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %6) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %6, ptr noundef nonnull @.str.16, ptr noundef %0) #6
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %7) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %7, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.17, ptr noundef nonnull %6) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %4, ptr noundef nonnull @.str.4, ptr noundef nonnull @__func__.parser_read_line, i32 noundef 131, ptr noundef nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %6) #6
  br label %69

36:                                               ; preds = %.loopexit
  %37 = icmp ugt i64 %33, 1022
  br i1 %37, label %38, label %40

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %8) #6
  %39 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %.162, i64 noundef 1023) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %8, ptr noundef nonnull @.str.18, ptr noundef %2) #6
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %9) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %9, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.19, ptr noundef nonnull %8) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %4, ptr noundef nonnull @.str.4, ptr noundef nonnull @__func__.parser_read_line, i32 noundef 135, ptr noundef nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %8) #6
  br label %69

40:                                               ; preds = %36
  %41 = add nuw nsw i64 %33, 1
  %42 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %.162, i64 noundef %41) #6
  %43 = getelementptr inbounds i8, ptr %2, i64 %41
  store i8 0, ptr %43, align 1, !tbaa !9
  br label %44

44:                                               ; preds = %44, %40
  %.pn74 = phi ptr [ %12, %40 ], [ %.263, %44 ]
  %.263 = getelementptr inbounds i8, ptr %.pn74, i64 1
  %45 = load i8, ptr %.263, align 1, !tbaa !9
  %46 = icmp eq i8 %45, 32
  br i1 %46, label %44, label %47, !llvm.loop !12

47:                                               ; preds = %44
  %48 = icmp eq ptr %16, null
  br i1 %48, label %49, label %.preheader92

49:                                               ; preds = %47
  %50 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #5
  %51 = getelementptr inbounds i8, ptr %0, i64 %50
  br label %.preheader92

.preheader92:                                     ; preds = %47, %49
  %.pn.pn.ph = phi ptr [ %16, %47 ], [ %51, %49 ]
  br label %52

52:                                               ; preds = %.preheader92, %52
  %.pn.pn = phi ptr [ %.3, %52 ], [ %.pn.pn.ph, %.preheader92 ]
  %.3 = getelementptr inbounds i8, ptr %.pn.pn, i64 -1
  %53 = load i8, ptr %.3, align 1, !tbaa !9
  %54 = icmp slt i8 %53, 33
  br i1 %54, label %52, label %55, !llvm.loop !13

55:                                               ; preds = %52
  %56 = ptrtoint ptr %.3 to i64
  %57 = ptrtoint ptr %.263 to i64
  %58 = sub i64 %56, %57
  %59 = icmp slt i64 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %55
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %69

61:                                               ; preds = %55
  %62 = icmp ugt i64 %58, 1022
  br i1 %62, label %63, label %65

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %10) #6
  %64 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %.263, i64 noundef 1023) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.20, ptr noundef %3) #6
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %11) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %11, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.19, ptr noundef nonnull %10) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %4, ptr noundef nonnull @.str.4, ptr noundef nonnull @__func__.parser_read_line, i32 noundef 160, ptr noundef nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %10) #6
  br label %69

65:                                               ; preds = %61
  %66 = add nuw nsw i64 %58, 1
  %67 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %.263, i64 noundef %66) #6
  %68 = getelementptr inbounds i8, ptr %3, i64 %66
  store i8 0, ptr %68, align 1, !tbaa !9
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %65, %63, %60, %38, %35, %21, %14
  %.064 = phi i32 [ 0, %14 ], [ 0, %21 ], [ 1, %35 ], [ 1, %38 ], [ 0, %60 ], [ 1, %63 ], [ 0, %65 ]
  ret i32 %.064
}

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

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

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

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 = { 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 #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 = { 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 #5 = { nounwind willreturn memory(read) }
attributes #6 = { 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}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass