// File: /workspace/github_c_makefile_star2_O1/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 0x65b5(%rip), %rdi      # 0x9075
xorl %eax, %eax
callq 0x3270
callq 0x2150
cmpl $0x1, %eax
je 0x2adf
leaq 0x65ab(%rip), %rdi      # 0x9083
xorl %eax, %eax
callq 0x3358
leaq 0x6666(%rip), %rdi      # 0x914c
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x20d0
leaq 0x6680(%rip), %r14      # 0x9177
movq %r14, %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x20d0
leaq 0x6683(%rip), %rdi      # 0x918e
movl $0x16d, %esi            # imm = 0x16D
callq 0x20d0
leaq 0x6683(%rip), %rdi      # 0x919f
movl $0x16d, %esi            # imm = 0x16D
callq 0x20d0
leaq 0x6624(%rip), %rdi      # 0x9151
leaq 0x6626(%rip), %r8       # 0x915a
movl $0xa, %ecx
movq %r14, %rsi
movq %rdi, %rdx
callq 0x21a0
testl %eax, %eax
jns 0x2b56
leaq 0x661c(%rip), %rdi      # 0x916b
xorl %eax, %eax
callq 0x3270
leaq 0x6631(%rip), %rsi      # 0x918e
leaq 0x6618(%rip), %rdi      # 0x917c
movl $0xe, %ecx
movq %rdi, %rdx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x2b86
leaq 0x6603(%rip), %rdi      # 0x9182
xorl %eax, %eax
callq 0x3270
leaq 0x6612(%rip), %rsi      # 0x919f
leaq 0x660c(%rip), %rdi      # 0x91a0
movl $0xe, %ecx
movq %rdi, %rdx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x2bb6
leaq 0x65e4(%rip), %rdi      # 0x9193
xorl %eax, %eax
callq 0x3270
xorl %eax, %eax
callq 0x53a4
leaq 0xb9dc(%rip), %rdi      # 0xe5a0
callq 0x351c
leaq 0x6517(%rip), %rdi      # 0x90e7
leaq 0x65ce(%rip), %rsi      # 0x91a5
callq 0x5c0f
leaq 0x64ce(%rip), %rdi      # 0x90b1
leaq 0x65c4(%rip), %rsi      # 0x91ae
callq 0x5c0f
leaq 0x64ff(%rip), %rdi      # 0x90f5
xorl %esi, %esi
callq 0x5c27
leaq 0x6502(%rip), %rdi      # 0x9106
leaq 0x67fe(%rip), %r14      # 0x9409
movq %r14, %rsi
callq 0x5c0f
leaq 0x64fa(%rip), %rdi      # 0x9114
movq %r14, %rsi
callq 0x5c0f
leaq 0x7a47(%rip), %rdi      # 0xa670
leaq 0x658d(%rip), %rsi      # 0x91bd
callq 0x5c0f
leaq 0x658e(%rip), %rdi      # 0x91ca
xorl %esi, %esi
callq 0x5c27
leaq 0x6591(%rip), %rdi      # 0x91db
xorl %esi, %esi
callq 0x5c27
leaq 0x6596(%rip), %rdi      # 0x91ee
movl $0x100, %esi            # imm = 0x100
callq 0x5c3e
leaq 0x6595(%rip), %rdi      # 0x91fe
movl $0x100, %esi            # imm = 0x100
callq 0x5c3e
leaq 0x642e(%rip), %rdi      # 0x90a8
xorl %esi, %esi
callq 0x5c27
cmpl $0x2, %ebp
jl 0x2cd3
movl %ebp, %r15d
movl $0x1, %r12d
movq (%rbx,%r12,8), %r14
cmpb $0x2d, (%r14)
je 0x2ccb
movq %r14, %rdi
movl $0x3d, %esi
callq 0x21e0
testq %rax, %rax
je 0x2cbe
movb $0x0, (%rax)
incq %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x5c0f
jmp 0x2ccb
movq %r14, %rdi
movl $0x1, %esi
callq 0x5c27
incq %r12
cmpq %r12, %r15
jne 0x2c8f
leaq 0x63b7(%rip), %rdi      # 0x9091
callq 0x5c6c
leaq 0x63c2(%rip), %rdi      # 0x90a8
callq 0x5bdd
testb %al, %al
je 0x2d56
leaq 0x6518(%rip), %rdi      # 0x920e
xorl %eax, %eax
callq 0x21f0
leaq 0x650f(%rip), %rdi      # 0x9213
callq 0x712d
testq %rax, %rax
je 0x2d56
movq %rax, %r15
leaq 0xb918(%rip), %r12      # 0xe630
leaq 0x64f4(%rip), %r14      # 0x9213
movq %r15, %rdi
callq 0x798a
movq %r15, %rdi
callq 0x5c55
movq (%r12), %rdi
testq %rdi, %rdi
je 0x2d46
callq 0x5b08
movq 0x8(%rax), %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x712d
movq %rax, %r15
testq %rax, %rax
jne 0x2d1f
leaq 0x6354(%rip), %rdi      # 0x90b1
callq 0x5bba
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x8448
testl %eax, %eax
jns 0x2d87
leaq 0x6340(%rip), %rdi      # 0x90bd
movq %r14, %rsi
xorl %eax, %eax
callq 0x3358
leaq 0x6359(%rip), %rdi      # 0x90e7
callq 0x5bba
movq %rax, %r14
leaq 0x6358(%rip), %rdi      # 0x90f5
callq 0x5bdd
testb %al, %al
je 0x30c3
movq %r14, 0x48(%rsp)
leaq 0x6350(%rip), %rdi      # 0x9106
callq 0x5bba
movq %rax, 0x40(%rsp)
leaq 0x634d(%rip), %rdi      # 0x9114
callq 0x5bba
movq %rax, 0x38(%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2410
movl %eax, %r14d
testl %eax, %eax
jns 0x2df9
leaq 0x62d0(%rip), %rdi      # 0x90bd
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x3358
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 0x8(%rsp), %rdx
movl $0x1268, %esi           # imm = 0x1268
movl %r14d, %edi
xorl %eax, %eax
callq 0x2250
testl %eax, %eax
jns 0x2e37
movl $0x200, 0x8(%rsp)       # imm = 0x200
movslq 0x8(%rsp), %rcx
movq %r15, %rax
cqto
idivq %rcx
movq %rax, 0x30(%rsp)
leaq 0x63fe(%rip), %rdi      # 0x924e
xorl %esi, %esi
xorl %eax, %eax
callq 0x2410
movl %eax, %ebp
testl %eax, %eax
jns 0x2e6d
leaq 0x63f3(%rip), %rdi      # 0x9259
xorl %eax, %eax
callq 0x3358
movl $0x4c00, %esi           # imm = 0x4C00
movl %ebp, %edi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2250
testl %eax, %eax
jns 0x2e90
leaq 0x63f5(%rip), %rdi      # 0x927e
xorl %eax, %eax
callq 0x3358
movl %r14d, %edi
callq 0x2280
leaq 0x63f2(%rip), %rdi      # 0x9291
movl $0x2, %esi
xorl %eax, %eax
callq 0x2410
movl %eax, %r13d
testl %eax, %eax
jns 0x2ec0
leaq 0x63ec(%rip), %rdi      # 0x92a5
xorl %eax, %eax
callq 0x3358
movl %ebp, 0xc(%rsp)
movl $0xc138fd03, %r12d      # imm = 0xC138FD03
leaq 0x50(%rsp), %r14
movl $0x4000, %edx           # imm = 0x4000
movq %r14, %rdi
xorl %esi, %esi
callq 0x2240
movaps 0x612b(%rip), %xmm0     # 0x9010
movaps %xmm0, (%r14)
movl $0x138, 0x10(%r14)      # imm = 0x138
movq $0x0, 0x28(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x14(%r14)
movl $0x736674, %eax         # imm = 0x736674
movl %eax, 0x33(%r14)
movl $0x746f6f72, 0x30(%r14) # imm = 0x746F6F72
movl %eax, 0xbf(%r14)
movups 0x63c0(%rip), %xmm0     # 0x92e0
movaps %xmm0, 0xb0(%r14)
movl $0xc138fd03, %esi       # imm = 0xC138FD03
movl %r13d, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2250
testl %eax, %eax
jns 0x2f4c
leaq 0x63ae(%rip), %rdi      # 0x92f3
xorl %eax, %eax
callq 0x3358
leaq 0x50(%rsp), %r15
xorl %ebp, %ebp
movl $0x4000, %edx           # imm = 0x4000
movq %r15, %rdi
xorl %esi, %esi
callq 0x2240
movaps 0x60a7(%rip), %xmm0     # 0x9010
movaps %xmm0, (%r15)
movaps 0x60ac(%rip), %xmm0     # 0x9020
movaps %xmm0, 0x10(%r15)
movq %rbp, 0x28(%r15)
movl $0x746f6f72, 0x30(%r14) # imm = 0x746F6F72
movl $0x736674, 0x33(%r14)   # imm = 0x736674
xorps %xmm0, %xmm0
movups %xmm0, 0x138(%r15)
movups %xmm0, 0x148(%r15)
movq %rbp, 0x158(%r15)
movq 0x30(%rsp), %rax
movq %rax, 0x140(%r15)
movl $0x70797263, 0x150(%r15) # imm = 0x70797263
movw $0x74, 0x154(%r15)
leaq 0x1b0(%rsp), %rdi
leaq 0x6343(%rip), %rsi      # 0x931a
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
xorl %eax, %eax
callq 0x2480
leaq 0x6(%r12), %rsi
movl %r13d, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2250
testl %eax, %eax
jns 0x300c
leaq 0x632a(%rip), %rdi      # 0x932f
xorl %eax, %eax
callq 0x3358
leaq 0x50(%rsp), %r15
movl $0x4000, %edx           # imm = 0x4000
movq %r15, %rdi
xorl %esi, %esi
callq 0x2240
movaps 0x5fe9(%rip), %xmm0     # 0x9010
movaps %xmm0, (%r15)
movq $0x138, 0x10(%r15)      # imm = 0x138
movl $0x8000, 0x1c(%r15)     # imm = 0x8000
movl $0x746f6f72, 0x30(%r14) # imm = 0x746F6F72
movl $0x736674, 0x33(%r14)   # imm = 0x736674
addq $0x3, %r12
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2250
testl %eax, %eax
movl 0xc(%rsp), %ebp
jns 0x3075
leaq 0x62ef(%rip), %rdi      # 0x935d
xorl %eax, %eax
callq 0x3358
movl %r13d, %edi
callq 0x2280
leaq 0x61a2(%rip), %rdi      # 0x9226
leaq 0x60c1(%rip), %rsi      # 0x914c
movl $0x1, %ecx
movq 0x48(%rsp), %r14
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x30ba
leaq 0x6185(%rip), %rdi      # 0x9230
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x3358
movl %ebp, %edi
callq 0x2280
jmp 0x3127
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2410
movl %eax, %ebp
testl %eax, %eax
jns 0x30ea
leaq 0x5fdf(%rip), %rdi      # 0x90bd
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x3358
movl %ebp, %edi
callq 0x2280
leaq 0x6054(%rip), %rsi      # 0x914c
leaq 0x10(%rsp), %rdi
movl $0x1, %ecx
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x3127
leaq 0x6118(%rip), %rdi      # 0x9230
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x3358
leaq 0x10(%rsp), %rdi
callq 0x86e8
leaq 0x603f(%rip), %rdi      # 0x9177
leaq 0x6234(%rip), %rsi      # 0x9373
movl $0x2000, %ecx           # imm = 0x2000
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x3160
leaq 0x6223(%rip), %rdi      # 0x937c
xorl %eax, %eax
callq 0x3270
leaq 0x6027(%rip), %rdi      # 0x918e
callq 0x2130
testl %eax, %eax
jns 0x317e
leaq 0x6218(%rip), %rdi      # 0x938f
xorl %eax, %eax
callq 0x3270
leaq 0x601a(%rip), %rdi      # 0x919f
callq 0x2130
testl %eax, %eax
jns 0x319c
leaq 0x6211(%rip), %rdi      # 0x93a6
xorl %eax, %eax
callq 0x3270
leaq 0x621b(%rip), %rdi      # 0x93be
xorl %esi, %esi
xorl %eax, %eax
callq 0x2410
testl %eax, %eax
js 0x31d8
leaq 0xb119(%rip), %rsi      # 0xe2d0
movl %eax, %edi
callq 0x295c
leaq 0x5fc9(%rip), %rdi      # 0x918e
callq 0x2180
leaq 0x5fce(%rip), %rdi      # 0x919f
callq 0x2180
jmp 0x31e6
leaq 0x61f1(%rip), %rdi      # 0x93d0
xorl %eax, %eax
callq 0x3270
leaq 0x5f5f(%rip), %rdi      # 0x914c
callq 0x21c0
leaq 0x5f51(%rip), %rdi      # 0x914a
leaq 0x61be(%rip), %rsi      # 0x93be
movl $0x2000, %ecx           # imm = 0x2000
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x21a0
testl %eax, %eax
jns 0x3221
leaq 0x61a6(%rip), %rdi      # 0x93c0
xorl %eax, %eax
callq 0x3270
leaq 0x5f22(%rip), %rdi      # 0x914a
callq 0x20b0
leaq 0x5eee(%rip), %rdi      # 0x9122
movq %rbx, %rsi
callq 0x24f0
callq 0x2070
movl (%rax), %edi
callq 0x24d0
leaq 0x5ede(%rip), %rdi      # 0x912d
movq %rax, %rsi
xorl %eax, %eax
callq 0x3358
xorl %eax, %eax
addq $0x4058, %rsp           # imm = 0x4058
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)