// File: /workspace/github_cpp_makefile_star2_O3/wkohlenberg[P]simple_NN/src/createTrainData.cpp
// Function: main
int main()
{
  ofstream trainData ("input/xor_train_data.txt", ios::out);
  if (trainData.is_open())
  {
    // Real random
    random_device rd;
    mt19937 gen(rd());
    uniform_int_distribution<> dis(0, 1);

    int input1, input2;

    for (int i = 0; i < TRAINING_INPUT; i++)
    {
      input1 = dis(gen);
      input2 = dis(gen);
      trainData << "in: " << input1 << " " << input2 << endl;
      trainData << "out: " << (input1^input2) << endl;
    }

    trainData.close();
  }
  else
  {
    cout << "Could not open file..." << endl;
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2918, %rsp           # imm = 0x2918
leaq 0xd5c(%rip), %rsi       # 0x3040
leaq 0x8(%rsp), %rdi
movl $0x10, %edx
callq 0x2100
leaq 0x78(%rsp), %rdi
callq 0x2040
testb %al, %al
je 0x2484
leaq 0x1590(%rsp), %rdi
callq 0x2548
leaq 0x1590(%rsp), %rdi
callq 0x2120
movl %eax, %eax
movq %rax, 0x208(%rsp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0x208(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x232e
leaq 0x208(%rsp), %rax
movq $0x270, 0x1380(%rax) # imm = 0x270
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rsp, %r14
movq %rax, (%r14)
movl $0x7d0, %ebx            # imm = 0x7D0
leaq 0x8(%rsp), %r12
movq %r14, %rdi
leaq 0x208(%rsp), %rsi
movq %r14, %rdx
callq 0x2662
movl %eax, %r15d
movq %r14, %rdi
leaq 0x208(%rsp), %rsi
movq %r14, %rdx
callq 0x2662
movl %eax, %r13d
movl $0x4, %edx
movq %r12, %rdi
leaq 0xc9e(%rip), %rsi       # 0x3059
callq 0x2110
movq %r12, %rdi
movl %r15d, %esi
callq 0x2170
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0xc7f(%rip), %rsi       # 0x305c
callq 0x2110
movq %rbp, %rdi
movl %r13d, %esi
callq 0x2170
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x20e0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2080
movl $0x5, %edx
movq %r12, %rdi
leaq 0xc38(%rip), %rsi       # 0x305e
callq 0x2110
xorl %r15d, %r13d
movq %r12, %rdi
movl %r13d, %esi
callq 0x2170
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x20e0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2080
decl %ebx
jne 0x2380
leaq 0x8(%rsp), %rdi
callq 0x2130
leaq 0x1590(%rsp), %rdi
callq 0x20d0
jmp 0x24ca
movq 0x2b4d(%rip), %rbx      # 0x4fd8
leaq 0xbd2(%rip), %rsi       # 0x3064
movl $0x16, %edx
movq %rbx, %rdi
callq 0x2110
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x20e0
movsbl %al, %esi
movq 0x2b1b(%rip), %rdi      # 0x4fd8
callq 0x2030
movq %rax, %rdi
callq 0x2080
movq 0x2aff(%rip), %rax      # 0x4fd0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x10(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x8(%rsp,%rcx)
callq 0x20b0
leaq 0x100(%rsp), %rdi
callq 0x2060
xorl %eax, %eax
addq $0x2918, %rsp           # imm = 0x2918
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x253f
jmp 0x251d
jmp 0x251d
jmp 0x2518
movq %rax, %rbx
jmp 0x252d
movq %rax, %rbx
leaq 0x1590(%rsp), %rdi
callq 0x20d0
leaq 0x8(%rsp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x2657
nop