// File: /workspace/github_cpp_makefile_star2_O3/theolepage[P]prophecy/src/main.cc
// Function: main
int main(void)
{
    Model<model_type> model = Model<model_type>();
    SigmoidActivationFunction s = SigmoidActivationFunction<model_type>();

    // Create model
    model.add(new InputLayer<model_type>(2));
    model.add(new DenseLayer<model_type>(2, s));
    model.add(new DenseLayer<model_type>(1, s));

    // Create dataset
    auto x_train = training_set();
    auto y_train = training_set();
    create_dataset(x_train, y_train);

    // Train model
    model.compile(0.1);
    model.train(x_train, y_train, 10000, 1);

    // Test the model
    for (size_t i = 0; i < x_train.size(); i++)
    {
        auto x = x_train.at(i);
        auto x_t = x.transpose();
        auto y = model.predict(x);
        std::cout << "Input:  " << x_t;
        std::cout << "Output: " << y << std::endl;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
leaq 0x682c(%rip), %rcx      # 0x8bc0
leaq 0x88(%rsp), %rax
movq %rcx, -0x10(%rax)
movb $0x0, -0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
xorl %edi, %edi
callq 0x2120
movl %eax, %edi
callq 0x2130
leaq 0x140(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movaps %xmm0, -0x10(%r15)
movaps %xmm0, -0x20(%r15)
leaq 0x120(%rsp), %rbx
leaq 0x38(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3910
movq %rbx, (%r14)
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x3970
movl $0x90, %edi
callq 0x2150
movl $0x2, 0xc(%rax)
leaq 0x66fa(%rip), %rdx      # 0x8b18
movq %rdx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
xorl %ecx, %ecx
movq %rcx, 0x28(%rax)
movq %rdx, 0x30(%rax)
movups %xmm0, 0x38(%rax)
movq %rcx, 0x48(%rax)
movq %rdx, 0x50(%rax)
movups %xmm0, 0x58(%rax)
movups %xmm0, 0x68(%rax)
movups %xmm0, 0x78(%rax)
movq %rcx, 0x88(%rax)
leaq 0x6807(%rip), %rcx      # 0x8c60
movq %rcx, (%rax)
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x88(%rsp), %rdi
callq 0x3ac4
movl $0x150, %edi            # imm = 0x150
callq 0x2150
movq %rax, %r14
leaq 0x120(%rsp), %rdx
movq %rax, %rdi
movl $0x2, %esi
callq 0x3f04
leaq 0x685e(%rip), %rbx      # 0x8cf8
movq %rbx, (%r14)
leaq 0x38(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x88(%rsp), %rdi
callq 0x3ac4
movl $0x150, %edi            # imm = 0x150
callq 0x2150
movq %rax, %r14
leaq 0x120(%rsp), %rdx
movq %rax, %rdi
movl $0x1, %esi
callq 0x3f04
movq %rbx, (%r14)
leaq 0x38(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x88(%rsp), %rdi
callq 0x3ac4
xorl %eax, %eax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %rax, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2a13
movq %rsp, %rdi
leaq 0x38(%rsp), %rsi
callq 0x3288
leaq 0x58(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x3288
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x2a13
movq %rsp, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x3288
leaq 0xc0(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x3288
leaq 0xe0(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2a13
movq %rsp, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x3288
leaq 0x100(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x3288
leaq 0x168(%rsp), %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x2a13
movq %rsp, %rdi
leaq 0x168(%rsp), %rsi
callq 0x3288
leaq 0x188(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x3288
leaq 0x653e(%rip), %rax      # 0x8b18
movq %rax, 0x188(%rsp)
movq 0x1a0(%rsp), %rdi
testq %rdi, %rdi
je 0x25f4
callq 0x350c
leaq 0x651d(%rip), %rax      # 0x8b18
movq %rax, 0x168(%rsp)
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0x2615
callq 0x350c
leaq 0x64fc(%rip), %rax      # 0x8b18
movq %rax, 0x100(%rsp)
movq 0x118(%rsp), %rdi
testq %rdi, %rdi
je 0x2636
callq 0x350c
leaq 0x64db(%rip), %rax      # 0x8b18
movq %rax, 0xe0(%rsp)
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x2657
callq 0x350c
leaq 0x64ba(%rip), %rax      # 0x8b18
movq %rax, 0xc0(%rsp)
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x2678
callq 0x350c
leaq 0x6499(%rip), %rax      # 0x8b18
movq %rax, 0xa0(%rsp)
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x2699
callq 0x350c
leaq 0x6478(%rip), %rax      # 0x8b18
movq %rax, 0x58(%rsp)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x26b4
callq 0x350c
leaq 0x645d(%rip), %rax      # 0x8b18
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x26cf
callq 0x350c
leaq 0x78(%rsp), %rdi
movss 0x3928(%rip), %xmm0     # 0x6004
callq 0x2b56
leaq 0x78(%rsp), %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movl $0x2710, %ecx           # imm = 0x2710
movl $0x1, %r8d
callq 0x2e5e
movq (%rsp), %r14
cmpq %r14, 0x8(%rsp)
je 0x2876
movl $0x18, %r15d
xorl %r12d, %r12d
leaq 0x38(%rsp), %r13
leaq 0xe0(%rsp), %rbp
movq 0x689e(%rip), %rbx      # 0x8fc8
leaq 0x63e7(%rip), %rax      # 0x8b18
movq %rax, 0x38(%rsp)
leaq 0x48(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq (%r14,%r15), %rsi
movq -0x8(%r14,%r15), %rax
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x38c6
movq -0x10(%r14,%r15), %rax
movq %rax, 0x40(%rsp)
leaq 0xa0(%rsp), %rdi
movq %r13, %rsi
callq 0x3088
movq 0x88(%rsp), %rax
movq (%rax), %rsi
movq (%rsi), %rax
movq %rbp, %rdi
movq %r13, %rdx
xorl %ecx, %ecx
callq *0x10(%rax)
movl $0x8, %edx
movq %rbx, %rdi
leaq 0x38cd(%rip), %rsi      # 0x6068
callq 0x2180
movq %rbx, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x3126
movl $0x8, %edx
movq %rbx, %rdi
leaq 0x38b2(%rip), %rsi      # 0x6071
callq 0x2180
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3126
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20e0
leaq 0x6318(%rip), %rax      # 0x8b18
movq %rax, 0xe0(%rsp)
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x281a
callq 0x350c
leaq 0x62f7(%rip), %rax      # 0x8b18
movq %rax, 0xa0(%rsp)
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x283b
callq 0x350c
leaq 0x62d6(%rip), %rax      # 0x8b18
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x2856
callq 0x350c
incq %r12
movq (%rsp), %r14
movq 0x8(%rsp), %rax
subq %r14, %rax
sarq $0x5, %rax
addq $0x20, %r15
cmpq %rax, %r12
jb 0x272a
leaq 0x20(%rsp), %rdi
callq 0x322c
movq %rsp, %rdi
callq 0x322c
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x28a7
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x130(%rsp), %rax
testq %rax, %rax
je 0x28c6
leaq 0x120(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x62f3(%rip), %rax      # 0x8bc0
movq %rax, 0x78(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x3852
xorl %eax, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28f5
movq %rax, %rdi
callq 0x34a8
jmp 0x292c
jmp 0x293e
jmp 0x2950
jmp 0x2905
movq %rax, %rbx
movl $0x150, %esi            # imm = 0x150
movq %r14, %rdi
callq 0x2160
jmp 0x29e5
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0x32f6
jmp 0x292f
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x32f6
jmp 0x2941
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x32f6
jmp 0x2953
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x32f6
jmp 0x29d3
movq %rax, %rbx
jmp 0x29d3
movq %rax, %rbx
jmp 0x29e5
movq %rax, %rbx
jmp 0x29b8
movq %rax, %rbx
jmp 0x2997
movq %rax, %rbx
leaq 0x619b(%rip), %rax      # 0x8b18
movq %rax, 0xe0(%rsp)
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x2997
callq 0x350c
leaq 0x617a(%rip), %rax      # 0x8b18
movq %rax, 0xa0(%rsp)
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x29b8
callq 0x350c
leaq 0x6159(%rip), %rax      # 0x8b18
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x29d3
callq 0x350c
leaq 0x20(%rsp), %rdi
callq 0x322c
movq %rsp, %rdi
callq 0x322c
leaq 0x120(%rsp), %rdi
callq 0x49b2
leaq 0x61c7(%rip), %rax      # 0x8bc0
movq %rax, 0x78(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x3852
movq %rbx, %rdi
callq 0x2200