#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*/ printf(char *);
int test_double();
int test_single();
int main() {
  int i, j;
  if ((i = test_single()))
    printf("WARNING: Single-precision "
           "floating point math might be broken\n");
  if ((j = test_double()))
    printf("WARNING: Double-precision "
           "floating point math might be broken\n");
  i += j;
  if (i == 0)
    printf("floating point math appears to work\n");
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_single@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     115e <main+0x2e>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <test_double@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     117d <main+0x4d>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    119c <main+0x6c>
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <test_single@plt>
mov    %eax,%ebx
test   %eax,%eax
je     114c <main+0x1c>
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <test_double@plt>
mov    %eax,%ebp
test   %eax,%eax
je     1165 <main+0x35>
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
add    %ebx,%ebp
jne    1175 <main+0x45>
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [63 x i8] c"WARNING: Single-precision floating point math might be broken\0A\00"
@.str.1 = [63 x i8] c"WARNING: Double-precision floating point math might be broken\0A\00"
@.str.2 = [37 x i8] c"floating point math appears to work\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @test_single()
store i32 %4, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = call i32 (...) @test_double()
store i32 %9, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = add nsw i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %13
%20 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %13
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@str = [36 x i8] c"floating point math appears to work\00"
@str.3 = [62 x i8] c"WARNING: Double-precision floating point math might be broken\00"
@str.4 = [62 x i8] c"WARNING: Single-precision floating point math might be broken\00"
define i32 @main() {
%1 = tail call i32 (...) @test_single()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.4, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 (...) @test_double()
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.3, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = add nsw i32 %6, %1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
ret i32 %11
}