; 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_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AOutputColor0x28char0x2C0x20bool0x2C0x20bool0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #5

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

28:                                               ; preds = %5
  br label %154

29:                                               ; preds = %5
  %30 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %30, ptr %13, align 4, !tbaa !9
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.w2c_hermes, ptr %31, i32 0, i32 6
  %33 = load i32, ptr %13, align 4, !tbaa !9
  %34 = zext i32 %33 to i64
  %35 = add i64 %34, 12
  %36 = call i32 @i32_load(ptr noundef %32, i64 noundef %35)
  store i32 %36, ptr %13, align 4, !tbaa !9
  %37 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %37, ptr %12, align 4, !tbaa !9
  %38 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %38, ptr %14, align 4, !tbaa !9
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.w2c_hermes, ptr %39, i32 0, i32 6
  %41 = load i32, ptr %14, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = add i64 %42, 4
  %44 = call i32 @i32_load(ptr noundef %40, i64 noundef %43)
  store i32 %44, ptr %14, align 4, !tbaa !9
  %45 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %45, ptr %11, align 4, !tbaa !9
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = load i32, ptr %14, align 4, !tbaa !9
  %48 = icmp eq i32 %46, %47
  %49 = zext i1 %48 to i32
  store i32 %49, ptr %13, align 4, !tbaa !9
  %50 = load i32, ptr %13, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %29
  br label %154

53:                                               ; preds = %29
  %54 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %54, ptr %13, align 4, !tbaa !9
  %55 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %55, ptr %14, align 4, !tbaa !9
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = load i32, ptr %14, align 4, !tbaa !9
  %58 = icmp uge i32 %56, %57
  %59 = zext i1 %58 to i32
  store i32 %59, ptr %13, align 4, !tbaa !9
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %53
  br label %218

63:                                               ; preds = %53
  %64 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %64, ptr %13, align 4, !tbaa !9
  %65 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %65, ptr %14, align 4, !tbaa !9
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.w2c_hermes, ptr %66, i32 0, i32 6
  %68 = load i32, ptr %13, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = add i64 %69, 12
  %71 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %67, i64 noundef %70, i32 noundef %71)
  %72 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %72, ptr %13, align 4, !tbaa !9
  %73 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %73, ptr %14, align 4, !tbaa !9
  %74 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %74, ptr %15, align 4, !tbaa !9
  %75 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %75, ptr %16, align 4, !tbaa !9
  %76 = load i32, ptr %16, align 4, !tbaa !9
  %77 = load i32, ptr %15, align 4, !tbaa !9
  %78 = sub i32 %77, %76
  store i32 %78, ptr %15, align 4, !tbaa !9
  %79 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %79, ptr %16, align 4, !tbaa !9
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.w2c_hermes, ptr %80, i32 0, i32 6
  %82 = load i32, ptr %16, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = call i32 @i32_load(ptr noundef %81, i64 noundef %83)
  store i32 %84, ptr %16, align 4, !tbaa !9
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.w2c_hermes, ptr %85, i32 0, i32 6
  %87 = load i32, ptr %16, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = add i64 %88, 28
  %90 = call i32 @i32_load(ptr noundef %86, i64 noundef %89)
  store i32 %90, ptr %16, align 4, !tbaa !9
  %91 = load i32, ptr %16, align 4, !tbaa !9
  %92 = load ptr, ptr %6, 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 2
  %95 = load i32, ptr %94, align 4, !tbaa !11
  %96 = icmp ult i32 %91, %95
  br i1 %96, label %97, label %120

97:                                               ; preds = %63
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.w2c_hermes, ptr %98, i32 0, i32 7
  %100 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !17
  %102 = load i32, ptr %16, align 4, !tbaa !9
  %103 = zext i32 %102 to i64
  %104 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %101, i64 %103
  %105 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !18
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %120

108:                                              ; preds = %97
  %109 = load ptr, ptr @w2c_hermes_t1, align 8, !tbaa !5
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.w2c_hermes, ptr %110, i32 0, i32 7
  %112 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !17
  %114 = load i32, ptr %16, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %113, i64 %115
  %117 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !20
  %119 = call zeroext i1 @func_types_eq(ptr noundef %109, ptr noundef %118)
  br label %120

120:                                              ; preds = %108, %97, %63
  %121 = phi i1 [ false, %97 ], [ false, %63 ], [ %119, %108 ]
  %122 = xor i1 %121, true
  %123 = xor i1 %122, true
  %124 = zext i1 %123 to i32
  %125 = sext i32 %124 to i64
  %126 = call i64 @llvm.expect.i64(i64 %125, i64 1)
  %127 = icmp ne i64 %126, 0
  br i1 %127, label %130, label %128

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

129:                                              ; No predecessors!
  br label %130

130:                                              ; preds = %129, %120
  %131 = phi i1 [ true, %120 ], [ false, %129 ]
  %132 = zext i1 %131 to i32
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.w2c_hermes, ptr %133, i32 0, i32 7
  %135 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = load i32, ptr %16, align 4, !tbaa !9
  %138 = zext i32 %137 to i64
  %139 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %139, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !18
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.w2c_hermes, ptr %142, i32 0, i32 7
  %144 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !17
  %146 = load i32, ptr %16, align 4, !tbaa !9
  %147 = zext i32 %146 to i64
  %148 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %145, i64 %147
  %149 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %148, i32 0, i32 2
  %150 = load ptr, ptr %149, align 8, !tbaa !21
  %151 = load i32, ptr %13, align 4, !tbaa !9
  %152 = load i32, ptr %14, align 4, !tbaa !9
  %153 = load i32, ptr %15, align 4, !tbaa !9
  call void %141(ptr noundef %150, i32 noundef %151, i32 noundef %152, i32 noundef %153)
  br label %154

154:                                              ; preds = %130, %52, %28
  %155 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %155, ptr %13, align 4, !tbaa !9
  store i32 8, ptr %14, align 4, !tbaa !9
  %156 = load i32, ptr %13, align 4, !tbaa !9
  %157 = load i32, ptr %14, align 4, !tbaa !9
  %158 = icmp eq i32 %156, %157
  %159 = zext i1 %158 to i32
  store i32 %159, ptr %13, align 4, !tbaa !9
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %167

162:                                              ; preds = %154
  %163 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %163, ptr %13, align 4, !tbaa !9
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = load i32, ptr %13, align 4, !tbaa !9
  %166 = call i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AOutputBold0x28bool0x29(ptr noundef %164, i32 noundef %165)
  store i32 %166, ptr %13, align 4, !tbaa !9
  br label %179

167:                                              ; preds = %154
  %168 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %168, ptr %13, align 4, !tbaa !9
  %169 = load i32, ptr %13, align 4, !tbaa !9
  %170 = trunc i32 %169 to i8
  %171 = sext i8 %170 to i32
  store i32 %171, ptr %13, align 4, !tbaa !9
  %172 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %172, ptr %14, align 4, !tbaa !9
  %173 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %173, ptr %15, align 4, !tbaa !9
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = load i32, ptr %13, align 4, !tbaa !9
  %176 = load i32, ptr %14, align 4, !tbaa !9
  %177 = load i32, ptr %15, align 4, !tbaa !9
  %178 = call i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AOutputColor0x28char0x2C0x20bool0x2C0x20bool0x29(ptr noundef %174, i32 noundef %175, i32 noundef %176, i32 noundef %177)
  store i32 %178, ptr %13, align 4, !tbaa !9
  br label %179

179:                                              ; preds = %167, %162
  %180 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %180, ptr %8, align 4, !tbaa !9
  %181 = load i32, ptr %13, align 4, !tbaa !9
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %216

183:                                              ; preds = %179
  %184 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %184, ptr %13, align 4, !tbaa !9
  %185 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %185, ptr %14, align 4, !tbaa !9
  %186 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %186, ptr %15, align 4, !tbaa !9
  %187 = load ptr, ptr %6, align 8, !tbaa !5
  %188 = load i32, ptr %15, align 4, !tbaa !9
  %189 = call i32 @w2c_hermes_strlen(ptr noundef %187, i32 noundef %188)
  store i32 %189, ptr %15, align 4, !tbaa !9
  %190 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %190, ptr %10, align 4, !tbaa !9
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = load i32, ptr %13, align 4, !tbaa !9
  %193 = load i32, ptr %14, align 4, !tbaa !9
  %194 = load i32, ptr %15, align 4, !tbaa !9
  %195 = call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %191, i32 noundef %192, i32 noundef %193, i32 noundef %194)
  store i32 %195, ptr %13, align 4, !tbaa !9
  %196 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %196, ptr %8, align 4, !tbaa !9
  %197 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %197, ptr %14, align 4, !tbaa !9
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.w2c_hermes, ptr %198, i32 0, i32 6
  %200 = load i32, ptr %14, align 4, !tbaa !9
  %201 = zext i32 %200 to i64
  %202 = add i64 %201, 40
  %203 = call i64 @i64_load(ptr noundef %199, i64 noundef %202)
  store i64 %203, ptr %18, align 8, !tbaa !22
  %204 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %204, ptr %15, align 4, !tbaa !9
  %205 = load i32, ptr %15, align 4, !tbaa !9
  %206 = zext i32 %205 to i64
  store i64 %206, ptr %19, align 8, !tbaa !22
  %207 = load i64, ptr %19, align 8, !tbaa !22
  %208 = load i64, ptr %18, align 8, !tbaa !22
  %209 = sub i64 %208, %207
  store i64 %209, ptr %18, align 8, !tbaa !22
  %210 = load ptr, ptr %6, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.w2c_hermes, ptr %210, i32 0, i32 6
  %212 = load i32, ptr %13, align 4, !tbaa !9
  %213 = zext i32 %212 to i64
  %214 = add i64 %213, 40
  %215 = load i64, ptr %18, align 8, !tbaa !22
  call void @i64_store(ptr noundef %211, i64 noundef %214, i64 noundef %215)
  br label %216

216:                                              ; preds = %183, %179
  %217 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %217, ptr %13, align 4, !tbaa !9
  br label %236

218:                                              ; preds = %62
  store i32 0, ptr %13, align 4, !tbaa !9
  %219 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %219, ptr %7, align 4, !tbaa !9
  store i32 188470, ptr %14, align 4, !tbaa !9
  %220 = load i32, ptr %14, align 4, !tbaa !9
  %221 = load i32, ptr %13, align 4, !tbaa !9
  %222 = add i32 %221, %220
  store i32 %222, ptr %13, align 4, !tbaa !9
  %223 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %223, ptr %14, align 4, !tbaa !9
  store i32 59150, ptr %15, align 4, !tbaa !9
  %224 = load i32, ptr %15, align 4, !tbaa !9
  %225 = load i32, ptr %14, align 4, !tbaa !9
  %226 = add i32 %225, %224
  store i32 %226, ptr %14, align 4, !tbaa !9
  store i32 198, ptr %15, align 4, !tbaa !9
  %227 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %227, ptr %16, align 4, !tbaa !9
  store i32 17252, ptr %17, align 4, !tbaa !9
  %228 = load i32, ptr %17, align 4, !tbaa !9
  %229 = load i32, ptr %16, align 4, !tbaa !9
  %230 = add i32 %229, %228
  store i32 %230, ptr %16, align 4, !tbaa !9
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  %232 = load i32, ptr %13, align 4, !tbaa !9
  %233 = load i32, ptr %14, align 4, !tbaa !9
  %234 = load i32, ptr %15, align 4, !tbaa !9
  %235 = load i32, ptr %16, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %231, i32 noundef %232, i32 noundef %233, i32 noundef %234, i32 noundef %235)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

236:                                              ; preds = %216
  %237 = load i32, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  ret i32 %237
}

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_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AOutputColor0x28char0x2C0x20bool0x2C0x20bool0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AOutputBold0x28bool0x29(ptr noundef, i32 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_ostream0x3A0x3AchangeColor0x28llvh0x3A0x3Araw_ostream0x3A0x3AColors0x2C0x20bool0x2C0x20bool0x29(ptr noundef %0, i32 noundef returned %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #3 {
  %6 = tail call i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AColorNeedsFlush0x280x29(ptr noundef %0)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %43, label %7

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

15:                                               ; preds = %7
  %.not105 = icmp ult i32 %13, %11
  br i1 %.not105, label %16, label %61

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

26:                                               ; preds = %16
  %27 = load ptr, ptr %22, align 8, !tbaa !16
  %28 = zext i32 %21 to i64
  %29 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %27, i64 %28
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %.not106 = icmp eq ptr %31, null
  br i1 %.not106, label %.critedge, label %32, !prof !19

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

.critedge:                                        ; preds = %26, %16, %32
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

36:                                               ; preds = %32
  %37 = load ptr, ptr %22, align 8, !tbaa !16
  %38 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %37, i64 %28
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = getelementptr inbounds i8, ptr %38, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !22
  tail call void %40(ptr noundef %42, i32 noundef %1, i32 noundef %13, i32 noundef %17) #5
  br label %43

43:                                               ; preds = %7, %5, %36
  %44 = icmp eq i32 %2, 8
  br i1 %44, label %45, label %47

45:                                               ; preds = %43
  %46 = tail call i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AOutputBold0x28bool0x29(ptr noundef %0, i32 noundef %4)
  br label %50

47:                                               ; preds = %43
  %sext = shl i32 %2, 24
  %48 = ashr exact i32 %sext, 24
  %49 = tail call i32 @w2c_hermes_llvh0x3A0x3Asys0x3A0x3AProcess0x3A0x3AOutputColor0x28char0x2C0x20bool0x2C0x20bool0x29(ptr noundef %0, i32 noundef %48, i32 noundef %3, i32 noundef %4)
  br label %50

50:                                               ; preds = %47, %45
  %.0 = phi i32 [ %46, %45 ], [ %49, %47 ]
  %.not107 = icmp eq i32 %.0, 0
  br i1 %.not107, label %60, label %51

51:                                               ; preds = %50
  %52 = tail call i32 @w2c_hermes_strlen(ptr noundef %0, i32 noundef %.0) #5
  %53 = tail call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %0, i32 noundef %1, i32 noundef %.0, i32 noundef %52)
  %54 = getelementptr inbounds i8, ptr %0, i64 40
  %55 = zext i32 %53 to i64
  %56 = add nuw nsw i64 %55, 40
  %57 = tail call i64 @i64_load(ptr noundef nonnull %54, i64 noundef %56)
  %58 = zext i32 %52 to i64
  %59 = sub i64 %57, %58
  tail call void @i64_store(ptr noundef nonnull %54, i64 noundef %56, i64 noundef %59)
  br label %60

60:                                               ; preds = %51, %50
  ret i32 %1

61:                                               ; preds = %15
  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