// File: /workspace/github_c_makefile_star2_O1/rpeepz[P]ft_ssl/srcs/rsa/ssl_rsa.c
// Function: parse_rsa
int				parse_rsa(char **av, t_ssl *ssl, t_rsa_out *rsa, int i)
{
	while ((av[++i]))
	{
		if ((ssl->type == 31 || ssl->type == 36) && ft_isdigit(av[i][0]))
		{
			if ((rsa->bits = ft_atoi(av[i])) > MAX_BIT_KEY)
				rsa->bits = MAX_BIT_KEY;
			else if (ssl->type == 31 && rsa->bits < 16)
				return ((rsa->bits = -1));
			break ;
		}
		if (av[i][0] == '-')
		{
			if (valid_arg(ssl, rsa, &av[i][1], av[i + 1]))
				return (ft_error(6, &av[i][1], ssl));
			else if (rsa->fd_out == 1 && rsa->flag & F_OUT)
				open_file_to_fd(&rsa->fd_out, av[++i], 1);
			else if (ssl->type > 31 && (!rsa->fd_in) && (rsa->flag & F_IN))
				open_file_to_fd(&rsa->fd_in, av[++i], 0);
			else if (ssl->type == 32 && (!rsa->fd_inkey) && (rsa->flag & F_INK))
				open_file_to_fd(&rsa->fd_inkey, av[++i], 0);
		}
		else
			return (ft_error(6, av[i], ssl));
	}
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %r13d
movslq %ecx, %rcx
movq 0x8(%rdi,%rcx,8), %rax
testq %rax, %rax
je 0x6572
movq %rsi, %rbx
leal 0x1(%rcx), %r14d
movq %rdi, 0x10(%rsp)
leaq (%rdi,%rcx,8), %r12
addq $0x8, %r12
leaq 0xc(%rdx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x404(%rsi), %rcx
movq %rcx, 0x20(%rsp)
leaq 0x10(%rdx), %rcx
movq %rcx, 0x30(%rsp)
movq %rdx, 0x8(%rsp)
leaq 0x14(%rdx), %rcx
movq %rcx, 0x28(%rsp)
movl 0x8(%rbx), %ecx
cmpl $0x24, %ecx
je 0x637d
cmpl $0x1f, %ecx
jne 0x638d
movsbl (%rax), %edi
callq 0x6bf4
testl %eax, %eax
jne 0x6555
movq (%r12), %rbp
cmpb $0x2d, (%rbp)
jne 0x6529
incq %rbp
movslq %r13d, %r15
movq 0x10(%rsp), %rax
movq 0x10(%rax,%r15,8), %r13
movq 0x18(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x63c8
movq %rbp, %rdi
leaq 0x7413(%rip), %rsi      # 0xd7d2
callq 0x7644
testl %eax, %eax
je 0x641f
movl $0x1, %eax
cmpl $0x1f, 0x8(%rbx)
je 0x646a
movq %rbp, %rdi
leaq 0x73c2(%rip), %rsi      # 0xd7a3
callq 0x7644
testl %eax, %eax
je 0x6431
movl 0x8(%rbx), %ecx
cmpl $0x21, %ecx
je 0x645d
xorl %eax, %eax
cmpl $0x20, %ecx
jne 0x646a
movq %rbp, %rdi
leaq 0x6825(%rip), %rsi      # 0xcc28
callq 0x7644
testl %eax, %eax
je 0x651c
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x61d4
jmp 0x646a
movq 0x8(%rsp), %rax
orb $0x1, (%rax)
xorl %eax, %eax
testq %r13, %r13
sete %al
jmp 0x646a
movq 0x8(%rsp), %rax
orb $0x2, (%rax)
movl $0x1, %eax
testq %r13, %r13
je 0x646a
movq 0x20(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x6718
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x646a
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x6257
testl %eax, %eax
jne 0x6533
leal 0x2(%r15), %ebp
addq $0x2, %r15
movq 0x18(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x648e
movq 0x8(%rsp), %rax
testb $0x1, (%rax)
jne 0x64d3
movl 0x8(%rbx), %eax
cmpl $0x20, %eax
movq 0x10(%rsp), %r12
jl 0x64af
movq 0x30(%rsp), %rcx
cmpl $0x0, (%rcx)
jne 0x64af
movq 0x8(%rsp), %rcx
testb $0x2, (%rcx)
jne 0x64e8
cmpl $0x20, %eax
jne 0x64fb
movq 0x28(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x64fb
movq 0x8(%rsp), %rax
testb $0x4, (%rax)
je 0x64fb
movq (%r12,%r15,8), %rsi
movq 0x28(%rsp), %rdi
jmp 0x64f1
movq 0x10(%rsp), %r12
movq (%r12,%r15,8), %rsi
movq 0x18(%rsp), %rdi
movl $0x1, %edx
jmp 0x64f3
movq (%r12,%r15,8), %rsi
movq 0x30(%rsp), %rdi
xorl %edx, %edx
callq 0x6718
movl %ebp, %r14d
movl %r14d, %r13d
leal 0x1(%r13), %r14d
movslq %r13d, %rax
leaq (%r12,%rax,8), %r12
addq $0x8, %r12
movq (%r12), %rax
testq %rax, %rax
jne 0x6370
jmp 0x6572
movq 0x8(%rsp), %rax
orb $0x4, (%rax)
jmp 0x6439
movl $0x6, %edi
movq %rbp, %rsi
jmp 0x653f
movq (%r12), %rsi
incq %rsi
movl $0x6, %edi
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2729
movq (%r12), %rdi
callq 0x6a30
movq 0x8(%rsp), %rdx
movl %eax, 0x8(%rdx)
cmpl $0x41, %eax
jl 0x6583
movl $0x40, 0x8(%rdx)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ecx
xorl %eax, %eax
cmpl $0xf, %ecx
jg 0x6574
cmpl $0x1f, 0x8(%rbx)
jne 0x6574
movl $0xffffffff, 0x8(%rdx)  # imm = 0xFFFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6574