// File: /workspace/github_cpp_makefile_star2_O1/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, %ebp
movl %edi, 0x2c(%rsp)
leaq 0x11c4(%rip), %rsi      # 0x81c6
leaq 0x70(%rsp), %rdi
callq 0x3646
movl %ebp, %edi
shll $0x5, %edi
callq 0x2030
leaq 0x40(%rsp), %rbx
movq %rax, -0x8(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x74c8
movq -0x8(%rbx), %rax
movaps 0x170(%rsp), %xmm0
movaps 0x180(%rsp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl %ebp, 0x28(%rsp)
cmpw $0x2, %bp
jb 0x70c5
movb $0x2, %r12b
leaq 0xd0(%rsp), %rbx
leaq 0x70(%rsp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movq %rbx, %rdi
movl $0x20, %esi
callq 0x21d0
testb %al, %al
je 0x735f
leal -0x1(%r12), %eax
movzbl %al, %r15d
movl %r15d, %edi
shll $0x5, %edi
addq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x65a2
shll $0x5, %r15d
addq 0x38(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x5150
movzbl %r12b, %eax
incb %r12b
cmpw 0x28(%rsp), %ax
jb 0x705f
cmpw $0x0, 0x2c(%rsp)
je 0x730c
movl 0x28(%rsp), %ebx
xorl %r13d, %r13d
leaq 0x70(%rsp), %r14
leaq 0xd0(%rsp), %r15
leaq 0x118(%rsp), %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movq %r14, %rdi
movl $0x20, %esi
callq 0x21d0
cmpb $0x1, %al
jne 0x732d
movq %r15, %rdi
movq %r14, %rsi
callq 0x65a2
leaq 0xb0(%rsp), %rdi
leaq 0x109a(%rip), %rsi      # 0x81c6
callq 0x3646
movq %rbp, %rdi
movq %r15, %rsi
leaq 0xb0(%rsp), %rdx
callq 0x509a
movq 0x38(%rsp), %r12
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x7177
movq 0x5e51(%rip), %rax      # 0xcfb0
cmpb $0x0, (%rax)
je 0x716e
movq 0x30(%rsp), %rax
incl 0x8(%rax)
jmp 0x7177
movq 0x30(%rsp), %rax
lock
incl 0x8(%rax)
movq %r13, 0x48(%rsp)
movq %r14, %rdi
leaq 0x1040(%rip), %rsi      # 0x81c6
callq 0x3646
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
leaq 0xe6e(%rip), %rax       # 0x8008
movups (%rax), %xmm0
leaq 0x60(%rsp), %rax
movups %xmm0, (%rax)
cmpw $0x0, 0x28(%rsp)
je 0x7272
xorl %r13d, %r13d
movq %r13, 0x90(%rsp)
movq $0x0, 0x98(%rsp)
leaq 0xe39(%rip), %rax       # 0x8008
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 %r14, %rdx
callq 0x61fc
movups 0xb0(%rsp), %xmm0
movups 0xc0(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x6390
leaq 0xf8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x6528
movups 0xf8(%rsp), %xmm0
movups 0x108(%rsp), %xmm1
movaps %xmm1, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
incq %r13
addq $0x20, %r12
cmpq %r13, %rbx
jne 0x71b4
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x7281
callq 0x75b2
movq 0x5d30(%rip), %rdi      # 0xcfb8
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rdi,%rax)
movl $0x2, %edx
leaq 0xf15(%rip), %rsi       # 0x81be
callq 0x2160
movq 0x48(%rsp), %r13
movq 0x5cfe(%rip), %rdi      # 0xcfb8
movq %rbp, %rsi
callq 0x606b
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0xee9(%rip), %rsi       # 0x81bd
callq 0x2160
movq %r12, %rdi
leaq 0x50(%rsp), %rsi
callq 0x606b
movl $0x1, %edx
movq %rax, %rdi
leaq 0xe88(%rip), %rsi       # 0x817d
callq 0x2160
incb %r13b
movzbl %r13b, %eax
cmpw 0x2c(%rsp), %ax
jb 0x70ed
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x731b
callq 0x75b2
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20b0
movq %rax, %r14
leaq 0xf1c(%rip), %rsi       # 0x825d
movq %rax, %rdi
callq 0x2080
movq 0x5ca0(%rip), %rsi      # 0xcff0
movq 0x5c51(%rip), %rdx      # 0xcfa8
movq %r14, %rdi
callq 0x2240
movl $0x10, %edi
callq 0x20b0
movq %rax, %r14
leaq 0xeea(%rip), %rsi       # 0x825d
movq %rax, %rdi
callq 0x2080
movq 0x5c6e(%rip), %rsi      # 0xcff0
movq 0x5c1f(%rip), %rdx      # 0xcfa8
movq %r14, %rdi
callq 0x2240
jmp 0x73aa
jmp 0x7397
jmp 0x73aa
movq %rax, %rbx
movq %r14, %rdi
callq 0x2100
jmp 0x73c1
jmp 0x73af
jmp 0x73aa
jmp 0x73aa
movq %rax, %rbx
jmp 0x73c1
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x73c1
callq 0x75b2
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x73d0
callq 0x75b2
movq %rbx, %rdi
callq 0x2250