#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;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ readWriteBytes();
int /*<<< orphan*/ readWriteInts();
int remove(char *);
int main(void) {
  readWriteInts();
  printf("\n\n");
  readWriteBytes();
  if (remove("fileio-binary.temp") == -1) {
    perror("remove");
    return EXIT_FAILURE;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <readWriteInts@plt>
lea    0xe93(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <readWriteBytes@plt>
lea    0xe83(%rip),%rdi
call   1040 <remove@plt>
cmp    $0xffffffff,%eax
jne    11ab <main+0x5b>
lea    0xe81(%rip),%rdi
call   1070 <perror@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11b7 <main+0x67>
mov    0x2e26(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <readWriteInts@plt>
lea    0xebb(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1060 <readWriteBytes@plt>
lea    0xe8e(%rip),%rdi
call   1040 <remove@plt>
cmp    $0xffffffff,%eax
je     1187 <main+0x37>
mov    0x2e55(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
lea    0xe85(%rip),%rdi
call   1070 <perror@plt>
mov    0x2e46(%rip),%rax
jmp    1183 <main+0x33>

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
@.str.1 = [19 x i8] c"fileio-binary.temp\00"
@.str.2 = [7 x i8] c"remove\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @readWriteInts()
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @readWriteBytes()
%5 = call i32 @remove(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
store i32 %9, i32* %1
br label %12
10: ; preds = %0
%11 = load i32, i32* @EXIT_SUCCESS
store i32 %11, i32* %1
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"fileio-binary.temp\00"
@.str.2 = [7 x i8] c"remove\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @readWriteInts()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @readWriteBytes()
%4 = tail call i32 @remove(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %0, %6
%9 = phi i32* [ @EXIT_FAILURE, %6 ], [ @EXIT_SUCCESS, %0 ]
%10 = load i32, i32* %9
ret i32 %10
}