// File: /workspace/github_c_makefile_star2_O0/rpeepz[P]ft_ssl/srcs/rsa/rsa_out.c
// Function: rsa_text_out
void			rsa_text_out(t_rsa_out rsa, t_rsa gg)
{
	char	buf[PAGESIZE];

	ft_bzero(buf, PAGESIZE);
	ft_sprintf(buf, "%s-Key: (%d bit)\n",
	rsa.flag & R_PUBIN ? "Public" : "Private", rsa.bits);
	ft_sprintf(&buf[ft_strlen(buf)], "%codulus: %llu (%#llx)\n",\
	rsa.flag & R_PUBIN ? 'M' : 'm', gg.n, gg.n);
	ft_sprintf(&buf[ft_strlen(buf)], "%sxponent: %llu (%#llx)\n",
	rsa.flag & R_PUBIN ? "E" : "publicE", gg.e, gg.e);
	if (!(rsa.flag & R_PUBIN))
	{
		ft_sprintf(&buf[ft_strlen(buf)],
		"privateExponent: %llu (%#llx)\n", gg.d, gg.d);
		ft_sprintf(&buf[ft_strlen(buf)], "prime1: %llu (%#llx)\n", gg.p, gg.p);
		ft_sprintf(&buf[ft_strlen(buf)], "prime2: %llu (%#llx)\n", gg.q, gg.q);
		ft_sprintf(&buf[ft_strlen(buf)],
		"exponent1: %llu (%#llx)\n", gg.dmp1, gg.dmp1);
		ft_sprintf(&buf[ft_strlen(buf)],
		"exponent2: %llu (%#llx)\n", gg.dmq1, gg.dmq1);
		ft_sprintf(&buf[ft_strlen(buf)],
		"coefficient: %llu (%#llx)\n", gg.iqmp, gg.iqmp);
	}
	ft_putstr_fd(buf, rsa.fd_out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1010, %rsp           # imm = 0x1010
leaq 0x28(%rbp), %rax
movq %rax, -0x1010(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x1008(%rbp)
leaq -0x1000(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0xa600
movq -0x1008(%rbp), %rax
leaq -0x1000(%rbp), %rdi
movl (%rax), %esi
andl $0x20, %esi
leaq 0xcc3c(%rip), %rdx      # 0x14128
leaq 0xcc2e(%rip), %rcx      # 0x14121
cmpl $0x0, %esi
cmovneq %rcx, %rdx
movl 0x8(%rax), %ecx
leaq 0xcc0b(%rip), %rsi      # 0x1410f
movb $0x0, %al
callq 0xb3d0
leaq -0x1000(%rbp), %rdi
callq 0xbf10
movq -0x1008(%rbp), %rcx
movq %rax, %rdx
movq -0x1010(%rbp), %rax
leaq -0x1000(%rbp), %rdi
addq %rdx, %rdi
movl (%rcx), %esi
andl $0x20, %esi
movl $0x6d, %edx
movl $0x4d, %ecx
cmpl $0x0, %esi
cmovnel %ecx, %edx
movq 0x10(%rax), %rcx
movq 0x10(%rax), %r8
leaq 0xcbda(%rip), %rsi      # 0x14130
movb $0x0, %al
callq 0xb3d0
leaq -0x1000(%rbp), %rdi
callq 0xbf10
movq -0x1008(%rbp), %rcx
movq %rax, %rdx
movq -0x1010(%rbp), %rax
leaq -0x1000(%rbp), %rdi
addq %rdx, %rdi
movl (%rcx), %esi
andl $0x20, %esi
leaq 0xcbd1(%rip), %rdx      # 0x14161
leaq 0xcbd0(%rip), %rcx      # 0x14167
cmpl $0x0, %esi
cmovneq %rcx, %rdx
movq 0x38(%rax), %rcx
movq 0x38(%rax), %r8
leaq 0xcb9b(%rip), %rsi      # 0x14148
movb $0x0, %al
callq 0xb3d0
movq -0x1008(%rbp), %rax
movl (%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x770b
leaq -0x1000(%rbp), %rdi
callq 0xbf10
movq %rax, %rcx
movq -0x1010(%rbp), %rax
leaq -0x1000(%rbp), %rdi
addq %rcx, %rdi
movq 0x40(%rax), %rdx
movq 0x40(%rax), %rcx
leaq 0xcb71(%rip), %rsi      # 0x14169
movb $0x0, %al
callq 0xb3d0
leaq -0x1000(%rbp), %rdi
callq 0xbf10
movq %rax, %rcx
movq -0x1010(%rbp), %rax
leaq -0x1000(%rbp), %rdi
addq %rcx, %rdi
movq (%rax), %rdx
movq (%rax), %rcx
leaq 0xcb5c(%rip), %rsi      # 0x14188
movb $0x0, %al
callq 0xb3d0
leaq -0x1000(%rbp), %rdi
callq 0xbf10
movq %rax, %rcx
movq -0x1010(%rbp), %rax
leaq -0x1000(%rbp), %rdi
addq %rcx, %rdi
movq 0x8(%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0xcb3c(%rip), %rsi      # 0x1419e
movb $0x0, %al
callq 0xb3d0
leaq -0x1000(%rbp), %rdi
callq 0xbf10
movq %rax, %rcx
movq -0x1010(%rbp), %rax
leaq -0x1000(%rbp), %rdi
addq %rcx, %rdi
movq 0x20(%rax), %rdx
movq 0x20(%rax), %rcx
leaq 0xcb1c(%rip), %rsi      # 0x141b4
movb $0x0, %al
callq 0xb3d0
leaq -0x1000(%rbp), %rdi
callq 0xbf10
movq %rax, %rcx
movq -0x1010(%rbp), %rax
leaq -0x1000(%rbp), %rdi
addq %rcx, %rdi
movq 0x28(%rax), %rdx
movq 0x28(%rax), %rcx
leaq 0xcaff(%rip), %rsi      # 0x141cd
movb $0x0, %al
callq 0xb3d0
leaq -0x1000(%rbp), %rdi
callq 0xbf10
movq %rax, %rcx
movq -0x1010(%rbp), %rax
leaq -0x1000(%rbp), %rdi
addq %rcx, %rdi
movq 0x30(%rax), %rdx
movq 0x30(%rax), %rcx
leaq 0xcae2(%rip), %rsi      # 0x141e6
movb $0x0, %al
callq 0xb3d0
movq -0x1008(%rbp), %rax
leaq -0x1000(%rbp), %rdi
movl 0xc(%rax), %esi
callq 0xb230
addq $0x1010, %rsp           # imm = 0x1010
popq %rbp
retq
nopw (%rax,%rax)