// File: /workspace/github_c_makefile_star2_O1/ikbenlike[P]nngutils/src/base64.c
// Function: parse_args
struct base64_args *parse_args(struct base64_args *args, int argc, char **argv){
    args->wrap = 76;
    for(size_t i = 1; i < argc; i++){
        if(!strcmp("-d", argv[i]) || !strcmp("--decode", argv[i])){
            args->decode = true;
        }
        else if(!strcmp("-i", argv[i]) || !strcmp("--ignore-garbage", argv[i])){
            args->ignore_garbage = true;
        }
        else if(!strcmp("-w", argv[i])){
            if(i + 1 < argc){
                args->wrap = strtol(argv[++i], NULL, 10);
                if(args->wrap == 0 && errno == EINVAL){
                    fputs("Missing amount of columns for -w flag!", stderr);
                    exit(1);
                }
            }

        }
        else if(!strncmp("--wrap=", argv[i], 7)){
            args->wrap = strtol(argv[i]+7, NULL, 10);
            if(args->wrap == 0 && errno == EINVAL){
                fputs("Missing amount of columns in --wrap= flag!", stderr);
                exit(1);
            }
        }
        else if(!strcmp("--help", argv[i])){
            args->help = true;
        }
        else if(!strcmp("--version", argv[i])){
            args->version = true;
        }
        else {
            if(args->file == NULL){
                args->file = strdup(argv[i]);
            }
            else {
                fprintf(stderr, "Extra argument %s", argv[i]);
                exit(1);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq $0x4c, 0x8(%rdi)
cmpl $0x2, %esi
jb 0x1471
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %r12
movl $0x1, %r15d
movq (%rbx,%r15,8), %r13
leaq 0xcee(%rip), %rdi       # 0x200f
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x13e8
leaq 0xcda(%rip), %rdi       # 0x2012
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x13e8
leaq 0xccc(%rip), %rdi       # 0x201b
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x13ee
leaq 0xcb8(%rip), %rdi       # 0x201e
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x13ee
leaq 0xcb6(%rip), %rdi       # 0x202f
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x1401
movl $0x7, %edx
leaq 0xcc8(%rip), %rdi       # 0x2059
movq %r13, %rsi
callq 0x1060
testl %eax, %eax
je 0x1429
leaq 0xce4(%rip), %rdi       # 0x208c
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x1451
leaq 0xcd4(%rip), %rdi       # 0x2093
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x1458
cmpq $0x0, 0x18(%r14)
jne 0x1480
movq %r13, %rdi
callq 0x1110
movq %rax, 0x18(%r14)
jmp 0x13f3
movb $0x1, (%r14)
jmp 0x13f3
movb $0x1, 0x1(%r14)
incq %r15
cmpq %r12, %r15
jb 0x1316
jmp 0x1471
leaq 0x1(%r15), %r13
cmpq %r12, %r13
jae 0x13f3
movq 0x8(%rbx,%r15,8), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x10e0
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x145f
movq %r13, %r15
jmp 0x13f3
addq $0x7, %r13
movq %r13, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x10e0
movq %rax, 0x8(%r14)
testq %rax, %rax
jne 0x13f3
callq 0x1050
cmpl $0x16, (%rax)
jne 0x13f3
jmp 0x1488
movb $0x1, 0x10(%r14)
jmp 0x13f3
movb $0x1, 0x11(%r14)
jmp 0x13f3
callq 0x1050
cmpl $0x16, (%rax)
movq %r13, %r15
jne 0x13f3
callq 0x1189
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x1140
callq 0x1167