#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*/ connected();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ test_regular_file_conflict();
int main(void) {
  int result = 0;
  while (!connected()) {
    printf("Waiting for tsumufs to mount.\n");
    sleep(1);
  }
  printf("Mounted.\n");
  sleep(1);
  if (!test_regular_file_conflict())
    result = 1;
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <connected@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1172 <main+0x32>
jmp    118d <main+0x4d>
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
jmp    1156 <main+0x16>
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    $0x0,%al
call   1050 <test_regular_file_conflict@plt>
cmp    $0x0,%eax
jne    11ba <main+0x7a>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <connected@plt>
test   %eax,%eax
jne    117d <main+0x3d>
lea    0xeb6(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
call   1040 <connected@plt>
test   %eax,%eax
je     1160 <main+0x20>
lea    0xe7c(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
call   1050 <test_regular_file_conflict@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Waiting for tsumufs to mount.\0A\00"
@.str.1 = [10 x i8] c"Mounted.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %7, %0
%4 = call i32 (...) @connected()
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @sleep(i32 1)
br label %3
10: ; preds = %3
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @sleep(i32 1)
%13 = call i32 (...) @test_regular_file_conflict()
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %10
store i32 1, i32* %2
br label %16
16: ; preds = %15, %10
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@str = [9 x i8] c"Mounted.\00"
@str.2 = [30 x i8] c"Waiting for tsumufs to mount.\00"
define i32 @main() {
%1 = tail call i32 (...) @connected()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0, %3
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
%6 = tail call i32 (...) @connected()
%7 = icmp eq i32 %6, 0
br i1 %7, label %3, label %8
8: ; preds = %3, %0
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @sleep(i32 1)
%11 = tail call i32 (...) @test_regular_file_conflict()
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}