; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_compiled_5)

; 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.w2c_hermes = type { ptr, ptr, ptr, i32, i32, i32, %struct.wasm_rt_memory_t, %struct.wasm_rt_funcref_table_t }
%struct.wasm_rt_memory_t = type { ptr, i64, i64, i64, i8 }
%struct.wasm_rt_funcref_table_t = type { ptr, i32, i32 }

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 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: inlinehint nounwind uwtable
declare hidden void @i64_store(ptr noundef, i64 noundef, i64 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @i64_load(ptr noundef, i64 noundef) #1

declare i32 @w2c_hermes_0x5F_memcpy(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3Aoperator0x3C0x3C0x28llvh0x3A0x3Araw_ostream0x260x2C0x20llvh0x3A0x3AArrayRef0x3Cchar16_t0x3E0x29(ptr noundef, i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3Aoperator0x3C0x3C0x28llvh0x3A0x3Araw_ostream0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AStringView0x20const0x260x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.w2c_hermes, ptr %14, i32 0, i32 3
  %16 = load i32, ptr %15, align 8, !tbaa !11
  store i32 %16, ptr %10, align 4, !tbaa !9
  store i32 16, ptr %11, align 4, !tbaa !9
  %17 = load i32, ptr %11, align 4, !tbaa !9
  %18 = load i32, ptr %10, align 4, !tbaa !9
  %19 = sub i32 %18, %17
  store i32 %19, ptr %10, align 4, !tbaa !9
  %20 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %20, ptr %7, align 4, !tbaa !9
  %21 = load i32, ptr %10, align 4, !tbaa !9
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.w2c_hermes, ptr %22, i32 0, i32 3
  store i32 %21, ptr %23, align 8, !tbaa !11
  %24 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %24, ptr %10, align 4, !tbaa !9
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.w2c_hermes, ptr %25, i32 0, i32 6
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = add i64 %28, 8
  %30 = call i32 @i32_load(ptr noundef %26, i64 noundef %29)
  store i32 %30, ptr %10, align 4, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = load i32, ptr %11, align 4, !tbaa !9
  %33 = icmp slt i32 %31, %32
  %34 = zext i1 %33 to i32
  store i32 %34, ptr %10, align 4, !tbaa !9
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %121

37:                                               ; preds = %3
  %38 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %38, ptr %10, align 4, !tbaa !9
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToCharPtr0x280x290x20const(ptr noundef %39, i32 noundef %40)
  store i32 %41, ptr %10, align 4, !tbaa !9
  %42 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %42, ptr %8, align 4, !tbaa !9
  %43 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %43, ptr %10, align 4, !tbaa !9
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.w2c_hermes, ptr %44, i32 0, i32 6
  %46 = load i32, ptr %10, align 4, !tbaa !9
  %47 = zext i32 %46 to i64
  %48 = add i64 %47, 12
  %49 = call i32 @i32_load(ptr noundef %45, i64 noundef %48)
  store i32 %49, ptr %10, align 4, !tbaa !9
  %50 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %50, ptr %6, align 4, !tbaa !9
  %51 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %51, ptr %11, align 4, !tbaa !9
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.w2c_hermes, ptr %52, i32 0, i32 6
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = zext i32 %54 to i64
  %56 = add i64 %55, 8
  %57 = call i32 @i32_load(ptr noundef %53, i64 noundef %56)
  store i32 %57, ptr %11, align 4, !tbaa !9
  %58 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %58, ptr %12, align 4, !tbaa !9
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.w2c_hermes, ptr %59, i32 0, i32 6
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = zext i32 %61 to i64
  %63 = add i64 %62, 12
  %64 = call i32 @i32_load(ptr noundef %60, i64 noundef %63)
  store i32 %64, ptr %12, align 4, !tbaa !9
  %65 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %65, ptr %9, align 4, !tbaa !9
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = sub i32 %67, %66
  store i32 %68, ptr %11, align 4, !tbaa !9
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = icmp ugt i32 %69, %70
  %72 = zext i1 %71 to i32
  store i32 %72, ptr %10, align 4, !tbaa !9
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %85

75:                                               ; preds = %37
  %76 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %76, ptr %10, align 4, !tbaa !9
  %77 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %77, ptr %11, align 4, !tbaa !9
  %78 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %78, ptr %12, align 4, !tbaa !9
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = load i32, ptr %10, align 4, !tbaa !9
  %81 = load i32, ptr %11, align 4, !tbaa !9
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %79, i32 noundef %80, i32 noundef %81, i32 noundef %82)
  store i32 %83, ptr %10, align 4, !tbaa !9
  %84 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %84, ptr %5, align 4, !tbaa !9
  br label %169

85:                                               ; preds = %37
  %86 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %86, ptr %10, align 4, !tbaa !9
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = icmp ne i32 %87, 0
  %89 = xor i1 %88, true
  %90 = zext i1 %89 to i32
  store i32 %90, ptr %10, align 4, !tbaa !9
  %91 = load i32, ptr %10, align 4, !tbaa !9
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %94

93:                                               ; preds = %85
  br label %169

94:                                               ; preds = %85
  %95 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %95, ptr %10, align 4, !tbaa !9
  %96 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %96, ptr %11, align 4, !tbaa !9
  %97 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %97, ptr %12, align 4, !tbaa !9
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = load i32, ptr %12, align 4, !tbaa !9
  %102 = call i32 @w2c_hermes_0x5F_memcpy(ptr noundef %98, i32 noundef %99, i32 noundef %100, i32 noundef %101)
  store i32 %102, ptr %10, align 4, !tbaa !9
  %103 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %103, ptr %10, align 4, !tbaa !9
  %104 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %104, ptr %11, align 4, !tbaa !9
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.w2c_hermes, ptr %105, i32 0, i32 6
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = add i64 %108, 12
  %110 = call i32 @i32_load(ptr noundef %106, i64 noundef %109)
  store i32 %110, ptr %11, align 4, !tbaa !9
  %111 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %111, ptr %12, align 4, !tbaa !9
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = add i32 %113, %112
  store i32 %114, ptr %11, align 4, !tbaa !9
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.w2c_hermes, ptr %115, i32 0, i32 6
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = add i64 %118, 12
  %120 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %116, i64 noundef %119, i32 noundef %120)
  br label %169

121:                                              ; preds = %3
  %122 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %122, ptr %10, align 4, !tbaa !9
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = load i32, ptr %10, align 4, !tbaa !9
  %125 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToChar16Ptr0x280x290x20const(ptr noundef %123, i32 noundef %124)
  store i32 %125, ptr %10, align 4, !tbaa !9
  %126 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %126, ptr %8, align 4, !tbaa !9
  %127 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %127, ptr %10, align 4, !tbaa !9
  %128 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %128, ptr %11, align 4, !tbaa !9
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.w2c_hermes, ptr %129, i32 0, i32 6
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = zext i32 %131 to i64
  %133 = add i64 %132, 12
  %134 = call i32 @i32_load(ptr noundef %130, i64 noundef %133)
  store i32 %134, ptr %11, align 4, !tbaa !9
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.w2c_hermes, ptr %135, i32 0, i32 6
  %137 = load i32, ptr %10, align 4, !tbaa !9
  %138 = zext i32 %137 to i64
  %139 = add i64 %138, 12
  %140 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %136, i64 noundef %139, i32 noundef %140)
  %141 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %141, ptr %10, align 4, !tbaa !9
  %142 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %142, ptr %11, align 4, !tbaa !9
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.w2c_hermes, ptr %143, i32 0, i32 6
  %145 = load i32, ptr %10, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = add i64 %146, 8
  %148 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %144, i64 noundef %147, i32 noundef %148)
  %149 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %149, ptr %10, align 4, !tbaa !9
  %150 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %150, ptr %11, align 4, !tbaa !9
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.w2c_hermes, ptr %151, i32 0, i32 6
  %153 = load i32, ptr %11, align 4, !tbaa !9
  %154 = zext i32 %153 to i64
  %155 = add i64 %154, 8
  %156 = call i64 @i64_load(ptr noundef %152, i64 noundef %155)
  store i64 %156, ptr %13, align 8, !tbaa !17
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.w2c_hermes, ptr %157, i32 0, i32 6
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = zext i32 %159 to i64
  %161 = load i64, ptr %13, align 8, !tbaa !17
  call void @i64_store(ptr noundef %158, i64 noundef %160, i64 noundef %161)
  %162 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %162, ptr %10, align 4, !tbaa !9
  %163 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %163, ptr %11, align 4, !tbaa !9
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = load i32, ptr %10, align 4, !tbaa !9
  %166 = load i32, ptr %11, align 4, !tbaa !9
  %167 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3Aoperator0x3C0x3C0x28llvh0x3A0x3Araw_ostream0x260x2C0x20llvh0x3A0x3AArrayRef0x3Cchar16_t0x3E0x29(ptr noundef %164, i32 noundef %165, i32 noundef %166)
  store i32 %167, ptr %10, align 4, !tbaa !9
  %168 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %168, ptr %5, align 4, !tbaa !9
  br label %169

169:                                              ; preds = %121, %94, %93, %75
  %170 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %170, ptr %10, align 4, !tbaa !9
  store i32 16, ptr %11, align 4, !tbaa !9
  %171 = load i32, ptr %11, align 4, !tbaa !9
  %172 = load i32, ptr %10, align 4, !tbaa !9
  %173 = add i32 %172, %171
  store i32 %173, ptr %10, align 4, !tbaa !9
  %174 = load i32, ptr %10, align 4, !tbaa !9
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.w2c_hermes, ptr %175, i32 0, i32 3
  store i32 %174, ptr %176, align 8, !tbaa !11
  %177 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %177, ptr %10, align 4, !tbaa !9
  %178 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret i32 %178
}

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToCharPtr0x280x290x20const(ptr noundef, i32 noundef) #2

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToChar16Ptr0x280x290x20const(ptr noundef, i32 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #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 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 #4 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !13, i64 40, !16, i64 80}
!13 = !{!"", !6, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !15, i64 32}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!17 = !{!14, !14, 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"

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i64_store(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @i64_load(ptr noundef, i64 noundef) local_unnamed_addr #0

declare i32 @w2c_hermes_0x5F_memcpy(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3Aoperator0x3C0x3C0x28llvh0x3A0x3Araw_ostream0x260x2C0x20llvh0x3A0x3AArrayRef0x3Cchar16_t0x3E0x29(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3Aoperator0x3C0x3C0x28llvh0x3A0x3Araw_ostream0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AStringView0x20const0x260x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = add i32 %5, -16
  store i32 %6, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = zext i32 %2 to i64
  %9 = add nuw nsw i64 %8, 8
  %10 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  %11 = icmp slt i32 %10, 0
  %12 = add nuw nsw i64 %8, 12
  br i1 %11, label %13, label %30

13:                                               ; preds = %3
  %14 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToCharPtr0x280x290x20const(ptr noundef nonnull %0, i32 noundef %2) #3
  %15 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %12)
  %16 = zext i32 %1 to i64
  %17 = add nuw nsw i64 %16, 8
  %18 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %17)
  %19 = add nuw nsw i64 %16, 12
  %20 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %19)
  %21 = sub i32 %18, %20
  %22 = icmp ugt i32 %15, %21
  br i1 %22, label %23, label %25

23:                                               ; preds = %13
  %24 = tail call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %14, i32 noundef %15) #3
  br label %38

25:                                               ; preds = %13
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %38, label %26

26:                                               ; preds = %25
  %27 = tail call i32 @w2c_hermes_0x5F_memcpy(ptr noundef nonnull %0, i32 noundef %20, i32 noundef %14, i32 noundef %15) #3
  %28 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %19)
  %29 = add i32 %28, %15
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %19, i32 noundef %29)
  br label %38

30:                                               ; preds = %3
  %31 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToChar16Ptr0x280x290x20const(ptr noundef nonnull %0, i32 noundef %2) #3
  %32 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %12)
  %33 = zext i32 %6 to i64
  %34 = add nuw nsw i64 %33, 12
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %34, i32 noundef %32)
  %35 = add nuw nsw i64 %33, 8
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %35, i32 noundef %31)
  %36 = tail call i64 @i64_load(ptr noundef nonnull %7, i64 noundef %35)
  tail call void @i64_store(ptr noundef nonnull %7, i64 noundef %33, i64 noundef %36)
  %37 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3Aoperator0x3C0x3C0x28llvh0x3A0x3Araw_ostream0x260x2C0x20llvh0x3A0x3AArrayRef0x3Cchar16_t0x3E0x29(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %6)
  br label %38

38:                                               ; preds = %25, %30, %26, %23
  %.0 = phi i32 [ %24, %23 ], [ %1, %25 ], [ %1, %26 ], [ %37, %30 ]
  store i32 %5, ptr %4, align 8, !tbaa !5
  ret i32 %.0
}

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToCharPtr0x280x290x20const(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToChar16Ptr0x280x290x20const(ptr noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { inlinehint 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!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, !10, i64 24}
!6 = !{!"w2c_hermes", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !14, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12}


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