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

; 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 i32 @w2c_hermes_getpagesize(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Aoscompat0x3A0x3Avm_allocate_aligned0x28unsigned0x20long0x2C0x20unsigned0x20long0x2C0x20void0x2A0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #5 {
  %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
  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) #7
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %17 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %17, ptr %12, align 4, !tbaa !9
  %18 = load i32, ptr %12, align 4, !tbaa !9
  %19 = icmp ne i32 %18, 0
  %20 = xor i1 %19, true
  %21 = zext i1 %20 to i32
  store i32 %21, ptr %12, align 4, !tbaa !9
  %22 = load i32, ptr %12, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %25

24:                                               ; preds = %5
  br label %212

25:                                               ; preds = %5
  store i32 293084, ptr %12, align 4, !tbaa !9
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.w2c_hermes, ptr %26, i32 0, i32 6
  %28 = load i32, ptr %12, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  %30 = call i32 @i32_load(ptr noundef %27, i64 noundef %29)
  store i32 %30, ptr %12, align 4, !tbaa !9
  %31 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %31, ptr %11, align 4, !tbaa !9
  %32 = load i32, ptr %12, align 4, !tbaa !9
  %33 = icmp ne i32 %32, 0
  %34 = xor i1 %33, true
  %35 = zext i1 %34 to i32
  store i32 %35, ptr %12, align 4, !tbaa !9
  %36 = load i32, ptr %12, align 4, !tbaa !9
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %42

38:                                               ; preds = %25
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = call i32 @w2c_hermes_getpagesize(ptr noundef %39)
  store i32 %40, ptr %12, align 4, !tbaa !9
  %41 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %41, ptr %11, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %38, %25
  %43 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %43, ptr %12, align 4, !tbaa !9
  %44 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %44, ptr %13, align 4, !tbaa !9
  %45 = load i32, ptr %13, align 4, !tbaa !9
  %46 = icmp eq i32 %45, 0
  %47 = xor i1 %46, true
  %48 = xor i1 %47, true
  %49 = zext i1 %48 to i32
  %50 = sext i32 %49 to i64
  %51 = call i64 @llvm.expect.i64(i64 %50, i64 0)
  %52 = icmp ne i64 %51, 0
  br i1 %52, label %53, label %55

53:                                               ; preds = %42
  call void @wasm_rt_trap(i32 noundef 3) #8
  unreachable

54:                                               ; No predecessors!
  br label %59

55:                                               ; preds = %42
  %56 = load i32, ptr %12, align 4, !tbaa !9
  %57 = load i32, ptr %13, align 4, !tbaa !9
  %58 = urem i32 %56, %57
  br label %59

59:                                               ; preds = %55, %54
  %60 = phi i32 [ 0, %54 ], [ %58, %55 ]
  store i32 %60, ptr %12, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %59
  br label %212

64:                                               ; preds = %59
  %65 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %65, ptr %12, align 4, !tbaa !9
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = icmp ne i32 %66, 0
  %68 = xor i1 %67, true
  %69 = zext i1 %68 to i32
  store i32 %69, ptr %12, align 4, !tbaa !9
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %73

72:                                               ; preds = %64
  br label %230

73:                                               ; preds = %64
  store i32 293084, ptr %12, align 4, !tbaa !9
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.w2c_hermes, ptr %74, i32 0, i32 6
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = call i32 @i32_load(ptr noundef %75, i64 noundef %77)
  store i32 %78, ptr %12, align 4, !tbaa !9
  %79 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %79, ptr %11, align 4, !tbaa !9
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = icmp ne i32 %80, 0
  %82 = xor i1 %81, true
  %83 = zext i1 %82 to i32
  store i32 %83, ptr %12, align 4, !tbaa !9
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %90

86:                                               ; preds = %73
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = call i32 @w2c_hermes_getpagesize(ptr noundef %87)
  store i32 %88, ptr %12, align 4, !tbaa !9
  %89 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %89, ptr %11, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %86, %73
  %91 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %91, ptr %12, align 4, !tbaa !9
  %92 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %92, ptr %13, align 4, !tbaa !9
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = icmp eq i32 %93, 0
  %95 = xor i1 %94, true
  %96 = xor i1 %95, true
  %97 = zext i1 %96 to i32
  %98 = sext i32 %97 to i64
  %99 = call i64 @llvm.expect.i64(i64 %98, i64 0)
  %100 = icmp ne i64 %99, 0
  br i1 %100, label %101, label %103

101:                                              ; preds = %90
  call void @wasm_rt_trap(i32 noundef 3) #8
  unreachable

102:                                              ; No predecessors!
  br label %107

103:                                              ; preds = %90
  %104 = load i32, ptr %12, align 4, !tbaa !9
  %105 = load i32, ptr %13, align 4, !tbaa !9
  %106 = urem i32 %104, %105
  br label %107

107:                                              ; preds = %103, %102
  %108 = phi i32 [ 0, %102 ], [ %106, %103 ]
  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 = %107
  br label %230

112:                                              ; preds = %107
  %113 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %113, ptr %12, align 4, !tbaa !9
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = call i32 @llvm.ctpop.i32(i32 %114)
  store i32 %115, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = icmp ne i32 %116, %117
  %119 = zext i1 %118 to i32
  store i32 %119, ptr %12, align 4, !tbaa !9
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %123

122:                                              ; preds = %112
  br label %248

123:                                              ; preds = %112
  %124 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %124, ptr %12, align 4, !tbaa !9
  %125 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %125, ptr %13, align 4, !tbaa !9
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = load i32, ptr %12, align 4, !tbaa !9
  %128 = load i32, ptr %13, align 4, !tbaa !9
  %129 = call i32 @w2c_hermes_aligned_alloc(ptr noundef %126, i32 noundef %127, i32 noundef %128)
  store i32 %129, ptr %12, align 4, !tbaa !9
  %130 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %130, ptr %9, align 4, !tbaa !9
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = icmp ne i32 %131, 0
  %133 = xor i1 %132, true
  %134 = zext i1 %133 to i32
  store i32 %134, ptr %12, align 4, !tbaa !9
  %135 = load i32, ptr %12, align 4, !tbaa !9
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %179

137:                                              ; preds = %123
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = call i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef %138)
  store i32 %139, ptr %12, 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 %12, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = call i32 @i32_load(ptr noundef %141, i64 noundef %143)
  store i32 %144, ptr %12, align 4, !tbaa !9
  %145 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %145, ptr %9, align 4, !tbaa !9
  %146 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %146, ptr %12, align 4, !tbaa !9
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef %147)
  store i32 %148, ptr %13, align 4, !tbaa !9
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.w2c_hermes, ptr %149, i32 0, i32 6
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = zext i32 %151 to i64
  %153 = add i64 %152, 4
  %154 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %150, i64 noundef %153, i32 noundef %154)
  %155 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %155, ptr %12, align 4, !tbaa !9
  %156 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %156, ptr %13, align 4, !tbaa !9
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.w2c_hermes, ptr %157, i32 0, i32 6
  %159 = load i32, ptr %13, align 4, !tbaa !9
  %160 = zext i32 %159 to i64
  %161 = add i64 %160, 8
  %162 = call i32 @i32_load8_u(ptr noundef %158, i64 noundef %161)
  store i32 %162, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %163 = load i32, ptr %14, align 4, !tbaa !9
  %164 = load i32, ptr %13, align 4, !tbaa !9
  %165 = or i32 %164, %163
  store i32 %165, ptr %13, 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 %12, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = add i64 %169, 8
  %171 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %167, i64 noundef %170, i32 noundef %171)
  %172 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %172, ptr %12, align 4, !tbaa !9
  %173 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %173, ptr %13, 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 %12, align 4, !tbaa !9
  %177 = zext i32 %176 to i64
  %178 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %175, i64 noundef %177, i32 noundef %178)
  br label %266

179:                                              ; preds = %123
  %180 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %180, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %181 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %181, ptr %14, align 4, !tbaa !9
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = load i32, ptr %12, align 4, !tbaa !9
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = load i32, ptr %14, align 4, !tbaa !9
  %186 = call i32 @w2c_hermes_0x5F_memset(ptr noundef %182, i32 noundef %183, i32 noundef %184, i32 noundef %185)
  store i32 %186, ptr %12, align 4, !tbaa !9
  %187 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %187, ptr %9, align 4, !tbaa !9
  %188 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %188, ptr %12, align 4, !tbaa !9
  %189 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %189, ptr %13, align 4, !tbaa !9
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.w2c_hermes, ptr %190, i32 0, i32 6
  %192 = load i32, ptr %13, align 4, !tbaa !9
  %193 = zext i32 %192 to i64
  %194 = add i64 %193, 8
  %195 = call i32 @i32_load8_u(ptr noundef %191, i64 noundef %194)
  store i32 %195, ptr %13, align 4, !tbaa !9
  store i32 254, ptr %14, align 4, !tbaa !9
  %196 = load i32, ptr %14, align 4, !tbaa !9
  %197 = load i32, ptr %13, align 4, !tbaa !9
  %198 = and i32 %197, %196
  store i32 %198, ptr %13, align 4, !tbaa !9
  %199 = load ptr, ptr %6, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.w2c_hermes, ptr %199, i32 0, i32 6
  %201 = load i32, ptr %12, align 4, !tbaa !9
  %202 = zext i32 %201 to i64
  %203 = add i64 %202, 8
  %204 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %200, i64 noundef %203, i32 noundef %204)
  %205 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %205, ptr %12, align 4, !tbaa !9
  %206 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %206, ptr %13, align 4, !tbaa !9
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.w2c_hermes, ptr %207, i32 0, i32 6
  %209 = load i32, ptr %12, align 4, !tbaa !9
  %210 = zext i32 %209 to i64
  %211 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %208, i64 noundef %210, i32 noundef %211)
  br label %266

212:                                              ; preds = %63, %24
  store i32 0, ptr %12, align 4, !tbaa !9
  %213 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %213, ptr %9, align 4, !tbaa !9
  store i32 111911, ptr %13, align 4, !tbaa !9
  %214 = load i32, ptr %13, align 4, !tbaa !9
  %215 = load i32, ptr %12, align 4, !tbaa !9
  %216 = add i32 %215, %214
  store i32 %216, ptr %12, align 4, !tbaa !9
  %217 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %217, ptr %13, align 4, !tbaa !9
  store i32 59017, ptr %14, align 4, !tbaa !9
  %218 = load i32, ptr %14, align 4, !tbaa !9
  %219 = load i32, ptr %13, align 4, !tbaa !9
  %220 = add i32 %219, %218
  store i32 %220, ptr %13, align 4, !tbaa !9
  store i32 98, ptr %14, align 4, !tbaa !9
  %221 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %221, ptr %15, align 4, !tbaa !9
  store i32 105583, ptr %16, align 4, !tbaa !9
  %222 = load i32, ptr %16, align 4, !tbaa !9
  %223 = load i32, ptr %15, align 4, !tbaa !9
  %224 = add i32 %223, %222
  store i32 %224, ptr %15, align 4, !tbaa !9
  %225 = load ptr, ptr %6, align 8, !tbaa !5
  %226 = load i32, ptr %12, align 4, !tbaa !9
  %227 = load i32, ptr %13, align 4, !tbaa !9
  %228 = load i32, ptr %14, align 4, !tbaa !9
  %229 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %225, i32 noundef %226, i32 noundef %227, i32 noundef %228, i32 noundef %229)
  call void @wasm_rt_trap(i32 noundef 5) #8
  unreachable

230:                                              ; preds = %111, %72
  store i32 0, ptr %12, align 4, !tbaa !9
  %231 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %231, ptr %9, align 4, !tbaa !9
  store i32 111943, ptr %13, align 4, !tbaa !9
  %232 = load i32, ptr %13, align 4, !tbaa !9
  %233 = load i32, ptr %12, align 4, !tbaa !9
  %234 = add i32 %233, %232
  store i32 %234, ptr %12, align 4, !tbaa !9
  %235 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %235, ptr %13, align 4, !tbaa !9
  store i32 59017, ptr %14, align 4, !tbaa !9
  %236 = load i32, ptr %14, align 4, !tbaa !9
  %237 = load i32, ptr %13, align 4, !tbaa !9
  %238 = add i32 %237, %236
  store i32 %238, ptr %13, align 4, !tbaa !9
  store i32 99, ptr %14, align 4, !tbaa !9
  %239 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %239, ptr %15, align 4, !tbaa !9
  store i32 105583, ptr %16, align 4, !tbaa !9
  %240 = load i32, ptr %16, align 4, !tbaa !9
  %241 = load i32, ptr %15, align 4, !tbaa !9
  %242 = add i32 %241, %240
  store i32 %242, ptr %15, align 4, !tbaa !9
  %243 = load ptr, ptr %6, align 8, !tbaa !5
  %244 = load i32, ptr %12, align 4, !tbaa !9
  %245 = load i32, ptr %13, align 4, !tbaa !9
  %246 = load i32, ptr %14, align 4, !tbaa !9
  %247 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %243, i32 noundef %244, i32 noundef %245, i32 noundef %246, i32 noundef %247)
  call void @wasm_rt_trap(i32 noundef 5) #8
  unreachable

248:                                              ; preds = %122
  store i32 0, ptr %12, align 4, !tbaa !9
  %249 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %249, ptr %9, align 4, !tbaa !9
  store i32 115243, ptr %13, align 4, !tbaa !9
  %250 = load i32, ptr %13, align 4, !tbaa !9
  %251 = load i32, ptr %12, align 4, !tbaa !9
  %252 = add i32 %251, %250
  store i32 %252, ptr %12, align 4, !tbaa !9
  %253 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %253, ptr %13, align 4, !tbaa !9
  store i32 59017, ptr %14, align 4, !tbaa !9
  %254 = load i32, ptr %14, align 4, !tbaa !9
  %255 = load i32, ptr %13, align 4, !tbaa !9
  %256 = add i32 %255, %254
  store i32 %256, ptr %13, align 4, !tbaa !9
  store i32 102, ptr %14, align 4, !tbaa !9
  %257 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %257, ptr %15, align 4, !tbaa !9
  store i32 105583, ptr %16, align 4, !tbaa !9
  %258 = load i32, ptr %16, align 4, !tbaa !9
  %259 = load i32, ptr %15, align 4, !tbaa !9
  %260 = add i32 %259, %258
  store i32 %260, ptr %15, align 4, !tbaa !9
  %261 = load ptr, ptr %6, align 8, !tbaa !5
  %262 = load i32, ptr %12, align 4, !tbaa !9
  %263 = load i32, ptr %13, align 4, !tbaa !9
  %264 = load i32, ptr %14, align 4, !tbaa !9
  %265 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %261, i32 noundef %262, i32 noundef %263, i32 noundef %264, i32 noundef %265)
  call void @wasm_rt_trap(i32 noundef 5) #8
  unreachable

266:                                              ; preds = %179, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  ret void
}

declare i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef) #3

declare i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef) #3

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

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

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { 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 i32 @i32_load8_u(ptr noundef, i64 noundef) local_unnamed_addr #0

; 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 i32 @w2c_hermes_getpagesize(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Aoscompat0x3A0x3Avm_allocate_aligned0x28unsigned0x20long0x2C0x20unsigned0x20long0x2C0x20void0x2A0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #3 {
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %42, label %6

6:                                                ; preds = %5
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef 293084)
  %.not130 = icmp eq i32 %8, 0
  br i1 %.not130, label %9, label %.thread

9:                                                ; preds = %6
  %10 = tail call i32 @w2c_hermes_getpagesize(ptr noundef %0) #5
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %.thread, !prof !5

12:                                               ; preds = %9
  tail call void @wasm_rt_trap(i32 noundef 3) #6
  unreachable

.thread:                                          ; preds = %6, %9
  %.0138 = phi i32 [ %10, %9 ], [ %8, %6 ]
  %13 = urem i32 %2, %.0138
  %.not131 = icmp eq i32 %13, 0
  br i1 %.not131, label %14, label %42

14:                                               ; preds = %.thread
  %.not132 = icmp eq i32 %3, 0
  br i1 %.not132, label %43, label %15

15:                                               ; preds = %14
  %16 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef 293084)
  %.not133 = icmp eq i32 %16, 0
  br i1 %.not133, label %17, label %.thread139

17:                                               ; preds = %15
  %18 = tail call i32 @w2c_hermes_getpagesize(ptr noundef %0) #5
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %.thread139, !prof !6

20:                                               ; preds = %17
  tail call void @wasm_rt_trap(i32 noundef 3) #6
  unreachable

.thread139:                                       ; preds = %15, %17
  %.1141 = phi i32 [ %18, %17 ], [ %16, %15 ]
  %21 = urem i32 %3, %.1141
  %.not134 = icmp eq i32 %21, 0
  br i1 %.not134, label %22, label %43

22:                                               ; preds = %.thread139
  %23 = tail call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 %3)
  %.not135 = icmp eq i32 %23, 1
  br i1 %.not135, label %24, label %44

24:                                               ; preds = %22
  %25 = tail call i32 @w2c_hermes_aligned_alloc(ptr noundef %0, i32 noundef %3, i32 noundef %2) #5
  %.not136 = icmp eq i32 %25, 0
  br i1 %.not136, label %26, label %36

26:                                               ; preds = %24
  %27 = tail call i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef %0) #5
  %28 = zext i32 %27 to i64
  %29 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %28)
  %30 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef %0) #5
  %31 = zext i32 %1 to i64
  %32 = add nuw nsw i64 %31, 4
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %32, i32 noundef %30)
  %33 = add nuw nsw i64 %31, 8
  %34 = tail call i32 @i32_load8_u(ptr noundef nonnull %7, i64 noundef %33)
  %35 = or i32 %34, 1
  tail call void @i32_store8(ptr noundef nonnull %7, i64 noundef %33, i32 noundef %35)
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %31, i32 noundef %29)
  br label %45

36:                                               ; preds = %24
  %37 = tail call i32 @w2c_hermes_0x5F_memset(ptr noundef %0, i32 noundef %25, i32 noundef 0, i32 noundef %2) #5
  %38 = zext i32 %1 to i64
  %39 = add nuw nsw i64 %38, 8
  %40 = tail call i32 @i32_load8_u(ptr noundef nonnull %7, i64 noundef %39)
  %41 = and i32 %40, 254
  tail call void @i32_store8(ptr noundef nonnull %7, i64 noundef %39, i32 noundef %41)
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %38, i32 noundef %37)
  br label %45

42:                                               ; preds = %.thread, %5
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 111911, i32 noundef 59017, i32 noundef 98, i32 noundef 105583) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

43:                                               ; preds = %.thread139, %14
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 111943, i32 noundef 59017, i32 noundef 99, i32 noundef 105583) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

44:                                               ; preds = %22
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 115243, i32 noundef 59017, i32 noundef 102, i32 noundef 105583) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

45:                                               ; preds = %36, %26
  ret void
}

declare i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef) local_unnamed_addr #2

declare i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef) local_unnamed_addr #2

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

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

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

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

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 = { mustprogress 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)"}
!5 = !{!"branch_weights", !"expected", i32 2861879, i32 2144621769}
!6 = !{!"branch_weights", !"expected", i32 2861880, i32 2144621768}


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