; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_opt_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: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) #1

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

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

; 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_dlfree(ptr noundef, i32 noundef) #2

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

35:                                               ; preds = %3
  %36 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %36, ptr %11, align 4, !tbaa !9
  store i32 11, ptr %12, align 4, !tbaa !9
  %37 = load i32, ptr %11, align 4, !tbaa !9
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = icmp uge i32 %37, %38
  %40 = zext i1 %39 to i32
  store i32 %40, ptr %11, align 4, !tbaa !9
  %41 = load i32, ptr %11, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %89

43:                                               ; preds = %35
  %44 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %44, ptr %11, align 4, !tbaa !9
  store i32 15, ptr %12, align 4, !tbaa !9
  %45 = load i32, ptr %12, align 4, !tbaa !9
  %46 = load i32, ptr %11, align 4, !tbaa !9
  %47 = or i32 %46, %45
  store i32 %47, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  %48 = load i32, ptr %12, align 4, !tbaa !9
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = add i32 %49, %48
  store i32 %50, ptr %11, align 4, !tbaa !9
  %51 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %51, ptr %9, align 4, !tbaa !9
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %52, i32 noundef %53)
  store i32 %54, ptr %11, align 4, !tbaa !9
  %55 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %55, ptr %10, align 4, !tbaa !9
  %56 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %56, ptr %11, align 4, !tbaa !9
  %57 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %57, ptr %12, align 4, !tbaa !9
  store i32 -2147483648, 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 = or i32 %59, %58
  store i32 %60, ptr %12, align 4, !tbaa !9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.w2c_hermes, ptr %61, i32 0, i32 6
  %63 = load i32, ptr %11, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = add i64 %64, 28
  %66 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %62, i64 noundef %65, i32 noundef %66)
  %67 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %67, ptr %11, align 4, !tbaa !9
  %68 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %68, ptr %12, align 4, !tbaa !9
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.w2c_hermes, ptr %69, i32 0, i32 6
  %71 = load i32, ptr %11, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = add i64 %72, 20
  %74 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %70, i64 noundef %73, i32 noundef %74)
  %75 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %75, ptr %11, align 4, !tbaa !9
  %76 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %76, ptr %12, align 4, !tbaa !9
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.w2c_hermes, ptr %77, i32 0, i32 6
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = add i64 %80, 24
  %82 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %78, i64 noundef %81, i32 noundef %82)
  %83 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %83, ptr %11, align 4, !tbaa !9
  %84 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %84, ptr %12, align 4, !tbaa !9
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = load i32, ptr %11, align 4, !tbaa !9
  %87 = add i32 %86, %85
  store i32 %87, ptr %11, align 4, !tbaa !9
  %88 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %88, ptr %9, align 4, !tbaa !9
  br label %117

89:                                               ; preds = %35
  %90 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %90, ptr %11, align 4, !tbaa !9
  %91 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %91, ptr %12, align 4, !tbaa !9
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.w2c_hermes, ptr %92, i32 0, i32 6
  %94 = load i32, ptr %11, align 4, !tbaa !9
  %95 = zext i32 %94 to i64
  %96 = add i64 %95, 31
  %97 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %93, i64 noundef %96, i32 noundef %97)
  %98 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %98, ptr %11, align 4, !tbaa !9
  store i32 20, ptr %12, align 4, !tbaa !9
  %99 = load i32, ptr %12, align 4, !tbaa !9
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = add i32 %100, %99
  store i32 %101, ptr %11, align 4, !tbaa !9
  %102 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %102, ptr %10, align 4, !tbaa !9
  %103 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %103, ptr %12, align 4, !tbaa !9
  %104 = load i32, ptr %12, align 4, !tbaa !9
  %105 = load i32, ptr %11, align 4, !tbaa !9
  %106 = add i32 %105, %104
  store i32 %106, ptr %11, align 4, !tbaa !9
  %107 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %107, ptr %9, align 4, !tbaa !9
  %108 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %108, ptr %11, align 4, !tbaa !9
  %109 = load i32, ptr %11, align 4, !tbaa !9
  %110 = icmp ne i32 %109, 0
  %111 = xor i1 %110, true
  %112 = zext i1 %111 to i32
  store i32 %112, ptr %11, align 4, !tbaa !9
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %116

115:                                              ; preds = %89
  br label %125

116:                                              ; preds = %89
  br label %117

117:                                              ; preds = %116, %43
  %118 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %118, ptr %11, align 4, !tbaa !9
  store i32 95888, ptr %12, align 4, !tbaa !9
  %119 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %119, ptr %13, align 4, !tbaa !9
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = load i32, ptr %11, align 4, !tbaa !9
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = load i32, ptr %13, align 4, !tbaa !9
  %124 = call i32 @w2c_hermes_0x5F_memcpy(ptr noundef %120, i32 noundef %121, i32 noundef %122, i32 noundef %123)
  store i32 %124, ptr %11, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %117, %115
  %126 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %126, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !9
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.w2c_hermes, ptr %127, i32 0, i32 6
  %129 = load i32, ptr %11, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %128, i64 noundef %130, i32 noundef %131)
  %132 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %132, ptr %11, align 4, !tbaa !9
  %133 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %133, ptr %12, align 4, !tbaa !9
  store i32 20, ptr %13, align 4, !tbaa !9
  %134 = load i32, ptr %13, align 4, !tbaa !9
  %135 = load i32, ptr %12, align 4, !tbaa !9
  %136 = add i32 %135, %134
  store i32 %136, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = load i32, ptr %11, align 4, !tbaa !9
  %139 = load i32, ptr %12, align 4, !tbaa !9
  %140 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AyoungGenCollection0x28std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x2C0x20bool0x29(ptr noundef %137, i32 noundef %138, i32 noundef %139, i32 noundef %140)
  %141 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %141, ptr %11, align 4, !tbaa !9
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.w2c_hermes, ptr %142, i32 0, i32 6
  %144 = load i32, ptr %11, align 4, !tbaa !9
  %145 = zext i32 %144 to i64
  %146 = add i64 %145, 31
  %147 = call i32 @i32_load8_s(ptr noundef %143, i64 noundef %146)
  store i32 %147, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !9
  %148 = load i32, ptr %11, align 4, !tbaa !9
  %149 = load i32, ptr %12, align 4, !tbaa !9
  %150 = icmp slt i32 %148, %149
  %151 = zext i1 %150 to i32
  store i32 %151, ptr %11, align 4, !tbaa !9
  %152 = load i32, ptr %11, align 4, !tbaa !9
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %164

154:                                              ; preds = %125
  %155 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %155, ptr %11, align 4, !tbaa !9
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.w2c_hermes, ptr %156, i32 0, i32 6
  %158 = load i32, ptr %11, align 4, !tbaa !9
  %159 = zext i32 %158 to i64
  %160 = add i64 %159, 20
  %161 = call i32 @i32_load(ptr noundef %157, i64 noundef %160)
  store i32 %161, ptr %11, align 4, !tbaa !9
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = load i32, ptr %11, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %162, i32 noundef %163)
  br label %164

164:                                              ; preds = %154, %125
  %165 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %165, ptr %11, align 4, !tbaa !9
  %166 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %166, ptr %12, align 4, !tbaa !9
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.w2c_hermes, ptr %167, i32 0, i32 6
  %169 = load i32, ptr %12, align 4, !tbaa !9
  %170 = zext i32 %169 to i64
  %171 = add i64 %170, 560
  %172 = call i32 @i32_load(ptr noundef %168, i64 noundef %171)
  store i32 %172, ptr %12, align 4, !tbaa !9
  %173 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %173, ptr %13, align 4, !tbaa !9
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.w2c_hermes, ptr %174, i32 0, i32 6
  %176 = load i32, ptr %13, align 4, !tbaa !9
  %177 = zext i32 %176 to i64
  %178 = add i64 %177, 556
  %179 = call i32 @i32_load(ptr noundef %175, i64 noundef %178)
  store i32 %179, ptr %13, align 4, !tbaa !9
  %180 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %180, ptr %8, align 4, !tbaa !9
  %181 = load i32, ptr %13, align 4, !tbaa !9
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = sub i32 %182, %181
  store i32 %183, ptr %12, align 4, !tbaa !9
  %184 = load i32, ptr %11, align 4, !tbaa !9
  %185 = load i32, ptr %12, align 4, !tbaa !9
  %186 = icmp ugt i32 %184, %185
  %187 = zext i1 %186 to i32
  store i32 %187, ptr %11, align 4, !tbaa !9
  %188 = load i32, ptr %11, align 4, !tbaa !9
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %235

190:                                              ; preds = %164
  %191 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %191, ptr %11, align 4, !tbaa !9
  %192 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %192, ptr %12, align 4, !tbaa !9
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.w2c_hermes, ptr %193, i32 0, i32 6
  %195 = load i32, ptr %12, align 4, !tbaa !9
  %196 = zext i32 %195 to i64
  %197 = add i64 %196, 548
  %198 = call i32 @i32_load(ptr noundef %194, i64 noundef %197)
  store i32 %198, ptr %12, align 4, !tbaa !9
  store i32 4194304, ptr %13, align 4, !tbaa !9
  %199 = load i32, ptr %13, align 4, !tbaa !9
  %200 = load i32, ptr %12, align 4, !tbaa !9
  %201 = add i32 %200, %199
  store i32 %201, ptr %12, align 4, !tbaa !9
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.w2c_hermes, ptr %202, i32 0, i32 6
  %204 = load i32, ptr %11, align 4, !tbaa !9
  %205 = zext i32 %204 to i64
  %206 = add i64 %205, 560
  %207 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %203, i64 noundef %206, i32 noundef %207)
  %208 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %208, ptr %11, align 4, !tbaa !9
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.w2c_hermes, ptr %209, i32 0, i32 6
  %211 = load i32, ptr %11, align 4, !tbaa !9
  %212 = zext i32 %211 to i64
  %213 = add i64 %212, 560
  %214 = call i32 @i32_load(ptr noundef %210, i64 noundef %213)
  store i32 %214, ptr %11, align 4, !tbaa !9
  %215 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %215, ptr %12, align 4, !tbaa !9
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.w2c_hermes, ptr %216, i32 0, i32 6
  %218 = load i32, ptr %12, align 4, !tbaa !9
  %219 = zext i32 %218 to i64
  %220 = add i64 %219, 556
  %221 = call i32 @i32_load(ptr noundef %217, i64 noundef %220)
  store i32 %221, ptr %12, align 4, !tbaa !9
  %222 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %222, ptr %8, align 4, !tbaa !9
  %223 = load i32, ptr %12, align 4, !tbaa !9
  %224 = load i32, ptr %11, align 4, !tbaa !9
  %225 = sub i32 %224, %223
  store i32 %225, ptr %11, align 4, !tbaa !9
  %226 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %226, ptr %12, align 4, !tbaa !9
  %227 = load i32, ptr %11, align 4, !tbaa !9
  %228 = load i32, ptr %12, align 4, !tbaa !9
  %229 = icmp ult i32 %227, %228
  %230 = zext i1 %229 to i32
  store i32 %230, ptr %11, align 4, !tbaa !9
  %231 = load i32, ptr %11, align 4, !tbaa !9
  %232 = icmp ne i32 %231, 0
  br i1 %232, label %233, label %234

233:                                              ; preds = %190
  br label %258

234:                                              ; preds = %190
  br label %235

235:                                              ; preds = %234, %164
  %236 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %236, ptr %11, align 4, !tbaa !9
  %237 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %237, ptr %12, align 4, !tbaa !9
  %238 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %238, ptr %13, align 4, !tbaa !9
  %239 = load i32, ptr %13, align 4, !tbaa !9
  %240 = load i32, ptr %12, align 4, !tbaa !9
  %241 = add i32 %240, %239
  store i32 %241, ptr %12, align 4, !tbaa !9
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.w2c_hermes, ptr %242, i32 0, i32 6
  %244 = load i32, ptr %11, align 4, !tbaa !9
  %245 = zext i32 %244 to i64
  %246 = add i64 %245, 556
  %247 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %243, i64 noundef %246, i32 noundef %247)
  %248 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %248, ptr %11, align 4, !tbaa !9
  store i32 32, ptr %12, align 4, !tbaa !9
  %249 = load i32, ptr %12, align 4, !tbaa !9
  %250 = load i32, ptr %11, align 4, !tbaa !9
  %251 = add i32 %250, %249
  store i32 %251, ptr %11, align 4, !tbaa !9
  %252 = load i32, ptr %11, align 4, !tbaa !9
  %253 = load ptr, ptr %4, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.w2c_hermes, ptr %253, i32 0, i32 3
  store i32 %252, ptr %254, align 8, !tbaa !11
  %255 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %255, ptr %11, align 4, !tbaa !9
  br label %309

256:                                              ; preds = %3
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  call void @w2c_hermes_abort(ptr noundef %257)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

258:                                              ; preds = %233
  store i32 131201, ptr %11, align 4, !tbaa !9
  %259 = load ptr, ptr %4, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.w2c_hermes, ptr %259, i32 0, i32 6
  %261 = load i32, ptr %11, align 4, !tbaa !9
  %262 = zext i32 %261 to i64
  %263 = call i32 @i32_load8_u(ptr noundef %260, i64 noundef %262)
  store i32 %263, ptr %11, align 4, !tbaa !9
  %264 = load i32, ptr %11, align 4, !tbaa !9
  %265 = icmp ne i32 %264, 0
  %266 = xor i1 %265, true
  %267 = zext i1 %266 to i32
  store i32 %267, ptr %11, align 4, !tbaa !9
  %268 = load i32, ptr %11, align 4, !tbaa !9
  %269 = icmp ne i32 %268, 0
  br i1 %269, label %270, label %276

270:                                              ; preds = %258
  store i32 131201, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  %271 = load ptr, ptr %4, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.w2c_hermes, ptr %271, i32 0, i32 6
  %273 = load i32, ptr %11, align 4, !tbaa !9
  %274 = zext i32 %273 to i64
  %275 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %272, i64 noundef %274, i32 noundef %275)
  br label %276

276:                                              ; preds = %270, %258
  %277 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %277, ptr %11, align 4, !tbaa !9
  store i32 4, ptr %12, align 4, !tbaa !9
  %278 = load ptr, ptr %4, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.w2c_hermes, ptr %278, i32 0, i32 6
  %280 = load i32, ptr %11, align 4, !tbaa !9
  %281 = zext i32 %280 to i64
  %282 = add i64 %281, 12
  %283 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %279, i64 noundef %282, i32 noundef %283)
  %284 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %284, ptr %11, align 4, !tbaa !9
  store i32 110180, ptr %12, align 4, !tbaa !9
  %285 = load ptr, ptr %4, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.w2c_hermes, ptr %285, i32 0, i32 6
  %287 = load i32, ptr %11, align 4, !tbaa !9
  %288 = zext i32 %287 to i64
  %289 = add i64 %288, 16
  %290 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %286, i64 noundef %289, i32 noundef %290)
  %291 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %291, ptr %11, align 4, !tbaa !9
  %292 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %292, ptr %12, align 4, !tbaa !9
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.w2c_hermes, ptr %293, i32 0, i32 6
  %295 = load i32, ptr %12, align 4, !tbaa !9
  %296 = zext i32 %295 to i64
  %297 = add i64 %296, 12
  %298 = call i64 @i64_load(ptr noundef %294, i64 noundef %297)
  store i64 %298, ptr %14, align 8, !tbaa !17
  %299 = load ptr, ptr %4, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.w2c_hermes, ptr %299, i32 0, i32 6
  %301 = load i32, ptr %11, align 4, !tbaa !9
  %302 = zext i32 %301 to i64
  %303 = load i64, ptr %14, align 8, !tbaa !17
  call void @i64_store(ptr noundef %300, i64 noundef %302, i64 noundef %303)
  %304 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %304, ptr %11, align 4, !tbaa !9
  %305 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %305, ptr %12, align 4, !tbaa !9
  %306 = load ptr, ptr %4, align 8, !tbaa !5
  %307 = load i32, ptr %11, align 4, !tbaa !9
  %308 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCBase0x3A0x3Aoom0x28std0x3A0x3A_0x5F20x3A0x3Aerror_code0x29(ptr noundef %306, i32 noundef %307, i32 noundef %308)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

309:                                              ; preds = %235
  %310 = load i32, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret i32 %310
}

declare i32 @w2c_hermes_strlen(ptr noundef, i32 noundef) #2

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

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

declare i32 @w2c_hermes_0x5F_memcpy(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

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

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

declare void @w2c_hermes_abort(ptr noundef) #2

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCBase0x3A0x3Aoom0x28std0x3A0x3A_0x5F20x3A0x3Aerror_code0x29(ptr 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 = { "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 = { 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 #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}
!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: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 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: inlinehint nounwind uwtable
declare hidden void @i64_store(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

declare void @w2c_hermes_dlfree(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AallocSlow0x28unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = add i32 %5, -32
  store i32 %6, ptr %4, align 8, !tbaa !5
  %7 = tail call i32 @w2c_hermes_strlen(ptr noundef %0, i32 noundef 95888) #4
  %8 = icmp ult i32 %7, 2147483632
  br i1 %8, label %9, label %56

9:                                                ; preds = %3
  %10 = icmp ugt i32 %7, 10
  br i1 %10, label %11, label %22

11:                                               ; preds = %9
  %12 = or i32 %7, 15
  %13 = add nuw i32 %12, 1
  %14 = tail call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %13) #4
  %15 = or i32 %13, -2147483648
  %16 = getelementptr inbounds i8, ptr %0, i64 40
  %17 = zext i32 %6 to i64
  %18 = add nuw nsw i64 %17, 28
  tail call void @i32_store(ptr noundef nonnull %16, i64 noundef %18, i32 noundef %15)
  %19 = add nuw nsw i64 %17, 20
  tail call void @i32_store(ptr noundef nonnull %16, i64 noundef %19, i32 noundef %14)
  %20 = add nuw nsw i64 %17, 24
  tail call void @i32_store(ptr noundef nonnull %16, i64 noundef %20, i32 noundef %7)
  %21 = add i32 %14, %7
  %.pre178 = add i32 %5, -12
  %.pre = add nuw nsw i64 %17, 31
  br label %28

22:                                               ; preds = %9
  %23 = getelementptr inbounds i8, ptr %0, i64 40
  %24 = zext i32 %6 to i64
  %25 = add nuw nsw i64 %24, 31
  tail call void @i32_store8(ptr noundef nonnull %23, i64 noundef %25, i32 noundef %7)
  %26 = add i32 %5, -12
  %27 = add i32 %7, %26
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %30, label %28

28:                                               ; preds = %22, %11
  %.pre176.pre-phi = phi i64 [ %25, %22 ], [ %.pre, %11 ]
  %.pre174.pre-phi = phi i64 [ %24, %22 ], [ %17, %11 ]
  %.pre.pre-phi = phi i32 [ %26, %22 ], [ %.pre178, %11 ]
  %.0169 = phi i32 [ %27, %22 ], [ %21, %11 ]
  %.0 = phi i32 [ %26, %22 ], [ %14, %11 ]
  %29 = tail call i32 @w2c_hermes_0x5F_memcpy(ptr noundef nonnull %0, i32 noundef %.0, i32 noundef 95888, i32 noundef %7) #4
  br label %30

30:                                               ; preds = %22, %28
  %.pre-phi177 = phi i64 [ %25, %22 ], [ %.pre176.pre-phi, %28 ]
  %.pre-phi175 = phi i64 [ %24, %22 ], [ %.pre174.pre-phi, %28 ]
  %.pre-phi = phi i32 [ %26, %22 ], [ %.pre.pre-phi, %28 ]
  %.1 = phi i32 [ %27, %22 ], [ %.0169, %28 ]
  %31 = getelementptr inbounds i8, ptr %0, i64 40
  %32 = zext i32 %.1 to i64
  tail call void @i32_store8(ptr noundef nonnull %31, i64 noundef %32, i32 noundef 0)
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AyoungGenCollection0x28std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x2C0x20bool0x29(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %.pre-phi, i32 noundef 0)
  %33 = tail call i32 @i32_load8_s(ptr noundef nonnull %31, i64 noundef %.pre-phi177)
  %34 = icmp slt i32 %33, 0
  br i1 %34, label %35, label %38

35:                                               ; preds = %30
  %36 = add nuw nsw i64 %.pre-phi175, 20
  %37 = tail call i32 @i32_load(ptr noundef nonnull %31, i64 noundef %36)
  tail call void @w2c_hermes_dlfree(ptr noundef nonnull %0, i32 noundef %37) #4
  br label %38

38:                                               ; preds = %35, %30
  %39 = zext i32 %1 to i64
  %40 = add nuw nsw i64 %39, 560
  %41 = tail call i32 @i32_load(ptr noundef nonnull %31, i64 noundef %40)
  %42 = add nuw nsw i64 %39, 556
  %43 = tail call i32 @i32_load(ptr noundef nonnull %31, i64 noundef %42)
  %44 = sub i32 %41, %43
  %45 = icmp ult i32 %44, %2
  br i1 %45, label %46, label %54

46:                                               ; preds = %38
  %47 = add nuw nsw i64 %39, 548
  %48 = tail call i32 @i32_load(ptr noundef nonnull %31, i64 noundef %47)
  %49 = add i32 %48, 4194304
  tail call void @i32_store(ptr noundef nonnull %31, i64 noundef %40, i32 noundef %49)
  %50 = tail call i32 @i32_load(ptr noundef nonnull %31, i64 noundef %40)
  %51 = tail call i32 @i32_load(ptr noundef nonnull %31, i64 noundef %42)
  %52 = sub i32 %50, %51
  %53 = icmp ult i32 %52, %2
  br i1 %53, label %57, label %54

54:                                               ; preds = %46, %38
  %.0170 = phi i32 [ %51, %46 ], [ %43, %38 ]
  %55 = add i32 %.0170, %2
  tail call void @i32_store(ptr noundef nonnull %31, i64 noundef %42, i32 noundef %55)
  store i32 %5, ptr %4, align 8, !tbaa !5
  ret i32 %.0170

56:                                               ; preds = %3
  tail call void @w2c_hermes_abort(ptr noundef nonnull %0) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

57:                                               ; preds = %46
  %58 = tail call i32 @i32_load8_u(ptr noundef nonnull %31, i64 noundef 131201)
  %.not173 = icmp eq i32 %58, 0
  br i1 %.not173, label %59, label %60

59:                                               ; preds = %57
  tail call void @i32_store8(ptr noundef nonnull %31, i64 noundef 131201, i32 noundef 1)
  br label %60

60:                                               ; preds = %59, %57
  %61 = add nuw nsw i64 %.pre-phi175, 12
  tail call void @i32_store(ptr noundef nonnull %31, i64 noundef %61, i32 noundef 4)
  %62 = add nuw nsw i64 %.pre-phi175, 16
  tail call void @i32_store(ptr noundef nonnull %31, i64 noundef %62, i32 noundef 110180)
  %63 = tail call i64 @i64_load(ptr noundef nonnull %31, i64 noundef %61)
  tail call void @i64_store(ptr noundef nonnull %31, i64 noundef %.pre-phi175, i64 noundef %63)
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCBase0x3A0x3Aoom0x28std0x3A0x3A_0x5F20x3A0x3Aerror_code0x29(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %6)
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable
}

declare i32 @w2c_hermes_strlen(ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

declare i32 @w2c_hermes_0x5F_memcpy(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

declare void @w2c_hermes_abort(ptr noundef) local_unnamed_addr #1

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

; 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 i64 @i64_load(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCBase0x3A0x3Aoom0x28std0x3A0x3A_0x5F20x3A0x3Aerror_code0x29(ptr 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 = { "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 = { 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 = { 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}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass