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

; 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 i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr 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_load(ptr noundef, i64 noundef) #2

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

declare void @w2c_hermes_abort(ptr noundef) #4

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

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

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

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

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

declare i32 @w2c_hermes_memmove(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #4

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

49:                                               ; preds = %3
  %50 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %50, ptr %14, align 4, !tbaa !9
  %51 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %51, ptr %15, align 4, !tbaa !9
  %52 = load i32, ptr %15, align 4, !tbaa !9
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %71

54:                                               ; preds = %49
  %55 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %55, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !9
  %56 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %56, ptr %17, align 4, !tbaa !9
  store i32 2, ptr %18, align 4, !tbaa !9
  %57 = load i32, ptr %18, align 4, !tbaa !9
  %58 = and i32 %57, 31
  %59 = load i32, ptr %17, align 4, !tbaa !9
  %60 = shl i32 %59, %58
  store i32 %60, ptr %17, align 4, !tbaa !9
  %61 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %61, ptr %5, align 4, !tbaa !9
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = load i32, ptr %15, align 4, !tbaa !9
  %64 = load i32, ptr %16, align 4, !tbaa !9
  %65 = load i32, ptr %17, align 4, !tbaa !9
  %66 = call i32 @w2c_hermes_0x5F_memset(ptr noundef %62, i32 noundef %63, i32 noundef %64, i32 noundef %65)
  store i32 %66, ptr %15, align 4, !tbaa !9
  %67 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %67, ptr %16, align 4, !tbaa !9
  %68 = load i32, ptr %16, align 4, !tbaa !9
  %69 = load i32, ptr %15, align 4, !tbaa !9
  %70 = add i32 %69, %68
  store i32 %70, ptr %15, align 4, !tbaa !9
  br label %73

71:                                               ; preds = %49
  %72 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %72, ptr %15, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %71, %54
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.w2c_hermes, ptr %74, i32 0, i32 6
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = add i64 %77, 4
  %79 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %75, i64 noundef %78, i32 noundef %79)
  br label %248

80:                                               ; preds = %3
  %81 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %81, ptr %14, align 4, !tbaa !9
  %82 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %82, ptr %15, align 4, !tbaa !9
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.w2c_hermes, ptr %83, i32 0, i32 6
  %85 = load i32, ptr %15, align 4, !tbaa !9
  %86 = zext i32 %85 to i64
  %87 = call i32 @i32_load(ptr noundef %84, i64 noundef %86)
  store i32 %87, ptr %15, align 4, !tbaa !9
  %88 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %88, ptr %7, align 4, !tbaa !9
  %89 = load i32, ptr %15, align 4, !tbaa !9
  %90 = load i32, ptr %14, align 4, !tbaa !9
  %91 = sub i32 %90, %89
  store i32 %91, ptr %14, align 4, !tbaa !9
  %92 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %92, ptr %11, align 4, !tbaa !9
  store i32 2, ptr %15, align 4, !tbaa !9
  %93 = load i32, ptr %14, align 4, !tbaa !9
  %94 = load i32, ptr %15, align 4, !tbaa !9
  %95 = and i32 %94, 31
  %96 = ashr i32 %93, %95
  store i32 %96, ptr %14, align 4, !tbaa !9
  %97 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %97, ptr %12, align 4, !tbaa !9
  %98 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %98, ptr %15, align 4, !tbaa !9
  %99 = load i32, ptr %15, align 4, !tbaa !9
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = add i32 %100, %99
  store i32 %101, ptr %14, align 4, !tbaa !9
  %102 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %102, ptr %8, align 4, !tbaa !9
  store i32 1073741824, ptr %15, align 4, !tbaa !9
  %103 = load i32, ptr %14, align 4, !tbaa !9
  %104 = load i32, ptr %15, align 4, !tbaa !9
  %105 = icmp ult i32 %103, %104
  %106 = zext i1 %105 to i32
  store i32 %106, ptr %14, align 4, !tbaa !9
  %107 = load i32, ptr %14, align 4, !tbaa !9
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %244

109:                                              ; preds = %80
  store i32 1073741823, ptr %14, align 4, !tbaa !9
  %110 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %110, ptr %15, align 4, !tbaa !9
  %111 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %111, ptr %16, align 4, !tbaa !9
  %112 = load i32, ptr %16, align 4, !tbaa !9
  %113 = load i32, ptr %15, align 4, !tbaa !9
  %114 = sub i32 %113, %112
  store i32 %114, ptr %15, align 4, !tbaa !9
  %115 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %115, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %116 = load i32, ptr %15, align 4, !tbaa !9
  %117 = load i32, ptr %16, align 4, !tbaa !9
  %118 = and i32 %117, 31
  %119 = ashr i32 %116, %118
  store i32 %119, ptr %15, align 4, !tbaa !9
  %120 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %120, ptr %13, align 4, !tbaa !9
  %121 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %121, ptr %16, align 4, !tbaa !9
  %122 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %122, ptr %17, align 4, !tbaa !9
  %123 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %123, ptr %18, align 4, !tbaa !9
  %124 = load i32, ptr %17, align 4, !tbaa !9
  %125 = load i32, ptr %18, align 4, !tbaa !9
  %126 = icmp ult i32 %124, %125
  %127 = zext i1 %126 to i32
  store i32 %127, ptr %17, align 4, !tbaa !9
  %128 = load i32, ptr %17, align 4, !tbaa !9
  %129 = icmp ne i32 %128, 0
  br i1 %129, label %130, label %132

130:                                              ; preds = %109
  %131 = load i32, ptr %15, align 4, !tbaa !9
  br label %134

132:                                              ; preds = %109
  %133 = load i32, ptr %16, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %132, %130
  %135 = phi i32 [ %131, %130 ], [ %133, %132 ]
  store i32 %135, ptr %15, align 4, !tbaa !9
  %136 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %136, ptr %16, align 4, !tbaa !9
  store i32 2147483644, ptr %17, align 4, !tbaa !9
  %137 = load i32, ptr %16, align 4, !tbaa !9
  %138 = load i32, ptr %17, align 4, !tbaa !9
  %139 = icmp uge i32 %137, %138
  %140 = zext i1 %139 to i32
  store i32 %140, ptr %16, align 4, !tbaa !9
  %141 = load i32, ptr %16, align 4, !tbaa !9
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %145

143:                                              ; preds = %134
  %144 = load i32, ptr %14, align 4, !tbaa !9
  br label %147

145:                                              ; preds = %134
  %146 = load i32, ptr %15, align 4, !tbaa !9
  br label %147

147:                                              ; preds = %145, %143
  %148 = phi i32 [ %144, %143 ], [ %146, %145 ]
  store i32 %148, ptr %14, align 4, !tbaa !9
  %149 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %149, ptr %8, align 4, !tbaa !9
  %150 = load i32, ptr %14, align 4, !tbaa !9
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %171

152:                                              ; preds = %147
  %153 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %153, ptr %14, align 4, !tbaa !9
  store i32 1073741824, ptr %15, align 4, !tbaa !9
  %154 = load i32, ptr %14, align 4, !tbaa !9
  %155 = load i32, ptr %15, align 4, !tbaa !9
  %156 = icmp uge i32 %154, %155
  %157 = zext i1 %156 to i32
  store i32 %157, ptr %14, align 4, !tbaa !9
  %158 = load i32, ptr %14, align 4, !tbaa !9
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %160, label %161

160:                                              ; preds = %152
  br label %246

161:                                              ; preds = %152
  %162 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %162, ptr %14, align 4, !tbaa !9
  store i32 2, ptr %15, align 4, !tbaa !9
  %163 = load i32, ptr %15, align 4, !tbaa !9
  %164 = and i32 %163, 31
  %165 = load i32, ptr %14, align 4, !tbaa !9
  %166 = shl i32 %165, %164
  store i32 %166, ptr %14, align 4, !tbaa !9
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = load i32, ptr %14, align 4, !tbaa !9
  %169 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %167, i32 noundef %168)
  store i32 %169, ptr %14, align 4, !tbaa !9
  %170 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %170, ptr %10, align 4, !tbaa !9
  br label %171

171:                                              ; preds = %161, %147
  %172 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %172, ptr %14, align 4, !tbaa !9
  store i32 2, ptr %15, align 4, !tbaa !9
  %173 = load i32, ptr %15, align 4, !tbaa !9
  %174 = and i32 %173, 31
  %175 = load i32, ptr %14, align 4, !tbaa !9
  %176 = shl i32 %175, %174
  store i32 %176, ptr %14, align 4, !tbaa !9
  %177 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %177, ptr %15, align 4, !tbaa !9
  %178 = load i32, ptr %15, align 4, !tbaa !9
  %179 = load i32, ptr %14, align 4, !tbaa !9
  %180 = add i32 %179, %178
  store i32 %180, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  %181 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %181, ptr %16, align 4, !tbaa !9
  store i32 2, ptr %17, align 4, !tbaa !9
  %182 = load i32, ptr %17, align 4, !tbaa !9
  %183 = and i32 %182, 31
  %184 = load i32, ptr %16, align 4, !tbaa !9
  %185 = shl i32 %184, %183
  store i32 %185, ptr %16, align 4, !tbaa !9
  %186 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %186, ptr %6, align 4, !tbaa !9
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = load i32, ptr %14, align 4, !tbaa !9
  %189 = load i32, ptr %15, align 4, !tbaa !9
  %190 = load i32, ptr %16, align 4, !tbaa !9
  %191 = call i32 @w2c_hermes_0x5F_memset(ptr noundef %187, i32 noundef %188, i32 noundef %189, i32 noundef %190)
  store i32 %191, ptr %14, align 4, !tbaa !9
  %192 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %192, ptr %9, align 4, !tbaa !9
  %193 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %193, ptr %14, align 4, !tbaa !9
  %194 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %194, ptr %15, align 4, !tbaa !9
  %195 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %195, ptr %16, align 4, !tbaa !9
  %196 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %196, ptr %17, align 4, !tbaa !9
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = load i32, ptr %15, align 4, !tbaa !9
  %199 = load i32, ptr %16, align 4, !tbaa !9
  %200 = load i32, ptr %17, align 4, !tbaa !9
  %201 = call i32 @w2c_hermes_memmove(ptr noundef %197, i32 noundef %198, i32 noundef %199, i32 noundef %200)
  store i32 %201, ptr %15, align 4, !tbaa !9
  %202 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %202, ptr %10, align 4, !tbaa !9
  %203 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %203, ptr %16, align 4, !tbaa !9
  store i32 2, ptr %17, align 4, !tbaa !9
  %204 = load i32, ptr %17, align 4, !tbaa !9
  %205 = and i32 %204, 31
  %206 = load i32, ptr %16, align 4, !tbaa !9
  %207 = shl i32 %206, %205
  store i32 %207, ptr %16, align 4, !tbaa !9
  %208 = load i32, ptr %16, align 4, !tbaa !9
  %209 = load i32, ptr %15, align 4, !tbaa !9
  %210 = add i32 %209, %208
  store i32 %210, ptr %15, align 4, !tbaa !9
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.w2c_hermes, ptr %211, i32 0, i32 6
  %213 = load i32, ptr %14, align 4, !tbaa !9
  %214 = zext i32 %213 to i64
  %215 = add i64 %214, 8
  %216 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %212, i64 noundef %215, i32 noundef %216)
  %217 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %217, ptr %14, align 4, !tbaa !9
  %218 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %218, ptr %15, align 4, !tbaa !9
  %219 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %219, ptr %16, align 4, !tbaa !9
  %220 = load i32, ptr %16, align 4, !tbaa !9
  %221 = load i32, ptr %15, align 4, !tbaa !9
  %222 = add i32 %221, %220
  store i32 %222, ptr %15, align 4, !tbaa !9
  %223 = load ptr, ptr %4, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.w2c_hermes, ptr %223, i32 0, i32 6
  %225 = load i32, ptr %14, align 4, !tbaa !9
  %226 = zext i32 %225 to i64
  %227 = add i64 %226, 4
  %228 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %224, i64 noundef %227, i32 noundef %228)
  %229 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %229, ptr %14, align 4, !tbaa !9
  %230 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %230, ptr %15, align 4, !tbaa !9
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.w2c_hermes, ptr %231, i32 0, i32 6
  %233 = load i32, ptr %14, align 4, !tbaa !9
  %234 = zext i32 %233 to i64
  %235 = load i32, ptr %15, align 4, !tbaa !9
  call void @i32_store(ptr noundef %232, i64 noundef %234, i32 noundef %235)
  %236 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %236, ptr %14, align 4, !tbaa !9
  %237 = load i32, ptr %14, align 4, !tbaa !9
  %238 = icmp ne i32 %237, 0
  br i1 %238, label %239, label %243

239:                                              ; preds = %171
  %240 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %240, ptr %14, align 4, !tbaa !9
  %241 = load ptr, ptr %4, align 8, !tbaa !5
  %242 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %241, i32 noundef %242)
  br label %243

243:                                              ; preds = %239, %171
  br label %248

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

246:                                              ; preds = %160
  %247 = load ptr, ptr %4, align 8, !tbaa !5
  call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthrow_out_of_range0x5Babi0x3Av150070x5D0x28char0x20const0x2A0x29(ptr noundef %247)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

248:                                              ; preds = %243, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

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 = { nounwind }
attributes #6 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

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

declare void @w2c_hermes_abort(ptr noundef) local_unnamed_addr #3

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

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

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

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

declare i32 @w2c_hermes_memmove(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Avector0x3Chermes0x3A0x3ABasicBlock0x2A0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Chermes0x3A0x3ABasicBlock0x2A0x3E0x3E0x3A0x3A_0x5Fappend0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = zext i32 %1 to i64
  %6 = add nuw nsw i64 %5, 8
  %7 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %6)
  %8 = add nuw nsw i64 %5, 4
  %9 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %8)
  %10 = sub i32 %7, %9
  %11 = ashr i32 %10, 2
  %.not = icmp ult i32 %11, %2
  br i1 %.not, label %18, label %12

12:                                               ; preds = %3
  %.not145 = icmp eq i32 %2, 0
  br i1 %.not145, label %17, label %13

13:                                               ; preds = %12
  %14 = shl i32 %2, 2
  %15 = tail call i32 @w2c_hermes_0x5F_memset(ptr noundef %0, i32 noundef %9, i32 noundef 0, i32 noundef %14) #5
  %16 = add i32 %15, %14
  br label %17

17:                                               ; preds = %12, %13
  %.0 = phi i32 [ %16, %13 ], [ %9, %12 ]
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %8, i32 noundef %.0)
  br label %45

18:                                               ; preds = %3
  %19 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %5)
  %20 = sub i32 %9, %19
  %21 = ashr i32 %20, 2
  %22 = add i32 %21, %2
  %23 = icmp ult i32 %22, 1073741824
  br i1 %23, label %24, label %43

24:                                               ; preds = %18
  %25 = sub i32 %7, %19
  %26 = ashr i32 %25, 1
  %27 = tail call i32 @llvm.umax.i32(i32 %22, i32 %26)
  %28 = icmp ugt i32 %25, 2147483643
  %29 = select i1 %28, i32 1073741823, i32 %27
  %.not143 = icmp eq i32 %29, 0
  br i1 %.not143, label %._crit_edge, label %30

30:                                               ; preds = %24
  %31 = icmp ugt i32 %29, 1073741823
  br i1 %31, label %44, label %32

32:                                               ; preds = %30
  %33 = shl nuw i32 %29, 2
  %34 = tail call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef %33)
  br label %._crit_edge

._crit_edge:                                      ; preds = %24, %32
  %.pre-phi = phi i32 [ %33, %32 ], [ 0, %24 ]
  %.0138 = phi i32 [ %34, %32 ], [ 0, %24 ]
  %35 = and i32 %20, -4
  %36 = add i32 %.0138, %35
  %37 = shl i32 %2, 2
  %38 = tail call i32 @w2c_hermes_0x5F_memset(ptr noundef %0, i32 noundef %36, i32 noundef 0, i32 noundef %37) #5
  %39 = tail call i32 @w2c_hermes_memmove(ptr noundef %0, i32 noundef %.0138, i32 noundef %19, i32 noundef %20) #5
  %40 = add i32 %39, %.pre-phi
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %6, i32 noundef %40)
  %41 = add i32 %38, %37
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %8, i32 noundef %41)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %5, i32 noundef %39)
  %.not144 = icmp eq i32 %19, 0
  br i1 %.not144, label %45, label %42

42:                                               ; preds = %._crit_edge
  tail call void @w2c_hermes_dlfree(ptr noundef %0, i32 noundef %19) #5
  br label %45

43:                                               ; preds = %18
  tail call void @w2c_hermes_abort(ptr noundef %0) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

44:                                               ; preds = %30
  tail call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthrow_out_of_range0x5Babi0x3Av150070x5D0x28char0x20const0x2A0x29(ptr noundef %0)
  tail call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

45:                                               ; preds = %._crit_edge, %42, %17
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #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 = { 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 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)"}


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