; 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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Aparser0x3A0x3AJSLexer0x3A0x3AappendUnicodeToStorage0x28unsigned0x20int0x29(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 %6, 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 %6, 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 %6, 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 %6, 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 %6, align 4, !tbaa !9
  %97 = load i32, ptr %5, 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, 100
  %103 = call i32 @i32_load(ptr noundef %99, i64 noundef %102)
  store i32 %103, ptr %11, align 4, !tbaa !9
  %104 = load i32, ptr %5, 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, 96
  %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 %140

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Aparser0x3A0x3AJSLexer0x3A0x3AappendUnicodeToStorage0x28unsigned0x20int0x29(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 %2, 65535
  br i1 %12, label %13, label %20

13:                                               ; preds = %3
  %14 = add i32 %2, 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 %2, 1023
  %19 = or disjoint i32 %18, 56320
  br label %20

20:                                               ; preds = %3, %13
  %.0 = phi i32 [ %19, %13 ], [ %2, %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 %1 to i64
  %24 = add nuw nsw i64 %23, 100
  %25 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %24)
  %26 = add nuw nsw i64 %23, 96
  %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 %34

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

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

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

41:                                               ; preds = %35, %34
  %42 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %26)
  %43 = add i32 %42, %22
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %26, i32 noundef %43)
  store i32 %5, ptr %4, align 8, !tbaa !5
  ret void
}

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

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