; 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

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

; 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: nounwind uwtable
define dso_local void @w2c_hermes_llvh0x3A0x3ASmallVectorBase0x3A0x3Agrow_pod0x28void0x2A0x2C0x20unsigned0x20long0x2C0x20unsigned0x20long0x29(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 i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %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 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  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 4, 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 i32, ptr %7, align 4, !tbaa !9
  store i32 %19, ptr %13, align 4, !tbaa !9
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.w2c_hermes, ptr %20, i32 0, i32 6
  %22 = load i32, ptr %13, align 4, !tbaa !9
  %23 = zext i32 %22 to i64
  %24 = add i64 %23, 8
  %25 = call i32 @i32_load(ptr noundef %21, i64 noundef %24)
  store i32 %25, ptr %13, align 4, !tbaa !9
  %26 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %26, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %27 = load i32, ptr %14, align 4, !tbaa !9
  %28 = and i32 %27, 31
  %29 = load i32, ptr %13, align 4, !tbaa !9
  %30 = shl i32 %29, %28
  store i32 %30, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %31 = load i32, ptr %14, align 4, !tbaa !9
  %32 = load i32, ptr %13, align 4, !tbaa !9
  %33 = or i32 %32, %31
  store i32 %33, ptr %13, align 4, !tbaa !9
  %34 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %34, ptr %12, align 4, !tbaa !9
  %35 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %35, ptr %14, align 4, !tbaa !9
  %36 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %36, ptr %15, align 4, !tbaa !9
  %37 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %37, ptr %16, align 4, !tbaa !9
  %38 = load i32, ptr %15, align 4, !tbaa !9
  %39 = load i32, ptr %16, align 4, !tbaa !9
  %40 = icmp ult i32 %38, %39
  %41 = zext i1 %40 to i32
  store i32 %41, ptr %15, align 4, !tbaa !9
  %42 = load i32, ptr %15, align 4, !tbaa !9
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %46

44:                                               ; preds = %5
  %45 = load i32, ptr %13, align 4, !tbaa !9
  br label %48

46:                                               ; preds = %5
  %47 = load i32, ptr %14, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %46, %44
  %49 = phi i32 [ %45, %44 ], [ %47, %46 ]
  store i32 %49, ptr %13, align 4, !tbaa !9
  %50 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %50, ptr %9, align 4, !tbaa !9
  %51 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %51, ptr %14, align 4, !tbaa !9
  %52 = load i32, ptr %13, align 4, !tbaa !9
  %53 = load i32, ptr %14, align 4, !tbaa !9
  %54 = icmp ugt i32 %52, %53
  %55 = zext i1 %54 to i32
  store i32 %55, ptr %13, align 4, !tbaa !9
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %72

58:                                               ; preds = %48
  %59 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %59, ptr %13, align 4, !tbaa !9
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  store i64 %61, ptr %17, align 8, !tbaa !11
  %62 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %62, ptr %14, align 4, !tbaa !9
  %63 = load i32, ptr %14, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  store i64 %64, ptr %18, align 8, !tbaa !11
  %65 = load i64, ptr %18, align 8, !tbaa !11
  %66 = load i64, ptr %17, align 8, !tbaa !11
  %67 = mul i64 %66, %65
  store i64 %67, ptr %17, align 8, !tbaa !11
  store i64 32, ptr %18, align 8, !tbaa !11
  %68 = load i64, ptr %18, align 8, !tbaa !11
  %69 = and i64 %68, 63
  %70 = load i64, ptr %17, align 8, !tbaa !11
  %71 = lshr i64 %70, %69
  store i64 %71, ptr %17, align 8, !tbaa !11
  br label %73

72:                                               ; preds = %48
  store i64 1, ptr %17, align 8, !tbaa !11
  br label %73

73:                                               ; preds = %72, %58
  store i64 0, ptr %18, align 8, !tbaa !11
  %74 = load i64, ptr %17, align 8, !tbaa !11
  %75 = load i64, ptr %18, align 8, !tbaa !11
  %76 = icmp ne i64 %74, %75
  %77 = zext i1 %76 to i32
  store i32 %77, ptr %13, align 4, !tbaa !9
  %78 = load i32, ptr %13, align 4, !tbaa !9
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %84

80:                                               ; preds = %73
  store i32 68998, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = load i32, ptr %13, align 4, !tbaa !9
  %83 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_llvh0x3A0x3Areport_bad_alloc_error0x28char0x20const0x2A0x2C0x20bool0x29(ptr noundef %81, i32 noundef %82, i32 noundef %83)
  br label %84

84:                                               ; preds = %80, %73
  %85 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %85, ptr %13, align 4, !tbaa !9
  %86 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %86, ptr %14, align 4, !tbaa !9
  %87 = load i32, ptr %14, align 4, !tbaa !9
  %88 = load i32, ptr %13, align 4, !tbaa !9
  %89 = mul i32 %88, %87
  store i32 %89, ptr %13, align 4, !tbaa !9
  %90 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %90, ptr %11, align 4, !tbaa !9
  %91 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %91, ptr %13, align 4, !tbaa !9
  %92 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %92, ptr %14, align 4, !tbaa !9
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.w2c_hermes, ptr %93, i32 0, i32 6
  %95 = load i32, ptr %14, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = call i32 @i32_load(ptr noundef %94, i64 noundef %96)
  store i32 %97, ptr %14, align 4, !tbaa !9
  %98 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %98, ptr %12, align 4, !tbaa !9
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = icmp eq i32 %99, %100
  %102 = zext i1 %101 to i32
  store i32 %102, ptr %13, align 4, !tbaa !9
  %103 = load i32, ptr %13, align 4, !tbaa !9
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %147

105:                                              ; preds = %84
  %106 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %106, ptr %13, align 4, !tbaa !9
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = call i32 @w2c_hermes_dlmalloc(ptr noundef %107, i32 noundef %108)
  store i32 %109, ptr %13, align 4, !tbaa !9
  %110 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %110, ptr %11, align 4, !tbaa !9
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  %113 = xor i1 %112, true
  %114 = zext i1 %113 to i32
  store i32 %114, ptr %13, align 4, !tbaa !9
  %115 = load i32, ptr %13, align 4, !tbaa !9
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %128

117:                                              ; preds = %105
  store i32 105740, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_llvh0x3A0x3Areport_bad_alloc_error0x28char0x20const0x2A0x2C0x20bool0x29(ptr noundef %118, i32 noundef %119, i32 noundef %120)
  %121 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %121, ptr %13, align 4, !tbaa !9
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.w2c_hermes, ptr %122, i32 0, i32 6
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = call i32 @i32_load(ptr noundef %123, i64 noundef %125)
  store i32 %126, ptr %13, align 4, !tbaa !9
  %127 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %127, ptr %8, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %117, %105
  %129 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %129, ptr %13, align 4, !tbaa !9
  %130 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %130, ptr %14, align 4, !tbaa !9
  %131 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %131, ptr %15, align 4, !tbaa !9
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.w2c_hermes, ptr %132, i32 0, i32 6
  %134 = load i32, ptr %15, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = add i64 %135, 4
  %137 = call i32 @i32_load(ptr noundef %133, i64 noundef %136)
  store i32 %137, ptr %15, align 4, !tbaa !9
  %138 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %138, ptr %16, align 4, !tbaa !9
  %139 = load i32, ptr %16, align 4, !tbaa !9
  %140 = load i32, ptr %15, align 4, !tbaa !9
  %141 = mul i32 %140, %139
  store i32 %141, ptr %15, align 4, !tbaa !9
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = load i32, ptr %13, align 4, !tbaa !9
  %144 = load i32, ptr %14, align 4, !tbaa !9
  %145 = load i32, ptr %15, align 4, !tbaa !9
  %146 = call i32 @w2c_hermes_0x5F_memcpy(ptr noundef %142, i32 noundef %143, i32 noundef %144, i32 noundef %145)
  store i32 %146, ptr %13, align 4, !tbaa !9
  br label %163

147:                                              ; preds = %84
  %148 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %148, ptr %13, align 4, !tbaa !9
  %149 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %149, ptr %14, align 4, !tbaa !9
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = load i32, ptr %13, align 4, !tbaa !9
  %152 = load i32, ptr %14, align 4, !tbaa !9
  %153 = call i32 @w2c_hermes_dlrealloc(ptr noundef %150, i32 noundef %151, i32 noundef %152)
  store i32 %153, ptr %13, align 4, !tbaa !9
  %154 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %154, ptr %11, align 4, !tbaa !9
  %155 = load i32, ptr %13, align 4, !tbaa !9
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %158

157:                                              ; preds = %147
  br label %163

158:                                              ; preds = %147
  store i32 105740, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_llvh0x3A0x3Areport_bad_alloc_error0x28char0x20const0x2A0x2C0x20bool0x29(ptr noundef %159, i32 noundef %160, i32 noundef %161)
  store i32 0, ptr %13, align 4, !tbaa !9
  %162 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %162, ptr %11, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %158, %157, %128
  %164 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %164, ptr %13, align 4, !tbaa !9
  %165 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %165, ptr %14, align 4, !tbaa !9
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.w2c_hermes, ptr %166, i32 0, i32 6
  %168 = load i32, ptr %13, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = add i64 %169, 8
  %171 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %167, i64 noundef %170, i32 noundef %171)
  %172 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %172, ptr %13, align 4, !tbaa !9
  %173 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %173, ptr %14, align 4, !tbaa !9
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.w2c_hermes, ptr %174, i32 0, i32 6
  %176 = load i32, ptr %13, align 4, !tbaa !9
  %177 = zext i32 %176 to i64
  %178 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %175, i64 noundef %177, i32 noundef %178)
  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 4, 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 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  ret void
}

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

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

declare i32 @w2c_hermes_dlrealloc(ptr noundef, i32 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, !12, i64 0}
!12 = !{!"long", !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"

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_llvh0x3A0x3ASmallVectorBase0x3A0x3Agrow_pod0x28void0x2A0x2C0x20unsigned0x20long0x2C0x20unsigned0x20long0x29(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 40
  %7 = zext i32 %1 to i64
  %8 = add nuw nsw i64 %7, 8
  %9 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %8)
  %10 = shl i32 %9, 1
  %11 = or disjoint i32 %10, 1
  %12 = tail call i32 @llvm.umax.i32(i32 %11, i32 %3)
  %13 = icmp ule i32 %12, %9
  %umul = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %4, i32 %12)
  %14 = extractvalue { i32, i1 } %umul, 1
  %or.cond.not = or i1 %13, %14
  br i1 %or.cond.not, label %.critedge, label %15

.critedge:                                        ; preds = %5
  tail call void @w2c_hermes_llvh0x3A0x3Areport_bad_alloc_error0x28char0x20const0x2A0x2C0x20bool0x29(ptr noundef %0, i32 noundef 68998, i32 noundef 1) #4
  br label %15

15:                                               ; preds = %5, %.critedge
  %16 = mul i32 %12, %4
  %17 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %7)
  %18 = icmp eq i32 %17, %2
  br i1 %18, label %19, label %28

19:                                               ; preds = %15
  %20 = tail call i32 @w2c_hermes_dlmalloc(ptr noundef %0, i32 noundef %16) #4
  %.not100 = icmp eq i32 %20, 0
  br i1 %.not100, label %21, label %23

21:                                               ; preds = %19
  tail call void @w2c_hermes_llvh0x3A0x3Areport_bad_alloc_error0x28char0x20const0x2A0x2C0x20bool0x29(ptr noundef %0, i32 noundef 105740, i32 noundef 1) #4
  %22 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %7)
  br label %23

23:                                               ; preds = %21, %19
  %.095 = phi i32 [ %22, %21 ], [ %2, %19 ]
  %24 = add nuw nsw i64 %7, 4
  %25 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %24)
  %26 = mul i32 %25, %4
  %27 = tail call i32 @w2c_hermes_0x5F_memcpy(ptr noundef %0, i32 noundef %20, i32 noundef %.095, i32 noundef %26) #4
  br label %31

28:                                               ; preds = %15
  %29 = tail call i32 @w2c_hermes_dlrealloc(ptr noundef %0, i32 noundef %17, i32 noundef %16) #4
  %.not = icmp eq i32 %29, 0
  br i1 %.not, label %30, label %31

30:                                               ; preds = %28
  tail call void @w2c_hermes_llvh0x3A0x3Areport_bad_alloc_error0x28char0x20const0x2A0x2C0x20bool0x29(ptr noundef %0, i32 noundef 105740, i32 noundef 1) #4
  br label %31

31:                                               ; preds = %28, %30, %23
  %.094 = phi i32 [ %20, %23 ], [ %29, %28 ], [ 0, %30 ]
  tail call void @i32_store(ptr noundef nonnull %6, i64 noundef %8, i32 noundef %12)
  tail call void @i32_store(ptr noundef nonnull %6, i64 noundef %7, i32 noundef %.094)
  ret void
}

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i32, i1 } @llvm.umul.with.overflow.i32(i32, i32) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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)"}


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