; LLVM IR from seppo0010/rlite :: src (type_string)

; 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 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @rl_set(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef, i64 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: nounwind uwtable
declare hidden i32 @rl_string_get_objects(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_incr(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store i64 %3, ptr %9, align 8, !tbaa !11
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = load i64, ptr %8, align 8, !tbaa !9
  %21 = call i32 @rl_string_get_objects(ptr noundef %18, ptr noundef %19, i64 noundef %20, ptr noundef %11, ptr noundef %17, ptr noundef null)
  store i32 %21, ptr %12, align 4, !tbaa !13
  %22 = load i32, ptr %12, align 4, !tbaa !13
  %23 = icmp ne i32 0, %22
  br i1 %23, label %24, label %28

24:                                               ; preds = %5
  %25 = load i32, ptr %12, align 4, !tbaa !13
  %26 = icmp ne i32 3, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %24
  br label %144

28:                                               ; preds = %24, %5
  %29 = load i32, ptr %12, align 4, !tbaa !13
  %30 = icmp eq i32 %29, 3
  br i1 %30, label %31, label %53

31:                                               ; preds = %28
  %32 = call noalias ptr @malloc(i64 noundef 22) #7
  store ptr %32, ptr %13, align 8, !tbaa !5
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  store i32 4, ptr %12, align 4, !tbaa !13
  br label %144

36:                                               ; preds = %31
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = load i64, ptr %9, align 8, !tbaa !11
  %39 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %37, i64 noundef 22, ptr noundef @.str, i64 noundef %38) #6
  %40 = sext i32 %39 to i64
  store i64 %40, ptr %15, align 8, !tbaa !9
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %46

43:                                               ; preds = %36
  %44 = load i64, ptr %9, align 8, !tbaa !11
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %44, ptr %45, align 8, !tbaa !11
  br label %46

46:                                               ; preds = %43, %36
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load i64, ptr %8, align 8, !tbaa !9
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = load i64, ptr %15, align 8, !tbaa !9
  %52 = call i32 @rl_set(ptr noundef %47, ptr noundef %48, i64 noundef %49, ptr noundef %50, i64 noundef %51, i32 noundef 1, i64 noundef 0)
  store i32 %52, ptr %12, align 4, !tbaa !13
  br label %144

53:                                               ; preds = %28
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load i64, ptr %11, align 8, !tbaa !9
  %56 = call i32 @rl_multi_string_getrange(ptr noundef %54, i64 noundef %55, ptr noundef %13, ptr noundef %15, i64 noundef 0, i64 noundef 23)
  store i32 %56, ptr %12, align 4, !tbaa !13
  %57 = load i32, ptr %12, align 4, !tbaa !13
  %58 = icmp ne i32 0, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %53
  br label %144

60:                                               ; preds = %53
  %61 = load i64, ptr %15, align 8, !tbaa !9
  %62 = icmp eq i64 %61, 23
  br i1 %62, label %63, label %64

63:                                               ; preds = %60
  store i32 11, ptr %12, align 4, !tbaa !13
  br label %144

64:                                               ; preds = %60
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = call i64 @strtoll(ptr noundef %65, ptr noundef %14, i32 noundef 10) #6
  store i64 %66, ptr %16, align 8, !tbaa !11
  %67 = call ptr @__ctype_b_loc() #8
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 0
  %71 = load i8, ptr %70, align 1, !tbaa !15
  %72 = sext i8 %71 to i32
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds i16, ptr %68, i64 %73
  %75 = load i16, ptr %74, align 2, !tbaa !16
  %76 = zext i16 %75 to i32
  %77 = and i32 %76, 8192
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %89, label %79

79:                                               ; preds = %64
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i64 0
  %82 = load i8, ptr %81, align 1, !tbaa !15
  %83 = sext i8 %82 to i32
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %89, label %85

85:                                               ; preds = %79
  %86 = call ptr @__errno_location() #8
  %87 = load i32, ptr %86, align 4, !tbaa !13
  %88 = icmp eq i32 %87, 34
  br i1 %88, label %89, label %90

89:                                               ; preds = %85, %79, %64
  store i32 11, ptr %12, align 4, !tbaa !13
  br label %144

90:                                               ; preds = %85
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %91) #6
  store ptr null, ptr %13, align 8, !tbaa !5
  %92 = load i64, ptr %9, align 8, !tbaa !11
  %93 = icmp slt i64 %92, 0
  br i1 %93, label %94, label %102

94:                                               ; preds = %90
  %95 = load i64, ptr %16, align 8, !tbaa !11
  %96 = icmp slt i64 %95, 0
  br i1 %96, label %97, label %102

97:                                               ; preds = %94
  %98 = load i64, ptr %9, align 8, !tbaa !11
  %99 = load i64, ptr %16, align 8, !tbaa !11
  %100 = sub nsw i64 -9223372036854775808, %99
  %101 = icmp slt i64 %98, %100
  br i1 %101, label %113, label %102

102:                                              ; preds = %97, %94, %90
  %103 = load i64, ptr %9, align 8, !tbaa !11
  %104 = icmp sgt i64 %103, 0
  br i1 %104, label %105, label %114

105:                                              ; preds = %102
  %106 = load i64, ptr %16, align 8, !tbaa !11
  %107 = icmp sgt i64 %106, 0
  br i1 %107, label %108, label %114

108:                                              ; preds = %105
  %109 = load i64, ptr %9, align 8, !tbaa !11
  %110 = load i64, ptr %16, align 8, !tbaa !11
  %111 = sub nsw i64 9223372036854775807, %110
  %112 = icmp sgt i64 %109, %111
  br i1 %112, label %113, label %114

113:                                              ; preds = %108, %97
  store i32 12, ptr %12, align 4, !tbaa !13
  br label %144

114:                                              ; preds = %108, %105, %102
  %115 = load i64, ptr %9, align 8, !tbaa !11
  %116 = load i64, ptr %16, align 8, !tbaa !11
  %117 = add nsw i64 %116, %115
  store i64 %117, ptr %16, align 8, !tbaa !11
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = icmp ne ptr %118, null
  br i1 %119, label %120, label %123

120:                                              ; preds = %114
  %121 = load i64, ptr %16, align 8, !tbaa !11
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %121, ptr %122, align 8, !tbaa !11
  br label %123

123:                                              ; preds = %120, %114
  %124 = call noalias ptr @malloc(i64 noundef 22) #7
  store ptr %124, ptr %13, align 8, !tbaa !5
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  store i32 4, ptr %12, align 4, !tbaa !13
  br label %144

128:                                              ; preds = %123
  %129 = load ptr, ptr %13, align 8, !tbaa !5
  %130 = load i64, ptr %16, align 8, !tbaa !11
  %131 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %129, i64 noundef 22, ptr noundef @.str, i64 noundef %130) #6
  %132 = sext i32 %131 to i64
  store i64 %132, ptr %15, align 8, !tbaa !9
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = load i64, ptr %8, align 8, !tbaa !9
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = load i64, ptr %15, align 8, !tbaa !9
  %138 = load i64, ptr %17, align 8, !tbaa !11
  %139 = call i32 @rl_set(ptr noundef %133, ptr noundef %134, i64 noundef %135, ptr noundef %136, i64 noundef %137, i32 noundef 0, i64 noundef %138)
  store i32 %139, ptr %12, align 4, !tbaa !13
  %140 = load i32, ptr %12, align 4, !tbaa !13
  %141 = icmp ne i32 0, %140
  br i1 %141, label %142, label %143

142:                                              ; preds = %128
  br label %144

143:                                              ; preds = %128
  store i32 0, ptr %12, align 4, !tbaa !13
  br label %144

144:                                              ; preds = %143, %142, %127, %113, %89, %63, %59, %46, %35, %27
  %145 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %145) #6
  %146 = load i32, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret i32 %146
}

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

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() #5

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #5

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 allocsize(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 #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(none) "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 allocsize(0) }
attributes #8 = { nounwind willreturn memory(none) }

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"short", !7, i64 0}


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

@.str = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @rl_set(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef, i64 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: nounwind uwtable
declare hidden i32 @rl_string_get_objects(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @rl_multi_string_getrange(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_incr(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef writeonly %4) local_unnamed_addr #0 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %11 = call i32 @rl_string_get_objects(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef nonnull %6, ptr noundef nonnull %10, ptr noundef null)
  switch i32 %11, label %65 [
    i32 3, label %12
    i32 0, label %20
  ]

12:                                               ; preds = %5
  %13 = call noalias dereferenceable_or_null(22) ptr @malloc(i64 noundef 22) #9
  store ptr %13, ptr %7, align 8, !tbaa !5
  %.not51 = icmp eq ptr %13, null
  br i1 %.not51, label %65, label %14

14:                                               ; preds = %12
  %15 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %13, i64 noundef 22, ptr noundef nonnull @.str, i64 noundef %3) #8
  %16 = sext i32 %15 to i64
  store i64 %16, ptr %9, align 8, !tbaa !9
  %.not52 = icmp eq ptr %4, null
  br i1 %.not52, label %18, label %17

17:                                               ; preds = %14
  store i64 %3, ptr %4, align 8, !tbaa !11
  br label %18

18:                                               ; preds = %17, %14
  %19 = call i32 @rl_set(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef nonnull %13, i64 noundef %16, i32 noundef 1, i64 noundef 0)
  br label %65

20:                                               ; preds = %5
  %21 = load i64, ptr %6, align 8, !tbaa !9
  %22 = call i32 @rl_multi_string_getrange(ptr noundef %0, i64 noundef %21, ptr noundef nonnull %7, ptr noundef nonnull %9, i64 noundef 0, i64 noundef 23) #8
  %.not = icmp eq i32 %22, 0
  br i1 %.not, label %23, label %65

23:                                               ; preds = %20
  %24 = load i64, ptr %9, align 8, !tbaa !9
  %25 = icmp eq i64 %24, 23
  br i1 %25, label %65, label %26

26:                                               ; preds = %23
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = call i64 @strtoll(ptr noundef %27, ptr noundef nonnull %8, i32 noundef 10) #8
  %29 = tail call ptr @__ctype_b_loc() #10
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load i8, ptr %31, align 1, !tbaa !13
  %33 = sext i8 %32 to i64
  %34 = getelementptr inbounds i16, ptr %30, i64 %33
  %35 = load i16, ptr %34, align 2, !tbaa !14
  %36 = and i16 %35, 8192
  %.not47 = icmp eq i16 %36, 0
  br i1 %.not47, label %37, label %65

37:                                               ; preds = %26
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = load i8, ptr %38, align 1, !tbaa !13
  %.not48 = icmp eq i8 %39, 0
  br i1 %.not48, label %40, label %65

40:                                               ; preds = %37
  %41 = tail call ptr @__errno_location() #10
  %42 = load i32, ptr %41, align 4, !tbaa !16
  %43 = icmp eq i32 %42, 34
  br i1 %43, label %65, label %44

44:                                               ; preds = %40
  call void @free(ptr noundef nonnull %31) #8
  store ptr null, ptr %7, align 8, !tbaa !5
  %45 = icmp slt i64 %3, 0
  %46 = icmp slt i64 %28, 0
  %or.cond3 = select i1 %45, i1 %46, i1 false
  %47 = sub nsw i64 -9223372036854775808, %28
  %48 = icmp sgt i64 %47, %3
  %or.cond = select i1 %or.cond3, i1 %48, i1 false
  br i1 %or.cond, label %65, label %49

49:                                               ; preds = %44
  %50 = icmp sgt i64 %3, 0
  %51 = icmp sgt i64 %28, 0
  %or.cond5 = select i1 %50, i1 %51, i1 false
  %52 = sub nuw nsw i64 9223372036854775807, %28
  %53 = icmp slt i64 %52, %3
  %or.cond55 = select i1 %or.cond5, i1 %53, i1 false
  br i1 %or.cond55, label %65, label %54

54:                                               ; preds = %49
  %55 = add nsw i64 %28, %3
  %.not49 = icmp eq ptr %4, null
  br i1 %.not49, label %57, label %56

56:                                               ; preds = %54
  store i64 %55, ptr %4, align 8, !tbaa !11
  br label %57

57:                                               ; preds = %56, %54
  %58 = call noalias dereferenceable_or_null(22) ptr @malloc(i64 noundef 22) #9
  store ptr %58, ptr %7, align 8, !tbaa !5
  %.not50 = icmp eq ptr %58, null
  br i1 %.not50, label %65, label %59

59:                                               ; preds = %57
  %60 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %58, i64 noundef 22, ptr noundef nonnull @.str, i64 noundef %55) #8
  %61 = sext i32 %60 to i64
  store i64 %61, ptr %9, align 8, !tbaa !9
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = load i64, ptr %10, align 8, !tbaa !11
  %64 = call i32 @rl_set(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %62, i64 noundef %61, i32 noundef 0, i64 noundef %63)
  br label %65

65:                                               ; preds = %57, %44, %49, %26, %37, %40, %23, %12, %5, %59, %20, %18
  %.0 = phi i32 [ %11, %5 ], [ %19, %18 ], [ %22, %20 ], [ %64, %59 ], [ 4, %12 ], [ 11, %23 ], [ 11, %40 ], [ 11, %37 ], [ 11, %26 ], [ 12, %49 ], [ 12, %44 ], [ 4, %57 ]
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %66) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  ret i32 %.0
}

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

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() local_unnamed_addr #7

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #7

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 = { mustprogress 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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { nounwind allocsize(0) }
attributes #10 = { nounwind willreturn memory(none) }

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass