// File: /workspace/github_c_makefile_star2_O0/giannisdravilas[P]Disease-Monitor/tests/../include/acutest.h
// Function: test_cmdline_read__
static int
test_cmdline_read__(const TEST_CMDLINE_OPTION__* options, int argc, char** argv,
                    int (*callback)(int /*optval*/, const char* /*arg*/))
{

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

    auxbuf[TEST_CMDLINE_AUXBUF_SIZE__] = '\0';

    while(i < argc) {
        if(after_doubledash  ||  strcmp(argv[i], "-") == 0) {
            /* Non-option argument. */
            ret = callback(TEST_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(TEST_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 & TEST_CMDLINE_OPTFLAG_REQUIREDARG__))
                                ret = callback(opt->id, NULL);
                            else
                                ret = callback(TEST_CMDLINE_OPTID_MISSINGARG__, argv[i]);
                            break;
                        } else if(argv[i][2+len] == '=') {
                            /* with an argument provided. */
                            if(opt->flags & (TEST_CMDLINE_OPTFLAG_OPTIONALARG__ | TEST_CMDLINE_OPTFLAG_REQUIREDARG__)) {
                                ret = callback(opt->id, argv[i]+2+len+1);
                            } else {
                                sprintf(auxbuf, "--%s", opt->longname);
                                ret = callback(TEST_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 & TEST_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(TEST_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 = test_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(TEST_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 > TEST_CMDLINE_AUXBUF_SIZE__)
                                len = TEST_CMDLINE_AUXBUF_SIZE__;
                            strncpy(auxbuf, badoptname, len);
                            auxbuf[len] = '\0';
                            badoptname = auxbuf;
                        }
                    }

                    ret = callback(TEST_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 0x38b8
cmpl $0x0, -0x64(%rbp)
jne 0x3472
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x8210(%rip), %rsi      # 0xb678
callq 0x2160
cmpl $0x0, %eax
jne 0x348e
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 0x389c
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x81d6(%rip), %rsi      # 0xb677
callq 0x2160
cmpl $0x0, %eax
jne 0x34b7
movl $0x1, -0x64(%rbp)
jmp 0x389a
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x34e7
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 0x3898
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x37a7
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x365f
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x8158(%rip), %rsi      # 0xb677
movl $0x2, %edx
callq 0x2060
cmpl $0x0, %eax
jne 0x365f
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 0x365a
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 0x35ce
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x35af
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 0x35c9
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 0x37a7
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 0x3655
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x3624
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 0x3650
leaq -0x60(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x8043(%rip), %rsi      # 0xb67a
movb $0x0, %al
callq 0x2230
movq -0x28(%rbp), %rax
leaq -0x60(%rbp), %rsi
movl $0x80000003, %edi       # imm = 0x80000003
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x37a7
jmp 0x3796
jmp 0x3794
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3792
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x3792
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 0x3790
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x373f
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x36f0
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 0x373d
movl -0x68(%rbp), %eax
addl $0x1, %eax
cmpl -0x14(%rbp), %eax
jge 0x3721
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 0x373b
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 0x373d
jmp 0x37a7
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 0x378e
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x378e
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 0x4f30
movl %eax, -0x6c(%rbp)
jmp 0x37a7
jmp 0x3792
jmp 0x3794
jmp 0x3796
movq -0x30(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x30(%rbp)
jmp 0x34ef
movq -0x30(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x3896
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x37e5
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 0x3894
movq -0x20(%rbp), %rax
movslq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
leaq 0x7e77(%rip), %rsi      # 0xb677
movl $0x2, %edx
callq 0x2060
cmpl $0x0, %eax
jne 0x3882
movq -0x80(%rbp), %rdi
movl $0x3d, %esi
callq 0x20d0
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x3880
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x90(%rbp)
cmpq $0x20, -0x90(%rbp)
jbe 0x3858
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 0x3882
movq -0x28(%rbp), %rax
movq -0x80(%rbp), %rsi
movl $0x80000001, %edi       # imm = 0x80000001
callq *%rax
movl %eax, -0x6c(%rbp)
jmp 0x3896
jmp 0x3898
jmp 0x389a
jmp 0x389c
cmpl $0x0, -0x6c(%rbp)
je 0x38aa
movl -0x6c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x38be
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x3443
movl -0x6c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)