#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*/ check_primer_number();
int /*<<< orphan*/ create_configuration();
int /*<<< orphan*/ create_primer_number();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
void Initialize(void) {
  FILE *fp_primer_number;
  FILE *fp_configuration;
  fp_primer_number = fopen("primer_number.txt", "r");
  fp_configuration = fopen("configuration.txt", "r");
  if ((fp_primer_number == NULL) || (!check_primer_number())) {
    create_primer_number();
  }
  if (fp_configuration == NULL) {
    create_configuration();
  }
  fclose(fp_primer_number);
  fclose(fp_configuration);
}


x86 assembly (clang, -O0):
<Initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xea1(%rip),%rdi
lea    0xeac(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x8(%rbp)
lea    0xe9e(%rip),%rdi
lea    0xe95(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11a1 <Initialize+0x51>
mov    $0x0,%al
call   1070 <check_primer_number@plt>
cmp    $0x0,%eax
jne    11a8 <Initialize+0x58>
mov    $0x0,%al
call   1030 <create_primer_number@plt>
cmpq   $0x0,-0x10(%rbp)
jne    11ba <Initialize+0x6a>
mov    $0x0,%al
call   1050 <create_configuration@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Initialize>:
push   %r14
push   %rbx
push   %rax
lea    0xea5(%rip),%rdi
lea    0xeb0(%rip),%rbx
mov    %rbx,%rsi
call   1060 <fopen@plt>
mov    %rax,%r14
lea    0xea0(%rip),%rdi
mov    %rbx,%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
test   %r14,%r14
je     11ab <Initialize+0x5b>
xor    %eax,%eax
call   1070 <check_primer_number@plt>
test   %eax,%eax
je     11ab <Initialize+0x5b>
test   %rbx,%rbx
je     11b7 <Initialize+0x67>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fclose@plt>
xor    %eax,%eax
call   1030 <create_primer_number@plt>
test   %rbx,%rbx
jne    1194 <Initialize+0x44>
xor    %eax,%eax
call   1050 <create_configuration@plt>
jmp    1194 <Initialize+0x44>

LLVM IR (-O0):
@.str = [18 x i8] c"primer_number.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [18 x i8] c"configuration.txt\00"
define void @Initialize() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %1
%4 = call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 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* %4, i32** %2
%5 = load i32*, i32** %1
%6 = icmp eq i32* %5, null
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = call i32 (...) @check_primer_number()
%9 = icmp ne i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7, %0
%11 = call i32 (...) @create_primer_number()
br label %12
12: ; preds = %10, %7
%13 = load i32*, i32** %2
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 (...) @create_configuration()
br label %17
17: ; preds = %15, %12
%18 = load i32*, i32** %1
%19 = call i32 @fclose(i32* %18)
%20 = load i32*, i32** %2
%21 = call i32 @fclose(i32* %20)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"primer_number.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [18 x i8] c"configuration.txt\00"
define void @Initialize() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 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 ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i32* %1, null
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = tail call i32 (...) @check_primer_number()
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4, %0
%8 = tail call i32 (...) @create_primer_number()
br label %9
9: ; preds = %7, %4
%10 = icmp eq i32* %2, null
br i1 %10, label %11, label %13
11: ; preds = %9
%12 = tail call i32 (...) @create_configuration()
br label %13
13: ; preds = %11, %9
%14 = tail call i32 @fclose(i32* %1)
%15 = tail call i32 @fclose(i32* %2)
ret void
}