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

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

@w2c_hermes_t1 = external constant ptr, align 8

; 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

; 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 zeroext i1 @func_types_eq(ptr noundef, ptr noundef) #1

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

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

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

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

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

declare i32 @w2c_hermes_strlen(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AColorNeedsFlush0x280x29(ptr noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AResetColor0x280x29(ptr noundef) #5

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_llvh0x3A0x3Araw_fd_ostream0x3A0x3AresetColor0x280x29(ptr noundef %0, i32 noundef %1) #5 {
  %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
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  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) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = call i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AColorNeedsFlush0x280x29(ptr noundef %14)
  store i32 %15, ptr %7, align 4, !tbaa !9
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = icmp ne i32 %16, 0
  %18 = xor i1 %17, true
  %19 = zext i1 %18 to i32
  store i32 %19, ptr %7, align 4, !tbaa !9
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %2
  br label %148

23:                                               ; preds = %2
  %24 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %24, ptr %7, align 4, !tbaa !9
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.w2c_hermes, ptr %25, i32 0, i32 6
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = add i64 %28, 12
  %30 = call i32 @i32_load(ptr noundef %26, i64 noundef %29)
  store i32 %30, ptr %7, align 4, !tbaa !9
  %31 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %31, ptr %6, align 4, !tbaa !9
  %32 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %32, ptr %8, align 4, !tbaa !9
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.w2c_hermes, ptr %33, i32 0, i32 6
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = zext i32 %35 to i64
  %37 = add i64 %36, 4
  %38 = call i32 @i32_load(ptr noundef %34, i64 noundef %37)
  store i32 %38, ptr %8, align 4, !tbaa !9
  %39 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %39, ptr %5, align 4, !tbaa !9
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = icmp eq i32 %40, %41
  %43 = zext i1 %42 to i32
  store i32 %43, ptr %7, align 4, !tbaa !9
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %23
  br label %148

47:                                               ; preds = %23
  %48 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %48, ptr %7, align 4, !tbaa !9
  %49 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %49, ptr %8, align 4, !tbaa !9
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = icmp uge i32 %50, %51
  %53 = zext i1 %52 to i32
  store i32 %53, ptr %7, align 4, !tbaa !9
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %47
  br label %189

57:                                               ; preds = %47
  %58 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %58, ptr %7, align 4, !tbaa !9
  %59 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %59, ptr %8, align 4, !tbaa !9
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.w2c_hermes, ptr %60, i32 0, i32 6
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = add i64 %63, 12
  %65 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %61, i64 noundef %64, i32 noundef %65)
  %66 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %66, ptr %7, align 4, !tbaa !9
  %67 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %67, ptr %8, align 4, !tbaa !9
  %68 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %68, ptr %9, align 4, !tbaa !9
  %69 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %69, ptr %10, align 4, !tbaa !9
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = sub i32 %71, %70
  store i32 %72, ptr %9, align 4, !tbaa !9
  %73 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %73, ptr %10, 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 %10, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = call i32 @i32_load(ptr noundef %75, i64 noundef %77)
  store i32 %78, ptr %10, align 4, !tbaa !9
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.w2c_hermes, ptr %79, i32 0, i32 6
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  %83 = add i64 %82, 28
  %84 = call i32 @i32_load(ptr noundef %80, i64 noundef %83)
  store i32 %84, ptr %10, align 4, !tbaa !9
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.w2c_hermes, ptr %86, i32 0, i32 7
  %88 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 4, !tbaa !11
  %90 = icmp ult i32 %85, %89
  br i1 %90, label %91, label %114

91:                                               ; preds = %57
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.w2c_hermes, ptr %92, i32 0, i32 7
  %94 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !17
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %95, i64 %97
  %99 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %98, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !18
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %114

102:                                              ; preds = %91
  %103 = load ptr, ptr @w2c_hermes_t1, align 8, !tbaa !5
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.w2c_hermes, ptr %104, i32 0, i32 7
  %106 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !17
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %107, i64 %109
  %111 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !20
  %113 = call zeroext i1 @func_types_eq(ptr noundef %103, ptr noundef %112)
  br label %114

114:                                              ; preds = %102, %91, %57
  %115 = phi i1 [ false, %91 ], [ false, %57 ], [ %113, %102 ]
  %116 = xor i1 %115, true
  %117 = xor i1 %116, true
  %118 = zext i1 %117 to i32
  %119 = sext i32 %118 to i64
  %120 = call i64 @llvm.expect.i64(i64 %119, i64 1)
  %121 = icmp ne i64 %120, 0
  br i1 %121, label %124, label %122

122:                                              ; preds = %114
  call void @wasm_rt_trap(i32 noundef 6) #7
  unreachable

123:                                              ; No predecessors!
  br label %124

124:                                              ; preds = %123, %114
  %125 = phi i1 [ true, %114 ], [ false, %123 ]
  %126 = zext i1 %125 to i32
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.w2c_hermes, ptr %127, i32 0, i32 7
  %129 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !17
  %131 = load i32, ptr %10, align 4, !tbaa !9
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %130, i64 %132
  %134 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %133, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !18
  %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 !17
  %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 2
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  %145 = load i32, ptr %7, align 4, !tbaa !9
  %146 = load i32, ptr %8, align 4, !tbaa !9
  %147 = load i32, ptr %9, align 4, !tbaa !9
  call void %135(ptr noundef %144, i32 noundef %145, i32 noundef %146, i32 noundef %147)
  br label %148

148:                                              ; preds = %124, %46, %22
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = call i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AResetColor0x280x29(ptr noundef %149)
  store i32 %150, ptr %7, align 4, !tbaa !9
  %151 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %151, ptr %5, align 4, !tbaa !9
  %152 = load i32, ptr %7, align 4, !tbaa !9
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %187

154:                                              ; preds = %148
  %155 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %155, ptr %7, align 4, !tbaa !9
  %156 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %156, ptr %8, align 4, !tbaa !9
  %157 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %157, ptr %9, align 4, !tbaa !9
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = load i32, ptr %9, align 4, !tbaa !9
  %160 = call i32 @w2c_hermes_strlen(ptr noundef %158, i32 noundef %159)
  store i32 %160, ptr %9, align 4, !tbaa !9
  %161 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %161, ptr %6, align 4, !tbaa !9
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = load i32, ptr %7, align 4, !tbaa !9
  %164 = load i32, ptr %8, align 4, !tbaa !9
  %165 = load i32, ptr %9, align 4, !tbaa !9
  %166 = call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %162, i32 noundef %163, i32 noundef %164, i32 noundef %165)
  store i32 %166, ptr %7, align 4, !tbaa !9
  %167 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %167, ptr %5, align 4, !tbaa !9
  %168 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %168, ptr %8, align 4, !tbaa !9
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.w2c_hermes, ptr %169, i32 0, i32 6
  %171 = load i32, ptr %8, align 4, !tbaa !9
  %172 = zext i32 %171 to i64
  %173 = add i64 %172, 40
  %174 = call i64 @i64_load(ptr noundef %170, i64 noundef %173)
  store i64 %174, ptr %12, align 8, !tbaa !22
  %175 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %175, ptr %9, align 4, !tbaa !9
  %176 = load i32, ptr %9, align 4, !tbaa !9
  %177 = zext i32 %176 to i64
  store i64 %177, ptr %13, align 8, !tbaa !22
  %178 = load i64, ptr %13, align 8, !tbaa !22
  %179 = load i64, ptr %12, align 8, !tbaa !22
  %180 = sub i64 %179, %178
  store i64 %180, ptr %12, align 8, !tbaa !22
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.w2c_hermes, ptr %181, i32 0, i32 6
  %183 = load i32, ptr %7, align 4, !tbaa !9
  %184 = zext i32 %183 to i64
  %185 = add i64 %184, 40
  %186 = load i64, ptr %12, align 8, !tbaa !22
  call void @i64_store(ptr noundef %182, i64 noundef %185, i64 noundef %186)
  br label %187

187:                                              ; preds = %154, %148
  %188 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %188, ptr %7, align 4, !tbaa !9
  br label %207

189:                                              ; preds = %56
  store i32 0, ptr %7, align 4, !tbaa !9
  %190 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %190, ptr %4, align 4, !tbaa !9
  store i32 188470, ptr %8, align 4, !tbaa !9
  %191 = load i32, ptr %8, align 4, !tbaa !9
  %192 = load i32, ptr %7, align 4, !tbaa !9
  %193 = add i32 %192, %191
  store i32 %193, ptr %7, align 4, !tbaa !9
  %194 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %194, ptr %8, align 4, !tbaa !9
  store i32 59150, ptr %9, align 4, !tbaa !9
  %195 = load i32, ptr %9, align 4, !tbaa !9
  %196 = load i32, ptr %8, align 4, !tbaa !9
  %197 = add i32 %196, %195
  store i32 %197, ptr %8, align 4, !tbaa !9
  store i32 198, ptr %9, align 4, !tbaa !9
  %198 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %198, ptr %10, align 4, !tbaa !9
  store i32 17252, ptr %11, align 4, !tbaa !9
  %199 = load i32, ptr %11, align 4, !tbaa !9
  %200 = load i32, ptr %10, align 4, !tbaa !9
  %201 = add i32 %200, %199
  store i32 %201, ptr %10, align 4, !tbaa !9
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = load i32, ptr %7, align 4, !tbaa !9
  %204 = load i32, ptr %8, align 4, !tbaa !9
  %205 = load i32, ptr %9, align 4, !tbaa !9
  %206 = load i32, ptr %10, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %202, i32 noundef %203, i32 noundef %204, i32 noundef %205, i32 noundef %206)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

207:                                              ; preds = %187
  %208 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret i32 %208
}

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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #3 = { 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 #4 = { "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 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 #6 = { nounwind }
attributes #7 = { 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 92}
!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, !6, i64 80}
!18 = !{!19, !6, i64 8}
!19 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!19, !6, i64 0}
!21 = !{!19, !6, i64 16}
!22 = !{!14, !14, 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"

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

@w2c_hermes_t1 = external local_unnamed_addr constant ptr, align 8

; 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 zeroext i1 @func_types_eq(ptr noundef, ptr 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 i64 @i64_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

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

declare i32 @w2c_hermes_strlen(ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @w2c_hermes_llvh0x3A0x3Araw_fd_ostream0x3A0x3AresetColor0x280x29(ptr noundef %0, i32 noundef returned %1) local_unnamed_addr #3 {
  %3 = tail call i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AColorNeedsFlush0x280x29(ptr noundef %0)
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %40, label %4

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = zext i32 %1 to i64
  %7 = add nuw nsw i64 %6, 12
  %8 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %7)
  %9 = add nuw nsw i64 %6, 4
  %10 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %9)
  %11 = icmp eq i32 %8, %10
  br i1 %11, label %40, label %12

12:                                               ; preds = %4
  %.not90 = icmp ult i32 %10, %8
  br i1 %.not90, label %13, label %52

13:                                               ; preds = %12
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %7, i32 noundef %10)
  %14 = sub i32 %8, %10
  %15 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %16 = zext i32 %15 to i64
  %17 = add nuw nsw i64 %16, 28
  %18 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %17)
  %19 = getelementptr inbounds i8, ptr %0, i64 80
  %20 = getelementptr inbounds i8, ptr %0, i64 92
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = icmp ult i32 %18, %21
  br i1 %22, label %23, label %.critedge, !prof !15

23:                                               ; preds = %13
  %24 = load ptr, ptr %19, align 8, !tbaa !16
  %25 = zext i32 %18 to i64
  %26 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %24, i64 %25
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !17
  %.not91 = icmp eq ptr %28, null
  br i1 %.not91, label %.critedge, label %29, !prof !19

29:                                               ; preds = %23
  %30 = load ptr, ptr @w2c_hermes_t1, align 8, !tbaa !20
  %31 = load ptr, ptr %26, align 8, !tbaa !21
  %32 = tail call zeroext i1 @func_types_eq(ptr noundef %30, ptr noundef %31)
  br i1 %32, label %33, label %.critedge, !prof !15

.critedge:                                        ; preds = %23, %13, %29
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

33:                                               ; preds = %29
  %34 = load ptr, ptr %19, align 8, !tbaa !16
  %35 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %34, i64 %25
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !17
  %38 = getelementptr inbounds i8, ptr %35, i64 16
  %39 = load ptr, ptr %38, align 8, !tbaa !22
  tail call void %37(ptr noundef %39, i32 noundef %1, i32 noundef %10, i32 noundef %14) #5
  br label %40

40:                                               ; preds = %4, %2, %33
  %41 = tail call i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AResetColor0x280x29(ptr noundef %0)
  %.not92 = icmp eq i32 %41, 0
  br i1 %.not92, label %51, label %42

42:                                               ; preds = %40
  %43 = tail call i32 @w2c_hermes_strlen(ptr noundef %0, i32 noundef %41) #5
  %44 = tail call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %0, i32 noundef %1, i32 noundef %41, i32 noundef %43)
  %45 = getelementptr inbounds i8, ptr %0, i64 40
  %46 = zext i32 %44 to i64
  %47 = add nuw nsw i64 %46, 40
  %48 = tail call i64 @i64_load(ptr noundef nonnull %45, i64 noundef %47)
  %49 = zext i32 %43 to i64
  %50 = sub i64 %48, %49
  tail call void @i64_store(ptr noundef nonnull %45, i64 noundef %47, i64 noundef %50)
  br label %51

51:                                               ; preds = %42, %40
  ret i32 %1

52:                                               ; preds = %12
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 188470, i32 noundef 59150, i32 noundef 198, i32 noundef 17252) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable
}

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 = { "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 = { noreturn nounwind }
attributes #5 = { 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 92}
!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 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!16 = !{!6, !7, i64 80}
!17 = !{!18, !7, i64 8}
!18 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!20 = !{!7, !7, i64 0}
!21 = !{!18, !7, i64 0}
!22 = !{!18, !7, i64 16}


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