; LLVM IR from lichen-community-systems/signaletic :: libsignaletic/src (libsignaletic)

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

; 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
define dso_local float @sig_flooredfmodf(float noundef %0, float noundef %1) #1 {
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  store float %0, ptr %3, align 4, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %6 = load float, ptr %3, align 4, !tbaa !5
  %7 = load float, ptr %4, align 4, !tbaa !5
  %8 = call float @fmodf(float noundef %6, float noundef %7) #3
  store float %8, ptr %5, align 4, !tbaa !5
  %9 = load float, ptr %5, align 4, !tbaa !5
  %10 = fcmp ogt float %9, 0.000000e+00
  br i1 %10, label %11, label %14

11:                                               ; preds = %2
  %12 = load float, ptr %4, align 4, !tbaa !5
  %13 = fcmp olt float %12, 0.000000e+00
  br i1 %13, label %20, label %14

14:                                               ; preds = %11, %2
  %15 = load float, ptr %5, align 4, !tbaa !5
  %16 = fcmp olt float %15, 0.000000e+00
  br i1 %16, label %17, label %24

17:                                               ; preds = %14
  %18 = load float, ptr %4, align 4, !tbaa !5
  %19 = fcmp ogt float %18, 0.000000e+00
  br i1 %19, label %20, label %24

20:                                               ; preds = %17, %11
  %21 = load float, ptr %5, align 4, !tbaa !5
  %22 = load float, ptr %4, align 4, !tbaa !5
  %23 = fadd float %21, %22
  store float %23, ptr %5, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %20, %17, %14
  %25 = load float, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret float %25
}

; Function Attrs: nounwind
declare float @fmodf(float noundef, float 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 = { nounwind "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, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


; 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 mustprogress nofree nounwind willreturn memory(write) uwtable
define dso_local float @sig_flooredfmodf(float noundef %0, float noundef %1) local_unnamed_addr #0 {
  %3 = tail call float @fmodf(float noundef %0, float noundef %1) #2
  %4 = fcmp ogt float %3, 0.000000e+00
  %5 = fcmp olt float %1, 0.000000e+00
  %or.cond = and i1 %5, %4
  br i1 %or.cond, label %9, label %6

6:                                                ; preds = %2
  %7 = fcmp olt float %3, 0.000000e+00
  %8 = fcmp ogt float %1, 0.000000e+00
  %or.cond3 = and i1 %8, %7
  br i1 %or.cond3, label %9, label %11

9:                                                ; preds = %6, %2
  %10 = fadd float %3, %1
  br label %11

11:                                               ; preds = %9, %6
  %.0 = phi float [ %10, %9 ], [ %3, %6 ]
  ret float %.0
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @fmodf(float noundef, float noundef) local_unnamed_addr #1

attributes #0 = { inlinehint mustprogress nofree nounwind willreturn memory(write) 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 = { mustprogress nofree nounwind willreturn memory(write) "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 }

!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)"}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass