// File: /workspace/github_c_makefile_star2_O0/chatziko-k08[P]lecture-code/tests/../include/acutest.h
// Function: acutest_cmdline_read_
static int
acutest_cmdline_read_(const ACUTEST_CMDLINE_OPTION_* options, int argc, char** argv,
                      int (*callback)(int /*optval*/, const char* /*arg*/))
{

    const ACUTEST_CMDLINE_OPTION_* opt;
    char auxbuf[ACUTEST_CMDLINE_AUXBUF_SIZE_+1];
    int after_doubledash = 0;
    int i = 1;
    int ret = 0;

    auxbuf[ACUTEST_CMDLINE_AUXBUF_SIZE_] = '\0';

    while(i < argc) {
        if(after_doubledash  ||  strcmp(argv[i], "-") == 0) {
            /* Non-option argument. */
            ret = callback(ACUTEST_CMDLINE_OPTID_NONE_, argv[i]);
        } else if(strcmp(argv[i], "--") == 0) {
            /* End of options. All the remaining members are non-option arguments. */
            after_doubledash = 1;
        } else if(argv[i][0] != '-') {
            /* Non-option argument. */
            ret = callback(ACUTEST_CMDLINE_OPTID_NONE_, argv[i]);
        } else {
            for(opt = options; opt->id != 0; opt++) {
                if(opt->longname != NULL  &&  strncmp(argv[i], "--", 2) == 0) {
                    size_t len = strlen(opt->longname);
                    if(strncmp(argv[i]+2, opt->longname, len) == 0) {
                        /* Regular long option. */
                        if(argv[i][2+len] == '\0') {
                            /* with no argument provided. */
                            if(!(opt->flags & ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_))
                                ret = callback(opt->id, NULL);
                            else
                                ret = callback(ACUTEST_CMDLINE_OPTID_MISSINGARG_, argv[i]);
                            break;
                        } else if(argv[i][2+len] == '=') {
                            /* with an argument provided. */
                            if(opt->flags & (ACUTEST_CMDLINE_OPTFLAG_OPTIONALARG_ | ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_)) {
                                ret = callback(opt->id, argv[i]+2+len+1);
                            } else {
                                sprintf(auxbuf, "--%s", opt->longname);
                                ret = callback(ACUTEST_CMDLINE_OPTID_BOGUSARG_, auxbuf);
                            }
                            break;
                        } else {
                            continue;
                        }
                    }
                } else if(opt->shortname != '\0'  &&  argv[i][0] == '-') {
                    if(argv[i][1] == opt->shortname) {
                        /* Regular short option. */
                        if(opt->flags & ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_) {
                            if(argv[i][2] != '\0')
                                ret = callback(opt->id, argv[i]+2);
                            else if(i+1 < argc)
                                ret = callback(opt->id, argv[++i]);
                            else
                                ret = callback(ACUTEST_CMDLINE_OPTID_MISSINGARG_, argv[i]);
                            break;
                        } else {
                            ret = callback(opt->id, NULL);

                            /* There might be more (argument-less) short options
                             * grouped together. */
                            if(ret == 0  &&  argv[i][2] != '\0')
                                ret = acutest_cmdline_handle_short_opt_group_(options, argv[i]+2, callback);
                            break;
                        }
                    }
                }
            }

            if(opt->id == 0) {  /* still not handled? */
                if(argv[i][0] != '-') {
                    /* Non-option argument. */
                    ret = callback(ACUTEST_CMDLINE_OPTID_NONE_, argv[i]);
                } else {
                    /* Unknown option. */
                    char* badoptname = argv[i];

                    if(strncmp(badoptname, "--", 2) == 0) {
                        /* Strip any argument from the long option. */
                        char* assignment = strchr(badoptname, '=');
                        if(assignment != NULL) {
                            size_t len = assignment - badoptname;
                            if(len > ACUTEST_CMDLINE_AUXBUF_SIZE_)
                                len = ACUTEST_CMDLINE_AUXBUF_SIZE_;
                            strncpy(auxbuf, badoptname, len);
                            auxbuf[len] = '\0';
                            badoptname = auxbuf;
                        }
                    }

                    ret = callback(ACUTEST_CMDLINE_OPTID_UNKNOWN_, badoptname);
                }
            }
        }

        if(ret != 0)
            return ret;
        i++;
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x1, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
movb $0x0, -0x40(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x38d8
cmpl $0x0, -0x64(%rbp)
jne 0x3492
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x50ed(%rip), %rsi      # 0x8575
callq 0x2150
cmpl $0x0, %eax
jne 0x34ae
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x68(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
xorl %edi, %edi
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x38bc
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x50b3(%rip), %rsi      # 0x8574
callq 0x2150
cmpl $0x0, %eax
jne 0x34d7
movl $0x1, -0x64(%rbp)
jmp 0x38ba
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x3507
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x68(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
xorl %edi, %edi
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x38b8
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x37c7
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x367f
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x5035(%rip), %rsi      # 0x8574
movl $0x2, %edx
callq 0x2060
cmpl $0x0, %eax
jne 0x367f
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x20b0
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x2, %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x78(%rbp), %rdx
callq 0x2060
cmpl $0x0, %eax
jne 0x367a
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x78(%rbp), %rcx
addq $0x2, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x35ee
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x35cf
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x10(%rcx), %edi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x35e9
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x68(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
movl $0x80000002, %edi       # imm = 0x80000002
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x37c7
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x78(%rbp), %rcx
addq $0x2, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
jne 0x3675
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x3644
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x10(%rcx), %edi
movq -0x20(%rbp), %rcx
movslq -0x68(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
addq $0x2, %rsi
addq -0x78(%rbp), %rsi
addq $0x1, %rsi
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x3670
leaq -0x60(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x4ffd(%rip), %rsi      # 0x8654
movb $0x0, %al
callq 0x2200
movq -0x28(%rbp), %rax
leaq -0x60(%rbp), %rsi
movl $0x80000003, %edi       # imm = 0x80000003
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x37c7
jmp 0x37b6
jmp 0x37b4
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x37b2
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x37b2
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x37b0
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x375f
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x3710
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x10(%rcx), %edi
movq -0x20(%rbp), %rcx
movslq -0x68(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
addq $0x2, %rsi
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x375d
movl -0x68(%rbp), %eax
addl $0x1, %eax
cmpl -0x14(%rbp), %eax
jge 0x3741
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x10(%rcx), %edi
movq -0x20(%rbp), %rcx
movl -0x68(%rbp), %edx
addl $0x1, %edx
movl %edx, -0x68(%rbp)
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rsi
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x375b
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x68(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
movl $0x80000002, %edi       # imm = 0x80000002
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x375d
jmp 0x37c7
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x10(%rcx), %edi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
jne 0x37ae
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x37ae
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
addq $0x2, %rsi
movq -0x28(%rbp), %rdx
callq 0x5350
movl %eax, -0x6c(%rbp)
jmp 0x37c7
jmp 0x37b2
jmp 0x37b4
jmp 0x37b6
movq -0x30(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x30(%rbp)
jmp 0x350f
movq -0x30(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x38b6
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x3805
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x68(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
xorl %edi, %edi
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x38b4
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
leaq 0x4d54(%rip), %rsi      # 0x8574
movl $0x2, %edx
callq 0x2060
cmpl $0x0, %eax
jne 0x38a2
movq -0x80(%rbp), %rdi
movl $0x3d, %esi
callq 0x20c0
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x38a0
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x90(%rbp)
cmpq $0x20, -0x90(%rbp)
jbe 0x3878
movq $0x20, -0x90(%rbp)
leaq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x90(%rbp), %rdx
callq 0x2050
movq -0x90(%rbp), %rax
movb $0x0, -0x60(%rbp,%rax)
leaq -0x60(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x38a2
movq -0x28(%rbp), %rax
movq -0x80(%rbp), %rsi
movl $0x80000001, %edi       # imm = 0x80000001
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x38b6
jmp 0x38b8
jmp 0x38ba
jmp 0x38bc
cmpl $0x0, -0x6c(%rbp)
je 0x38ca
movl -0x6c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x38de
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x3463
movl -0x6c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)