// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/main.c
// Function: main
int
main(void)
{
    int w, h;
    display_init();
    device_terminal_size(&w, &h);
    if (w < DISPLAY_WIDTH || h < DISPLAY_HEIGHT) {
        display_free();
        printf("Goblin-COM requires a terminal of at least %dx%d characters!\n"
               "I see %dx%d\n"
               "Press enter to exit ...\n",
               DISPLAY_WIDTH, DISPLAY_HEIGHT, w, h);
        fflush(stdout);
        getchar();
        exit(EXIT_FAILURE);
    }
    device_entropy(&rand_state, sizeof(rand_state));
    device_title("Goblin-COM");

    panel_t loading;
    uint8_t loading_message[] = "Initializing world ...";
    panel_center_init(&loading, sizeof(loading_message), 1);
    display_push(&loading);
    panel_puts(&loading, 0, 0, FONT_DEFAULT, (char *)loading_message);
    display_refresh();
    game_t *game;
    FILE *save = fopen(PERSIST_FILE, "rb");
    if (save) {
        game = game_load(save);
        fclose(save);
        game->speed = SPEED_FACTOR;
        unlink(PERSIST_FILE);
    } else {
        game = game_create(xorshift(&rand_state));
        game->speed = SPEED_FACTOR;
    }
    atexit_save_game = game;
    atexit(atexit_save);
    display_pop_free();

    panel_t sidemenu;
    panel_init(&sidemenu, DISPLAY_WIDTH - SIDEMENU_WIDTH, 0,
               SIDEMENU_WIDTH, DISPLAY_HEIGHT);
    display_push(&sidemenu);

    panel_t terrain;
    panel_init(&terrain, 0, 0, MAP_WIDTH, MAP_HEIGHT);
    display_push(&terrain);

    panel_t buildings;
    panel_init(&buildings, 0, 0, MAP_WIDTH, MAP_HEIGHT);
    display_push(&buildings);

    panel_t units;
    panel_init(&units, 0, 0, MAP_WIDTH, MAP_HEIGHT);
    display_push(&units);

    /* Main Loop */
    bool running = true;
    while (running) {
        yield_t diff;
        for (int i = 0; running && i < game->speed; i++) {
            diff = game_step(game);
            enum game_event event;
            while ((event = game_event_pop(game)) != EVENT_NONE) {
                sidemenu_draw(&sidemenu, game, diff);
                display_refresh();
                switch (event) {
                case EVENT_LOSE:
                    atexit_save_game = NULL;
                    running = false;
                    ui_gameover(game, &terrain);
                break;
                case EVENT_PROGRESS_1:
                    ui_halfway(game, &terrain);
                    break;
                case EVENT_WIN:
                    atexit_save_game = NULL;
                    running = false;
                    ui_win(game, &terrain);
                    break;
                case EVENT_BATTLE:
                    ui_apology(game, &terrain);
                    break;
                case EVENT_NONE:
                    break;
                }
            }
        }

        sidemenu_draw(&sidemenu, game, diff);
        map_draw_terrain(game->map, &terrain);
        panel_clear(&buildings);
        map_draw_buildings(game->map, &buildings);
        panel_clear(&units);
        game_draw_units(game, &units, false);
        display_refresh();
        uint64_t wait = device_uepoch() % PERIOD;
        if (device_kbhit(wait)) {
            int key = device_getch();
            switch (key) {
            case 'b':
                ui_build(game, &terrain);
                break;
            case 's':
                ui_squads(game, &terrain, &units);
                break;
            case 'h':
                ui_heroes(game, &terrain);
                break;
            case 't':
                ui_story(game, &terrain);
                break;
            case 'p':
                ui_help(game, &terrain);
                break;
            case '>':
            case '.':
                if (game->speed < SPEED_MAX)
                    game->speed *= SPEED_FACTOR;
                break;
            case '<':
            case ',':
                game->speed /= SPEED_FACTOR;
                if (game->speed == 0)
                    game->speed = 1;
                break;
            case 'R':
                display_invalidate();
                break;
            case 'q':
                running = !popup_quit(true);
                break;
            case 'Q':
                running = !popup_quit(false);
                if (!running)
                    atexit_save_game = NULL;
                break;
            default:
                break;
            }
        }
    };

    atexit_save();
    atexit_save_game = NULL;
    game_free(game);

    display_pop(); // units
    display_pop(); // buildings
    display_pop(); // terrain
    display_pop(); // sidemenu
    panel_free(&units);
    panel_free(&buildings);
    panel_free(&terrain);
    panel_free(&sidemenu);
    display_free();
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a7b8, %rsp          # imm = 0x1A7B8
callq 0x3088
leaq 0x54(%rsp), %rbx
leaq 0x2c(%rsp), %rsi
movq %rbx, %rdi
callq 0x66c8
cmpl $0x50, (%rbx)
jl 0x28d2
cmpl $0x17, 0x2c(%rsp)
jle 0x28d2
leaq 0x11e39(%rip), %rdi     # 0x131e8
movl $0x8, %esi
callq 0x6708
leaq 0x5d1a(%rip), %rdi      # 0x70da
callq 0x66b7
movapd 0x6213(%rip), %xmm0     # 0x75e0
leaq 0xd0(%rsp), %rbx
movapd %xmm0, (%rbx)
movabsq $0x2e2e2e20646c72, %rax # imm = 0x2E2E2E20646C72
movq %rax, 0xf(%rbx)
leaq 0x16ba0(%rsp), %r14
movq %r14, %rdi
movl $0x17, %esi
movl $0x1, %edx
callq 0x341b
movq %r14, %rdi
callq 0x33a4
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x10007, %ecx          # imm = 0x10007
movq %rbx, %r8
callq 0x34e1
callq 0x31f8
leaq 0x5cbc(%rip), %rdi      # 0x70e5
leaq 0x5cc2(%rip), %rsi      # 0x70f2
callq 0x1210
testq %rax, %rax
je 0x1465
movq %rax, %r14
movq %rax, %rdi
callq 0x4ef8
movq %rax, %rbx
movq %r14, %rdi
callq 0x10b0
movl $0x6, 0x10(%rbx)
leaq 0x5c87(%rip), %rdi      # 0x70e5
callq 0x1040
jmp 0x1483
leaq 0x11d7c(%rip), %rdi     # 0x131e8
callq 0x5f4c
movq %rax, %rdi
callq 0x4da5
movq %rax, %rbx
movl $0x6, 0x10(%rax)
movq %rbx, 0xb3f6(%rip)      # 0xc880
leaq 0x1485(%rip), %rdi      # 0x2916
callq 0x67b0
callq 0x33db
leaq 0xf370(%rsp), %r14
movq %r14, %rdi
movl $0x3c, %esi
xorl %edx, %edx
movl $0x14, %ecx
movl $0x18, %r8d
callq 0x3122
movq %r14, %rdi
callq 0x33a4
leaq 0x7b40(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x3c, %ecx
movl $0x18, %r8d
callq 0x3122
movq %r14, %rdi
callq 0x33a4
leaq 0x12f88(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x3c, %ecx
movl $0x18, %r8d
callq 0x3122
movq %r15, %rdi
callq 0x33a4
leaq 0xb758(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x3c, %ecx
movl $0x18, %r8d
callq 0x3122
movq %r15, %rdi
callq 0x33a4
leaq 0x3cc(%rbx), %rax
movq %rax, 0x40(%rsp)
leaq 0x2c8(%rbx), %rax
movq %rax, 0x38(%rsp)
movb $0x1, %r12b
leaq 0x5aa8(%rip), %rbp      # 0x7004
testb $0x1, %r12b
je 0x1679
cmpl $0x0, 0x10(%rbx)
jle 0x1679
xorl %r15d, %r15d
movl %r12d, %r13d
movq %rbx, %rdi
callq 0x56f7
movq %rax, 0x58(%rsp)
movl %edx, 0x28(%rsp)
movq %rbx, %rdi
callq 0x54fd
testl %eax, %eax
je 0x1663
movl %eax, %r12d
leaq 0xf370(%rsp), %rdi
movq %rbx, %rsi
movq 0x58(%rsp), %rdx
movl 0x28(%rsp), %ecx
callq 0x2963
callq 0x31f8
decl %r12d
cmpl $0x3, %r12d
ja 0x1650
movslq (%rbp,%r12,4), %rax
addq %rbp, %rax
jmpq *%rax
movq $0x0, 0xb2a6(%rip) # 0xc880
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x987d(%rip), %rdx      # 0xae64
jmp 0x1643
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x9b95(%rip), %rdx      # 0xb18b
movl $0x10, %ecx
callq 0x2bef
jmp 0x1650
cmpb $0x0, 0x1dec(%rbx)
jne 0x1622
movq %rbx, %rdi
movq %r14, %rsi
leaq 0xafbb(%rip), %rdx      # 0xc5d3
movl $0xe, %ecx
callq 0x2bef
movb $0x1, 0x1dec(%rbx)
jmp 0x1650
movq $0x0, 0xb24a(%rip) # 0xc880
movq %rbx, %rdi
movq %r14, %rsi
leaq 0xa470(%rip), %rdx      # 0xbab3
movl $0x10, %ecx
callq 0x2bef
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x54fd
movl %eax, %r12d
testl %eax, %eax
jne 0x159a
movl %r13d, %r12d
testb $0x1, %r12b
je 0x1679
incl %r15d
cmpl 0x10(%rbx), %r15d
jl 0x1573
leaq 0xf370(%rsp), %rdi
movq %rbx, %rsi
movq 0x58(%rsp), %rdx
movl 0x28(%rsp), %ecx
callq 0x2963
movq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0x4a37
leaq 0x12f88(%rsp), %r15
movq %r15, %rdi
callq 0x3bb8
movq 0x38(%rbx), %rdi
movq %r15, %rsi
callq 0x4c3b
leaq 0xb758(%rsp), %r15
movq %r15, %rdi
callq 0x3bb8
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x5cd9
callq 0x31f8
callq 0x6694
movq %rax, %rdi
movabsq $-0x456d8a7abe346c9, %rcx # imm = 0xFBA92758541CB937
mulq %rcx
shrq $0x10, %rdx
imulq $0x1046a, %rdx, %rax    # imm = 0x1046A
subq %rax, %rdi
callq 0x6615
testb %al, %al
je 0x266f
callq 0x6557
cmpl $0x61, %eax
leaq 0x3f20(%rsp), %r15
leaq 0x300(%rsp), %r13
jg 0x1770
cmpl $0x3d, %eax
jg 0x179f
cmpl $0x2c, %eax
je 0x1742
cmpl $0x2e, %eax
je 0x1e9d
cmpl $0x3c, %eax
jne 0x266f
movslq 0x10(%rbx), %rax
imulq $0x2aaaaaab, %rax, %rcx # imm = 0x2AAAAAAB
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
addl $0x5, %eax
cmpl $0xb, %eax
movl $0x1, %eax
cmovbl %eax, %ecx
movl %ecx, 0x10(%rbx)
jmp 0x266f
leal -0x70(%rax), %ecx
cmpl $0x4, %ecx
ja 0x17c4
leaq 0x5895(%rip), %rdx      # 0x7014
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x8d4f(%rip), %rdx      # 0xa4e4
movl $0x13, %ecx
jmp 0x1eca
cmpl $0x3e, %eax
je 0x1e9d
cmpl $0x51, %eax
je 0x2027
cmpl $0x52, %eax
jne 0x266f
callq 0x33fc
jmp 0x266f
cmpl $0x68, %eax
je 0x204b
cmpl $0x62, %eax
jne 0x266f
movl %r12d, 0x1c(%rsp)
movq %r13, %rdi
movl $0x38, %esi
movl $0x14, %edx
callq 0x341b
movq %r13, %rdi
callq 0x33a4
movq %r13, %rdi
movl $0x7, %esi
callq 0x418c
movl $0x19, %esi
movq %r15, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x53ae
leaq 0xf0(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
movl $0x5, %edx
movl $0x1, %ecx
callq 0x53ae
movq %r13, %rdi
movl $0x1, %esi
movl $0x1, %edx
leaq 0x5a10(%rip), %rcx      # 0x7253
movq %r15, %r8
xorl %eax, %eax
callq 0x36ec
movq %r13, %rdi
movl $0x5, %esi
movl $0x2, %edx
leaq 0x5a0e(%rip), %r14      # 0x726f
movq %r14, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x36ec
movslq 0xb013(%rip), %rax      # 0xc888
leal 0x7(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $-0x8, %ecx
leaq (,%rax,8), %rdx
subq %rax, %rdx
leal 0x1(%rax), %esi
subl %ecx, %eax
cltq
leaq (,%rax,8), %rcx
subq %rax, %rcx
leaq 0xafec(%rip), %r15      # 0xc890
movw $0x99e2, %ax            # imm = 0x99E2
movw %ax, (%rcx,%r15)
movb $-0x5d, %al
movb %al, 0x2(%rcx,%r15)
leaq (%r15,%rcx), %r8
xorl %eax, %eax
movb %al, 0x3(%rdx,%r15)
movl %esi, 0xafc3(%rip)      # 0xc888
movq %r13, %rdi
movl $0x5, %esi
movl $0x3, %edx
leaq 0x59a4(%rip), %rcx      # 0x727d
xorl %eax, %eax
callq 0x36ec
leaq 0x3f20(%rsp), %rdi
xorl %esi, %esi
movl $0x14, %edx
xorl %ecx, %ecx
callq 0x53ae
movq %r12, %rdi
movabsq $0x400000000, %rsi      # imm = 0x400000000
xorl %edx, %edx
movl $0x1, %ecx
callq 0x53ae
movq %r13, %rdi
movl $0x1, %esi
movl $0x4, %edx
leaq 0x5972(%rip), %rcx      # 0x7295
leaq 0x3f20(%rsp), %r8
xorl %eax, %eax
callq 0x36ec
movq %r13, %rdi
movl $0x5, %esi
movl $0x5, %edx
movq %r14, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x36ec
movslq 0xaf35(%rip), %rax      # 0xc888
leal 0x7(%rax), %ecx
testq %rax, %rax
cmovnsl %eax, %ecx
andl $-0x8, %ecx
movl %eax, %edx
subl %ecx, %edx
movslq %edx, %rcx
leaq (,%rcx,8), %rdx
subq %rcx, %rdx
leaq (%r15,%rdx), %r8
movb $0x2e, %cl
movb %cl, (%rdx,%r15)
leaq (,%rax,8), %rcx
subq %rax, %rcx
xorl %edi, %edi
movb %dil, 0x1(%rcx,%r15)
leal 0x1(%rax), %edx
leal 0x8(%rax), %esi
testl %edx, %edx
cmovnsl %edx, %esi
andl $-0x8, %esi
negl %esi
leal (%rax,%rsi), %edx
incl %edx
movslq %edx, %rdx
leaq (,%rdx,8), %rsi
subq %rdx, %rsi
leaq (%r15,%rsi), %r9
movw $0x99e2, %dx            # imm = 0x99E2
movw %dx, (%rsi,%r15)
movb $-0x5d, %dl
movb %dl, 0x2(%rsi,%r15)
movb %dil, 0xa(%rcx,%r15)
xorl %r13d, %r13d
addl $0x2, %eax
movl %eax, 0xaeb3(%rip)      # 0xc888
leaq 0x300(%rsp), %rdi
movl $0x5, %esi
movl $0x6, %edx
leaq 0x58bd(%rip), %rcx      # 0x72ab
xorl %eax, %eax
callq 0x36ec
movl $0x46, %esi
leaq 0x3f20(%rsp), %rdi
movl $0x46, %edx
xorl %ecx, %ecx
callq 0x53ae
movq %r12, %rdi
movabsq $-0x200000000, %rsi     # imm = 0xFFFFFFFE00000000
xorl %edx, %edx
movl $0x1, %ecx
callq 0x53ae
leaq 0x300(%rsp), %rdi
movl $0x1, %esi
movl $0x7, %edx
leaq 0x5893(%rip), %rcx      # 0x72d3
leaq 0x3f20(%rsp), %r8
xorl %eax, %eax
callq 0x36ec
leaq 0x300(%rsp), %rdi
movl $0x5, %esi
movl $0x8, %edx
leaq 0x5883(%rip), %rcx      # 0x72eb
movq %r12, %r8
movl $0x2, %r9d
xorl %eax, %eax
callq 0x36ec
movslq 0xae09(%rip), %rax      # 0xc888
leal 0x7(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $-0x8, %ecx
leaq (,%rax,8), %rdx
subq %rax, %rdx
leal 0x1(%rax), %esi
subl %ecx, %eax
cltq
leaq (,%rax,8), %rcx
subq %rax, %rcx
movb $0x2e, %al
movb %al, (%rcx,%r15)
leaq (%r15,%rcx), %r8
movb %r13b, 0x1(%rdx,%r15)
xorl %r13d, %r13d
movl %esi, 0xadc9(%rip)      # 0xc888
leaq 0x300(%rsp), %rdi
movl $0x5, %esi
movl $0x9, %edx
leaq 0x5839(%rip), %rcx      # 0x7311
xorl %eax, %eax
callq 0x36ec
leaq 0x3f20(%rsp), %rdi
xorl %esi, %esi
movl $0x64, %edx
xorl %ecx, %ecx
callq 0x53ae
movl $0x5, %esi
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0x53ae
leaq 0x300(%rsp), %rdi
movl $0x1, %esi
movl $0xa, %edx
leaq 0x5807(%rip), %rcx      # 0x732c
leaq 0x3f20(%rsp), %r8
xorl %eax, %eax
callq 0x36ec
leaq 0x300(%rsp), %rdi
movl $0x5, %esi
movl $0xb, %edx
leaq 0x5722(%rip), %rcx      # 0x726f
movq %r12, %r8
xorl %eax, %eax
callq 0x36ec
movslq 0xad2a(%rip), %rax      # 0xc888
leal 0x7(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $-0x8, %ecx
leaq (,%rax,8), %rdx
subq %rax, %rdx
leal 0x1(%rax), %esi
subl %ecx, %eax
cltq
leaq (,%rax,8), %rcx
subq %rax, %rcx
movw $0x88e2, %ax            # imm = 0x88E2
movw %ax, (%rcx,%r15)
movb $-0x57, %r14b
movb %r14b, 0x2(%rcx,%r15)
leaq (%r15,%rcx), %r8
movb %r13b, 0x3(%rdx,%r15)
movl %esi, 0xace2(%rip)      # 0xc888
leaq 0x300(%rsp), %rdi
movl $0x5, %esi
movl $0xc, %edx
leaq 0x5783(%rip), %rcx      # 0x7342
xorl %eax, %eax
callq 0x36ec
leaq 0x3f20(%rsp), %rdi
xorl %esi, %esi
movl $0x1e, %edx
xorl %ecx, %ecx
callq 0x53ae
movabsq $-0x200000000, %rax     # imm = 0xFFFFFFFE00000000
leaq 0x2(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x53ae
leaq 0x300(%rsp), %rdi
movl $0x1, %esi
movl $0xd, %edx
leaq 0x5746(%rip), %rcx      # 0x7358
leaq 0x3f20(%rsp), %r8
xorl %eax, %eax
callq 0x36ec
leaq 0x300(%rsp), %rdi
movl $0x5, %esi
movl $0xe, %edx
leaq 0x5736(%rip), %rcx      # 0x7370
movq %r12, %r8
movl $0xc8, %r9d
xorl %eax, %eax
callq 0x36ec
movslq 0xac37(%rip), %rax      # 0xc888
leal 0x7(%rax), %ecx
testq %rax, %rax
cmovnsl %eax, %ecx
andl $-0x8, %ecx
movl %eax, %edx
subl %ecx, %edx
movslq %edx, %rcx
leaq (,%rcx,8), %rdx
subq %rcx, %rdx
leaq (%r15,%rdx), %r8
movb $0x2e, %cl
movb %cl, (%rdx,%r15)
leaq 0x300(%rsp), %r13
leaq (,%rax,8), %rcx
subq %rax, %rcx
leal 0x1(%rax), %edx
leal 0x8(%rax), %esi
testl %edx, %edx
cmovnsl %edx, %esi
xorl %edi, %edi
movb %dil, 0x1(%rcx,%r15)
andl $-0x8, %esi
negl %esi
leal (%rax,%rsi), %edx
incl %edx
movslq %edx, %rdx
leaq (,%rdx,8), %rsi
subq %rdx, %rsi
leaq (%r15,%rsi), %r9
movw $0x99e2, %dx            # imm = 0x99E2
movw %dx, (%rsi,%r15)
movb $-0x5d, %dl
movb %dl, 0x2(%rsi,%r15)
movb %dil, 0xa(%rcx,%r15)
xorl %edi, %edi
leal 0x2(%rax), %edx
leal 0x9(%rax), %esi
testl %edx, %edx
cmovnsl %edx, %esi
andl $-0x8, %esi
negl %esi
leal (%rax,%rsi), %edx
addl $0x2, %edx
movslq %edx, %rdx
leaq (,%rdx,8), %rsi
subq %rdx, %rsi
leaq (%r15,%rsi), %r10
movw $0x88e2, %dx            # imm = 0x88E2
movw %dx, (%rsi,%r15)
movb %r14b, 0x2(%rsi,%r15)
movb %dil, 0x11(%rcx,%r15)
leaq 0x3f20(%rsp), %r15
addl $0x3, %eax
movl %eax, 0xab6b(%rip)      # 0xc888
subq $0x8, %rsp
movq %r13, %rdi
movl $0x5, %esi
movl $0xf, %edx
leaq 0x565b(%rip), %rcx      # 0x7390
xorl %eax, %eax
pushq %r10
callq 0x36ec
addq $0x10, %rsp
movl $0x1, %esi
movq %r15, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x53ae
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x53ae
movq %r13, %rdi
movl $0x1, %esi
movl $0x10, %edx
leaq 0x5648(%rip), %rcx      # 0x73c3
movq %r15, %r8
xorl %eax, %eax
callq 0x36ec
movq %r13, %rdi
movl $0x5, %esi
movl $0x11, %edx
leaq 0x5640(%rip), %rcx      # 0x73d9
movq %r12, %r8
xorl %eax, %eax
callq 0x36ec
movq %r13, %rdi
movl $0x5, %esi
movl $0x12, %edx
leaq 0x5650(%rip), %rcx      # 0x7407
xorl %eax, %eax
callq 0x36ec
leaq 0x7b40(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e6f
cmpl $0x1b, %eax
je 0x2665
movl %eax, %r12d
cmpl $0x51, %eax
je 0x2665
cmpl $0x71, %r12d
je 0x2665
movl $0x7, %edx
leaq 0x5622(%rip), %rdi      # 0x741e
movl %r12d, %esi
callq 0x1140
testq %rax, %rax
je 0x1e16
movl %r12d, %edi
callq 0x1050
movl %eax, %r12d
jmp 0x1e19
xorl %r12d, %r12d
testw %r12w, %r12w
je 0x1dc6
cmpw $0x52, %r12w
movl $0x2b, %eax
cmovel %eax, %r12d
callq 0x33db
movzwl %r12w, %r12d
movl %r12d, %edi
callq 0x51ff
movq %rax, %rcx
shrq $0x20, %rcx
je 0x1e56
movsd 0x28(%rbx), %xmm0
cvtsi2sd %ecx, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1e8a
testl %edx, %edx
je 0x1e6c
movsd 0x20(%rbx), %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1e8a
testl %eax, %eax
je 0x267e
movsd 0x18(%rbx), %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
jae 0x267e
leaq 0x5389(%rip), %rsi      # 0x721a
xorl %eax, %eax
callq 0x2ec1
jmp 0x17db
movl 0x10(%rbx), %eax
cmpl $0x1e5f, %eax           # imm = 0x1E5F
jg 0x266f
addl %eax, %eax
leal (%rax,%rax,2), %eax
movl %eax, 0x10(%rbx)
jmp 0x266f
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x8283(%rip), %rdx      # 0xa148
movl $0x14, %ecx
callq 0x2bef
jmp 0x266f
movl $0x1, %edi
callq 0x2b6b
movl %eax, %r12d
xorb $0x1, %r12b
jmp 0x266f
movl %r12d, 0x1c(%rsp)
movq %r15, %rdi
movl $0x1d, %esi
movl $0x13, %edx
callq 0x341b
movq %r15, %rdi
movl $0x7, %esi
callq 0x418c
xorl %r12d, %r12d
movq %r15, %rdi
movl $0x1, %esi
movl $0x1, %edx
leaq 0x5529(%rip), %rcx      # 0x744e
xorl %eax, %eax
callq 0x36ec
movq %r15, %rdi
callq 0x33a4
addl $-0x61, %r12d
cmpl $0x10, %r12d
jb 0x25e4
movl $0x2d4, %r14d           # imm = 0x2D4
movl $0x41, %r12d
movl (%rbx,%r14), %r9d
testl %r9d, %r9d
je 0x1f7a
movl -0x4(%rbx,%r14), %edx
testl %edx, %edx
js 0x1f9b
addl $0x41, %edx
movq %r13, %rdi
leaq 0x5512(%rip), %rsi      # 0x747f
xorl %eax, %eax
callq 0x1230
movl (%rbx,%r14), %r9d
jmp 0x1fb4
movabsq $0x7974706d457b6b4b, %rax # imm = 0x7974706D457B6B4B
movq %rax, 0x300(%rsp)
movw $0x7d, 0x308(%rsp)
xorl %r9d, %r9d
jmp 0x1fb4
movupd 0x54cb(%rip), %xmm0     # 0x746e
movapd %xmm0, 0x300(%rsp)
movb $0x0, 0x310(%rsp)
leal -0x3f(%r12), %edx
subq $0x8, %rsp
movq %r15, %rdi
movl $0x1, %esi
leaq 0x54c7(%rip), %rcx      # 0x7493
movl %r12d, %r8d
xorl %eax, %eax
pushq %r13
callq 0x36ec
addq $0x10, %rsp
addq $0x10, %r14
incl %r12d
cmpq $0x3d4, %r14            # imm = 0x3D4
jne 0x1f4e
movq %rbx, %rdi
leaq 0x7b40(%rsp), %r14
movq %r14, %rsi
callq 0x2e6f
cmpl $0x1b, %eax
je 0x2665
movl %eax, %r12d
cmpl $0x51, %eax
je 0x2665
cmpl $0x71, %r12d
jne 0x1f34
jmp 0x2665
xorl %edi, %edi
callq 0x2b6b
movl %eax, %r12d
xorb $0x1, %r12b
jne 0x266f
movq $0x0, 0xa83a(%rip) # 0xc880
jmp 0x266f
movl %r12d, 0x1c(%rsp)
movq %r15, %rdi
movl $0x32, %esi
movl $0x16, %edx
callq 0x341b
movq %r15, %rdi
callq 0x33a4
xorl %r12d, %r12d
movl $0x0, 0xc(%rsp)
xorl %r13d, %r13d
movq %r15, %rdi
movl $0x10007, %esi          # imm = 0x10007
movl $0x20, %edx
callq 0x345c
movq %r15, %rdi
movl $0x7, %esi
callq 0x418c
movq %r15, %rdi
movl $0x1, %esi
movl $0x1, %edx
leaq 0x540e(%rip), %rcx      # 0x74b9
xorl %eax, %eax
callq 0x36ec
cmpl $0x3c, %r12d
jg 0x20dd
cmpl $0x2c, %r12d
movq 0x40(%rsp), %r15
jg 0x211d
cmpl $0xd, %r12d
movl 0xc(%rsp), %r14d
je 0x21e4
cmpl $0x2b, %r12d
je 0x2150
jmp 0x2412
cmpl $0x140, %r12d           # imm = 0x140
movq 0x40(%rsp), %r15
jg 0x21b5
cmpl $0x3d, %r12d
movl 0xc(%rsp), %r14d
je 0x2150
cmpl $0x3e, %r12d
jne 0x2412
cmpl $0x5, %r13d
jg 0x2412
movl %r13d, %eax
incl %eax
leal (%rax,%rax,8), %ecx
leal 0x1(%r13,%rcx,2), %r14d
jmp 0x2148
cmpl $0x2d, %r12d
movl 0xc(%rsp), %r14d
je 0x2150
cmpl $0x3c, %r12d
jne 0x2412
testl %r13d, %r13d
jle 0x2412
movl %r13d, %eax
decl %eax
leal (%rax,%rax,8), %ecx
leal -0x1(%r13,%rcx,2), %r14d
movl %eax, %r13d
jmp 0x2412
movslq %r14d, %rax
imulq $0x34, %rax, %rax
cmpb $0x1, (%r15,%rax)
jne 0x2412
addq %r15, %rax
movl 0x30(%rax), %ecx
xorl %edx, %edx
cmpl $0x2d, %r12d
setne %dl
leal (%rcx,%rdx,2), %esi
cmpl $0x10, %esi
ja 0x2412
testl %ecx, %ecx
js 0x2191
movq %rcx, %rsi
shlq $0x4, %rsi
movq 0x38(%rsp), %rdi
decl 0xc(%rdi,%rsi)
leal (%rcx,%rdx,2), %ecx
decl %ecx
movl %ecx, 0x30(%rax)
testl %ecx, %ecx
js 0x2412
movl %ecx, %eax
shlq $0x4, %rax
movq 0x38(%rsp), %rcx
incl 0xc(%rcx,%rax)
jmp 0x2412
cmpl $0x142, %r12d           # imm = 0x142
movl 0xc(%rsp), %r14d
je 0x23fd
cmpl $0x141, %r12d           # imm = 0x141
jne 0x2412
xorl %eax, %eax
testl %r14d, %r14d
setg %al
subl %eax, %r14d
jmp 0x2412
movslq %r14d, %rax
imulq $0x34, %rax, %rax
cmpb $0x0, (%r15,%rax)
jne 0x2412
cmpl 0x3c8(%rbx), %r14d
jge 0x2412
movq %r13, 0x48(%rsp)
addq %r15, %rax
movq %rax, 0x20(%rsp)
leaq 0x300(%rsp), %r14
movq %r14, %rdi
movl $0x2e, %esi
movl $0xe, %edx
callq 0x341b
movq %r14, %rdi
callq 0x33a4
movq %r14, %rdi
movl $0x10007, %esi          # imm = 0x10007
movl $0x20, %edx
callq 0x345c
movq %r14, %rdi
movl $0x10003, %esi          # imm = 0x10003
callq 0x418c
movq %r14, %rdi
movl $0x10, %esi
movl $0x1, %edx
leaq 0x52b4(%rip), %rcx      # 0x7519
xorl %eax, %eax
callq 0x36ec
movq %r14, %rdi
movl $0x1, %esi
movl $0x2, %edx
leaq 0x52ab(%rip), %rcx      # 0x752b
xorl %eax, %eax
callq 0x36ec
movl $0x41, %r12d
xorl %r14d, %r14d
leaq 0x52c4(%rip), %rbp      # 0x755b
leaq 0x9c(%rsp), %rdi
callq 0x4d10
movl 0xcc(%rsp), %eax
movl %eax, 0x120(%rsp,%r14)
movupd 0x9c(%rsp), %xmm0
movupd 0xac(%rsp), %xmm1
movups 0xbc(%rsp), %xmm2
movups %xmm2, 0x110(%rsp,%r14)
movupd %xmm1, 0x100(%rsp,%r14)
movupd %xmm0, 0xf0(%rsp,%r14)
movapd %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movapd %xmm0, 0x60(%rsp)
movl %eax, 0x90(%rsp)
leal -0x3e(%r12), %edx
movl 0x78(%rsp), %eax
movq %rax, 0x10(%rsp)
movl 0x80(%rsp), %r11d
movl 0x84(%rsp), %r15d
movl 0x88(%rsp), %r13d
movl 0x8c(%rsp), %r10d
subq $0x8, %rsp
leaq 0x308(%rsp), %rdi
movl $0x1, %esi
movq %rbp, %rcx
movl %r12d, %r8d
leaq 0x69(%rsp), %r9
xorl %eax, %eax
pushq %r10
pushq %r13
pushq %r15
pushq %r11
pushq 0x38(%rsp)
callq 0x36ec
addq $0x30, %rsp
addq $0x34, %r14
incl %r12d
cmpq $0x208, %r14            # imm = 0x208
jne 0x2297
leaq 0x7b40(%rsp), %r14
leaq 0x4c7b(%rip), %rbp      # 0x7004
movq 0x48(%rsp), %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e6f
cmpl $0x1b, %eax
je 0x23ec
cmpl $0x51, %eax
je 0x23ec
cmpl $0x71, %eax
je 0x23ec
addl $-0x61, %eax
cmpl $0x9, %eax
ja 0x238e
movl %eax, %eax
imulq $0x34, %rax, %rax
movl 0x120(%rsp,%rax), %ecx
movq 0x20(%rsp), %rdx
movl %ecx, 0x30(%rdx)
movupd 0xf0(%rsp,%rax), %xmm0
movupd 0x100(%rsp,%rax), %xmm1
movups 0x110(%rsp,%rax), %xmm2
movups %xmm2, 0x20(%rdx)
movupd %xmm1, 0x10(%rdx)
movupd %xmm0, (%rdx)
callq 0x33db
movq 0x40(%rsp), %r15
movl 0xc(%rsp), %r14d
jmp 0x2412
leal (%r13,%r13,8), %eax
leal 0x12(%r13,%rax,2), %eax
xorl %ecx, %ecx
cmpl %eax, %r14d
setl %cl
addl %ecx, %r14d
leal 0x1(%r13), %r8d
leaq 0x3f20(%rsp), %rdi
movl $0x1, %esi
movl $0x15, %edx
leaq 0x50be(%rip), %rcx      # 0x74ed
xorl %eax, %eax
callq 0x36ec
leal (%r13,%r13,8), %eax
movq %r13, 0x48(%rsp)
leal (%r13,%rax,2), %eax
movslq %eax, %rcx
movl %r14d, 0xc(%rsp)
movslq %r14d, %rax
cmpl $0x82, %ecx
movl $0x81, %edx
cmovgel %ecx, %edx
subl %ecx, %edx
movq %rdx, 0x10(%rsp)
movq %rcx, %rdx
subq %rax, %rdx
movq %rdx, 0x20(%rsp)
movq %rcx, 0x30(%rsp)
imulq $0x34, %rcx, %r14
addq %r15, %r14
xorl %r13d, %r13d
cmpq %r13, 0x10(%rsp)
je 0x25a0
movq 0x20(%rsp), %rax
movups 0x5189(%rip), %xmm0     # 0x761f
movups %xmm0, 0x31f(%rsp)
movaps 0x516b(%rip), %xmm0     # 0x7610
movaps %xmm0, 0x310(%rsp)
movapd 0x514b(%rip), %xmm0     # 0x7600
movapd %xmm0, 0x300(%rsp)
addq %r13, %rax
jne 0x24db
movb $0x72, 0x301(%rsp)
movb $0x2d, 0x30d(%rsp)
movb $0x2b, 0x319(%rsp)
cmpb $0x0, (%r14)
jne 0x252c
movq 0x30(%rsp), %rcx
leaq (%rcx,%r13), %rdx
movb $0x4b, 0x300(%rsp)
movb $0x0, 0x309(%rsp)
movslq 0x3c8(%rbx), %rsi
leaq 0x1(%r14), %rcx
cmpq %rsi, %rdx
jge 0x2529
movupd 0x4ff3(%rip), %xmm0     # 0x7505
movupd %xmm0, (%rcx)
movl $0x296572, 0x10(%rcx)   # imm = 0x296572
testq %rax, %rax
jne 0x252c
movb $0x72, 0x3(%r14)
jmp 0x252c
movb $0x0, (%rcx)
leaq 0x1(%r14), %r8
movl 0x30(%r14), %eax
leal 0x41(%rax), %r9d
testl %eax, %eax
movl $0x20, %eax
cmovsl %eax, %r9d
movl 0x18(%r14), %r10d
movl 0x20(%r14), %r11d
movl 0x24(%r14), %ebp
movl 0x28(%r14), %r15d
movl 0x2c(%r14), %r12d
leal 0x2(%r13), %edx
subq $0x8, %rsp
leaq 0x3f28(%rsp), %rdi
movl $0x1, %esi
leaq 0x308(%rsp), %rcx
xorl %eax, %eax
pushq %r12
pushq %r15
pushq %rbp
pushq %r11
pushq %r10
callq 0x36ec
addq $0x30, %rsp
incq %r13
addq $0x34, %r14
cmpq $0x13, %r13
leaq 0x4a6a(%rip), %rbp      # 0x7004
jne 0x247f
movq %rbx, %rdi
leaq 0x7b40(%rsp), %r14
movq %r14, %rsi
callq 0x2e6f
cmpl $0x1b, %eax
leaq 0x3f20(%rsp), %r15
movq 0x48(%rsp), %r13
je 0x2665
movl %eax, %r12d
cmpl $0x71, %eax
je 0x2665
cmpl $0x51, %r12d
jne 0x2078
jmp 0x2665
callq 0x33ba
movq %r13, %rdi
leaq 0x4eb4(%rip), %rsi      # 0x74a7
callq 0x3009
xorl %eax, %eax
addl $-0x61, %eax
movl %eax, %r14d
cmpl $0x10, %eax
jb 0x263f
movq %rbx, %rdi
leaq 0xb758(%rsp), %rsi
movl $0x1, %edx
callq 0x5cd9
movq %rbx, %rdi
leaq 0x7b40(%rsp), %rsi
callq 0x2e6f
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x1b, %eax
je 0x263f
cmpl $0x71, %eax
je 0x263f
cmpl $0x51, %eax
jne 0x25fa
callq 0x33db
movl %r12d, %eax
shlq $0x4, %rax
movq 0x38(%rsp), %rcx
movl %r14d, 0x8(%rcx,%rax)
movq %r15, %rdi
callq 0x33a4
leaq 0x7b40(%rsp), %r14
callq 0x33db
movl 0x1c(%rsp), %r12d
testb $0x1, %r12b
jne 0x155c
jmp 0x2859
movl %r12d, 0xc(%rsp)
movl $0x1e, 0xf0(%rsp)
movl $0xc, 0x60(%rsp)
movl $0x1e, 0x10(%rsp)
movl $0xc, 0x20(%rsp)
movl 0x1c(%rsp), %r12d
movq %r13, %rdi
leaq 0x4d70(%rip), %rsi      # 0x7425
callq 0x3009
movq %r13, %rdi
movl $0x6, %esi
movl $0xc, %edx
leaq 0x4d6b(%rip), %rcx      # 0x7439
xorl %eax, %eax
callq 0x36ec
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x3c, %ecx
movl $0x18, %r8d
callq 0x3122
movq %r14, %rdi
movl 0x10(%rsp), %esi
movl 0x20(%rsp), %edx
callq 0x4168
movzwl %ax, %r8d
movq %r15, %rdi
movl 0x10(%rsp), %esi
movl 0x20(%rsp), %edx
movl $0x10107, %ecx          # imm = 0x10107
callq 0x31b0
movq %r15, %rdi
callq 0x33a4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e6f
cmpl $0x1b, %eax
je 0x284a
cmpl $0x51, %eax
je 0x284a
cmpl $0x71, %eax
je 0x284a
movq %r15, %rdi
movl 0x10(%rsp), %esi
movl 0x20(%rsp), %edx
movq %rax, 0x30(%rsp)
callq 0x3ba1
movq 0x30(%rsp), %rax
leal -0x131(%rax), %ecx
cmpl $0x13, %ecx
ja 0x2785
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq 0x48b4(%rip), %rdx      # 0x7028
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl 0x10(%rsp), %ecx
decl %ecx
jmp 0x27c0
movl 0x10(%rsp), %eax
movl 0x20(%rsp), %ecx
jmp 0x27d9
movl 0x10(%rsp), %eax
incl %eax
jmp 0x27ac
movl $0x1, %eax
leaq 0xf0(%rsp), %rcx
jmp 0x27cc
movl 0x10(%rsp), %eax
decl %eax
movl %eax, 0xf0(%rsp)
movl $0x1, %eax
jmp 0x27c7
movl 0x10(%rsp), %ecx
incl %ecx
movl %ecx, 0xf0(%rsp)
leaq 0x60(%rsp), %rcx
addl %eax, (%rcx)
movl 0xf0(%rsp), %eax
movl 0x60(%rsp), %ecx
movq %r14, %rdi
movl %eax, %esi
movl %eax, 0x10(%rsp)
movl %ecx, %edx
movl %ecx, 0x20(%rsp)
callq 0x4168
movzwl %ax, %r8d
movq %r15, %rdi
movl 0x10(%rsp), %esi
movl 0x20(%rsp), %edx
movl $0x10107, %ecx          # imm = 0x10107
callq 0x31b0
cmpl $0xd, 0x30(%rsp)
jne 0x271d
callq 0x33db
callq 0x33db
movq %rbx, %rdi
movl 0xc(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0x20(%rsp), %ecx
callq 0x4f71
testb %al, %al
jne 0x266f
leaq 0x49fa(%rip), %rsi      # 0x7238
xorl %eax, %eax
callq 0x2ec1
jmp 0x26ab
callq 0x33db
callq 0x33db
jmp 0x266f
callq 0x2916
movq $0x0, 0xa017(%rip) # 0xc880
movq %rbx, %rdi
callq 0x4f5b
callq 0x33ba
callq 0x33ba
callq 0x33ba
callq 0x33ba
leaq 0xb758(%rsp), %rdi
callq 0x3379
leaq 0x12f88(%rsp), %rdi
callq 0x3379
leaq 0x7b40(%rsp), %rdi
callq 0x3379
leaq 0xf370(%rsp), %rdi
callq 0x3379
callq 0x330d
xorl %eax, %eax
addq $0x1a7b8, %rsp          # imm = 0x1A7B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x330d
movl 0x54(%rsp), %ecx
movl 0x2c(%rsp), %r8d
leaq 0x4791(%rip), %rdi      # 0x7078
movl $0x50, %esi
movl $0x18, %edx
xorl %eax, %eax
callq 0x10c0
movq 0x76e1(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
callq 0x11d0
callq 0x1170
movl $0x1, %edi
callq 0x1240