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

; 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: 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 void @i64_store(ptr noundef, i64 noundef, i64 noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare hidden double @wasm_trunc(double noundef) #4

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

49:                                               ; preds = %4
  %50 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %50, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.w2c_hermes, ptr %51, i32 0, i32 6
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  %55 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %52, i64 noundef %54, i32 noundef %55)
  br label %173

56:                                               ; preds = %4
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  %57 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %57, ptr %13, align 4, !tbaa !9
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.w2c_hermes, ptr %58, i32 0, i32 6
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = add i64 %61, 8
  %63 = call double @f64_load(ptr noundef %59, i64 noundef %62)
  store double %63, ptr %17, align 8, !tbaa !11
  %64 = load double, ptr %17, align 8, !tbaa !11
  store double %64, ptr %11, align 8, !tbaa !11
  %65 = load double, ptr %17, align 8, !tbaa !11
  %66 = call double @wasm_trunc(double noundef %65)
  store double %66, ptr %17, align 8, !tbaa !11
  %67 = load double, ptr %11, align 8, !tbaa !11
  store double %67, ptr %18, align 8, !tbaa !11
  %68 = load double, ptr %11, align 8, !tbaa !11
  store double %68, ptr %19, align 8, !tbaa !11
  %69 = load double, ptr %18, align 8, !tbaa !11
  %70 = load double, ptr %19, align 8, !tbaa !11
  %71 = fcmp une double %69, %70
  %72 = zext i1 %71 to i32
  store i32 %72, ptr %14, align 4, !tbaa !9
  %73 = load i32, ptr %14, align 4, !tbaa !9
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %77

75:                                               ; preds = %56
  %76 = load double, ptr %16, align 8, !tbaa !11
  br label %79

77:                                               ; preds = %56
  %78 = load double, ptr %17, align 8, !tbaa !11
  br label %79

79:                                               ; preds = %77, %75
  %80 = phi double [ %76, %75 ], [ %78, %77 ]
  store double %80, ptr %16, align 8, !tbaa !11
  %81 = load double, ptr %16, align 8, !tbaa !11
  store double %81, ptr %11, align 8, !tbaa !11
  store double 0.000000e+00, ptr %17, align 8, !tbaa !11
  %82 = load double, ptr %16, align 8, !tbaa !11
  %83 = load double, ptr %17, align 8, !tbaa !11
  %84 = fcmp ole double %82, %83
  %85 = zext i1 %84 to i32
  store i32 %85, ptr %12, align 4, !tbaa !9
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %89

88:                                               ; preds = %79
  br label %105

89:                                               ; preds = %79
  %90 = load double, ptr %11, align 8, !tbaa !11
  store double %90, ptr %16, align 8, !tbaa !11
  %91 = load double, ptr %16, align 8, !tbaa !11
  store double %91, ptr %10, align 8, !tbaa !11
  store double 0x433FFFFFFFFFFFFF, ptr %17, align 8, !tbaa !11
  %92 = load double, ptr %16, align 8, !tbaa !11
  %93 = load double, ptr %17, align 8, !tbaa !11
  %94 = fcmp ogt double %92, %93
  %95 = zext i1 %94 to i32
  store i32 %95, ptr %12, align 4, !tbaa !9
  %96 = load i32, ptr %12, align 4, !tbaa !9
  %97 = icmp ne i32 %96, 0
  %98 = xor i1 %97, true
  %99 = zext i1 %98 to i32
  store i32 %99, ptr %12, align 4, !tbaa !9
  %100 = load i32, ptr %12, align 4, !tbaa !9
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %103

102:                                              ; preds = %89
  br label %105

103:                                              ; preds = %89
  store double 0x433FFFFFFFFFFFFF, ptr %16, align 8, !tbaa !11
  %104 = load double, ptr %16, align 8, !tbaa !11
  store double %104, ptr %10, align 8, !tbaa !11
  br label %105

105:                                              ; preds = %103, %102, %88
  %106 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %106, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.w2c_hermes, ptr %107, i32 0, i32 6
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %108, i64 noundef %110, i32 noundef %111)
  %112 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %112, ptr %12, align 4, !tbaa !9
  %113 = load double, ptr %10, align 8, !tbaa !11
  store double %113, ptr %17, align 8, !tbaa !11
  store double 0x43F0000000000000, ptr %18, align 8, !tbaa !11
  %114 = load double, ptr %17, align 8, !tbaa !11
  %115 = load double, ptr %18, align 8, !tbaa !11
  %116 = fcmp olt double %114, %115
  %117 = zext i1 %116 to i32
  store i32 %117, ptr %13, align 4, !tbaa !9
  %118 = load double, ptr %10, align 8, !tbaa !11
  store double %118, ptr %18, align 8, !tbaa !11
  store double 0.000000e+00, ptr %19, align 8, !tbaa !11
  %119 = load double, ptr %18, align 8, !tbaa !11
  %120 = load double, ptr %19, align 8, !tbaa !11
  %121 = fcmp oge double %119, %120
  %122 = zext i1 %121 to i32
  store i32 %122, ptr %14, align 4, !tbaa !9
  %123 = load i32, ptr %14, align 4, !tbaa !9
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = and i32 %124, %123
  store i32 %125, ptr %13, align 4, !tbaa !9
  %126 = load i32, ptr %13, align 4, !tbaa !9
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %165

128:                                              ; preds = %105
  %129 = load double, ptr %10, align 8, !tbaa !11
  store double %129, ptr %17, align 8, !tbaa !11
  %130 = load double, ptr %17, align 8, !tbaa !11
  %131 = load double, ptr %17, align 8, !tbaa !11
  %132 = fcmp une double %130, %131
  %133 = xor i1 %132, true
  %134 = xor i1 %133, true
  %135 = zext i1 %134 to i32
  %136 = sext i32 %135 to i64
  %137 = call i64 @llvm.expect.i64(i64 %136, i64 0)
  %138 = icmp ne i64 %137, 0
  br i1 %138, label %139, label %141

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

140:                                              ; No predecessors!
  br label %163

141:                                              ; preds = %128
  %142 = load double, ptr %17, align 8, !tbaa !11
  %143 = fcmp ogt double %142, -1.000000e+00
  br i1 %143, label %144, label %147

144:                                              ; preds = %141
  %145 = load double, ptr %17, align 8, !tbaa !11
  %146 = fcmp olt double %145, 0x43F0000000000000
  br label %147

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

156:                                              ; preds = %147
  call void @wasm_rt_trap(i32 noundef 2) #6
  unreachable

157:                                              ; No predecessors!
  br label %161

158:                                              ; preds = %147
  %159 = load double, ptr %17, align 8, !tbaa !11
  %160 = fptoui double %159 to i64
  br label %161

161:                                              ; preds = %158, %157
  %162 = phi i64 [ 0, %157 ], [ %160, %158 ]
  br label %163

163:                                              ; preds = %161, %140
  %164 = phi i64 [ 0, %140 ], [ %162, %161 ]
  store i64 %164, ptr %15, align 8, !tbaa !19
  br label %166

165:                                              ; preds = %105
  store i64 0, ptr %15, align 8, !tbaa !19
  br label %166

166:                                              ; preds = %165, %163
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.w2c_hermes, ptr %167, i32 0, i32 6
  %169 = load i32, ptr %12, align 4, !tbaa !9
  %170 = zext i32 %169 to i64
  %171 = add i64 %170, 8
  %172 = load i64, ptr %15, align 8, !tbaa !19
  call void @i64_store(ptr noundef %168, i64 noundef %171, i64 noundef %172)
  br label %173

173:                                              ; preds = %166, %49
  %174 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %174, ptr %12, align 4, !tbaa !9
  store i32 16, ptr %13, align 4, !tbaa !9
  %175 = load i32, ptr %13, align 4, !tbaa !9
  %176 = load i32, ptr %12, align 4, !tbaa !9
  %177 = add i32 %176, %175
  store i32 %177, ptr %12, align 4, !tbaa !9
  %178 = load i32, ptr %12, align 4, !tbaa !9
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.w2c_hermes, ptr %179, i32 0, i32 3
  store i32 %178, ptr %180, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !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}
!19 = !{!16, !16, 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"

; 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: noreturn
declare void @wasm_rt_trap(i32 noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AtoLengthU640x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(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
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AtoNumber_RJS0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x29(ptr noundef %0, i32 noundef %7, i32 noundef %2, i32 noundef %3)
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = zext i32 %7 to i64
  %10 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %9)
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %11, label %13

11:                                               ; preds = %4
  %12 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %12, i32 noundef 0)
  br label %38

13:                                               ; preds = %4
  %14 = add nuw nsw i64 %9, 8
  %15 = tail call double @f64_load(ptr noundef nonnull %8, i64 noundef %14)
  %16 = tail call double @wasm_trunc(double noundef %15)
  %17 = fcmp uno double %15, 0.000000e+00
  %18 = select i1 %17, double 0.000000e+00, double %16
  %19 = fcmp ugt double %18, 0.000000e+00
  br i1 %19, label %20, label %23

20:                                               ; preds = %13
  %21 = fcmp ule double %18, 0x433FFFFFFFFFFFFF
  br i1 %21, label %23, label %22

22:                                               ; preds = %20
  br label %23

23:                                               ; preds = %20, %13, %22
  %.072 = phi double [ 0.000000e+00, %13 ], [ %18, %20 ], [ 0x433FFFFFFFFFFFFF, %22 ]
  %24 = zext i32 %1 to i64
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %24, i32 noundef 1)
  %25 = fcmp olt double %.072, 0x43F0000000000000
  %26 = fcmp oge double %.072, 0.000000e+00
  %27 = and i1 %25, %26
  br i1 %27, label %28, label %36

28:                                               ; preds = %23
  %29 = fcmp uno double %.072, 0.000000e+00
  br i1 %29, label %30, label %31, !prof !15

30:                                               ; preds = %28
  tail call void @wasm_rt_trap(i32 noundef 4) #3
  unreachable

31:                                               ; preds = %28
  %32 = fcmp ogt double %.072, -1.000000e+00
  br i1 %32, label %34, label %33, !prof !16

33:                                               ; preds = %31
  tail call void @wasm_rt_trap(i32 noundef 2) #3
  unreachable

34:                                               ; preds = %31
  %35 = fptoui double %.072 to i64
  br label %36

36:                                               ; preds = %23, %34
  %.0 = phi i64 [ %35, %34 ], [ 0, %23 ]
  %37 = add nuw nsw i64 %24, 8
  tail call void @i64_store(ptr noundef nonnull %8, i64 noundef %37, i64 noundef %.0)
  br label %38

38:                                               ; preds = %36, %11
  store i32 %6, ptr %5, align 8, !tbaa !5
  ret void
}

attributes #0 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind }

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

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


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