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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.w2c_hermes = type { ptr, ptr, ptr, i32, i32, i32, %struct.wasm_rt_memory_t, %struct.wasm_rt_funcref_table_t }
%struct.wasm_rt_memory_t = type { ptr, i64, i64, i64, i8 }
%struct.wasm_rt_funcref_table_t = type { ptr, i32, i32 }

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

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

; Function Attrs: noreturn
declare void @wasm_rt_trap(i32 noundef) #1

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AtoTwine0x280x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2) #4 {
  %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) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %14 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %14, ptr %9, align 4, !tbaa !9
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.w2c_hermes, ptr %15, i32 0, i32 6
  %17 = load i32, ptr %9, align 4, !tbaa !9
  %18 = zext i32 %17 to i64
  %19 = add i64 %18, 8
  %20 = call i32 @i32_load(ptr noundef %16, i64 noundef %19)
  store i32 %20, ptr %9, align 4, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !9
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = load i32, ptr %10, align 4, !tbaa !9
  %23 = icmp slt i32 %21, %22
  %24 = zext i1 %23 to i32
  store i32 %24, ptr %9, align 4, !tbaa !9
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %110

27:                                               ; preds = %3
  %28 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %28, ptr %9, align 4, !tbaa !9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load i32, ptr %9, align 4, !tbaa !9
  %31 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToCharPtr0x280x290x20const(ptr noundef %29, i32 noundef %30)
  store i32 %31, ptr %9, align 4, !tbaa !9
  %32 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %32, ptr %8, align 4, !tbaa !9
  %33 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %33, ptr %9, align 4, !tbaa !9
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.w2c_hermes, ptr %34, i32 0, i32 6
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = zext i32 %36 to i64
  %38 = add i64 %37, 12
  %39 = call i32 @i32_load(ptr noundef %35, i64 noundef %38)
  store i32 %39, ptr %9, align 4, !tbaa !9
  %40 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %40, ptr %6, align 4, !tbaa !9
  %41 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %41, ptr %9, align 4, !tbaa !9
  store i32 0, ptr %10, 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 %9, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = add i64 %45, 32
  %47 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %43, i64 noundef %46, i32 noundef %47)
  %48 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %48, ptr %9, align 4, !tbaa !9
  %49 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %49, ptr %10, align 4, !tbaa !9
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.w2c_hermes, ptr %50, i32 0, i32 6
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = add i64 %53, 28
  %55 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %51, i64 noundef %54, i32 noundef %55)
  store i32 1, ptr %9, align 4, !tbaa !9
  %56 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %56, ptr %7, align 4, !tbaa !9
  %57 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %57, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %10, align 4, !tbaa !9
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.w2c_hermes, ptr %58, i32 0, i32 6
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = add i64 %61, 24
  %63 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %59, i64 noundef %62, i32 noundef %63)
  %64 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %64, ptr %9, align 4, !tbaa !9
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %76

67:                                               ; preds = %27
  %68 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %68, ptr %9, align 4, !tbaa !9
  %69 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %69, ptr %10, align 4, !tbaa !9
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.w2c_hermes, ptr %70, i32 0, i32 6
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %71, i64 noundef %73, i32 noundef %74)
  store i32 3, ptr %9, align 4, !tbaa !9
  %75 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %75, ptr %7, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %67, %27
  %77 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %77, ptr %9, align 4, !tbaa !9
  %78 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %78, ptr %10, align 4, !tbaa !9
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.w2c_hermes, ptr %79, i32 0, i32 6
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  %83 = add i64 %82, 8
  %84 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %80, i64 noundef %83, i32 noundef %84)
  %85 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %85, ptr %9, align 4, !tbaa !9
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = load i32, ptr %9, align 4, !tbaa !9
  %88 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ATwineChar160x3A0x3AisValid0x280x290x20const(ptr noundef %86, i32 noundef %87)
  store i32 %88, ptr %9, align 4, !tbaa !9
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %76
  br label %185

92:                                               ; preds = %76
  store i32 0, ptr %9, align 4, !tbaa !9
  %93 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %93, ptr %5, align 4, !tbaa !9
  store i32 118970, ptr %10, align 4, !tbaa !9
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = add i32 %95, %94
  store i32 %96, ptr %9, align 4, !tbaa !9
  %97 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %97, ptr %10, align 4, !tbaa !9
  store i32 86509, ptr %11, align 4, !tbaa !9
  %98 = load i32, ptr %11, align 4, !tbaa !9
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = add i32 %99, %98
  store i32 %100, ptr %10, align 4, !tbaa !9
  store i32 132, ptr %11, align 4, !tbaa !9
  %101 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %101, ptr %12, align 4, !tbaa !9
  store i32 110848, 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 ptr, ptr %4, align 8, !tbaa !5
  %106 = load i32, ptr %9, align 4, !tbaa !9
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %105, i32 noundef %106, i32 noundef %107, i32 noundef %108, i32 noundef %109)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

110:                                              ; preds = %3
  %111 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %111, ptr %9, align 4, !tbaa !9
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToChar16Ptr0x280x290x20const(ptr noundef %112, i32 noundef %113)
  store i32 %114, ptr %9, align 4, !tbaa !9
  %115 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %115, ptr %7, align 4, !tbaa !9
  %116 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %116, ptr %9, align 4, !tbaa !9
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.w2c_hermes, ptr %117, i32 0, i32 6
  %119 = load i32, ptr %9, align 4, !tbaa !9
  %120 = zext i32 %119 to i64
  %121 = add i64 %120, 12
  %122 = call i32 @i32_load(ptr noundef %118, i64 noundef %121)
  store i32 %122, ptr %9, align 4, !tbaa !9
  %123 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %123, ptr %6, align 4, !tbaa !9
  %124 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %124, ptr %9, align 4, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !9
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.w2c_hermes, ptr %125, i32 0, i32 6
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = add i64 %128, 32
  %130 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %126, i64 noundef %129, i32 noundef %130)
  %131 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %131, ptr %9, align 4, !tbaa !9
  %132 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %132, ptr %10, align 4, !tbaa !9
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.w2c_hermes, ptr %133, i32 0, i32 6
  %135 = load i32, ptr %9, align 4, !tbaa !9
  %136 = zext i32 %135 to i64
  %137 = add i64 %136, 28
  %138 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %134, i64 noundef %137, i32 noundef %138)
  %139 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %139, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %10, align 4, !tbaa !9
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.w2c_hermes, ptr %140, i32 0, i32 6
  %142 = load i32, ptr %9, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = add i64 %143, 24
  %145 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %141, i64 noundef %144, i32 noundef %145)
  %146 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %146, ptr %9, align 4, !tbaa !9
  store i32 4, ptr %10, align 4, !tbaa !9
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.w2c_hermes, ptr %147, i32 0, i32 6
  %149 = load i32, ptr %9, align 4, !tbaa !9
  %150 = zext i32 %149 to i64
  %151 = add i64 %150, 8
  %152 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %148, i64 noundef %151, i32 noundef %152)
  %153 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %153, ptr %9, align 4, !tbaa !9
  %154 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %154, ptr %10, align 4, !tbaa !9
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.w2c_hermes, ptr %155, i32 0, i32 6
  %157 = load i32, ptr %9, align 4, !tbaa !9
  %158 = zext i32 %157 to i64
  %159 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %156, i64 noundef %158, i32 noundef %159)
  %160 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %160, ptr %9, align 4, !tbaa !9
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = load i32, ptr %9, align 4, !tbaa !9
  %163 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ATwineChar160x3A0x3AisValid0x280x290x20const(ptr noundef %161, i32 noundef %162)
  store i32 %163, ptr %9, align 4, !tbaa !9
  %164 = load i32, ptr %9, align 4, !tbaa !9
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %167

166:                                              ; preds = %110
  br label %185

167:                                              ; preds = %110
  store i32 0, ptr %9, align 4, !tbaa !9
  %168 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %168, ptr %5, align 4, !tbaa !9
  store i32 118970, ptr %10, align 4, !tbaa !9
  %169 = load i32, ptr %10, align 4, !tbaa !9
  %170 = load i32, ptr %9, align 4, !tbaa !9
  %171 = add i32 %170, %169
  store i32 %171, ptr %9, align 4, !tbaa !9
  %172 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %172, ptr %10, align 4, !tbaa !9
  store i32 86509, ptr %11, align 4, !tbaa !9
  %173 = load i32, ptr %11, align 4, !tbaa !9
  %174 = load i32, ptr %10, align 4, !tbaa !9
  %175 = add i32 %174, %173
  store i32 %175, ptr %10, align 4, !tbaa !9
  store i32 156, ptr %11, align 4, !tbaa !9
  %176 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %176, ptr %12, align 4, !tbaa !9
  store i32 110848, ptr %13, align 4, !tbaa !9
  %177 = load i32, ptr %13, align 4, !tbaa !9
  %178 = load i32, ptr %12, align 4, !tbaa !9
  %179 = add i32 %178, %177
  store i32 %179, ptr %12, align 4, !tbaa !9
  %180 = load ptr, ptr %4, align 8, !tbaa !5
  %181 = load i32, ptr %9, align 4, !tbaa !9
  %182 = load i32, ptr %10, align 4, !tbaa !9
  %183 = load i32, ptr %11, align 4, !tbaa !9
  %184 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %180, i32 noundef %181, i32 noundef %182, i32 noundef %183, i32 noundef %184)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

185:                                              ; preds = %166, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: noreturn
declare void @wasm_rt_trap(i32 noundef) local_unnamed_addr #0

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AtoTwine0x280x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = zext i32 %2 to i64
  %6 = add nuw nsw i64 %5, 8
  %7 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %6)
  %8 = icmp slt i32 %7, 0
  %9 = add nuw nsw i64 %5, 12
  %10 = zext i32 %1 to i64
  %11 = add nuw nsw i64 %10, 32
  %12 = add nuw nsw i64 %10, 28
  %13 = add nuw nsw i64 %10, 24
  br i1 %8, label %14, label %22

14:                                               ; preds = %3
  %15 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToCharPtr0x280x290x20const(ptr noundef %0, i32 noundef %2)
  %16 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %9)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %11, i32 noundef 0)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %12, i32 noundef %16)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %13, i32 noundef 1)
  %.not106 = icmp eq i32 %16, 0
  br i1 %.not106, label %18, label %17

17:                                               ; preds = %14
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %10, i32 noundef %15)
  br label %18

18:                                               ; preds = %17, %14
  %.0 = phi i32 [ 3, %17 ], [ 1, %14 ]
  %19 = add nuw nsw i64 %10, 8
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %19, i32 noundef %.0)
  %20 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ATwineChar160x3A0x3AisValid0x280x290x20const(ptr noundef %0, i32 noundef %1)
  %.not107 = icmp eq i32 %20, 0
  br i1 %.not107, label %21, label %28

21:                                               ; preds = %18
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 118970, i32 noundef 86509, i32 noundef 132, i32 noundef 110848) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

22:                                               ; preds = %3
  %23 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AStringView0x3A0x3AcastToChar16Ptr0x280x290x20const(ptr noundef %0, i32 noundef %2)
  %24 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %9)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %11, i32 noundef 0)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %12, i32 noundef %24)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %13, i32 noundef 1)
  %25 = add nuw nsw i64 %10, 8
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %25, i32 noundef 4)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %10, i32 noundef %23)
  %26 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ATwineChar160x3A0x3AisValid0x280x290x20const(ptr noundef %0, i32 noundef %1)
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %27, label %28

27:                                               ; preds = %22
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 118970, i32 noundef 86509, i32 noundef 156, i32 noundef 110848) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

28:                                               ; preds = %22, %18
  ret void
}

attributes #0 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass