; 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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load8_u(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: inlinehint nounwind uwtable
declare hidden i32 @i32_load16_u(ptr noundef, i64 noundef) #2

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

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

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

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

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

31:                                               ; preds = %4
  br label %222

32:                                               ; preds = %4
  %33 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %33, ptr %16, align 8, !tbaa !11
  %34 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %34, ptr %12, align 4, !tbaa !9
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.w2c_hermes, ptr %35, i32 0, i32 6
  %37 = load i32, ptr %12, align 4, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = add i64 %38, 12
  %40 = call i64 @i64_load32_u(ptr noundef %36, i64 noundef %39)
  store i64 %40, ptr %17, align 8, !tbaa !11
  store i64 2147483647, ptr %18, align 8, !tbaa !11
  %41 = load i64, ptr %18, align 8, !tbaa !11
  %42 = load i64, ptr %17, align 8, !tbaa !11
  %43 = and i64 %42, %41
  store i64 %43, ptr %17, align 8, !tbaa !11
  %44 = load i64, ptr %17, align 8, !tbaa !11
  store i64 %44, ptr %10, align 8, !tbaa !11
  %45 = load i64, ptr %16, align 8, !tbaa !11
  %46 = load i64, ptr %17, align 8, !tbaa !11
  %47 = icmp uge i64 %45, %46
  %48 = zext i1 %47 to i32
  store i32 %48, ptr %11, align 4, !tbaa !9
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %32
  br label %222

52:                                               ; preds = %32
  %53 = load i64, ptr %7, align 8, !tbaa !11
  store i64 %53, ptr %16, align 8, !tbaa !11
  %54 = load i64, ptr %16, align 8, !tbaa !11
  %55 = trunc i64 %54 to i32
  store i32 %55, ptr %11, align 4, !tbaa !9
  %56 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %56, ptr %8, align 4, !tbaa !9
  %57 = load i64, ptr %10, align 8, !tbaa !11
  store i64 %57, ptr %17, align 8, !tbaa !11
  %58 = load i64, ptr %17, align 8, !tbaa !11
  %59 = trunc i64 %58 to i32
  store i32 %59, ptr %12, align 4, !tbaa !9
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = icmp uge i32 %60, %61
  %63 = zext i1 %62 to i32
  store i32 %63, ptr %11, align 4, !tbaa !9
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %67

66:                                               ; preds = %52
  br label %224

67:                                               ; preds = %52
  %68 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %68, ptr %11, align 4, !tbaa !9
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.w2c_hermes, ptr %69, i32 0, i32 6
  %71 = load i32, ptr %11, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = add i64 %72, 3
  %74 = call i32 @i32_load8_u(ptr noundef %70, i64 noundef %73)
  store i32 %74, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  %75 = load i32, ptr %12, align 4, !tbaa !9
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = and i32 %76, %75
  store i32 %77, ptr %11, align 4, !tbaa !9
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = icmp ne i32 %78, 0
  %80 = xor i1 %79, true
  %81 = zext i1 %80 to i32
  store i32 %81, ptr %11, align 4, !tbaa !9
  %82 = load i32, ptr %11, align 4, !tbaa !9
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %98

84:                                               ; preds = %67
  %85 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %85, ptr %11, align 4, !tbaa !9
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringPrimitive0x3A0x3AcastToASCIIPointer0x280x290x20const(ptr noundef %86, i32 noundef %87)
  store i32 %88, ptr %11, align 4, !tbaa !9
  %89 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %89, ptr %12, align 4, !tbaa !9
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = add i32 %91, %90
  store i32 %92, ptr %11, align 4, !tbaa !9
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.w2c_hermes, ptr %93, i32 0, i32 6
  %95 = load i32, ptr %11, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = call i32 @i32_load8_s(ptr noundef %94, i64 noundef %96)
  store i32 %97, ptr %11, align 4, !tbaa !9
  br label %116

98:                                               ; preds = %67
  %99 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %99, ptr %11, align 4, !tbaa !9
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = load i32, ptr %11, align 4, !tbaa !9
  %102 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringPrimitive0x3A0x3AcastToUTF16Pointer0x280x290x20const(ptr noundef %100, i32 noundef %101)
  store i32 %102, ptr %11, align 4, !tbaa !9
  %103 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %103, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %104 = load i32, ptr %13, align 4, !tbaa !9
  %105 = and i32 %104, 31
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = shl i32 %106, %105
  store i32 %107, ptr %12, align 4, !tbaa !9
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = load i32, ptr %11, align 4, !tbaa !9
  %110 = add i32 %109, %108
  store i32 %110, ptr %11, align 4, !tbaa !9
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.w2c_hermes, ptr %111, i32 0, i32 6
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = zext i32 %113 to i64
  %115 = call i32 @i32_load16_u(ptr noundef %112, i64 noundef %114)
  store i32 %115, ptr %11, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %98, %84
  %117 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %117, ptr %8, align 4, !tbaa !9
  store i32 64512, ptr %12, align 4, !tbaa !9
  %118 = load i32, ptr %12, align 4, !tbaa !9
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = and i32 %119, %118
  store i32 %120, ptr %11, align 4, !tbaa !9
  store i32 55296, ptr %12, align 4, !tbaa !9
  %121 = load i32, ptr %11, align 4, !tbaa !9
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = icmp ne i32 %121, %122
  %124 = zext i1 %123 to i32
  store i32 %124, ptr %11, align 4, !tbaa !9
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %128

127:                                              ; preds = %116
  br label %222

128:                                              ; preds = %116
  %129 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %129, ptr %16, align 8, !tbaa !11
  %130 = load i64, ptr %16, align 8, !tbaa !11
  %131 = trunc i64 %130 to i32
  store i32 %131, ptr %11, align 4, !tbaa !9
  %132 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %132, ptr %8, align 4, !tbaa !9
  %133 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %133, ptr %12, align 4, !tbaa !9
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.w2c_hermes, ptr %134, i32 0, i32 6
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = zext i32 %136 to i64
  %138 = add i64 %137, 12
  %139 = call i32 @i32_load(ptr noundef %135, i64 noundef %138)
  store i32 %139, ptr %12, align 4, !tbaa !9
  store i32 2147483647, ptr %13, align 4, !tbaa !9
  %140 = load i32, ptr %13, align 4, !tbaa !9
  %141 = load i32, ptr %12, align 4, !tbaa !9
  %142 = and i32 %141, %140
  store i32 %142, ptr %12, align 4, !tbaa !9
  %143 = load i32, ptr %11, align 4, !tbaa !9
  %144 = load i32, ptr %12, align 4, !tbaa !9
  %145 = icmp uge i32 %143, %144
  %146 = zext i1 %145 to i32
  store i32 %146, ptr %11, align 4, !tbaa !9
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %149, label %150

149:                                              ; preds = %128
  br label %242

150:                                              ; preds = %128
  %151 = load i64, ptr %7, align 8, !tbaa !11
  store i64 %151, ptr %16, align 8, !tbaa !11
  store i64 2, ptr %17, align 8, !tbaa !11
  %152 = load i64, ptr %17, align 8, !tbaa !11
  %153 = load i64, ptr %16, align 8, !tbaa !11
  %154 = add i64 %153, %152
  store i64 %154, ptr %16, align 8, !tbaa !11
  %155 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %155, ptr %17, align 8, !tbaa !11
  %156 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %156, ptr %13, align 4, !tbaa !9
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.w2c_hermes, ptr %157, i32 0, i32 6
  %159 = load i32, ptr %13, align 4, !tbaa !9
  %160 = zext i32 %159 to i64
  %161 = add i64 %160, 3
  %162 = call i32 @i32_load8_u(ptr noundef %158, i64 noundef %161)
  store i32 %162, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %163 = load i32, ptr %14, align 4, !tbaa !9
  %164 = load i32, ptr %13, align 4, !tbaa !9
  %165 = and i32 %164, %163
  store i32 %165, ptr %13, align 4, !tbaa !9
  %166 = load i32, ptr %13, align 4, !tbaa !9
  %167 = icmp ne i32 %166, 0
  %168 = xor i1 %167, true
  %169 = zext i1 %168 to i32
  store i32 %169, ptr %13, align 4, !tbaa !9
  %170 = load i32, ptr %13, align 4, !tbaa !9
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %172, label %186

172:                                              ; preds = %150
  %173 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %173, ptr %13, align 4, !tbaa !9
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = load i32, ptr %13, align 4, !tbaa !9
  %176 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringPrimitive0x3A0x3AcastToASCIIPointer0x280x290x20const(ptr noundef %174, i32 noundef %175)
  store i32 %176, ptr %13, align 4, !tbaa !9
  %177 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %177, ptr %14, align 4, !tbaa !9
  %178 = load i32, ptr %14, align 4, !tbaa !9
  %179 = load i32, ptr %13, align 4, !tbaa !9
  %180 = add i32 %179, %178
  store i32 %180, ptr %13, align 4, !tbaa !9
  %181 = load ptr, ptr %5, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.w2c_hermes, ptr %181, i32 0, i32 6
  %183 = load i32, ptr %13, align 4, !tbaa !9
  %184 = zext i32 %183 to i64
  %185 = call i32 @i32_load8_s(ptr noundef %182, i64 noundef %184)
  store i32 %185, ptr %13, align 4, !tbaa !9
  br label %204

186:                                              ; preds = %150
  %187 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %187, ptr %13, align 4, !tbaa !9
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = load i32, ptr %13, align 4, !tbaa !9
  %190 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringPrimitive0x3A0x3AcastToUTF16Pointer0x280x290x20const(ptr noundef %188, i32 noundef %189)
  store i32 %190, ptr %13, align 4, !tbaa !9
  %191 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %191, ptr %14, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  %192 = load i32, ptr %15, align 4, !tbaa !9
  %193 = and i32 %192, 31
  %194 = load i32, ptr %14, align 4, !tbaa !9
  %195 = shl i32 %194, %193
  store i32 %195, ptr %14, align 4, !tbaa !9
  %196 = load i32, ptr %14, align 4, !tbaa !9
  %197 = load i32, ptr %13, align 4, !tbaa !9
  %198 = add i32 %197, %196
  store i32 %198, ptr %13, align 4, !tbaa !9
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.w2c_hermes, ptr %199, i32 0, i32 6
  %201 = load i32, ptr %13, align 4, !tbaa !9
  %202 = zext i32 %201 to i64
  %203 = call i32 @i32_load16_u(ptr noundef %200, i64 noundef %202)
  store i32 %203, ptr %13, align 4, !tbaa !9
  br label %204

204:                                              ; preds = %186, %172
  %205 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %205, ptr %6, align 4, !tbaa !9
  store i32 64512, ptr %14, align 4, !tbaa !9
  %206 = load i32, ptr %14, align 4, !tbaa !9
  %207 = load i32, ptr %13, align 4, !tbaa !9
  %208 = and i32 %207, %206
  store i32 %208, ptr %13, align 4, !tbaa !9
  store i32 56320, ptr %14, align 4, !tbaa !9
  %209 = load i32, ptr %13, align 4, !tbaa !9
  %210 = load i32, ptr %14, align 4, !tbaa !9
  %211 = icmp eq i32 %209, %210
  %212 = zext i1 %211 to i32
  store i32 %212, ptr %13, align 4, !tbaa !9
  %213 = load i32, ptr %13, align 4, !tbaa !9
  %214 = icmp ne i32 %213, 0
  br i1 %214, label %215, label %217

215:                                              ; preds = %204
  %216 = load i64, ptr %16, align 8, !tbaa !11
  br label %219

217:                                              ; preds = %204
  %218 = load i64, ptr %17, align 8, !tbaa !11
  br label %219

219:                                              ; preds = %217, %215
  %220 = phi i64 [ %216, %215 ], [ %218, %217 ]
  store i64 %220, ptr %16, align 8, !tbaa !11
  %221 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %221, ptr %9, align 8, !tbaa !11
  br label %222

222:                                              ; preds = %219, %127, %51, %31
  %223 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %223, ptr %16, align 8, !tbaa !11
  br label %260

224:                                              ; preds = %66
  store i32 0, ptr %11, align 4, !tbaa !9
  %225 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %225, ptr %6, align 4, !tbaa !9
  store i32 174247, ptr %12, align 4, !tbaa !9
  %226 = load i32, ptr %12, align 4, !tbaa !9
  %227 = load i32, ptr %11, align 4, !tbaa !9
  %228 = add i32 %227, %226
  store i32 %228, ptr %11, align 4, !tbaa !9
  %229 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %229, ptr %12, align 4, !tbaa !9
  store i32 83126, ptr %13, align 4, !tbaa !9
  %230 = load i32, ptr %13, align 4, !tbaa !9
  %231 = load i32, ptr %12, align 4, !tbaa !9
  %232 = add i32 %231, %230
  store i32 %232, ptr %12, align 4, !tbaa !9
  store i32 1064, ptr %13, align 4, !tbaa !9
  %233 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %233, ptr %14, align 4, !tbaa !9
  store i32 39587, ptr %15, align 4, !tbaa !9
  %234 = load i32, ptr %15, align 4, !tbaa !9
  %235 = load i32, ptr %14, align 4, !tbaa !9
  %236 = add i32 %235, %234
  store i32 %236, ptr %14, align 4, !tbaa !9
  %237 = load ptr, ptr %5, align 8, !tbaa !5
  %238 = load i32, ptr %11, align 4, !tbaa !9
  %239 = load i32, ptr %12, align 4, !tbaa !9
  %240 = load i32, ptr %13, align 4, !tbaa !9
  %241 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %237, i32 noundef %238, i32 noundef %239, i32 noundef %240, i32 noundef %241)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

242:                                              ; preds = %149
  store i32 0, ptr %11, align 4, !tbaa !9
  %243 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %243, ptr %6, align 4, !tbaa !9
  store i32 174247, ptr %12, align 4, !tbaa !9
  %244 = load i32, ptr %12, align 4, !tbaa !9
  %245 = load i32, ptr %11, align 4, !tbaa !9
  %246 = add i32 %245, %244
  store i32 %246, ptr %11, align 4, !tbaa !9
  %247 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %247, ptr %12, align 4, !tbaa !9
  store i32 83126, ptr %13, align 4, !tbaa !9
  %248 = load i32, ptr %13, align 4, !tbaa !9
  %249 = load i32, ptr %12, align 4, !tbaa !9
  %250 = add i32 %249, %248
  store i32 %250, ptr %12, align 4, !tbaa !9
  store i32 1064, ptr %13, align 4, !tbaa !9
  %251 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %251, ptr %14, align 4, !tbaa !9
  store i32 39587, ptr %15, align 4, !tbaa !9
  %252 = load i32, ptr %15, align 4, !tbaa !9
  %253 = load i32, ptr %14, align 4, !tbaa !9
  %254 = add i32 %253, %252
  store i32 %254, ptr %14, align 4, !tbaa !9
  %255 = load ptr, ptr %5, align 8, !tbaa !5
  %256 = load i32, ptr %11, align 4, !tbaa !9
  %257 = load i32, ptr %12, align 4, !tbaa !9
  %258 = load i32, ptr %13, align 4, !tbaa !9
  %259 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %255, i32 noundef %256, i32 noundef %257, i32 noundef %258, i32 noundef %259)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

260:                                              ; preds = %222
  %261 = load i64, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  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 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret i64 %261
}

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}
!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: 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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load8_u(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: inlinehint nounwind uwtable
declare hidden i32 @i32_load16_u(ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

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

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

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

6:                                                ; preds = %4
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = zext i32 %1 to i64
  %9 = add nuw nsw i64 %8, 12
  %10 = tail call i64 @i64_load32_u(ptr noundef nonnull %7, i64 noundef %9)
  %11 = and i64 %10, 2147483647
  %.not140 = icmp ult i64 %5, %11
  br i1 %.not140, label %12, label %55

12:                                               ; preds = %6
  %13 = trunc i64 %2 to i32
  %14 = trunc nuw nsw i64 %11 to i32
  %.not141 = icmp ult i32 %13, %14
  br i1 %.not141, label %15, label %56

15:                                               ; preds = %12
  %16 = add nuw nsw i64 %8, 3
  %17 = tail call i32 @i32_load8_u(ptr noundef nonnull %7, i64 noundef %16)
  %18 = and i32 %17, 1
  %.not142 = icmp eq i32 %18, 0
  br i1 %.not142, label %19, label %24

19:                                               ; preds = %15
  %20 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringPrimitive0x3A0x3AcastToASCIIPointer0x280x290x20const(ptr noundef %0, i32 noundef %1)
  %21 = add i32 %20, %13
  %22 = zext i32 %21 to i64
  %23 = tail call i32 @i32_load8_s(ptr noundef nonnull %7, i64 noundef %22)
  br label %30

24:                                               ; preds = %15
  %25 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringPrimitive0x3A0x3AcastToUTF16Pointer0x280x290x20const(ptr noundef %0, i32 noundef %1)
  %26 = shl nuw i32 %13, 1
  %27 = add i32 %25, %26
  %28 = zext i32 %27 to i64
  %29 = tail call i32 @i32_load16_u(ptr noundef nonnull %7, i64 noundef %28)
  br label %30

30:                                               ; preds = %24, %19
  %.0134 = phi i32 [ %23, %19 ], [ %29, %24 ]
  %31 = and i32 %.0134, 64512
  %.not143 = icmp eq i32 %31, 55296
  br i1 %.not143, label %32, label %55

32:                                               ; preds = %30
  %33 = trunc nuw nsw i64 %5 to i32
  %34 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  %35 = and i32 %34, 2147483647
  %.not144 = icmp ugt i32 %35, %33
  br i1 %.not144, label %36, label %57

36:                                               ; preds = %32
  %37 = add nsw i64 %2, 2
  %38 = tail call i32 @i32_load8_u(ptr noundef nonnull %7, i64 noundef %16)
  %39 = and i32 %38, 1
  %.not145 = icmp eq i32 %39, 0
  br i1 %.not145, label %40, label %45

40:                                               ; preds = %36
  %41 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringPrimitive0x3A0x3AcastToASCIIPointer0x280x290x20const(ptr noundef %0, i32 noundef %1)
  %42 = add i32 %41, %33
  %43 = zext i32 %42 to i64
  %44 = tail call i32 @i32_load8_s(ptr noundef nonnull %7, i64 noundef %43)
  br label %51

45:                                               ; preds = %36
  %46 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringPrimitive0x3A0x3AcastToUTF16Pointer0x280x290x20const(ptr noundef %0, i32 noundef %1)
  %47 = shl nuw i32 %33, 1
  %48 = add i32 %46, %47
  %49 = zext i32 %48 to i64
  %50 = tail call i32 @i32_load16_u(ptr noundef nonnull %7, i64 noundef %49)
  br label %51

51:                                               ; preds = %45, %40
  %.0 = phi i32 [ %44, %40 ], [ %50, %45 ]
  %52 = and i32 %.0, 64512
  %53 = icmp eq i32 %52, 56320
  %54 = select i1 %53, i64 %37, i64 %5
  br label %55

55:                                               ; preds = %30, %6, %4, %51
  %.0135 = phi i64 [ %5, %4 ], [ %5, %6 ], [ %5, %30 ], [ %54, %51 ]
  ret i64 %.0135

56:                                               ; preds = %12
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 174247, i32 noundef 83126, i32 noundef 1064, i32 noundef 39587) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

57:                                               ; preds = %32
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 174247, i32 noundef 83126, i32 noundef 1064, i32 noundef 39587) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable
}

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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass