#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 */

/* Variables and functions */
int /*<<< orphan*/ createDirectory(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ getCommonDataDir();
int /*<<< orphan*/ getScoreDir(char *);
void InitScoreDirectory(char *level_subdir) {
  createDirectory(getCommonDataDir(), "common data", 1);
  createDirectory(getScoreDir(NULL), "main score", 1);
  createDirectory(getScoreDir(level_subdir), "level score", 1);
}


x86 assembly (clang, -O0):
<InitScoreDirectory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getCommonDataDir@plt>
mov    %eax,%edi
lea    0xeb4(%rip),%rsi
mov    $0x1,%edx
call   1030 <createDirectory@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <getScoreDir@plt>
mov    %eax,%edi
lea    0xea4(%rip),%rsi
mov    $0x1,%edx
call   1030 <createDirectory@plt>
mov    -0x8(%rbp),%rdi
call   1040 <getScoreDir@plt>
mov    %eax,%edi
lea    0xe93(%rip),%rsi
mov    $0x1,%edx
call   1030 <createDirectory@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitScoreDirectory>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <getCommonDataDir@plt>
lea    0xebe(%rip),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1030 <createDirectory@plt>
xor    %edi,%edi
call   1040 <getScoreDir@plt>
lea    0xeb0(%rip),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1030 <createDirectory@plt>
mov    %rbx,%rdi
call   1040 <getScoreDir@plt>
lea    0xea0(%rip),%rsi
mov    %eax,%edi
mov    $0x1,%edx
pop    %rbx
jmp    1030 <createDirectory@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"common data\00"
@.str.1 = [11 x i8] c"main score\00"
@.str.2 = [12 x i8] c"level score\00"
define void @InitScoreDirectory(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @getCommonDataDir()
%4 = call i32 @createDirectory(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = call i32 @getScoreDir(i8* null)
%6 = call i32 @createDirectory(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 1)
%7 = load i8*, i8** %2
%8 = call i32 @getScoreDir(i8* %7)
%9 = call i32 @createDirectory(i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"common data\00"
@.str.1 = [11 x i8] c"main score\00"
@.str.2 = [12 x i8] c"level score\00"
define void @InitScoreDirectory(i8* %0) {
%2 = tail call i32 (...) @getCommonDataDir()
%3 = tail call i32 @createDirectory(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 @getScoreDir(i8* null)
%5 = tail call i32 @createDirectory(i32 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 1)
%6 = tail call i32 @getScoreDir(i8* %0)
%7 = tail call i32 @createDirectory(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret void
}