// File: /workspace/github_cpp_makefile_star2_O2/sokolcom[P]tp-blockchain-task06/src/split.cpp
// Function: split_key(uint256_t, unsigned short, unsigned short)
void split_key(const uint256_t key, const uint16_t n, const uint16_t t)
{
    std::shared_ptr<uint256_t[]> equation_coeffs = create_coeffs(t, key);
    for (uint8_t i = 0; i < n; i++)
    {
        uint256_t x = generate_x();
        uint256_t y = calculate_equation(x, equation_coeffs, t);
        std::cout << std::hex << "0x" << x << " 0x" << y << "\n";
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movl %esi, %ebx
movl %edi, 0x24(%rsp)
leaq 0xaa8(%rip), %rsi       # 0x71c6
leaq 0x70(%rsp), %rdi
callq 0x351a
movl %ebx, %r14d
movl %ebx, %edi
shll $0x5, %edi
callq 0x2030
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x6b66
movq (%r15), %rax
movaps 0x170(%rsp), %xmm0
movaps 0x180(%rsp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movb $0x1, %r13b
leaq 0xd0(%rsp), %r15
pushq $0x20
popq %rbp
movzbl %r13b, %r12d
cmpw %bx, %r12w
jae 0x67ca
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movq %r15, %rdi
movl %ebp, %esi
callq 0x2200
testb %al, %al
je 0x69e5
movl %r12d, %edi
shll $0x5, %edi
addq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x5b88
shll $0x5, %r12d
addq 0x28(%rsp), %r12
movq %r12, %rdi
leaq 0x70(%rsp), %rsi
callq 0x4c0e
incb %r13b
jmp 0x676d
xorl %ebx, %ebx
leaq 0x70(%rsp), %r15
leaq 0xd0(%rsp), %r12
leaq 0x9e6(%rip), %r13       # 0x71c6
leaq 0x118(%rsp), %rbp
movzbl %bl, %eax
cmpw 0x24(%rsp), %ax
jae 0x69c9
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movq %r15, %rdi
pushq $0x20
popq %rsi
callq 0x2200
cmpb $0x1, %al
jne 0x6a15
movq %r12, %rdi
movq %r15, %rsi
callq 0x5b88
leaq 0xb0(%rsp), %rdi
movq %r13, %rsi
callq 0x351a
movq %rbp, %rdi
movq %r12, %rsi
leaq 0xb0(%rsp), %rdx
callq 0x4b8c
movq %rbx, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x6ce8
movq %r15, %rdi
movq %r13, %rsi
callq 0x351a
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
leaq 0x793(%rip), %rax       # 0x7008
movups (%rax), %xmm0
leaq 0x60(%rsp), %rax
movups %xmm0, (%rax)
xorl %r13d, %r13d
cmpq %r14, %r13
je 0x694e
movq %r13, 0x90(%rsp)
andq $0x0, 0x98(%rsp)
movq 0x40(%rsp), %rbx
leaq 0x75f(%rip), %rax       # 0x7008
movups (%rax), %xmm0
leaq 0xa0(%rsp), %rax
movups %xmm0, (%rax)
movups 0x90(%rsp), %xmm0
movups 0xa0(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xb0(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x58c0
movq %r13, %rax
shlq $0x5, %rax
addq %rax, %rbx
movups 0xb0(%rsp), %xmm0
movups 0xc0(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x59dc
leaq 0xf8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x5b0e
movups 0xf8(%rsp), %xmm0
movups 0x108(%rsp), %xmm1
movaps %xmm1, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
incq %r13
jmp 0x6883
leaq 0x48(%rsp), %rdi
callq 0x6d1c
movq 0x5659(%rip), %rdi      # 0xbfb8
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rdi,%rax)
leaq 0x843(%rip), %rsi       # 0x71be
callq 0x2150
movq %rax, %rdi
movq %rbp, %rsi
callq 0x578e
movq %rax, %rdi
leaq 0x828(%rip), %rsi       # 0x71bd
callq 0x2150
movq %rax, %rdi
leaq 0x50(%rsp), %rsi
callq 0x578e
movq %rax, %rdi
leaq 0x7cc(%rip), %rsi       # 0x717d
callq 0x2150
movq 0x38(%rsp), %rbx
incb %bl
leaq 0x802(%rip), %r13       # 0x71c6
jmp 0x67e8
leaq 0x30(%rsp), %rdi
callq 0x6d1c
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20b0
movq %rax, %r14
leaq 0x866(%rip), %rsi       # 0x725d
movq %rax, %rdi
callq 0x2070
movq 0x55ea(%rip), %rsi      # 0xbff0
movq 0x559b(%rip), %rdx      # 0xbfa8
movq %r14, %rdi
callq 0x2260
pushq $0x10
popq %rdi
callq 0x20b0
movq %rax, %r14
leaq 0x836(%rip), %rsi       # 0x725d
movq %rax, %rdi
callq 0x2070
movq 0x55ba(%rip), %rsi      # 0xbff0
movq 0x556b(%rip), %rdx      # 0xbfa8
movq %r14, %rdi
callq 0x2260
jmp 0x6a5e
jmp 0x6a4b
jmp 0x6a5e
movq %rax, %rbx
movq %r14, %rdi
callq 0x2100
jmp 0x6a70
jmp 0x6a63
jmp 0x6a5e
jmp 0x6a5e
movq %rax, %rbx
jmp 0x6a70
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x6d1c
leaq 0x30(%rsp), %rdi
callq 0x6d1c
movq %rbx, %rdi
callq 0x2270