; LLVM IR from openappsec/openappsec :: external/yajl/verify (json_verify)

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

@main.fileData = external hidden global [65536 x i8], align 16
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@stdin = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !5
  %14 = call ptr @yajl_alloc(ptr noundef null, ptr noundef null, ptr noundef null)
  store ptr %14, ptr %8, align 8, !tbaa !9
  br label %15

15:                                               ; preds = %91, %2
  %16 = load i32, ptr %11, align 4, !tbaa !5
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %19, label %37

19:                                               ; preds = %15
  %20 = load ptr, ptr %5, align 8, !tbaa !9
  %21 = load i32, ptr %11, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds ptr, ptr %20, i64 %22
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds i8, ptr %24, i64 0
  %26 = load i8, ptr %25, align 1, !tbaa !11
  %27 = sext i8 %26 to i32
  %28 = icmp eq i32 %27, 45
  br i1 %28, label %29, label %37

29:                                               ; preds = %19
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = load i32, ptr %11, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds ptr, ptr %30, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = call i64 @strlen(ptr noundef %34) #6
  %36 = icmp ugt i64 %35, 1
  br label %37

37:                                               ; preds = %29, %19, %15
  %38 = phi i1 [ false, %19 ], [ false, %15 ], [ %36, %29 ]
  br i1 %38, label %39, label %94

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %88, %39
  %41 = load i32, ptr %12, align 4, !tbaa !5
  %42 = zext i32 %41 to i64
  %43 = load ptr, ptr %5, align 8, !tbaa !9
  %44 = load i32, ptr %11, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds ptr, ptr %43, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !9
  %48 = call i64 @strlen(ptr noundef %47) #6
  %49 = icmp ult i64 %42, %48
  br i1 %49, label %50, label %91

50:                                               ; preds = %40
  %51 = load ptr, ptr %5, align 8, !tbaa !9
  %52 = load i32, ptr %11, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds ptr, ptr %51, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  %56 = load i32, ptr %12, align 4, !tbaa !5
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %55, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !11
  %60 = sext i8 %59 to i32
  switch i32 %60, label %71 [
    i32 113, label %61
    i32 99, label %62
    i32 117, label %65
    i32 115, label %68
  ]

61:                                               ; preds = %50
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %87

62:                                               ; preds = %50
  %63 = load ptr, ptr %8, align 8, !tbaa !9
  %64 = call i32 (ptr, i32, ...) @yajl_config(ptr noundef %63, i32 noundef 1, i32 noundef 1)
  br label %87

65:                                               ; preds = %50
  %66 = load ptr, ptr %8, align 8, !tbaa !9
  %67 = call i32 (ptr, i32, ...) @yajl_config(ptr noundef %66, i32 noundef 2, i32 noundef 1)
  br label %87

68:                                               ; preds = %50
  %69 = load ptr, ptr %8, align 8, !tbaa !9
  %70 = call i32 (ptr, i32, ...) @yajl_config(ptr noundef %69, i32 noundef 8, i32 noundef 1)
  br label %87

71:                                               ; preds = %50
  %72 = load ptr, ptr @stderr, align 8, !tbaa !9
  %73 = load ptr, ptr %5, align 8, !tbaa !9
  %74 = load i32, ptr %11, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds ptr, ptr %73, i64 %75
  %77 = load ptr, ptr %76, align 8, !tbaa !9
  %78 = load i32, ptr %12, align 4, !tbaa !5
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %77, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !11
  %82 = sext i8 %81 to i32
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str, i32 noundef %82) #5
  %84 = load ptr, ptr %5, align 8, !tbaa !9
  %85 = getelementptr inbounds ptr, ptr %84, i64 0
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  call void @usage(ptr noundef %86)
  br label %87

87:                                               ; preds = %71, %68, %65, %62, %61
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = add i32 %89, 1
  store i32 %90, ptr %12, align 4, !tbaa !5
  br label %40, !llvm.loop !12

91:                                               ; preds = %40
  %92 = load i32, ptr %11, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %15, !llvm.loop !14

94:                                               ; preds = %37
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = load i32, ptr %4, align 4, !tbaa !5
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %98, label %102

98:                                               ; preds = %94
  %99 = load ptr, ptr %5, align 8, !tbaa !9
  %100 = getelementptr inbounds ptr, ptr %99, i64 0
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  call void @usage(ptr noundef %101)
  br label %102

102:                                              ; preds = %98, %94
  br label %103

103:                                              ; preds = %129, %102
  %104 = load ptr, ptr @stdin, align 8, !tbaa !9
  %105 = call i64 @fread(ptr noundef @main.fileData, i64 noundef 1, i64 noundef 65535, ptr noundef %104)
  store i64 %105, ptr %7, align 8, !tbaa !15
  store i32 0, ptr %10, align 4, !tbaa !5
  %106 = load i64, ptr %7, align 8, !tbaa !15
  %107 = icmp eq i64 %106, 0
  br i1 %107, label %108, label %120

108:                                              ; preds = %103
  %109 = load ptr, ptr @stdin, align 8, !tbaa !9
  %110 = call i32 @feof(ptr noundef %109) #5
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %119, label %112

112:                                              ; preds = %108
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %118, label %115

115:                                              ; preds = %112
  %116 = load ptr, ptr @stderr, align 8, !tbaa !9
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef @.str.1) #5
  br label %118

118:                                              ; preds = %115, %112
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %118, %108
  br label %130

120:                                              ; preds = %103
  %121 = load i64, ptr %7, align 8, !tbaa !15
  %122 = getelementptr inbounds [65536 x i8], ptr @main.fileData, i64 0, i64 %121
  store i8 0, ptr %122, align 1, !tbaa !11
  %123 = load ptr, ptr %8, align 8, !tbaa !9
  %124 = load i64, ptr %7, align 8, !tbaa !15
  %125 = call i32 @yajl_parse(ptr noundef %123, ptr noundef @main.fileData, i64 noundef %124)
  store i32 %125, ptr %6, align 4, !tbaa !5
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %129

128:                                              ; preds = %120
  br label %130

129:                                              ; preds = %120
  br label %103

130:                                              ; preds = %128, %119
  %131 = load ptr, ptr %8, align 8, !tbaa !9
  %132 = call i32 @yajl_complete_parse(ptr noundef %131)
  store i32 %132, ptr %6, align 4, !tbaa !5
  %133 = load i32, ptr %6, align 4, !tbaa !5
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %148

135:                                              ; preds = %130
  %136 = load i32, ptr %9, align 4, !tbaa !5
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %147, label %138

138:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %139 = load ptr, ptr %8, align 8, !tbaa !9
  %140 = load i64, ptr %7, align 8, !tbaa !15
  %141 = call ptr @yajl_get_error(ptr noundef %139, i32 noundef 1, ptr noundef @main.fileData, i64 noundef %140)
  store ptr %141, ptr %13, align 8, !tbaa !9
  %142 = load ptr, ptr @stderr, align 8, !tbaa !9
  %143 = load ptr, ptr %13, align 8, !tbaa !9
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef @.str.2, ptr noundef %143) #5
  %145 = load ptr, ptr %8, align 8, !tbaa !9
  %146 = load ptr, ptr %13, align 8, !tbaa !9
  call void @yajl_free_error(ptr noundef %145, ptr noundef %146)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %147

147:                                              ; preds = %138, %135
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %147, %130
  %149 = load ptr, ptr %8, align 8, !tbaa !9
  call void @yajl_free(ptr noundef %149)
  %150 = load i32, ptr %9, align 4, !tbaa !5
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %158, label %152

152:                                              ; preds = %148
  %153 = load i32, ptr %10, align 4, !tbaa !5
  %154 = icmp ne i32 %153, 0
  %155 = zext i1 %154 to i64
  %156 = select i1 %154, ptr @.str.4, ptr @.str.5
  %157 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef %156)
  br label %158

158:                                              ; preds = %152, %148
  %159 = load i32, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  ret i32 %159
}

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

declare ptr @yajl_alloc(ptr noundef, ptr noundef, ptr noundef) #2

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

declare i32 @yajl_config(ptr noundef, i32 noundef, ...) #2

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

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

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

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

; Function Attrs: nounwind
declare i32 @feof(ptr noundef) #4

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

declare i32 @yajl_complete_parse(ptr noundef) #2

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

declare void @yajl_free_error(ptr noundef, ptr noundef) #2

declare void @yajl_free(ptr noundef) #2

declare i32 @printf(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 = { "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@main.fileData = external hidden global [65536 x i8], align 16
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = tail call ptr @yajl_alloc(ptr noundef null, ptr noundef null, ptr noundef null) #5
  %4 = icmp sgt i32 %0, 1
  br i1 %4, label %.lr.ph79.preheader, label %.critedge53

.lr.ph79.preheader:                               ; preds = %2
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph79

.lr.ph79:                                         ; preds = %.lr.ph79.preheader, %._crit_edge
  %indvars.iv = phi i64 [ 1, %.lr.ph79.preheader ], [ %indvars.iv.next, %._crit_edge ]
  %.04376 = phi i32 [ 0, %.lr.ph79.preheader ], [ %.2, %._crit_edge ]
  %5 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = load i8, ptr %6, align 1, !tbaa !9
  %8 = icmp eq i8 %7, 45
  br i1 %8, label %9, label %.critedge

9:                                                ; preds = %.lr.ph79
  %10 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %6) #6
  %11 = icmp ugt i64 %10, 1
  br i1 %11, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %9, %29
  %12 = phi ptr [ %32, %29 ], [ %6, %9 ]
  %13 = phi i64 [ %31, %29 ], [ 1, %9 ]
  %.075 = phi i32 [ %30, %29 ], [ 1, %9 ]
  %.14474 = phi i32 [ %.2, %29 ], [ %.04376, %9 ]
  %14 = getelementptr inbounds i8, ptr %12, i64 %13
  %15 = load i8, ptr %14, align 1, !tbaa !9
  %16 = sext i8 %15 to i32
  %17 = add nsw i32 %16, -99
  %18 = tail call i32 @llvm.fshl.i32(i32 %17, i32 %17, i32 31)
  switch i32 %18, label %25 [
    i32 7, label %29
    i32 0, label %19
    i32 9, label %21
    i32 8, label %23
  ]

19:                                               ; preds = %.lr.ph
  %20 = tail call i32 (ptr, i32, ...) @yajl_config(ptr noundef %3, i32 noundef 1, i32 noundef 1) #5
  br label %29

21:                                               ; preds = %.lr.ph
  %22 = tail call i32 (ptr, i32, ...) @yajl_config(ptr noundef %3, i32 noundef 2, i32 noundef 1) #5
  br label %29

23:                                               ; preds = %.lr.ph
  %24 = tail call i32 (ptr, i32, ...) @yajl_config(ptr noundef %3, i32 noundef 8, i32 noundef 1) #5
  br label %29

25:                                               ; preds = %.lr.ph
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str, i32 noundef %16) #7
  %28 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void @usage(ptr noundef %28)
  br label %29

29:                                               ; preds = %.lr.ph, %19, %21, %23, %25
  %.2 = phi i32 [ %.14474, %25 ], [ %.14474, %23 ], [ %.14474, %21 ], [ %.14474, %19 ], [ 1, %.lr.ph ]
  %30 = add i32 %.075, 1
  %31 = zext i32 %30 to i64
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %32) #6
  %34 = icmp ugt i64 %33, %31
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !10

._crit_edge:                                      ; preds = %29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge53, label %.lr.ph79, !llvm.loop !12

.critedge:                                        ; preds = %9, %.lr.ph79
  %35 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void @usage(ptr noundef %35)
  br label %.critedge53

.critedge53:                                      ; preds = %._crit_edge, %2, %.critedge
  %.04373 = phi i32 [ %.04376, %.critedge ], [ 0, %2 ], [ %.2, %._crit_edge ]
  br label %36

36:                                               ; preds = %44, %.critedge53
  %37 = load ptr, ptr @stdin, align 8, !tbaa !5
  %38 = tail call i64 @fread(ptr noundef nonnull @main.fileData, i64 noundef 1, i64 noundef 65535, ptr noundef %37)
  %39 = icmp eq i64 %38, 0
  br i1 %39, label %40, label %44

40:                                               ; preds = %36
  %41 = load ptr, ptr @stdin, align 8, !tbaa !5
  %42 = tail call i32 @feof(ptr noundef %41) #5
  %.not47 = icmp eq i32 %42, 0
  br i1 %.not47, label %43, label %.loopexit

43:                                               ; preds = %40
  %.not48 = icmp eq i32 %.04373, 0
  br i1 %.not48, label %.thread, label %.loopexit

44:                                               ; preds = %36
  %45 = getelementptr inbounds [65536 x i8], ptr @main.fileData, i64 0, i64 %38
  store i8 0, ptr %45, align 1, !tbaa !9
  %46 = tail call i32 @yajl_parse(ptr noundef %3, ptr noundef nonnull @main.fileData, i64 noundef %38) #5
  %.not = icmp eq i32 %46, 0
  br i1 %.not, label %36, label %.loopexit

.loopexit:                                        ; preds = %44, %43, %40
  %.not52 = phi i1 [ true, %40 ], [ false, %43 ], [ true, %44 ]
  %.042 = phi i32 [ 0, %40 ], [ 1, %43 ], [ 0, %44 ]
  %47 = tail call i32 @yajl_complete_parse(ptr noundef %3) #5
  %.not49 = icmp eq i32 %47, 0
  br i1 %.not49, label %56, label %51

.thread:                                          ; preds = %43
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.1) #7
  %50 = tail call i32 @yajl_complete_parse(ptr noundef %3) #5
  %.not4955 = icmp eq i32 %50, 0
  br i1 %.not4955, label %.thread66, label %.thread56

51:                                               ; preds = %.loopexit
  %.not50 = icmp eq i32 %.04373, 0
  br i1 %.not50, label %.thread56, label %.thread63

.thread63:                                        ; preds = %51
  tail call void @yajl_free(ptr noundef %3) #5
  br label %61

.thread56:                                        ; preds = %.thread, %51
  %52 = phi i64 [ 0, %.thread ], [ %38, %51 ]
  %53 = tail call ptr @yajl_get_error(ptr noundef %3, i32 noundef 1, ptr noundef nonnull @main.fileData, i64 noundef %52) #5
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.2, ptr noundef %53) #7
  tail call void @yajl_free_error(ptr noundef %3, ptr noundef %53) #5
  br label %.thread66

.thread66:                                        ; preds = %.thread56, %.thread
  tail call void @yajl_free(ptr noundef %3) #5
  br label %58

56:                                               ; preds = %.loopexit
  tail call void @yajl_free(ptr noundef %3) #5
  %.not51 = icmp eq i32 %.04373, 0
  br i1 %.not51, label %57, label %61

57:                                               ; preds = %56
  %not..not52 = xor i1 %.not52, true
  %spec.select = zext i1 %not..not52 to i32
  %spec.select70 = select i1 %.not52, ptr @.str.5, ptr @.str.4
  br label %58

58:                                               ; preds = %57, %.thread66
  %.16269 = phi i32 [ 1, %.thread66 ], [ %spec.select, %57 ]
  %59 = phi ptr [ @.str.4, %.thread66 ], [ %spec.select70, %57 ]
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull %59)
  br label %61

61:                                               ; preds = %.thread63, %58, %56
  %.161 = phi i32 [ %.16269, %58 ], [ %.042, %56 ], [ 1, %.thread63 ]
  ret i32 %.161
}

declare ptr @yajl_alloc(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

declare i32 @yajl_parse(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare i32 @yajl_complete_parse(ptr noundef) local_unnamed_addr #1

declare ptr @yajl_get_error(ptr noundef, i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @yajl_free_error(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @yajl_free(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.fshl.i32(i32, i32, i32) #4

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 = { "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 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { cold 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 = !{!"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"}
!12 = distinct !{!12, !11}


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