#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*/ create_fifo(char *);
int /*<<< orphan*/ create_link(char *, char *);
int /*<<< orphan*/ create_rand(char *, int);
int /*<<< orphan*/ create_socket(char *);
int /*<<< orphan*/ create_symlink(char *, char *);
int /*<<< orphan*/ mkdirp(char *);
int /*<<< orphan*/ printf(char *);
void create_test_files() {
  printf("creating test files...\n");
  mkdirp("misc");
  mkdirp("misc/random_files");
  mkdirp("misc/random_files/more_files");
  mkdirp("misc/extras");
  create_fifo("misc/fifo1");
  create_fifo("misc/extras/fifo2");
  create_socket("misc/socket1");
  create_socket("misc/extras/socket2");
  create_socket("misc/extras/socket3");
  create_link("misc/socket1", "misc/hardlink_to_socket1");
  create_symlink("misc/socket1", "misc/symlink_to_socket1");
  create_rand("misc/random_files/random1", 26214400);
  create_rand("misc/random_files/random2", 512000);
  create_rand("misc/random_files/more_files/random3", 5000);
  create_rand("misc/random_files/more_files/random4", 10);
  printf("done!\n");
}


x86 assembly (clang, -O0):
<create_test_files>:
push   %rbp
mov    %rsp,%rbp
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
lea    0xe91(%rip),%rdi
call   1050 <mkdirp@plt>
lea    0xe8a(%rip),%rdi
call   1050 <mkdirp@plt>
lea    0xe90(%rip),%rdi
call   1050 <mkdirp@plt>
lea    0xea1(%rip),%rdi
call   1050 <mkdirp@plt>
lea    0xea1(%rip),%rdi
call   1070 <create_fifo@plt>
lea    0xea0(%rip),%rdi
call   1070 <create_fifo@plt>
lea    0xea6(%rip),%rdi
call   1090 <create_socket@plt>
lea    0xea7(%rip),%rdi
call   1090 <create_socket@plt>
lea    0xeaf(%rip),%rdi
call   1090 <create_socket@plt>
lea    0xe82(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1080 <create_link@plt>
lea    0xe6f(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <create_symlink@plt>
lea    0xec2(%rip),%rdi
mov    $0x1900000,%esi
call   1060 <create_rand@plt>
lea    0xecb(%rip),%rdi
mov    $0x7d000,%esi
call   1060 <create_rand@plt>
lea    0xed4(%rip),%rdi
mov    $0x1388,%esi
call   1060 <create_rand@plt>
lea    0xee8(%rip),%rdi
mov    $0xa,%esi
call   1060 <create_rand@plt>
lea    0xefc(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_test_files>:
push   %rbx
lea    0xfc9(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7c(%rip),%rdi
call   1050 <mkdirp@plt>
lea    0xe75(%rip),%rdi
call   1050 <mkdirp@plt>
lea    0xe7b(%rip),%rdi
call   1050 <mkdirp@plt>
lea    0xe8c(%rip),%rdi
call   1050 <mkdirp@plt>
lea    0xe8c(%rip),%rdi
call   1070 <create_fifo@plt>
lea    0xe8b(%rip),%rdi
call   1070 <create_fifo@plt>
lea    0xe91(%rip),%rbx
mov    %rbx,%rdi
call   1090 <create_socket@plt>
lea    0xe8f(%rip),%rdi
call   1090 <create_socket@plt>
lea    0xe97(%rip),%rdi
call   1090 <create_socket@plt>
lea    0xe9f(%rip),%rsi
mov    %rbx,%rdi
call   1080 <create_link@plt>
lea    0xea9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <create_symlink@plt>
lea    0xeb2(%rip),%rdi
mov    $0x1900000,%esi
call   1060 <create_rand@plt>
lea    0xebb(%rip),%rdi
mov    $0x7d000,%esi
call   1060 <create_rand@plt>
lea    0xec4(%rip),%rdi
mov    $0x1388,%esi
call   1060 <create_rand@plt>
lea    0xed8(%rip),%rdi
mov    $0xa,%esi
call   1060 <create_rand@plt>
lea    0xf03(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"creating test files...\0A\00"
@.str.1 = [5 x i8] c"misc\00"
@.str.2 = [18 x i8] c"misc/random_files\00"
@.str.3 = [29 x i8] c"misc/random_files/more_files\00"
@.str.4 = [12 x i8] c"misc/extras\00"
@.str.5 = [11 x i8] c"misc/fifo1\00"
@.str.6 = [18 x i8] c"misc/extras/fifo2\00"
@.str.7 = [13 x i8] c"misc/socket1\00"
@.str.8 = [20 x i8] c"misc/extras/socket2\00"
@.str.9 = [20 x i8] c"misc/extras/socket3\00"
@.str.10 = [25 x i8] c"misc/hardlink_to_socket1\00"
@.str.11 = [24 x i8] c"misc/symlink_to_socket1\00"
@.str.12 = [26 x i8] c"misc/random_files/random1\00"
@.str.13 = [26 x i8] c"misc/random_files/random2\00"
@.str.14 = [37 x i8] c"misc/random_files/more_files/random3\00"
@.str.15 = [37 x i8] c"misc/random_files/more_files/random4\00"
@.str.16 = [7 x i8] c"done!\0A\00"
define void @create_test_files() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @mkdirp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @mkdirp(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @mkdirp(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @mkdirp(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @create_fifo(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @create_fifo(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @create_socket(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @create_socket(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @create_socket(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @create_link(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @create_symlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @create_rand(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i32 26214400)
%14 = call i32 @create_rand(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i32 512000)
%15 = call i32 @create_rand(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.14, i64 0, i64 0), i32 5000)
%16 = call i32 @create_rand(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.15, i64 0, i64 0), i32 10)
%17 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"misc\00"
@.str.2 = [18 x i8] c"misc/random_files\00"
@.str.3 = [29 x i8] c"misc/random_files/more_files\00"
@.str.4 = [12 x i8] c"misc/extras\00"
@.str.5 = [11 x i8] c"misc/fifo1\00"
@.str.6 = [18 x i8] c"misc/extras/fifo2\00"
@.str.7 = [13 x i8] c"misc/socket1\00"
@.str.8 = [20 x i8] c"misc/extras/socket2\00"
@.str.9 = [20 x i8] c"misc/extras/socket3\00"
@.str.10 = [25 x i8] c"misc/hardlink_to_socket1\00"
@.str.11 = [24 x i8] c"misc/symlink_to_socket1\00"
@.str.12 = [26 x i8] c"misc/random_files/random1\00"
@.str.13 = [26 x i8] c"misc/random_files/random2\00"
@.str.14 = [37 x i8] c"misc/random_files/more_files/random3\00"
@.str.15 = [37 x i8] c"misc/random_files/more_files/random4\00"
@str = [23 x i8] c"creating test files...\00"
@str.17 = [6 x i8] c"done!\00"
define void @create_test_files() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @mkdirp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @mkdirp(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @mkdirp(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @mkdirp(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @create_fifo(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @create_fifo(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @create_socket(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @create_socket(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 @create_socket(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%11 = tail call i32 @create_link(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%12 = tail call i32 @create_symlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
%13 = tail call i32 @create_rand(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i32 26214400)
%14 = tail call i32 @create_rand(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i32 512000)
%15 = tail call i32 @create_rand(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.14, i64 0, i64 0), i32 5000)
%16 = tail call i32 @create_rand(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.15, i64 0, i64 0), i32 10)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.17, i64 0, i64 0))
ret void
}