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

; 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: 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 i32 @i32_load(ptr noundef, i64 noundef) #1

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

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

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

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

declare void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AthisBigIntValue0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AbigintPrototypeToLocaleString0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #3 {
  %6 = alloca ptr, align 8
  %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 i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.w2c_hermes, ptr %19, i32 0, i32 3
  %21 = load i32, ptr %20, align 8, !tbaa !13
  store i32 %21, ptr %13, align 4, !tbaa !9
  store i32 16, ptr %14, align 4, !tbaa !9
  %22 = load i32, ptr %14, align 4, !tbaa !9
  %23 = load i32, ptr %13, align 4, !tbaa !9
  %24 = sub i32 %23, %22
  store i32 %24, ptr %13, align 4, !tbaa !9
  %25 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %25, ptr %8, align 4, !tbaa !9
  %26 = load i32, ptr %13, align 4, !tbaa !9
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.w2c_hermes, ptr %27, i32 0, i32 3
  store i32 %26, ptr %28, align 8, !tbaa !13
  %29 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %29, ptr %13, align 4, !tbaa !9
  %30 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %30, ptr %14, align 4, !tbaa !9
  %31 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %31, ptr %15, align 4, !tbaa !9
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.w2c_hermes, ptr %32, i32 0, i32 6
  %34 = load i32, ptr %15, align 4, !tbaa !9
  %35 = zext i32 %34 to i64
  %36 = call i32 @i32_load(ptr noundef %33, i64 noundef %35)
  store i32 %36, ptr %15, align 4, !tbaa !9
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load i32, ptr %13, align 4, !tbaa !9
  %39 = load i32, ptr %14, align 4, !tbaa !9
  %40 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AthisBigIntValue0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef %37, i32 noundef %38, i32 noundef %39, i32 noundef %40)
  %41 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %41, ptr %13, align 4, !tbaa !9
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.w2c_hermes, ptr %42, i32 0, i32 6
  %44 = load i32, ptr %13, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = call i32 @i32_load(ptr noundef %43, i64 noundef %45)
  store i32 %46, ptr %13, align 4, !tbaa !9
  %47 = load i32, ptr %13, align 4, !tbaa !9
  %48 = icmp ne i32 %47, 0
  %49 = xor i1 %48, true
  %50 = zext i1 %49 to i32
  store i32 %50, ptr %13, align 4, !tbaa !9
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %60

53:                                               ; preds = %5
  %54 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %54, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.w2c_hermes, ptr %55, i32 0, i32 6
  %57 = load i32, ptr %13, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %56, i64 noundef %58, i32 noundef %59)
  br label %165

60:                                               ; preds = %5
  %61 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %61, ptr %13, align 4, !tbaa !9
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.w2c_hermes, ptr %62, i32 0, i32 6
  %64 = load i32, ptr %13, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = add i64 %65, 8
  %67 = call i64 @i64_load(ptr noundef %63, i64 noundef %66)
  store i64 %67, ptr %16, align 8, !tbaa !11
  %68 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %68, ptr %12, align 8, !tbaa !11
  %69 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %69, ptr %13, align 4, !tbaa !9
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.w2c_hermes, ptr %70, i32 0, i32 6
  %72 = load i32, ptr %13, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = add i64 %73, 4
  %75 = call i32 @i32_load(ptr noundef %71, i64 noundef %74)
  store i32 %75, ptr %13, align 4, !tbaa !9
  %76 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %76, ptr %11, align 4, !tbaa !9
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.w2c_hermes, ptr %77, i32 0, i32 6
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = add i64 %80, 164
  %82 = call i32 @i32_load(ptr noundef %78, i64 noundef %81)
  store i32 %82, ptr %13, align 4, !tbaa !9
  %83 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %83, ptr %10, align 4, !tbaa !9
  %84 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %84, ptr %14, align 4, !tbaa !9
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.w2c_hermes, ptr %85, i32 0, i32 6
  %87 = load i32, ptr %14, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = add i64 %88, 168
  %90 = call i32 @i32_load(ptr noundef %86, i64 noundef %89)
  store i32 %90, ptr %14, align 4, !tbaa !9
  %91 = load i32, ptr %13, align 4, !tbaa !9
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = icmp ult i32 %91, %92
  %94 = zext i1 %93 to i32
  store i32 %94, ptr %13, align 4, !tbaa !9
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %116

97:                                               ; preds = %60
  %98 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %98, ptr %13, align 4, !tbaa !9
  %99 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %99, ptr %14, align 4, !tbaa !9
  store i32 8, ptr %15, align 4, !tbaa !9
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = load i32, ptr %14, align 4, !tbaa !9
  %102 = add i32 %101, %100
  store i32 %102, ptr %14, align 4, !tbaa !9
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.w2c_hermes, ptr %103, i32 0, i32 6
  %105 = load i32, ptr %13, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = add i64 %106, 164
  %108 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %104, i64 noundef %107, i32 noundef %108)
  %109 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %109, ptr %13, align 4, !tbaa !9
  %110 = load i64, ptr %12, align 8, !tbaa !11
  store i64 %110, ptr %17, align 8, !tbaa !11
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.w2c_hermes, ptr %111, i32 0, i32 6
  %113 = load i32, ptr %13, align 4, !tbaa !9
  %114 = zext i32 %113 to i64
  %115 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %112, i64 noundef %114, i64 noundef %115)
  br label %124

116:                                              ; preds = %60
  %117 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %117, ptr %13, align 4, !tbaa !9
  %118 = load i64, ptr %12, align 8, !tbaa !11
  store i64 %118, ptr %17, align 8, !tbaa !11
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = load i32, ptr %13, align 4, !tbaa !9
  %121 = load i64, ptr %17, align 8, !tbaa !11
  %122 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef %119, i32 noundef %120, i64 noundef %121)
  store i32 %122, ptr %13, align 4, !tbaa !9
  %123 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %123, ptr %10, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %116, %97
  %125 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %125, ptr %13, align 4, !tbaa !9
  %126 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %126, ptr %14, align 4, !tbaa !9
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = load i32, ptr %13, align 4, !tbaa !9
  %129 = load i32, ptr %14, align 4, !tbaa !9
  %130 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AtoString_RJS0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef %127, i32 noundef %128, i32 noundef %129)
  store i32 %130, ptr %13, align 4, !tbaa !9
  %131 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %131, ptr %9, align 4, !tbaa !9
  store i32 -1, ptr %14, align 4, !tbaa !9
  %132 = load i32, ptr %13, align 4, !tbaa !9
  %133 = load i32, ptr %14, align 4, !tbaa !9
  %134 = icmp eq i32 %132, %133
  %135 = zext i1 %134 to i32
  store i32 %135, ptr %13, align 4, !tbaa !9
  %136 = load i32, ptr %13, align 4, !tbaa !9
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %145

138:                                              ; preds = %124
  %139 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %139, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.w2c_hermes, ptr %140, i32 0, i32 6
  %142 = load i32, ptr %13, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %141, i64 noundef %143, i32 noundef %144)
  br label %165

145:                                              ; preds = %124
  %146 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %146, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.w2c_hermes, ptr %147, i32 0, i32 6
  %149 = load i32, ptr %13, align 4, !tbaa !9
  %150 = zext i32 %149 to i64
  %151 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %148, i64 noundef %150, i32 noundef %151)
  %152 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %152, ptr %13, align 4, !tbaa !9
  %153 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %153, ptr %14, align 4, !tbaa !9
  %154 = load i32, ptr %14, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  store i64 %155, ptr %17, align 8, !tbaa !11
  store i64 -844424930131968, ptr %18, align 8, !tbaa !11
  %156 = load i64, ptr %18, align 8, !tbaa !11
  %157 = load i64, ptr %17, align 8, !tbaa !11
  %158 = or i64 %157, %156
  store i64 %158, ptr %17, align 8, !tbaa !11
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.w2c_hermes, ptr %159, i32 0, i32 6
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = zext i32 %161 to i64
  %163 = add i64 %162, 8
  %164 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %160, i64 noundef %163, i64 noundef %164)
  br label %165

165:                                              ; preds = %145, %138, %53
  %166 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %166, ptr %13, align 4, !tbaa !9
  store i32 16, ptr %14, align 4, !tbaa !9
  %167 = load i32, ptr %14, align 4, !tbaa !9
  %168 = load i32, ptr %13, align 4, !tbaa !9
  %169 = add i32 %168, %167
  store i32 %169, ptr %13, align 4, !tbaa !9
  %170 = load i32, ptr %13, align 4, !tbaa !9
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.w2c_hermes, ptr %171, i32 0, i32 3
  store i32 %170, ptr %172, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  ret void
}

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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !15, i64 40, !17, i64 80}
!15 = !{!"", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !16, i64 32}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}


; 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 @i64_store(ptr noundef, i64 noundef, i64 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 @i32_store(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

declare void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AthisBigIntValue0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

14:                                               ; preds = %5
  %15 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %15, i32 noundef 0)
  br label %42

16:                                               ; preds = %5
  %17 = add nuw nsw i64 %12, 8
  %18 = tail call i64 @i64_load(ptr noundef nonnull %9, i64 noundef %17)
  %19 = zext i32 %3 to i64
  %20 = add nuw nsw i64 %19, 4
  %21 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %20)
  %22 = zext i32 %21 to i64
  %23 = add nuw nsw i64 %22, 164
  %24 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %23)
  %25 = add nuw nsw i64 %22, 168
  %26 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %25)
  %27 = icmp ult i32 %24, %26
  br i1 %27, label %28, label %31

28:                                               ; preds = %16
  %29 = add i32 %24, 8
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %23, i32 noundef %29)
  %30 = zext i32 %24 to i64
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %30, i64 noundef %18)
  br label %33

31:                                               ; preds = %16
  %32 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef nonnull %0, i32 noundef %21, i64 noundef %18) #3
  br label %33

33:                                               ; preds = %31, %28
  %.0 = phi i32 [ %24, %28 ], [ %32, %31 ]
  %34 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AtoString_RJS0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef nonnull %0, i32 noundef %3, i32 noundef %.0) #3
  %35 = icmp eq i32 %34, -1
  %36 = zext i32 %1 to i64
  br i1 %35, label %37, label %38

37:                                               ; preds = %33
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %36, i32 noundef 0)
  br label %42

38:                                               ; preds = %33
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %36, i32 noundef 1)
  %39 = zext i32 %34 to i64
  %40 = or disjoint i64 %39, -844424930131968
  %41 = add nuw nsw i64 %36, 8
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %41, i64 noundef %40)
  br label %42

42:                                               ; preds = %38, %37, %14
  store i32 %7, ptr %6, align 8, !tbaa !5
  ret void
}

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