// File: /workspace/github_c_makefile_star2_O3/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
movslq %ecx, %rax
movq 0x8(%rdi,%rax,8), %r13
testq %r13, %r13
je 0x6cb3
movl %ecx, %ebp
movq %rsi, %rbx
leal 0x1(%rax), %r14d
movq %rdi, 0x10(%rsp)
leaq (%rdi,%rax,8), %r12
addq $0x8, %r12
leaq 0xc(%rdx), %rax
movq %rax, 0x18(%rsp)
leaq 0x404(%rsi), %rax
movq %rax, 0x28(%rsp)
leaq 0x10(%rdx), %rax
movq %rax, 0x30(%rsp)
movq %rdx, 0x8(%rsp)
leaq 0x14(%rdx), %rax
movq %rax, 0x20(%rsp)
movl 0x8(%rbx), %eax
cmpl $0x24, %eax
je 0x6ac4
cmpl $0x1f, %eax
jne 0x6ada
movsbl (%r13), %edi
callq 0x7314
movq (%r12), %r13
testl %eax, %eax
jne 0x6c97
cmpb $0x2d, (%r13)
jne 0x6c79
incq %r13
movslq %ebp, %r15
movq 0x10(%rsp), %rax
movq 0x10(%rax,%r15,8), %rbp
movq 0x18(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x6b12
movq %r13, %rdi
leaq 0x6d69(%rip), %rsi      # 0xd872
callq 0x7d58
testl %eax, %eax
je 0x6b8d
cmpl $0x1f, 0x8(%rbx)
je 0x6c6b
movq %r13, %rdi
leaq 0x6d1d(%rip), %rsi      # 0xd843
callq 0x7d58
testl %eax, %eax
je 0x6b62
movl 0x8(%rbx), %eax
cmpl $0x21, %eax
je 0x6b9f
cmpl $0x20, %eax
jne 0x6bb4
movq %r13, %rdi
leaq 0x60e2(%rip), %rsi      # 0xcc28
callq 0x7d58
testl %eax, %eax
je 0x6c5e
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x691c
jmp 0x6bac
movq 0x8(%rsp), %rax
orb $0x2, (%rax)
testq %rbp, %rbp
je 0x6c6b
movq 0x28(%rsp), %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x6e30
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x6bac
movq 0x8(%rsp), %rax
orb $0x1, (%rax)
xorl %eax, %eax
testq %rbp, %rbp
sete %al
jmp 0x6bac
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x699f
testl %eax, %eax
jne 0x6c6b
leal 0x2(%r15), %ebp
addq $0x2, %r15
movq 0x18(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x6bd0
movq 0x8(%rsp), %rax
testb $0x1, (%rax)
jne 0x6c15
movl 0x8(%rbx), %eax
cmpl $0x20, %eax
movq 0x10(%rsp), %r12
jl 0x6c3d
movq 0x30(%rsp), %rcx
cmpl $0x0, (%rcx)
jne 0x6bf1
movq 0x8(%rsp), %rcx
testb $0x2, (%rcx)
jne 0x6c2a
cmpl $0x20, %eax
jne 0x6c3d
movq 0x20(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x6c3d
movq 0x8(%rsp), %rax
testb $0x4, (%rax)
je 0x6c3d
movq (%r12,%r15,8), %rsi
movq 0x20(%rsp), %rdi
jmp 0x6c33
movq 0x10(%rsp), %r12
movq (%r12,%r15,8), %rsi
movq 0x18(%rsp), %rdi
movl $0x1, %edx
jmp 0x6c35
movq (%r12,%r15,8), %rsi
movq 0x30(%rsp), %rdi
xorl %edx, %edx
callq 0x6e30
movl %ebp, %r14d
movl %r14d, %ebp
leal 0x1(%rbp), %r14d
movslq %ebp, %rax
leaq (%r12,%rax,8), %r12
addq $0x8, %r12
movq (%r12), %r13
testq %r13, %r13
jne 0x6ab7
jmp 0x6cb3
movq 0x8(%rsp), %rax
orb $0x4, (%rax)
jmp 0x6b6a
movq (%r12), %rsi
incq %rsi
movl $0x6, %edi
jmp 0x6c81
movl $0x6, %edi
movq %r13, %rsi
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2738
movq %r13, %rdi
callq 0x7154
movq 0x8(%rsp), %rdx
movl %eax, 0x8(%rdx)
cmpl $0x41, %eax
jl 0x6cc4
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 0x6cb5
cmpl $0x1f, 0x8(%rbx)
jne 0x6cb5
movl $0xffffffff, 0x8(%rdx)  # imm = 0xFFFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6cb5