#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ correction(float);
float fabs(scalar_t__);
float LambdaAPPstar(float mag1, float mag2) {
  if (mag1 > mag2)
    return (fabs(mag2 + correction(mag1 + mag2) - correction(mag1 - mag2)));
  else
    return (fabs(mag1 + correction(mag1 + mag2) - correction(mag2 - mag1)));
}


x86 assembly (clang, -O0):
<LambdaAPPstar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    119e <LambdaAPPstar+0x7e>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
call   1030 <correction@plt>
movss  -0x14(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
call   1030 <correction@plt>
movss  -0x10(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
subss  %xmm1,%xmm0
cvttss2si %xmm0,%rdi
call   1040 <fabs@plt>
movss  %xmm0,-0x4(%rbp)
jmp    11f6 <LambdaAPPstar+0xd6>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
call   1030 <correction@plt>
movss  -0x1c(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
call   1030 <correction@plt>
movss  -0x18(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
subss  %xmm1,%xmm0
cvttss2si %xmm0,%rdi
call   1040 <fabs@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LambdaAPPstar>:
push   %rax
movss  %xmm1,(%rsp)
movss  %xmm0,0x4(%rsp)
addss  %xmm1,%xmm0
call   1030 <correction@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %rax,%xmm1
movss  (%rsp),%xmm4
movaps %xmm4,%xmm2
movss  0x4(%rsp),%xmm5
subss  %xmm5,%xmm2
movaps %xmm5,%xmm3
subss  %xmm4,%xmm3
movaps %xmm4,%xmm0
cmpltss %xmm5,%xmm0
andps  %xmm0,%xmm3
andnps %xmm2,%xmm0
orps   %xmm3,%xmm0
minss  %xmm5,%xmm4
addss  %xmm1,%xmm4
movss  %xmm4,(%rsp)
call   1030 <correction@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  (%rsp),%xmm1
subss  %xmm0,%xmm1
cvttss2si %xmm1,%rdi
pop    %rax
jmp    1040 <fabs@plt>

LLVM IR (-O0):
define float @LambdaAPPstar(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp ogt float %6, %7
br i1 %8, label %9, label %25
9: ; preds = %2
%10 = load float, float* %5
%11 = load float, float* %4
%12 = load float, float* %5
%13 = fadd float %11, %12
%14 = call i64 @correction(float %13)
%15 = sitofp i64 %14 to float
%16 = fadd float %10, %15
%17 = load float, float* %4
%18 = load float, float* %5
%19 = fsub float %17, %18
%20 = call i64 @correction(float %19)
%21 = sitofp i64 %20 to float
%22 = fsub float %16, %21
%23 = fptosi float %22 to i64
%24 = call float @fabs(i64 %23)
store float %24, float* %3
br label %41
25: ; preds = %2
%26 = load float, float* %4
%27 = load float, float* %4
%28 = load float, float* %5
%29 = fadd float %27, %28
%30 = call i64 @correction(float %29)
%31 = sitofp i64 %30 to float
%32 = fadd float %26, %31
%33 = load float, float* %5
%34 = load float, float* %4
%35 = fsub float %33, %34
%36 = call i64 @correction(float %35)
%37 = sitofp i64 %36 to float
%38 = fsub float %32, %37
%39 = fptosi float %38 to i64
%40 = call float @fabs(i64 %39)
store float %40, float* %3
br label %41
41: ; preds = %25, %9
%42 = load float, float* %3
ret float %42
}

LLVM IR (-O2):
define float @LambdaAPPstar(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = fadd float %0, %1
%5 = tail call i64 @correction(float %4)
%6 = sitofp i64 %5 to float
%7 = fsub float %1, %0
%8 = fsub float %0, %1
%9 = select i1 %3, float %8, float %7
%10 = select i1 %3, float %1, float %0
%11 = fadd float %10, %6
%12 = tail call i64 @correction(float %9)
%13 = sitofp i64 %12 to float
%14 = fsub float %11, %13
%15 = fptosi float %14 to i64
%16 = tail call float @fabs(i64 %15)
ret float %16
}