// File: 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
movq %rsp, %rbp
subq $0x2990, %rsp           # imm = 0x2990
movl $0x0, -0x4(%rbp)
leaq 0x1c7b(%rip), %rsi      # 0x4004
leaq -0x208(%rbp), %rdi
movq %rdi, -0x2948(%rbp)
movl $0x10, %edx
callq 0x2130
movq -0x2948(%rbp), %rdi
callq 0x20a0
movb %al, -0x293d(%rbp)
jmp 0x23b5
movb -0x293d(%rbp), %al
testb $0x1, %al
jne 0x23c4
jmp 0x25bb
leaq -0x15a0(%rbp), %rdi
callq 0x2630
jmp 0x23d2
leaq -0x15a0(%rbp), %rdi
callq 0x26d0
movl %eax, -0x294c(%rbp)
jmp 0x23e6
movl -0x294c(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
leaq -0x2928(%rbp), %rdi
callq 0x26f0
jmp 0x23fe
leaq -0x2930(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x2720
jmp 0x2413
movl $0x0, -0x293c(%rbp)
cmpl $0x7d0, -0x293c(%rbp)   # imm = 0x7D0
jge 0x259f
leaq -0x2930(%rbp), %rdi
leaq -0x2928(%rbp), %rsi
callq 0x2750
movl %eax, -0x2950(%rbp)
jmp 0x2448
movl -0x2950(%rbp), %eax
movl %eax, -0x2934(%rbp)
leaq -0x2930(%rbp), %rdi
leaq -0x2928(%rbp), %rsi
callq 0x2750
movl %eax, -0x2954(%rbp)
jmp 0x246f
movl -0x2954(%rbp), %eax
movl %eax, -0x2938(%rbp)
leaq 0x1b9b(%rip), %rsi      # 0x401d
leaq -0x208(%rbp), %rdi
callq 0x20f0
movq %rax, -0x2960(%rbp)
jmp 0x2497
movq -0x2960(%rbp), %rdi
movl -0x2934(%rbp), %esi
callq 0x21e0
movq %rax, -0x2968(%rbp)
jmp 0x24b2
movq -0x2968(%rbp), %rdi
leaq 0x1b60(%rip), %rsi      # 0x4020
callq 0x20f0
movq %rax, -0x2970(%rbp)
jmp 0x24ce
movq -0x2970(%rbp), %rdi
movl -0x2938(%rbp), %esi
callq 0x21e0
movq %rax, -0x2978(%rbp)
jmp 0x24e9
movq -0x2978(%rbp), %rdi
movq 0x3ad1(%rip), %rsi      # 0x5fc8
callq 0x2100
jmp 0x24fe
leaq 0x1b1d(%rip), %rsi      # 0x4022
leaq -0x208(%rbp), %rdi
callq 0x20f0
movq %rax, -0x2980(%rbp)
jmp 0x251a
movq -0x2980(%rbp), %rdi
movl -0x2934(%rbp), %esi
movl -0x2938(%rbp), %eax
xorl %eax, %esi
callq 0x21e0
movq %rax, -0x2988(%rbp)
jmp 0x253d
movq -0x2988(%rbp), %rdi
movq 0x3a7d(%rip), %rsi      # 0x5fc8
callq 0x2100
jmp 0x2552
jmp 0x2554
movl -0x293c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x293c(%rbp)
jmp 0x241d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0x260d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
leaq -0x15a0(%rbp), %rdi
callq 0x2780
jmp 0x260d
leaq -0x208(%rbp), %rdi
callq 0x2180
jmp 0x25ad
leaq -0x15a0(%rbp), %rdi
callq 0x2780
jmp 0x25ee
movq 0x3a16(%rip), %rdi      # 0x5fd8
leaq 0x1a5f(%rip), %rsi      # 0x4028
callq 0x20f0
movq %rax, -0x2990(%rbp)
jmp 0x25d7
movq -0x2990(%rbp), %rdi
movq 0x39e3(%rip), %rsi      # 0x5fc8
callq 0x2100
jmp 0x25ec
jmp 0x25ee
movl $0x0, -0x4(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x21a0
movl -0x4(%rbp), %eax
addq $0x2990, %rsp           # imm = 0x2990
popq %rbp
retq
leaq -0x208(%rbp), %rdi
callq 0x21a0
movq -0x210(%rbp), %rdi
callq 0x21f0
nopw %cs:(%rax,%rax)
nop