#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 */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void check_non_negative(double x, int i) {
  if (x <= 1.0e-100) {
    fprintf(stderr, " value %e is less than or equal to zero ", x);
    fprintf(stderr, " i = %d \n", i);
  } else {
    return;
  }
}


x86 assembly (clang, -O0):
<check_non_negative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  0xed8(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     116a <check_non_negative+0x5a>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
cvttsd2si -0x8(%rbp),%edx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
jmp    116f <check_non_negative+0x5f>
jmp    116f <check_non_negative+0x5f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_non_negative>:
push   %r14
push   %rbx
push   %rax
movsd  0xee4(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    112a <check_non_negative+0x1a>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %edi,%ebx
mov    0x2ead(%rip),%r14
mov    (%r14),%edi
cvttsd2si %xmm0,%edx
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xee1(%rip),%rsi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c" value %e is less than or equal to zero \00"
@.str.1 = [10 x i8] c" i = %d \0A\00"
define void @check_non_negative(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = fcmp ole double %5, 1.000000e-100
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load double, double* %3
%10 = fptosi double %9 to i32
%11 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @stderr
%13 = load i32, i32* %4
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %16
15: ; preds = %2
br label %16
16: ; preds = %15, %7
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c" value %e is less than or equal to zero \00"
@.str.1 = [10 x i8] c" i = %d \0A\00"
define void @check_non_negative(double %0, i32 %1) {
%3 = fcmp ugt double %0, 1.000000e-100
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = fptosi double %0 to i32
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %10
10: ; preds = %2, %4
ret void
}