// File: /workspace/github_c_makefile_star2_O2/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
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xc(%rdx), %rax
movq %rax, 0x10(%rsp)
leaq 0x404(%rsi), %rax
movq %rax, 0x20(%rsp)
leaq 0x10(%rdx), %rax
movq %rax, 0x28(%rsp)
movq %rdx, 0x8(%rsp)
leaq 0x14(%rdx), %rax
movq %rax, 0x18(%rsp)
movslq %r13d, %r12
movq 0x8(%r15,%r12,8), %rbp
testq %rbp, %rbp
je 0x60f6
leaq 0x1(%r12), %r14
movl 0x8(%rbx), %eax
cmpl $0x24, %eax
je 0x5f20
cmpl $0x1f, %eax
jne 0x5f35
movsbl (%rbp), %edi
callq 0x66c8
movq (%r15,%r14,8), %rbp
testl %eax, %eax
jne 0x60da
cmpb $0x2d, (%rbp)
jne 0x60be
movq %r14, 0x30(%rsp)
incq %rbp
movq 0x10(%r15,%r12,8), %r14
movq 0x10(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x5f69
movq %rbp, %rdi
leaq 0x6872(%rip), %rsi      # 0xc7d2
callq 0x70f4
testl %eax, %eax
je 0x5fe4
cmpl $0x1f, 0x8(%rbx)
je 0x60ad
movq %rbp, %rdi
leaq 0x6826(%rip), %rsi      # 0xc7a3
callq 0x70f4
testl %eax, %eax
je 0x5fb9
movl 0x8(%rbx), %eax
cmpl $0x21, %eax
je 0x5ff6
cmpl $0x20, %eax
jne 0x600b
movq %rbp, %rdi
leaq 0x5c8b(%rip), %rsi      # 0xbc28
callq 0x70f4
testl %eax, %eax
je 0x60a0
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x5d94
jmp 0x6003
movq 0x8(%rsp), %rax
orb $0x2, (%rax)
testq %r14, %r14
je 0x60ad
movq 0x20(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6264
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x6003
movq 0x8(%rsp), %rax
orb $0x1, (%rax)
xorl %eax, %eax
testq %r14, %r14
sete %al
jmp 0x6003
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x5e13
testl %eax, %eax
jne 0x60ad
leal 0x2(%r13), %ebp
addq $0x2, %r12
movq 0x10(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x6027
movq 0x8(%rsp), %rax
testb $0x1, (%rax)
jne 0x607a
incl %r13d
movl 0x8(%rbx), %eax
cmpl $0x20, %eax
jl 0x5efd
movq 0x28(%rsp), %rcx
cmpl $0x0, (%rcx)
jne 0x604a
movq 0x8(%rsp), %rcx
testb $0x2, (%rcx)
jne 0x6088
cmpl $0x20, %eax
jne 0x5efd
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x5efd
movq 0x8(%rsp), %rax
testb $0x4, (%rax)
je 0x5efd
movq (%r15,%r12,8), %rsi
movq 0x18(%rsp), %rdi
jmp 0x6091
movq (%r15,%r12,8), %rsi
movq 0x10(%rsp), %rdi
pushq $0x1
popq %rdx
jmp 0x6093
movq (%r15,%r12,8), %rsi
movq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x6264
movl %ebp, %r13d
jmp 0x5efd
movq 0x8(%rsp), %rax
orb $0x4, (%rax)
jmp 0x5fc1
movq 0x30(%rsp), %rax
movq (%r15,%rax,8), %rsi
incq %rsi
pushq $0x6
popq %rdi
jmp 0x60c4
pushq $0x6
popq %rdi
movq %rbp, %rsi
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2608
movq %rbp, %rdi
callq 0x6554
movq 0x8(%rsp), %rcx
movl %eax, 0x8(%rcx)
cmpl $0x41, %eax
jl 0x6107
movl $0x40, 0x8(%rcx)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xf, %eax
jg 0x60f6
cmpl $0x1f, 0x8(%rbx)
movl $0x0, %eax
jne 0x60f8
orl $-0x1, 0x8(%rcx)
pushq $-0x1
popq %rax
jmp 0x60f8