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

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

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

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

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

40:                                               ; preds = %3
  %41 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %41, ptr %12, align 4, !tbaa !9
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.w2c_hermes, ptr %42, i32 0, i32 6
  %44 = load i32, ptr %12, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = call i32 @i32_load(ptr noundef %43, i64 noundef %45)
  store i32 %46, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %47 = load ptr, ptr %4, 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 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %48, i64 noundef %50, i32 noundef %51)
  %52 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %52, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.w2c_hermes, ptr %53, i32 0, i32 6
  %55 = load i32, ptr %12, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = add i64 %56, 4
  %58 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %54, i64 noundef %57, i32 noundef %58)
  br label %73

59:                                               ; preds = %3
  %60 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %60, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.w2c_hermes, ptr %61, i32 0, i32 6
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = add i64 %64, 11
  %66 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %62, i64 noundef %65, i32 noundef %66)
  %67 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %67, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.w2c_hermes, ptr %68, i32 0, i32 6
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %69, i64 noundef %71, i32 noundef %72)
  br label %73

73:                                               ; preds = %59, %40
  %74 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %74, ptr %12, align 4, !tbaa !9
  %75 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %75, ptr %13, 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 %13, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = add i64 %79, 4
  %81 = call i32 @i32_load(ptr noundef %77, i64 noundef %80)
  store i32 %81, ptr %13, align 4, !tbaa !9
  %82 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %82, ptr %7, align 4, !tbaa !9
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3Areserve0x28unsigned0x20long0x29(ptr noundef %83, i32 noundef %84, i32 noundef %85)
  %86 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %86, ptr %12, align 4, !tbaa !9
  %87 = load i32, ptr %12, align 4, !tbaa !9
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %230

89:                                               ; preds = %73
  %90 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %90, ptr %12, align 4, !tbaa !9
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.w2c_hermes, ptr %91, i32 0, i32 6
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = call i32 @i32_load(ptr noundef %92, i64 noundef %94)
  store i32 %95, ptr %12, align 4, !tbaa !9
  %96 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %96, ptr %6, align 4, !tbaa !9
  %97 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %97, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %98 = load i32, ptr %14, align 4, !tbaa !9
  %99 = and i32 %98, 31
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = shl i32 %100, %99
  store i32 %101, ptr %13, align 4, !tbaa !9
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = add i32 %103, %102
  store i32 %104, ptr %12, align 4, !tbaa !9
  %105 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %105, ptr %9, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %228, %89
  %107 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %107, ptr %12, align 4, !tbaa !9
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.w2c_hermes, ptr %108, i32 0, i32 6
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = zext i32 %110 to i64
  %112 = call i32 @i32_load16_u(ptr noundef %109, i64 noundef %111)
  store i32 %112, ptr %12, align 4, !tbaa !9
  %113 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %113, ptr %7, align 4, !tbaa !9
  store i32 127, ptr %13, align 4, !tbaa !9
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = load i32, ptr %13, align 4, !tbaa !9
  %116 = icmp ule i32 %114, %115
  %117 = zext i1 %116 to i32
  store i32 %117, ptr %12, align 4, !tbaa !9
  %118 = load i32, ptr %12, align 4, !tbaa !9
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %129

120:                                              ; preds = %106
  %121 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %121, ptr %12, align 4, !tbaa !9
  %122 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %122, ptr %13, align 4, !tbaa !9
  %123 = load i32, ptr %13, align 4, !tbaa !9
  %124 = trunc i32 %123 to i8
  %125 = sext i8 %124 to i32
  store i32 %125, ptr %13, align 4, !tbaa !9
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = load i32, ptr %12, align 4, !tbaa !9
  %128 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3Apush_back0x28char0x29(ptr noundef %126, i32 noundef %127, i32 noundef %128)
  br label %215

129:                                              ; preds = %106
  %130 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %130, ptr %12, align 4, !tbaa !9
  %131 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %131, ptr %13, align 4, !tbaa !9
  store i32 10, ptr %14, align 4, !tbaa !9
  %132 = load i32, ptr %14, align 4, !tbaa !9
  %133 = load i32, ptr %13, align 4, !tbaa !9
  %134 = add i32 %133, %132
  store i32 %134, ptr %13, align 4, !tbaa !9
  %135 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %135, ptr %10, align 4, !tbaa !9
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.w2c_hermes, ptr %136, i32 0, i32 6
  %138 = load i32, ptr %12, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = add i64 %139, 4
  %141 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %137, i64 noundef %140, i32 noundef %141)
  %142 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %142, ptr %12, align 4, !tbaa !9
  store i32 4, ptr %13, align 4, !tbaa !9
  %143 = load i32, ptr %13, align 4, !tbaa !9
  %144 = load i32, ptr %12, align 4, !tbaa !9
  %145 = add i32 %144, %143
  store i32 %145, ptr %12, align 4, !tbaa !9
  %146 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %146, ptr %13, align 4, !tbaa !9
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = load i32, ptr %12, align 4, !tbaa !9
  %149 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3AencodeUTF80x28char0x2A0x260x2C0x20unsigned0x20int0x29(ptr noundef %147, i32 noundef %148, i32 noundef %149)
  %150 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %150, ptr %12, align 4, !tbaa !9
  %151 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %151, ptr %13, align 4, !tbaa !9
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.w2c_hermes, ptr %152, i32 0, i32 6
  %154 = load i32, ptr %13, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  %156 = call i32 @i32_load(ptr noundef %153, i64 noundef %155)
  store i32 %156, ptr %13, align 4, !tbaa !9
  %157 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %157, ptr %14, align 4, !tbaa !9
  %158 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %158, ptr %15, align 4, !tbaa !9
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.w2c_hermes, ptr %159, i32 0, i32 6
  %161 = load i32, ptr %15, align 4, !tbaa !9
  %162 = zext i32 %161 to i64
  %163 = add i64 %162, 11
  %164 = call i32 @i32_load8_u(ptr noundef %160, i64 noundef %163)
  store i32 %164, ptr %15, align 4, !tbaa !9
  %165 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %165, ptr %7, align 4, !tbaa !9
  %166 = load i32, ptr %15, align 4, !tbaa !9
  %167 = trunc i32 %166 to i8
  %168 = sext i8 %167 to i32
  store i32 %168, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !9
  %169 = load i32, ptr %15, align 4, !tbaa !9
  %170 = load i32, ptr %16, align 4, !tbaa !9
  %171 = icmp slt i32 %169, %170
  %172 = zext i1 %171 to i32
  store i32 %172, ptr %15, align 4, !tbaa !9
  %173 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %173, ptr %11, align 4, !tbaa !9
  %174 = load i32, ptr %15, align 4, !tbaa !9
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %176, label %178

176:                                              ; preds = %129
  %177 = load i32, ptr %13, align 4, !tbaa !9
  br label %180

178:                                              ; preds = %129
  %179 = load i32, ptr %14, align 4, !tbaa !9
  br label %180

180:                                              ; preds = %178, %176
  %181 = phi i32 [ %177, %176 ], [ %179, %178 ]
  store i32 %181, ptr %13, align 4, !tbaa !9
  %182 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %182, ptr %14, align 4, !tbaa !9
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.w2c_hermes, ptr %183, i32 0, i32 6
  %185 = load i32, ptr %14, align 4, !tbaa !9
  %186 = zext i32 %185 to i64
  %187 = add i64 %186, 4
  %188 = call i32 @i32_load(ptr noundef %184, i64 noundef %187)
  store i32 %188, ptr %14, align 4, !tbaa !9
  %189 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %189, ptr %15, align 4, !tbaa !9
  %190 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %190, ptr %16, align 4, !tbaa !9
  %191 = load i32, ptr %16, align 4, !tbaa !9
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %195

193:                                              ; preds = %180
  %194 = load i32, ptr %14, align 4, !tbaa !9
  br label %197

195:                                              ; preds = %180
  %196 = load i32, ptr %15, align 4, !tbaa !9
  br label %197

197:                                              ; preds = %195, %193
  %198 = phi i32 [ %194, %193 ], [ %196, %195 ]
  store i32 %198, ptr %14, align 4, !tbaa !9
  %199 = load i32, ptr %14, align 4, !tbaa !9
  %200 = load i32, ptr %13, align 4, !tbaa !9
  %201 = add i32 %200, %199
  store i32 %201, ptr %13, align 4, !tbaa !9
  %202 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %202, ptr %14, align 4, !tbaa !9
  %203 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %203, ptr %15, align 4, !tbaa !9
  %204 = load ptr, ptr %4, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.w2c_hermes, ptr %204, i32 0, i32 6
  %206 = load i32, ptr %15, align 4, !tbaa !9
  %207 = zext i32 %206 to i64
  %208 = add i64 %207, 4
  %209 = call i32 @i32_load(ptr noundef %205, i64 noundef %208)
  store i32 %209, ptr %15, align 4, !tbaa !9
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = load i32, ptr %12, align 4, !tbaa !9
  %212 = load i32, ptr %13, align 4, !tbaa !9
  %213 = load i32, ptr %14, align 4, !tbaa !9
  %214 = load i32, ptr %15, align 4, !tbaa !9
  call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Aenable_if0x3C_0x5Fis_cpp17_forward_iterator0x3Cchar0x2A0x3E0x3A0x3Avalue0x2C0x20std0x3A0x3A_0x5F20x3A0x3A_0x5Fwrap_iter0x3Cchar0x2A0x3E0x3E0x3A0x3Atype0x20std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3Ainsert0x3Cchar0x2A0x3E0x28std0x3A0x3A_0x5F20x3A0x3A_0x5Fwrap_iter0x3Cchar0x20const0x2A0x3E0x2C0x20char0x2A0x2C0x20char0x2A0x29(ptr noundef %210, i32 noundef %211, i32 noundef %212, i32 noundef %213, i32 noundef %214)
  br label %215

215:                                              ; preds = %197, %120
  %216 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %216, ptr %12, align 4, !tbaa !9
  store i32 2, ptr %13, align 4, !tbaa !9
  %217 = load i32, ptr %13, align 4, !tbaa !9
  %218 = load i32, ptr %12, align 4, !tbaa !9
  %219 = add i32 %218, %217
  store i32 %219, ptr %12, align 4, !tbaa !9
  %220 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %220, ptr %6, align 4, !tbaa !9
  %221 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %221, ptr %13, align 4, !tbaa !9
  %222 = load i32, ptr %12, align 4, !tbaa !9
  %223 = load i32, ptr %13, align 4, !tbaa !9
  %224 = icmp ne i32 %222, %223
  %225 = zext i1 %224 to i32
  store i32 %225, ptr %12, align 4, !tbaa !9
  %226 = load i32, ptr %12, align 4, !tbaa !9
  %227 = icmp ne i32 %226, 0
  br i1 %227, label %228, label %229

228:                                              ; preds = %215
  br label %106

229:                                              ; preds = %215
  br label %230

230:                                              ; preds = %229, %73
  %231 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %231, ptr %12, align 4, !tbaa !9
  store i32 16, ptr %13, align 4, !tbaa !9
  %232 = load i32, ptr %13, align 4, !tbaa !9
  %233 = load i32, ptr %12, align 4, !tbaa !9
  %234 = add i32 %233, %232
  store i32 %234, ptr %12, align 4, !tbaa !9
  %235 = load i32, ptr %12, align 4, !tbaa !9
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.w2c_hermes, ptr %236, i32 0, i32 3
  store i32 %235, ptr %237, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

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

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

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

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

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

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

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

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 = { 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 }

!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, !10, i64 24}
!12 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !13, i64 40, !16, i64 80}
!13 = !{!"", !6, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !15, i64 32}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}


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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3AconvertUTF16ToUTF8WithSingleSurrogates0x28std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x260x2C0x20llvh0x3A0x3AArrayRef0x3Cchar16_t0x3E0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 {
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = add i32 %5, -16
  store i32 %6, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = zext i32 %1 to i64
  %9 = add nuw nsw i64 %8, 11
  %10 = tail call i32 @i32_load8_s(ptr noundef nonnull %7, i64 noundef %9)
  %11 = icmp slt i32 %10, 0
  br i1 %11, label %12, label %16

12:                                               ; preds = %3
  %13 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %8)
  %14 = zext i32 %13 to i64
  tail call void @i32_store8(ptr noundef nonnull %7, i64 noundef %14, i32 noundef 0)
  %15 = add nuw nsw i64 %8, 4
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %15, i32 noundef 0)
  br label %17

16:                                               ; preds = %3
  tail call void @i32_store8(ptr noundef nonnull %7, i64 noundef %9, i32 noundef 0)
  tail call void @i32_store8(ptr noundef nonnull %7, i64 noundef %8, i32 noundef 0)
  br label %17

17:                                               ; preds = %16, %12
  %18 = zext i32 %2 to i64
  %19 = add nuw nsw i64 %18, 4
  %20 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %19)
  tail call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3Areserve0x28unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %20) #3
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %.loopexit, label %21

21:                                               ; preds = %17
  %22 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %18)
  %23 = shl i32 %20, 1
  %24 = add i32 %22, %23
  %25 = add i32 %5, -6
  %26 = zext i32 %6 to i64
  %27 = add nuw nsw i64 %26, 4
  %28 = add i32 %5, -12
  %29 = add nuw nsw i64 %8, 4
  br label %30

30:                                               ; preds = %43, %21
  %.0 = phi i32 [ %22, %21 ], [ %44, %43 ]
  %31 = zext i32 %.0 to i64
  %32 = tail call i32 @i32_load16_u(ptr noundef nonnull %7, i64 noundef %31)
  %33 = icmp ult i32 %32, 128
  br i1 %33, label %34, label %35

34:                                               ; preds = %30
  tail call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3Apush_back0x28char0x29(ptr noundef %0, i32 noundef %1, i32 noundef %32) #3
  br label %43

35:                                               ; preds = %30
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %27, i32 noundef %25)
  tail call void @w2c_hermes_hermes0x3A0x3AencodeUTF80x28char0x2A0x260x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %28, i32 noundef %32)
  %36 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %8)
  %37 = tail call i32 @i32_load8_u(ptr noundef nonnull %7, i64 noundef %9)
  %sext.mask = and i32 %37, 128
  %.not128 = icmp eq i32 %sext.mask, 0
  %38 = select i1 %.not128, i32 %1, i32 %36
  %39 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %29)
  %40 = select i1 %.not128, i32 %37, i32 %39
  %41 = add i32 %38, %40
  %42 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %27)
  tail call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Aenable_if0x3C_0x5Fis_cpp17_forward_iterator0x3Cchar0x2A0x3E0x3A0x3Avalue0x2C0x20std0x3A0x3A_0x5F20x3A0x3A_0x5Fwrap_iter0x3Cchar0x2A0x3E0x3E0x3A0x3Atype0x20std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3Ainsert0x3Cchar0x2A0x3E0x28std0x3A0x3A_0x5F20x3A0x3A_0x5Fwrap_iter0x3Cchar0x20const0x2A0x3E0x2C0x20char0x2A0x2C0x20char0x2A0x29(ptr noundef %0, i32 noundef %1, i32 noundef %41, i32 noundef %25, i32 noundef %42) #3
  br label %43

43:                                               ; preds = %35, %34
  %44 = add i32 %.0, 2
  %.not129 = icmp eq i32 %44, %24
  br i1 %.not129, label %.loopexit, label %30

.loopexit:                                        ; preds = %43, %17
  store i32 %5, ptr %4, align 8, !tbaa !5
  ret void
}

; 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 i32 @i32_load8_s(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

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

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

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

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 = { 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 }

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass