// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq $0x4c, 0x8(%rax)
movq $0x1, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
jae 0x154c
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xd24(%rip), %rdi       # 0x200f
callq 0x10d0
cmpl $0x0, %eax
je 0x1312
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xd0a(%rip), %rdi       # 0x2012
callq 0x10d0
cmpl $0x0, %eax
jne 0x131e
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
jmp 0x1539
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xcea(%rip), %rdi       # 0x201b
callq 0x10d0
cmpl $0x0, %eax
je 0x1358
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xcd0(%rip), %rdi       # 0x201e
callq 0x10d0
cmpl $0x0, %eax
jne 0x1365
movq -0x10(%rbp), %rax
movb $0x1, 0x1(%rax)
jmp 0x1537
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xcb7(%rip), %rdi       # 0x202f
callq 0x10d0
cmpl $0x0, %eax
jne 0x1400
movq -0x28(%rbp), %rax
addq $0x1, %rax
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
jae 0x13fb
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movq 0x8(%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x10f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x13f9
callq 0x1050
cmpl $0x16, (%rax)
jne 0x13f9
movq 0x2c18(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xc48(%rip), %rdi       # 0x2032
callq 0x1080
movl $0x1, %edi
callq 0x1110
jmp 0x13fb
jmp 0x1535
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xc46(%rip), %rdi       # 0x2059
movl $0x7, %edx
callq 0x1060
cmpl $0x0, %eax
jne 0x1485
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x7, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x10f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1480
callq 0x1050
cmpl $0x16, (%rax)
jne 0x1480
movq 0x2b91(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xbf0(%rip), %rdi       # 0x2061
callq 0x1080
movl $0x1, %edi
callq 0x1110
jmp 0x1533
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xbf4(%rip), %rdi       # 0x208c
callq 0x10d0
cmpl $0x0, %eax
jne 0x14af
movq -0x10(%rbp), %rax
movb $0x1, 0x10(%rax)
jmp 0x1531
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xbd1(%rip), %rdi       # 0x2093
callq 0x10d0
cmpl $0x0, %eax
jne 0x14d6
movq -0x10(%rbp), %rax
movb $0x1, 0x11(%rax)
jmp 0x152f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x14ff
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1120
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x152d
movq 0x2af2(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0xb81(%rip), %rsi       # 0x209d
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1110
jmp 0x152f
jmp 0x1531
jmp 0x1533
jmp 0x1535
jmp 0x1537
jmp 0x1539
jmp 0x153b
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x12c7
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)