#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*/ example();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
scalar_t__ test_suite();
int main() {
  example();
  fprintf(stderr, "running tests\n");
  if (test_suite()) {
    fprintf(stderr, "GRISU3 PARSE TEST FAILED\n");
    return -1;
  } else {
    fprintf(stderr, "GRISU3 PARSE TEST PASSED\n");
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <example@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1030 <test_suite@plt>
cmp    $0x0,%rax
je     118d <main+0x5d>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
lea    0xe93(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11a9 <main+0x79>
mov    0x2e4c(%rip),%rax
mov    (%rax),%edi
lea    0xe8c(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <example@plt>
mov    0x2e9e(%rip),%r14
mov    (%r14),%edi
lea    0xeb4(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1030 <test_suite@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    (%r14),%edi
lea    0xebf(%rip),%rax
lea    0xe9e(%rip),%rsi
cmove  %rax,%rsi
neg    %ebx
call   1050 <fprintf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"running tests\0A\00"
@.str.1 = [26 x i8] c"GRISU3 PARSE TEST FAILED\0A\00"
@.str.2 = [26 x i8] c"GRISU3 PARSE TEST PASSED\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @example()
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = call i64 (...) @test_suite()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %13
10: ; preds = %0
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %13
13: ; preds = %10, %7
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"running tests\0A\00"
@.str.1 = [26 x i8] c"GRISU3 PARSE TEST FAILED\0A\00"
@.str.2 = [26 x i8] c"GRISU3 PARSE TEST PASSED\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @example()
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = tail call i64 (...) @test_suite()
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* @stderr
%7 = select i1 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0)
%8 = xor i1 %5, true
%9 = sext i1 %8 to i32
%10 = tail call i32 @fprintf(i32 %6, i8* %7)
ret i32 %9
}