#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, int *, int *, int *, int *,
                  int *, int *, int *);
int /*<<< orphan*/ system(char *);
int get_presence_data(int *numObj, int *distances, FILE *f) {
  if (fscanf(f, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", numObj, &distances[0],
             &distances[1], &distances[2], &distances[3], &distances[4],
             &distances[5]) == EOF) {
    system("clear");
    return -1;
  }
  system("clear");
  return 0;
}


x86 assembly (clang, -O0):
<get_presence_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x18(%rbp),%r8
add    $0x4,%r8
mov    -0x18(%rbp),%r9
add    $0x8,%r9
mov    -0x18(%rbp),%r11
add    $0xc,%r11
mov    -0x18(%rbp),%r10
add    $0x10,%r10
mov    -0x18(%rbp),%rax
add    $0x14,%rax
lea    0xe91(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <fscanf@plt>
mov    0x2e5f(%rip),%rcx
cmp    (%rcx),%rax
jne    11aa <get_presence_data+0x8a>
lea    0xe7d(%rip),%rdi
call   1030 <system@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11bd <get_presence_data+0x9d>
lea    0xe65(%rip),%rdi
call   1030 <system@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_presence_data>:
push   %rbx
mov    %rsi,%rcx
mov    %rdi,%rax
lea    0x4(%rsi),%r8
lea    0x8(%rsi),%r9
lea    0xc(%rsi),%r10
lea    0x10(%rsi),%r11
lea    0x14(%rsi),%rbx
sub    $0x8,%rsp
lea    0xeba(%rip),%rsi
mov    %rdx,%rdi
mov    %rax,%rdx
push   %rbx
push   %r11
push   %r10
call   1040 <fscanf@plt>
add    $0x20,%rsp
mov    0x2e87(%rip),%rcx
xor    %ebx,%ebx
cmp    (%rcx),%rax
sete   %bl
lea    0xea6(%rip),%rdi
call   1030 <system@plt>
neg    %ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"%d\09%d\09%d\09%d\09%d\09%d\09%d\0A\00"
@EOF = global i64 0
@.str.1 = [6 x i8] c"clear\00"
define i32 @get_presence_data(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
%8 = load i32*, i32** %7
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32*, i32** %6
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32*, i32** %6
%15 = getelementptr inbounds i32, i32* %14, i64 2
%16 = load i32*, i32** %6
%17 = getelementptr inbounds i32, i32* %16, i64 3
%18 = load i32*, i32** %6
%19 = getelementptr inbounds i32, i32* %18, i64 4
%20 = load i32*, i32** %6
%21 = getelementptr inbounds i32, i32* %20, i64 5
%22 = call i64 @fscanf(i32* %8, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32* %9, i32* %11, i32* %13, i32* %15, i32* %17, i32* %19, i32* %21)
%23 = load i64, i64* @EOF
%24 = icmp eq i64 %22, %23
br i1 %24, label %25, label %27
25: ; preds = %3
%26 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %29
27: ; preds = %3
%28 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %4
br label %29
29: ; preds = %27, %25
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
@.str = [22 x i8] c"%d\09%d\09%d\09%d\09%d\09%d\09%d\0A\00"
@EOF = global i64 0
@.str.1 = [6 x i8] c"clear\00"
define i32 @get_presence_data(i32* %0, i32* %1, i32* nocapture %2) {
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = getelementptr inbounds i32, i32* %1, i64 2
%6 = getelementptr inbounds i32, i32* %1, i64 3
%7 = getelementptr inbounds i32, i32* %1, i64 4
%8 = getelementptr inbounds i32, i32* %1, i64 5
%9 = tail call i64 @fscanf(i32* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32* %0, i32* %1, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%10 = load i64, i64* @EOF
%11 = icmp eq i64 %9, %10
%12 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%13 = sext i1 %11 to i32
ret i32 %13
}