#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 */
unsigned long long atoll(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ prim(unsigned long long);
int /*<<< orphan*/ printf(char *);
void leseLongLong() {
  FILE *Data;
  unsigned long long zahl;
  char zeile[80];
  Data = fopen("primData3.txt", "r");
  if (Data == NULL) {
    printf("Datei kann nicht gefunden werden!");
  } else {
    while (feof(Data) == 0) {
      fgets(zeile, 80, Data);
      zahl = atoll(zeile);
      prim(zahl);
    }
  }
  fclose(Data);
}


x86 assembly (clang, -O0):
<leseLongLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0xe81(%rip),%rdi
lea    0xe88(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    11ab <leseLongLong+0x3b>
lea    0xe6f(%rip),%rdi
call   1050 <printf@plt>
jmp    11f5 <leseLongLong+0x85>
jmp    11b0 <leseLongLong+0x40>
mov    -0x8(%rbp),%rdi
call   1080 <feof@plt>
cmp    $0x0,%rax
jne    11f0 <leseLongLong+0x80>
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x50,%esi
call   1060 <fgets@plt>
lea    -0x60(%rbp),%rdi
call   1070 <atoll@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <prim@plt>
jmp    11b0 <leseLongLong+0x40>
jmp    11f5 <leseLongLong+0x85>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leseLongLong>:
push   %r14
push   %rbx
sub    $0x58,%rsp
lea    0xe82(%rip),%rdi
lea    0xe89(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     11df <leseLongLong+0x6f>
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    11eb <leseLongLong+0x7b>
mov    %rsp,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    $0x50,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
mov    %r14,%rdi
call   1070 <atoll@plt>
mov    %rax,%rdi
call   1030 <prim@plt>
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
je     11b0 <leseLongLong+0x40>
jmp    11eb <leseLongLong+0x7b>
lea    0xe2a(%rip),%rdi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"primData3.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [34 x i8] c"Datei kann nicht gefunden werden!\00"
define void @leseLongLong() {
%1 = alloca i32*
%2 = alloca i64
%3 = alloca [80 x i8]
%4 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %1
%5 = load i32*, i32** %1
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
br label %23
9: ; preds = %0
br label %10
10: ; preds = %14, %9
%11 = load i32*, i32** %1
%12 = call i64 @feof(i32* %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%16 = load i32*, i32** %1
%17 = call i32 @fgets(i8* %15, i32 80, i32* %16)
%18 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%19 = call i64 @atoll(i8* %18)
store i64 %19, i64* %2
%20 = load i64, i64* %2
%21 = call i32 @prim(i64 %20)
br label %10
22: ; preds = %10
br label %23
23: ; preds = %22, %7
%24 = load i32*, i32** %1
%25 = call i32 @fclose(i32* %24)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"primData3.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [34 x i8] c"Datei kann nicht gefunden werden!\00"
define void @leseLongLong() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = call i64 @feof(i32* %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %16
8: ; preds = %0
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
br label %16
10: ; preds = %5, %10
%11 = call i32 @fgets(i8* %2, i32 80, i32* %3)
%12 = call i64 @atoll(i8* %2)
%13 = call i32 @prim(i64 %12)
%14 = call i64 @feof(i32* %3)
%15 = icmp eq i64 %14, 0
br i1 %15, label %10, label %16
16: ; preds = %10, %5, %8
%17 = call i32 @fclose(i32* %3)
ret void
}