#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 */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
int testn_der_Dateien() {
  FILE *lese1_test = fopen("fingerprint", "w");
  FILE *lese2_test = fopen("name", "w");
  FILE *lese3_test = fopen("ldap_name", "w");
  FILE *lese4_test = fopen("signieren.sh", "w");
  if (!(lese1_test && lese2_test && lese3_test && lese4_test)) {
    printf("Fehler beim Zugriff auf die Dateien 'fingerprint', 'name' oder "
           "'ldap_name' - Der Vorgang wurde abgebrochen");
    return 1;
  }
  fclose(lese1_test);
  fclose(lese2_test);
  fclose(lese3_test);
  fclose(lese4_test);
  return 0;
}


x86 assembly (clang, -O0):
<testn_der_Dateien>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xec1(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xebd(%rip),%rdi
lea    0xeaf(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
lea    0xea1(%rip),%rdi
lea    0xe98(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x20(%rbp)
lea    0xe94(%rip),%rdi
lea    0xe81(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11c0 <testn_der_Dateien+0x90>
cmpq   $0x0,-0x18(%rbp)
je     11c0 <testn_der_Dateien+0x90>
cmpq   $0x0,-0x20(%rbp)
je     11c0 <testn_der_Dateien+0x90>
cmpq   $0x0,-0x28(%rbp)
jne    11d8 <testn_der_Dateien+0xa8>
lea    0xe5e(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1203 <testn_der_Dateien+0xd3>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testn_der_Dateien>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    0xec0(%rip),%rdi
lea    0xec5(%rip),%rbx
mov    %rbx,%rsi
call   1050 <fopen@plt>
mov    %rax,%r14
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
call   1050 <fopen@plt>
mov    %rax,%r15
lea    0xea3(%rip),%rdi
mov    %rbx,%rsi
call   1050 <fopen@plt>
mov    %rax,%r13
lea    0xe9b(%rip),%rdi
mov    %rbx,%rsi
call   1050 <fopen@plt>
test   %r14,%r14
je     11c0 <testn_der_Dateien+0x90>
test   %r15,%r15
je     11c0 <testn_der_Dateien+0x90>
test   %r13,%r13
je     11c0 <testn_der_Dateien+0x90>
mov    %rax,%r12
test   %rax,%rax
je     11c0 <testn_der_Dateien+0x90>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %r15,%rdi
call   1030 <fclose@plt>
mov    %r13,%rdi
call   1030 <fclose@plt>
mov    %r12,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
jmp    11d1 <testn_der_Dateien+0xa1>
lea    0xe5e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"fingerprint\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [5 x i8] c"name\00"
@.str.3 = [10 x i8] c"ldap_name\00"
@.str.4 = [13 x i8] c"signieren.sh\00"
@.str.5 = [107 x i8] c"Fehler beim Zugriff auf die Dateien 'fingerprint', 'name' oder 'ldap_name' - Der Vorgang wurde abgebrochen\00"
define i32 @testn_der_Dateien() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %6, i32** %2
%7 = call i32* @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %7, i32** %3
%8 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %8, i32** %4
%9 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %9, i32** %5
%10 = load i32*, i32** %2
%11 = icmp ne i32* %10, null
br i1 %11, label %12, label %21
12: ; preds = %0
%13 = load i32*, i32** %3
%14 = icmp ne i32* %13, null
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32*, i32** %4
%17 = icmp ne i32* %16, null
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32*, i32** %5
%20 = icmp ne i32* %19, null
br i1 %20, label %23, label %21
21: ; preds = %18, %15, %12, %0
%22 = call i32 @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %1
br label %32
23: ; preds = %18
%24 = load i32*, i32** %2
%25 = call i32 @fclose(i32* %24)
%26 = load i32*, i32** %3
%27 = call i32 @fclose(i32* %26)
%28 = load i32*, i32** %4
%29 = call i32 @fclose(i32* %28)
%30 = load i32*, i32** %5
%31 = call i32 @fclose(i32* %30)
store i32 0, i32* %1
br label %32
32: ; preds = %23, %21
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
@.str = [12 x i8] c"fingerprint\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [5 x i8] c"name\00"
@.str.3 = [10 x i8] c"ldap_name\00"
@.str.4 = [13 x i8] c"signieren.sh\00"
@.str.5 = [107 x i8] c"Fehler beim Zugriff auf die Dateien 'fingerprint', 'name' oder 'ldap_name' - Der Vorgang wurde abgebrochen\00"
define i32 @testn_der_Dateien() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i32* %1, null
%6 = icmp ne i32* %2, null
%7 = and i1 %5, %6
%8 = icmp ne i32* %3, null
%9 = and i1 %7, %8
%10 = icmp ne i32* %4, null
%11 = and i1 %9, %10
br i1 %11, label %14, label %12
12: ; preds = %0
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([107 x i8], [107 x i8]* @.str.5, i64 0, i64 0))
br label %19
14: ; preds = %0
%15 = tail call i32 @fclose(i32* %1)
%16 = tail call i32 @fclose(i32* %2)
%17 = tail call i32 @fclose(i32* %3)
%18 = tail call i32 @fclose(i32* %4)
br label %19
19: ; preds = %14, %12
%20 = phi i32 [ 0, %14 ], [ 1, %12 ]
ret i32 %20
}