#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 */
float dcn_bw_floor2(float const, float const);
float dcn_bw_ceil2(const float arg, const float significance) {
  float flr = dcn_bw_floor2(arg, significance);
  if (significance == 0)
    return 0;
  return flr + 0.00001 >= arg ? arg : flr + significance;
}


x86 assembly (clang, -O0):
<dcn_bw_ceil2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <dcn_bw_floor2@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    115a <dcn_bw_ceil2+0x4a>
jp     115a <dcn_bw_ceil2+0x4a>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11aa <dcn_bw_ceil2+0x9a>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe95(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1191 <dcn_bw_ceil2+0x81>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    11a0 <dcn_bw_ceil2+0x90>
movss  -0x10(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcn_bw_ceil2>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
call   1030 <dcn_bw_floor2@plt>
movss  0x4(%rsp),%xmm3
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm3
jne    1131 <dcn_bw_ceil2+0x21>
jnp    1159 <dcn_bw_ceil2+0x49>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
addsd  0xec0(%rip),%xmm1
movss  (%rsp),%xmm4
cvtss2sd %xmm4,%xmm2
ucomisd %xmm2,%xmm1
jae    1156 <dcn_bw_ceil2+0x46>
addss  %xmm3,%xmm0
movaps %xmm0,%xmm4
movaps %xmm4,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @dcn_bw_ceil2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
%7 = load float, float* %4
%8 = load float, float* %5
%9 = call float @dcn_bw_floor2(float %7, float %8)
store float %9, float* %6
%10 = load float, float* %5
%11 = fcmp oeq float %10, 0.000000e+00
br i1 %11, label %12, label %13
12: ; preds = %2
store float 0.000000e+00, float* %3
br label %28
13: ; preds = %2
%14 = load float, float* %6
%15 = fpext float %14 to double
%16 = fadd double %15, 1.000000e-05
%17 = load float, float* %4
%18 = fpext float %17 to double
%19 = fcmp oge double %16, %18
br i1 %19, label %20, label %22
20: ; preds = %13
%21 = load float, float* %4
br label %26
22: ; preds = %13
%23 = load float, float* %6
%24 = load float, float* %5
%25 = fadd float %23, %24
br label %26
26: ; preds = %22, %20
%27 = phi float [ %21, %20 ], [ %25, %22 ]
store float %27, float* %3
br label %28
28: ; preds = %26, %12
%29 = load float, float* %3
ret float %29
}

LLVM IR (-O2):
define float @dcn_bw_ceil2(float %0, float %1) {
%3 = tail call float @dcn_bw_floor2(float %0, float %1)
%4 = fcmp oeq float %1, 0.000000e+00
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = fpext float %3 to double
%7 = fadd double %6, 1.000000e-05
%8 = fpext float %0 to double
%9 = fcmp oge double %7, %8
%10 = fadd float %3, %1
%11 = select i1 %9, float %0, float %10
br label %12
12: ; preds = %2, %5
%13 = phi float [ %11, %5 ], [ 0.000000e+00, %2 ]
ret float %13
}