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

; 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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AArrayStorageBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AresizeWithinCapacity0x28hermes0x3A0x3Avm0x3A0x3AArrayStorageBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3AHadesGC0x260x2C0x20unsigned0x20int0x29(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
  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
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %17 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %17, ptr %12, align 4, !tbaa !9
  %18 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %18, ptr %13, align 4, !tbaa !9
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.w2c_hermes, ptr %19, i32 0, i32 6
  %21 = load i32, ptr %13, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = call i32 @i32_load(ptr noundef %20, i64 noundef %22)
  store i32 %23, ptr %13, align 4, !tbaa !9
  store i32 16777212, ptr %14, align 4, !tbaa !9
  %24 = load i32, ptr %14, align 4, !tbaa !9
  %25 = load i32, ptr %13, align 4, !tbaa !9
  %26 = and i32 %25, %24
  store i32 %26, ptr %13, align 4, !tbaa !9
  store i32 16, ptr %14, align 4, !tbaa !9
  %27 = load i32, ptr %14, align 4, !tbaa !9
  %28 = load i32, ptr %13, align 4, !tbaa !9
  %29 = sub i32 %28, %27
  store i32 %29, ptr %13, align 4, !tbaa !9
  store i32 2, ptr %14, align 4, !tbaa !9
  %30 = load i32, ptr %14, align 4, !tbaa !9
  %31 = and i32 %30, 31
  %32 = load i32, ptr %13, align 4, !tbaa !9
  %33 = lshr i32 %32, %31
  store i32 %33, ptr %13, align 4, !tbaa !9
  %34 = load i32, ptr %12, align 4, !tbaa !9
  %35 = load i32, ptr %13, align 4, !tbaa !9
  %36 = icmp ule i32 %34, %35
  %37 = zext i1 %36 to i32
  store i32 %37, ptr %12, align 4, !tbaa !9
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %192

40:                                               ; preds = %4
  %41 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %41, ptr %12, align 4, !tbaa !9
  %42 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %42, ptr %13, align 4, !tbaa !9
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.w2c_hermes, ptr %43, i32 0, i32 6
  %45 = load i32, ptr %13, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = add i64 %46, 12
  %48 = call i32 @i32_load(ptr noundef %44, i64 noundef %47)
  store i32 %48, ptr %13, align 4, !tbaa !9
  %49 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %49, ptr %9, align 4, !tbaa !9
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = icmp ugt i32 %50, %51
  %53 = zext i1 %52 to i32
  store i32 %53, ptr %12, align 4, !tbaa !9
  %54 = load i32, ptr %12, align 4, !tbaa !9
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %102

56:                                               ; preds = %40
  %57 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %57, ptr %12, align 4, !tbaa !9
  store i32 16, ptr %13, align 4, !tbaa !9
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = add i32 %59, %58
  store i32 %60, ptr %12, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %61, ptr %10, align 4, !tbaa !9
  %62 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %62, ptr %13, align 4, !tbaa !9
  store i32 2, ptr %14, align 4, !tbaa !9
  %63 = load i32, ptr %14, align 4, !tbaa !9
  %64 = and i32 %63, 31
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = shl i32 %65, %64
  store i32 %66, ptr %13, align 4, !tbaa !9
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = add i32 %68, %67
  store i32 %69, ptr %12, align 4, !tbaa !9
  %70 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %70, ptr %7, align 4, !tbaa !9
  %71 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %71, ptr %12, align 4, !tbaa !9
  %72 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %72, ptr %13, align 4, !tbaa !9
  store i32 2, ptr %14, align 4, !tbaa !9
  %73 = load i32, ptr %14, align 4, !tbaa !9
  %74 = and i32 %73, 31
  %75 = load i32, ptr %13, align 4, !tbaa !9
  %76 = shl i32 %75, %74
  store i32 %76, ptr %13, align 4, !tbaa !9
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = add i32 %78, %77
  store i32 %79, ptr %12, align 4, !tbaa !9
  %80 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %80, ptr %9, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %100, %56
  %82 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %82, ptr %12, align 4, !tbaa !9
  store i32 7, ptr %13, align 4, !tbaa !9
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.w2c_hermes, ptr %83, i32 0, i32 6
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = zext i32 %85 to i64
  %87 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %84, i64 noundef %86, i32 noundef %87)
  %88 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %88, ptr %12, align 4, !tbaa !9
  store i32 4, ptr %13, align 4, !tbaa !9
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = add i32 %90, %89
  store i32 %91, ptr %12, align 4, !tbaa !9
  %92 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %92, ptr %9, align 4, !tbaa !9
  %93 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %93, ptr %13, align 4, !tbaa !9
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = icmp ne i32 %94, %95
  %97 = zext i1 %96 to i32
  store i32 %97, ptr %12, align 4, !tbaa !9
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %101

100:                                              ; preds = %81
  br label %81

101:                                              ; preds = %81
  br label %183

102:                                              ; preds = %40
  %103 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %103, ptr %12, align 4, !tbaa !9
  %104 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %104, ptr %13, align 4, !tbaa !9
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = icmp uge i32 %105, %106
  %108 = zext i1 %107 to i32
  store i32 %108, ptr %12, align 4, !tbaa !9
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %112

111:                                              ; preds = %102
  br label %183

112:                                              ; preds = %102
  %113 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %113, ptr %12, align 4, !tbaa !9
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.w2c_hermes, ptr %114, i32 0, i32 6
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = zext i32 %116 to i64
  %118 = add i64 %117, 588
  %119 = call i32 @i32_load(ptr noundef %115, i64 noundef %118)
  store i32 %119, ptr %12, align 4, !tbaa !9
  %120 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %120, ptr %13, align 4, !tbaa !9
  store i32 16, ptr %14, align 4, !tbaa !9
  %121 = load i32, ptr %14, align 4, !tbaa !9
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = add i32 %122, %121
  store i32 %123, ptr %13, align 4, !tbaa !9
  %124 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %124, ptr %11, align 4, !tbaa !9
  %125 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %125, ptr %14, align 4, !tbaa !9
  store i32 2, ptr %15, align 4, !tbaa !9
  %126 = load i32, ptr %15, align 4, !tbaa !9
  %127 = and i32 %126, 31
  %128 = load i32, ptr %14, align 4, !tbaa !9
  %129 = shl i32 %128, %127
  store i32 %129, ptr %14, align 4, !tbaa !9
  %130 = load i32, ptr %14, align 4, !tbaa !9
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = add i32 %131, %130
  store i32 %132, ptr %13, align 4, !tbaa !9
  %133 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %133, ptr %10, align 4, !tbaa !9
  store i32 -4194304, ptr %14, align 4, !tbaa !9
  %134 = load i32, ptr %14, align 4, !tbaa !9
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = and i32 %135, %134
  store i32 %136, ptr %13, align 4, !tbaa !9
  %137 = load i32, ptr %12, align 4, !tbaa !9
  %138 = load i32, ptr %13, align 4, !tbaa !9
  %139 = icmp eq i32 %137, %138
  %140 = zext i1 %139 to i32
  store i32 %140, ptr %12, align 4, !tbaa !9
  %141 = load i32, ptr %12, align 4, !tbaa !9
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %144

143:                                              ; preds = %112
  br label %183

144:                                              ; preds = %112
  %145 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %145, ptr %12, align 4, !tbaa !9
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.w2c_hermes, ptr %146, i32 0, i32 6
  %148 = load i32, ptr %12, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = add i64 %149, 4053
  %151 = call i32 @i32_load8_u(ptr noundef %147, i64 noundef %150)
  store i32 %151, ptr %12, align 4, !tbaa !9
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = icmp ne i32 %152, 0
  %154 = xor i1 %153, true
  %155 = zext i1 %154 to i32
  store i32 %155, ptr %12, align 4, !tbaa !9
  %156 = load i32, ptr %12, align 4, !tbaa !9
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %158, label %159

158:                                              ; preds = %144
  br label %183

159:                                              ; preds = %144
  %160 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %160, ptr %12, align 4, !tbaa !9
  %161 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %161, ptr %13, align 4, !tbaa !9
  %162 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %162, ptr %14, align 4, !tbaa !9
  %163 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %163, ptr %15, align 4, !tbaa !9
  store i32 2, ptr %16, align 4, !tbaa !9
  %164 = load i32, ptr %16, align 4, !tbaa !9
  %165 = and i32 %164, 31
  %166 = load i32, ptr %15, align 4, !tbaa !9
  %167 = shl i32 %166, %165
  store i32 %167, ptr %15, align 4, !tbaa !9
  %168 = load i32, ptr %15, align 4, !tbaa !9
  %169 = load i32, ptr %14, align 4, !tbaa !9
  %170 = add i32 %169, %168
  store i32 %170, ptr %14, align 4, !tbaa !9
  %171 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %171, ptr %15, align 4, !tbaa !9
  %172 = load i32, ptr %15, align 4, !tbaa !9
  %173 = load i32, ptr %14, align 4, !tbaa !9
  %174 = sub i32 %173, %172
  store i32 %174, ptr %14, align 4, !tbaa !9
  store i32 2, ptr %15, align 4, !tbaa !9
  %175 = load i32, ptr %14, align 4, !tbaa !9
  %176 = load i32, ptr %15, align 4, !tbaa !9
  %177 = and i32 %176, 31
  %178 = ashr i32 %175, %177
  store i32 %178, ptr %14, align 4, !tbaa !9
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = load i32, ptr %12, align 4, !tbaa !9
  %181 = load i32, ptr %13, align 4, !tbaa !9
  %182 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AsnapshotWriteBarrierRangeSlow0x28hermes0x3A0x3Avm0x3A0x3AGCHermesValueBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x20const0x2A0x2C0x20unsigned0x20int0x29(ptr noundef %179, i32 noundef %180, i32 noundef %181, i32 noundef %182)
  br label %183

183:                                              ; preds = %159, %158, %143, %111, %101
  %184 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %184, ptr %12, align 4, !tbaa !9
  %185 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %185, ptr %13, align 4, !tbaa !9
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.w2c_hermes, ptr %186, i32 0, i32 6
  %188 = load i32, ptr %12, align 4, !tbaa !9
  %189 = zext i32 %188 to i64
  %190 = add i64 %189, 12
  %191 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %187, i64 noundef %190, i32 noundef %191)
  br label %209

192:                                              ; preds = %4
  store i32 0, ptr %12, align 4, !tbaa !9
  store i32 200920, ptr %13, align 4, !tbaa !9
  %193 = load i32, ptr %13, align 4, !tbaa !9
  %194 = load i32, ptr %12, align 4, !tbaa !9
  %195 = add i32 %194, %193
  store i32 %195, ptr %12, align 4, !tbaa !9
  %196 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %196, ptr %13, align 4, !tbaa !9
  store i32 61343, ptr %14, align 4, !tbaa !9
  %197 = load i32, ptr %14, align 4, !tbaa !9
  %198 = load i32, ptr %13, align 4, !tbaa !9
  %199 = add i32 %198, %197
  store i32 %199, ptr %13, align 4, !tbaa !9
  store i32 123, ptr %14, align 4, !tbaa !9
  %200 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %200, ptr %15, align 4, !tbaa !9
  store i32 17334, ptr %16, align 4, !tbaa !9
  %201 = load i32, ptr %16, align 4, !tbaa !9
  %202 = load i32, ptr %15, align 4, !tbaa !9
  %203 = add i32 %202, %201
  store i32 %203, ptr %15, align 4, !tbaa !9
  %204 = load ptr, ptr %5, align 8, !tbaa !5
  %205 = load i32, ptr %12, align 4, !tbaa !9
  %206 = load i32, ptr %13, align 4, !tbaa !9
  %207 = load i32, ptr %14, align 4, !tbaa !9
  %208 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %204, i32 noundef %205, i32 noundef %206, i32 noundef %207, i32 noundef %208)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

209:                                              ; preds = %183
  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 = { "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 = { 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 #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"

declare void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 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_load8_u(ptr noundef, i64 noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AArrayStorageBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AresizeWithinCapacity0x28hermes0x3A0x3Avm0x3A0x3AArrayStorageBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3AHadesGC0x260x2C0x20unsigned0x20int0x29(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 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %8 = and i32 %7, 16777212
  %9 = add nsw i32 %8, -16
  %10 = lshr exact i32 %9, 2
  %.not = icmp ult i32 %10, %3
  br i1 %.not, label %41, label %11

11:                                               ; preds = %4
  %12 = add nuw nsw i64 %6, 12
  %13 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %12)
  %14 = icmp ult i32 %13, %3
  br i1 %14, label %15, label %24

15:                                               ; preds = %11
  %16 = add i32 %1, 16
  %17 = shl nuw i32 %3, 2
  %18 = add i32 %17, %16
  %19 = shl nuw i32 %13, 2
  %20 = add i32 %19, %16
  br label %21

21:                                               ; preds = %21, %15
  %.0 = phi i32 [ %20, %15 ], [ %23, %21 ]
  %22 = zext i32 %.0 to i64
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %22, i32 noundef 7)
  %23 = add i32 %.0, 4
  %.not116 = icmp eq i32 %23, %18
  br i1 %.not116, label %.loopexit, label %21

24:                                               ; preds = %11
  %.not114 = icmp ugt i32 %13, %3
  br i1 %.not114, label %25, label %.loopexit

25:                                               ; preds = %24
  %26 = zext i32 %2 to i64
  %27 = add nuw nsw i64 %26, 588
  %28 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %27)
  %29 = add i32 %1, 16
  %30 = shl nuw i32 %3, 2
  %31 = add i32 %30, %29
  %32 = and i32 %31, -4194304
  %33 = icmp eq i32 %28, %32
  br i1 %33, label %.loopexit, label %34

34:                                               ; preds = %25
  %35 = add nuw nsw i64 %26, 4053
  %36 = tail call i32 @i32_load8_u(ptr noundef nonnull %5, i64 noundef %35)
  %.not115 = icmp eq i32 %36, 0
  br i1 %.not115, label %.loopexit, label %37

37:                                               ; preds = %34
  %38 = sub i32 %13, %3
  %39 = shl i32 %38, 2
  %40 = ashr exact i32 %39, 2
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AsnapshotWriteBarrierRangeSlow0x28hermes0x3A0x3Avm0x3A0x3AGCHermesValueBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x20const0x2A0x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %2, i32 noundef %31, i32 noundef %40)
  br label %.loopexit

.loopexit:                                        ; preds = %21, %34, %25, %24, %37
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %12, i32 noundef %3)
  ret void

41:                                               ; preds = %4
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 200920, i32 noundef 61343, i32 noundef 123, i32 noundef 17334) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable
}

attributes #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 = { 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 = { 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,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass