// File: /workspace/github_c_makefile_star2_O3/nerves-project[P]nerves_initramfs/src/nerves_initramfs.c
// Function: main
int main(int argc, char *argv[])
{
    info("version " PROGRAM_VERSION_STR
#ifdef DEBUG
         " [DEBUG]"
#endif
            );

    if (getpid() != 1)
       fatal("Must be pid 1");

    setup_initramfs();

    // Initialize scripting environment
    initialize_script_defaults(argc, argv);

    eval_file("/nerves_initramfs.conf");

    if (get_variable_as_boolean("run_repl"))
        repl();

    // Mount the root filesystem
    const char *rootfs_spec = get_variable_as_string("rootfs.path");
    char resolved_rootfs_path[BLOCK_DEVICE_PATH_LEN];
    if (resolve_block_device_spec(rootfs_spec, resolved_rootfs_path) < 0)
        fatal("Can't continue since '%s' does not exist.", rootfs_spec);

    const char *rootfs_fstype = get_variable_as_string("rootfs.fstype");
    if (get_variable_as_boolean("rootfs.encrypted"))
        mount_encrypted_fs(resolved_rootfs_path,
                           rootfs_fstype,
                           get_variable_as_string("rootfs.cipher"),
                           get_variable_as_string("rootfs.secret"));
    else
        mount_fs(resolved_rootfs_path, rootfs_fstype);

    // Finalize our setup of the root filesystem
    create_rootdisk_symlinks(resolved_rootfs_path);

    // Switch over to the new root filesystem
    switch_root();

    // Launch the real init. It's always /sbin/init with Buildroot.
    execv("/sbin/init", argv);

    fatal("Couldn't run /sbin/init: %s", strerror(errno));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4058, %rsp           # imm = 0x4058
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x661b(%rip), %rdi      # 0x9075
xorl %eax, %eax
callq 0x3204
callq 0x2150
cmpl $0x1, %eax
je 0x2a79
leaq 0x6611(%rip), %rdi      # 0x9083
xorl %eax, %eax
callq 0x32e5
leaq 0x66cc(%rip), %rdi      # 0x914c
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x20d0
leaq 0x66e6(%rip), %r14      # 0x9177
movq %r14, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x20d0
leaq 0x66e9(%rip), %rdi      # 0x918e
movl $0x16d, %esi            # imm = 0x16D
callq 0x20d0
leaq 0x66e9(%rip), %rdi      # 0x919f
movl $0x16d, %esi            # imm = 0x16D
callq 0x20d0
leaq 0x668a(%rip), %rdi      # 0x9151
leaq 0x668c(%rip), %r8       # 0x915a
movl $0xa, %ecx
movq %r14, %rsi
movq %rdi, %rdx
callq 0x21a0
testl %eax, %eax
jns 0x2af0
leaq 0x6682(%rip), %rdi      # 0x916b
xorl %eax, %eax
callq 0x3204
leaq 0x6697(%rip), %rsi      # 0x918e
leaq 0x667e(%rip), %rdi      # 0x917c
movl $0xe, %ecx
movq %rdi, %rdx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x2b20
leaq 0x6669(%rip), %rdi      # 0x9182
xorl %eax, %eax
callq 0x3204
leaq 0x6678(%rip), %rsi      # 0x919f
leaq 0x6672(%rip), %rdi      # 0x91a0
movl $0xe, %ecx
movq %rdi, %rdx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x2b50
leaq 0x664a(%rip), %rdi      # 0x9193
xorl %eax, %eax
callq 0x3204
xorl %eax, %eax
callq 0x50d0
leaq 0xba42(%rip), %rdi      # 0xe5a0
callq 0x34a8
leaq 0x657d(%rip), %rdi      # 0x90e7
leaq 0x6634(%rip), %rsi      # 0x91a5
callq 0x595d
leaq 0x6534(%rip), %rdi      # 0x90b1
leaq 0x662a(%rip), %rsi      # 0x91ae
callq 0x595d
leaq 0x6565(%rip), %rdi      # 0x90f5
xorl %esi, %esi
callq 0x5975
leaq 0x6568(%rip), %rdi      # 0x9106
leaq 0x6864(%rip), %r14      # 0x9409
movq %r14, %rsi
callq 0x595d
leaq 0x6560(%rip), %rdi      # 0x9114
movq %r14, %rsi
callq 0x595d
leaq 0x7aad(%rip), %rdi      # 0xa670
leaq 0x65f3(%rip), %rsi      # 0x91bd
callq 0x595d
leaq 0x65f4(%rip), %rdi      # 0x91ca
xorl %esi, %esi
callq 0x5975
leaq 0x65f7(%rip), %rdi      # 0x91db
xorl %esi, %esi
callq 0x5975
leaq 0x65fc(%rip), %rdi      # 0x91ee
movl $0x100, %esi            # imm = 0x100
callq 0x598c
leaq 0x65fb(%rip), %rdi      # 0x91fe
movl $0x100, %esi            # imm = 0x100
callq 0x598c
leaq 0x6494(%rip), %rdi      # 0x90a8
xorl %esi, %esi
callq 0x5975
cmpl $0x2, %ebp
jl 0x2c6d
movl %ebp, %r15d
movl $0x1, %r12d
movq (%rbx,%r12,8), %r14
cmpb $0x2d, (%r14)
je 0x2c65
movq %r14, %rdi
movl $0x3d, %esi
callq 0x21e0
testq %rax, %rax
je 0x2c58
movb $0x0, (%rax)
incq %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x595d
jmp 0x2c65
movq %r14, %rdi
movl $0x1, %esi
callq 0x5975
incq %r12
cmpq %r12, %r15
jne 0x2c29
leaq 0x641d(%rip), %rdi      # 0x9091
callq 0x59ba
leaq 0x6428(%rip), %rdi      # 0x90a8
callq 0x592b
testb %al, %al
je 0x2cf0
leaq 0x657e(%rip), %rdi      # 0x920e
xorl %eax, %eax
callq 0x21f0
leaq 0x6575(%rip), %rdi      # 0x9213
callq 0x6ea2
testq %rax, %rax
je 0x2cf0
movq %rax, %r15
leaq 0xb97e(%rip), %r12      # 0xe630
leaq 0x655a(%rip), %r14      # 0x9213
movq %r15, %rdi
callq 0x76e1
movq %r15, %rdi
callq 0x59a3
movq (%r12), %rdi
testq %rdi, %rdi
je 0x2ce0
callq 0x5854
movq 0x8(%rax), %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x6ea2
movq %rax, %r15
testq %rax, %rax
jne 0x2cb9
leaq 0x63ba(%rip), %rdi      # 0x90b1
callq 0x5908
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x80a8
testl %eax, %eax
jns 0x2d21
leaq 0x63a6(%rip), %rdi      # 0x90bd
movq %r14, %rsi
xorl %eax, %eax
callq 0x32e5
leaq 0x63bf(%rip), %rdi      # 0x90e7
callq 0x5908
movq %rax, %r14
leaq 0x63be(%rip), %rdi      # 0x90f5
callq 0x592b
testb %al, %al
je 0x2dd0
movq %r14, 0x48(%rsp)
leaq 0x63b6(%rip), %rdi      # 0x9106
callq 0x5908
movq %rax, 0x40(%rsp)
leaq 0x63b3(%rip), %rdi      # 0x9114
callq 0x5908
movq %rax, 0x38(%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2420
movl %eax, %r14d
testl %eax, %eax
jns 0x2d93
leaq 0x6336(%rip), %rdi      # 0x90bd
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x32e5
movl %r14d, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2220
movq %rax, %r15
movl %r14d, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2220
leaq 0xc(%rsp), %rdx
movl $0x1268, %esi           # imm = 0x1268
movl %r14d, %edi
xorl %eax, %eax
callq 0x2250
testl %eax, %eax
js 0x2e3d
movslq 0xc(%rsp), %rcx
jmp 0x2e4a
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2420
movl %eax, %ebp
testl %eax, %eax
jns 0x2df7
leaq 0x62d2(%rip), %rdi      # 0x90bd
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x32e5
movl %ebp, %edi
callq 0x2280
leaq 0x6347(%rip), %rsi      # 0x914c
leaq 0x10(%rsp), %rdi
movl $0x1, %ecx
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x30bc
leaq 0x6407(%rip), %rdi      # 0x9230
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x32e5
jmp 0x30bc
movl $0x200, 0xc(%rsp)       # imm = 0x200
movl $0x200, %ecx            # imm = 0x200
movq %r15, %rax
cqto
idivq %rcx
movq %rax, 0x30(%rsp)
leaq 0x63f0(%rip), %rdi      # 0x924e
xorl %esi, %esi
xorl %eax, %eax
callq 0x2420
movl %eax, %ebp
testl %eax, %eax
jns 0x2e7b
leaq 0x63e5(%rip), %rdi      # 0x9259
xorl %eax, %eax
callq 0x32e5
movl $0x4c00, %esi           # imm = 0x4C00
movl %ebp, %edi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2250
testl %eax, %eax
jns 0x2e9e
leaq 0x63e7(%rip), %rdi      # 0x927e
xorl %eax, %eax
callq 0x32e5
movl %r14d, %edi
callq 0x2280
leaq 0x63e4(%rip), %rdi      # 0x9291
movl $0x2, %esi
xorl %eax, %eax
callq 0x2420
movl %eax, %r13d
testl %eax, %eax
jns 0x2ece
leaq 0x63de(%rip), %rdi      # 0x92a5
xorl %eax, %eax
callq 0x32e5
movl $0xc138fd03, %r12d      # imm = 0xC138FD03
leaq 0x70(%rsp), %r14
movl $0x3fe0, %edx           # imm = 0x3FE0
movq %r14, %rdi
xorl %esi, %esi
callq 0x2240
movaps 0x6121(%rip), %xmm0     # 0x9010
movaps %xmm0, -0x20(%r14)
movl $0x138, -0x10(%r14)     # imm = 0x138
xorps %xmm0, %xmm0
movups %xmm0, -0xc(%r14)
movl $0x736674, %eax         # imm = 0x736674
movl %eax, 0x13(%r14)
movl $0x746f6f72, 0x10(%r14) # imm = 0x746F6F72
movl %eax, 0x9f(%r14)
movups 0x63bd(%rip), %xmm0     # 0x92e0
movaps %xmm0, 0x90(%r14)
leaq 0x50(%rsp), %rdx
movl $0xc138fd03, %esi       # imm = 0xC138FD03
movl %r13d, %edi
xorl %eax, %eax
callq 0x2250
testl %eax, %eax
jns 0x2f51
leaq 0x63a9(%rip), %rdi      # 0x92f3
xorl %eax, %eax
callq 0x32e5
leaq 0x60(%rsp), %r15
movl $0x3fe0, %edx           # imm = 0x3FE0
movq %r14, %rdi
xorl %esi, %esi
callq 0x2240
movaps 0x60a4(%rip), %xmm0     # 0x9010
movaps %xmm0, -0x10(%r15)
movaps 0x60a8(%rip), %xmm0     # 0x9020
movaps %xmm0, (%r15)
movl $0x746f6f72, 0x10(%r14) # imm = 0x746F6F72
movl $0x736674, 0x13(%r14)   # imm = 0x736674
xorps %xmm0, %xmm0
movups %xmm0, 0x128(%r15)
movups %xmm0, 0x138(%r15)
movq $0x0, 0x148(%r15)
movq 0x30(%rsp), %rax
movq %rax, 0x130(%r15)
movl $0x70797263, 0x140(%r15) # imm = 0x70797263
movw $0x74, 0x144(%r15)
leaq 0x1b0(%rsp), %rdi
leaq 0x6340(%rip), %rsi      # 0x931a
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
xorl %eax, %eax
callq 0x2490
leaq 0x6(%r12), %rsi
leaq 0x50(%rsp), %rdx
movl %r13d, %edi
xorl %eax, %eax
callq 0x2250
testl %eax, %eax
jns 0x3011
leaq 0x6325(%rip), %rdi      # 0x932f
xorl %eax, %eax
callq 0x32e5
movl $0x3ff0, %edx           # imm = 0x3FF0
movq %r15, %rdi
xorl %esi, %esi
callq 0x2240
leaq 0x50(%rsp), %rdx
movaps 0x5fe4(%rip), %xmm0     # 0x9010
movaps %xmm0, (%rdx)
movl $0x138, 0x10(%rdx)      # imm = 0x138
movl $0x8000, 0x1c(%rdx)     # imm = 0x8000
movl $0x746f6f72, 0x10(%r14) # imm = 0x746F6F72
movl $0x736674, 0x13(%r14)   # imm = 0x736674
addq $0x3, %r12
movl %r13d, %edi
movq %r12, %rsi
xorl %eax, %eax
callq 0x2250
testl %eax, %eax
jns 0x3070
leaq 0x62f4(%rip), %rdi      # 0x935d
xorl %eax, %eax
callq 0x32e5
movl %r13d, %edi
callq 0x2280
leaq 0x61a7(%rip), %rdi      # 0x9226
leaq 0x60c6(%rip), %rsi      # 0x914c
movl $0x1, %ecx
movq 0x48(%rsp), %r14
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x30b5
leaq 0x618a(%rip), %rdi      # 0x9230
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x32e5
movl %ebp, %edi
callq 0x2280
leaq 0x10(%rsp), %rdi
callq 0x8350
leaq 0x60aa(%rip), %rdi      # 0x9177
leaq 0x629f(%rip), %rsi      # 0x9373
movl $0x2000, %ecx           # imm = 0x2000
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x30f5
leaq 0x628e(%rip), %rdi      # 0x937c
xorl %eax, %eax
callq 0x3204
leaq 0x6092(%rip), %rdi      # 0x918e
callq 0x2130
testl %eax, %eax
jns 0x3113
leaq 0x6283(%rip), %rdi      # 0x938f
xorl %eax, %eax
callq 0x3204
leaq 0x6085(%rip), %rdi      # 0x919f
callq 0x2130
testl %eax, %eax
jns 0x3131
leaq 0x627c(%rip), %rdi      # 0x93a6
xorl %eax, %eax
callq 0x3204
leaq 0x6286(%rip), %rdi      # 0x93be
xorl %esi, %esi
xorl %eax, %eax
callq 0x2420
testl %eax, %eax
js 0x316d
leaq 0xb184(%rip), %rsi      # 0xe2d0
movl %eax, %edi
callq 0x291c
leaq 0x6034(%rip), %rdi      # 0x918e
callq 0x2180
leaq 0x6039(%rip), %rdi      # 0x919f
callq 0x2180
jmp 0x317b
leaq 0x625c(%rip), %rdi      # 0x93d0
xorl %eax, %eax
callq 0x3204
leaq 0x5fca(%rip), %rdi      # 0x914c
callq 0x21c0
leaq 0x5fbc(%rip), %rdi      # 0x914a
leaq 0x6229(%rip), %rsi      # 0x93be
movl $0x2000, %ecx           # imm = 0x2000
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x31b6
leaq 0x6211(%rip), %rdi      # 0x93c0
xorl %eax, %eax
callq 0x3204
leaq 0x5f8d(%rip), %rdi      # 0x914a
callq 0x20b0
leaq 0x5f59(%rip), %rdi      # 0x9122
movq %rbx, %rsi
callq 0x2500
callq 0x2070
movl (%rax), %edi
callq 0x24e0
leaq 0x5f49(%rip), %rdi      # 0x912d
movq %rax, %rsi
xorl %eax, %eax
callq 0x32e5
xorl %eax, %eax
addq $0x4058, %rsp           # imm = 0x4058
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop