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

; 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 }
%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@w2c_hermes_t1 = external constant ptr, align 8

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

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

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

declare i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef) #2

; 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 zeroext i1 @func_types_eq(ptr noundef, ptr noundef) #1

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

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

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

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

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

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

declare i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local i64 @w2c_hermes_llvh0x3A0x3Araw_fd_ostream0x3A0x3Aseek0x28unsigned0x20long0x20long0x29(ptr noundef %0, i32 noundef %1, i64 noundef %2) #5 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i64 %2, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  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 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %17 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %17, ptr %9, align 4, !tbaa !9
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.w2c_hermes, ptr %18, i32 0, i32 6
  %20 = load i32, ptr %9, align 4, !tbaa !9
  %21 = zext i32 %20 to i64
  %22 = add i64 %21, 25
  %23 = call i32 @i32_load8_u(ptr noundef %19, i64 noundef %22)
  store i32 %23, ptr %9, align 4, !tbaa !9
  %24 = load i32, ptr %9, align 4, !tbaa !9
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %215

26:                                               ; preds = %3
  %27 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %27, ptr %9, align 4, !tbaa !9
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.w2c_hermes, ptr %28, i32 0, i32 6
  %30 = load i32, ptr %9, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  %32 = add i64 %31, 12
  %33 = call i32 @i32_load(ptr noundef %29, i64 noundef %32)
  store i32 %33, ptr %9, align 4, !tbaa !9
  %34 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %34, ptr %8, align 4, !tbaa !9
  %35 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %35, ptr %10, align 4, !tbaa !9
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.w2c_hermes, ptr %36, i32 0, i32 6
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = zext i32 %38 to i64
  %40 = add i64 %39, 4
  %41 = call i32 @i32_load(ptr noundef %37, i64 noundef %40)
  store i32 %41, ptr %10, align 4, !tbaa !9
  %42 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %42, ptr %7, align 4, !tbaa !9
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = icmp ne i32 %43, %44
  %46 = zext i1 %45 to i32
  store i32 %46, ptr %9, align 4, !tbaa !9
  %47 = load i32, ptr %9, align 4, !tbaa !9
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %150

49:                                               ; preds = %26
  %50 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %50, ptr %9, align 4, !tbaa !9
  %51 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %51, ptr %10, align 4, !tbaa !9
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = load i32, ptr %10, align 4, !tbaa !9
  %54 = icmp uge i32 %52, %53
  %55 = zext i1 %54 to i32
  store i32 %55, ptr %9, align 4, !tbaa !9
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %49
  br label %233

59:                                               ; preds = %49
  %60 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %60, ptr %9, align 4, !tbaa !9
  %61 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %61, ptr %10, align 4, !tbaa !9
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.w2c_hermes, ptr %62, i32 0, i32 6
  %64 = load i32, ptr %9, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = add i64 %65, 12
  %67 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %63, i64 noundef %66, i32 noundef %67)
  %68 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %68, ptr %9, align 4, !tbaa !9
  %69 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %69, ptr %10, align 4, !tbaa !9
  %70 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %70, ptr %11, align 4, !tbaa !9
  %71 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %71, ptr %12, align 4, !tbaa !9
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = sub i32 %73, %72
  store i32 %74, ptr %11, align 4, !tbaa !9
  %75 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %75, ptr %12, align 4, !tbaa !9
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.w2c_hermes, ptr %76, i32 0, i32 6
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = call i32 @i32_load(ptr noundef %77, i64 noundef %79)
  store i32 %80, ptr %12, 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 %12, align 4, !tbaa !9
  %84 = zext i32 %83 to i64
  %85 = add i64 %84, 28
  %86 = call i32 @i32_load(ptr noundef %82, i64 noundef %85)
  store i32 %86, ptr %12, align 4, !tbaa !9
  %87 = load i32, ptr %12, align 4, !tbaa !9
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.w2c_hermes, ptr %88, i32 0, i32 7
  %90 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %89, i32 0, i32 2
  %91 = load i32, ptr %90, align 4, !tbaa !13
  %92 = icmp ult i32 %87, %91
  br i1 %92, label %93, label %116

93:                                               ; preds = %59
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.w2c_hermes, ptr %94, i32 0, i32 7
  %96 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !18
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %97, i64 %99
  %101 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %100, i32 0, i32 1
  %102 = load ptr, ptr %101, align 8, !tbaa !19
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %116

104:                                              ; preds = %93
  %105 = load ptr, ptr @w2c_hermes_t1, align 8, !tbaa !5
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.w2c_hermes, ptr %106, i32 0, i32 7
  %108 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !18
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %109, i64 %111
  %113 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !21
  %115 = call zeroext i1 @func_types_eq(ptr noundef %105, ptr noundef %114)
  br label %116

116:                                              ; preds = %104, %93, %59
  %117 = phi i1 [ false, %93 ], [ false, %59 ], [ %115, %104 ]
  %118 = xor i1 %117, true
  %119 = xor i1 %118, true
  %120 = zext i1 %119 to i32
  %121 = sext i32 %120 to i64
  %122 = call i64 @llvm.expect.i64(i64 %121, i64 1)
  %123 = icmp ne i64 %122, 0
  br i1 %123, label %126, label %124

124:                                              ; preds = %116
  call void @wasm_rt_trap(i32 noundef 6) #7
  unreachable

125:                                              ; No predecessors!
  br label %126

126:                                              ; preds = %125, %116
  %127 = phi i1 [ true, %116 ], [ false, %125 ]
  %128 = zext i1 %127 to i32
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.w2c_hermes, ptr %129, i32 0, i32 7
  %131 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %130, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8, !tbaa !18
  %133 = load i32, ptr %12, align 4, !tbaa !9
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %132, i64 %134
  %136 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %135, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !19
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.w2c_hermes, ptr %138, i32 0, i32 7
  %140 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %139, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8, !tbaa !18
  %142 = load i32, ptr %12, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %141, i64 %143
  %145 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %144, i32 0, i32 2
  %146 = load ptr, ptr %145, align 8, !tbaa !22
  %147 = load i32, ptr %9, align 4, !tbaa !9
  %148 = load i32, ptr %10, align 4, !tbaa !9
  %149 = load i32, ptr %11, align 4, !tbaa !9
  call void %137(ptr noundef %146, i32 noundef %147, i32 noundef %148, i32 noundef %149)
  br label %150

150:                                              ; preds = %126, %26
  %151 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %151, ptr %9, align 4, !tbaa !9
  %152 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %152, ptr %10, align 4, !tbaa !9
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.w2c_hermes, ptr %153, i32 0, i32 6
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = zext i32 %155 to i64
  %157 = add i64 %156, 20
  %158 = call i32 @i32_load(ptr noundef %154, i64 noundef %157)
  store i32 %158, ptr %10, align 4, !tbaa !9
  %159 = load i64, ptr %6, align 8, !tbaa !11
  store i64 %159, ptr %16, align 8, !tbaa !11
  store i32 0, ptr %12, align 4, !tbaa !9
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = load i32, ptr %10, align 4, !tbaa !9
  %162 = load i64, ptr %16, align 8, !tbaa !11
  %163 = load i32, ptr %12, align 4, !tbaa !9
  %164 = call i64 @w2c_hermes_0x5F_lseek(ptr noundef %160, i32 noundef %161, i64 noundef %162, i32 noundef %163)
  store i64 %164, ptr %15, align 8, !tbaa !11
  %165 = load i64, ptr %15, align 8, !tbaa !11
  store i64 %165, ptr %6, align 8, !tbaa !11
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.w2c_hermes, ptr %166, i32 0, i32 6
  %168 = load i32, ptr %9, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = add i64 %169, 40
  %171 = load i64, ptr %15, align 8, !tbaa !11
  call void @i64_store(ptr noundef %167, i64 noundef %170, i64 noundef %171)
  %172 = load i64, ptr %6, align 8, !tbaa !11
  store i64 %172, ptr %14, align 8, !tbaa !11
  store i64 -1, ptr %15, align 8, !tbaa !11
  %173 = load i64, ptr %14, align 8, !tbaa !11
  %174 = load i64, ptr %15, align 8, !tbaa !11
  %175 = icmp eq i64 %173, %174
  %176 = zext i1 %175 to i32
  store i32 %176, ptr %9, align 4, !tbaa !9
  %177 = load i32, ptr %9, align 4, !tbaa !9
  %178 = icmp ne i32 %177, 0
  br i1 %178, label %179, label %213

179:                                              ; preds = %150
  %180 = load ptr, ptr %4, align 8, !tbaa !5
  %181 = call i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef %180)
  store i32 %181, ptr %9, align 4, !tbaa !9
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.w2c_hermes, ptr %182, i32 0, i32 6
  %184 = load i32, ptr %9, align 4, !tbaa !9
  %185 = zext i32 %184 to i64
  %186 = call i32 @i32_load(ptr noundef %183, i64 noundef %185)
  store i32 %186, ptr %9, align 4, !tbaa !9
  %187 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %187, ptr %7, align 4, !tbaa !9
  %188 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %188, ptr %9, align 4, !tbaa !9
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef %189)
  store i32 %190, ptr %10, align 4, !tbaa !9
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.w2c_hermes, ptr %191, i32 0, i32 6
  %193 = load i32, ptr %9, align 4, !tbaa !9
  %194 = zext i32 %193 to i64
  %195 = add i64 %194, 32
  %196 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %192, i64 noundef %195, i32 noundef %196)
  %197 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %197, ptr %9, align 4, !tbaa !9
  %198 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %198, ptr %10, align 4, !tbaa !9
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.w2c_hermes, ptr %199, i32 0, i32 6
  %201 = load i32, ptr %9, align 4, !tbaa !9
  %202 = zext i32 %201 to i64
  %203 = add i64 %202, 28
  %204 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %200, i64 noundef %203, i32 noundef %204)
  %205 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %205, ptr %9, align 4, !tbaa !9
  %206 = load ptr, ptr %4, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.w2c_hermes, ptr %206, i32 0, i32 6
  %208 = load i32, ptr %9, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = add i64 %209, 40
  %211 = call i64 @i64_load(ptr noundef %207, i64 noundef %210)
  store i64 %211, ptr %14, align 8, !tbaa !11
  %212 = load i64, ptr %14, align 8, !tbaa !11
  store i64 %212, ptr %6, align 8, !tbaa !11
  br label %213

213:                                              ; preds = %179, %150
  %214 = load i64, ptr %6, align 8, !tbaa !11
  store i64 %214, ptr %14, align 8, !tbaa !11
  br label %251

215:                                              ; preds = %3
  store i32 0, ptr %9, align 4, !tbaa !9
  %216 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %216, ptr %5, align 4, !tbaa !9
  store i32 204674, ptr %10, align 4, !tbaa !9
  %217 = load i32, ptr %10, align 4, !tbaa !9
  %218 = load i32, ptr %9, align 4, !tbaa !9
  %219 = add i32 %218, %217
  store i32 %219, ptr %9, align 4, !tbaa !9
  %220 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %220, ptr %10, align 4, !tbaa !9
  store i32 59150, ptr %11, align 4, !tbaa !9
  %221 = load i32, ptr %11, align 4, !tbaa !9
  %222 = load i32, ptr %10, align 4, !tbaa !9
  %223 = add i32 %222, %221
  store i32 %223, ptr %10, align 4, !tbaa !9
  store i32 735, ptr %11, align 4, !tbaa !9
  %224 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %224, ptr %12, align 4, !tbaa !9
  store i32 74808, ptr %13, align 4, !tbaa !9
  %225 = load i32, ptr %13, align 4, !tbaa !9
  %226 = load i32, ptr %12, align 4, !tbaa !9
  %227 = add i32 %226, %225
  store i32 %227, ptr %12, align 4, !tbaa !9
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = load i32, ptr %9, align 4, !tbaa !9
  %230 = load i32, ptr %10, align 4, !tbaa !9
  %231 = load i32, ptr %11, align 4, !tbaa !9
  %232 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %228, i32 noundef %229, i32 noundef %230, i32 noundef %231, i32 noundef %232)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

233:                                              ; preds = %58
  store i32 0, ptr %9, align 4, !tbaa !9
  %234 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %234, ptr %5, align 4, !tbaa !9
  store i32 188470, ptr %10, align 4, !tbaa !9
  %235 = load i32, ptr %10, align 4, !tbaa !9
  %236 = load i32, ptr %9, align 4, !tbaa !9
  %237 = add i32 %236, %235
  store i32 %237, ptr %9, align 4, !tbaa !9
  %238 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %238, ptr %10, align 4, !tbaa !9
  store i32 59150, ptr %11, align 4, !tbaa !9
  %239 = load i32, ptr %11, align 4, !tbaa !9
  %240 = load i32, ptr %10, align 4, !tbaa !9
  %241 = add i32 %240, %239
  store i32 %241, ptr %10, align 4, !tbaa !9
  store i32 198, ptr %11, align 4, !tbaa !9
  %242 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %242, ptr %12, align 4, !tbaa !9
  store i32 17252, ptr %13, align 4, !tbaa !9
  %243 = load i32, ptr %13, align 4, !tbaa !9
  %244 = load i32, ptr %12, align 4, !tbaa !9
  %245 = add i32 %244, %243
  store i32 %245, ptr %12, align 4, !tbaa !9
  %246 = load ptr, ptr %4, align 8, !tbaa !5
  %247 = load i32, ptr %9, align 4, !tbaa !9
  %248 = load i32, ptr %10, align 4, !tbaa !9
  %249 = load i32, ptr %11, align 4, !tbaa !9
  %250 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %246, i32 noundef %247, i32 noundef %248, i32 noundef %249, i32 noundef %250)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

251:                                              ; preds = %213
  %252 = load i64, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, 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 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret i64 %252
}

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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #4 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind 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, !10, i64 92}
!14 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !15, i64 40, !17, i64 80}
!15 = !{!"", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !16, i64 32}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!18 = !{!14, !6, i64 80}
!19 = !{!20, !6, i64 8}
!20 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!20, !6, i64 0}
!22 = !{!20, !6, i64 16}


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

%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@w2c_hermes_t1 = external local_unnamed_addr constant ptr, align 8

; 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_0x5F_errno_location_0(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @func_types_eq(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

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

declare i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @w2c_hermes_llvh0x3A0x3Araw_fd_ostream0x3A0x3Aseek0x28unsigned0x20long0x20long0x29(ptr noundef %0, i32 noundef %1, i64 noundef %2) local_unnamed_addr #3 {
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = zext i32 %1 to i64
  %6 = add nuw nsw i64 %5, 25
  %7 = tail call i32 @i32_load8_u(ptr noundef nonnull %4, i64 noundef %6)
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %56, label %8

8:                                                ; preds = %3
  %9 = add nuw nsw i64 %5, 12
  %10 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %9)
  %11 = add nuw nsw i64 %5, 4
  %12 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %11)
  %.not117 = icmp eq i32 %10, %12
  br i1 %.not117, label %41, label %13

13:                                               ; preds = %8
  %.not118 = icmp ult i32 %12, %10
  br i1 %.not118, label %14, label %57

14:                                               ; preds = %13
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %9, i32 noundef %12)
  %15 = sub i32 %10, %12
  %16 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %5)
  %17 = zext i32 %16 to i64
  %18 = add nuw nsw i64 %17, 28
  %19 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %18)
  %20 = getelementptr inbounds i8, ptr %0, i64 80
  %21 = getelementptr inbounds i8, ptr %0, i64 92
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = icmp ult i32 %19, %22
  br i1 %23, label %24, label %.critedge, !prof !15

24:                                               ; preds = %14
  %25 = load ptr, ptr %20, align 8, !tbaa !16
  %26 = zext i32 %19 to i64
  %27 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %25, i64 %26
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  %.not119 = icmp eq ptr %29, null
  br i1 %.not119, label %.critedge, label %30, !prof !19

30:                                               ; preds = %24
  %31 = load ptr, ptr @w2c_hermes_t1, align 8, !tbaa !20
  %32 = load ptr, ptr %27, align 8, !tbaa !21
  %33 = tail call zeroext i1 @func_types_eq(ptr noundef %31, ptr noundef %32)
  br i1 %33, label %34, label %.critedge, !prof !15

.critedge:                                        ; preds = %24, %14, %30
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

34:                                               ; preds = %30
  %35 = load ptr, ptr %20, align 8, !tbaa !16
  %36 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %35, i64 %26
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !17
  %39 = getelementptr inbounds i8, ptr %36, i64 16
  %40 = load ptr, ptr %39, align 8, !tbaa !22
  tail call void %38(ptr noundef %40, i32 noundef %1, i32 noundef %12, i32 noundef %15) #5
  br label %41

41:                                               ; preds = %34, %8
  %42 = add nuw nsw i64 %5, 20
  %43 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %42)
  %44 = tail call i64 @w2c_hermes_0x5F_lseek(ptr noundef %0, i32 noundef %43, i64 noundef %2, i32 noundef 0) #5
  %45 = add nuw nsw i64 %5, 40
  tail call void @i64_store(ptr noundef nonnull %4, i64 noundef %45, i64 noundef %44)
  %46 = icmp eq i64 %44, -1
  br i1 %46, label %47, label %55

47:                                               ; preds = %41
  %48 = tail call i32 @w2c_hermes_0x5F_errno_location_0(ptr noundef %0) #5
  %49 = zext i32 %48 to i64
  %50 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %49)
  %51 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ageneric_category0x280x29(ptr noundef %0) #5
  %52 = add nuw nsw i64 %5, 32
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %52, i32 noundef %51)
  %53 = add nuw nsw i64 %5, 28
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %53, i32 noundef %50)
  %54 = tail call i64 @i64_load(ptr noundef nonnull %4, i64 noundef %45)
  br label %55

55:                                               ; preds = %47, %41
  %.0 = phi i64 [ %54, %47 ], [ %44, %41 ]
  ret i64 %.0

56:                                               ; preds = %3
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 204674, i32 noundef 59150, i32 noundef 735, i32 noundef 74808) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable

57:                                               ; preds = %13
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 188470, i32 noundef 59150, i32 noundef 198, i32 noundef 17252) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable
}

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 = { 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 92}
!6 = !{!"w2c_hermes", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !14, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12}
!15 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!16 = !{!6, !7, i64 80}
!17 = !{!18, !7, i64 8}
!18 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!20 = !{!7, !7, i64 0}
!21 = !{!18, !7, i64 0}
!22 = !{!18, !7, i64 16}


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