; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_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 }

; 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 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: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) #1

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

; 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

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

declare i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3ABasicBlock0x3A0x3AprintAsOperand0x28llvh0x3A0x3Araw_ostream0x260x2C0x20bool0x290x20const(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  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 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.w2c_hermes, ptr %17, i32 0, i32 3
  %19 = load i32, ptr %18, align 8, !tbaa !11
  store i32 %19, ptr %12, align 4, !tbaa !9
  store i32 16, 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 %9, align 4, !tbaa !9
  %24 = load i32, ptr %12, align 4, !tbaa !9
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.w2c_hermes, ptr %25, i32 0, i32 3
  store i32 %24, ptr %26, align 8, !tbaa !11
  %27 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %27, ptr %12, align 4, !tbaa !9
  %28 = load ptr, ptr %5, 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, 8
  %33 = call i32 @i32_load(ptr noundef %29, i64 noundef %32)
  store i32 %33, ptr %12, align 4, !tbaa !9
  %34 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %34, ptr %13, align 4, !tbaa !9
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.w2c_hermes, ptr %35, i32 0, i32 6
  %37 = load i32, ptr %13, align 4, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = add i64 %38, 12
  %40 = call i32 @i32_load(ptr noundef %36, i64 noundef %39)
  store i32 %40, ptr %13, align 4, !tbaa !9
  %41 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %41, ptr %10, align 4, !tbaa !9
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = sub i32 %43, %42
  store i32 %44, ptr %12, align 4, !tbaa !9
  store i32 2, ptr %13, align 4, !tbaa !9
  %45 = load i32, ptr %12, align 4, !tbaa !9
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = icmp ule i32 %45, %46
  %48 = zext i1 %47 to i32
  store i32 %48, ptr %12, align 4, !tbaa !9
  %49 = load i32, ptr %12, align 4, !tbaa !9
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %59

51:                                               ; preds = %4
  %52 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %52, ptr %12, align 4, !tbaa !9
  store i32 121704, ptr %13, align 4, !tbaa !9
  store i32 3, ptr %14, align 4, !tbaa !9
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load i32, ptr %12, align 4, !tbaa !9
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = load i32, ptr %14, align 4, !tbaa !9
  %57 = call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %53, i32 noundef %54, i32 noundef %55, i32 noundef %56)
  store i32 %57, ptr %12, align 4, !tbaa !9
  %58 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %58, ptr %7, align 4, !tbaa !9
  br label %103

59:                                               ; preds = %4
  %60 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %60, ptr %12, align 4, !tbaa !9
  store i32 121704, ptr %13, align 4, !tbaa !9
  %61 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %61, ptr %11, align 4, !tbaa !9
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.w2c_hermes, ptr %62, i32 0, i32 6
  %64 = load i32, ptr %13, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = call i32 @i32_load16_u(ptr noundef %63, i64 noundef %65)
  store i32 %66, ptr %13, align 4, !tbaa !9
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.w2c_hermes, ptr %67, i32 0, i32 6
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = zext i32 %69 to i64
  %71 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store16(ptr noundef %68, i64 noundef %70, i32 noundef %71)
  %72 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %72, ptr %12, align 4, !tbaa !9
  %73 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %73, ptr %13, align 4, !tbaa !9
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.w2c_hermes, ptr %74, i32 0, i32 6
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = add i64 %77, 2
  %79 = call i32 @i32_load8_u(ptr noundef %75, i64 noundef %78)
  store i32 %79, ptr %13, align 4, !tbaa !9
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.w2c_hermes, ptr %80, i32 0, i32 6
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = add i64 %83, 2
  %85 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %81, i64 noundef %84, i32 noundef %85)
  %86 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %86, ptr %12, align 4, !tbaa !9
  %87 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %87, ptr %13, align 4, !tbaa !9
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.w2c_hermes, ptr %88, i32 0, i32 6
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = zext i32 %90 to i64
  %92 = add i64 %91, 12
  %93 = call i32 @i32_load(ptr noundef %89, i64 noundef %92)
  store i32 %93, ptr %13, align 4, !tbaa !9
  store i32 3, ptr %14, align 4, !tbaa !9
  %94 = load i32, ptr %14, align 4, !tbaa !9
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = add i32 %95, %94
  store i32 %96, ptr %13, align 4, !tbaa !9
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.w2c_hermes, ptr %97, i32 0, i32 6
  %99 = load i32, ptr %12, align 4, !tbaa !9
  %100 = zext i32 %99 to i64
  %101 = add i64 %100, 12
  %102 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %98, i64 noundef %101, i32 noundef %102)
  br label %103

103:                                              ; preds = %59, %51
  %104 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %104, ptr %12, align 4, !tbaa !9
  store i32 4, ptr %13, align 4, !tbaa !9
  %105 = load i32, ptr %13, align 4, !tbaa !9
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = add i32 %106, %105
  store i32 %107, ptr %12, align 4, !tbaa !9
  %108 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %108, ptr %13, align 4, !tbaa !9
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ato_string0x28unsigned0x20long0x29(ptr noundef %109, i32 noundef %110, i32 noundef %111)
  %112 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %112, ptr %12, align 4, !tbaa !9
  %113 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %113, ptr %13, align 4, !tbaa !9
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.w2c_hermes, ptr %114, i32 0, i32 6
  %116 = load i32, ptr %13, align 4, !tbaa !9
  %117 = zext i32 %116 to i64
  %118 = add i64 %117, 4
  %119 = call i32 @i32_load(ptr noundef %115, i64 noundef %118)
  store i32 %119, ptr %13, align 4, !tbaa !9
  %120 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %120, ptr %14, align 4, !tbaa !9
  store i32 4, ptr %15, align 4, !tbaa !9
  %121 = load i32, ptr %15, align 4, !tbaa !9
  %122 = load i32, ptr %14, align 4, !tbaa !9
  %123 = add i32 %122, %121
  store i32 %123, ptr %14, align 4, !tbaa !9
  %124 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %124, ptr %15, align 4, !tbaa !9
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.w2c_hermes, ptr %125, i32 0, i32 6
  %127 = load i32, ptr %15, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = add i64 %128, 15
  %130 = call i32 @i32_load8_u(ptr noundef %126, i64 noundef %129)
  store i32 %130, ptr %15, align 4, !tbaa !9
  %131 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %131, ptr %6, align 4, !tbaa !9
  %132 = load i32, ptr %15, align 4, !tbaa !9
  %133 = trunc i32 %132 to i8
  %134 = sext i8 %133 to i32
  store i32 %134, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !9
  %135 = load i32, ptr %15, align 4, !tbaa !9
  %136 = load i32, ptr %16, align 4, !tbaa !9
  %137 = icmp slt i32 %135, %136
  %138 = zext i1 %137 to i32
  store i32 %138, ptr %15, align 4, !tbaa !9
  %139 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %139, ptr %10, align 4, !tbaa !9
  %140 = load i32, ptr %15, align 4, !tbaa !9
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %144

142:                                              ; preds = %103
  %143 = load i32, ptr %13, align 4, !tbaa !9
  br label %146

144:                                              ; preds = %103
  %145 = load i32, ptr %14, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %144, %142
  %147 = phi i32 [ %143, %142 ], [ %145, %144 ]
  store i32 %147, ptr %13, align 4, !tbaa !9
  %148 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %148, ptr %14, align 4, !tbaa !9
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.w2c_hermes, ptr %149, i32 0, i32 6
  %151 = load i32, ptr %14, align 4, !tbaa !9
  %152 = zext i32 %151 to i64
  %153 = add i64 %152, 8
  %154 = call i32 @i32_load(ptr noundef %150, i64 noundef %153)
  store i32 %154, ptr %14, align 4, !tbaa !9
  %155 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %155, ptr %15, align 4, !tbaa !9
  %156 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %156, ptr %16, align 4, !tbaa !9
  %157 = load i32, ptr %16, align 4, !tbaa !9
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %161

159:                                              ; preds = %146
  %160 = load i32, ptr %14, align 4, !tbaa !9
  br label %163

161:                                              ; preds = %146
  %162 = load i32, ptr %15, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %161, %159
  %164 = phi i32 [ %160, %159 ], [ %162, %161 ]
  store i32 %164, ptr %14, align 4, !tbaa !9
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = load i32, ptr %12, align 4, !tbaa !9
  %167 = load i32, ptr %13, align 4, !tbaa !9
  %168 = load i32, ptr %14, align 4, !tbaa !9
  %169 = call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %165, i32 noundef %166, i32 noundef %167, i32 noundef %168)
  store i32 %169, ptr %12, align 4, !tbaa !9
  %170 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %170, ptr %12, align 4, !tbaa !9
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.w2c_hermes, ptr %171, i32 0, i32 6
  %173 = load i32, ptr %12, align 4, !tbaa !9
  %174 = zext i32 %173 to i64
  %175 = add i64 %174, 15
  %176 = call i32 @i32_load8_s(ptr noundef %172, i64 noundef %175)
  store i32 %176, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %177 = load i32, ptr %12, align 4, !tbaa !9
  %178 = load i32, ptr %13, align 4, !tbaa !9
  %179 = icmp slt i32 %177, %178
  %180 = zext i1 %179 to i32
  store i32 %180, ptr %12, align 4, !tbaa !9
  %181 = load i32, ptr %12, align 4, !tbaa !9
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %193

183:                                              ; preds = %163
  %184 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %184, ptr %12, align 4, !tbaa !9
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.w2c_hermes, ptr %185, i32 0, i32 6
  %187 = load i32, ptr %12, align 4, !tbaa !9
  %188 = zext i32 %187 to i64
  %189 = add i64 %188, 4
  %190 = call i32 @i32_load(ptr noundef %186, i64 noundef %189)
  store i32 %190, ptr %12, align 4, !tbaa !9
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %191, i32 noundef %192)
  br label %193

193:                                              ; preds = %183, %163
  %194 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %194, ptr %12, align 4, !tbaa !9
  store i32 16, ptr %13, align 4, !tbaa !9
  %195 = load i32, ptr %13, align 4, !tbaa !9
  %196 = load i32, ptr %12, align 4, !tbaa !9
  %197 = add i32 %196, %195
  store i32 %197, ptr %12, align 4, !tbaa !9
  %198 = load i32, ptr %12, align 4, !tbaa !9
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.w2c_hermes, ptr %199, i32 0, i32 3
  store i32 %198, ptr %200, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void
}

declare void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ato_string0x28unsigned0x20long0x29(ptr 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, !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}


; 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_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: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #0

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

; 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

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

declare i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

16:                                               ; preds = %4
  %17 = tail call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %2, i32 noundef 121704, i32 noundef 3) #3
  br label %25

18:                                               ; preds = %4
  %19 = tail call i32 @i32_load16_u(ptr noundef nonnull %8, i64 noundef 121704)
  %20 = zext i32 %13 to i64
  tail call void @i32_store16(ptr noundef nonnull %8, i64 noundef %20, i32 noundef %19)
  %21 = tail call i32 @i32_load8_u(ptr noundef nonnull %8, i64 noundef 121706)
  %22 = add nuw nsw i64 %20, 2
  tail call void @i32_store8(ptr noundef nonnull %8, i64 noundef %22, i32 noundef %21)
  %23 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %12)
  %24 = add i32 %23, 3
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %12, i32 noundef %24)
  br label %25

25:                                               ; preds = %18, %16
  %.0 = phi i32 [ %17, %16 ], [ %2, %18 ]
  %26 = add i32 %6, -12
  tail call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ato_string0x28unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %26, i32 noundef %1) #3
  %27 = zext i32 %7 to i64
  %28 = add nuw nsw i64 %27, 4
  %29 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %28)
  %30 = add nuw nsw i64 %27, 15
  %31 = tail call i32 @i32_load8_u(ptr noundef nonnull %8, i64 noundef %30)
  %sext.mask = and i32 %31, 128
  %.not = icmp eq i32 %sext.mask, 0
  %32 = select i1 %.not, i32 %26, i32 %29
  %33 = add nuw nsw i64 %27, 8
  %34 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %33)
  %35 = select i1 %.not, i32 %31, i32 %34
  %36 = tail call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %.0, i32 noundef %32, i32 noundef %35) #3
  %37 = tail call i32 @i32_load8_s(ptr noundef nonnull %8, i64 noundef %30)
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %39, label %41

39:                                               ; preds = %25
  %40 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %28)
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef nonnull %0, i32 noundef %40) #3
  br label %41

41:                                               ; preds = %39, %25
  store i32 %6, ptr %5, align 8, !tbaa !5
  ret void
}

declare void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Ato_string0x28unsigned0x20long0x29(ptr 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,SimplifyCFGPass,TailCallElimPass