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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_dlmalloc(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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

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

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

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

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

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

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

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

32:                                               ; preds = %7
  %33 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %33, ptr %16, align 4, !tbaa !9
  store i32 12, ptr %17, align 4, !tbaa !9
  %34 = load i32, ptr %17, align 4, !tbaa !9
  %35 = and i32 %34, 31
  %36 = load i32, ptr %16, align 4, !tbaa !9
  %37 = shl i32 %36, %35
  store i32 %37, ptr %16, align 4, !tbaa !9
  %38 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %38, ptr %9, align 4, !tbaa !9
  %39 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %39, ptr %16, align 4, !tbaa !9
  store i32 32, ptr %17, align 4, !tbaa !9
  %40 = load i32, ptr %17, align 4, !tbaa !9
  %41 = load i32, ptr %16, align 4, !tbaa !9
  %42 = and i32 %41, %40
  store i32 %42, ptr %16, align 4, !tbaa !9
  %43 = load i32, ptr %16, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %66

45:                                               ; preds = %32
  store i32 65536, ptr %16, align 4, !tbaa !9
  %46 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %46, ptr %17, align 4, !tbaa !9
  store i32 15, ptr %18, align 4, !tbaa !9
  %47 = load i32, ptr %18, align 4, !tbaa !9
  %48 = load i32, ptr %17, align 4, !tbaa !9
  %49 = add i32 %48, %47
  store i32 %49, ptr %17, align 4, !tbaa !9
  store i32 -16, ptr %18, align 4, !tbaa !9
  %50 = load i32, ptr %18, align 4, !tbaa !9
  %51 = load i32, ptr %17, align 4, !tbaa !9
  %52 = and i32 %51, %50
  store i32 %52, ptr %17, align 4, !tbaa !9
  %53 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %53, ptr %15, align 4, !tbaa !9
  store i32 40, ptr %18, align 4, !tbaa !9
  %54 = load i32, ptr %18, align 4, !tbaa !9
  %55 = load i32, ptr %17, align 4, !tbaa !9
  %56 = add i32 %55, %54
  store i32 %56, ptr %17, align 4, !tbaa !9
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load i32, ptr %16, align 4, !tbaa !9
  %59 = load i32, ptr %17, align 4, !tbaa !9
  %60 = call i32 @w2c_hermes_dlmemalign(ptr noundef %57, i32 noundef %58, i32 noundef %59)
  store i32 %60, ptr %16, align 4, !tbaa !9
  %61 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %61, ptr %14, align 4, !tbaa !9
  %62 = load i32, ptr %16, align 4, !tbaa !9
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %45
  br label %110

65:                                               ; preds = %45
  store i32 -48, ptr %16, align 4, !tbaa !9
  br label %203

66:                                               ; preds = %32
  %67 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %67, ptr %16, align 4, !tbaa !9
  %68 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %68, ptr %17, align 4, !tbaa !9
  %69 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %69, ptr %18, align 4, !tbaa !9
  %70 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %70, ptr %19, align 4, !tbaa !9
  %71 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %71, ptr %20, align 4, !tbaa !9
  store i32 40, ptr %21, align 4, !tbaa !9
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load i32, ptr %21, align 4, !tbaa !9
  %74 = call i32 @w2c_hermes_dlmalloc(ptr noundef %72, i32 noundef %73)
  store i32 %74, ptr %21, align 4, !tbaa !9
  %75 = load i32, ptr %21, align 4, !tbaa !9
  store i32 %75, ptr %15, align 4, !tbaa !9
  store i32 8, ptr %22, align 4, !tbaa !9
  %76 = load i32, ptr %22, align 4, !tbaa !9
  %77 = load i32, ptr %21, align 4, !tbaa !9
  %78 = add i32 %77, %76
  store i32 %78, ptr %21, align 4, !tbaa !9
  %79 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %79, ptr %22, align 4, !tbaa !9
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = load i32, ptr %16, align 4, !tbaa !9
  %82 = load i32, ptr %17, align 4, !tbaa !9
  %83 = load i32, ptr %18, align 4, !tbaa !9
  %84 = load i32, ptr %19, align 4, !tbaa !9
  %85 = load i32, ptr %20, align 4, !tbaa !9
  %86 = load i32, ptr %21, align 4, !tbaa !9
  %87 = load i32, ptr %22, align 4, !tbaa !9
  %88 = call i32 @w2c_hermes_0x5Fmmap_js(ptr noundef %80, i32 noundef %81, i32 noundef %82, i32 noundef %83, i32 noundef %84, i32 noundef %85, i32 noundef %86, i32 noundef %87)
  store i32 %88, ptr %16, align 4, !tbaa !9
  %89 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %89, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  %90 = load i32, ptr %16, align 4, !tbaa !9
  %91 = load i32, ptr %17, align 4, !tbaa !9
  %92 = icmp sge i32 %90, %91
  %93 = zext i1 %92 to i32
  store i32 %93, ptr %16, align 4, !tbaa !9
  %94 = load i32, ptr %16, align 4, !tbaa !9
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %105

96:                                               ; preds = %66
  %97 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %97, ptr %16, align 4, !tbaa !9
  %98 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %98, ptr %17, align 4, !tbaa !9
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.w2c_hermes, ptr %99, i32 0, i32 6
  %101 = load i32, ptr %16, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = add i64 %102, 12
  %104 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %100, i64 noundef %103, i32 noundef %104)
  br label %137

105:                                              ; preds = %66
  %106 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %106, ptr %16, align 4, !tbaa !9
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = load i32, ptr %16, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %107, i32 noundef %108)
  %109 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %109, ptr %16, align 4, !tbaa !9
  br label %203

110:                                              ; preds = %64
  %111 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %111, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  %112 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %112, ptr %18, align 4, !tbaa !9
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = load i32, ptr %16, align 4, !tbaa !9
  %115 = load i32, ptr %17, align 4, !tbaa !9
  %116 = load i32, ptr %18, align 4, !tbaa !9
  %117 = call i32 @w2c_hermes_0x5F_memset(ptr noundef %113, i32 noundef %114, i32 noundef %115, i32 noundef %116)
  store i32 %117, ptr %16, align 4, !tbaa !9
  %118 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %118, ptr %16, align 4, !tbaa !9
  %119 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %119, ptr %17, align 4, !tbaa !9
  %120 = load i32, ptr %17, align 4, !tbaa !9
  %121 = load i32, ptr %16, align 4, !tbaa !9
  %122 = add i32 %121, %120
  store i32 %122, ptr %16, align 4, !tbaa !9
  %123 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %123, ptr %15, align 4, !tbaa !9
  %124 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %124, ptr %17, align 4, !tbaa !9
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.w2c_hermes, ptr %125, i32 0, i32 6
  %127 = load i32, ptr %16, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %126, i64 noundef %128, i32 noundef %129)
  %130 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %130, ptr %16, align 4, !tbaa !9
  store i64 -4294967295, ptr %23, align 8, !tbaa !11
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.w2c_hermes, ptr %131, i32 0, i32 6
  %133 = load i32, ptr %16, align 4, !tbaa !9
  %134 = zext i32 %133 to i64
  %135 = add i64 %134, 8
  %136 = load i64, ptr %23, align 8, !tbaa !11
  call void @i64_store(ptr noundef %132, i64 noundef %135, i64 noundef %136)
  br label %137

137:                                              ; preds = %110, %96
  %138 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %138, ptr %16, align 4, !tbaa !9
  %139 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %139, ptr %17, align 4, !tbaa !9
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.w2c_hermes, ptr %140, i32 0, i32 6
  %142 = load i32, ptr %16, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = add i64 %143, 32
  %145 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %141, i64 noundef %144, i32 noundef %145)
  %146 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %146, ptr %16, align 4, !tbaa !9
  %147 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %147, ptr %17, align 4, !tbaa !9
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.w2c_hermes, ptr %148, i32 0, i32 6
  %150 = load i32, ptr %16, align 4, !tbaa !9
  %151 = zext i32 %150 to i64
  %152 = add i64 %151, 16
  %153 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %149, i64 noundef %152, i32 noundef %153)
  %154 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %154, ptr %16, align 4, !tbaa !9
  %155 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %155, ptr %17, align 4, !tbaa !9
  %156 = load ptr, ptr %8, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.w2c_hermes, ptr %156, i32 0, i32 6
  %158 = load i32, ptr %16, align 4, !tbaa !9
  %159 = zext i32 %158 to i64
  %160 = add i64 %159, 4
  %161 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %157, i64 noundef %160, i32 noundef %161)
  %162 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %162, ptr %16, align 4, !tbaa !9
  %163 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %163, ptr %17, align 4, !tbaa !9
  %164 = load i32, ptr %17, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  store i64 %165, ptr %23, align 8, !tbaa !11
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.w2c_hermes, ptr %166, i32 0, i32 6
  %168 = load i32, ptr %16, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = add i64 %169, 24
  %171 = load i64, ptr %23, align 8, !tbaa !11
  call void @i64_store(ptr noundef %167, i64 noundef %170, i64 noundef %171)
  store i32 291708, ptr %16, align 4, !tbaa !9
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  %173 = load i32, ptr %16, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_lock(ptr noundef %172, i32 noundef %173)
  %174 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %174, ptr %16, align 4, !tbaa !9
  store i32 291712, ptr %17, align 4, !tbaa !9
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.w2c_hermes, ptr %175, i32 0, i32 6
  %177 = load i32, ptr %17, align 4, !tbaa !9
  %178 = zext i32 %177 to i64
  %179 = call i32 @i32_load(ptr noundef %176, i64 noundef %178)
  store i32 %179, ptr %17, align 4, !tbaa !9
  %180 = load ptr, ptr %8, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.w2c_hermes, ptr %180, i32 0, i32 6
  %182 = load i32, ptr %16, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = add i64 %183, 36
  %185 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %181, i64 noundef %184, i32 noundef %185)
  store i32 291712, ptr %16, align 4, !tbaa !9
  %186 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %186, ptr %17, align 4, !tbaa !9
  %187 = load ptr, ptr %8, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.w2c_hermes, ptr %187, i32 0, i32 6
  %189 = load i32, ptr %16, align 4, !tbaa !9
  %190 = zext i32 %189 to i64
  %191 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %188, i64 noundef %190, i32 noundef %191)
  store i32 291708, ptr %16, align 4, !tbaa !9
  %192 = load ptr, ptr %8, align 8, !tbaa !5
  %193 = load i32, ptr %16, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_unlock(ptr noundef %192, i32 noundef %193)
  %194 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %194, ptr %16, align 4, !tbaa !9
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.w2c_hermes, ptr %195, i32 0, i32 6
  %197 = load i32, ptr %16, align 4, !tbaa !9
  %198 = zext i32 %197 to i64
  %199 = call i32 @i32_load(ptr noundef %196, i64 noundef %198)
  store i32 %199, ptr %16, align 4, !tbaa !9
  %200 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %200, ptr %15, align 4, !tbaa !9
  br label %201

201:                                              ; preds = %137, %7
  %202 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %202, ptr %16, align 4, !tbaa !9
  br label %203

203:                                              ; preds = %201, %105, %65
  %204 = load i32, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  ret i32 %204
}

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 = { 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: nounwind uwtable
declare dso_local void @w2c_hermes_dlfree(ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_0x5Fmmap_js(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 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: nounwind uwtable
declare dso_local i32 @w2c_hermes_0x5F_memset(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

8:                                                ; preds = %7
  %9 = shl i32 %6, 12
  %10 = and i32 %4, 32
  %.not119 = icmp eq i32 %10, 0
  br i1 %.not119, label %16, label %11

11:                                               ; preds = %8
  %12 = add i32 %2, 15
  %13 = and i32 %12, -16
  %14 = add i32 %13, 40
  %15 = tail call i32 @w2c_hermes_dlmemalign(ptr noundef %0, i32 noundef 65536, i32 noundef %14)
  %.not120 = icmp eq i32 %15, 0
  br i1 %.not120, label %42, label %26

16:                                               ; preds = %8
  %17 = tail call i32 @w2c_hermes_dlmalloc(ptr noundef %0, i32 noundef 40)
  %18 = add i32 %17, 8
  %19 = tail call i32 @w2c_hermes_0x5Fmmap_js(ptr noundef %0, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %9, i32 noundef %18, i32 noundef %17)
  %20 = icmp sgt i32 %19, -1
  br i1 %20, label %21, label %25

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %0, i64 40
  %23 = zext i32 %17 to i64
  %24 = add nuw nsw i64 %23, 12
  tail call void @i32_store(ptr noundef nonnull %22, i64 noundef %24, i32 noundef %5)
  br label %32

25:                                               ; preds = %16
  tail call void @w2c_hermes_dlfree(ptr noundef %0, i32 noundef %17)
  br label %42

26:                                               ; preds = %11
  %27 = tail call i32 @w2c_hermes_0x5F_memset(ptr noundef %0, i32 noundef %15, i32 noundef 0, i32 noundef %13)
  %28 = add i32 %15, %13
  %29 = getelementptr inbounds i8, ptr %0, i64 40
  %30 = zext i32 %28 to i64
  tail call void @i32_store(ptr noundef nonnull %29, i64 noundef %30, i32 noundef %15)
  %31 = add nuw nsw i64 %30, 8
  tail call void @i64_store(ptr noundef nonnull %29, i64 noundef %31, i64 noundef -4294967295)
  br label %32

32:                                               ; preds = %26, %21
  %.pre-phi = phi i64 [ %30, %26 ], [ %23, %21 ]
  %.0 = phi i32 [ %28, %26 ], [ %17, %21 ]
  %33 = getelementptr inbounds i8, ptr %0, i64 40
  %34 = add nuw nsw i64 %.pre-phi, 32
  tail call void @i32_store(ptr noundef nonnull %33, i64 noundef %34, i32 noundef %3)
  %35 = add nuw nsw i64 %.pre-phi, 16
  tail call void @i32_store(ptr noundef nonnull %33, i64 noundef %35, i32 noundef %4)
  %36 = add nuw nsw i64 %.pre-phi, 4
  tail call void @i32_store(ptr noundef nonnull %33, i64 noundef %36, i32 noundef %2)
  %37 = zext i32 %9 to i64
  %38 = add nuw nsw i64 %.pre-phi, 24
  tail call void @i64_store(ptr noundef nonnull %33, i64 noundef %38, i64 noundef %37)
  tail call void @w2c_hermes_0x5F_lock(ptr noundef %0, i32 noundef 291708)
  %39 = tail call i32 @i32_load(ptr noundef nonnull %33, i64 noundef 291712)
  %40 = add nuw nsw i64 %.pre-phi, 36
  tail call void @i32_store(ptr noundef nonnull %33, i64 noundef %40, i32 noundef %39)
  tail call void @i32_store(ptr noundef nonnull %33, i64 noundef 291712, i32 noundef %.0)
  tail call void @w2c_hermes_0x5F_unlock(ptr noundef %0, i32 noundef 291708)
  %41 = tail call i32 @i32_load(ptr noundef nonnull %33, i64 noundef %.pre-phi)
  br label %42

42:                                               ; preds = %7, %32, %11, %25
  %.0116 = phi i32 [ %19, %25 ], [ -48, %11 ], [ %41, %32 ], [ -28, %7 ]
  ret i32 %.0116
}

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" }

!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