// File: /workspace/github_c_makefile_star2_O3/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
subq $0x18, %rsp
movq %rdx, -0x38(%rbp)
movq $0x4c, 0x8(%rdi)
cmpl $0x2, %esi
jb 0x14af
movq %rdi, %r14
movslq %esi, %rax
movq %rax, -0x30(%rbp)
movl $0x1, %r15d
movq -0x38(%rbp), %rax
movq (%rax,%r15,8), %r13
movzbl (%r13), %r12d
leal -0x2d(%r12), %ebx
negl %ebx
movl %ebx, %eax
cmpl $0x2d, %r12d
jne 0x134b
movzbl 0x1(%r13), %eax
subl $0x64, %eax
jne 0x1349
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x1420
leaq 0xcb5(%rip), %rdi       # 0x200f
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x1420
movl %ebx, %eax
cmpb $0x2d, %r12b
jne 0x1383
movzbl 0x1(%r13), %eax
subl $0x69, %eax
jne 0x1381
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x1426
leaq 0xc86(%rip), %rdi       # 0x2018
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x1426
cmpb $0x2d, %r12b
jne 0x13b9
movzbl 0x1(%r13), %ebx
subl $0x77, %ebx
jne 0x13b7
movzbl 0x2(%r13), %ebx
negl %ebx
testl %ebx, %ebx
je 0x143a
movl $0x7, %edx
leaq 0xc87(%rip), %rdi       # 0x2050
movq %r13, %rsi
callq 0x1060
testl %eax, %eax
je 0x1467
leaq 0xca3(%rip), %rdi       # 0x2083
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x148f
leaq 0xc93(%rip), %rdi       # 0x208a
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x1496
cmpq $0x0, 0x18(%r14)
jne 0x14be
movq %r13, %rdi
callq 0x1110
movq %rax, 0x18(%r14)
jmp 0x142b
movb $0x1, (%r14)
jmp 0x142b
movb $0x1, 0x1(%r14)
incq %r15
cmpq -0x30(%rbp), %r15
jb 0x131e
jmp 0x14af
leaq 0x1(%r15), %rbx
cmpq -0x30(%rbp), %rbx
jae 0x142b
movq -0x38(%rbp), %rax
movq 0x8(%rax,%r15,8), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x10e0
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x149d
movq %rbx, %r15
jmp 0x142b
addq $0x7, %r13
movq %r13, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x10e0
movq %rax, 0x8(%r14)
testq %rax, %rax
jne 0x142b
callq 0x1050
cmpl $0x16, (%rax)
jne 0x142b
jmp 0x14c6
movb $0x1, 0x10(%r14)
jmp 0x142b
movb $0x1, 0x11(%r14)
jmp 0x142b
callq 0x1050
cmpl $0x16, (%rax)
movq %rbx, %r15
jne 0x142b
callq 0x1189
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x1140
callq 0x1167