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

; 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

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

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

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

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

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

46:                                               ; preds = %3
  %47 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %47, ptr %11, align 4, !tbaa !9
  store i32 4, ptr %12, align 4, !tbaa !9
  %48 = load i32, ptr %12, align 4, !tbaa !9
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = add i32 %49, %48
  store i32 %50, ptr %11, align 4, !tbaa !9
  %51 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %51, ptr %12, align 4, !tbaa !9
  store i32 983040, ptr %13, align 4, !tbaa !9
  %52 = load i32, ptr %13, align 4, !tbaa !9
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = add i32 %53, %52
  store i32 %54, ptr %12, align 4, !tbaa !9
  store i32 10, ptr %13, align 4, !tbaa !9
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = and i32 %55, 31
  %57 = load i32, ptr %12, align 4, !tbaa !9
  %58 = lshr i32 %57, %56
  store i32 %58, ptr %12, align 4, !tbaa !9
  store i32 1023, ptr %13, align 4, !tbaa !9
  %59 = load i32, ptr %13, align 4, !tbaa !9
  %60 = load i32, ptr %12, align 4, !tbaa !9
  %61 = and i32 %60, %59
  store i32 %61, ptr %12, align 4, !tbaa !9
  store i32 55296, ptr %13, align 4, !tbaa !9
  %62 = load i32, ptr %13, align 4, !tbaa !9
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = or i32 %63, %62
  store i32 %64, ptr %12, align 4, !tbaa !9
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load i32, ptr %11, align 4, !tbaa !9
  %67 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3AencodeUTF80x28char0x2A0x260x2C0x20unsigned0x20int0x29(ptr noundef %65, i32 noundef %66, i32 noundef %67)
  %68 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %68, ptr %11, align 4, !tbaa !9
  store i32 1023, ptr %12, align 4, !tbaa !9
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = and i32 %70, %69
  store i32 %71, ptr %11, align 4, !tbaa !9
  store i32 56320, ptr %12, align 4, !tbaa !9
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = or i32 %73, %72
  store i32 %74, ptr %11, align 4, !tbaa !9
  br label %77

75:                                               ; preds = %3
  %76 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %76, ptr %11, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %75, %46
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = load i32, ptr %11, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3AencodeUTF80x28char0x2A0x260x2C0x20unsigned0x20int0x29(ptr noundef %78, i32 noundef %79, i32 noundef %80)
  %81 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %81, ptr %10, align 4, !tbaa !9
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.w2c_hermes, ptr %82, i32 0, i32 6
  %84 = load i32, ptr %10, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = add i64 %85, 4
  %87 = call i32 @i32_load(ptr noundef %83, i64 noundef %86)
  store i32 %87, ptr %10, align 4, !tbaa !9
  %88 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %88, ptr %8, align 4, !tbaa !9
  %89 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %89, ptr %11, align 4, !tbaa !9
  store i32 8, 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 i32, ptr %11, align 4, !tbaa !9
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = sub i32 %94, %93
  store i32 %95, ptr %10, align 4, !tbaa !9
  %96 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %96, ptr %5, align 4, !tbaa !9
  %97 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %97, ptr %11, align 4, !tbaa !9
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.w2c_hermes, ptr %98, i32 0, i32 6
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = add i64 %101, 8
  %103 = call i32 @i32_load(ptr noundef %99, i64 noundef %102)
  store i32 %103, ptr %11, align 4, !tbaa !9
  %104 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %104, ptr %12, align 4, !tbaa !9
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.w2c_hermes, ptr %105, i32 0, i32 6
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = add i64 %108, 4
  %110 = call i32 @i32_load(ptr noundef %106, i64 noundef %109)
  store i32 %110, ptr %12, align 4, !tbaa !9
  %111 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %111, ptr %9, align 4, !tbaa !9
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = sub i32 %113, %112
  store i32 %114, ptr %11, align 4, !tbaa !9
  %115 = load i32, ptr %10, align 4, !tbaa !9
  %116 = load i32, ptr %11, align 4, !tbaa !9
  %117 = icmp ugt i32 %115, %116
  %118 = zext i1 %117 to i32
  store i32 %118, ptr %10, align 4, !tbaa !9
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %137

121:                                              ; preds = %77
  %122 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %122, ptr %10, align 4, !tbaa !9
  %123 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %123, ptr %11, align 4, !tbaa !9
  store i32 12, ptr %12, align 4, !tbaa !9
  %124 = load i32, ptr %12, align 4, !tbaa !9
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = add i32 %125, %124
  store i32 %126, ptr %11, align 4, !tbaa !9
  %127 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %127, ptr %12, align 4, !tbaa !9
  %128 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %128, ptr %13, align 4, !tbaa !9
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = add i32 %130, %129
  store i32 %131, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = load i32, ptr %10, align 4, !tbaa !9
  %134 = load i32, ptr %11, align 4, !tbaa !9
  %135 = load i32, ptr %12, align 4, !tbaa !9
  %136 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_llvh0x3A0x3ASmallVectorBase0x3A0x3Agrow_pod0x28void0x2A0x2C0x20unsigned0x20long0x2C0x20unsigned0x20long0x29(ptr noundef %132, i32 noundef %133, i32 noundef %134, i32 noundef %135, i32 noundef %136)
  br label %137

137:                                              ; preds = %121, %77
  %138 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %138, ptr %10, align 4, !tbaa !9
  %139 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %139, ptr %11, align 4, !tbaa !9
  store i32 8, ptr %12, align 4, !tbaa !9
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = load i32, ptr %11, align 4, !tbaa !9
  %142 = add i32 %141, %140
  store i32 %142, ptr %11, align 4, !tbaa !9
  %143 = load i32, ptr %10, align 4, !tbaa !9
  %144 = load i32, ptr %11, align 4, !tbaa !9
  %145 = icmp ne i32 %143, %144
  %146 = zext i1 %145 to i32
  store i32 %146, ptr %10, align 4, !tbaa !9
  %147 = load i32, ptr %10, align 4, !tbaa !9
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %149, label %176

149:                                              ; preds = %137
  %150 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %150, ptr %10, align 4, !tbaa !9
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.w2c_hermes, ptr %151, i32 0, i32 6
  %153 = load i32, ptr %10, align 4, !tbaa !9
  %154 = zext i32 %153 to i64
  %155 = call i32 @i32_load(ptr noundef %152, i64 noundef %154)
  store i32 %155, ptr %10, align 4, !tbaa !9
  %156 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %156, ptr %11, align 4, !tbaa !9
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.w2c_hermes, ptr %157, i32 0, i32 6
  %159 = load i32, ptr %11, align 4, !tbaa !9
  %160 = zext i32 %159 to i64
  %161 = add i64 %160, 4
  %162 = call i32 @i32_load(ptr noundef %158, i64 noundef %161)
  store i32 %162, ptr %11, align 4, !tbaa !9
  %163 = load i32, ptr %11, align 4, !tbaa !9
  %164 = load i32, ptr %10, align 4, !tbaa !9
  %165 = add i32 %164, %163
  store i32 %165, ptr %10, align 4, !tbaa !9
  %166 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %166, ptr %11, align 4, !tbaa !9
  store i32 8, ptr %12, align 4, !tbaa !9
  %167 = load i32, ptr %12, align 4, !tbaa !9
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = add i32 %168, %167
  store i32 %169, ptr %11, align 4, !tbaa !9
  %170 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %170, ptr %12, align 4, !tbaa !9
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = load i32, ptr %10, align 4, !tbaa !9
  %173 = load i32, ptr %11, align 4, !tbaa !9
  %174 = load i32, ptr %12, align 4, !tbaa !9
  %175 = call i32 @w2c_hermes_0x5F_memcpy(ptr noundef %171, i32 noundef %172, i32 noundef %173, i32 noundef %174)
  store i32 %175, ptr %10, align 4, !tbaa !9
  br label %176

176:                                              ; preds = %149, %137
  %177 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %177, ptr %10, align 4, !tbaa !9
  %178 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %178, ptr %11, align 4, !tbaa !9
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.w2c_hermes, ptr %179, i32 0, i32 6
  %181 = load i32, ptr %11, align 4, !tbaa !9
  %182 = zext i32 %181 to i64
  %183 = add i64 %182, 4
  %184 = call i32 @i32_load(ptr noundef %180, i64 noundef %183)
  store i32 %184, ptr %11, align 4, !tbaa !9
  %185 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %185, ptr %12, align 4, !tbaa !9
  %186 = load i32, ptr %12, align 4, !tbaa !9
  %187 = load i32, ptr %11, align 4, !tbaa !9
  %188 = add i32 %187, %186
  store i32 %188, ptr %11, align 4, !tbaa !9
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.w2c_hermes, ptr %189, i32 0, i32 6
  %191 = load i32, ptr %10, align 4, !tbaa !9
  %192 = zext i32 %191 to i64
  %193 = add i64 %192, 4
  %194 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %190, i64 noundef %193, i32 noundef %194)
  %195 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %195, ptr %10, align 4, !tbaa !9
  store i32 16, ptr %11, align 4, !tbaa !9
  %196 = load i32, ptr %11, align 4, !tbaa !9
  %197 = load i32, ptr %10, align 4, !tbaa !9
  %198 = add i32 %197, %196
  store i32 %198, ptr %10, align 4, !tbaa !9
  %199 = load i32, ptr %10, align 4, !tbaa !9
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.w2c_hermes, ptr %200, i32 0, i32 3
  store i32 %199, ptr %201, align 8, !tbaa !11
  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
}

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, !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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Aparser0x3A0x3AJSLexer0x3A0x3AappendUnicodeToStorage0x28unsigned0x20int0x2C0x20llvh0x3A0x3ASmallVectorImpl0x3Cchar0x3E0x260x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %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 = add i32 %5, -8
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = zext i32 %6 to i64
  %10 = add nuw nsw i64 %9, 4
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %10, i32 noundef %7)
  %11 = add i32 %5, -12
  %12 = icmp ugt i32 %1, 65535
  br i1 %12, label %13, label %20

13:                                               ; preds = %3
  %14 = add i32 %1, 983040
  %15 = lshr i32 %14, 10
  %16 = and i32 %15, 1023
  %17 = or disjoint i32 %16, 55296
  tail call void @w2c_hermes_hermes0x3A0x3AencodeUTF80x28char0x2A0x260x2C0x20unsigned0x20int0x29(ptr noundef nonnull %0, i32 noundef %11, i32 noundef %17) #3
  %18 = and i32 %1, 1023
  %19 = or disjoint i32 %18, 56320
  br label %20

20:                                               ; preds = %3, %13
  %.0 = phi i32 [ %19, %13 ], [ %1, %3 ]
  tail call void @w2c_hermes_hermes0x3A0x3AencodeUTF80x28char0x2A0x260x2C0x20unsigned0x20int0x29(ptr noundef nonnull %0, i32 noundef %11, i32 noundef %.0) #3
  %21 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %10)
  %22 = sub i32 %21, %7
  %23 = zext i32 %2 to i64
  %24 = add nuw nsw i64 %23, 8
  %25 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %24)
  %26 = add nuw nsw i64 %23, 4
  %27 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %26)
  %28 = sub i32 %25, %27
  %29 = icmp ugt i32 %22, %28
  br i1 %29, label %30, label %33

30:                                               ; preds = %20
  %31 = add i32 %2, 12
  %32 = add i32 %27, %22
  tail call void @w2c_hermes_llvh0x3A0x3ASmallVectorBase0x3A0x3Agrow_pod0x28void0x2A0x2C0x20unsigned0x20long0x2C0x20unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %2, i32 noundef %31, i32 noundef %32, i32 noundef 1) #3
  br label %33

33:                                               ; preds = %30, %20
  %.not = icmp eq i32 %21, %7
  br i1 %.not, label %39, label %34

34:                                               ; preds = %33
  %35 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %23)
  %36 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %26)
  %37 = add i32 %36, %35
  %38 = tail call i32 @w2c_hermes_0x5F_memcpy(ptr noundef nonnull %0, i32 noundef %37, i32 noundef %7, i32 noundef %22) #3
  br label %39

39:                                               ; preds = %34, %33
  %40 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %26)
  %41 = add i32 %40, %22
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %26, i32 noundef %41)
  store i32 %5, ptr %4, 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,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass