// File: /workspace/github_cpp_makefile_star2_O2/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 0x40(%rsp), %rdi
callq 0x27d6
leaq 0x128(%rsp), %rdi
callq 0x2800
movl $0x90, %edi
callq 0x2140
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rax, %rdi
callq 0x2868
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x2842
movl $0x150, %edi            # imm = 0x150
callq 0x2140
movq %rax, %r14
pushq $0x2
popq %rsi
leaq 0x128(%rsp), %rdx
movq %rax, %rdi
callq 0x287e
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x2842
movl $0x150, %edi            # imm = 0x150
callq 0x2140
movq %rax, %r14
pushq $0x1
popq %rsi
leaq 0x128(%rsp), %rdx
movq %rax, %rdi
callq 0x287e
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x2842
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0xe8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2703
movq %rsp, %rdi
leaq 0xe8(%rsp), %rsi
callq 0x2dc8
leaq 0x108(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2dc8
leaq 0xa8(%rsp), %rdi
pushq $0x1
popq %rdx
xorl %esi, %esi
callq 0x2703
movq %rsp, %rdi
leaq 0xa8(%rsp), %rsi
callq 0x2dc8
leaq 0xc8(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2dc8
leaq 0x68(%rsp), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x2703
movq %rsp, %rdi
leaq 0x68(%rsp), %rsi
callq 0x2dc8
leaq 0x88(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2dc8
leaq 0x168(%rsp), %rdi
pushq $0x1
popq %rdx
movl %edx, %esi
callq 0x2703
movq %rsp, %rdi
leaq 0x168(%rsp), %rsi
callq 0x2dc8
leaq 0x188(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2dc8
leaq 0x168(%rsp), %rdi
callq 0x2e04
leaq 0x68(%rsp), %rdi
callq 0x2e04
leaq 0xa8(%rsp), %rdi
callq 0x2e04
leaq 0xe8(%rsp), %rdi
callq 0x2e04
leaq 0x40(%rsp), %rdi
movss 0x2b02(%rip), %xmm0     # 0x5004
callq 0x2894
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
pushq $0x1
popq %r8
movl $0x2710, %ecx           # imm = 0x2710
callq 0x2a4e
xorl %ebx, %ebx
leaq 0xe8(%rsp), %r15
leaq 0xa8(%rsp), %r12
leaq 0x68(%rsp), %r13
movq 0x6a88(%rip), %rbp      # 0x8fc8
leaq 0x2b0a(%rip), %r14      # 0x5051
movq 0x8(%rsp), %rax
subq (%rsp), %rax
sarq $0x5, %rax
cmpq %rax, %rbx
jae 0x25ec
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x2c18
movq %r15, %rdi
movq %rax, %rsi
callq 0x2c3a
movq %r12, %rdi
movq %r15, %rsi
callq 0x2c74
movq 0x50(%rsp), %rax
movq (%rax), %rsi
movq (%rsi), %rax
movq %r13, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq *0x10(%rax)
movq %rbp, %rdi
leaq 0x2aaa(%rip), %rsi      # 0x5048
callq 0x2130
movq %rax, %rdi
movq %r12, %rsi
callq 0x2cf1
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2130
movq %rax, %rdi
movq %r13, %rsi
callq 0x2cf1
movq %rax, %rdi
callq 0x2090
movq %r13, %rdi
callq 0x2d7e
movq %r12, %rdi
callq 0x2d7e
movq %r15, %rdi
callq 0x2d7e
incq %rbx
jmp 0x2547
leaq 0x20(%rsp), %rdi
callq 0x2d92
movq %rsp, %rdi
callq 0x2d92
leaq 0x128(%rsp), %rdi
callq 0x41e4
leaq 0x40(%rsp), %rdi
callq 0x2db4
xorl %eax, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2662
jmp 0x2671
jmp 0x2683
jmp 0x2631
movq %rax, %rbx
movl $0x150, %esi            # imm = 0x150
jmp 0x2643
movq %rax, %rbx
movl $0x90, %esi
movq %r14, %rdi
callq 0x2150
jmp 0x26e4
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0x2e04
jmp 0x2665
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2e04
jmp 0x2674
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2e04
jmp 0x2686
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x2e04
jmp 0x26d2
jmp 0x269c
movq %rax, %rbx
jmp 0x26e4
movq %rax, %rbx
jmp 0x26d2
movq %rax, %rbx
jmp 0x26c5
movq %rax, %rbx
jmp 0x26b8
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2d7e
leaq 0xa8(%rsp), %rdi
callq 0x2d7e
leaq 0xe8(%rsp), %rdi
callq 0x2d7e
leaq 0x20(%rsp), %rdi
callq 0x2d92
movq %rsp, %rdi
callq 0x2d92
leaq 0x128(%rsp), %rdi
callq 0x41e4
leaq 0x40(%rsp), %rdi
callq 0x2db4
movq %rbx, %rdi
callq 0x21e0