; 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: nounwind uwtable
declare dso_local void @w2c_hermes_hermes0x3A0x3Amake_error_code0x28hermes0x3A0x3AOOMError0x29(ptr noundef, i32 noundef, i32 noundef) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

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

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

declare i32 @w2c_hermes_getpagesize(ptr noundef) #4

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

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

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

55:                                               ; preds = %44
  call void @wasm_rt_trap(i32 noundef 3) #7
  unreachable

56:                                               ; No predecessors!
  br label %61

57:                                               ; preds = %44
  %58 = load i32, ptr %11, align 4, !tbaa !9
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = urem i32 %58, %59
  br label %61

61:                                               ; preds = %57, %56
  %62 = phi i32 [ 0, %56 ], [ %60, %57 ]
  store i32 %62, ptr %11, align 4, !tbaa !9
  %63 = load i32, ptr %11, align 4, !tbaa !9
  %64 = icmp ne i32 %63, 0
  %65 = xor i1 %64, true
  %66 = zext i1 %65 to i32
  store i32 %66, ptr %11, align 4, !tbaa !9
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %271

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

82:                                               ; preds = %69
  br label %108

83:                                               ; preds = %69
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = call i32 @w2c_hermes_getpagesize(ptr noundef %84)
  store i32 %85, ptr %11, align 4, !tbaa !9
  %86 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %86, ptr %12, align 4, !tbaa !9
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = icmp uge i32 %87, %88
  %90 = zext i1 %89 to i32
  store i32 %90, ptr %11, align 4, !tbaa !9
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %94

93:                                               ; preds = %83
  br label %108

94:                                               ; preds = %83
  %95 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %95, ptr %11, align 4, !tbaa !9
  %96 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %96, ptr %12, align 4, !tbaa !9
  store i32 293084, ptr %13, align 4, !tbaa !9
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.w2c_hermes, ptr %97, i32 0, i32 6
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = zext i32 %99 to i64
  %101 = call i32 @i32_load(ptr noundef %98, i64 noundef %100)
  store i32 %101, ptr %13, align 4, !tbaa !9
  %102 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %102, ptr %14, align 4, !tbaa !9
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = load i32, ptr %11, align 4, !tbaa !9
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Aoscompat0x3A0x3Avm_allocate_aligned0x28unsigned0x20long0x2C0x20unsigned0x20long0x2C0x20void0x2A0x29(ptr noundef %103, i32 noundef %104, i32 noundef %105, i32 noundef %106, i32 noundef %107)
  br label %263

108:                                              ; preds = %93, %82
  %109 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %109, ptr %11, align 4, !tbaa !9
  store i32 267304, ptr %12, align 4, !tbaa !9
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.w2c_hermes, ptr %110, i32 0, i32 6
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = call i32 @i32_load(ptr noundef %111, i64 noundef %113)
  store i32 %114, ptr %12, align 4, !tbaa !9
  %115 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %115, ptr %9, align 4, !tbaa !9
  %116 = load i32, ptr %11, align 4, !tbaa !9
  %117 = load i32, ptr %12, align 4, !tbaa !9
  %118 = icmp ugt i32 %116, %117
  %119 = zext i1 %118 to i32
  store i32 %119, ptr %11, align 4, !tbaa !9
  %120 = load i32, ptr %11, align 4, !tbaa !9
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %160

122:                                              ; preds = %108
  %123 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %123, ptr %11, align 4, !tbaa !9
  store i32 8, ptr %12, align 4, !tbaa !9
  %124 = load i32, ptr %12, align 4, !tbaa !9
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = add i32 %125, %124
  store i32 %126, ptr %11, align 4, !tbaa !9
  store i32 6, ptr %12, align 4, !tbaa !9
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = load i32, ptr %11, align 4, !tbaa !9
  %129 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Amake_error_code0x28hermes0x3A0x3AOOMError0x29(ptr noundef %127, i32 noundef %128, i32 noundef %129)
  %130 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %130, ptr %11, align 4, !tbaa !9
  %131 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %131, ptr %12, align 4, !tbaa !9
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.w2c_hermes, ptr %132, i32 0, i32 6
  %134 = load i32, ptr %12, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = add i64 %135, 8
  %137 = call i64 @i64_load(ptr noundef %133, i64 noundef %136)
  store i64 %137, ptr %16, align 8, !tbaa !17
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.w2c_hermes, ptr %138, i32 0, i32 6
  %140 = load i32, ptr %11, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = load i64, ptr %16, align 8, !tbaa !17
  call void @i64_store(ptr noundef %139, i64 noundef %141, i64 noundef %142)
  %143 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %143, ptr %11, align 4, !tbaa !9
  %144 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %144, ptr %12, 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 %12, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = add i64 %148, 8
  %150 = call i32 @i32_load8_u(ptr noundef %146, i64 noundef %149)
  store i32 %150, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %151 = load i32, ptr %13, align 4, !tbaa !9
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = or i32 %152, %151
  store i32 %153, ptr %12, align 4, !tbaa !9
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.w2c_hermes, ptr %154, i32 0, i32 6
  %156 = load i32, ptr %11, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = add i64 %157, 8
  %159 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %155, i64 noundef %158, i32 noundef %159)
  br label %263

160:                                              ; preds = %108
  %161 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %161, ptr %11, align 4, !tbaa !9
  store i32 -1, ptr %12, align 4, !tbaa !9
  %162 = load i32, ptr %11, align 4, !tbaa !9
  %163 = load i32, ptr %12, align 4, !tbaa !9
  %164 = icmp ne i32 %162, %163
  %165 = zext i1 %164 to i32
  store i32 %165, ptr %11, align 4, !tbaa !9
  %166 = load i32, ptr %11, align 4, !tbaa !9
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %179

168:                                              ; preds = %160
  store i32 267304, ptr %11, align 4, !tbaa !9
  %169 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %169, ptr %12, align 4, !tbaa !9
  %170 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %170, ptr %13, align 4, !tbaa !9
  %171 = load i32, ptr %13, align 4, !tbaa !9
  %172 = load i32, ptr %12, align 4, !tbaa !9
  %173 = sub i32 %172, %171
  store i32 %173, ptr %12, align 4, !tbaa !9
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.w2c_hermes, ptr %174, i32 0, i32 6
  %176 = load i32, ptr %11, align 4, !tbaa !9
  %177 = zext i32 %176 to i64
  %178 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %175, i64 noundef %177, i32 noundef %178)
  br label %179

179:                                              ; preds = %168, %160
  store i32 0, ptr %11, align 4, !tbaa !9
  %180 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %180, ptr %12, align 4, !tbaa !9
  store i32 3, ptr %13, align 4, !tbaa !9
  store i32 34, ptr %14, align 4, !tbaa !9
  store i32 -1, ptr %15, align 4, !tbaa !9
  store i64 0, ptr %17, align 8, !tbaa !17
  %181 = load ptr, ptr %5, align 8, !tbaa !5
  %182 = load i32, ptr %11, align 4, !tbaa !9
  %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 = load i32, ptr %15, align 4, !tbaa !9
  %187 = load i64, ptr %17, align 8, !tbaa !17
  %188 = call i32 @w2c_hermes_0x5F_mmap(ptr noundef %181, i32 noundef %182, i32 noundef %183, i32 noundef %184, i32 noundef %185, i32 noundef %186, i64 noundef %187)
  store i32 %188, ptr %11, align 4, !tbaa !9
  %189 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %189, ptr %7, align 4, !tbaa !9
  store i32 -1, ptr %12, align 4, !tbaa !9
  %190 = load i32, ptr %11, align 4, !tbaa !9
  %191 = load i32, ptr %12, align 4, !tbaa !9
  %192 = icmp eq i32 %190, %191
  %193 = zext i1 %192 to i32
  store i32 %193, ptr %11, align 4, !tbaa !9
  %194 = load i32, ptr %11, align 4, !tbaa !9
  %195 = icmp ne i32 %194, 0
  br i1 %195, label %196, label %238

196:                                              ; preds = %179
  %197 = load ptr, ptr %5, align 8, !tbaa !5
  %198 = call i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef %197)
  store i32 %198, ptr %11, align 4, !tbaa !9
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.w2c_hermes, ptr %199, i32 0, i32 6
  %201 = load i32, ptr %11, align 4, !tbaa !9
  %202 = zext i32 %201 to i64
  %203 = call i32 @i32_load(ptr noundef %200, i64 noundef %202)
  store i32 %203, ptr %11, align 4, !tbaa !9
  %204 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %204, ptr %7, align 4, !tbaa !9
  %205 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %205, ptr %11, align 4, !tbaa !9
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef %206)
  store i32 %207, ptr %12, align 4, !tbaa !9
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.w2c_hermes, ptr %208, i32 0, i32 6
  %210 = load i32, ptr %11, align 4, !tbaa !9
  %211 = zext i32 %210 to i64
  %212 = add i64 %211, 4
  %213 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %209, i64 noundef %212, i32 noundef %213)
  %214 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %214, ptr %11, align 4, !tbaa !9
  %215 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %215, ptr %12, align 4, !tbaa !9
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.w2c_hermes, ptr %216, i32 0, i32 6
  %218 = load i32, ptr %11, align 4, !tbaa !9
  %219 = zext i32 %218 to i64
  %220 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %217, i64 noundef %219, i32 noundef %220)
  %221 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %221, ptr %11, align 4, !tbaa !9
  %222 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %222, ptr %12, align 4, !tbaa !9
  %223 = load ptr, ptr %5, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.w2c_hermes, ptr %223, i32 0, i32 6
  %225 = load i32, ptr %12, align 4, !tbaa !9
  %226 = zext i32 %225 to i64
  %227 = add i64 %226, 8
  %228 = call i32 @i32_load8_u(ptr noundef %224, i64 noundef %227)
  store i32 %228, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %229 = load i32, ptr %13, align 4, !tbaa !9
  %230 = load i32, ptr %12, align 4, !tbaa !9
  %231 = or i32 %230, %229
  store i32 %231, ptr %12, align 4, !tbaa !9
  %232 = load ptr, ptr %5, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.w2c_hermes, ptr %232, i32 0, i32 6
  %234 = load i32, ptr %11, align 4, !tbaa !9
  %235 = zext i32 %234 to i64
  %236 = add i64 %235, 8
  %237 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %233, i64 noundef %236, i32 noundef %237)
  br label %263

238:                                              ; preds = %179
  %239 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %239, ptr %11, align 4, !tbaa !9
  %240 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %240, ptr %12, align 4, !tbaa !9
  %241 = load ptr, ptr %5, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.w2c_hermes, ptr %241, i32 0, i32 6
  %243 = load i32, ptr %11, align 4, !tbaa !9
  %244 = zext i32 %243 to i64
  %245 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %242, i64 noundef %244, i32 noundef %245)
  %246 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %246, ptr %11, align 4, !tbaa !9
  %247 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %247, ptr %12, align 4, !tbaa !9
  %248 = load ptr, ptr %5, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.w2c_hermes, ptr %248, i32 0, i32 6
  %250 = load i32, ptr %12, align 4, !tbaa !9
  %251 = zext i32 %250 to i64
  %252 = add i64 %251, 8
  %253 = call i32 @i32_load8_u(ptr noundef %249, i64 noundef %252)
  store i32 %253, ptr %12, align 4, !tbaa !9
  store i32 254, ptr %13, align 4, !tbaa !9
  %254 = load i32, ptr %13, align 4, !tbaa !9
  %255 = load i32, ptr %12, align 4, !tbaa !9
  %256 = and i32 %255, %254
  store i32 %256, ptr %12, align 4, !tbaa !9
  %257 = load ptr, ptr %5, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.w2c_hermes, ptr %257, i32 0, i32 6
  %259 = load i32, ptr %11, align 4, !tbaa !9
  %260 = zext i32 %259 to i64
  %261 = add i64 %260, 8
  %262 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %258, i64 noundef %261, i32 noundef %262)
  br label %263

263:                                              ; preds = %238, %196, %122, %94
  %264 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %264, ptr %11, align 4, !tbaa !9
  store i32 16, ptr %12, align 4, !tbaa !9
  %265 = load i32, ptr %12, align 4, !tbaa !9
  %266 = load i32, ptr %11, align 4, !tbaa !9
  %267 = add i32 %266, %265
  store i32 %267, ptr %11, align 4, !tbaa !9
  %268 = load i32, ptr %11, align 4, !tbaa !9
  %269 = load ptr, ptr %5, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.w2c_hermes, ptr %269, i32 0, i32 3
  store i32 %268, ptr %270, align 8, !tbaa !11
  br label %289

271:                                              ; preds = %61
  store i32 0, ptr %11, align 4, !tbaa !9
  %272 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %272, ptr %7, align 4, !tbaa !9
  store i32 111921, ptr %12, align 4, !tbaa !9
  %273 = load i32, ptr %12, align 4, !tbaa !9
  %274 = load i32, ptr %11, align 4, !tbaa !9
  %275 = add i32 %274, %273
  store i32 %275, ptr %11, align 4, !tbaa !9
  %276 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %276, ptr %12, align 4, !tbaa !9
  store i32 59017, ptr %13, align 4, !tbaa !9
  %277 = load i32, ptr %13, align 4, !tbaa !9
  %278 = load i32, ptr %12, align 4, !tbaa !9
  %279 = add i32 %278, %277
  store i32 %279, ptr %12, align 4, !tbaa !9
  store i32 87, ptr %13, align 4, !tbaa !9
  %280 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %280, ptr %14, align 4, !tbaa !9
  store i32 91416, ptr %15, align 4, !tbaa !9
  %281 = load i32, ptr %15, align 4, !tbaa !9
  %282 = load i32, ptr %14, align 4, !tbaa !9
  %283 = add i32 %282, %281
  store i32 %283, ptr %14, align 4, !tbaa !9
  %284 = load ptr, ptr %5, align 8, !tbaa !5
  %285 = load i32, ptr %11, align 4, !tbaa !9
  %286 = load i32, ptr %12, align 4, !tbaa !9
  %287 = load i32, ptr %13, align 4, !tbaa !9
  %288 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %284, i32 noundef %285, i32 noundef %286, i32 noundef %287, i32 noundef %288)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

289:                                              ; preds = %263
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret void
}

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

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

declare i32 @w2c_hermes_0x5F_mmap(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) #4

declare i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef) #4

declare i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef) #4

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

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { "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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { 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}
!11 = !{!12, !10, i64 24}
!12 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !13, i64 40, !16, i64 80}
!13 = !{!"", !6, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !15, i64 32}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!17 = !{!14, !14, 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: nounwind uwtable
declare dso_local void @w2c_hermes_hermes0x3A0x3Amake_error_code0x28hermes0x3A0x3AOOMError0x29(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

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

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

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

declare i32 @w2c_hermes_getpagesize(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Aoscompat0x3A0x3Avm_allocate0x28unsigned0x20long0x2C0x20void0x2A0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = add i32 %6, -16
  store i32 %7, ptr %5, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef 293084)
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %10, label %.thread

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

13:                                               ; preds = %10
  tail call void @wasm_rt_trap(i32 noundef 3) #5
  unreachable

.thread:                                          ; preds = %4, %10
  %.0155 = phi i32 [ %11, %10 ], [ %9, %4 ]
  %14 = urem i32 %2, %.0155
  %.not150 = icmp eq i32 %14, 0
  br i1 %.not150, label %15, label %55

15:                                               ; preds = %.thread
  %16 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef 293084)
  %.not151 = icmp eq i32 %16, 0
  br i1 %.not151, label %21, label %17

17:                                               ; preds = %15
  %18 = tail call i32 @w2c_hermes_getpagesize(ptr noundef nonnull %0) #4
  %.not152 = icmp ult i32 %18, %16
  br i1 %.not152, label %19, label %21

19:                                               ; preds = %17
  %20 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef 293084)
  tail call void @w2c_hermes_hermes0x3A0x3Aoscompat0x3A0x3Avm_allocate_aligned0x28unsigned0x20long0x2C0x20unsigned0x20long0x2C0x20void0x2A0x29(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %2, i32 noundef %20, i32 noundef %2)
  br label %54

21:                                               ; preds = %17, %15
  %22 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef 267304)
  %23 = icmp ult i32 %22, %2
  br i1 %23, label %24, label %33

24:                                               ; preds = %21
  %25 = add i32 %6, -8
  tail call void @w2c_hermes_hermes0x3A0x3Amake_error_code0x28hermes0x3A0x3AOOMError0x29(ptr noundef nonnull %0, i32 noundef %25, i32 noundef 6)
  %26 = zext i32 %7 to i64
  %27 = add nuw nsw i64 %26, 8
  %28 = tail call i64 @i64_load(ptr noundef nonnull %8, i64 noundef %27)
  %29 = zext i32 %1 to i64
  tail call void @i64_store(ptr noundef nonnull %8, i64 noundef %29, i64 noundef %28)
  %30 = add nuw nsw i64 %29, 8
  %31 = tail call i32 @i32_load8_u(ptr noundef nonnull %8, i64 noundef %30)
  %32 = or i32 %31, 1
  tail call void @i32_store8(ptr noundef nonnull %8, i64 noundef %30, i32 noundef %32)
  br label %54

33:                                               ; preds = %21
  %.not153 = icmp eq i32 %22, -1
  br i1 %.not153, label %36, label %34

34:                                               ; preds = %33
  %35 = sub i32 %22, %2
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef 267304, i32 noundef %35)
  br label %36

36:                                               ; preds = %34, %33
  %37 = tail call i32 @w2c_hermes_0x5F_mmap(ptr noundef nonnull %0, i32 noundef 0, i32 noundef %2, i32 noundef 3, i32 noundef 34, i32 noundef -1, i64 noundef 0) #4
  %38 = icmp eq i32 %37, -1
  br i1 %38, label %39, label %49

39:                                               ; preds = %36
  %40 = tail call i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef nonnull %0) #4
  %41 = zext i32 %40 to i64
  %42 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %41)
  %43 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef nonnull %0) #4
  %44 = zext i32 %1 to i64
  %45 = add nuw nsw i64 %44, 4
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %45, i32 noundef %43)
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %44, i32 noundef %42)
  %46 = add nuw nsw i64 %44, 8
  %47 = tail call i32 @i32_load8_u(ptr noundef nonnull %8, i64 noundef %46)
  %48 = or i32 %47, 1
  tail call void @i32_store8(ptr noundef nonnull %8, i64 noundef %46, i32 noundef %48)
  br label %54

49:                                               ; preds = %36
  %50 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %50, i32 noundef %37)
  %51 = add nuw nsw i64 %50, 8
  %52 = tail call i32 @i32_load8_u(ptr noundef nonnull %8, i64 noundef %51)
  %53 = and i32 %52, 254
  tail call void @i32_store8(ptr noundef nonnull %8, i64 noundef %51, i32 noundef %53)
  br label %54

54:                                               ; preds = %49, %39, %24, %19
  store i32 %6, ptr %5, align 8, !tbaa !5
  ret void

55:                                               ; preds = %.thread
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef nonnull %0, i32 noundef 111921, i32 noundef 59017, i32 noundef 87, i32 noundef 91416) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable
}

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

declare i32 @w2c_hermes_0x5F_mmap(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #3

declare i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef) local_unnamed_addr #3

declare i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef) local_unnamed_addr #3

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

attributes #0 = { 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 = { 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 }
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)"}
!5 = !{!6, !10, i64 24}
!6 = !{!"w2c_hermes", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !14, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12}
!15 = !{!"branch_weights", !"expected", i32 2861880, i32 2144621768}


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