; LLVM IR from erincatto/box2d :: samples/settings.ll (ZN8Settings4LoadEv)

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

%struct.jsmn_parser = type { i32, i32, i32 }
%struct.jsmntok = type { i32, i32, i32, i32 }
%struct.Settings = type <{ i32, i32, i32, float, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, [2 x i8] }>

@_ZL8fileName = external hidden global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._ZN8Settings4LoadEv = external hidden unnamed_addr constant [22 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @jsmn_parse(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @jsmn_init(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Settings4LoadEv(ptr noundef nonnull align 4 dereferenceable(46) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca %struct.jsmn_parser, align 4
  %8 = alloca [32 x %struct.jsmntok], align 16
  %9 = alloca i32, align 4
  %10 = alloca [32 x i8], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  %18 = load ptr, ptr @_ZL8fileName, align 8, !tbaa !5
  %19 = call noundef zeroext i1 @_ZL8ReadFileRPcRiPKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef %18)
  %20 = zext i1 %19 to i8
  store i8 %20, ptr %5, align 1, !tbaa !11
  %21 = load i8, ptr %5, align 1, !tbaa !11, !range !13, !noundef !14
  %22 = trunc i8 %21 to i1
  %23 = zext i1 %22 to i32
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %26

25:                                               ; preds = %1
  store i32 1, ptr %6, align 4
  br label %153

26:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 512, ptr %8) #6
  call void @jsmn_init(ptr noundef %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = load i32, ptr %4, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [32 x %struct.jsmntok], ptr %8, i64 0, i64 0
  %31 = call i32 @jsmn_parse(ptr noundef %7, ptr noundef %27, i64 noundef %29, ptr noundef %30, i32 noundef 32)
  store i32 %31, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %148, %26
  %33 = load i32, ptr %11, align 4, !tbaa !9
  %34 = load i32, ptr %9, align 4, !tbaa !9
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %151

37:                                               ; preds = %32
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = load i32, ptr %11, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [32 x %struct.jsmntok], ptr %8, i64 0, i64 %40
  %42 = call noundef i32 @_ZL6jsoneqPKcP7jsmntokS0_(ptr noundef %38, ptr noundef %41, ptr noundef @.str.20)
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %85

44:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = add nsw i32 %45, 1
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [32 x %struct.jsmntok], ptr %8, i64 0, i64 %47
  %49 = getelementptr inbounds %struct.jsmntok, ptr %48, i32 0, i32 2
  %50 = load i32, ptr %49, align 8, !tbaa !15
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [32 x %struct.jsmntok], ptr %8, i64 0, i64 %53
  %55 = getelementptr inbounds %struct.jsmntok, ptr %54, i32 0, i32 1
  %56 = load i32, ptr %55, align 4, !tbaa !18
  %57 = sub nsw i32 %50, %56
  store i32 %57, ptr %12, align 4, !tbaa !9
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = icmp slt i32 %58, 32
  br i1 %59, label %60, label %61

60:                                               ; preds = %44
  br label %63

61:                                               ; preds = %44
  call void @__assert_fail(ptr noundef @.str.21, ptr noundef @.str.22, i32 noundef 109, ptr noundef @__PRETTY_FUNCTION__._ZN8Settings4LoadEv) #7
  unreachable

62:                                               ; No predecessors!
  br label %63

63:                                               ; preds = %62, %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = load i32, ptr %11, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [32 x %struct.jsmntok], ptr %8, i64 0, i64 %67
  %69 = getelementptr inbounds %struct.jsmntok, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !18
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i8, ptr %64, i64 %71
  store ptr %72, ptr %13, align 8, !tbaa !5
  %73 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = load i32, ptr %12, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = call ptr @strncpy(ptr noundef %73, ptr noundef %74, i64 noundef %76) #6
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 %79
  store i8 0, ptr %80, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %81 = getelementptr inbounds [32 x i8], ptr %10, i64 0, i64 0
  %82 = call i64 @strtol(ptr noundef %81, ptr noundef %14, i32 noundef 10) #6
  %83 = trunc i64 %82 to i32
  %84 = getelementptr inbounds %struct.Settings, ptr %17, i32 0, i32 0
  store i32 %83, ptr %84, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %147

85:                                               ; preds = %37
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [32 x %struct.jsmntok], ptr %8, i64 0, i64 %88
  %90 = call noundef i32 @_ZL6jsoneqPKcP7jsmntokS0_(ptr noundef %86, ptr noundef %89, ptr noundef @.str.23)
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %92, label %115

92:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = load i32, ptr %11, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [32 x %struct.jsmntok], ptr %8, i64 0, i64 %96
  %98 = getelementptr inbounds %struct.jsmntok, ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 4, !tbaa !18
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i8, ptr %93, i64 %100
  store ptr %101, ptr %15, align 8, !tbaa !5
  %102 = load ptr, ptr %15, align 8, !tbaa !5
  %103 = call i32 @strncmp(ptr noundef %102, ptr noundef @.str.4, i64 noundef 4) #8
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %107

105:                                              ; preds = %92
  %106 = getelementptr inbounds %struct.Settings, ptr %17, i32 0, i32 7
  store i8 1, ptr %106, align 1, !tbaa !23
  br label %114

107:                                              ; preds = %92
  %108 = load ptr, ptr %15, align 8, !tbaa !5
  %109 = call i32 @strncmp(ptr noundef %108, ptr noundef @.str.5, i64 noundef 5) #8
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %113

111:                                              ; preds = %107
  %112 = getelementptr inbounds %struct.Settings, ptr %17, i32 0, i32 7
  store i8 0, ptr %112, align 1, !tbaa !23
  br label %113

113:                                              ; preds = %111, %107
  br label %114

114:                                              ; preds = %113, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %146

115:                                              ; preds = %85
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = load i32, ptr %11, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [32 x %struct.jsmntok], ptr %8, i64 0, i64 %118
  %120 = call noundef i32 @_ZL6jsoneqPKcP7jsmntokS0_(ptr noundef %116, ptr noundef %119, ptr noundef @.str.24)
  %121 = icmp eq i32 %120, 0
  br i1 %121, label %122, label %145

122:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [32 x %struct.jsmntok], ptr %8, i64 0, i64 %126
  %128 = getelementptr inbounds %struct.jsmntok, ptr %127, i32 0, i32 1
  %129 = load i32, ptr %128, align 4, !tbaa !18
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i8, ptr %123, i64 %130
  store ptr %131, ptr %16, align 8, !tbaa !5
  %132 = load ptr, ptr %16, align 8, !tbaa !5
  %133 = call i32 @strncmp(ptr noundef %132, ptr noundef @.str.4, i64 noundef 4) #8
  %134 = icmp eq i32 %133, 0
  br i1 %134, label %135, label %137

135:                                              ; preds = %122
  %136 = getelementptr inbounds %struct.Settings, ptr %17, i32 0, i32 8
  store i8 1, ptr %136, align 2, !tbaa !24
  br label %144

137:                                              ; preds = %122
  %138 = load ptr, ptr %16, align 8, !tbaa !5
  %139 = call i32 @strncmp(ptr noundef %138, ptr noundef @.str.5, i64 noundef 5) #8
  %140 = icmp eq i32 %139, 0
  br i1 %140, label %141, label %143

141:                                              ; preds = %137
  %142 = getelementptr inbounds %struct.Settings, ptr %17, i32 0, i32 8
  store i8 0, ptr %142, align 2, !tbaa !24
  br label %143

143:                                              ; preds = %141, %137
  br label %144

144:                                              ; preds = %143, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %145

145:                                              ; preds = %144, %115
  br label %146

146:                                              ; preds = %145, %114
  br label %147

147:                                              ; preds = %146, %63
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %11, align 4, !tbaa !9
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %11, align 4, !tbaa !9
  br label %32, !llvm.loop !25

151:                                              ; preds = %36
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %152) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #6
  store i32 0, ptr %6, align 4
  br label %153

153:                                              ; preds = %151, %25
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  %154 = load i32, ptr %6, align 4
  switch i32 %154, label %156 [
    i32 0, label %155
    i32 1, label %155
  ]

155:                                              ; preds = %153, %153
  ret void

156:                                              ; preds = %153
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL8ReadFileRPcRiPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL6jsoneqPKcP7jsmntokS0_(ptr noundef, ptr noundef, ptr noundef) #2

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #5

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

attributes #0 = { mustprogress 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 = { mustprogress 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 = { 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 #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 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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !10, i64 8}
!16 = !{!"_ZTS7jsmntok", !17, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!17 = !{!"_ZTS10jsmntype_t", !7, i64 0}
!18 = !{!16, !10, i64 4}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTS8Settings", !10, i64 0, !10, i64 4, !10, i64 8, !22, i64 12, !10, i64 16, !10, i64 20, !12, i64 24, !12, i64 25, !12, i64 26, !12, i64 27, !12, i64 28, !12, i64 29, !12, i64 30, !12, i64 31, !12, i64 32, !12, i64 33, !12, i64 34, !12, i64 35, !12, i64 36, !12, i64 37, !12, i64 38, !12, i64 39, !12, i64 40, !12, i64 41, !12, i64 42, !12, i64 43, !12, i64 44, !12, i64 45}
!22 = !{!"float", !7, i64 0}
!23 = !{!21, !12, i64 25}
!24 = !{!21, !12, i64 26}
!25 = distinct !{!25, !26}
!26 = !{!"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"

%struct.jsmn_parser = type { i32, i32, i32 }
%struct.jsmntok = type { i32, i32, i32, i32 }

@_ZL8fileName = external hidden local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._ZN8Settings4LoadEv = external hidden unnamed_addr constant [22 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @jsmn_parse(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @jsmn_init(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Settings4LoadEv(ptr nocapture noundef nonnull writeonly align 4 dereferenceable(46) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %struct.jsmn_parser, align 4
  %5 = alloca [32 x %struct.jsmntok], align 16
  %6 = alloca [32 x i8], align 16
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  store ptr null, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !9
  %8 = load ptr, ptr @_ZL8fileName, align 8, !tbaa !5
  %9 = call noundef zeroext i1 @_ZL8ReadFileRPcRiPKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef %8)
  br i1 %9, label %10, label %79

10:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %5) #8
  call void @jsmn_init(ptr noundef nonnull %4)
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = load i32, ptr %3, align 4, !tbaa !9
  %13 = sext i32 %12 to i64
  %14 = call i32 @jsmn_parse(ptr noundef nonnull %4, ptr noundef %11, i64 noundef %13, ptr noundef nonnull %5, i32 noundef 32)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #8
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10
  %16 = getelementptr inbounds i8, ptr %0, i64 26
  %17 = getelementptr inbounds i8, ptr %0, i64 25
  %wide.trip.count = zext nneg i32 %14 to i64
  br label %19

._crit_edge:                                      ; preds = %78, %10
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %18) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #8
  br label %79

19:                                               ; preds = %.lr.ph, %78
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.pre-phi, %78 ]
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds [32 x %struct.jsmntok], ptr %5, i64 0, i64 %indvars.iv
  %22 = call noundef i32 @_ZL6jsoneqPKcP7jsmntokS0_(ptr noundef %20, ptr noundef nonnull %21, ptr noundef nonnull @.str.20)
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %43

24:                                               ; preds = %19
  %25 = add nuw nsw i64 %indvars.iv, 1
  %26 = getelementptr inbounds [32 x %struct.jsmntok], ptr %5, i64 0, i64 %25
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !11
  %29 = getelementptr inbounds i8, ptr %26, i64 4
  %30 = load i32, ptr %29, align 4, !tbaa !14
  %31 = sub nsw i32 %28, %30
  %32 = icmp slt i32 %31, 32
  br i1 %32, label %34, label %33

33:                                               ; preds = %24
  call void @__assert_fail(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.22, i32 noundef 109, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Settings4LoadEv) #9
  unreachable

34:                                               ; preds = %24
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = sext i32 %30 to i64
  %37 = getelementptr inbounds i8, ptr %35, i64 %36
  %38 = sext i32 %31 to i64
  %39 = call ptr @strncpy(ptr noundef nonnull %6, ptr noundef %37, i64 noundef %38) #8
  %40 = getelementptr inbounds [32 x i8], ptr %6, i64 0, i64 %38
  store i8 0, ptr %40, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %41 = call i64 @strtol(ptr noundef nonnull %6, ptr noundef nonnull %7, i32 noundef 10) #8
  %42 = trunc i64 %41 to i32
  store i32 %42, ptr %0, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %78

43:                                               ; preds = %19
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = call noundef i32 @_ZL6jsoneqPKcP7jsmntokS0_(ptr noundef %44, ptr noundef nonnull %21, ptr noundef nonnull @.str.23)
  %46 = icmp eq i32 %45, 0
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  br i1 %46, label %48, label %61

48:                                               ; preds = %43
  %49 = add nuw nsw i64 %indvars.iv, 1
  %50 = getelementptr inbounds [32 x %struct.jsmntok], ptr %5, i64 0, i64 %49, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !14
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %47, i64 %52
  %54 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %53, ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef 4) #10
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %48
  store i8 1, ptr %17, align 1, !tbaa !20
  br label %78

57:                                               ; preds = %48
  %58 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %53, ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef 5) #10
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %78

60:                                               ; preds = %57
  store i8 0, ptr %17, align 1, !tbaa !20
  br label %78

61:                                               ; preds = %43
  %62 = call noundef i32 @_ZL6jsoneqPKcP7jsmntokS0_(ptr noundef %47, ptr noundef nonnull %21, ptr noundef nonnull @.str.24)
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %._crit_edge23

._crit_edge23:                                    ; preds = %61
  %.pre = add nuw nsw i64 %indvars.iv, 1
  br label %78

64:                                               ; preds = %61
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = add nuw nsw i64 %indvars.iv, 1
  %67 = getelementptr inbounds [32 x %struct.jsmntok], ptr %5, i64 0, i64 %66, i32 1
  %68 = load i32, ptr %67, align 4, !tbaa !14
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i8, ptr %65, i64 %69
  %71 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %70, ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef 4) #10
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %64
  store i8 1, ptr %16, align 2, !tbaa !21
  br label %78

74:                                               ; preds = %64
  %75 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %70, ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef 5) #10
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %74
  store i8 0, ptr %16, align 2, !tbaa !21
  br label %78

78:                                               ; preds = %._crit_edge23, %73, %77, %74, %56, %60, %57, %34
  %indvars.iv.next.pre-phi = phi i64 [ %.pre, %._crit_edge23 ], [ %66, %73 ], [ %66, %77 ], [ %66, %74 ], [ %49, %56 ], [ %49, %60 ], [ %49, %57 ], [ %25, %34 ]
  %exitcond.not = icmp eq i64 %indvars.iv.next.pre-phi, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %19, !llvm.loop !22

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL8ReadFileRPcRiPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL6jsoneqPKcP7jsmntokS0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr 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

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #6

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 = { 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 #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 = { mustprogress nofree nounwind willreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS7jsmntok", !13, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!13 = !{!"_ZTS10jsmntype_t", !7, i64 0}
!14 = !{!12, !10, i64 4}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTS8Settings", !10, i64 0, !10, i64 4, !10, i64 8, !18, i64 12, !10, i64 16, !10, i64 20, !19, i64 24, !19, i64 25, !19, i64 26, !19, i64 27, !19, i64 28, !19, i64 29, !19, i64 30, !19, i64 31, !19, i64 32, !19, i64 33, !19, i64 34, !19, i64 35, !19, i64 36, !19, i64 37, !19, i64 38, !19, i64 39, !19, i64 40, !19, i64 41, !19, i64 42, !19, i64 43, !19, i64 44, !19, i64 45}
!18 = !{!"float", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!17, !19, i64 25}
!21 = !{!17, !19, i64 26}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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