#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*/ cpio_mkdir(char *, int, int /*<<< orphan*/,
                              int /*<<< orphan*/);
int /*<<< orphan*/ cpio_mknod(char *, int, int /*<<< orphan*/,
                              int /*<<< orphan*/, char, int, int);
int /*<<< orphan*/ cpio_trailer();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  cpio_mkdir("/dev", 0755, 0, 0);
  cpio_mknod("/dev/console", 0600, 0, 0, 'c', 5, 1);
  cpio_mkdir("/root", 0700, 0, 0);
  cpio_trailer();
  exit(0);
  return 0;
  (void)argc;
  (void)argv;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
mov    $0x1ed,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1060 <cpio_mkdir@plt>
lea    0xe93(%rip),%rdi
mov    $0x180,%esi
xor    %ecx,%ecx
mov    $0x63,%r8d
mov    $0x5,%r9d
mov    %ecx,%edx
movl   $0x1,(%rsp)
call   1040 <cpio_mknod@plt>
lea    0xe78(%rip),%rdi
mov    $0x1c0,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1060 <cpio_mkdir@plt>
mov    $0x0,%al
call   1030 <cpio_trailer@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
mov    $0x1ed,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1060 <cpio_mkdir@plt>
movl   $0x1,(%rsp)
lea    0xea1(%rip),%rdi
mov    $0x180,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x63,%r8d
mov    $0x5,%r9d
call   1040 <cpio_mknod@plt>
lea    0xe8d(%rip),%rdi
mov    $0x1c0,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1060 <cpio_mkdir@plt>
xor    %eax,%eax
call   1030 <cpio_trailer@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"/dev\00"
@.str.1 = [13 x i8] c"/dev/console\00"
@.str.2 = [6 x i8] c"/root\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @cpio_mkdir(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 493, i32 0, i32 0)
%7 = call i32 @cpio_mknod(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 384, i32 0, i32 0, i8 signext 99, i32 5, i32 1)
%8 = call i32 @cpio_mkdir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 448, i32 0, i32 0)
%9 = call i32 (...) @cpio_trailer()
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"/dev\00"
@.str.1 = [13 x i8] c"/dev/console\00"
@.str.2 = [6 x i8] c"/root\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @cpio_mkdir(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 493, i32 0, i32 0)
%4 = tail call i32 @cpio_mknod(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 384, i32 0, i32 0, i8 signext 99, i32 5, i32 1)
%5 = tail call i32 @cpio_mkdir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 448, i32 0, i32 0)
%6 = tail call i32 (...) @cpio_trailer()
%7 = tail call i32 @exit(i32 0)
unreachable
}