#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, ...);
int testIsSQL();
int main() {
  const int mintps = 500000;
  int tps = testIsSQL();
  printf("\nTPS : %d\n\n", tps);
  if (tps < 500000) {
    printf("FAIL: %d < %d\n", tps, mintps);
    return 1;
  } else {
    printf("OK: %d > %d\n", tps, mintps);
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7a120,-0x8(%rbp)
mov    $0x0,%al
call   1040 <testIsSQL@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x7a120,-0xc(%rbp)
jge    1180 <main+0x60>
mov    -0xc(%rbp),%esi
lea    0xea4(%rip),%rdi
mov    $0x7a120,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    119d <main+0x7d>
mov    -0xc(%rbp),%esi
lea    0xe91(%rip),%rdi
mov    $0x7a120,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <testIsSQL@plt>
mov    %eax,%ebx
lea    0xecd(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %ebp,%ebp
cmp    $0x7a120,%ebx
setl   %bpl
lea    0xebd(%rip),%rax
lea    0xec5(%rip),%rdi
cmovl  %rax,%rdi
mov    %ebx,%esi
mov    $0x7a120,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"\0ATPS : %d\0A\0A\00"
@.str.1 = [15 x i8] c"FAIL: %d < %d\0A\00"
@.str.2 = [13 x i8] c"OK: %d > %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 500000, i32* %2
%4 = call i32 (...) @testIsSQL()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 500000
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %3
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 500000)
store i32 1, i32* %1
br label %15
12: ; preds = %0
%13 = load i32, i32* %3
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %13, i32 500000)
store i32 0, i32* %1
br label %15
15: ; preds = %12, %9
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [12 x i8] c"\0ATPS : %d\0A\0A\00"
@.str.1 = [15 x i8] c"FAIL: %d < %d\0A\00"
@.str.2 = [13 x i8] c"OK: %d > %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @testIsSQL()
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp slt i32 %1, 500000
%4 = select i1 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0)
%5 = zext i1 %3 to i32
%6 = tail call i32 (i8*, i32, ...) @printf(i8* %4, i32 %1, i32 500000)
ret i32 %5
}