; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_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: noreturn
declare void @wasm_rt_trap(i32 noundef) #1

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

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

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

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

41:                                               ; preds = %2
  %42 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %42, ptr %9, align 4, !tbaa !9
  store i32 4097, ptr %10, align 4, !tbaa !9
  %43 = load i32, ptr %10, align 4, !tbaa !9
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = sub i32 %44, %43
  store i32 %45, ptr %9, align 4, !tbaa !9
  %46 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %46, ptr %5, align 4, !tbaa !9
  store i32 10, ptr %10, align 4, !tbaa !9
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = and i32 %47, 31
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = shl i32 %49, %48
  store i32 %50, ptr %9, align 4, !tbaa !9
  %51 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %51, ptr %10, align 4, !tbaa !9
  %52 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %52, ptr %11, align 4, !tbaa !9
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.w2c_hermes, ptr %53, i32 0, i32 6
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = add i64 %56, 8
  %58 = call i32 @i32_load(ptr noundef %54, i64 noundef %57)
  store i32 %58, ptr %11, align 4, !tbaa !9
  %59 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %59, ptr %12, align 4, !tbaa !9
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef %60, i32 noundef %61, i32 noundef %62, i32 noundef %63)
  store i32 %64, ptr %10, align 4, !tbaa !9
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.w2c_hermes, ptr %65, i32 0, i32 6
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = zext i32 %67 to i64
  %69 = add i64 %68, 12
  %70 = call i32 @i32_load(ptr noundef %66, i64 noundef %69)
  store i32 %70, ptr %10, align 4, !tbaa !9
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = add i32 %72, %71
  store i32 %73, ptr %9, align 4, !tbaa !9
  store i32 4096, ptr %10, align 4, !tbaa !9
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = add i32 %75, %74
  store i32 %76, ptr %9, align 4, !tbaa !9
  %77 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %77, ptr %5, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %41, %2
  %79 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %79, ptr %9, align 4, !tbaa !9
  %80 = load i32, ptr %8, align 4, !tbaa !9
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = icmp ult i32 %80, %81
  %83 = zext i1 %82 to i32
  store i32 %83, ptr %8, align 4, !tbaa !9
  %84 = load i32, ptr %8, align 4, !tbaa !9
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %192

86:                                               ; preds = %78
  %87 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %87, ptr %8, align 4, !tbaa !9
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.w2c_hermes, ptr %88, i32 0, i32 6
  %90 = load i32, ptr %8, align 4, !tbaa !9
  %91 = zext i32 %90 to i64
  %92 = call i32 @i32_load(ptr noundef %89, i64 noundef %91)
  store i32 %92, ptr %8, align 4, !tbaa !9
  %93 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %93, ptr %5, align 4, !tbaa !9
  %94 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %94, ptr %8, align 4, !tbaa !9
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.w2c_hermes, ptr %95, i32 0, i32 6
  %97 = load i32, ptr %8, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = add i64 %98, 4
  %100 = call i32 @i32_load(ptr noundef %96, i64 noundef %99)
  store i32 %100, ptr %8, align 4, !tbaa !9
  %101 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %101, ptr %6, align 4, !tbaa !9
  store i32 4095, ptr %9, align 4, !tbaa !9
  %102 = load i32, ptr %8, align 4, !tbaa !9
  %103 = load i32, ptr %9, align 4, !tbaa !9
  %104 = icmp ule i32 %102, %103
  %105 = zext i1 %104 to i32
  store i32 %105, ptr %8, align 4, !tbaa !9
  %106 = load i32, ptr %8, align 4, !tbaa !9
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %121

108:                                              ; preds = %86
  %109 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %109, ptr %8, align 4, !tbaa !9
  %110 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %110, ptr %9, align 4, !tbaa !9
  store i32 2, ptr %10, align 4, !tbaa !9
  %111 = load i32, ptr %10, align 4, !tbaa !9
  %112 = and i32 %111, 31
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = shl i32 %113, %112
  store i32 %114, ptr %9, align 4, !tbaa !9
  %115 = load i32, ptr %9, align 4, !tbaa !9
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = add i32 %116, %115
  store i32 %117, ptr %8, align 4, !tbaa !9
  store i32 16, ptr %9, align 4, !tbaa !9
  %118 = load i32, ptr %9, align 4, !tbaa !9
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = add i32 %119, %118
  store i32 %120, ptr %8, align 4, !tbaa !9
  br label %210

121:                                              ; preds = %86
  %122 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %122, ptr %8, align 4, !tbaa !9
  %123 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %123, ptr %9, align 4, !tbaa !9
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.w2c_hermes, ptr %124, i32 0, i32 6
  %126 = load i32, ptr %9, align 4, !tbaa !9
  %127 = zext i32 %126 to i64
  %128 = add i64 %127, 8
  %129 = call i32 @i32_load(ptr noundef %125, i64 noundef %128)
  store i32 %129, ptr %9, align 4, !tbaa !9
  %130 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %130, ptr %10, align 4, !tbaa !9
  store i32 4096, ptr %11, align 4, !tbaa !9
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = load i32, ptr %10, align 4, !tbaa !9
  %133 = sub i32 %132, %131
  store i32 %133, ptr %10, align 4, !tbaa !9
  store i32 10, ptr %11, align 4, !tbaa !9
  %134 = load i32, ptr %11, align 4, !tbaa !9
  %135 = and i32 %134, 31
  %136 = load i32, ptr %10, align 4, !tbaa !9
  %137 = lshr i32 %136, %135
  store i32 %137, ptr %10, align 4, !tbaa !9
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = load i32, ptr %8, align 4, !tbaa !9
  %140 = load i32, ptr %9, align 4, !tbaa !9
  %141 = load i32, ptr %10, align 4, !tbaa !9
  %142 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef %138, i32 noundef %139, i32 noundef %140, i32 noundef %141)
  store i32 %142, ptr %8, align 4, !tbaa !9
  %143 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %143, ptr %5, align 4, !tbaa !9
  %144 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %144, ptr %8, align 4, !tbaa !9
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.w2c_hermes, ptr %145, i32 0, i32 6
  %147 = load i32, ptr %8, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = add i64 %148, 4
  %150 = call i32 @i32_load(ptr noundef %146, i64 noundef %149)
  store i32 %150, ptr %8, align 4, !tbaa !9
  %151 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %151, ptr %4, align 4, !tbaa !9
  store i32 4095, ptr %9, align 4, !tbaa !9
  %152 = load i32, ptr %8, align 4, !tbaa !9
  %153 = load i32, ptr %9, align 4, !tbaa !9
  %154 = icmp ule i32 %152, %153
  %155 = zext i1 %154 to i32
  store i32 %155, ptr %8, align 4, !tbaa !9
  %156 = load i32, ptr %8, align 4, !tbaa !9
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %158, label %159

158:                                              ; preds = %121
  br label %198

159:                                              ; preds = %121
  %160 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %160, ptr %8, align 4, !tbaa !9
  store i32 1023, ptr %9, align 4, !tbaa !9
  %161 = load i32, ptr %9, align 4, !tbaa !9
  %162 = load i32, ptr %8, align 4, !tbaa !9
  %163 = and i32 %162, %161
  store i32 %163, ptr %8, align 4, !tbaa !9
  %164 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %164, ptr %4, align 4, !tbaa !9
  %165 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %165, ptr %9, align 4, !tbaa !9
  %166 = load ptr, ptr %3, 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, 12
  %171 = call i32 @i32_load(ptr noundef %167, i64 noundef %170)
  store i32 %171, ptr %9, align 4, !tbaa !9
  %172 = load i32, ptr %8, align 4, !tbaa !9
  %173 = load i32, ptr %9, align 4, !tbaa !9
  %174 = icmp uge i32 %172, %173
  %175 = zext i1 %174 to i32
  store i32 %175, ptr %8, align 4, !tbaa !9
  %176 = load i32, ptr %8, align 4, !tbaa !9
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %178, label %179

178:                                              ; preds = %159
  br label %204

179:                                              ; preds = %159
  %180 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %180, ptr %8, align 4, !tbaa !9
  %181 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %181, ptr %9, align 4, !tbaa !9
  store i32 2, ptr %10, align 4, !tbaa !9
  %182 = load i32, ptr %10, align 4, !tbaa !9
  %183 = and i32 %182, 31
  %184 = load i32, ptr %9, align 4, !tbaa !9
  %185 = shl i32 %184, %183
  store i32 %185, ptr %9, align 4, !tbaa !9
  %186 = load i32, ptr %9, align 4, !tbaa !9
  %187 = load i32, ptr %8, align 4, !tbaa !9
  %188 = add i32 %187, %186
  store i32 %188, ptr %8, align 4, !tbaa !9
  store i32 16, ptr %9, align 4, !tbaa !9
  %189 = load i32, ptr %9, align 4, !tbaa !9
  %190 = load i32, ptr %8, align 4, !tbaa !9
  %191 = add i32 %190, %189
  store i32 %191, ptr %8, align 4, !tbaa !9
  br label %210

192:                                              ; preds = %78
  store i32 164058, ptr %8, align 4, !tbaa !9
  store i32 76566, ptr %9, align 4, !tbaa !9
  store i32 235, ptr %10, align 4, !tbaa !9
  store i32 114870, ptr %11, align 4, !tbaa !9
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = load i32, ptr %8, align 4, !tbaa !9
  %195 = load i32, ptr %9, align 4, !tbaa !9
  %196 = load i32, ptr %10, align 4, !tbaa !9
  %197 = load i32, ptr %11, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %193, i32 noundef %194, i32 noundef %195, i32 noundef %196, i32 noundef %197)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

198:                                              ; preds = %158
  store i32 171282, ptr %8, align 4, !tbaa !9
  store i32 76566, ptr %9, align 4, !tbaa !9
  store i32 460, ptr %10, align 4, !tbaa !9
  store i32 48872, ptr %11, align 4, !tbaa !9
  %199 = load ptr, ptr %3, align 8, !tbaa !5
  %200 = load i32, ptr %8, align 4, !tbaa !9
  %201 = load i32, ptr %9, align 4, !tbaa !9
  %202 = load i32, ptr %10, align 4, !tbaa !9
  %203 = load i32, ptr %11, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %199, i32 noundef %200, i32 noundef %201, i32 noundef %202, i32 noundef %203)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

204:                                              ; preds = %178
  store i32 131326, ptr %8, align 4, !tbaa !9
  store i32 76566, ptr %9, align 4, !tbaa !9
  store i32 81, ptr %10, align 4, !tbaa !9
  store i32 39587, ptr %11, align 4, !tbaa !9
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = load i32, ptr %8, align 4, !tbaa !9
  %207 = load i32, ptr %9, align 4, !tbaa !9
  %208 = load i32, ptr %10, align 4, !tbaa !9
  %209 = load i32, ptr %11, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %205, i32 noundef %206, i32 noundef %207, i32 noundef %208, i32 noundef %209)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

210:                                              ; preds = %179, %108
  %211 = load i32, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i32 %211
}

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

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

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


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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3Aiterator0x3A0x3Aoperator0x2A0x280x29(ptr noundef %0, i32 noundef %1) local_unnamed_addr #3 {
  %3 = getelementptr inbounds i8, ptr %0, i64 40
  %4 = zext i32 %1 to i64
  %5 = add nuw nsw i64 %4, 4
  %6 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %5)
  %7 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %4)
  %8 = zext i32 %7 to i64
  %9 = add nuw nsw i64 %8, 12
  %10 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %9)
  %11 = icmp ugt i32 %10, 4096
  br i1 %11, label %12, label %23

12:                                               ; preds = %2
  %13 = add i32 %10, -4097
  %14 = shl i32 %13, 10
  %15 = add nuw nsw i64 %4, 8
  %16 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %15)
  %17 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef %0, i32 noundef %7, i32 noundef %16, i32 noundef %13)
  %18 = zext i32 %17 to i64
  %19 = add nuw nsw i64 %18, 12
  %20 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %19)
  %21 = add i32 %14, 4096
  %22 = add i32 %21, %20
  br label %23

23:                                               ; preds = %12, %2
  %.0113 = phi i32 [ %22, %12 ], [ %10, %2 ]
  %24 = icmp ult i32 %6, %.0113
  br i1 %24, label %25, label %42

25:                                               ; preds = %23
  %26 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %4)
  %27 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %5)
  %28 = icmp ult i32 %27, 4096
  br i1 %28, label %45, label %29

29:                                               ; preds = %25
  %30 = add nuw nsw i64 %4, 8
  %31 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %30)
  %32 = add i32 %27, -4096
  %33 = lshr i32 %32, 10
  %34 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ASegmentedArrayBase0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue320x3E0x3A0x3AsegmentAt0x28hermes0x3A0x3Avm0x3A0x3APointerBase0x260x2C0x20unsigned0x20int0x290x20const(ptr noundef %0, i32 noundef %26, i32 noundef %31, i32 noundef %33)
  %35 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %5)
  %36 = icmp ult i32 %35, 4096
  br i1 %36, label %43, label %37

37:                                               ; preds = %29
  %38 = and i32 %35, 1023
  %39 = zext i32 %34 to i64
  %40 = add nuw nsw i64 %39, 12
  %41 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %40)
  %.not = icmp ult i32 %38, %41
  br i1 %.not, label %45, label %44

42:                                               ; preds = %23
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 164058, i32 noundef 76566, i32 noundef 235, i32 noundef 114870) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

43:                                               ; preds = %29
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 171282, i32 noundef 76566, i32 noundef 460, i32 noundef 48872) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

44:                                               ; preds = %37
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 131326, i32 noundef 76566, i32 noundef 81, i32 noundef 39587) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

45:                                               ; preds = %37, %25
  %.sink120 = phi i32 [ %27, %25 ], [ %38, %37 ]
  %.sink119 = phi i32 [ %26, %25 ], [ %34, %37 ]
  %46 = shl nuw nsw i32 %.sink120, 2
  %47 = add i32 %46, %.sink119
  %.0 = add i32 %47, 16
  ret i32 %.0
}

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

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

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


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