#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 EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ load_and_test();
int main(int argc, char **argv) {
  int count = 5;
  while (count-- > 0)
    if (load_and_test())
      return EXIT_FAILURE;
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
jle    1168 <main+0x58>
mov    $0x0,%al
call   1030 <load_and_test@plt>
cmp    $0x0,%rax
je     1163 <main+0x53>
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <main+0x64>
jmp    112d <main+0x1d>
mov    0x2e69(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <load_and_test@plt>
mov    0x2ec1(%rip),%rbx
test   %rax,%rax
jne    1164 <main+0x54>
xor    %eax,%eax
call   1030 <load_and_test@plt>
test   %rax,%rax
jne    1164 <main+0x54>
xor    %eax,%eax
call   1030 <load_and_test@plt>
test   %rax,%rax
jne    1164 <main+0x54>
xor    %eax,%eax
call   1030 <load_and_test@plt>
test   %rax,%rax
jne    1164 <main+0x54>
xor    %eax,%eax
call   1030 <load_and_test@plt>
test   %rax,%rax
jne    115d <main+0x4d>
mov    0x2e7d(%rip),%rbx
jmp    1164 <main+0x54>
mov    0x2e7c(%rip),%rbx
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 5, i32* %6
br label %7
7: ; preds = %16, %2
%8 = load i32, i32* %6
%9 = add nsw i32 %8, -1
store i32 %9, i32* %6
%10 = icmp sgt i32 %8, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = call i64 (...) @load_and_test()
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = load i32, i32* @EXIT_FAILURE
store i32 %15, i32* %3
br label %19
16: ; preds = %11
br label %7
17: ; preds = %7
%18 = load i32, i32* @EXIT_SUCCESS
store i32 %18, i32* %3
br label %19
19: ; preds = %17, %14
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @load_and_test()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %18
5: ; preds = %2
%6 = tail call i64 (...) @load_and_test()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = tail call i64 (...) @load_and_test()
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = tail call i64 (...) @load_and_test()
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = tail call i64 (...) @load_and_test()
%16 = icmp eq i64 %15, 0
%17 = select i1 %16, i32* @EXIT_SUCCESS, i32* @EXIT_FAILURE
br label %18
18: ; preds = %14, %11, %8, %5, %2
%19 = phi i32* [ @EXIT_FAILURE, %2 ], [ @EXIT_FAILURE, %5 ], [ @EXIT_FAILURE, %8 ], [ @EXIT_FAILURE, %11 ], [ %17, %14 ]
%20 = load i32, i32* %19
ret i32 %20
}