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

; 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 void @i32_store(ptr noundef, i64 noundef, i32 noundef) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i64_store(ptr noundef, i64 noundef, i64 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: inlinehint nounwind uwtable
declare hidden i64 @i64_load(ptr noundef, i64 noundef) #1

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

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3ATwineChar160x20const0x260x29(ptr noundef, i32 noundef, i32 noundef) #2

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AtoString_RJS0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AstringPrototypeToLocaleUpperCase0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #3 {
  %6 = alloca ptr, 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 i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, 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 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !11
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.w2c_hermes, ptr %20, i32 0, i32 3
  %22 = load i32, ptr %21, align 8, !tbaa !13
  store i32 %22, ptr %13, align 4, !tbaa !9
  store i32 48, ptr %14, align 4, !tbaa !9
  %23 = load i32, ptr %14, align 4, !tbaa !9
  %24 = load i32, ptr %13, align 4, !tbaa !9
  %25 = sub i32 %24, %23
  store i32 %25, ptr %13, align 4, !tbaa !9
  %26 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %26, ptr %8, align 4, !tbaa !9
  %27 = load i32, ptr %13, align 4, !tbaa !9
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.w2c_hermes, ptr %28, i32 0, i32 3
  store i32 %27, ptr %29, align 8, !tbaa !13
  %30 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %30, ptr %13, align 4, !tbaa !9
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.w2c_hermes, ptr %31, i32 0, i32 6
  %33 = load i32, ptr %13, align 4, !tbaa !9
  %34 = zext i32 %33 to i64
  %35 = call i32 @i32_load(ptr noundef %32, i64 noundef %34)
  store i32 %35, ptr %13, align 4, !tbaa !9
  %36 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %36, ptr %10, align 4, !tbaa !9
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.w2c_hermes, ptr %37, i32 0, i32 6
  %39 = load i32, ptr %13, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = call i64 @i64_load(ptr noundef %38, i64 noundef %40)
  store i64 %41, ptr %18, align 8, !tbaa !11
  store i64 47, ptr %19, align 8, !tbaa !11
  %42 = load i64, ptr %18, align 8, !tbaa !11
  %43 = load i64, ptr %19, align 8, !tbaa !11
  %44 = and i64 %43, 63
  %45 = ashr i64 %42, %44
  store i64 %45, ptr %18, align 8, !tbaa !11
  store i64 4294967294, ptr %19, align 8, !tbaa !11
  %46 = load i64, ptr %19, align 8, !tbaa !11
  %47 = load i64, ptr %18, align 8, !tbaa !11
  %48 = and i64 %47, %46
  store i64 %48, ptr %18, align 8, !tbaa !11
  store i64 4294967284, ptr %19, align 8, !tbaa !11
  %49 = load i64, ptr %18, align 8, !tbaa !11
  %50 = load i64, ptr %19, align 8, !tbaa !11
  %51 = icmp ne i64 %49, %50
  %52 = zext i1 %51 to i32
  store i32 %52, ptr %13, align 4, !tbaa !9
  %53 = load i32, ptr %13, align 4, !tbaa !9
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %5
  br label %104

56:                                               ; preds = %5
  %57 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %57, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.w2c_hermes, ptr %58, i32 0, i32 6
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = add i64 %61, 40
  %63 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %59, i64 noundef %62, i32 noundef %63)
  %64 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %64, ptr %13, align 4, !tbaa !9
  store i64 124554051585, ptr %19, align 8, !tbaa !11
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.w2c_hermes, ptr %65, i32 0, i32 6
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = zext i32 %67 to i64
  %69 = add i64 %68, 32
  %70 = load i64, ptr %19, align 8, !tbaa !11
  call void @i64_store(ptr noundef %66, i64 noundef %69, i64 noundef %70)
  %71 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %71, ptr %13, align 4, !tbaa !9
  store i32 3, ptr %14, align 4, !tbaa !9
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.w2c_hermes, ptr %72, i32 0, i32 6
  %74 = load i32, ptr %13, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  %76 = add i64 %75, 16
  %77 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %73, i64 noundef %76, i32 noundef %77)
  %78 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %78, ptr %13, align 4, !tbaa !9
  store i32 31082, ptr %14, align 4, !tbaa !9
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.w2c_hermes, ptr %79, i32 0, i32 6
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  %83 = add i64 %82, 8
  %84 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %80, i64 noundef %83, i32 noundef %84)
  %85 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %85, ptr %13, align 4, !tbaa !9
  %86 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %86, ptr %14, align 4, !tbaa !9
  store i32 8, ptr %15, align 4, !tbaa !9
  %87 = load i32, ptr %15, align 4, !tbaa !9
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = add i32 %88, %87
  store i32 %89, ptr %14, align 4, !tbaa !9
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = load i32, ptr %13, align 4, !tbaa !9
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3ATwineChar160x20const0x260x29(ptr noundef %90, i32 noundef %91, i32 noundef %92)
  store i32 %93, ptr %13, align 4, !tbaa !9
  %94 = load i32, ptr %13, align 4, !tbaa !9
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %97

96:                                               ; preds = %56
  br label %104

97:                                               ; preds = %56
  %98 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %98, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.w2c_hermes, ptr %99, i32 0, i32 6
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %100, i64 noundef %102, i32 noundef %103)
  br label %198

104:                                              ; preds = %96, %55
  %105 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %105, ptr %13, align 4, !tbaa !9
  %106 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %106, ptr %14, align 4, !tbaa !9
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = load i32, ptr %14, align 4, !tbaa !9
  %110 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AtoString_RJS0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef %107, i32 noundef %108, i32 noundef %109)
  store i32 %110, ptr %13, align 4, !tbaa !9
  %111 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %111, ptr %10, align 4, !tbaa !9
  store i32 -1, ptr %14, align 4, !tbaa !9
  %112 = load i32, ptr %13, align 4, !tbaa !9
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = icmp eq i32 %112, %113
  %115 = zext i1 %114 to i32
  store i32 %115, ptr %13, align 4, !tbaa !9
  %116 = load i32, ptr %13, align 4, !tbaa !9
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %125

118:                                              ; preds = %104
  %119 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %119, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.w2c_hermes, ptr %120, i32 0, i32 6
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %121, i64 noundef %123, i32 noundef %124)
  br label %198

125:                                              ; preds = %104
  %126 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %126, ptr %13, align 4, !tbaa !9
  %127 = load i32, ptr %13, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  store i64 %128, ptr %18, align 8, !tbaa !11
  store i64 -844424930131968, ptr %19, align 8, !tbaa !11
  %129 = load i64, ptr %19, align 8, !tbaa !11
  %130 = load i64, ptr %18, align 8, !tbaa !11
  %131 = or i64 %130, %129
  store i64 %131, ptr %18, align 8, !tbaa !11
  %132 = load i64, ptr %18, align 8, !tbaa !11
  store i64 %132, ptr %12, align 8, !tbaa !11
  %133 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %133, ptr %13, align 4, !tbaa !9
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.w2c_hermes, ptr %134, i32 0, i32 6
  %136 = load i32, ptr %13, align 4, !tbaa !9
  %137 = zext i32 %136 to i64
  %138 = add i64 %137, 4
  %139 = call i32 @i32_load(ptr noundef %135, i64 noundef %138)
  store i32 %139, ptr %13, align 4, !tbaa !9
  %140 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %140, ptr %11, align 4, !tbaa !9
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.w2c_hermes, ptr %141, i32 0, i32 6
  %143 = load i32, ptr %13, align 4, !tbaa !9
  %144 = zext i32 %143 to i64
  %145 = add i64 %144, 164
  %146 = call i32 @i32_load(ptr noundef %142, i64 noundef %145)
  store i32 %146, ptr %13, align 4, !tbaa !9
  %147 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %147, ptr %10, align 4, !tbaa !9
  %148 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %148, ptr %14, align 4, !tbaa !9
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.w2c_hermes, ptr %149, i32 0, i32 6
  %151 = load i32, ptr %14, align 4, !tbaa !9
  %152 = zext i32 %151 to i64
  %153 = add i64 %152, 168
  %154 = call i32 @i32_load(ptr noundef %150, i64 noundef %153)
  store i32 %154, ptr %14, align 4, !tbaa !9
  %155 = load i32, ptr %13, align 4, !tbaa !9
  %156 = load i32, ptr %14, align 4, !tbaa !9
  %157 = icmp ult i32 %155, %156
  %158 = zext i1 %157 to i32
  store i32 %158, ptr %13, align 4, !tbaa !9
  %159 = load i32, ptr %13, align 4, !tbaa !9
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %180

161:                                              ; preds = %125
  %162 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %162, ptr %13, align 4, !tbaa !9
  %163 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %163, ptr %14, align 4, !tbaa !9
  store i32 8, ptr %15, align 4, !tbaa !9
  %164 = load i32, ptr %15, align 4, !tbaa !9
  %165 = load i32, ptr %14, align 4, !tbaa !9
  %166 = add i32 %165, %164
  store i32 %166, ptr %14, align 4, !tbaa !9
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.w2c_hermes, ptr %167, i32 0, i32 6
  %169 = load i32, ptr %13, align 4, !tbaa !9
  %170 = zext i32 %169 to i64
  %171 = add i64 %170, 164
  %172 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %168, i64 noundef %171, i32 noundef %172)
  %173 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %173, ptr %13, align 4, !tbaa !9
  %174 = load i64, ptr %12, align 8, !tbaa !11
  store i64 %174, ptr %19, align 8, !tbaa !11
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.w2c_hermes, ptr %175, i32 0, i32 6
  %177 = load i32, ptr %13, align 4, !tbaa !9
  %178 = zext i32 %177 to i64
  %179 = load i64, ptr %19, align 8, !tbaa !11
  call void @i64_store(ptr noundef %176, i64 noundef %178, i64 noundef %179)
  br label %188

180:                                              ; preds = %125
  %181 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %181, ptr %13, align 4, !tbaa !9
  %182 = load i64, ptr %12, align 8, !tbaa !11
  store i64 %182, ptr %19, align 8, !tbaa !11
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = load i64, ptr %19, align 8, !tbaa !11
  %186 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef %183, i32 noundef %184, i64 noundef %185)
  store i32 %186, ptr %13, align 4, !tbaa !9
  %187 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %187, ptr %10, align 4, !tbaa !9
  br label %188

188:                                              ; preds = %180, %161
  %189 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %189, ptr %13, align 4, !tbaa !9
  %190 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %190, ptr %14, align 4, !tbaa !9
  %191 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %191, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  store i32 1, ptr %17, align 4, !tbaa !9
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = load i32, ptr %13, align 4, !tbaa !9
  %194 = load i32, ptr %14, align 4, !tbaa !9
  %195 = load i32, ptr %15, align 4, !tbaa !9
  %196 = load i32, ptr %16, align 4, !tbaa !9
  %197 = load i32, ptr %17, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AconvertCase0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AStringPrimitive0x3E0x2C0x20bool0x2C0x20bool0x29(ptr noundef %192, i32 noundef %193, i32 noundef %194, i32 noundef %195, i32 noundef %196, i32 noundef %197)
  br label %198

198:                                              ; preds = %188, %118, %97
  %199 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %199, ptr %13, align 4, !tbaa !9
  store i32 48, ptr %14, align 4, !tbaa !9
  %200 = load i32, ptr %14, align 4, !tbaa !9
  %201 = load i32, ptr %13, align 4, !tbaa !9
  %202 = add i32 %201, %200
  store i32 %202, ptr %13, align 4, !tbaa !9
  %203 = load i32, ptr %13, align 4, !tbaa !9
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.w2c_hermes, ptr %204, i32 0, i32 3
  store i32 %203, ptr %205, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  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 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  ret void
}

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

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


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

; 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 @i64_store(ptr noundef, i64 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

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

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3ATwineChar160x20const0x260x29(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AtoString_RJS0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AstringPrototypeToLocaleUpperCase0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #2 {
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = add i32 %7, -48
  store i32 %8, ptr %6, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  %10 = zext i32 %4 to i64
  %11 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %10)
  %12 = zext i32 %11 to i64
  %13 = tail call i64 @i64_load(ptr noundef nonnull %9, i64 noundef %12)
  %14 = ashr i64 %13, 47
  %15 = and i64 %14, 4294967294
  %.not = icmp eq i64 %15, 4294967284
  br i1 %.not, label %16, label %26

16:                                               ; preds = %5
  %17 = zext i32 %8 to i64
  %18 = add nuw nsw i64 %17, 40
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %18, i32 noundef 0)
  %19 = add nuw nsw i64 %17, 32
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %19, i64 noundef 124554051585)
  %20 = add nuw nsw i64 %17, 16
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %20, i32 noundef 3)
  %21 = add nuw nsw i64 %17, 8
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %21, i32 noundef 31082)
  %22 = add i32 %7, -40
  %23 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3ATwineChar160x20const0x260x29(ptr noundef nonnull %0, i32 noundef %3, i32 noundef %22) #3
  %.not111 = icmp eq i32 %23, 0
  br i1 %.not111, label %24, label %26

24:                                               ; preds = %16
  %25 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %25, i32 noundef 0)
  br label %49

26:                                               ; preds = %16, %5
  %27 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AtoString_RJS0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef nonnull %0, i32 noundef %3, i32 noundef %11) #3
  %28 = icmp eq i32 %27, -1
  br i1 %28, label %29, label %31

29:                                               ; preds = %26
  %30 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %30, i32 noundef 0)
  br label %49

31:                                               ; preds = %26
  %32 = zext i32 %27 to i64
  %33 = or disjoint i64 %32, -844424930131968
  %34 = zext i32 %3 to i64
  %35 = add nuw nsw i64 %34, 4
  %36 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %35)
  %37 = zext i32 %36 to i64
  %38 = add nuw nsw i64 %37, 164
  %39 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %38)
  %40 = add nuw nsw i64 %37, 168
  %41 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %40)
  %42 = icmp ult i32 %39, %41
  br i1 %42, label %43, label %46

43:                                               ; preds = %31
  %44 = add i32 %39, 8
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %38, i32 noundef %44)
  %45 = zext i32 %39 to i64
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %45, i64 noundef %33)
  br label %48

46:                                               ; preds = %31
  %47 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCScope0x3A0x3A_newChunkAndPHV0x28hermes0x3A0x3Avm0x3A0x3AHermesValue0x29(ptr noundef nonnull %0, i32 noundef %36, i64 noundef %33) #3
  br label %48

48:                                               ; preds = %46, %43
  %.0 = phi i32 [ %39, %43 ], [ %47, %46 ]
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AconvertCase0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AStringPrimitive0x3E0x2C0x20bool0x2C0x20bool0x29(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %3, i32 noundef %.0, i32 noundef 1, i32 noundef 1) #3
  br label %49

49:                                               ; preds = %48, %29, %24
  store i32 %7, ptr %6, align 8, !tbaa !5
  ret void
}

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

!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,SROAPass,SimplifyCFGPass,TailCallElimPass