// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
movslq %ecx, %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x9967
movq -0x18(%rbp), %rax
cmpl $0x1f, 0x8(%rax)
je 0x9786
movq -0x18(%rbp), %rax
cmpl $0x24, 0x8(%rax)
jne 0x97fb
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %edi
callq 0xa4f0
cmpl $0x0, %eax
je 0x97fb
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xa0a0
movq -0x20(%rbp), %rcx
movl %eax, 0x8(%rcx)
cmpl $0x40, %eax
jle 0x97c9
movq -0x20(%rbp), %rax
movl $0x40, 0x8(%rax)
jmp 0x97f6
movq -0x18(%rbp), %rax
cmpl $0x1f, 0x8(%rax)
jne 0x97f4
movq -0x20(%rbp), %rax
cmpl $0x10, 0x8(%rax)
jge 0x97f4
movq -0x20(%rbp), %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x996e
jmp 0x97f6
jmp 0x9967
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x9943
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
callq 0x9980
cmpl $0x0, %eax
je 0x986c
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
addq $0x1, %rsi
movq -0x18(%rbp), %rdx
movl $0x6, %edi
callq 0x33a0
movl %eax, -0x4(%rbp)
jmp 0x996e
movq -0x20(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x98af
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x98af
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
movl $0x1, %edx
callq 0x9ce0
jmp 0x993f
movq -0x18(%rbp), %rax
cmpl $0x1f, 0x8(%rax)
jle 0x98f6
movq -0x20(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x98f6
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x98f6
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
xorl %edx, %edx
callq 0x9ce0
jmp 0x993d
movq -0x18(%rbp), %rax
cmpl $0x20, 0x8(%rax)
jne 0x993b
movq -0x20(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x993b
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x993b
movq -0x20(%rbp), %rdi
addq $0x14, %rdi
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
xorl %edx, %edx
callq 0x9ce0
jmp 0x993d
jmp 0x993f
jmp 0x9941
jmp 0x9962
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x18(%rbp), %rdx
movl $0x6, %edi
callq 0x33a0
movl %eax, -0x4(%rbp)
jmp 0x996e
jmp 0x9757
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)