; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

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

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

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

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

41:                                               ; preds = %4
  %42 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %42, ptr %11, align 4, !tbaa !9
  store i32 588, ptr %12, align 4, !tbaa !9
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = load i32, ptr %11, align 4, !tbaa !9
  %45 = add i32 %44, %43
  store i32 %45, ptr %11, align 4, !tbaa !9
  %46 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %46, ptr %12, align 4, !tbaa !9
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.w2c_hermes, ptr %47, i32 0, i32 6
  %49 = load i32, ptr %12, align 4, !tbaa !9
  %50 = zext i32 %49 to i64
  %51 = add i64 %50, 588
  %52 = call i32 @i32_load(ptr noundef %48, i64 noundef %51)
  store i32 %52, ptr %12, align 4, !tbaa !9
  %53 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %53, ptr %13, align 4, !tbaa !9
  store i32 -4194304, ptr %14, align 4, !tbaa !9
  %54 = load i32, ptr %14, align 4, !tbaa !9
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = and i32 %55, %54
  store i32 %56, ptr %13, align 4, !tbaa !9
  %57 = load i32, ptr %12, align 4, !tbaa !9
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = icmp eq i32 %57, %58
  %60 = zext i1 %59 to i32
  store i32 %60, ptr %12, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %122

63:                                               ; preds = %41
  %64 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %64, ptr %12, align 4, !tbaa !9
  %65 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %65, ptr %13, align 4, !tbaa !9
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.w2c_hermes, ptr %66, i32 0, i32 6
  %68 = load i32, ptr %13, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = add i64 %69, 4440
  %71 = call i32 @i32_load(ptr noundef %67, i64 noundef %70)
  store i32 %71, ptr %13, align 4, !tbaa !9
  %72 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %72, ptr %14, align 4, !tbaa !9
  %73 = load i32, ptr %14, align 4, !tbaa !9
  %74 = load i32, ptr %13, align 4, !tbaa !9
  %75 = add i32 %74, %73
  store i32 %75, ptr %13, align 4, !tbaa !9
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  store i64 %77, ptr %19, align 8, !tbaa !11
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.w2c_hermes, ptr %78, i32 0, i32 6
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = zext i32 %80 to i64
  %82 = add i64 %81, 4440
  %83 = load i64, ptr %19, align 8, !tbaa !11
  call void @i64_store(ptr noundef %79, i64 noundef %82, i64 noundef %83)
  %84 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %84, ptr %12, align 4, !tbaa !9
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.w2c_hermes, ptr %85, i32 0, i32 6
  %87 = load i32, ptr %12, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = add i64 %88, 600
  %90 = call i32 @i32_load(ptr noundef %86, i64 noundef %89)
  store i32 %90, ptr %12, align 4, !tbaa !9
  %91 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %91, ptr %7, align 4, !tbaa !9
  %92 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %92, ptr %13, align 4, !tbaa !9
  %93 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %93, ptr %14, align 4, !tbaa !9
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.w2c_hermes, ptr %94, i32 0, i32 6
  %96 = load i32, ptr %14, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = add i64 %97, 596
  %99 = call i32 @i32_load(ptr noundef %95, i64 noundef %98)
  store i32 %99, ptr %14, align 4, !tbaa !9
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = sub i32 %101, %100
  store i32 %102, ptr %13, align 4, !tbaa !9
  %103 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %103, ptr %7, align 4, !tbaa !9
  %104 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %104, ptr %14, align 4, !tbaa !9
  %105 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %105, ptr %15, align 4, !tbaa !9
  %106 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %106, ptr %16, align 4, !tbaa !9
  %107 = load i32, ptr %15, align 4, !tbaa !9
  %108 = load i32, ptr %16, align 4, !tbaa !9
  %109 = icmp ult i32 %107, %108
  %110 = zext i1 %109 to i32
  store i32 %110, ptr %15, align 4, !tbaa !9
  %111 = load i32, ptr %15, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %115

113:                                              ; preds = %63
  %114 = load i32, ptr %13, align 4, !tbaa !9
  br label %117

115:                                              ; preds = %63
  %116 = load i32, ptr %14, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %115, %113
  %118 = phi i32 [ %114, %113 ], [ %116, %115 ]
  store i32 %118, ptr %13, align 4, !tbaa !9
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = sub i32 %120, %119
  store i32 %121, ptr %12, align 4, !tbaa !9
  br label %232

122:                                              ; preds = %41
  %123 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %123, ptr %12, align 4, !tbaa !9
  store i32 688, ptr %13, align 4, !tbaa !9
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = add i32 %125, %124
  store i32 %126, ptr %12, align 4, !tbaa !9
  %127 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %127, ptr %8, align 4, !tbaa !9
  %128 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %128, ptr %13, align 4, !tbaa !9
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.w2c_hermes, ptr %129, i32 0, i32 6
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = zext i32 %131 to i64
  %133 = call i64 @i64_load(ptr noundef %130, i64 noundef %132)
  store i64 %133, ptr %19, align 8, !tbaa !11
  %134 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %134, ptr %20, align 8, !tbaa !11
  %135 = load i64, ptr %20, align 8, !tbaa !11
  %136 = load i64, ptr %19, align 8, !tbaa !11
  %137 = add i64 %136, %135
  store i64 %137, ptr %19, align 8, !tbaa !11
  %138 = load i64, ptr %19, align 8, !tbaa !11
  store i64 %138, ptr %9, align 8, !tbaa !11
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.w2c_hermes, ptr %139, i32 0, i32 6
  %141 = load i32, ptr %12, align 4, !tbaa !9
  %142 = zext i32 %141 to i64
  %143 = load i64, ptr %19, align 8, !tbaa !11
  call void @i64_store(ptr noundef %140, i64 noundef %142, i64 noundef %143)
  %144 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %144, ptr %12, align 4, !tbaa !9
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.w2c_hermes, ptr %145, i32 0, i32 6
  %147 = load i32, ptr %12, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = add i64 %148, 672
  %150 = call double @f64_load(ptr noundef %146, i64 noundef %149)
  store double %150, ptr %21, align 8, !tbaa !13
  %151 = load double, ptr %21, align 8, !tbaa !13
  store double %151, ptr %10, align 8, !tbaa !13
  store double 0x43F0000000000000, ptr %22, align 8, !tbaa !13
  %152 = load double, ptr %21, align 8, !tbaa !13
  %153 = load double, ptr %22, align 8, !tbaa !13
  %154 = fcmp olt double %152, %153
  %155 = zext i1 %154 to i32
  store i32 %155, ptr %12, align 4, !tbaa !9
  %156 = load double, ptr %10, align 8, !tbaa !13
  store double %156, ptr %22, align 8, !tbaa !13
  store double 0.000000e+00, ptr %23, align 8, !tbaa !13
  %157 = load double, ptr %22, align 8, !tbaa !13
  %158 = load double, ptr %23, align 8, !tbaa !13
  %159 = fcmp oge double %157, %158
  %160 = zext i1 %159 to i32
  store i32 %160, ptr %13, align 4, !tbaa !9
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = load i32, ptr %12, align 4, !tbaa !9
  %163 = and i32 %162, %161
  store i32 %163, ptr %12, align 4, !tbaa !9
  %164 = load i32, ptr %12, align 4, !tbaa !9
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %203

166:                                              ; preds = %122
  %167 = load double, ptr %10, align 8, !tbaa !13
  store double %167, ptr %21, align 8, !tbaa !13
  %168 = load double, ptr %21, align 8, !tbaa !13
  %169 = load double, ptr %21, align 8, !tbaa !13
  %170 = fcmp une double %168, %169
  %171 = xor i1 %170, true
  %172 = xor i1 %171, true
  %173 = zext i1 %172 to i32
  %174 = sext i32 %173 to i64
  %175 = call i64 @llvm.expect.i64(i64 %174, i64 0)
  %176 = icmp ne i64 %175, 0
  br i1 %176, label %177, label %179

177:                                              ; preds = %166
  call void @wasm_rt_trap(i32 noundef 4) #7
  unreachable

178:                                              ; No predecessors!
  br label %201

179:                                              ; preds = %166
  %180 = load double, ptr %21, align 8, !tbaa !13
  %181 = fcmp ogt double %180, -1.000000e+00
  br i1 %181, label %182, label %185

182:                                              ; preds = %179
  %183 = load double, ptr %21, align 8, !tbaa !13
  %184 = fcmp olt double %183, 0x43F0000000000000
  br label %185

185:                                              ; preds = %182, %179
  %186 = phi i1 [ false, %179 ], [ %184, %182 ]
  %187 = xor i1 %186, true
  %188 = xor i1 %187, true
  %189 = xor i1 %188, true
  %190 = zext i1 %189 to i32
  %191 = sext i32 %190 to i64
  %192 = call i64 @llvm.expect.i64(i64 %191, i64 0)
  %193 = icmp ne i64 %192, 0
  br i1 %193, label %194, label %196

194:                                              ; preds = %185
  call void @wasm_rt_trap(i32 noundef 2) #7
  unreachable

195:                                              ; No predecessors!
  br label %199

196:                                              ; preds = %185
  %197 = load double, ptr %21, align 8, !tbaa !13
  %198 = fptoui double %197 to i64
  br label %199

199:                                              ; preds = %196, %195
  %200 = phi i64 [ 0, %195 ], [ %198, %196 ]
  br label %201

201:                                              ; preds = %199, %178
  %202 = phi i64 [ 0, %178 ], [ %200, %199 ]
  store i64 %202, ptr %18, align 8, !tbaa !11
  br label %204

203:                                              ; preds = %122
  store i64 0, ptr %18, align 8, !tbaa !11
  br label %204

204:                                              ; preds = %203, %201
  %205 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %205, ptr %13, align 4, !tbaa !9
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.w2c_hermes, ptr %206, i32 0, i32 6
  %208 = load i32, ptr %13, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = add i64 %209, 680
  %211 = call i64 @i64_load(ptr noundef %207, i64 noundef %210)
  store i64 %211, ptr %19, align 8, !tbaa !11
  %212 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %212, ptr %20, align 8, !tbaa !11
  %213 = load i64, ptr %20, align 8, !tbaa !11
  %214 = load i64, ptr %19, align 8, !tbaa !11
  %215 = add i64 %214, %213
  store i64 %215, ptr %19, align 8, !tbaa !11
  %216 = load i64, ptr %19, align 8, !tbaa !11
  store i64 %216, ptr %9, align 8, !tbaa !11
  %217 = load i64, ptr %18, align 8, !tbaa !11
  %218 = load i64, ptr %19, align 8, !tbaa !11
  %219 = icmp uge i64 %217, %218
  %220 = zext i1 %219 to i32
  store i32 %220, ptr %12, align 4, !tbaa !9
  %221 = load i32, ptr %12, align 4, !tbaa !9
  %222 = icmp ne i32 %221, 0
  br i1 %222, label %223, label %224

223:                                              ; preds = %204
  br label %237

224:                                              ; preds = %204
  %225 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %225, ptr %12, align 4, !tbaa !9
  %226 = load ptr, ptr %5, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.w2c_hermes, ptr %226, i32 0, i32 6
  %228 = load i32, ptr %12, align 4, !tbaa !9
  %229 = zext i32 %228 to i64
  %230 = add i64 %229, 596
  %231 = call i32 @i32_load(ptr noundef %227, i64 noundef %230)
  store i32 %231, ptr %12, align 4, !tbaa !9
  br label %232

232:                                              ; preds = %224, %117
  %233 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %233, ptr %8, align 4, !tbaa !9
  %234 = load ptr, ptr %5, align 8, !tbaa !5
  %235 = load i32, ptr %11, align 4, !tbaa !9
  %236 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AAlignedHeapSegment0x3A0x3AsetEffectiveEnd0x28char0x2A0x29(ptr noundef %234, i32 noundef %235, i32 noundef %236)
  br label %237

237:                                              ; preds = %232, %223
  br label %256

238:                                              ; preds = %4
  store i32 0, ptr %11, align 4, !tbaa !9
  %239 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %239, ptr %6, align 4, !tbaa !9
  store i32 152290, ptr %12, align 4, !tbaa !9
  %240 = load i32, ptr %12, align 4, !tbaa !9
  %241 = load i32, ptr %11, align 4, !tbaa !9
  %242 = add i32 %241, %240
  store i32 %242, ptr %11, align 4, !tbaa !9
  %243 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %243, ptr %12, align 4, !tbaa !9
  store i32 62693, ptr %13, align 4, !tbaa !9
  %244 = load i32, ptr %13, align 4, !tbaa !9
  %245 = load i32, ptr %12, align 4, !tbaa !9
  %246 = add i32 %245, %244
  store i32 %246, ptr %12, align 4, !tbaa !9
  store i32 1928, ptr %13, align 4, !tbaa !9
  %247 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %247, ptr %14, align 4, !tbaa !9
  store i32 17673, ptr %15, align 4, !tbaa !9
  %248 = load i32, ptr %15, align 4, !tbaa !9
  %249 = load i32, ptr %14, align 4, !tbaa !9
  %250 = add i32 %249, %248
  store i32 %250, ptr %14, align 4, !tbaa !9
  %251 = load ptr, ptr %5, align 8, !tbaa !5
  %252 = load i32, ptr %11, align 4, !tbaa !9
  %253 = load i32, ptr %12, align 4, !tbaa !9
  %254 = load i32, ptr %13, align 4, !tbaa !9
  %255 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %251, i32 noundef %252, i32 noundef %253, i32 noundef %254, i32 noundef %255)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

256:                                              ; preds = %237
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @f64_load(ptr noundef, i64 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn }

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AcreditExternalMemory0x28hermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = zext i32 %3 to i64
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  %7 = zext i32 %1 to i64
  %8 = add nuw nsw i64 %7, 552
  %9 = tail call i64 @i64_load(ptr noundef nonnull %6, i64 noundef %8)
  %.not = icmp ult i64 %9, %5
  br i1 %.not, label %54, label %10

10:                                               ; preds = %4
  %11 = add i32 %1, 588
  %12 = add nuw nsw i64 %7, 588
  %13 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %12)
  %14 = and i32 %2, -4194304
  %15 = icmp eq i32 %13, %14
  br i1 %15, label %16, label %28

16:                                               ; preds = %10
  %17 = add nuw nsw i64 %7, 4440
  %18 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %17)
  %19 = add i32 %18, %3
  %20 = zext i32 %19 to i64
  tail call void @i64_store(ptr noundef nonnull %6, i64 noundef %17, i64 noundef %20)
  %21 = add nuw nsw i64 %7, 600
  %22 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %21)
  %23 = add nuw nsw i64 %7, 596
  %24 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %23)
  %25 = sub i32 %22, %24
  %26 = tail call i32 @llvm.umin.i32(i32 %25, i32 %3)
  %27 = sub i32 %22, %26
  br label %53

28:                                               ; preds = %10
  %29 = add i32 %1, 688
  %30 = zext i32 %29 to i64
  %31 = tail call i64 @i64_load(ptr noundef nonnull %6, i64 noundef %30)
  %32 = add i64 %31, %5
  tail call void @i64_store(ptr noundef nonnull %6, i64 noundef %30, i64 noundef %32)
  %33 = add nuw nsw i64 %7, 672
  %34 = tail call double @f64_load(ptr noundef nonnull %6, i64 noundef %33)
  %35 = fcmp olt double %34, 0x43F0000000000000
  %36 = fcmp oge double %34, 0.000000e+00
  %37 = and i1 %35, %36
  br i1 %37, label %38, label %46

38:                                               ; preds = %28
  %39 = fcmp uno double %34, 0.000000e+00
  br i1 %39, label %40, label %41, !prof !5

40:                                               ; preds = %38
  tail call void @wasm_rt_trap(i32 noundef 4) #5
  unreachable

41:                                               ; preds = %38
  %42 = fcmp ogt double %34, -1.000000e+00
  br i1 %42, label %44, label %43, !prof !6

43:                                               ; preds = %41
  tail call void @wasm_rt_trap(i32 noundef 2) #5
  unreachable

44:                                               ; preds = %41
  %45 = fptoui double %34 to i64
  br label %46

46:                                               ; preds = %28, %44
  %.0 = phi i64 [ %45, %44 ], [ 0, %28 ]
  %47 = add nuw nsw i64 %7, 680
  %48 = tail call i64 @i64_load(ptr noundef nonnull %6, i64 noundef %47)
  %49 = add i64 %48, %32
  %.not117 = icmp ult i64 %.0, %49
  br i1 %.not117, label %50, label %55

50:                                               ; preds = %46
  %51 = add nuw nsw i64 %7, 596
  %52 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %51)
  br label %53

53:                                               ; preds = %50, %16
  %.0115 = phi i32 [ %27, %16 ], [ %52, %50 ]
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AAlignedHeapSegment0x3A0x3AsetEffectiveEnd0x28char0x2A0x29(ptr noundef %0, i32 noundef %11, i32 noundef %.0115)
  br label %55

54:                                               ; preds = %4
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 152290, i32 noundef 62693, i32 noundef 1928, i32 noundef 17673) #6
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

55:                                               ; preds = %53, %46
  ret void
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #4

attributes #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 = { 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 #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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!6 = !{!"branch_weights", !"expected", i32 2000, i32 1}


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