// File: /workspace/github_c_makefile_star2_O0/rpeepz[P]ft_ssl/srcs/rsa/rsa_out.c
// Function: rsa_out_options
void			rsa_out_options(t_rsa_out rsa, t_rsa gg, char option)
{
	if (option == 'o')
	{
		ft_putstr_fd("writing RSA key\n", 2);
		rsa_encode_out(rsa, gg);
	}
	else if (option == 'c' && !(option = 0))
	{
		if ((gg.p * gg.q != gg.n) && (option |= 0x1))
			ft_putstr_fd(N_NOT_PQ, rsa.fd_out);
		if (!(ft_is_primary(gg.p, 9.0F)) && (option |= 0x1))
			ft_putstr_fd(P_NOT_PRIME, rsa.fd_out);
		if (!(ft_is_primary(gg.q, 9.0F)) && (option |= 0x1))
			ft_putstr_fd(Q_NOT_PRIME, rsa.fd_out);
		if (mulmod(gg.q, gg.iqmp, gg.p) != 1 && (option |= 0x1))
			ft_putstr_fd(NOT_INV_Q, rsa.fd_out);
		if ((mulmod(gg.dmp1, gg.e, gg.p - 1) != 1 ||\
			mulmod(gg.dmq1, gg.e, gg.q - 1) != 1) && (option |= 0x1))
			ft_putstr_fd(DE_NOT_CONG, rsa.fd_out);
	}
	if (!option)
		ft_putstr_fd("RSA key ok\n", rsa.fd_out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %dil, %al
leaq 0x28(%rbp), %rcx
movq %rcx, -0x18(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movb %al, -0x1(%rbp)
movsbl -0x1(%rbp), %eax
cmpl $0x6f, %eax
jne 0x7a65
leaq 0xc7f0(%rip), %rdi      # 0x14201
movl $0x2, %esi
callq 0xb230
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq 0x40(%rdx), %rsi
movq %rsp, %rax
movq %rsi, 0x58(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups 0x20(%rdx), %xmm2
movups 0x30(%rdx), %xmm3
movups %xmm3, 0x48(%rax)
movups %xmm2, 0x38(%rax)
movups %xmm1, 0x28(%rax)
movups %xmm0, 0x18(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
callq 0x7730
jmp 0x7bd9
movsbl -0x1(%rbp), %eax
cmpl $0x63, %eax
jne 0x7bd7
movb $0x0, -0x1(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x7bd7
movq -0x18(%rbp), %rcx
movq (%rcx), %rax
imulq 0x8(%rcx), %rax
cmpq 0x10(%rcx), %rax
je 0x7ab7
movsbl -0x1(%rbp), %eax
orl $0x1, %eax
movb %al, -0x1(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x7ab7
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
leaq 0xc760(%rip), %rdi      # 0x14212
callq 0xb230
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movss 0xc2c6(%rip), %xmm0     # 0x13d8c
callq 0x4b80
cmpl $0x0, %eax
jne 0x7af5
movsbl -0x1(%rbp), %eax
orl $0x1, %eax
movb %al, -0x1(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x7af5
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
leaq 0xc747(%rip), %rdi      # 0x14237
callq 0xb230
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movss 0xc287(%rip), %xmm0     # 0x13d8c
callq 0x4b80
cmpl $0x0, %eax
jne 0x7b34
movsbl -0x1(%rbp), %eax
orl $0x1, %eax
movb %al, -0x1(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x7b34
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
leaq 0xc724(%rip), %rdi      # 0x14253
callq 0xb230
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq 0x30(%rax), %rsi
movq (%rax), %rdx
callq 0x4ff0
cmpq $0x1, %rax
je 0x7b73
movsbl -0x1(%rbp), %eax
orl $0x1, %eax
movb %al, -0x1(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x7b73
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
leaq 0xc701(%rip), %rdi      # 0x1426f
callq 0xb230
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
movq 0x38(%rax), %rsi
movq (%rax), %rdx
subq $0x1, %rdx
callq 0x4ff0
cmpq $0x1, %rax
jne 0x7bb0
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
movq 0x38(%rax), %rsi
movq 0x8(%rax), %rdx
subq $0x1, %rdx
callq 0x4ff0
cmpq $0x1, %rax
je 0x7bd5
movsbl -0x1(%rbp), %eax
orl $0x1, %eax
movb %al, -0x1(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x7bd5
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
leaq 0xc6c5(%rip), %rdi      # 0x14295
callq 0xb230
jmp 0x7bd7
jmp 0x7bd9
cmpb $0x0, -0x1(%rbp)
jne 0x7bf2
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
leaq 0xc6cf(%rip), %rdi      # 0x142bc
callq 0xb230
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)