; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_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: noreturn
declare void @wasm_rt_trap(i32 noundef) #1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AincreaseSizeWithinCapacity0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20unsigned0x20int0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AdecreaseSize0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20unsigned0x20int0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AresizeWithinCapacity0x28hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20unsigned0x20int0x29(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
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %16 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %16, ptr %11, align 4, !tbaa !9
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.w2c_hermes, ptr %17, i32 0, i32 6
  %19 = load i32, ptr %11, align 4, !tbaa !9
  %20 = zext i32 %19 to i64
  %21 = add i64 %20, 12
  %22 = call i32 @i32_load(ptr noundef %18, i64 noundef %21)
  store i32 %22, ptr %11, align 4, !tbaa !9
  %23 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %23, ptr %9, align 4, !tbaa !9
  store i32 4097, ptr %12, align 4, !tbaa !9
  %24 = load i32, ptr %11, align 4, !tbaa !9
  %25 = load i32, ptr %12, align 4, !tbaa !9
  %26 = icmp uge i32 %24, %25
  %27 = zext i1 %26 to i32
  store i32 %27, ptr %11, align 4, !tbaa !9
  %28 = load i32, ptr %11, align 4, !tbaa !9
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %77

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

75:                                               ; preds = %30
  br label %108

76:                                               ; preds = %30
  br label %77

77:                                               ; preds = %76, %4
  store i32 4096, 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 %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.w2c_hermes, ptr %79, i32 0, i32 6
  %81 = load i32, ptr %12, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  %83 = call i32 @i32_load(ptr noundef %80, i64 noundef %82)
  store i32 %83, ptr %12, align 4, !tbaa !9
  store i32 16777212, ptr %13, align 4, !tbaa !9
  %84 = load i32, ptr %13, align 4, !tbaa !9
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = and i32 %85, %84
  store i32 %86, ptr %12, align 4, !tbaa !9
  store i32 16, ptr %13, align 4, !tbaa !9
  %87 = load i32, ptr %13, align 4, !tbaa !9
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = sub i32 %88, %87
  store i32 %89, ptr %12, align 4, !tbaa !9
  store i32 2, ptr %13, align 4, !tbaa !9
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = and i32 %90, 31
  %92 = load i32, ptr %12, align 4, !tbaa !9
  %93 = lshr i32 %92, %91
  store i32 %93, ptr %12, align 4, !tbaa !9
  %94 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %94, ptr %10, align 4, !tbaa !9
  %95 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %95, ptr %13, align 4, !tbaa !9
  store i32 4096, ptr %14, align 4, !tbaa !9
  %96 = load i32, ptr %13, align 4, !tbaa !9
  %97 = load i32, ptr %14, align 4, !tbaa !9
  %98 = icmp uge i32 %96, %97
  %99 = zext i1 %98 to i32
  store i32 %99, ptr %13, align 4, !tbaa !9
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %77
  %103 = load i32, ptr %11, align 4, !tbaa !9
  br label %106

104:                                              ; preds = %77
  %105 = load i32, ptr %12, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %104, %102
  %107 = phi i32 [ %103, %102 ], [ %105, %104 ]
  store i32 %107, ptr %11, align 4, !tbaa !9
  br label %117

108:                                              ; preds = %75
  %109 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %109, ptr %11, align 4, !tbaa !9
  store i32 10, ptr %12, align 4, !tbaa !9
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = and i32 %110, 31
  %112 = load i32, ptr %11, align 4, !tbaa !9
  %113 = shl i32 %112, %111
  store i32 %113, ptr %11, align 4, !tbaa !9
  store i32 4190208, ptr %12, align 4, !tbaa !9
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = sub i32 %115, %114
  store i32 %116, ptr %11, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %108, %106
  %118 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %118, ptr %10, align 4, !tbaa !9
  %119 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %119, ptr %12, align 4, !tbaa !9
  %120 = load i32, ptr %11, align 4, !tbaa !9
  %121 = load i32, ptr %12, align 4, !tbaa !9
  %122 = icmp uge i32 %120, %121
  %123 = zext i1 %122 to i32
  store i32 %123, ptr %11, align 4, !tbaa !9
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %169

126:                                              ; preds = %117
  %127 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %127, ptr %11, align 4, !tbaa !9
  %128 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %128, ptr %12, align 4, !tbaa !9
  %129 = load i32, ptr %11, align 4, !tbaa !9
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = icmp ugt i32 %129, %130
  %132 = zext i1 %131 to i32
  store i32 %132, ptr %11, align 4, !tbaa !9
  %133 = load i32, ptr %11, align 4, !tbaa !9
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %147

135:                                              ; preds = %126
  %136 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %136, ptr %11, align 4, !tbaa !9
  %137 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %137, ptr %12, align 4, !tbaa !9
  %138 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %138, ptr %13, align 4, !tbaa !9
  %139 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %139, ptr %14, align 4, !tbaa !9
  %140 = load i32, ptr %14, align 4, !tbaa !9
  %141 = load i32, ptr %13, align 4, !tbaa !9
  %142 = sub i32 %141, %140
  store i32 %142, ptr %13, align 4, !tbaa !9
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = load i32, ptr %11, align 4, !tbaa !9
  %145 = load i32, ptr %12, align 4, !tbaa !9
  %146 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AincreaseSizeWithinCapacity0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20unsigned0x20int0x29(ptr noundef %143, i32 noundef %144, i32 noundef %145, i32 noundef %146)
  br label %187

147:                                              ; preds = %126
  %148 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %148, ptr %11, align 4, !tbaa !9
  %149 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %149, ptr %12, align 4, !tbaa !9
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = icmp ult i32 %150, %151
  %153 = zext i1 %152 to i32
  store i32 %153, ptr %11, align 4, !tbaa !9
  %154 = load i32, ptr %11, align 4, !tbaa !9
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %168

156:                                              ; preds = %147
  %157 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %157, ptr %11, align 4, !tbaa !9
  %158 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %158, ptr %12, align 4, !tbaa !9
  %159 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %159, ptr %13, align 4, !tbaa !9
  %160 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %160, ptr %14, align 4, !tbaa !9
  %161 = load i32, ptr %14, align 4, !tbaa !9
  %162 = load i32, ptr %13, align 4, !tbaa !9
  %163 = sub i32 %162, %161
  store i32 %163, ptr %13, align 4, !tbaa !9
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = load i32, ptr %11, align 4, !tbaa !9
  %166 = load i32, ptr %12, align 4, !tbaa !9
  %167 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AdecreaseSize0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20unsigned0x20int0x29(ptr noundef %164, i32 noundef %165, i32 noundef %166, i32 noundef %167)
  br label %168

168:                                              ; preds = %156, %147
  br label %187

169:                                              ; preds = %117
  store i32 0, ptr %11, align 4, !tbaa !9
  %170 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %170, ptr %8, align 4, !tbaa !9
  store i32 124147, ptr %12, align 4, !tbaa !9
  %171 = load i32, ptr %12, align 4, !tbaa !9
  %172 = load i32, ptr %11, align 4, !tbaa !9
  %173 = add i32 %172, %171
  store i32 %173, ptr %11, align 4, !tbaa !9
  %174 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %174, ptr %12, align 4, !tbaa !9
  store i32 54016, ptr %13, align 4, !tbaa !9
  %175 = load i32, ptr %13, align 4, !tbaa !9
  %176 = load i32, ptr %12, align 4, !tbaa !9
  %177 = add i32 %176, %175
  store i32 %177, ptr %12, align 4, !tbaa !9
  store i32 231, ptr %13, align 4, !tbaa !9
  %178 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %178, ptr %14, align 4, !tbaa !9
  store i32 17334, ptr %15, align 4, !tbaa !9
  %179 = load i32, ptr %15, align 4, !tbaa !9
  %180 = load i32, ptr %14, align 4, !tbaa !9
  %181 = add i32 %180, %179
  store i32 %181, ptr %14, align 4, !tbaa !9
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = load i32, ptr %11, align 4, !tbaa !9
  %184 = load i32, ptr %12, align 4, !tbaa !9
  %185 = load i32, ptr %13, align 4, !tbaa !9
  %186 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %182, i32 noundef %183, i32 noundef %184, i32 noundef %185, i32 noundef %186)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

187:                                              ; preds = %168, %135
  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 = { 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 = { 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 #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: noreturn
declare void @wasm_rt_trap(i32 noundef) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AresizeWithinCapacity0x28hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20unsigned0x20int0x29(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, 12
  %8 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %7)
  %9 = icmp ugt i32 %8, 4096
  br i1 %9, label %10, label %21

10:                                               ; preds = %4
  %11 = add i32 %8, -4097
  %12 = shl i32 %11, 10
  %13 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %11)
  %14 = zext i32 %13 to i64
  %15 = add nuw nsw i64 %14, 12
  %16 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %15)
  %17 = add i32 %12, 4096
  %18 = add i32 %17, %16
  %19 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %7)
  %20 = icmp ugt i32 %19, 4096
  br i1 %20, label %28, label %21

21:                                               ; preds = %10, %4
  %.0103 = phi i32 [ %18, %10 ], [ %8, %4 ]
  %22 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %23 = and i32 %22, 16777212
  %24 = add nsw i32 %23, -16
  %25 = lshr exact i32 %24, 2
  %26 = icmp ugt i32 %24, 16380
  %27 = select i1 %26, i32 4096, i32 %25
  br label %31

28:                                               ; preds = %10
  %29 = shl i32 %19, 10
  %30 = add i32 %29, -4190208
  br label %31

31:                                               ; preds = %28, %21
  %.1 = phi i32 [ %18, %28 ], [ %.0103, %21 ]
  %.0 = phi i32 [ %30, %28 ], [ %27, %21 ]
  %.not = icmp ult i32 %.0, %3
  br i1 %.not, label %40, label %32

32:                                               ; preds = %31
  %33 = icmp ult i32 %.1, %3
  br i1 %33, label %34, label %36

34:                                               ; preds = %32
  %35 = sub i32 %3, %.1
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AincreaseSizeWithinCapacity0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %35)
  br label %41

36:                                               ; preds = %32
  %37 = icmp ugt i32 %.1, %3
  br i1 %37, label %38, label %41

38:                                               ; preds = %36
  %39 = sub i32 %.1, %3
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AdecreaseSize0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %39)
  br label %41

40:                                               ; preds = %31
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 124147, i32 noundef 54016, i32 noundef 231, i32 noundef 17334) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

41:                                               ; preds = %36, %38, %34
  ret void
}

attributes #0 = { 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 #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 }
attributes #5 = { 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: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass