#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*/ chdir(char const *);
int /*<<< orphan*/ create_default_config_file();
int /*<<< orphan*/ create_default_layout();
int /*<<< orphan*/ create_index_page();
int /*<<< orphan*/ create_layouts_directory();
int /*<<< orphan*/ create_posts_directory();
int /*<<< orphan*/ create_project_directory(char const *);
scalar_t__ strcmp(char const *, char *);
void cmd_initialize(const char *project_name) {
  if (strcmp(project_name, ".") != 0) {
    create_project_directory(project_name);
    chdir(project_name);
  }
  create_default_config_file();
  create_layouts_directory();
  create_default_layout();
  create_posts_directory();
  create_index_page();
}


x86 assembly (clang, -O0):
<cmd_initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe69(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     11b8 <cmd_initialize+0x38>
mov    -0x8(%rbp),%rdi
call   1090 <create_project_directory@plt>
mov    -0x8(%rbp),%rdi
call   1050 <chdir@plt>
mov    $0x0,%al
call   1040 <create_default_config_file@plt>
mov    $0x0,%al
call   1070 <create_layouts_directory@plt>
mov    $0x0,%al
call   10a0 <create_default_layout@plt>
mov    $0x0,%al
call   1060 <create_posts_directory@plt>
mov    $0x0,%al
call   1030 <create_index_page@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_initialize>:
push   %rbx
mov    %rdi,%rbx
lea    0xe75(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     11a5 <cmd_initialize+0x25>
mov    %rbx,%rdi
call   1090 <create_project_directory@plt>
mov    %rbx,%rdi
call   1050 <chdir@plt>
xor    %eax,%eax
call   1040 <create_default_config_file@plt>
xor    %eax,%eax
call   1070 <create_layouts_directory@plt>
xor    %eax,%eax
call   10a0 <create_default_layout@plt>
xor    %eax,%eax
call   1060 <create_posts_directory@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <create_index_page@plt>

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
define void @cmd_initialize(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @create_project_directory(i8* %7)
%9 = load i8*, i8** %2
%10 = call i32 @chdir(i8* %9)
br label %11
11: ; preds = %6, %1
%12 = call i32 (...) @create_default_config_file()
%13 = call i32 (...) @create_layouts_directory()
%14 = call i32 (...) @create_default_layout()
%15 = call i32 (...) @create_posts_directory()
%16 = call i32 (...) @create_index_page()
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define void @cmd_initialize(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @create_project_directory(i8* %0)
%6 = tail call i32 @chdir(i8* %0)
br label %7
7: ; preds = %4, %1
%8 = tail call i32 (...) @create_default_config_file()
%9 = tail call i32 (...) @create_layouts_directory()
%10 = tail call i32 (...) @create_default_layout()
%11 = tail call i32 (...) @create_posts_directory()
%12 = tail call i32 (...) @create_index_page()
ret void
}