; 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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3Agc0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(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 i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = 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 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.w2c_hermes, ptr %17, i32 0, i32 3
  %19 = load i32, ptr %18, align 8, !tbaa !13
  store i32 %19, ptr %12, align 4, !tbaa !9
  store i32 32, ptr %13, align 4, !tbaa !9
  %20 = load i32, ptr %13, align 4, !tbaa !9
  %21 = load i32, ptr %12, align 4, !tbaa !9
  %22 = sub i32 %21, %20
  store i32 %22, ptr %12, align 4, !tbaa !9
  %23 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %23, ptr %8, align 4, !tbaa !9
  %24 = load i32, ptr %12, align 4, !tbaa !9
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.w2c_hermes, ptr %25, i32 0, i32 3
  store i32 %24, ptr %26, align 8, !tbaa !13
  %27 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %27, ptr %12, align 4, !tbaa !9
  store i32 6, 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 6
  %30 = load i32, ptr %12, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  %32 = add i64 %31, 11
  %33 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %29, i64 noundef %32, i32 noundef %33)
  %34 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %34, ptr %12, align 4, !tbaa !9
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.w2c_hermes, ptr %35, i32 0, i32 6
  %37 = load i32, ptr %12, align 4, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = add i64 %38, 8
  %40 = call i32 @i32_load(ptr noundef %36, i64 noundef %39)
  store i32 %40, ptr %12, align 4, !tbaa !9
  %41 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %41, ptr %10, align 4, !tbaa !9
  %42 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %42, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.w2c_hermes, ptr %43, i32 0, i32 6
  %45 = load i32, ptr %12, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = add i64 %46, 8
  %48 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %44, i64 noundef %47, i32 noundef %48)
  %49 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %49, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.w2c_hermes, ptr %50, i32 0, i32 6
  %52 = load i32, ptr %12, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = add i64 %53, 6
  %55 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %51, i64 noundef %54, i32 noundef %55)
  %56 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %56, ptr %12, align 4, !tbaa !9
  store i32 55355, ptr %13, align 4, !tbaa !9
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.w2c_hermes, ptr %57, i32 0, i32 6
  %59 = load i32, ptr %13, align 4, !tbaa !9
  %60 = zext i32 %59 to i64
  %61 = call i32 @i32_load(ptr noundef %58, i64 noundef %60)
  store i32 %61, ptr %13, align 4, !tbaa !9
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.w2c_hermes, ptr %62, i32 0, i32 6
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %63, i64 noundef %65, i32 noundef %66)
  %67 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %67, ptr %12, align 4, !tbaa !9
  store i32 55359, ptr %13, align 4, !tbaa !9
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.w2c_hermes, ptr %68, i32 0, i32 6
  %70 = load i32, ptr %13, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = call i32 @i32_load16_u(ptr noundef %69, i64 noundef %71)
  store i32 %72, ptr %13, align 4, !tbaa !9
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.w2c_hermes, ptr %73, i32 0, i32 6
  %75 = load i32, ptr %12, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = add i64 %76, 4
  %78 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store16(ptr noundef %74, i64 noundef %77, i32 noundef %78)
  %79 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %79, ptr %12, align 4, !tbaa !9
  %80 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %80, ptr %13, align 4, !tbaa !9
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.w2c_hermes, ptr %81, i32 0, i32 6
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = zext i32 %83 to i64
  %85 = add i64 %84, 24
  %86 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %82, i64 noundef %85, i32 noundef %86)
  %87 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %87, ptr %12, align 4, !tbaa !9
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.w2c_hermes, ptr %88, i32 0, i32 6
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = zext i32 %90 to i64
  %92 = call i64 @i64_load(ptr noundef %89, i64 noundef %91)
  store i64 %92, ptr %15, align 8, !tbaa !11
  %93 = load i64, ptr %15, align 8, !tbaa !11
  store i64 %93, ptr %11, align 8, !tbaa !11
  %94 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %94, ptr %12, align 4, !tbaa !9
  store i64 0, ptr %16, align 8, !tbaa !11
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.w2c_hermes, ptr %95, i32 0, i32 6
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = load i64, ptr %16, align 8, !tbaa !11
  call void @i64_store(ptr noundef %96, i64 noundef %98, i64 noundef %99)
  %100 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %100, ptr %12, align 4, !tbaa !9
  %101 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %101, ptr %16, align 8, !tbaa !11
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.w2c_hermes, ptr %102, i32 0, i32 6
  %104 = load i32, ptr %12, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = add i64 %105, 16
  %107 = load i64, ptr %16, align 8, !tbaa !11
  call void @i64_store(ptr noundef %103, i64 noundef %106, i64 noundef %107)
  %108 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %108, ptr %12, align 4, !tbaa !9
  store i32 808, ptr %13, align 4, !tbaa !9
  %109 = load i32, ptr %13, align 4, !tbaa !9
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = add i32 %110, %109
  store i32 %111, ptr %12, align 4, !tbaa !9
  %112 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %112, ptr %13, align 4, !tbaa !9
  store i32 16, ptr %14, align 4, !tbaa !9
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = load i32, ptr %13, align 4, !tbaa !9
  %115 = add i32 %114, %113
  store i32 %115, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = load i32, ptr %12, align 4, !tbaa !9
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3Acollect0x28std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x2C0x20bool0x29(ptr noundef %116, i32 noundef %117, i32 noundef %118, i32 noundef %119)
  %120 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %120, ptr %12, align 4, !tbaa !9
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.w2c_hermes, ptr %121, i32 0, i32 6
  %123 = load i32, ptr %12, align 4, !tbaa !9
  %124 = zext i32 %123 to i64
  %125 = add i64 %124, 27
  %126 = call i32 @i32_load8_s(ptr noundef %122, i64 noundef %125)
  store i32 %126, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %127 = load i32, ptr %12, align 4, !tbaa !9
  %128 = load i32, ptr %13, align 4, !tbaa !9
  %129 = icmp slt i32 %127, %128
  %130 = zext i1 %129 to i32
  store i32 %130, ptr %12, align 4, !tbaa !9
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %143

133:                                              ; preds = %5
  %134 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %134, ptr %12, align 4, !tbaa !9
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.w2c_hermes, ptr %135, i32 0, i32 6
  %137 = load i32, ptr %12, align 4, !tbaa !9
  %138 = zext i32 %137 to i64
  %139 = add i64 %138, 16
  %140 = call i32 @i32_load(ptr noundef %136, i64 noundef %139)
  store i32 %140, ptr %12, align 4, !tbaa !9
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %141, i32 noundef %142)
  br label %143

143:                                              ; preds = %133, %5
  %144 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %144, ptr %12, align 4, !tbaa !9
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.w2c_hermes, ptr %145, i32 0, i32 6
  %147 = load i32, ptr %12, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = add i64 %148, 11
  %150 = call i32 @i32_load8_s(ptr noundef %146, i64 noundef %149)
  store i32 %150, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = load i32, ptr %13, align 4, !tbaa !9
  %153 = icmp slt i32 %151, %152
  %154 = zext i1 %153 to i32
  store i32 %154, ptr %12, align 4, !tbaa !9
  %155 = load i32, ptr %12, align 4, !tbaa !9
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %166

157:                                              ; preds = %143
  %158 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %158, ptr %12, align 4, !tbaa !9
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.w2c_hermes, ptr %159, i32 0, i32 6
  %161 = load i32, ptr %12, align 4, !tbaa !9
  %162 = zext i32 %161 to i64
  %163 = call i32 @i32_load(ptr noundef %160, i64 noundef %162)
  store i32 %163, ptr %12, align 4, !tbaa !9
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %164, i32 noundef %165)
  br label %166

166:                                              ; preds = %157, %143
  %167 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %167, ptr %12, align 4, !tbaa !9
  store i64 -1688849860263936, ptr %16, align 8, !tbaa !11
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.w2c_hermes, ptr %168, i32 0, i32 6
  %170 = load i32, ptr %12, align 4, !tbaa !9
  %171 = zext i32 %170 to i64
  %172 = add i64 %171, 8
  %173 = load i64, ptr %16, align 8, !tbaa !11
  call void @i64_store(ptr noundef %169, i64 noundef %172, i64 noundef %173)
  %174 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %174, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %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 %12, align 4, !tbaa !9
  %178 = zext i32 %177 to i64
  %179 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %176, i64 noundef %178, i32 noundef %179)
  %180 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %180, ptr %12, align 4, !tbaa !9
  store i32 32, ptr %13, align 4, !tbaa !9
  %181 = load i32, ptr %13, align 4, !tbaa !9
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = add i32 %182, %181
  store i32 %183, ptr %12, align 4, !tbaa !9
  %184 = load i32, ptr %12, align 4, !tbaa !9
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.w2c_hermes, ptr %185, i32 0, i32 3
  store i32 %184, ptr %186, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  ret void
}

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3Agc0x28void0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3ANativeArgs0x29(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, -32
  store i32 %8, ptr %6, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  %10 = zext i32 %8 to i64
  %11 = add nuw nsw i64 %10, 11
  tail call void @i32_store8(ptr noundef nonnull %9, i64 noundef %11, i32 noundef 6)
  %12 = add nuw nsw i64 %10, 8
  %13 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %12)
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %12, i32 noundef 0)
  %14 = add nuw nsw i64 %10, 6
  tail call void @i32_store8(ptr noundef nonnull %9, i64 noundef %14, i32 noundef 0)
  %15 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef 55355)
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %10, i32 noundef %15)
  %16 = tail call i32 @i32_load16_u(ptr noundef nonnull %9, i64 noundef 55359)
  %17 = add nuw nsw i64 %10, 4
  tail call void @i32_store16(ptr noundef nonnull %9, i64 noundef %17, i32 noundef %16)
  %18 = add nuw nsw i64 %10, 24
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %18, i32 noundef %13)
  %19 = tail call i64 @i64_load(ptr noundef nonnull %9, i64 noundef %10)
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %10, i64 noundef 0)
  %20 = add nuw nsw i64 %10, 16
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %20, i64 noundef %19)
  %21 = add i32 %3, 808
  %22 = add i32 %7, -16
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3Acollect0x28std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x2C0x20bool0x29(ptr noundef %0, i32 noundef %21, i32 noundef %22, i32 noundef 0) #3
  %23 = add nuw nsw i64 %10, 27
  %24 = tail call i32 @i32_load8_s(ptr noundef nonnull %9, i64 noundef %23)
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %26, label %28

26:                                               ; preds = %5
  %27 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %20)
  tail call void @w2c_hermes_dlfree(ptr noundef nonnull %0, i32 noundef %27) #3
  br label %28

28:                                               ; preds = %26, %5
  %29 = tail call i32 @i32_load8_s(ptr noundef nonnull %9, i64 noundef %11)
  %30 = icmp slt i32 %29, 0
  br i1 %30, label %31, label %33

31:                                               ; preds = %28
  %32 = tail call i32 @i32_load(ptr noundef nonnull %9, i64 noundef %10)
  tail call void @w2c_hermes_dlfree(ptr noundef nonnull %0, i32 noundef %32) #3
  br label %33

33:                                               ; preds = %31, %28
  %34 = zext i32 %1 to i64
  %35 = add nuw nsw i64 %34, 8
  tail call void @i64_store(ptr noundef nonnull %9, i64 noundef %35, i64 noundef -1688849860263936)
  tail call void @i32_store(ptr noundef nonnull %9, i64 noundef %34, i32 noundef 1)
  store i32 %7, ptr %6, align 8, !tbaa !5
  ret void
}

declare void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3Acollect0x28std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x2C0x20bool0x29(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,SROAPass,TailCallElimPass