// File: /workspace/github_c_makefile_star2_O2/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, -0x30(%rbp)
movq %rdi, %r12
movq $0x4c, 0x8(%rdi)
movslq %esi, %rax
movq %rax, -0x38(%rbp)
pushq $0x1
popq %r15
cmpq -0x38(%rbp), %r15
jae 0x1446
movq -0x30(%rbp), %rax
movq (%rax,%r15,8), %r13
movzbl (%r13), %r14d
leal -0x2d(%r14), %ebx
negl %ebx
movl %ebx, %eax
cmpl $0x2d, %r14d
jne 0x12d9
movzbl 0x1(%r13), %eax
subl $0x64, %eax
jne 0x12d7
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x13ae
leaq 0xd27(%rip), %rdi       # 0x200f
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x13ae
movl %ebx, %eax
cmpb $0x2d, %r14b
jne 0x1311
movzbl 0x1(%r13), %eax
subl $0x69, %eax
jne 0x130f
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x13b5
leaq 0xcf8(%rip), %rdi       # 0x2018
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x13b5
cmpb $0x2d, %r14b
jne 0x1347
movzbl 0x1(%r13), %ebx
subl $0x77, %ebx
jne 0x1345
movzbl 0x2(%r13), %ebx
negl %ebx
testl %ebx, %ebx
je 0x13c3
leaq 0xcfe(%rip), %rdi       # 0x2050
movq %r13, %rsi
pushq $0x7
popq %rdx
callq 0x1060
testl %eax, %eax
je 0x13ef
leaq 0xd17(%rip), %rdi       # 0x2083
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x1416
leaq 0xd07(%rip), %rdi       # 0x208a
movq %r13, %rsi
callq 0x10c0
testl %eax, %eax
je 0x141e
cmpq $0x0, 0x18(%r12)
jne 0x1455
movq %r13, %rdi
callq 0x1110
movq %rax, 0x18(%r12)
jmp 0x13bb
movb $0x1, (%r12)
jmp 0x13bb
movb $0x1, 0x1(%r12)
incq %r15
jmp 0x12a3
leaq 0x1(%r15), %rbx
cmpq -0x38(%rbp), %rbx
jae 0x13bb
movq -0x30(%rbp), %rax
movq 0x8(%rax,%r15,8), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x10e0
movq %rax, 0x8(%r12)
testq %rax, %rax
je 0x1426
movq %rbx, %r15
jmp 0x13bb
addq $0x7, %r13
movq %r13, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x10e0
movq %rax, 0x8(%r12)
testq %rax, %rax
jne 0x13bb
callq 0x1050
cmpl $0x16, (%rax)
jne 0x13bb
jmp 0x1472
movb $0x1, 0x10(%r12)
jmp 0x13bb
movb $0x1, 0x11(%r12)
jmp 0x13bb
callq 0x1050
cmpl $0x16, (%rax)
movq %rbx, %r15
jne 0x13bb
movq 0x2bbe(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xbe5(%rip), %rdi       # 0x2029
jmp 0x1483
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2b9c(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xc2e(%rip), %rsi       # 0x2094
movq %r13, %rdx
xorl %eax, %eax
callq 0x10d0
jmp 0x1488
movq 0x2b7f(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xbd5(%rip), %rdi       # 0x2058
callq 0x1080
pushq $0x1
popq %rdi
callq 0x1100