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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.w2c_hermes = type { ptr, ptr, ptr, i32, i32, i32, %struct.wasm_rt_memory_t, %struct.wasm_rt_funcref_table_t }
%struct.wasm_rt_memory_t = type { ptr, i64, i64, i64, i8 }
%struct.wasm_rt_funcref_table_t = type { ptr, i32, i32 }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden 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

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

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

declare i32 @w2c_hermes_hermes0x3A0x3AnumberToString0x28double0x2C0x20char0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, double noundef, i32 noundef) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3AJSONEmitter0x3A0x3AemitValue0x28double0x29(ptr noundef %0, i32 noundef %1, double noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store double %2, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, 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 8, ptr %10) #4
  store double 0.000000e+00, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  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 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.w2c_hermes, ptr %17, i32 0, i32 3
  %19 = load i32, ptr %18, align 8, !tbaa !13
  store i32 %19, ptr %11, align 4, !tbaa !9
  store i32 32, ptr %12, align 4, !tbaa !9
  %20 = load i32, ptr %12, align 4, !tbaa !9
  %21 = load i32, ptr %11, align 4, !tbaa !9
  %22 = sub i32 %21, %20
  store i32 %22, ptr %11, align 4, !tbaa !9
  %23 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %23, ptr %8, align 4, !tbaa !9
  %24 = load i32, ptr %11, align 4, !tbaa !9
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.w2c_hermes, ptr %25, i32 0, i32 3
  store i32 %24, ptr %26, align 8, !tbaa !13
  %27 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %27, ptr %11, align 4, !tbaa !9
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = load i32, ptr %11, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3AJSONEmitter0x3A0x3AwillEmitValue0x280x29(ptr noundef %28, i32 noundef %29)
  %30 = load double, ptr %6, align 8, !tbaa !11
  store double %30, ptr %14, align 8, !tbaa !11
  %31 = load double, ptr %14, align 8, !tbaa !11
  %32 = call double @wasm_fabs(double noundef %31)
  store double %32, ptr %14, align 8, !tbaa !11
  %33 = load double, ptr %14, align 8, !tbaa !11
  store double %33, ptr %10, align 8, !tbaa !11
  store double 0x7FF0000000000000, ptr %15, align 8, !tbaa !11
  %34 = load double, ptr %14, align 8, !tbaa !11
  %35 = load double, ptr %15, align 8, !tbaa !11
  %36 = fcmp ogt double %34, %35
  %37 = zext i1 %36 to i32
  store i32 %37, ptr %11, align 4, !tbaa !9
  %38 = load double, ptr %10, align 8, !tbaa !11
  store double %38, ptr %15, align 8, !tbaa !11
  store double 0x7FF0000000000000, ptr %16, align 8, !tbaa !11
  %39 = load double, ptr %15, align 8, !tbaa !11
  %40 = load double, ptr %16, align 8, !tbaa !11
  %41 = fcmp olt double %39, %40
  %42 = zext i1 %41 to i32
  store i32 %42, ptr %12, align 4, !tbaa !9
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = load i32, ptr %11, align 4, !tbaa !9
  %45 = or i32 %44, %43
  store i32 %45, ptr %11, align 4, !tbaa !9
  %46 = load i32, ptr %11, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %136

48:                                               ; preds = %3
  %49 = load double, ptr %6, align 8, !tbaa !11
  store double %49, ptr %14, align 8, !tbaa !11
  %50 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %50, ptr %12, align 4, !tbaa !9
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = load double, ptr %14, align 8, !tbaa !11
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = call i32 @w2c_hermes_hermes0x3A0x3AnumberToString0x28double0x2C0x20char0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %51, double noundef %52, i32 noundef %53)
  store i32 %54, ptr %11, align 4, !tbaa !9
  %55 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %55, ptr %11, align 4, !tbaa !9
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = call i32 @w2c_hermes_strlen(ptr noundef %56, i32 noundef %57)
  store i32 %58, ptr %11, align 4, !tbaa !9
  %59 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %59, ptr %7, align 4, !tbaa !9
  %60 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %60, ptr %12, align 4, !tbaa !9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.w2c_hermes, ptr %61, i32 0, i32 6
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = add i64 %64, 52
  %66 = call i32 @i32_load(ptr noundef %62, i64 noundef %65)
  store i32 %66, ptr %12, align 4, !tbaa !9
  %67 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %67, ptr %5, align 4, !tbaa !9
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.w2c_hermes, ptr %68, i32 0, i32 6
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = add i64 %71, 8
  %73 = call i32 @i32_load(ptr noundef %69, i64 noundef %72)
  store i32 %73, ptr %12, align 4, !tbaa !9
  %74 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %74, ptr %13, align 4, !tbaa !9
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.w2c_hermes, ptr %75, i32 0, i32 6
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = add i64 %78, 12
  %80 = call i32 @i32_load(ptr noundef %76, i64 noundef %79)
  store i32 %80, ptr %13, align 4, !tbaa !9
  %81 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %81, ptr %9, align 4, !tbaa !9
  %82 = load i32, ptr %13, align 4, !tbaa !9
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = sub i32 %83, %82
  store i32 %84, ptr %12, align 4, !tbaa !9
  %85 = load i32, ptr %11, align 4, !tbaa !9
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = icmp ugt i32 %85, %86
  %88 = zext i1 %87 to i32
  store i32 %88, ptr %11, align 4, !tbaa !9
  %89 = load i32, ptr %11, align 4, !tbaa !9
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %100

91:                                               ; preds = %48
  %92 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %92, ptr %11, align 4, !tbaa !9
  %93 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %93, ptr %12, align 4, !tbaa !9
  %94 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %94, ptr %13, align 4, !tbaa !9
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = load i32, ptr %11, align 4, !tbaa !9
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = load i32, ptr %13, align 4, !tbaa !9
  %99 = call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %95, i32 noundef %96, i32 noundef %97, i32 noundef %98)
  store i32 %99, ptr %11, align 4, !tbaa !9
  br label %199

100:                                              ; preds = %48
  %101 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %101, ptr %11, align 4, !tbaa !9
  %102 = load i32, ptr %11, align 4, !tbaa !9
  %103 = icmp ne i32 %102, 0
  %104 = xor i1 %103, true
  %105 = zext i1 %104 to i32
  store i32 %105, ptr %11, align 4, !tbaa !9
  %106 = load i32, ptr %11, align 4, !tbaa !9
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %109

108:                                              ; preds = %100
  br label %199

109:                                              ; preds = %100
  %110 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %110, ptr %11, align 4, !tbaa !9
  %111 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %111, ptr %12, align 4, !tbaa !9
  %112 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %112, ptr %13, align 4, !tbaa !9
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = load i32, ptr %11, align 4, !tbaa !9
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = load i32, ptr %13, align 4, !tbaa !9
  %117 = call i32 @w2c_hermes_0x5F_memcpy(ptr noundef %113, i32 noundef %114, i32 noundef %115, i32 noundef %116)
  store i32 %117, ptr %11, align 4, !tbaa !9
  %118 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %118, ptr %11, align 4, !tbaa !9
  %119 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %119, ptr %12, align 4, !tbaa !9
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.w2c_hermes, ptr %120, i32 0, i32 6
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = add i64 %123, 12
  %125 = call i32 @i32_load(ptr noundef %121, i64 noundef %124)
  store i32 %125, ptr %12, align 4, !tbaa !9
  %126 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %126, ptr %13, align 4, !tbaa !9
  %127 = load i32, ptr %13, align 4, !tbaa !9
  %128 = load i32, ptr %12, align 4, !tbaa !9
  %129 = add i32 %128, %127
  store i32 %129, ptr %12, align 4, !tbaa !9
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.w2c_hermes, ptr %130, i32 0, i32 6
  %132 = load i32, ptr %11, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  %134 = add i64 %133, 12
  %135 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %131, i64 noundef %134, i32 noundef %135)
  br label %199

136:                                              ; preds = %3
  %137 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %137, ptr %11, align 4, !tbaa !9
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.w2c_hermes, ptr %138, i32 0, i32 6
  %140 = load i32, ptr %11, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = add i64 %141, 52
  %143 = call i32 @i32_load(ptr noundef %139, i64 noundef %142)
  store i32 %143, ptr %11, align 4, !tbaa !9
  %144 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %144, ptr %5, align 4, !tbaa !9
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.w2c_hermes, ptr %145, i32 0, i32 6
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = add i64 %148, 8
  %150 = call i32 @i32_load(ptr noundef %146, i64 noundef %149)
  store i32 %150, ptr %11, align 4, !tbaa !9
  %151 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %151, ptr %12, align 4, !tbaa !9
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.w2c_hermes, ptr %152, i32 0, i32 6
  %154 = load i32, ptr %12, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  %156 = add i64 %155, 12
  %157 = call i32 @i32_load(ptr noundef %153, i64 noundef %156)
  store i32 %157, ptr %12, align 4, !tbaa !9
  %158 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %158, ptr %7, align 4, !tbaa !9
  %159 = load i32, ptr %12, align 4, !tbaa !9
  %160 = load i32, ptr %11, align 4, !tbaa !9
  %161 = sub i32 %160, %159
  store i32 %161, ptr %11, align 4, !tbaa !9
  store i32 3, ptr %12, align 4, !tbaa !9
  %162 = load i32, ptr %11, align 4, !tbaa !9
  %163 = load i32, ptr %12, align 4, !tbaa !9
  %164 = icmp ule i32 %162, %163
  %165 = zext i1 %164 to i32
  store i32 %165, ptr %11, align 4, !tbaa !9
  %166 = load i32, ptr %11, align 4, !tbaa !9
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %175

168:                                              ; preds = %136
  %169 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %169, ptr %11, align 4, !tbaa !9
  store i32 43489, ptr %12, align 4, !tbaa !9
  store i32 4, ptr %13, align 4, !tbaa !9
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = load i32, ptr %11, align 4, !tbaa !9
  %172 = load i32, ptr %12, align 4, !tbaa !9
  %173 = load i32, ptr %13, align 4, !tbaa !9
  %174 = call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %170, i32 noundef %171, i32 noundef %172, i32 noundef %173)
  store i32 %174, ptr %11, align 4, !tbaa !9
  br label %199

175:                                              ; preds = %136
  %176 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %176, ptr %11, align 4, !tbaa !9
  store i32 1819047278, ptr %12, align 4, !tbaa !9
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.w2c_hermes, ptr %177, i32 0, i32 6
  %179 = load i32, ptr %11, align 4, !tbaa !9
  %180 = zext i32 %179 to i64
  %181 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %178, i64 noundef %180, i32 noundef %181)
  %182 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %182, ptr %11, align 4, !tbaa !9
  %183 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %183, ptr %12, align 4, !tbaa !9
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.w2c_hermes, ptr %184, i32 0, i32 6
  %186 = load i32, ptr %12, align 4, !tbaa !9
  %187 = zext i32 %186 to i64
  %188 = add i64 %187, 12
  %189 = call i32 @i32_load(ptr noundef %185, i64 noundef %188)
  store i32 %189, ptr %12, align 4, !tbaa !9
  store i32 4, ptr %13, align 4, !tbaa !9
  %190 = load i32, ptr %13, align 4, !tbaa !9
  %191 = load i32, ptr %12, align 4, !tbaa !9
  %192 = add i32 %191, %190
  store i32 %192, ptr %12, align 4, !tbaa !9
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.w2c_hermes, ptr %193, i32 0, i32 6
  %195 = load i32, ptr %11, align 4, !tbaa !9
  %196 = zext i32 %195 to i64
  %197 = add i64 %196, 12
  %198 = load i32, ptr %12, align 4, !tbaa !9
  call void @i32_store(ptr noundef %194, i64 noundef %197, i32 noundef %198)
  br label %199

199:                                              ; preds = %175, %168, %109, %108, %91
  %200 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %200, ptr %11, align 4, !tbaa !9
  store i32 32, ptr %12, align 4, !tbaa !9
  %201 = load i32, ptr %12, align 4, !tbaa !9
  %202 = load i32, ptr %11, align 4, !tbaa !9
  %203 = add i32 %202, %201
  store i32 %203, ptr %11, align 4, !tbaa !9
  %204 = load i32, ptr %11, align 4, !tbaa !9
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.w2c_hermes, ptr %205, i32 0, i32 3
  store i32 %204, ptr %206, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden double @wasm_fabs(double noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !15, i64 40, !18, i64 80}
!15 = !{!"", !6, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !17, i64 32}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_Bool", !7, i64 0}
!18 = !{!"", !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 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

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

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

declare i32 @w2c_hermes_hermes0x3A0x3AnumberToString0x28double0x2C0x20char0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, double noundef, i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3AJSONEmitter0x3A0x3AemitValue0x28double0x29(ptr noundef %0, i32 noundef %1, double noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = add i32 %5, -32
  store i32 %6, ptr %4, align 8, !tbaa !5
  tail call void @w2c_hermes_hermes0x3A0x3AJSONEmitter0x3A0x3AwillEmitValue0x280x29(ptr noundef %0, i32 noundef %1)
  %7 = tail call double @wasm_fabs(double noundef %2)
  %8 = fcmp ueq double %7, 0x7FF0000000000000
  br i1 %8, label %30, label %9

9:                                                ; preds = %3
  %10 = tail call i32 @w2c_hermes_hermes0x3A0x3AnumberToString0x28double0x2C0x20char0x2A0x2C0x20unsigned0x20long0x29(ptr noundef nonnull %0, double noundef %2, i32 noundef %6) #3
  %11 = tail call i32 @w2c_hermes_strlen(ptr noundef nonnull %0, i32 noundef %6) #3
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  %13 = zext i32 %1 to i64
  %14 = add nuw nsw i64 %13, 52
  %15 = tail call i32 @i32_load(ptr noundef nonnull %12, i64 noundef %14)
  %16 = zext i32 %15 to i64
  %17 = add nuw nsw i64 %16, 8
  %18 = tail call i32 @i32_load(ptr noundef nonnull %12, i64 noundef %17)
  %19 = add nuw nsw i64 %16, 12
  %20 = tail call i32 @i32_load(ptr noundef nonnull %12, i64 noundef %19)
  %21 = sub i32 %18, %20
  %22 = icmp ugt i32 %11, %21
  br i1 %22, label %23, label %25

23:                                               ; preds = %9
  %24 = tail call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %15, i32 noundef %6, i32 noundef %11) #3
  br label %48

25:                                               ; preds = %9
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %48, label %26

26:                                               ; preds = %25
  %27 = tail call i32 @w2c_hermes_0x5F_memcpy(ptr noundef nonnull %0, i32 noundef %20, i32 noundef %6, i32 noundef %11) #3
  %28 = tail call i32 @i32_load(ptr noundef nonnull %12, i64 noundef %19)
  %29 = add i32 %28, %11
  tail call void @i32_store(ptr noundef nonnull %12, i64 noundef %19, i32 noundef %29)
  br label %48

30:                                               ; preds = %3
  %31 = getelementptr inbounds i8, ptr %0, i64 40
  %32 = zext i32 %1 to i64
  %33 = add nuw nsw i64 %32, 52
  %34 = tail call i32 @i32_load(ptr noundef nonnull %31, i64 noundef %33)
  %35 = zext i32 %34 to i64
  %36 = add nuw nsw i64 %35, 8
  %37 = tail call i32 @i32_load(ptr noundef nonnull %31, i64 noundef %36)
  %38 = add nuw nsw i64 %35, 12
  %39 = tail call i32 @i32_load(ptr noundef nonnull %31, i64 noundef %38)
  %40 = sub i32 %37, %39
  %41 = icmp ult i32 %40, 4
  br i1 %41, label %42, label %44

42:                                               ; preds = %30
  %43 = tail call i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %34, i32 noundef 43489, i32 noundef 4) #3
  br label %48

44:                                               ; preds = %30
  %45 = zext i32 %39 to i64
  tail call void @i32_store(ptr noundef nonnull %31, i64 noundef %45, i32 noundef 1819047278)
  %46 = tail call i32 @i32_load(ptr noundef nonnull %31, i64 noundef %38)
  %47 = add i32 %46, 4
  tail call void @i32_store(ptr noundef nonnull %31, i64 noundef %38, i32 noundef %47)
  br label %48

48:                                               ; preds = %25, %44, %42, %26, %23
  store i32 %5, ptr %4, align 8, !tbaa !5
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden double @wasm_fabs(double noundef) local_unnamed_addr #2

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