// File: /workspace/github_cpp_makefile_star2_O3/jswaff[P]prophet3/src/main.cpp
// Function: main
int main(int argc,char *argv[]) {
    setbuf(stdin, NULL);
    setbuf(stdout, NULL);
    init_logfile();

    char input[255];
    print_greeting();
    assert_assumptions();
    init();

    process_args(argc,argv);

    if (hash_size==0) hash_size = default_hash_size;
    print("initializing hash table with %d bytes\n",hash_size);
    init_hash_table(&htbl,hash_size);

    if (pawn_hash_size==0) pawn_hash_size = default_hash_size;
    print("initializing pawn hash table with %d bytes\n",pawn_hash_size);
    init_hash_table(&phtbl,pawn_hash_size);

    assert(run_tests());

    if (tsfile != 0) {
        test_suite(tsfile,tstime);
        exit(0);
    }

    if (book_path != 0) {
        int32 num_moves = open_book_db(book_path);
        print("opened book %s with %d moves.\n",book_path,num_moves);
        assert(test_book());
    }

    while (1) {
        int result=scanf("%s",input);
        if (result==EOF) {
            error("EOF\n");
            exit(1);
        }
        parse_command(input);
    }

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsi, %rbx
movl %edi, %ebp
movq 0x3a9eb(%rip), %rax     # 0x41fc0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x2270
movq 0x3a9aa(%rip), %rax     # 0x41f90
movq (%rax), %rdi
xorl %esi, %esi
callq 0x2270
callq 0x649c
leaq 0x23292(%rip), %rdi     # 0x2a88e
xorl %eax, %eax
callq 0x64b9
leaq 0x232bc(%rip), %rdi     # 0x2a8c6
xorl %eax, %eax
callq 0x64b9
callq 0x645c
movl %ebp, %edi
movq %rbx, %rsi
callq 0x7486
movl 0x8752f2(%rip), %esi    # 0x87c918
testl %esi, %esi
jne 0x7639
movl $0x10000000, 0x8752e4(%rip) # imm = 0x10000000
movl $0x10000000, %esi       # imm = 0x10000000
leaq 0x23301(%rip), %rdi     # 0x2a941
xorl %eax, %eax
callq 0x64b9
movl 0x8752cb(%rip), %esi    # 0x87c918
leaq 0xf089c(%rip), %rdi     # 0xf7ef0
callq 0x6224
movl 0x8752bd(%rip), %esi    # 0x87c91c
testl %esi, %esi
jne 0x7672
movl $0x10000000, 0x8752af(%rip) # imm = 0x10000000
movl $0x10000000, %esi       # imm = 0x10000000
leaq 0x232ef(%rip), %rdi     # 0x2a968
xorl %eax, %eax
callq 0x64b9
movl 0x875296(%rip), %esi    # 0x87c91c
leaq 0xf0893(%rip), %rdi     # 0xf7f20
callq 0x6224
callq 0x73d3
movq 0x875272(%rip), %rdi    # 0x87c910
testq %rdi, %rdi
jne 0x772a
movq 0x87525a(%rip), %rdi    # 0x87c908
testq %rdi, %rdi
je 0x76d8
callq 0x44ca
movq 0x875249(%rip), %rsi    # 0x87c908
leaq 0x232f2(%rip), %rdi     # 0x2a9b8
movl %eax, %edx
xorl %eax, %eax
callq 0x64b9
callq 0x11744
testb %al, %al
je 0x773c
leaq 0x24ff5(%rip), %rdi     # 0x2c6d4
movq %rsp, %rsi
xorl %eax, %eax
callq 0x2190
cmpl $-0x1, %eax
je 0x7712
movq %rsp, %rbx
leaq 0x24fdc(%rip), %r14     # 0x2c6d4
movq %rbx, %rdi
callq 0xf37c
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2190
cmpl $-0x1, %eax
jne 0x76f8
leaq 0x232ca(%rip), %rdi     # 0x2a9e3
xorl %eax, %eax
callq 0x2330
movl $0x1, %edi
callq 0x21f0
movl 0x3aa70(%rip), %esi     # 0x421a0
callq 0xceb8
xorl %edi, %edi
callq 0x21f0
leaq 0x23294(%rip), %rdi     # 0x2a9d7
leaq 0x2324a(%rip), %rsi     # 0x2a994
leaq 0x23250(%rip), %rcx     # 0x2a9a1
movl $0x7d, %edx
callq 0x20d0
nop