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

; 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 }
%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1

; 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: 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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @func_types_eq(ptr noundef, ptr noundef) #1

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

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

38:                                               ; preds = %2
  %39 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %39, ptr %7, align 4, !tbaa !9
  br label %56

40:                                               ; preds = %2
  %41 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %41, ptr %7, align 4, !tbaa !9
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = call i32 @w2c_hermes_0x5F_towrite(ptr noundef %42, i32 noundef %43)
  store i32 %44, ptr %7, align 4, !tbaa !9
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %40
  br label %196

48:                                               ; preds = %40
  %49 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %49, ptr %7, align 4, !tbaa !9
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.w2c_hermes, ptr %50, i32 0, i32 6
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = add i64 %53, 16
  %55 = call i32 @i32_load(ptr noundef %51, i64 noundef %54)
  store i32 %55, ptr %7, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %48, %38
  %57 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %57, ptr %8, align 4, !tbaa !9
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.w2c_hermes, ptr %58, i32 0, i32 6
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = add i64 %61, 20
  %63 = call i32 @i32_load(ptr noundef %59, i64 noundef %62)
  store i32 %63, ptr %8, align 4, !tbaa !9
  %64 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %64, ptr %6, align 4, !tbaa !9
  %65 = load i32, ptr %7, align 4, !tbaa !9
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = icmp eq i32 %65, %66
  %68 = zext i1 %67 to i32
  store i32 %68, ptr %7, align 4, !tbaa !9
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %72

71:                                               ; preds = %56
  br label %105

72:                                               ; preds = %56
  %73 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %73, ptr %7, align 4, !tbaa !9
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.w2c_hermes, ptr %74, i32 0, i32 6
  %76 = load i32, ptr %7, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = add i64 %77, 80
  %79 = call i32 @i32_load(ptr noundef %75, i64 noundef %78)
  store i32 %79, ptr %7, align 4, !tbaa !9
  store i32 10, ptr %8, align 4, !tbaa !9
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = load i32, ptr %8, align 4, !tbaa !9
  %82 = icmp eq i32 %80, %81
  %83 = zext i1 %82 to i32
  store i32 %83, ptr %7, align 4, !tbaa !9
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %72
  br label %105

87:                                               ; preds = %72
  %88 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %88, ptr %7, align 4, !tbaa !9
  %89 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %89, ptr %8, align 4, !tbaa !9
  store i32 1, ptr %9, align 4, !tbaa !9
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = load i32, ptr %8, align 4, !tbaa !9
  %92 = add i32 %91, %90
  store i32 %92, ptr %8, align 4, !tbaa !9
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.w2c_hermes, ptr %93, i32 0, i32 6
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = add i64 %96, 20
  %98 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %94, i64 noundef %97, i32 noundef %98)
  %99 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %99, ptr %7, align 4, !tbaa !9
  store i32 10, ptr %8, align 4, !tbaa !9
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.w2c_hermes, ptr %100, i32 0, i32 6
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = zext i32 %102 to i64
  %104 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %101, i64 noundef %103, i32 noundef %104)
  br label %196

105:                                              ; preds = %86, %71
  %106 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %106, ptr %7, align 4, !tbaa !9
  %107 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %107, ptr %8, align 4, !tbaa !9
  store i32 15, ptr %9, align 4, !tbaa !9
  %108 = load i32, ptr %9, align 4, !tbaa !9
  %109 = load i32, ptr %8, align 4, !tbaa !9
  %110 = add i32 %109, %108
  store i32 %110, ptr %8, align 4, !tbaa !9
  store i32 1, ptr %9, align 4, !tbaa !9
  %111 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %111, ptr %10, align 4, !tbaa !9
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.w2c_hermes, ptr %112, i32 0, i32 6
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = add i64 %115, 36
  %117 = call i32 @i32_load(ptr noundef %113, i64 noundef %116)
  store i32 %117, ptr %10, align 4, !tbaa !9
  %118 = load i32, ptr %10, align 4, !tbaa !9
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.w2c_hermes, ptr %119, i32 0, i32 7
  %121 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %120, i32 0, i32 2
  %122 = load i32, ptr %121, align 4, !tbaa !17
  %123 = icmp ult i32 %118, %122
  br i1 %123, label %124, label %146

124:                                              ; preds = %105
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.w2c_hermes, ptr %125, i32 0, i32 7
  %127 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !18
  %129 = load i32, ptr %10, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %128, i64 %130
  %132 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %131, i32 0, i32 1
  %133 = load ptr, ptr %132, align 8, !tbaa !19
  %134 = icmp ne ptr %133, null
  br i1 %134, label %135, label %146

135:                                              ; preds = %124
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.w2c_hermes, ptr %136, i32 0, i32 7
  %138 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !18
  %140 = load i32, ptr %10, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %139, i64 %141
  %143 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  %145 = call zeroext i1 @func_types_eq(ptr noundef @.str.6, ptr noundef %144)
  br label %146

146:                                              ; preds = %135, %124, %105
  %147 = phi i1 [ false, %124 ], [ false, %105 ], [ %145, %135 ]
  %148 = xor i1 %147, true
  %149 = xor i1 %148, true
  %150 = zext i1 %149 to i32
  %151 = sext i32 %150 to i64
  %152 = call i64 @llvm.expect.i64(i64 %151, i64 1)
  %153 = icmp ne i64 %152, 0
  br i1 %153, label %156, label %154

154:                                              ; preds = %146
  call void @wasm_rt_trap(i32 noundef 6) #6
  unreachable

155:                                              ; No predecessors!
  br label %156

156:                                              ; preds = %155, %146
  %157 = phi i1 [ true, %146 ], [ false, %155 ]
  %158 = zext i1 %157 to i32
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.w2c_hermes, ptr %159, i32 0, i32 7
  %161 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !18
  %163 = load i32, ptr %10, align 4, !tbaa !9
  %164 = zext i32 %163 to i64
  %165 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %162, i64 %164
  %166 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %165, i32 0, i32 1
  %167 = load ptr, ptr %166, align 8, !tbaa !19
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.w2c_hermes, ptr %168, i32 0, i32 7
  %170 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !18
  %172 = load i32, ptr %10, align 4, !tbaa !9
  %173 = zext i32 %172 to i64
  %174 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %171, i64 %173
  %175 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %174, i32 0, i32 2
  %176 = load ptr, ptr %175, align 8, !tbaa !22
  %177 = load i32, ptr %7, align 4, !tbaa !9
  %178 = load i32, ptr %8, align 4, !tbaa !9
  %179 = load i32, ptr %9, align 4, !tbaa !9
  %180 = call i32 %167(ptr noundef %176, i32 noundef %177, i32 noundef %178, i32 noundef %179)
  store i32 %180, ptr %7, align 4, !tbaa !9
  store i32 1, ptr %8, align 4, !tbaa !9
  %181 = load i32, ptr %7, align 4, !tbaa !9
  %182 = load i32, ptr %8, align 4, !tbaa !9
  %183 = icmp ne i32 %181, %182
  %184 = zext i1 %183 to i32
  store i32 %184, ptr %7, align 4, !tbaa !9
  %185 = load i32, ptr %7, align 4, !tbaa !9
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %187, label %188

187:                                              ; preds = %156
  br label %196

188:                                              ; preds = %156
  %189 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %189, ptr %7, align 4, !tbaa !9
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.w2c_hermes, ptr %190, i32 0, i32 6
  %192 = load i32, ptr %7, align 4, !tbaa !9
  %193 = zext i32 %192 to i64
  %194 = add i64 %193, 15
  %195 = call i32 @i32_load8_u(ptr noundef %191, i64 noundef %194)
  store i32 %195, ptr %7, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %188, %187, %87, %47
  %197 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %197, ptr %7, align 4, !tbaa !9
  store i32 16, ptr %8, align 4, !tbaa !9
  %198 = load i32, ptr %8, align 4, !tbaa !9
  %199 = load i32, ptr %7, align 4, !tbaa !9
  %200 = add i32 %199, %198
  store i32 %200, ptr %7, align 4, !tbaa !9
  %201 = load i32, ptr %7, align 4, !tbaa !9
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.w2c_hermes, ptr %202, i32 0, i32 3
  store i32 %201, ptr %203, align 8, !tbaa !11
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(none) }
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}
!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}
!17 = !{!12, !10, i64 92}
!18 = !{!12, !6, i64 80}
!19 = !{!20, !6, i64 8}
!20 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!20, !6, i64 0}
!22 = !{!20, !6, i64 16}


; 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"

%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1

; 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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @func_types_eq(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

12:                                               ; preds = %2
  %13 = tail call i32 @w2c_hermes_0x5F_towrite(ptr noundef nonnull %0, i32 noundef %1)
  %.not80 = icmp eq i32 %13, 0
  br i1 %.not80, label %14, label %54

14:                                               ; preds = %12
  %15 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %10)
  br label %16

16:                                               ; preds = %2, %14
  %.0 = phi i32 [ %15, %14 ], [ %11, %2 ]
  %17 = add nuw nsw i64 %9, 20
  %18 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %17)
  %19 = icmp eq i32 %.0, %18
  br i1 %19, label %27, label %20

20:                                               ; preds = %16
  %21 = add nuw nsw i64 %9, 80
  %22 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %21)
  %23 = icmp eq i32 %22, 10
  br i1 %23, label %27, label %24

24:                                               ; preds = %20
  %25 = add i32 %18, 1
  tail call void @i32_store(ptr noundef nonnull %6, i64 noundef %17, i32 noundef %25)
  %26 = zext i32 %18 to i64
  tail call void @i32_store8(ptr noundef nonnull %6, i64 noundef %26, i32 noundef 10)
  br label %54

27:                                               ; preds = %20, %16
  %28 = add i32 %4, -1
  %29 = add nuw nsw i64 %9, 36
  %30 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %29)
  %31 = getelementptr inbounds i8, ptr %0, i64 80
  %32 = getelementptr inbounds i8, ptr %0, i64 92
  %33 = load i32, ptr %32, align 4, !tbaa !15
  %34 = icmp ult i32 %30, %33
  br i1 %34, label %35, label %.critedge, !prof !16

35:                                               ; preds = %27
  %36 = load ptr, ptr %31, align 8, !tbaa !17
  %37 = zext i32 %30 to i64
  %38 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %36, i64 %37
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  %.not81 = icmp eq ptr %40, null
  br i1 %.not81, label %.critedge, label %41, !prof !20

41:                                               ; preds = %35
  %42 = load ptr, ptr %38, align 8, !tbaa !21
  %43 = tail call zeroext i1 @func_types_eq(ptr noundef nonnull @.str.6, ptr noundef %42)
  br i1 %43, label %44, label %.critedge, !prof !16

.critedge:                                        ; preds = %35, %27, %41
  tail call void @wasm_rt_trap(i32 noundef 6) #3
  unreachable

44:                                               ; preds = %41
  %45 = load ptr, ptr %31, align 8, !tbaa !17
  %46 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %45, i64 %37
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = getelementptr inbounds i8, ptr %46, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !22
  %51 = tail call i32 %48(ptr noundef %50, i32 noundef %1, i32 noundef %28, i32 noundef 1) #4
  %.not82 = icmp eq i32 %51, 1
  br i1 %.not82, label %52, label %54

52:                                               ; preds = %44
  %53 = tail call i32 @i32_load8_u(ptr noundef nonnull %6, i64 noundef %8)
  br label %54

54:                                               ; preds = %44, %12, %52, %24
  store i32 %4, ptr %3, 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 = { 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 = { 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 = { noreturn nounwind }
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, !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}
!15 = !{!6, !10, i64 92}
!16 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!17 = !{!6, !7, i64 80}
!18 = !{!19, !7, i64 8}
!19 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!21 = !{!19, !7, i64 0}
!22 = !{!19, !7, i64 16}


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