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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.w2c_hermes = type { ptr, ptr, ptr, i32, i32, i32, %struct.wasm_rt_memory_t, %struct.wasm_rt_funcref_table_t }
%struct.wasm_rt_memory_t = type { ptr, i64, i64, i64, i8 }
%struct.wasm_rt_funcref_table_t = type { ptr, i32, i32 }

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

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

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

; 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

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef, i32 noundef, i64 noundef) #2

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

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

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

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

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

47:                                               ; preds = %3
  %48 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %48, ptr %11, align 4, !tbaa !9
  store i32 808, ptr %12, align 4, !tbaa !9
  %49 = load i32, ptr %12, align 4, !tbaa !9
  %50 = load i32, ptr %11, align 4, !tbaa !9
  %51 = add i32 %50, %49
  store i32 %51, ptr %11, align 4, !tbaa !9
  store i32 40, ptr %12, align 4, !tbaa !9
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = load i32, ptr %12, align 4, !tbaa !9
  %55 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AallocSlow0x28unsigned0x20int0x29(ptr noundef %52, i32 noundef %53, i32 noundef %54)
  store i32 %55, ptr %11, align 4, !tbaa !9
  %56 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %56, ptr %7, align 4, !tbaa !9
  br label %69

57:                                               ; preds = %3
  %58 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %58, ptr %11, align 4, !tbaa !9
  %59 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %59, ptr %12, align 4, !tbaa !9
  store i32 40, ptr %13, align 4, !tbaa !9
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = add i32 %61, %60
  store i32 %62, ptr %12, align 4, !tbaa !9
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.w2c_hermes, ptr %63, i32 0, i32 6
  %65 = load i32, ptr %11, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = add i64 %66, 1364
  %68 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %64, i64 noundef %67, i32 noundef %68)
  br label %69

69:                                               ; preds = %57, %47
  %70 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %70, ptr %11, align 4, !tbaa !9
  store i32 5640, ptr %12, align 4, !tbaa !9
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = add i32 %72, %71
  store i32 %73, ptr %11, align 4, !tbaa !9
  %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 %11, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = call i64 @i64_load(ptr noundef %75, i64 noundef %77)
  store i64 %78, ptr %16, align 8, !tbaa !11
  %79 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %79, ptr %9, align 8, !tbaa !11
  %80 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %80, ptr %11, align 4, !tbaa !9
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.w2c_hermes, ptr %81, i32 0, i32 6
  %83 = load i32, ptr %11, align 4, !tbaa !9
  %84 = zext i32 %83 to i64
  %85 = add i64 %84, 416
  %86 = call i64 @i64_load(ptr noundef %82, i64 noundef %85)
  store i64 %86, ptr %16, align 8, !tbaa !11
  %87 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %87, ptr %10, align 8, !tbaa !11
  %88 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %88, ptr %11, align 4, !tbaa !9
  store i64 0, ptr %17, align 8, !tbaa !11
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.w2c_hermes, ptr %89, i32 0, i32 6
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = zext i32 %91 to i64
  %93 = add i64 %92, 16
  %94 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %90, i64 noundef %93, i64 noundef %94)
  %95 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %95, ptr %11, align 4, !tbaa !9
  %96 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %96, ptr %17, align 8, !tbaa !11
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.w2c_hermes, ptr %97, i32 0, i32 6
  %99 = load i32, ptr %11, align 4, !tbaa !9
  %100 = zext i32 %99 to i64
  %101 = add i64 %100, 12
  %102 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store32(ptr noundef %98, i64 noundef %101, i64 noundef %102)
  %103 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %103, ptr %11, align 4, !tbaa !9
  %104 = load i64, ptr %10, align 8, !tbaa !11
  store i64 %104, ptr %17, align 8, !tbaa !11
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.w2c_hermes, ptr %105, i32 0, i32 6
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = add i64 %108, 8
  %110 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store32(ptr noundef %106, i64 noundef %109, i64 noundef %110)
  %111 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %111, ptr %11, align 4, !tbaa !9
  store i64 0, ptr %17, align 8, !tbaa !11
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.w2c_hermes, ptr %112, i32 0, i32 6
  %114 = load i32, ptr %11, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = add i64 %115, 24
  %117 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %113, i64 noundef %116, i64 noundef %117)
  %118 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %118, ptr %11, align 4, !tbaa !9
  store i64 60129542158, ptr %17, align 8, !tbaa !11
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.w2c_hermes, ptr %119, i32 0, i32 6
  %121 = load i32, ptr %11, align 4, !tbaa !9
  %122 = zext i32 %121 to i64
  %123 = add i64 %122, 32
  %124 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %120, i64 noundef %123, i64 noundef %124)
  %125 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %125, ptr %11, align 4, !tbaa !9
  store i64 103800635432, ptr %17, align 8, !tbaa !11
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.w2c_hermes, ptr %126, i32 0, i32 6
  %128 = load i32, ptr %11, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %127, i64 noundef %129, i64 noundef %130)
  %131 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %131, ptr %11, align 4, !tbaa !9
  %132 = load i32, ptr %11, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  store i64 %133, ptr %16, align 8, !tbaa !11
  store i64 -281474976710656, ptr %17, align 8, !tbaa !11
  %134 = load i64, ptr %17, align 8, !tbaa !11
  %135 = load i64, ptr %16, align 8, !tbaa !11
  %136 = or i64 %135, %134
  store i64 %136, ptr %16, align 8, !tbaa !11
  %137 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %137, ptr %9, align 8, !tbaa !11
  %138 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %138, ptr %11, align 4, !tbaa !9
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.w2c_hermes, ptr %139, i32 0, i32 6
  %141 = load i32, ptr %11, align 4, !tbaa !9
  %142 = zext i32 %141 to i64
  %143 = add i64 %142, 4
  %144 = call i32 @i32_load(ptr noundef %140, i64 noundef %143)
  store i32 %144, ptr %11, align 4, !tbaa !9
  %145 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %145, ptr %8, align 4, !tbaa !9
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.w2c_hermes, ptr %146, i32 0, i32 6
  %148 = load i32, ptr %11, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = add i64 %149, 164
  %151 = call i32 @i32_load(ptr noundef %147, i64 noundef %150)
  store i32 %151, ptr %11, align 4, !tbaa !9
  %152 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %152, ptr %7, align 4, !tbaa !9
  %153 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %153, ptr %12, align 4, !tbaa !9
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.w2c_hermes, ptr %154, i32 0, i32 6
  %156 = load i32, ptr %12, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = add i64 %157, 168
  %159 = call i32 @i32_load(ptr noundef %155, i64 noundef %158)
  store i32 %159, ptr %12, align 4, !tbaa !9
  %160 = load i32, ptr %11, align 4, !tbaa !9
  %161 = load i32, ptr %12, align 4, !tbaa !9
  %162 = icmp ult i32 %160, %161
  %163 = zext i1 %162 to i32
  store i32 %163, ptr %11, align 4, !tbaa !9
  %164 = load i32, ptr %11, align 4, !tbaa !9
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %185

166:                                              ; preds = %69
  %167 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %167, ptr %11, align 4, !tbaa !9
  %168 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %168, ptr %12, align 4, !tbaa !9
  store i32 8, ptr %13, align 4, !tbaa !9
  %169 = load i32, ptr %13, align 4, !tbaa !9
  %170 = load i32, ptr %12, align 4, !tbaa !9
  %171 = add i32 %170, %169
  store i32 %171, ptr %12, align 4, !tbaa !9
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.w2c_hermes, ptr %172, i32 0, i32 6
  %174 = load i32, ptr %11, align 4, !tbaa !9
  %175 = zext i32 %174 to i64
  %176 = add i64 %175, 164
  %177 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %173, i64 noundef %176, i32 noundef %177)
  %178 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %178, ptr %11, align 4, !tbaa !9
  %179 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %179, ptr %17, align 8, !tbaa !11
  %180 = load ptr, ptr %4, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.w2c_hermes, ptr %180, i32 0, i32 6
  %182 = load i32, ptr %11, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %181, i64 noundef %183, i64 noundef %184)
  br label %193

185:                                              ; preds = %69
  %186 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %186, ptr %11, align 4, !tbaa !9
  %187 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %187, ptr %17, align 8, !tbaa !11
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = load i32, ptr %11, align 4, !tbaa !9
  %190 = load i64, ptr %17, align 8, !tbaa !11
  %191 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef %188, i32 noundef %189, i64 noundef %190)
  store i32 %191, ptr %11, align 4, !tbaa !9
  %192 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %192, ptr %7, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %185, %166
  %194 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %194, ptr %11, align 4, !tbaa !9
  store i32 -1, ptr %12, align 4, !tbaa !9
  %195 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %195, ptr %13, align 4, !tbaa !9
  %196 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %196, ptr %14, align 4, !tbaa !9
  %197 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %197, ptr %15, align 4, !tbaa !9
  %198 = load i32, ptr %15, align 4, !tbaa !9
  %199 = zext i32 %198 to i64
  store i64 %199, ptr %18, align 8, !tbaa !11
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = load i32, ptr %13, align 4, !tbaa !9
  %202 = load i32, ptr %14, align 4, !tbaa !9
  %203 = load i64, ptr %18, align 8, !tbaa !11
  %204 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AJSTypedArrayBase0x3A0x3AcreateBuffer0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AJSTypedArrayBase0x3E0x2C0x20unsigned0x20long0x20long0x29(ptr noundef %200, i32 noundef %201, i32 noundef %202, i64 noundef %203)
  store i32 %204, ptr %13, align 4, !tbaa !9
  %205 = load i32, ptr %13, align 4, !tbaa !9
  %206 = icmp ne i32 %205, 0
  br i1 %206, label %207, label %209

207:                                              ; preds = %193
  %208 = load i32, ptr %11, align 4, !tbaa !9
  br label %211

209:                                              ; preds = %193
  %210 = load i32, ptr %12, align 4, !tbaa !9
  br label %211

211:                                              ; preds = %209, %207
  %212 = phi i32 [ %208, %207 ], [ %210, %209 ]
  store i32 %212, ptr %11, align 4, !tbaa !9
  %213 = load i32, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret i32 %213
}

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 = { 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, !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, !12, i64 0}
!12 = !{!"long", !7, i64 0}


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

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

; 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

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AJSTypedArray0x3Cdouble0x2C0x200x28hermes0x3A0x3Avm0x3A0x3ACellKind0x29430x3E0x3A0x3Aallocate0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = add i32 %1, 1368
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = zext i32 %4 to i64
  %7 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %8 = add i32 %1, 1364
  %9 = zext i32 %8 to i64
  %10 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %9)
  %11 = sub i32 %7, %10
  %12 = icmp ult i32 %11, 40
  br i1 %12, label %13, label %16

13:                                               ; preds = %3
  %14 = add i32 %1, 808
  %15 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AallocSlow0x28unsigned0x20int0x29(ptr noundef %0, i32 noundef %14, i32 noundef 40) #3
  %.pre = zext i32 %1 to i64
  br label %20

16:                                               ; preds = %3
  %17 = add i32 %10, 40
  %18 = zext i32 %1 to i64
  %19 = add nuw nsw i64 %18, 1364
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %19, i32 noundef %17)
  br label %20

20:                                               ; preds = %16, %13
  %.pre-phi = phi i64 [ %18, %16 ], [ %.pre, %13 ]
  %.0 = phi i32 [ %10, %16 ], [ %15, %13 ]
  %21 = add i32 %1, 5640
  %22 = zext i32 %21 to i64
  %23 = tail call i64 @i64_load(ptr noundef nonnull %5, i64 noundef %22)
  %24 = add nuw nsw i64 %.pre-phi, 416
  %25 = tail call i64 @i64_load(ptr noundef nonnull %5, i64 noundef %24)
  %26 = zext i32 %.0 to i64
  %27 = add nuw nsw i64 %26, 16
  tail call void @i64_store(ptr noundef nonnull %5, i64 noundef %27, i64 noundef 0)
  %28 = add nuw nsw i64 %26, 12
  tail call void @i64_store32(ptr noundef nonnull %5, i64 noundef %28, i64 noundef %23)
  %29 = add nuw nsw i64 %26, 8
  tail call void @i64_store32(ptr noundef nonnull %5, i64 noundef %29, i64 noundef %25)
  %30 = add nuw nsw i64 %26, 24
  tail call void @i64_store(ptr noundef nonnull %5, i64 noundef %30, i64 noundef 0)
  %31 = add nuw nsw i64 %26, 32
  tail call void @i64_store(ptr noundef nonnull %5, i64 noundef %31, i64 noundef 60129542158)
  tail call void @i64_store(ptr noundef nonnull %5, i64 noundef %26, i64 noundef 103800635432)
  %32 = or disjoint i64 %26, -281474976710656
  %33 = add nuw nsw i64 %.pre-phi, 4
  %34 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %33)
  %35 = zext i32 %34 to i64
  %36 = add nuw nsw i64 %35, 164
  %37 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %36)
  %38 = add nuw nsw i64 %35, 168
  %39 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %38)
  %40 = icmp ult i32 %37, %39
  br i1 %40, label %41, label %44

41:                                               ; preds = %20
  %42 = add i32 %37, 8
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %36, i32 noundef %42)
  %43 = zext i32 %37 to i64
  tail call void @i64_store(ptr noundef nonnull %5, i64 noundef %43, i64 noundef %32)
  br label %46

44:                                               ; preds = %20
  %45 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef %0, i32 noundef %34, i64 noundef %32) #3
  br label %46

46:                                               ; preds = %44, %41
  %.1 = phi i32 [ %37, %41 ], [ %45, %44 ]
  %47 = zext i32 %2 to i64
  %48 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AJSTypedArrayBase0x3A0x3AcreateBuffer0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AJSTypedArrayBase0x3E0x2C0x20unsigned0x20long0x20long0x29(ptr noundef %0, i32 noundef %1, i32 noundef %.1, i64 noundef %47)
  %.not = icmp eq i32 %48, 0
  %49 = select i1 %.not, i32 -1, i32 %.1
  ret i32 %49
}

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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


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