; LLVM IR from openappsec/openappsec :: external/yajl/src (yajl_encode)

; 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.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [87 x i8], align 1
@__PRETTY_FUNCTION__.yajl_string_decode = external hidden unnamed_addr constant [65 x i8], align 1

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(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 void @yajl_string_decode(ptr noundef %0, ptr noundef %1, i64 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca [5 x i8], align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %14

14:                                               ; preds = %125, %119, %3
  %15 = load i64, ptr %8, align 8, !tbaa !9
  %16 = load i64, ptr %6, align 8, !tbaa !9
  %17 = icmp ult i64 %15, %16
  br i1 %17, label %18, label %126

18:                                               ; preds = %14
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = load i64, ptr %8, align 8, !tbaa !9
  %21 = getelementptr inbounds i8, ptr %19, i64 %20
  %22 = load i8, ptr %21, align 1, !tbaa !11
  %23 = zext i8 %22 to i32
  %24 = icmp eq i32 %23, 92
  br i1 %24, label %25, label %122

25:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 5, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store ptr @.str.8, ptr %10, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = load i64, ptr %7, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %27, i64 %28
  %30 = load i64, ptr %8, align 8, !tbaa !9
  %31 = load i64, ptr %7, align 8, !tbaa !9
  %32 = sub i64 %30, %31
  call void @yajl_buf_append(ptr noundef %26, ptr noundef %29, i64 noundef %32)
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load i64, ptr %8, align 8, !tbaa !9
  %35 = add i64 %34, 1
  store i64 %35, ptr %8, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %33, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = zext i8 %37 to i32
  switch i32 %38, label %109 [
    i32 114, label %39
    i32 110, label %40
    i32 92, label %41
    i32 47, label %42
    i32 34, label %43
    i32 102, label %44
    i32 98, label %45
    i32 116, label %46
    i32 117, label %47
  ]

39:                                               ; preds = %25
  store ptr @.str.9, ptr %10, align 8, !tbaa !5
  br label %110

40:                                               ; preds = %25
  store ptr @.str.10, ptr %10, align 8, !tbaa !5
  br label %110

41:                                               ; preds = %25
  store ptr @.str.11, ptr %10, align 8, !tbaa !5
  br label %110

42:                                               ; preds = %25
  store ptr @.str.12, ptr %10, align 8, !tbaa !5
  br label %110

43:                                               ; preds = %25
  store ptr @.str.13, ptr %10, align 8, !tbaa !5
  br label %110

44:                                               ; preds = %25
  store ptr @.str.14, ptr %10, align 8, !tbaa !5
  br label %110

45:                                               ; preds = %25
  store ptr @.str.15, ptr %10, align 8, !tbaa !5
  br label %110

46:                                               ; preds = %25
  store ptr @.str.16, ptr %10, align 8, !tbaa !5
  br label %110

47:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !12
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = load i64, ptr %8, align 8, !tbaa !9
  %50 = add i64 %49, 1
  store i64 %50, ptr %8, align 8, !tbaa !9
  %51 = getelementptr inbounds i8, ptr %48, i64 %50
  call void @hexToDigit(ptr noundef %11, ptr noundef %51)
  %52 = load i64, ptr %8, align 8, !tbaa !9
  %53 = add i64 %52, 3
  store i64 %53, ptr %8, align 8, !tbaa !9
  %54 = load i32, ptr %11, align 4, !tbaa !12
  %55 = and i32 %54, 64512
  %56 = icmp eq i32 %55, 55296
  br i1 %56, label %57, label %95

57:                                               ; preds = %47
  %58 = load i64, ptr %8, align 8, !tbaa !9
  %59 = add i64 %58, 1
  store i64 %59, ptr %8, align 8, !tbaa !9
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = load i64, ptr %8, align 8, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %60, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !11
  %64 = zext i8 %63 to i32
  %65 = icmp eq i32 %64, 92
  br i1 %65, label %66, label %93

66:                                               ; preds = %57
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = load i64, ptr %8, align 8, !tbaa !9
  %69 = add i64 %68, 1
  %70 = getelementptr inbounds i8, ptr %67, i64 %69
  %71 = load i8, ptr %70, align 1, !tbaa !11
  %72 = zext i8 %71 to i32
  %73 = icmp eq i32 %72, 117
  br i1 %73, label %74, label %93

74:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !12
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = load i64, ptr %8, align 8, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %75, i64 %76
  %78 = getelementptr inbounds i8, ptr %77, i64 2
  call void @hexToDigit(ptr noundef %12, ptr noundef %78)
  %79 = load i32, ptr %11, align 4, !tbaa !12
  %80 = and i32 %79, 63
  %81 = shl i32 %80, 10
  %82 = load i32, ptr %11, align 4, !tbaa !12
  %83 = lshr i32 %82, 6
  %84 = and i32 %83, 15
  %85 = add i32 %84, 1
  %86 = shl i32 %85, 16
  %87 = or i32 %81, %86
  %88 = load i32, ptr %12, align 4, !tbaa !12
  %89 = and i32 %88, 1023
  %90 = or i32 %87, %89
  store i32 %90, ptr %11, align 4, !tbaa !12
  %91 = load i64, ptr %8, align 8, !tbaa !9
  %92 = add i64 %91, 5
  store i64 %92, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %94

93:                                               ; preds = %66, %57
  store ptr @.str.8, ptr %10, align 8, !tbaa !5
  store i32 4, ptr %13, align 4
  br label %107

94:                                               ; preds = %74
  br label %95

95:                                               ; preds = %94, %47
  %96 = load i32, ptr %11, align 4, !tbaa !12
  %97 = getelementptr inbounds [5 x i8], ptr %9, i64 0, i64 0
  call void @Utf32toUtf8(i32 noundef %96, ptr noundef %97)
  %98 = getelementptr inbounds [5 x i8], ptr %9, i64 0, i64 0
  store ptr %98, ptr %10, align 8, !tbaa !5
  %99 = load i32, ptr %11, align 4, !tbaa !12
  %100 = icmp eq i32 %99, 0
  br i1 %100, label %101, label %106

101:                                              ; preds = %95
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  call void @yajl_buf_append(ptr noundef %102, ptr noundef %103, i64 noundef 1)
  %104 = load i64, ptr %8, align 8, !tbaa !9
  %105 = add i64 %104, 1
  store i64 %105, ptr %8, align 8, !tbaa !9
  store i64 %105, ptr %7, align 8, !tbaa !9
  store i32 2, ptr %13, align 4
  br label %107, !llvm.loop !14

106:                                              ; preds = %95
  store i32 4, ptr %13, align 4
  br label %107

107:                                              ; preds = %106, %101, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %108 = load i32, ptr %13, align 4
  switch i32 %108, label %119 [
    i32 4, label %110
  ]

109:                                              ; preds = %25
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.18, i32 noundef 169, ptr noundef @__PRETTY_FUNCTION__.yajl_string_decode) #6
  unreachable

110:                                              ; preds = %107, %46, %45, %44, %43, %42, %41, %40, %39
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = call i64 @strlen(ptr noundef %113) #7
  %115 = trunc i64 %114 to i32
  %116 = zext i32 %115 to i64
  call void @yajl_buf_append(ptr noundef %111, ptr noundef %112, i64 noundef %116)
  %117 = load i64, ptr %8, align 8, !tbaa !9
  %118 = add i64 %117, 1
  store i64 %118, ptr %8, align 8, !tbaa !9
  store i64 %118, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %13, align 4
  br label %119

119:                                              ; preds = %110, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %9) #5
  %120 = load i32, ptr %13, align 4
  switch i32 %120, label %134 [
    i32 0, label %121
    i32 2, label %14
  ]

121:                                              ; preds = %119
  br label %125

122:                                              ; preds = %18
  %123 = load i64, ptr %8, align 8, !tbaa !9
  %124 = add i64 %123, 1
  store i64 %124, ptr %8, align 8, !tbaa !9
  br label %125

125:                                              ; preds = %122, %121
  br label %14, !llvm.loop !14

126:                                              ; preds = %14
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = load i64, ptr %7, align 8, !tbaa !9
  %130 = getelementptr inbounds i8, ptr %128, i64 %129
  %131 = load i64, ptr %8, align 8, !tbaa !9
  %132 = load i64, ptr %7, align 8, !tbaa !9
  %133 = sub i64 %131, %132
  call void @yajl_buf_append(ptr noundef %127, ptr noundef %130, i64 noundef %133)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void

134:                                              ; preds = %119
  unreachable
}

declare void @yajl_buf_append(ptr noundef, ptr noundef, i64 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @hexToDigit(ptr noundef, ptr noundef) #2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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

@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [87 x i8], align 1
@__PRETTY_FUNCTION__.yajl_string_decode = external hidden unnamed_addr constant [65 x i8], align 1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture 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 void @yajl_string_decode(ptr noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #2 {
  %4 = alloca [5 x i8], align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %.not = icmp eq i64 %2, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3, %.backedge
  %.03857 = phi i64 [ %.038.be, %.backedge ], [ 0, %3 ]
  %.04056 = phi i64 [ %.040.be, %.backedge ], [ 0, %3 ]
  %7 = getelementptr inbounds i8, ptr %1, i64 %.03857
  %8 = load i8, ptr %7, align 1, !tbaa !5
  %9 = icmp eq i8 %8, 92
  br i1 %9, label %10, label %60

10:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %4) #5
  %11 = getelementptr inbounds i8, ptr %1, i64 %.04056
  %12 = sub i64 %.03857, %.04056
  call void @yajl_buf_append(ptr noundef %0, ptr noundef %11, i64 noundef %12) #5
  %13 = add nuw i64 %.03857, 1
  %14 = getelementptr inbounds i8, ptr %1, i64 %13
  %15 = load i8, ptr %14, align 1, !tbaa !5
  switch i8 %15, label %54 [
    i8 114, label %.thread49
    i8 110, label %16
    i8 92, label %17
    i8 47, label %18
    i8 34, label %19
    i8 102, label %20
    i8 98, label %21
    i8 116, label %22
    i8 117, label %23
  ]

16:                                               ; preds = %10
  br label %.thread49

17:                                               ; preds = %10
  br label %.thread49

18:                                               ; preds = %10
  br label %.thread49

19:                                               ; preds = %10
  br label %.thread49

20:                                               ; preds = %10
  br label %.thread49

21:                                               ; preds = %10
  br label %.thread49

22:                                               ; preds = %10
  br label %.thread49

23:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 0, ptr %5, align 4, !tbaa !8
  %24 = getelementptr i8, ptr %7, i64 2
  call void @hexToDigit(ptr noundef nonnull %5, ptr noundef %24)
  %25 = add i64 %.03857, 5
  %26 = load i32, ptr %5, align 4, !tbaa !8
  %27 = and i32 %26, 64512
  %28 = icmp eq i32 %27, 55296
  br i1 %28, label %29, label %50

29:                                               ; preds = %23
  %30 = add i64 %.03857, 6
  %31 = getelementptr inbounds i8, ptr %1, i64 %30
  %32 = load i8, ptr %31, align 1, !tbaa !5
  %33 = icmp eq i8 %32, 92
  br i1 %33, label %34, label %.thread

34:                                               ; preds = %29
  %35 = getelementptr i8, ptr %7, i64 7
  %36 = load i8, ptr %35, align 1, !tbaa !5
  %37 = icmp eq i8 %36, 117
  br i1 %37, label %38, label %.thread

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 0, ptr %6, align 4, !tbaa !8
  %39 = getelementptr inbounds i8, ptr %31, i64 2
  call void @hexToDigit(ptr noundef nonnull %6, ptr noundef nonnull %39)
  %40 = load i32, ptr %5, align 4, !tbaa !8
  %41 = shl i32 %40, 10
  %42 = and i32 %41, 64512
  %43 = and i32 %41, 983040
  %44 = add nuw nsw i32 %43, 65536
  %45 = or disjoint i32 %44, %42
  %46 = load i32, ptr %6, align 4, !tbaa !8
  %47 = and i32 %46, 1023
  %48 = or disjoint i32 %45, %47
  store i32 %48, ptr %5, align 4, !tbaa !8
  %49 = add i64 %.03857, 11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %50

50:                                               ; preds = %38, %23
  %51 = phi i32 [ %48, %38 ], [ %26, %23 ]
  %.139 = phi i64 [ %49, %38 ], [ %25, %23 ]
  call void @Utf32toUtf8(i32 noundef %51, ptr noundef nonnull %4)
  %52 = load i32, ptr %5, align 4, !tbaa !8
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %58, label %.thread

.thread:                                          ; preds = %34, %29, %50
  %.2.ph = phi i64 [ %.139, %50 ], [ %30, %29 ], [ %30, %34 ]
  %.036.ph = phi ptr [ %4, %50 ], [ @.str.8, %29 ], [ @.str.8, %34 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %.thread49

54:                                               ; preds = %10
  call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.18, i32 noundef 169, ptr noundef nonnull @__PRETTY_FUNCTION__.yajl_string_decode) #6
  unreachable

.thread49:                                        ; preds = %16, %17, %18, %19, %20, %21, %22, %10, %.thread
  %.3 = phi i64 [ %13, %22 ], [ %13, %21 ], [ %13, %20 ], [ %13, %19 ], [ %13, %18 ], [ %13, %17 ], [ %13, %16 ], [ %13, %10 ], [ %.2.ph, %.thread ]
  %.137 = phi ptr [ @.str.16, %22 ], [ @.str.15, %21 ], [ @.str.14, %20 ], [ @.str.13, %19 ], [ @.str.12, %18 ], [ @.str.11, %17 ], [ @.str.10, %16 ], [ @.str.9, %10 ], [ %.036.ph, %.thread ]
  %55 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.137) #7
  %56 = and i64 %55, 4294967295
  call void @yajl_buf_append(ptr noundef %0, ptr noundef %.137, i64 noundef %56) #5
  %57 = add i64 %.3, 1
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %4) #5
  br label %.backedge

58:                                               ; preds = %50
  call void @yajl_buf_append(ptr noundef %0, ptr noundef nonnull %4, i64 noundef 1) #5
  %59 = add i64 %.139, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %4) #5
  br label %.backedge

60:                                               ; preds = %.lr.ph
  %61 = add nuw i64 %.03857, 1
  br label %.backedge

.backedge:                                        ; preds = %60, %.thread49, %58
  %.040.be = phi i64 [ %59, %58 ], [ %.04056, %60 ], [ %57, %.thread49 ]
  %.038.be = phi i64 [ %59, %58 ], [ %61, %60 ], [ %57, %.thread49 ]
  %62 = icmp ult i64 %.038.be, %2
  br i1 %62, label %.lr.ph, label %._crit_edge, !llvm.loop !10

._crit_edge:                                      ; preds = %.backedge, %3
  %.040.lcssa = phi i64 [ 0, %3 ], [ %.040.be, %.backedge ]
  %.038.lcssa = phi i64 [ 0, %3 ], [ %.038.be, %.backedge ]
  %63 = getelementptr inbounds i8, ptr %1, i64 %.040.lcssa
  %64 = sub i64 %.038.lcssa, %.040.lcssa
  call void @yajl_buf_append(ptr noundef %0, ptr noundef %63, i64 noundef %64) #5
  ret void
}

declare void @yajl_buf_append(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @hexToDigit(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @Utf32toUtf8(i32 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 #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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