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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 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: noreturn
declare void @wasm_rt_trap(i32 noundef) #2

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

declare void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef, i32 noundef) #3

declare i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef, i32 noundef) #3

declare i32 @w2c_hermes_memmove(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #3

declare void @w2c_hermes_abort(ptr noundef) #3

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

48:                                               ; preds = %4
  %49 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %49, ptr %14, align 4, !tbaa !9
  store i32 97, ptr %15, align 4, !tbaa !9
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.w2c_hermes, ptr %50, i32 0, i32 6
  %52 = load i32, ptr %14, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %51, i64 noundef %53, i32 noundef %54)
  %55 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %55, ptr %14, align 4, !tbaa !9
  %56 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %56, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %57 = load i32, ptr %16, align 4, !tbaa !9
  %58 = load i32, ptr %15, align 4, !tbaa !9
  %59 = add i32 %58, %57
  store i32 %59, ptr %15, align 4, !tbaa !9
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.w2c_hermes, ptr %60, i32 0, i32 6
  %62 = load i32, ptr %14, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = add i64 %63, 4
  %65 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %61, i64 noundef %64, i32 noundef %65)
  br label %198

66:                                               ; preds = %4
  %67 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %67, ptr %14, align 4, !tbaa !9
  %68 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %68, ptr %15, align 4, !tbaa !9
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.w2c_hermes, ptr %69, i32 0, i32 6
  %71 = load i32, ptr %15, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = call i32 @i32_load(ptr noundef %70, i64 noundef %72)
  store i32 %73, ptr %15, align 4, !tbaa !9
  %74 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %74, ptr %12, align 4, !tbaa !9
  %75 = load i32, ptr %15, align 4, !tbaa !9
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = sub i32 %76, %75
  store i32 %77, ptr %14, align 4, !tbaa !9
  %78 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %78, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  %79 = load i32, ptr %15, align 4, !tbaa !9
  %80 = load i32, ptr %14, align 4, !tbaa !9
  %81 = add i32 %80, %79
  store i32 %81, ptr %14, align 4, !tbaa !9
  %82 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %82, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  %83 = load i32, ptr %14, align 4, !tbaa !9
  %84 = load i32, ptr %15, align 4, !tbaa !9
  %85 = icmp sge i32 %83, %84
  %86 = zext i1 %85 to i32
  store i32 %86, ptr %14, align 4, !tbaa !9
  %87 = load i32, ptr %14, align 4, !tbaa !9
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %196

89:                                               ; preds = %66
  store i32 2147483647, ptr %14, align 4, !tbaa !9
  %90 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %90, ptr %15, align 4, !tbaa !9
  %91 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %91, ptr %16, align 4, !tbaa !9
  %92 = load i32, ptr %16, align 4, !tbaa !9
  %93 = load i32, ptr %15, align 4, !tbaa !9
  %94 = sub i32 %93, %92
  store i32 %94, ptr %15, align 4, !tbaa !9
  %95 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %95, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %96 = load i32, ptr %16, align 4, !tbaa !9
  %97 = and i32 %96, 31
  %98 = load i32, ptr %15, align 4, !tbaa !9
  %99 = shl i32 %98, %97
  store i32 %99, ptr %15, align 4, !tbaa !9
  %100 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %100, ptr %13, align 4, !tbaa !9
  %101 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %101, ptr %16, align 4, !tbaa !9
  %102 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %102, ptr %17, align 4, !tbaa !9
  %103 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %103, ptr %18, align 4, !tbaa !9
  %104 = load i32, ptr %17, align 4, !tbaa !9
  %105 = load i32, ptr %18, align 4, !tbaa !9
  %106 = icmp ult i32 %104, %105
  %107 = zext i1 %106 to i32
  store i32 %107, ptr %17, align 4, !tbaa !9
  %108 = load i32, ptr %17, align 4, !tbaa !9
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %112

110:                                              ; preds = %89
  %111 = load i32, ptr %15, align 4, !tbaa !9
  br label %114

112:                                              ; preds = %89
  %113 = load i32, ptr %16, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %112, %110
  %115 = phi i32 [ %111, %110 ], [ %113, %112 ]
  store i32 %115, ptr %15, align 4, !tbaa !9
  %116 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %116, ptr %16, align 4, !tbaa !9
  store i32 1073741823, ptr %17, align 4, !tbaa !9
  %117 = load i32, ptr %16, align 4, !tbaa !9
  %118 = load i32, ptr %17, align 4, !tbaa !9
  %119 = icmp uge i32 %117, %118
  %120 = zext i1 %119 to i32
  store i32 %120, ptr %16, align 4, !tbaa !9
  %121 = load i32, ptr %16, align 4, !tbaa !9
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %125

123:                                              ; preds = %114
  %124 = load i32, ptr %14, align 4, !tbaa !9
  br label %127

125:                                              ; preds = %114
  %126 = load i32, ptr %15, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %125, %123
  %128 = phi i32 [ %124, %123 ], [ %126, %125 ]
  store i32 %128, ptr %14, align 4, !tbaa !9
  %129 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %129, ptr %11, align 4, !tbaa !9
  %130 = load i32, ptr %14, align 4, !tbaa !9
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %137

132:                                              ; preds = %127
  %133 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %133, ptr %14, align 4, !tbaa !9
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = load i32, ptr %14, align 4, !tbaa !9
  %136 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %134, i32 noundef %135)
  store i32 %136, ptr %14, align 4, !tbaa !9
  br label %138

137:                                              ; preds = %127
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %137, %132
  %139 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %139, ptr %10, align 4, !tbaa !9
  %140 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %140, ptr %15, align 4, !tbaa !9
  %141 = load i32, ptr %15, align 4, !tbaa !9
  %142 = load i32, ptr %14, align 4, !tbaa !9
  %143 = add i32 %142, %141
  store i32 %143, ptr %14, align 4, !tbaa !9
  %144 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %144, ptr %13, align 4, !tbaa !9
  store i32 97, ptr %15, align 4, !tbaa !9
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.w2c_hermes, ptr %145, i32 0, i32 6
  %147 = load i32, ptr %14, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %146, i64 noundef %148, i32 noundef %149)
  %150 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %150, ptr %14, align 4, !tbaa !9
  %151 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %151, ptr %15, align 4, !tbaa !9
  %152 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %152, ptr %16, align 4, !tbaa !9
  %153 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %153, ptr %17, align 4, !tbaa !9
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = load i32, ptr %15, align 4, !tbaa !9
  %156 = load i32, ptr %16, align 4, !tbaa !9
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = call i32 @w2c_hermes_memmove(ptr noundef %154, i32 noundef %155, i32 noundef %156, i32 noundef %157)
  store i32 %158, ptr %15, align 4, !tbaa !9
  %159 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %159, ptr %9, align 4, !tbaa !9
  %160 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %160, ptr %16, align 4, !tbaa !9
  %161 = load i32, ptr %16, align 4, !tbaa !9
  %162 = load i32, ptr %15, align 4, !tbaa !9
  %163 = add i32 %162, %161
  store i32 %163, ptr %15, align 4, !tbaa !9
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.w2c_hermes, ptr %164, i32 0, i32 6
  %166 = load i32, ptr %14, align 4, !tbaa !9
  %167 = zext i32 %166 to i64
  %168 = add i64 %167, 8
  %169 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %165, i64 noundef %168, i32 noundef %169)
  %170 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %170, ptr %14, align 4, !tbaa !9
  %171 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %171, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %172 = load i32, ptr %16, align 4, !tbaa !9
  %173 = load i32, ptr %15, align 4, !tbaa !9
  %174 = add i32 %173, %172
  store i32 %174, ptr %15, align 4, !tbaa !9
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.w2c_hermes, ptr %175, i32 0, i32 6
  %177 = load i32, ptr %14, align 4, !tbaa !9
  %178 = zext i32 %177 to i64
  %179 = add i64 %178, 4
  %180 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %176, i64 noundef %179, i32 noundef %180)
  %181 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %181, ptr %14, align 4, !tbaa !9
  %182 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %182, ptr %15, align 4, !tbaa !9
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.w2c_hermes, ptr %183, i32 0, i32 6
  %185 = load i32, ptr %14, align 4, !tbaa !9
  %186 = zext i32 %185 to i64
  %187 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %184, i64 noundef %186, i32 noundef %187)
  %188 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %188, ptr %14, align 4, !tbaa !9
  %189 = load i32, ptr %14, align 4, !tbaa !9
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %191, label %195

191:                                              ; preds = %138
  %192 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %192, ptr %14, align 4, !tbaa !9
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %193, i32 noundef %194)
  br label %195

195:                                              ; preds = %191, %138
  br label %198

196:                                              ; preds = %66
  %197 = load ptr, ptr %5, align 8, !tbaa !5
  call void @w2c_hermes_abort(ptr noundef %197)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

198:                                              ; preds = %195, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  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 = { noreturn "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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn }

!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}


; 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_store8(ptr noundef, i64 noundef, i32 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

; Function Attrs: noreturn
declare void @wasm_rt_trap(i32 noundef) local_unnamed_addr #1

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

declare void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @w2c_hermes_memmove(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @w2c_hermes_abort(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3AHBCISel0x3A0x3AgenerateDebuggerInst0x28hermes0x3A0x3ADebuggerInst0x2A0x2C0x20hermes0x3A0x3ABasicBlock0x2A0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = zext i32 %1 to i64
  %7 = add nuw nsw i64 %6, 4
  %8 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %7)
  %9 = zext i32 %8 to i64
  %10 = add nuw nsw i64 %9, 4
  %11 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %10)
  %12 = add nuw nsw i64 %9, 8
  %13 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %12)
  %14 = icmp ult i32 %11, %13
  br i1 %14, label %15, label %18

15:                                               ; preds = %4
  %16 = zext i32 %11 to i64
  tail call void @i32_store8(ptr noundef nonnull %5, i64 noundef %16, i32 noundef 97)
  %17 = add nuw i32 %11, 1
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %10, i32 noundef %17)
  br label %39

18:                                               ; preds = %4
  %19 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %9)
  %20 = sub i32 %11, %19
  %21 = add i32 %20, 1
  %22 = icmp sgt i32 %21, -1
  br i1 %22, label %23, label %38

23:                                               ; preds = %18
  %24 = sub i32 %13, %19
  %25 = shl i32 %24, 1
  %26 = tail call i32 @llvm.umax.i32(i32 %21, i32 %25)
  %27 = icmp ugt i32 %24, 1073741822
  %28 = select i1 %27, i32 2147483647, i32 %26
  %.not = icmp eq i32 %28, 0
  br i1 %.not, label %31, label %29

29:                                               ; preds = %23
  %30 = tail call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef %28) #5
  br label %31

31:                                               ; preds = %23, %29
  %.0 = phi i32 [ %30, %29 ], [ 0, %23 ]
  %32 = add i32 %.0, %20
  %33 = zext i32 %32 to i64
  tail call void @i32_store8(ptr noundef nonnull %5, i64 noundef %33, i32 noundef 97)
  %34 = tail call i32 @w2c_hermes_memmove(ptr noundef %0, i32 noundef %.0, i32 noundef %19, i32 noundef %20) #5
  %35 = add i32 %34, %28
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %12, i32 noundef %35)
  %36 = add i32 %32, 1
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %10, i32 noundef %36)
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %9, i32 noundef %34)
  %.not111 = icmp eq i32 %19, 0
  br i1 %.not111, label %39, label %37

37:                                               ; preds = %31
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %0, i32 noundef %19) #5
  br label %39

38:                                               ; preds = %18
  tail call void @w2c_hermes_abort(ptr noundef %0) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

39:                                               ; preds = %31, %37, %15
  ret void
}

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

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 = { noreturn "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass