// File: /workspace/github_c_makefile_star2_O0/nerves-project[P]nerves_initramfs/src/nerves_initramfs.c
// Function: initialize_script_defaults
static void initialize_script_defaults(int argc, char *argv[])
{
    term_gc_heap();
    uboot_env_init(&working_uboot_env);

    set_string_variable("rootfs.fstype", "squashfs");
    set_string_variable("rootfs.path", "/dev/mmcblk0p2");
    set_boolean_variable("rootfs.encrypted", false);
    set_string_variable("rootfs.cipher", "");
    set_string_variable("rootfs.secret", "");

    set_string_variable("uboot_env.path", "/dev/mmcblk0");
    set_boolean_variable("uboot_env.loaded", false);
    set_boolean_variable("uboot_env.modified", false);
    set_number_variable("uboot_env.start", 256);
    set_number_variable("uboot_env.count", 256);

    set_boolean_variable("run_repl", false);

    // Scan the commandline for more parameters to set. Our instructions tell
    // users to put options for us after a `--`. The `--` isn't passed in the
    // argument list, so we can't search for that. However, Linux won't remove
    // or process anything after the `--` and that is a big deal to avoid
    // confusing clashes with Linux options.
    //
    // Parameters have the form:
    //
    //   key
    // or
    //   key=value
    //
    // In the first case, `key` is set to `true`. For the second
    // case, the value is always interpreted as a string.
    debug("argc=%d, argv[0]='%s'", argc, argv[0]);
    for (int i = 1; i < argc; i++) {
        debug("argv[%d]='%s'", i, argv[i]);

        if (argv[i][0] != '-') {
            char *key = argv[i];
            char *equals = strchr(key, '=');

            if (equals) {
                *equals = '\0';

                set_string_variable(key, equals + 1);
            } else {
                set_boolean_variable(key, true);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, %al
callq 0x6820
leaq 0xeca3(%rip), %rdi      # 0x115b0
callq 0x36b0
leaq 0x97a2(%rip), %rdi      # 0xc0bb
leaq 0x9859(%rip), %rsi      # 0xc179
callq 0x75d0
leaq 0x9759(%rip), %rdi      # 0xc085
leaq 0x984f(%rip), %rsi      # 0xc182
callq 0x75d0
leaq 0x978a(%rip), %rdi      # 0xc0c9
xorl %esi, %esi
callq 0x7610
leaq 0x978d(%rip), %rdi      # 0xc0da
leaq 0xb236(%rip), %rsi      # 0xdb8a
callq 0x75d0
leaq 0x9788(%rip), %rdi      # 0xc0e8
leaq 0xb223(%rip), %rsi      # 0xdb8a
callq 0x75d0
leaq 0xad8f(%rip), %rdi      # 0xd702
leaq 0x9817(%rip), %rsi      # 0xc191
callq 0x75d0
leaq 0x9818(%rip), %rdi      # 0xc19e
xorl %esi, %esi
callq 0x7610
leaq 0x981b(%rip), %rdi      # 0xc1af
xorl %esi, %esi
callq 0x7610
leaq 0x9820(%rip), %rdi      # 0xc1c2
movl $0x100, %esi            # imm = 0x100
callq 0x7650
leaq 0x981f(%rip), %rdi      # 0xc1d2
movl $0x100, %esi            # imm = 0x100
callq 0x7650
leaq 0x96b8(%rip), %rdi      # 0xc07c
xorl %esi, %esi
callq 0x7610
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x2a4e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x2a41
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl $0x3d, %esi
callq 0x21c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2a31
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x1, %rsi
callq 0x75d0
jmp 0x2a3f
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x7610
jmp 0x2a41
jmp 0x2a43
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x29d2
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)