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

/* Variables and functions */
int EOF;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
uint64_t get64(FILE *file) {
  uint64_t t = 0;
  for (unsigned int i = 0; i < 8; i += 1) {
    int c = getc(file);
    do {
      if (!(c != EOF)) {
        fprintf(
            stderr,
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/hcs64/vorbis_sep/refs/heads/master/ogg.c"
            " %d: "
            "c != EOF"
            " failed\n",
            49);
        exit(EXIT_FAILURE);
      }
    } while (0);
    t *= 0x100;
    t += c;
  }
  return t;
}


x86 assembly (clang, -O0):
<get64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jae    11bf <get64+0x8f>
mov    -0x8(%rbp),%rdi
call   1050 <getc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2e7e(%rip),%rcx
cmp    (%rcx),%eax
jne    119a <get64+0x6a>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
lea    0xe7e(%rip),%rsi
mov    $0x31,%edx
call   1030 <fprintf@plt>
mov    0x2e3d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
jmp    119f <get64+0x6f>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114a <get64+0x1a>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get64>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <getc@plt>
mov    0x2e9e(%rip),%rcx
mov    %eax,0x4(%rsp)
cmp    (%rcx),%eax
je     1243 <get64+0x113>
mov    %rbx,%rdi
call   1050 <getc@plt>
mov    %eax,(%rsp)
mov    0x2e80(%rip),%rcx
cmp    (%rcx),%eax
je     1243 <get64+0x113>
mov    %rbx,%rdi
call   1050 <getc@plt>
mov    %eax,%r12d
mov    0x2e66(%rip),%rax
cmp    (%rax),%r12d
je     1243 <get64+0x113>
mov    %rbx,%rdi
call   1050 <getc@plt>
mov    %eax,%r13d
mov    0x2e4b(%rip),%rax
cmp    (%rax),%r13d
je     1243 <get64+0x113>
mov    %rbx,%rdi
call   1050 <getc@plt>
mov    %eax,%ebp
mov    0x2e31(%rip),%rax
cmp    (%rax),%ebp
je     1243 <get64+0x113>
mov    %rbx,%rdi
call   1050 <getc@plt>
mov    %eax,%r14d
mov    0x2e17(%rip),%rax
cmp    (%rax),%r14d
je     1243 <get64+0x113>
mov    %rbx,%rdi
call   1050 <getc@plt>
mov    %eax,%r15d
mov    0x2e00(%rip),%rax
cmp    (%rax),%r15d
je     1243 <get64+0x113>
mov    %rbx,%rdi
call   1050 <getc@plt>
mov    0x2dec(%rip),%rcx
cmp    (%rcx),%eax
je     1243 <get64+0x113>
mov    0x4(%rsp),%ecx
shl    $0x8,%ecx
mov    (%rsp),%edx
add    %ecx,%edx
shl    $0x8,%edx
add    %edx,%r12d
shl    $0x8,%r12d
add    %r12d,%r13d
shl    $0x8,%r13d
add    %r13d,%ebp
shl    $0x8,%ebp
add    %ebp,%r14d
shl    $0x8,%r14d
add    %r14d,%r15d
shl    $0x8,%r15d
add    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2d8e(%rip),%rax
mov    (%rax),%edi
lea    0xdad(%rip),%rsi
mov    $0x31,%edx
call   1030 <fprintf@plt>
mov    0x2d6c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EOF = global i32 0
@stderr = global i32 0
@.str = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hcs64/vorbis_sep/refs/heads/master/ogg.c %d: c != EOF failed\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @get64(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %28, %1
%7 = load i32, i32* %4
%8 = icmp ult i32 %7, 8
br i1 %8, label %9, label %31
9: ; preds = %6
%10 = load i32*, i32** %2
%11 = call i32 @getc(i32* %10)
store i32 %11, i32* %5
br label %12
12: ; preds = %9
%13 = load i32, i32* %5
%14 = load i32, i32* @EOF
%15 = icmp ne i32 %13, %14
br i1 %15, label %21, label %16
16: ; preds = %12
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0), i32 49)
%19 = load i32, i32* @EXIT_FAILURE
%20 = call i32 @exit(i32 %19)
unreachable
21: ; preds = %12
br label %22
22: ; preds = %21
%23 = load i32, i32* %3
%24 = mul nsw i32 %23, 256
store i32 %24, i32* %3
%25 = load i32, i32* %5
%26 = load i32, i32* %3
%27 = add nsw i32 %26, %25
store i32 %27, i32* %3
br label %28
28: ; preds = %22
%29 = load i32, i32* %4
%30 = add i32 %29, 1
store i32 %30, i32* %4
br label %6
31: ; preds = %6
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
@EOF = global i32 0
@stderr = global i32 0
@.str = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hcs64/vorbis_sep/refs/heads/master/ogg.c %d: c != EOF failed\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @get64(i32* nocapture %0) {
%2 = tail call i32 @getc(i32* %0)
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
br i1 %4, label %5, label %10
5: ; preds = %34, %30, %26, %22, %18, %14, %10, %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0), i32 49)
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
%11 = tail call i32 @getc(i32* %0)
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %5, label %14
14: ; preds = %10
%15 = tail call i32 @getc(i32* %0)
%16 = load i32, i32* @EOF
%17 = icmp eq i32 %15, %16
br i1 %17, label %5, label %18
18: ; preds = %14
%19 = tail call i32 @getc(i32* %0)
%20 = load i32, i32* @EOF
%21 = icmp eq i32 %19, %20
br i1 %21, label %5, label %22
22: ; preds = %18
%23 = tail call i32 @getc(i32* %0)
%24 = load i32, i32* @EOF
%25 = icmp eq i32 %23, %24
br i1 %25, label %5, label %26
26: ; preds = %22
%27 = tail call i32 @getc(i32* %0)
%28 = load i32, i32* @EOF
%29 = icmp eq i32 %27, %28
br i1 %29, label %5, label %30
30: ; preds = %26
%31 = tail call i32 @getc(i32* %0)
%32 = load i32, i32* @EOF
%33 = icmp eq i32 %31, %32
br i1 %33, label %5, label %34
34: ; preds = %30
%35 = tail call i32 @getc(i32* %0)
%36 = load i32, i32* @EOF
%37 = icmp eq i32 %35, %36
br i1 %37, label %5, label %38
38: ; preds = %34
%39 = shl nsw i32 %2, 8
%40 = add nsw i32 %11, %39
%41 = shl nsw i32 %40, 8
%42 = add nsw i32 %15, %41
%43 = shl nsw i32 %42, 8
%44 = add nsw i32 %19, %43
%45 = shl nsw i32 %44, 8
%46 = add nsw i32 %23, %45
%47 = shl nsw i32 %46, 8
%48 = add nsw i32 %27, %47
%49 = shl nsw i32 %48, 8
%50 = add nsw i32 %31, %49
%51 = shl nsw i32 %50, 8
%52 = add nsw i32 %35, %51
ret i32 %52
}