// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: engine_go
void engine_go(char *filename, char *weightfile, int mcts_iters, float secs, float temp, float cpuct, int anon, int resign)
{
    mcts_tree *root = 0;
    network *net = load_network(filename, weightfile, 0);
    set_batch_network(net, 1);
    srand(time(0));
    float *board = calloc(19*19*3, sizeof(float));
    flip_board(board);
    float *one = calloc(19*19*3, sizeof(float));
    float *two = calloc(19*19*3, sizeof(float));
    int ponder_player = 0;
    int passed = 0;
    int move_num = 0;
    int main_time = 0;
    int byo_yomi_time = 0;
    int byo_yomi_stones = 0;
    int black_time_left = 0;
    int black_stones_left = 0;
    int white_time_left = 0;
    int white_stones_left = 0;
    float orig_time = secs;
    int old_ponder = 0;
    while(1){
        if(ponder_player){
            root = ponder(root, net, board, two, ponder_player, cpuct);
        }
        old_ponder = ponder_player;
        ponder_player = 0;
        char buff[256];
        int id = 0;
        int has_id = (scanf("%d", &id) == 1);
        scanf("%s", buff);
        if (feof(stdin)) break;
        fprintf(stderr, "%s\n", buff);
        char ids[256];
        sprintf(ids, "%d", id);
        //fprintf(stderr, "%s\n", buff);
        if (!has_id) ids[0] = 0;
        if (!strcmp(buff, "protocol_version")){
            printf("=%s 2\n\n", ids);
        } else if (!strcmp(buff, "name")){
            if(anon){
                printf("=%s The Fool!\n\n", ids);
            }else{
                printf("=%s DarkGo\n\n", ids);
            }
        } else if (!strcmp(buff, "time_settings")){
            ponder_player = old_ponder;
            scanf("%d %d %d", &main_time, &byo_yomi_time, &byo_yomi_stones);
            printf("=%s \n\n", ids);
        } else if (!strcmp(buff, "time_left")){
            ponder_player = old_ponder;
            char color[256];
            int time = 0, stones = 0;
            scanf("%s %d %d", color, &time, &stones);
            if (color[0] == 'b' || color[0] == 'B'){
                black_time_left = time;
                black_stones_left = stones;
            } else {
                white_time_left = time;
                white_stones_left = stones;
            }
            printf("=%s \n\n", ids);
        } else if (!strcmp(buff, "version")){
            if(anon){
                printf("=%s :-DDDD\n\n", ids);
            }else {
                printf("=%s 1.0. Want more DarkGo? You can find me on OGS, unlimited games, no waiting! https://online-go.com/user/view/434218\n\n", ids);
            }
        } else if (!strcmp(buff, "known_command")){
            char comm[256];
            scanf("%s", comm);
            int known = (!strcmp(comm, "protocol_version") || 
                    !strcmp(comm, "name") || 
                    !strcmp(comm, "version") || 
                    !strcmp(comm, "known_command") || 
                    !strcmp(comm, "list_commands") || 
                    !strcmp(comm, "quit") || 
                    !strcmp(comm, "boardsize") || 
                    !strcmp(comm, "clear_board") || 
                    !strcmp(comm, "komi") || 
                    !strcmp(comm, "final_status_list") || 
                    !strcmp(comm, "play") || 
                    !strcmp(comm, "genmove_white") || 
                    !strcmp(comm, "genmove_black") || 
                    !strcmp(comm, "fixed_handicap") || 
                    !strcmp(comm, "genmove"));
            if(known) printf("=%s true\n\n", ids);
            else printf("=%s false\n\n", ids);
        } else if (!strcmp(buff, "list_commands")){
            printf("=%s protocol_version\nshowboard\nname\nversion\nknown_command\nlist_commands\nquit\nboardsize\nclear_board\nkomi\nplay\ngenmove_black\ngenmove_white\ngenmove\nfinal_status_list\nfixed_handicap\n\n", ids);
        } else if (!strcmp(buff, "quit")){
            break;
        } else if (!strcmp(buff, "boardsize")){
            int boardsize = 0;
            scanf("%d", &boardsize);
            //fprintf(stderr, "%d\n", boardsize);
            if(boardsize != 19){
                printf("?%s unacceptable size\n\n", ids);
            } else {
                root = move_mcts(root, -1);
                memset(board, 0, 3*19*19*sizeof(float));
                flip_board(board);
                move_num = 0;
                printf("=%s \n\n", ids);
            }
        } else if (!strcmp(buff, "fixed_handicap")){
            int handicap = 0;
            scanf("%d", &handicap);
            int indexes[] = {72, 288, 300, 60, 180, 174, 186, 66, 294};
            int i;
            for(i = 0; i < handicap; ++i){
                board[indexes[i]] = 1;   
                ++move_num;
            }
            root = move_mcts(root, -1);
        } else if (!strcmp(buff, "clear_board")){
            passed = 0;
            memset(board, 0, 3*19*19*sizeof(float));
            flip_board(board);
            move_num = 0;
            root = move_mcts(root, -1);
            printf("=%s \n\n", ids);
        } else if (!strcmp(buff, "komi")){
            float komi = 0;
            scanf("%f", &komi);
            printf("=%s \n\n", ids);
        } else if (!strcmp(buff, "showboard")){
            printf("=%s \n", ids);
            print_board(stdout, board, 1, 0);
            printf("\n");
        } else if (!strcmp(buff, "play") || !strcmp(buff, "black") || !strcmp(buff, "white")){
            ++move_num;
            char color[256];
            if(!strcmp(buff, "play"))
            {
                scanf("%s ", color);
            } else {
                scanf(" ");
                color[0] = buff[0];
            }
            char c;
            int r;
            int count = scanf("%c%d", &c, &r);
            int player = (color[0] == 'b' || color[0] == 'B') ? 1 : -1;
            if((c == 'p' || c == 'P') && count < 2) {
                passed = 1;
                printf("=%s \n\n", ids);
                char *line = fgetl(stdin);
                free(line);
                fflush(stdout);
                fflush(stderr);
                root = move_mcts(root, 19*19);
                continue;
            } else {
                passed = 0;
            }
            if(c >= 'A' && c <= 'Z') c = c - 'A';
            if(c >= 'a' && c <= 'z') c = c - 'a';
            if(c >= 8) --c;
            r = 19 - r;
            fprintf(stderr, "move: %d %d\n", r, c);

            float *swap = two;
            two = one;
            one = swap;
            move_go(board, player, r, c);
            copy_cpu(19*19*3, board, 1, one, 1);
            if(root) fprintf(stderr, "Prior: %f\n", root->prior[r*19 + c]);
            if(root) fprintf(stderr, "Mean: %f\n", root->mean[r*19 + c]);
            if(root) fprintf(stderr, "Result: %f\n", root->result);
            root = move_mcts(root, r*19 + c);
            if(root) fprintf(stderr, "Visited: %d\n", root->total_count);
            else fprintf(stderr, "NOT VISITED\n");

            printf("=%s \n\n", ids);
            //print_board(stderr, board, 1, 0);
        } else if (!strcmp(buff, "genmove") || !strcmp(buff, "genmove_black") || !strcmp(buff, "genmove_white")){
            ++move_num;
            int player = 0;
            if(!strcmp(buff, "genmove")){
                char color[256];
                scanf("%s", color);
                player = (color[0] == 'b' || color[0] == 'B') ? 1 : -1;
            } else if (!strcmp(buff, "genmove_black")){
                player = 1;
            } else {
                player = -1;
            }
            if(player > 0){
                if(black_time_left <= 30) secs = 2.5;
                else secs = orig_time;
            } else {
                if(white_time_left <= 30) secs = 2.5;
                else secs = orig_time;
            }
            ponder_player = -player;

            //tree = generate_move(net, player, board, multi, .1, two, 1);
            double t = what_time_is_it_now();
            root = run_mcts(root, net, board, two, player, mcts_iters, cpuct, secs);
            fprintf(stderr, "%f Seconds\n", what_time_is_it_now() - t);
            move m = pick_move(root, temp, player);
            root = move_mcts(root, m.row*19 + m.col);


            if(move_num > resign && m.value < .1 && m.mcts < .1){
                printf("=%s resign\n\n", ids);
            } else if(m.row == 19){
                printf("=%s pass\n\n", ids);
                passed = 0;
            } else {
                int row = m.row;
                int col = m.col;

                float *swap = two;
                two = one;
                one = swap;

                move_go(board, player, row, col);
                copy_cpu(19*19*3, board, 1, one, 1);
                row = 19 - row;
                if (col >= 8) ++col;
                printf("=%s %c%d\n\n", ids, 'A' + col, row);
            }

        } else if (!strcmp(buff, "p")){
            //print_board(board, 1, 0);
        } else if (!strcmp(buff, "final_status_list")){
            char type[256];
            scanf("%s", type);
            fprintf(stderr, "final_status\n");
            char *line = fgetl(stdin);
            free(line);
            if(type[0] == 'd' || type[0] == 'D'){
                int i;
                FILE *f = fopen("game.txt", "w");
                int count = print_game(board, f);
                fprintf(f, "%s final_status_list dead\n", ids);
                fclose(f);
                FILE *p = popen("./gnugo --mode gtp < game.txt", "r");
                for(i = 0; i < count; ++i){
                    free(fgetl(p));
                    free(fgetl(p));
                }
                char *l = 0;
                while((l = fgetl(p))){
                    printf("%s\n", l);
                    free(l);
                }
            } else {
                printf("?%s unknown command\n\n", ids);
            }
        } else if (!strcmp(buff, "kgs-genmove_cleanup")){
            char type[256];
            scanf("%s", type);
            fprintf(stderr, "kgs-genmove_cleanup\n");
            char *line = fgetl(stdin);
            free(line);
            int i;
            FILE *f = fopen("game.txt", "w");
            int count = print_game(board, f);
            fprintf(f, "%s kgs-genmove_cleanup %s\n", ids, type);
            fclose(f);
            FILE *p = popen("./gnugo --mode gtp < game.txt", "r");
            for(i = 0; i < count; ++i){
                free(fgetl(p));
                free(fgetl(p));
            }
            char *l = 0;
            while((l = fgetl(p))){
                printf("%s\n", l);
                free(l);
            }
        } else {
            char *line = fgetl(stdin);
            free(line);
            printf("?%s unknown command\n\n", ids);
        }
        fflush(stdout);
        fflush(stderr);
    }
    printf("%d %d %d\n",passed, black_stones_left, white_stones_left);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movl %r8d, 0x70(%rsp)
movl %ecx, 0x44(%rsp)
movss %xmm2, 0x48(%rsp)
movd %xmm1, 0x6c(%rsp)
movss %xmm0, 0x64(%rsp)
movl %edx, 0x68(%rsp)
xorl %ebx, %ebx
xorl %edx, %edx
callq 0x2f9e4
movq %rax, 0x98(%rsp)
movq %rax, %rdi
movl $0x1, %esi
callq 0x302d4
xorl %edi, %edi
callq 0x32d0
movl %eax, %edi
callq 0x3230
movl $0x43b, %edi            # imm = 0x43B
movl $0x4, %esi
callq 0x3260
movq %rax, %r12
movss 0xde24(%rip), %xmm2     # 0x53008
movss (%r12,%rbx,4), %xmm0
movd 0x5a4(%r12,%rbx,4), %xmm1
movd %xmm1, (%r12,%rbx,4)
movss %xmm0, 0x5a4(%r12,%rbx,4)
movaps %xmm2, %xmm0
subss 0xb48(%r12,%rbx,4), %xmm0
movss %xmm0, 0xb48(%r12,%rbx,4)
incq %rbx
cmpq $0x169, %rbx            # imm = 0x169
jne 0x451e4
movl $0x43b, %edi            # imm = 0x43B
movl $0x4, %esi
callq 0x3260
movq %rax, 0x50(%rsp)
movl $0x43b, %edi            # imm = 0x43B
movl $0x4, %esi
callq 0x3260
movq %rax, 0x8(%rsp)
xorl %eax, %eax
leaq 0x7c(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x78(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x74(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x139a5(%rip), %rbx     # 0x58c12
leaq 0xa0(%rsp), %rbp
movl $0x0, 0x40(%rsp)
movl $0x0, 0x38(%rsp)
movl $0x0, 0x3c(%rsp)
movl $0x0, 0x34(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x2c(%rsp)
xorl %r15d, %r15d
movq $0x0, 0x18(%rsp)
testl %r15d, %r15d
jne 0x45306
movl $0x0, 0x4c(%rsp)
xorl %r13d, %r13d
movq %rbx, %rdi
leaq 0x4c(%rsp), %rsi
xorl %eax, %eax
callq 0x3400
movl %eax, %r14d
leaq 0x116a0(%rip), %rdi     # 0x5697b
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3400
movq 0x24cec(%rip), %rax     # 0x69fd8
movq (%rax), %rdi
callq 0x32a0
movb $0x1, %cl
testl %eax, %eax
je 0x45330
movl %r13d, %r15d
testb %cl, %cl
je 0x452b2
jmp 0x4623d
movq 0x18(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq %r12, %rdx
movq 0x8(%rsp), %rcx
movl %r15d, %r8d
movss 0x48(%rsp), %xmm0
callq 0x997c
movq %rax, 0x18(%rsp)
jmp 0x452b7
movq 0x24cc1(%rip), %rax     # 0x69ff8
movq (%rax), %rdi
leaq 0x11669(%rip), %rsi     # 0x569aa
movq %rbp, %rdx
xorl %eax, %eax
callq 0x3280
movl 0x4c(%rsp), %edx
leaq 0x2a0(%rsp), %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3430
cmpl $0x1, %r14d
je 0x4536f
movb $0x0, 0x2a0(%rsp)
movq 0xa8(%rsp), %rax
movabsq $0x6e6f69737265765f, %rcx # imm = 0x6E6F69737265765F
xorq %rcx, %rax
movq 0xa0(%rsp), %rcx
movabsq $0x6c6f636f746f7270, %rdx # imm = 0x6C6F636F746F7270
xorq %rdx, %rcx
movzbl 0xb0(%rsp), %edx
orq %rcx, %rdx
orq %rax, %rdx
je 0x45459
movl 0xa0(%rsp), %eax
movl $0x656d616e, %ecx       # imm = 0x656D616E
xorl %ecx, %eax
movzbl 0xa4(%rsp), %ecx
orl %eax, %ecx
je 0x45468
movq 0xa0(%rsp), %rax
movabsq $0x7465735f656d6974, %rcx # imm = 0x7465735F656D6974
xorq %rcx, %rax
movq 0xa6(%rsp), %rcx
movabsq $0x73676e69747465, %rdx # imm = 0x73676E69747465
xorq %rdx, %rcx
orq %rax, %rcx
je 0x45482
movq 0xa0(%rsp), %rax
movabsq $0x66656c5f656d6974, %rcx # imm = 0x66656C5F656D6974
xorq %rcx, %rax
movzwl 0xa8(%rsp), %ecx
xorq $0x74, %rcx
orq %rax, %rcx
je 0x454a1
movq 0xa0(%rsp), %rax
movabsq $0x6e6f6973726576, %rcx # imm = 0x6E6F6973726576
cmpq %rcx, %rax
jne 0x45525
cmpl $0x0, 0x44(%rsp)
je 0x45810
xorl %r15d, %r15d
leaq 0x130ca(%rip), %rdi     # 0x5851e
jmp 0x45c0f
xorl %r15d, %r15d
leaq 0x13060(%rip), %rdi     # 0x584c3
jmp 0x45c0f
cmpl $0x0, 0x44(%rsp)
je 0x45516
xorl %r15d, %r15d
leaq 0x13053(%rip), %rdi     # 0x584d0
jmp 0x45c0f
leaq 0x13072(%rip), %rdi     # 0x584fb
leaq 0x7c(%rsp), %rsi
leaq 0x78(%rsp), %rdx
leaq 0x74(%rsp), %rcx
xorl %eax, %eax
callq 0x3400
jmp 0x4550a
xorl %eax, %eax
movl %eax, 0x14(%rsp)
movl %eax, 0x10(%rsp)
leaq 0x13063(%rip), %rdi     # 0x58515
leaq 0x1a0(%rsp), %rsi
leaq 0x14(%rsp), %rdx
leaq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x3400
movb 0x1a0(%rsp), %al
andb $-0x21, %al
cmpb $0x42, %al
movl 0x14(%rsp), %eax
movl 0x10(%rsp), %ecx
movl 0x40(%rsp), %edx
cmovnel %ecx, %edx
movl %edx, 0x40(%rsp)
movl 0x38(%rsp), %edx
cmovnel %eax, %edx
movl %edx, 0x38(%rsp)
movl 0x3c(%rsp), %edx
cmovel %ecx, %edx
movl %edx, 0x3c(%rsp)
movl 0x34(%rsp), %ecx
cmovel %eax, %ecx
movl %ecx, 0x34(%rsp)
leaq 0x12ff3(%rip), %rdi     # 0x58504
jmp 0x45c0f
xorl %r15d, %r15d
leaq 0x12fc0(%rip), %rdi     # 0x584e0
jmp 0x45c0f
movq 0xa0(%rsp), %rcx
movabsq $0x6f635f6e776f6e6b, %rdx # imm = 0x6F635F6E776F6E6B
xorq %rdx, %rcx
movq 0xa6(%rsp), %rdx
movabsq $0x646e616d6d6f63, %rsi # imm = 0x646E616D6D6F63
xorq %rsi, %rdx
orq %rcx, %rdx
leaq 0x130c4(%rip), %r14     # 0x5861d
leaq 0x133b0(%rip), %r15     # 0x58910
je 0x4581f
movq 0xa0(%rsp), %rcx
movabsq $0x6d6f635f7473696c, %rdx # imm = 0x6D6F635F7473696C
xorq %rdx, %rcx
movq 0xa6(%rsp), %rdx
movabsq $0x73646e616d6d6f, %rsi # imm = 0x73646E616D6D6F
xorq %rsi, %rdx
orq %rcx, %rdx
je 0x45ad5
movl 0xa0(%rsp), %ecx
movl $0x74697571, %edx       # imm = 0x74697571
xorl %edx, %ecx
movzbl 0xa4(%rsp), %edx
orl %ecx, %edx
je 0x45ae4
movq 0xa0(%rsp), %rcx
movabsq $0x7a69736472616f62, %rdx # imm = 0x7A69736472616F62
xorq %rdx, %rcx
movzwl 0xa8(%rsp), %edx
xorq $0x65, %rdx
orq %rcx, %rdx
je 0x45aee
movq 0xa0(%rsp), %rcx
movabsq $0x61685f6465786966, %rdx # imm = 0x61685F6465786966
xorq %rdx, %rcx
movq 0xa7(%rsp), %rdx
movabsq $0x70616369646e61, %rsi # imm = 0x70616369646E61
xorq %rsi, %rdx
orq %rcx, %rdx
je 0x45ba1
movq 0xa0(%rsp), %rcx
movabsq $0x6f625f7261656c63, %rdx # imm = 0x6F625F7261656C63
xorq %rdx, %rcx
movl 0xa8(%rsp), %edx
xorq $0x647261, %rdx         # imm = 0x647261
orq %rcx, %rdx
movq 0x18(%rsp), %r14
je 0x45c4d
movl 0xa0(%rsp), %ecx
movl $0x696d6f6b, %edx       # imm = 0x696D6F6B
xorl %edx, %ecx
movzbl 0xa4(%rsp), %edx
orl %ecx, %edx
je 0x45cf5
movq 0xa0(%rsp), %rcx
movabsq $0x72616f62776f6873, %rdx # imm = 0x72616F62776F6873
xorq %rdx, %rcx
movzwl 0xa8(%rsp), %edx
xorq $0x64, %rdx
orq %rcx, %rdx
je 0x45d42
movl 0xa0(%rsp), %edx
movl $0x79616c70, %ecx       # imm = 0x79616C70
xorl %ecx, %edx
movzbl 0xa4(%rsp), %esi
xorl %ecx, %ecx
orl %edx, %esi
setne %dl
je 0x45d1e
movl 0xa0(%rsp), %esi
movl $0x63616c62, %edi       # imm = 0x63616C62
xorl %edi, %esi
movzwl 0xa4(%rsp), %edi
xorl $0x6b, %edi
orl %esi, %edi
je 0x45d1e
movl 0xa0(%rsp), %esi
movl $0x74696877, %edi       # imm = 0x74696877
xorl %edi, %esi
movzwl 0xa4(%rsp), %edi
xorl $0x65, %edi
orl %esi, %edi
je 0x45d1e
movabsq $0x65766f6d6e6567, %rcx # imm = 0x65766F6D6E6567
cmpq %rcx, %rax
je 0x45f50
movq 0xa0(%rsp), %rcx
movabsq $0x5f65766f6d6e6567, %rdx # imm = 0x5F65766F6D6E6567
xorq %rdx, %rcx
movq 0xa6(%rsp), %rdx
movabsq $0x6b63616c625f65, %rsi # imm = 0x6B63616C625F65
xorq %rsi, %rdx
orq %rcx, %rdx
je 0x45f50
movq 0xa0(%rsp), %rcx
movabsq $0x5f65766f6d6e6567, %rdx # imm = 0x5F65766F6D6E6567
xorq %rdx, %rcx
movq 0xa6(%rsp), %rdx
movabsq $0x65746968775f65, %rsi # imm = 0x65746968775F65
xorq %rsi, %rdx
orq %rcx, %rdx
je 0x45f50
xorl %r15d, %r15d
cmpw $0x70, 0xa0(%rsp)
je 0x45c1e
movzwl 0xb0(%rsp), %eax
movd %eax, %xmm0
movdqa 0xa0(%rsp), %xmm1
pcmpeqb 0x12b66(%rip), %xmm1    # 0x58300
pcmpeqb 0x12b6e(%rip), %xmm0    # 0x58310
pand %xmm1, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x46213
movd 0xb0(%rsp), %xmm0
pcmpeqb 0x12b5a(%rip), %xmm0    # 0x58320
movdqa 0xa0(%rsp), %xmm1
pcmpeqb 0x12b59(%rip), %xmm1    # 0x58330
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x46228
movq 0x247e7(%rip), %rax     # 0x69fd8
movq (%rax), %rdi
callq 0xe165
movq %rax, %rdi
callq 0x3040
xorl %r15d, %r15d
leaq 0x12fb3(%rip), %rdi     # 0x587be
jmp 0x45c0f
xorl %r15d, %r15d
leaq 0x12d11(%rip), %rdi     # 0x5852b
jmp 0x45c0f
leaq 0x11155(%rip), %rdi     # 0x5697b
leaq 0x1a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3400
movq 0x1a8(%rsp), %rax
movabsq $0x6e6f69737265765f, %rcx # imm = 0x6E6F69737265765F
xorq %rcx, %rax
movq 0x1a0(%rsp), %rcx
movabsq $0x6c6f636f746f7270, %rdx # imm = 0x6C6F636F746F7270
xorq %rdx, %rcx
movzbl 0x1b0(%rsp), %edx
orq %rcx, %rdx
orq %rax, %rdx
movq %r14, %rdi
je 0x45c0c
movl 0x1a0(%rsp), %eax
movl $0x656d616e, %ecx       # imm = 0x656D616E
xorl %ecx, %eax
movzbl 0x1a4(%rsp), %ecx
orl %eax, %ecx
sete %cl
movq 0x1a0(%rsp), %rax
movabsq $0x6e6f6973726576, %rdx # imm = 0x6E6F6973726576
cmpq %rdx, %rax
sete %dl
orb %cl, %dl
movq %r14, %rdi
jne 0x45c0c
movq 0x1a0(%rsp), %rcx
movabsq $0x6f635f6e776f6e6b, %rdx # imm = 0x6F635F6E776F6E6B
xorq %rdx, %rcx
movq 0x1a6(%rsp), %rdx
movabsq $0x646e616d6d6f63, %rsi # imm = 0x646E616D6D6F63
xorq %rsi, %rdx
orq %rcx, %rdx
movq %r14, %rdi
je 0x45c0c
movq 0x1a0(%rsp), %rcx
movabsq $0x6d6f635f7473696c, %rdx # imm = 0x6D6F635F7473696C
xorq %rdx, %rcx
movq 0x1a6(%rsp), %rdx
movabsq $0x73646e616d6d6f, %rsi # imm = 0x73646E616D6D6F
xorq %rsi, %rdx
orq %rcx, %rdx
movq %r14, %rdi
je 0x45c0c
movl 0x1a0(%rsp), %ecx
movl $0x74697571, %edx       # imm = 0x74697571
xorl %edx, %ecx
movzbl 0x1a4(%rsp), %edx
orl %ecx, %edx
movq %r14, %rdi
je 0x45c0c
movq 0x1a0(%rsp), %rcx
movabsq $0x7a69736472616f62, %rdx # imm = 0x7A69736472616F62
xorq %rdx, %rcx
movzwl 0x1a8(%rsp), %edx
xorq $0x65, %rdx
orq %rcx, %rdx
movq %r14, %rdi
je 0x45c0c
movq 0x1a0(%rsp), %rcx
movabsq $0x6f625f7261656c63, %rdx # imm = 0x6F625F7261656C63
xorq %rdx, %rcx
movl 0x1a8(%rsp), %edx
xorq $0x647261, %rdx         # imm = 0x647261
orq %rcx, %rdx
movq %r14, %rdi
je 0x45c0c
movl 0x1a0(%rsp), %ecx
movl $0x696d6f6b, %edx       # imm = 0x696D6F6B
xorl %edx, %ecx
movzbl 0x1a4(%rsp), %edx
orl %ecx, %edx
movq %r14, %rdi
je 0x45c0c
movzwl 0x1b0(%rsp), %ecx
movd %ecx, %xmm0
movdqa 0x1a0(%rsp), %xmm1
pcmpeqb 0x12925(%rip), %xmm1    # 0x58300
pcmpeqb 0x1292d(%rip), %xmm0    # 0x58310
pand %xmm1, %xmm0
pmovmskb %xmm0, %ecx
movq %r14, %rdi
cmpl $0xffff, %ecx           # imm = 0xFFFF
je 0x45c0c
movl 0x1a0(%rsp), %ecx
movl $0x79616c70, %edx       # imm = 0x79616C70
xorl %edx, %ecx
movzbl 0x1a4(%rsp), %edx
orl %ecx, %edx
movq %r14, %rdi
je 0x45c0c
movq 0x1a0(%rsp), %rcx
movabsq $0x5f65766f6d6e6567, %rdx # imm = 0x5F65766F6D6E6567
xorq %rdx, %rcx
movq 0x1a6(%rsp), %rdx
movabsq $0x65746968775f65, %rsi # imm = 0x65746968775F65
xorq %rsi, %rdx
orq %rcx, %rdx
movq %r14, %rdi
je 0x45c0c
movq 0x1a0(%rsp), %rcx
movabsq $0x5f65766f6d6e6567, %rdx # imm = 0x5F65766F6D6E6567
xorq %rdx, %rcx
movq 0x1a6(%rsp), %rdx
movabsq $0x6b63616c625f65, %rsi # imm = 0x6B63616C625F65
xorq %rsi, %rdx
orq %rcx, %rdx
movq %r14, %rdi
je 0x45c0c
movq 0x1a0(%rsp), %rcx
movabsq $0x61685f6465786966, %rdx # imm = 0x61685F6465786966
xorq %rdx, %rcx
movq 0x1a7(%rsp), %rdx
movabsq $0x70616369646e61, %rsi # imm = 0x70616369646E61
xorq %rsi, %rdx
movabsq $0x65766f6d6e6567, %rsi # imm = 0x65766F6D6E6567
cmpq %rsi, %rax
leaq 0x12b63(%rip), %rdi     # 0x58628
cmoveq %r14, %rdi
orq %rcx, %rdx
cmoveq %r14, %rdi
jmp 0x45c0c
xorl %r15d, %r15d
leaq 0x12b55(%rip), %rdi     # 0x58634
jmp 0x45c0f
xorl %r15d, %r15d
movb $0x1, %cl
jmp 0x452fd
movl $0x0, 0x1a0(%rsp)
movq %rbx, %rdi
leaq 0x1a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3400
cmpl $0x13, 0x1a0(%rsp)
jne 0x45c05
movq 0x18(%rsp), %rdi
callq 0x442a8
movl $0x10ec, %edx           # imm = 0x10EC
movq %r12, %rdi
xorl %esi, %esi
callq 0x31d0
movq $-0x5a4, %rax           # imm = 0xFA5C
movss 0xd4c7(%rip), %xmm2     # 0x53008
movss 0x5a4(%r12,%rax), %xmm0
movd 0xb48(%r12,%rax), %xmm1
movd %xmm1, 0x5a4(%r12,%rax)
movss %xmm0, 0xb48(%r12,%rax)
movaps %xmm2, %xmm0
subss 0x10ec(%r12,%rax), %xmm0
movss %xmm0, 0x10ec(%r12,%rax)
addq $0x4, %rax
jne 0x45b41
movq $0x0, 0x20(%rsp)
leaq 0x1296e(%rip), %rdi     # 0x58504
movq $0x0, 0x18(%rsp)
jmp 0x45c0c
movl $0x0, 0x1a0(%rsp)
movq %rbx, %rdi
leaq 0x1a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3400
movslq 0x1a0(%rsp), %rax
testq %rax, %rax
jle 0x45bf6
leaq (,%rax,4), %rcx
xorl %edx, %edx
movslq (%rdx,%r15), %rsi
movl $0x3f800000, (%r12,%rsi,4) # imm = 0x3F800000
addq $0x4, %rdx
cmpq %rdx, %rcx
jne 0x45bd5
movq 0x20(%rsp), %rcx
addl %eax, %ecx
movq %rcx, 0x20(%rsp)
movq 0x18(%rsp), %rdi
callq 0x442a8
jmp 0x45cdf
leaq 0x12adc(%rip), %rdi     # 0x586e8
xorl %r15d, %r15d
leaq 0x2a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3170
movq 0x8(%rsp), %r14
movq 0x243a6(%rip), %rax     # 0x69fd0
movq (%rax), %rdi
callq 0x3320
movq 0x243bf(%rip), %rax     # 0x69ff8
movq (%rax), %rdi
callq 0x3320
xorl %ecx, %ecx
movq %r14, 0x8(%rsp)
jmp 0x452fd
movl $0x10ec, %edx           # imm = 0x10EC
movq %r12, %rdi
xorl %esi, %esi
callq 0x31d0
movq $-0x5a4, %rax           # imm = 0xFA5C
movss 0xd39d(%rip), %xmm2     # 0x53008
movss 0x5a4(%r12,%rax), %xmm0
movd 0xb48(%r12,%rax), %xmm1
movd %xmm1, 0x5a4(%r12,%rax)
movss %xmm0, 0xb48(%r12,%rax)
movaps %xmm2, %xmm0
subss 0x10ec(%r12,%rax), %xmm0
movss %xmm0, 0x10ec(%r12,%rax)
addq $0x4, %rax
jne 0x45c6b
movq %r14, %rdi
callq 0x442a8
movq $0x0, 0x20(%rsp)
leaq 0x1283c(%rip), %rdi     # 0x58504
leaq 0x2a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3170
movl $0x0, 0x2c(%rsp)
xorl %r15d, %r15d
movq 0x8(%rsp), %r14
movq $0x0, 0x18(%rsp)
jmp 0x45c23
movl $0x0, 0x1a0(%rsp)
xorl %r15d, %r15d
leaq 0x10cd2(%rip), %rdi     # 0x569dc
leaq 0x1a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3400
jmp 0x4550a
movb %dl, %cl
testl %ecx, %ecx
je 0x45d83
leaq 0x12633(%rip), %rdi     # 0x5835e
xorl %eax, %eax
callq 0x3400
movb 0xa0(%rsp), %al
movb %al, 0x1a0(%rsp)
jmp 0x45d99
xorl %r15d, %r15d
leaq 0x129be(%rip), %rdi     # 0x5870a
leaq 0x2a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3170
movq 0x2426e(%rip), %rax     # 0x69fd0
movq (%rax), %rdi
movq %r12, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x43a5d
movl $0xa, %edi
callq 0x3060
jmp 0x45c1e
leaq 0x12986(%rip), %rdi     # 0x58710
leaq 0x1a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3400
leaq 0x12974(%rip), %rdi     # 0x58714
leaq 0x10(%rsp), %rsi
leaq 0x14(%rsp), %rdx
xorl %eax, %eax
callq 0x3400
movb 0x1a0(%rsp), %dl
andb $-0x21, %dl
xorl %ecx, %ecx
cmpb $0x42, %dl
sete %dl
movb 0x10(%rsp), %sil
movl %esi, %edi
andb $-0x21, %dil
cmpb $0x50, %dil
setne %dil
cmpl $0x2, %eax
setge %r13b
orb %dil, %r13b
jne 0x45e72
leaq 0x12717(%rip), %rdi     # 0x58504
leaq 0x2a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3170
movq 0x241d5(%rip), %rax     # 0x69fd8
movq (%rax), %rdi
callq 0xe165
movq %rax, %rdi
callq 0x3040
movq 0x241b6(%rip), %rax     # 0x69fd0
movq (%rax), %rdi
callq 0x3320
movq 0x241cf(%rip), %rax     # 0x69ff8
movq (%rax), %rdi
callq 0x3320
movq %r14, %rdi
movl $0x169, %esi            # imm = 0x169
callq 0x44c31
movq %rax, 0x18(%rsp)
movl $0x1, 0x2c(%rsp)
movq 0x8(%rsp), %r14
movq 0x20(%rsp), %rax
incl %eax
movq %rax, 0x20(%rsp)
xorl %r15d, %r15d
movl $0x0, %ecx
testb %r13b, %r13b
je 0x452fd
jmp 0x45c23
addb $-0x41, %sil
cmpb $0x19, %sil
ja 0x45e81
movb %sil, 0x10(%rsp)
movb 0x10(%rsp), %al
addb $-0x61, %al
cmpb $0x19, %al
ja 0x45e8f
movb %al, 0x10(%rsp)
movb 0x10(%rsp), %al
cmpb $0x8, %al
jl 0x45e9d
decb %al
movb %al, 0x10(%rsp)
movb %dl, %cl
movl $0x13, %edx
subl 0x14(%rsp), %edx
leal -0x1(,%rcx,2), %r15d
movl %edx, 0x14(%rsp)
movq 0x2413d(%rip), %rax     # 0x69ff8
movq (%rax), %rdi
movsbl 0x10(%rsp), %ecx
leaq 0x1284f(%rip), %rsi     # 0x58719
xorl %eax, %eax
callq 0x3280
movl 0x14(%rsp), %edx
movsbl 0x10(%rsp), %ecx
movq %r12, %rdi
movl %r15d, %esi
callq 0x43e98
movl $0x43b, %edi            # imm = 0x43B
movq %r12, %rsi
movl $0x1, %edx
movq 0x8(%rsp), %rcx
movl $0x1, %r8d
callq 0x2879c
movq 0x18(%rsp), %r14
testq %r14, %r14
je 0x45f1e
movq %r14, %rdi
leaq 0x14(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x9d48
movl 0x14(%rsp), %eax
leal (%rax,%rax,8), %ecx
leal (%rax,%rcx,2), %eax
movsbl 0x10(%rsp), %esi
addl %eax, %esi
movq %r14, %rdi
callq 0x44c31
movq %rax, %r14
movq 0x240b7(%rip), %rax     # 0x69ff8
movq (%rax), %rdi
testq %r14, %r14
jne 0x45f96
callq 0x9dd5
jmp 0x45fa8
movabsq $0x65766f6d6e6567, %rcx # imm = 0x65766F6D6E6567
cmpq %rcx, %rax
jne 0x45fe4
leaq 0x10a11(%rip), %rdi     # 0x5697b
leaq 0x1a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3400
movb 0x1a0(%rsp), %al
andb $-0x21, %al
xorl %ecx, %ecx
cmpb $0x42, %al
sete %cl
leal -0x1(,%rcx,2), %r14d
jmp 0x4601e
movl 0x38(%r14), %edx
leaq 0x12497(%rip), %rsi     # 0x58438
xorl %eax, %eax
callq 0x3280
movq %r14, 0x18(%rsp)
movl $0x0, 0x2c(%rsp)
leaq 0x12548(%rip), %rdi     # 0x58504
leaq 0x2a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3170
movq 0x50(%rsp), %r14
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r14, 0x8(%rsp)
jmp 0x45e50
movq 0xa0(%rsp), %rax
movabsq $0x5f65766f6d6e6567, %rcx # imm = 0x5F65766F6D6E6567
xorq %rcx, %rax
movq 0xa6(%rsp), %rcx
movabsq $0x6b63616c625f65, %rdx # imm = 0x6B63616C625F65
xorq %rdx, %rcx
xorl %edx, %edx
orq %rax, %rcx
sete %dl
leal -0x1(,%rdx,2), %r14d
testl %r14d, %r14d
movl 0x38(%rsp), %eax
cmovgl 0x34(%rsp), %eax
movss 0x122be(%rip), %xmm0    # 0x582f0
movss %xmm0, 0x80(%rsp)
cmpl $0x1f, %eax
jl 0x4604f
movss 0x64(%rsp), %xmm0
movss %xmm0, 0x80(%rsp)
movq 0x20(%rsp), %rax
incl %eax
movl %eax, 0x30(%rsp)
movl %r14d, %r15d
negl %r15d
xorl %eax, %eax
callq 0xdfdc
movsd %xmm0, 0x58(%rsp)
movq 0x18(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq %r12, %rdx
movq 0x8(%rsp), %rcx
movl %r14d, %r8d
movl 0x68(%rsp), %r9d
movss 0x48(%rsp), %xmm0
movss 0x80(%rsp), %xmm1
callq 0x44a53
movq %rax, %r13
movq %rax, 0x18(%rsp)
movq 0x23f4b(%rip), %rax     # 0x69ff8
movq (%rax), %rax
movq %rax, 0x80(%rsp)
xorl %eax, %eax
callq 0xdfdc
subsd 0x58(%rsp), %xmm0
movq 0x80(%rsp), %rdi
leaq 0x133db(%rip), %rsi     # 0x594af
movb $0x1, %al
callq 0x3280
movq %r13, %rdi
movss 0x6c(%rsp), %xmm0
movl %r14d, 0x58(%rsp)
movl %r14d, %esi
callq 0x969b
movaps %xmm0, 0x80(%rsp)
movq %rax, %r13
leal (%rax,%rax,8), %eax
leal (%r13,%rax,2), %esi
movq %r13, %r14
shrq $0x20, %r14
addl %r14d, %esi
movq 0x18(%rsp), %rdi
callq 0x44c31
movaps 0x80(%rsp), %xmm2
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpl 0x70(%rsp), %eax
jl 0x46167
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
movsd 0x10471(%rip), %xmm1    # 0x565b0
ucomisd %xmm0, %xmm1
jbe 0x46167
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
movsd 0x10458(%rip), %xmm1    # 0x565b0
ucomisd %xmm0, %xmm1
jbe 0x46167
leaq 0x125ef(%rip), %rdi     # 0x58754
jmp 0x4617c
cmpl $0x13, %r13d
jne 0x46199
movl $0x0, 0x2c(%rsp)
leaq 0x125e5(%rip), %rdi     # 0x58761
leaq 0x2a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3170
movl 0x30(%rsp), %eax
movq %rax, 0x20(%rsp)
jmp 0x45c1e
movq %r12, %rdi
movl 0x58(%rsp), %esi
movl %r13d, %edx
movl %r14d, %ecx
callq 0x43e98
movl $0x43b, %edi            # imm = 0x43B
movq %r12, %rsi
movl $0x1, %edx
movq 0x8(%rsp), %rcx
movl $0x1, %r8d
callq 0x2879c
movl $0x13, %ecx
subl %r13d, %ecx
xorl %eax, %eax
cmpl $0x8, %r14d
setge %al
leal (%r14,%rax), %edx
addl $0x41, %edx
leaq 0x12585(%rip), %rdi     # 0x5876c
leaq 0x2a0(%rsp), %rsi
xorl %eax, %eax
callq 0x3170
movl 0x30(%rsp), %eax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %r14
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x45c23
movq %r12, %rdi
leaq 0x2a0(%rsp), %rsi
callq 0x9c13
jmp 0x45c1e
movq %r12, %rdi
leaq 0x2a0(%rsp), %rsi
callq 0x9af7
jmp 0x45c1e
leaq 0x130ff(%rip), %rdi     # 0x59343
movl 0x2c(%rsp), %esi
movl 0x3c(%rsp), %edx
movl 0x40(%rsp), %ecx
xorl %eax, %eax
callq 0x3170
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq