LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_wifi_device.c
// Function: qq_wifi_device_init_connection_handler
static void
qq_wifi_device_init_connection_handler(qq_connection_t *c)
{
    qq_event_t   *rev, *wev;

    qq_log_debug("qq_wifi_device_init_connection_handler()");

    rev = c->read;
    rev->handler = qq_wifi_device_pretreatment_process_handler;

    wev = c->write;
    wev->handler = qq_wifi_device_write_event_handler;

    qq_event_add_timer(rev, QQ_WIFI_DEVICE_CONNECTION_TIMEOUT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2309(%rip), %rdi      # 0xb25c
xorl %eax, %eax
callq 0x6daa
movq 0x8(%rbx), %r14
leaq 0x119(%rip), %rax       # 0x907e
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rax
leaq 0x290(%rip), %rcx       # 0x9204
movq %rcx, 0x10(%rax)
leaq 0x6741(%rip), %rax      # 0xf6c0
movl $0xbb8, %ebx            # imm = 0xBB8
addq (%rax), %rbx
testb $0x8, 0x9(%r14)
je 0x8fbd
movq %rbx, %rax
subq 0x20(%r14), %rax
movq %rax, %rcx
negq %rcx
cmovsq %rax, %rcx
cmpq $0x12c, %rcx            # imm = 0x12C
jb 0x8fd6
leaq 0x20(%r14), %rsi
leaq 0x635d(%rip), %rdi      # 0xf310
callq 0x8313
andb $-0x9, 0x9(%r14)
leaq 0x20(%r14), %rsi
movq %rbx, 0x20(%r14)
leaq 0x6344(%rip), %rdi      # 0xf310
callq 0x8098
orb $0x8, 0x9(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_wifi_device.c
// Function: qq_wifi_device_rbtree_insert_value
static void
qq_wifi_device_rbtree_insert_value(qq_rbtree_node_t *temp,
    qq_rbtree_node_t *node, qq_rbtree_node_t *sentinel)
{
    qq_wifi_device_rbtree_node_t   *n, *t;
    qq_rbtree_node_t               **p;

    for ( ;; ) {
        n = (qq_wifi_device_rbtree_node_t *) node;
        t = (qq_wifi_device_rbtree_node_t *) temp;

        if (node->key != temp->key) {
            p = (node->key < temp->key) ? &temp->left : &temp->right;
        } else {
            p = (memcmp(n->id, t->id, 16) < 0)
                 ? &temp->left : &temp->right;
        }

        if (*p == sentinel) {
            break;
        }

        temp = *p;
    }

    *p = node;
    node->parent = temp;
    node->left = sentinel;
    node->right = sentinel;
    qq_rbt_red(node);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rax
movq %rdi, %rcx
cmpq (%rdi), %rax
jne 0x9029
movq 0x28(%rsi), %rdi
bswapq %rdi
movq 0x28(%rcx), %r9
bswapq %r9
cmpq %r9, %rdi
jne 0x9013
movq 0x30(%rsi), %rdi
movq 0x30(%rcx), %r9
bswapq %rdi
bswapq %r9
xorl %r8d, %r8d
cmpq %r9, %rdi
je 0x9023
cmpq %r9, %rdi
movl $0x0, %r8d
sbbl %r8d, %r8d
orl $0x1, %r8d
shrl $0x1f, %r8d
jmp 0x902d
setb %r8b
xorb $0x1, %r8b
movzbl %r8b, %r8d
movq 0x8(%rcx,%r8,8), %rdi
cmpq %rdx, %rdi
jne 0x8fe2
leaq 0x8(,%r8,8), %rax
movq %rsi, (%rcx,%rax)
movq %rcx, 0x18(%rsi)
movq %rdx, 0x8(%rsi)
movq %rdx, 0x10(%rsi)
movb $0x1, 0x20(%rsi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/event/qq_event_timer.h
// Function: qq_event_add_timer
static inline void
qq_event_add_timer(qq_event_t *ev, qq_msec_t timer)
{
    qq_msec_t      key;
    qq_msec_int_t  diff;

    key = qq_current_msec + timer;

    if (ev->timer_set) {
        diff = (qq_msec_int_t) (key - ev->timer.key);
        if (qq_abs(diff) < QQ_TIMER_LAZY_DELAY) {
            return;
        }

        qq_event_del_timer(ev);
    }

    ev->timer.key = key;
    qq_rbtree_insert(&qq_event_timer_rbtree, &ev->timer);
    ev->timer_set = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x64a2(%rip), %rax      # 0xf6c0
addq (%rax), %r14
testb $0x8, 0x9(%rdi)
je 0x9255
movq %r14, %rax
subq 0x20(%rbx), %rax
movq %rax, %rcx
negq %rcx
cmovsq %rax, %rcx
cmpq $0x12c, %rcx            # imm = 0x12C
jb 0x926d
leaq 0x20(%rbx), %rsi
leaq 0x60c4(%rip), %rdi      # 0xf310
callq 0x8313
andb $-0x9, 0x9(%rbx)
leaq 0x20(%rbx), %rsi
movq %r14, 0x20(%rbx)
leaq 0x60ac(%rip), %rdi      # 0xf310
callq 0x8098
orb $0x8, 0x9(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_wifi_device.c
// Function: qq_wifi_device_close
static void
qq_wifi_device_close(qq_connection_t *c, qq_int_t reason)
{
    switch (reason) {
        case QQ_WIFI_DEVICE_PKG_FAILED:
            c->send(c, QQ_JSON_PKG_PKG_FAILED_STR, QQ_JSON_PKG_PKG_FAILED_STR_SIZE);
            return;
        case QQ_WIFI_DEVICE_MD5_FAILED:
            c->send(c, QQ_JSON_PKG_MD5_FAILED_STR, QQ_JSON_PKG_MD5_FAILED_STR_SIZE);
            break;
        case QQ_WIFI_DEVICE_NOTHINGNESS:
            c->send(c, QQ_JSON_PKG_DEVICE_NOTHINGNESS_STR, QQ_JSON_PKG_DEVICE_NOTHINGNESS_STR_SIZE);
            break;
        case QQ_WIFI_DEVICE_NO_APP:
            c->send(c, QQ_JSON_PKG_NO_APP, QQ_JSON_PKG_NO_APP_SIZE);
            break;
        case QQ_WIFI_DEVICE_APP_OVERRANGING:
            c->send(c, QQ_JSON_PKG_APP_OVERRANGING, QQ_JSON_PKG_APP_OVERRANGING_SIZE);
            break;
        case QQ_WIFI_DEVICE_MAIN_APP_ERROR:
            c->send(c, QQ_JSON_PKG_MAIN_APP_ERROR, QQ_JSON_PKG_MAIN_APP_ERROR_SIZE);
            break;
        case QQ_WIFI_DEVICE_CONFLICT:
            c->send(c, QQ_JSON_PKG_DEVICE_CONFLICT_STR, QQ_JSON_PKG_DEVICE_CONFLICT_STR_SIZE);
            break;
        case QQ_WIFI_DEVICE_INSUFFICIENT_MEMORY:
            c->send(c, QQ_JSON_PKG_INSUFFICIENT_MEMORY, QQ_JSON_PKG_INSUFFICIENT_MEMORY_SIZE);
            break;
        case QQ_WIFI_DEVICE_CONNECTION_CLOSE:
            break;
        case QQ_WIFI_DEVICE_CONNECTION_ERROR:
            break;
        case QQ_WIFI_DEVICE_DISCONNECTION:
            break; 
    }

    qq_app_close_connection(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
decq %rsi
cmpq $0x7, %rsi
ja 0x969d
leaq 0x1bc0(%rip), %rax      # 0xb1d8
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x30(%rbx), %rax
leaq 0x1d52(%rip), %rsi      # 0xb37e
movl $0x24, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
leaq 0x1dc3(%rip), %rsi      # 0xb406
jmp 0x9692
leaq 0x1d76(%rip), %rsi      # 0xb3c2
movl $0x28, %edx
jmp 0x9697
leaq 0x1d90(%rip), %rsi      # 0xb3ea
movl $0x1c, %edx
jmp 0x9697
leaq 0x1e0c(%rip), %rsi      # 0xb474
movl $0x29, %edx
jmp 0x9697
leaq 0x1d2c(%rip), %rsi      # 0xb3a2
movl $0x20, %edx
jmp 0x9697
leaq 0x1da7(%rip), %rsi      # 0xb42b
movl $0x24, %edx
jmp 0x9697
leaq 0x1dbd(%rip), %rsi      # 0xb44f
movl $0x25, %edx
movq %rbx, %rdi
callq *0x30(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x26a2
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_wifi_device.c
// Function: qq_wifi_device_md5_confirm
static qq_int_t
qq_wifi_device_md5_confirm(char *id, u_char *pwd)
{
    MD5_CTX   md5;
    u_char    md5_pwd[16];

    memcpy(&qq_wifi_device_md5_str[qq_wifi_device_md5_id_str_pos], id, 32);

    MD5Init(&md5);
    MD5Update(&md5, qq_wifi_device_md5_str, strlen((char *)qq_wifi_device_md5_str));
    MD5Final(&md5, md5_pwd);

    if (memcmp(pwd, md5_pwd, 16) == 0) {
        return QQ_OK;
    }

    return QQ_WIFI_DEVICE_MD5_FAILED;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
cmpb $0x0, 0x606e(%rip)      # 0xf730
leaq 0x608c(%rip), %rax      # 0xf755
leaq 0x6070(%rip), %r14      # 0xf740
cmoveq %r14, %rax
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm0, (%rax)
movups %xmm1, 0x10(%rax)
leaq -0x88(%rbp), %r15
movq %r15, %rdi
callq 0x70c0
movq %r14, %rdi
callq 0x20d0
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x70de
leaq -0x30(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x79f7
movdqu (%rbx), %xmm0
pcmpeqb (%r14), %xmm0
pmovmskb %xmm0, %ecx
xorl %eax, %eax
cmpl $0xffff, %ecx           # imm = 0xFFFF
setne %al
addl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_wifi_device.c
// Function: qq_wifi_device_conflict_confirm
static qq_int_t
qq_wifi_device_conflict_confirm(u_char *id, u_char *mac)
{
    qq_wifi_device_rbtree_node_t  *node;
    qq_wifi_device_t              *wd;

    node = qq_wifi_device_rbtree_lookup(&qq_wifi_device_rbtree, id);

    if (node == NULL) {
        return QQ_OK;
    }
    else {
        wd = (qq_wifi_device_t *) ((char *) node - offsetof(qq_wifi_device_t, rbtree));
        if (memcmp(wd->mac, mac, 6) == 0) {
            return QQ_OK;
        }
    }

    return QQ_WIFI_DEVICE_CONFLICT;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x5fdb(%rip), %rcx      # 0xf720
movq 0x5fcc(%rip), %rax      # 0xf718
cmpq %rcx, %rax
je 0x97c0
movl (%rdi), %edx
cmpq %rdx, (%rax)
jne 0x979f
movq (%rdi), %r8
bswapq %r8
movq 0x28(%rax), %r9
bswapq %r9
cmpq %r9, %r8
jne 0x9780
movq 0x8(%rdi), %r8
movq 0x30(%rax), %r9
bswapq %r8
bswapq %r9
xorl %r10d, %r10d
cmpq %r9, %r8
je 0x9790
cmpq %r9, %r8
movl $0x0, %r10d
sbbl %r10d, %r10d
orl $0x1, %r10d
testl %r10d, %r10d
js 0x97b1
movl $0x10, %r8d
jne 0x97b7
jmp 0x97c2
setbe %r8b
movzbl %r8b, %r8d
leaq 0x8(,%r8,8), %r8
jmp 0x97b7
movl $0x8, %r8d
movq (%rax,%r8), %rax
cmpq %rcx, %rax
jne 0x9753
xorl %eax, %eax
testq %rax, %rax
je 0x97e6
movl 0x38(%rax), %ecx
xorl (%rsi), %ecx
movzwl 0x3c(%rax), %eax
xorw 0x4(%rsi), %ax
movzwl %ax, %eax
xorl %edx, %edx
orl %ecx, %eax
movl $0x7, %eax
cmoveq %rdx, %rax
jmp 0x97e8
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_wifi_device.c
// Function: qq_wifi_device_mysql_confirm
static qq_int_t
qq_wifi_device_mysql_confirm(qq_connection_t *c, u_char *id)
{
    MYSQL_RES              *res;
    MYSQL_ROW               row;
    qq_uint_t               n, i;
    qq_wifi_device_t       *wd;
    qq_int_t                reason, main_app, app_type;

    reason = QQ_OK;
    main_app = 0;

    res = qq_mysql_wifi_device_select(id);
    if (res == NULL) {
        return QQ_WIFI_DEVICE_NOTHINGNESS;
    }

    n = mysql_num_rows(res);
    if (n == 0) {
        reason = QQ_WIFI_DEVICE_NO_APP;
    }
    else if (n > QQ_WIFI_DEVICE_MAX_APP_NUMBER) {
        reason = QQ_WIFI_DEVICE_APP_OVERRANGING;
    }

    if (reason == QQ_OK) {
        wd = c->data;
        wd->napp = n;

        i = 0;
        while ((row = mysql_fetch_row(res)) != NULL) {
            wd->app[i].app_type = (int) *row[1];
            app_type = wd->app[i].app_type & ~QQ_MAIN_APP_FLAGS;
            main_app += (wd->app[i].app_type & QQ_MAIN_APP_FLAGS) ? 1 : 0;

            if (app_type == QQ_APP_TYPE_ANDROID) {
                wd->app[i].app = (void *) qq_android_app_node((char *) row[0]);
            }
            else if (app_type == QQ_APP_TYPE_IOS) {
                wd->app[i].app = (void *) qq_ios_app_node((char *) row[0]);
            }
        }
    }

    if (main_app != 1) {
        reason = QQ_WIFI_DEVICE_MAIN_APP_ERROR;
    }

    mysql_free_result(res);

    return reason;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq %rsi, %rdi
callq 0x7b90
testq %rax, %rax
je 0x98bd
movq %rax, %rbx
movq %rax, %rdi
callq 0x21d0
xorl %ecx, %ecx
cmpq $0xb, %rax
setae %cl
movq %rax, %rdx
subq $0x1, %rdx
leaq (%rcx,%rcx,4), %rcx
movl $0x4, %r12d
cmovaeq %rcx, %r12
movl $0x6, %r14d
cmpq $0x9, %rdx
ja 0x98b3
movq (%r15), %r15
movq %rax, 0x110(%r15)
movq %rbx, %rdi
callq 0x2200
testq %rax, %rax
je 0x98b3
xorl %r14d, %r14d
movq 0x8(%rax), %rcx
movzbl (%rcx), %r13d
movsbl %r13b, %ecx
movl %ecx, 0x78(%r15)
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl $0x2, %ecx
je 0x9885
cmpl $0x1, %ecx
jne 0x9891
movq (%rax), %rdi
callq 0x2579
jmp 0x988d
movq (%rax), %rdi
callq 0x3cca
movq %rax, 0x70(%r15)
shrl $0x7, %r13d
addq %r13, %r14
movq %rbx, %rdi
callq 0x2200
testq %rax, %rax
jne 0x985b
cmpq $0x1, %r14
movl $0x6, %r14d
cmoveq %r12, %r14
movq %rbx, %rdi
callq 0x21f0
jmp 0x98c3
movl $0x3, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/KhuramAli[P]JAM-Benchmark/Summation_lock_synchronzied_cppThread/code11.cpp
// Function: sumUp(unsigned long long&, std::vector<int, std::allocator<int>> const&, unsigned long long, unsigned long long)
void sumUp(unsigned long long& sum, const std::vector<int>& val, unsigned long long beg, unsigned long long end) {
	for (auto it = beg; it < end; ++it) {
		myMutex.lock();
		sum += val[it];
		myMutex.unlock();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpq %rcx, %rdx
jae 0x2324
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x2dfb(%rip), %r13      # 0x50f8
movq %r13, %rdi
callq 0x2140
testl %eax, %eax
jne 0x232e
movq (%r15), %rax
movslq (%rax,%r14,4), %rax
addq %rax, (%r12)
movq %r13, %rdi
callq 0x20c0
incq %r14
cmpq %r14, %rbx
jne 0x22fd
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x2090
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/b5compat.c
// Function: permanentwritespritetile
void permanentwritespritetile(int thex, int they, short tilenum, signed char shade,
        int cx1, int cy1, int cx2, int cy2, unsigned char dapalnum) {
    int x, y, xsiz, ysiz, tx1, ty1, tx2, ty2;
    
    (void)thex; (void)they;
    xsiz = tilesizx[tilenum]; tx1 = cx1/xsiz; tx2 = cx2/xsiz;
    ysiz = tilesizy[tilenum]; ty1 = cy1/ysiz; ty2 = cy2/ysiz;
    
    for (x=tx1;x<=tx2;x++) {
        for (y=ty1;y<=ty2;y++) {
            rotatesprite(x*xsiz<<16,y*ysiz<<16,65536L,0,tilenum,shade,
                         dapalnum,8+16+64+128,cx1,cy1,cx2,cy2);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %r10d
movl %r8d, %r11d
movl %edx, %esi
movl 0x70(%rsp), %r14d
movslq %edx, %rdi
leaq 0x5b3f1c(%rip), %rax    # 0x5bde80
movswl (%rax,%rdi,2), %r8d
movl %r11d, %eax
cltd
idivl %r8d
movl %eax, %r9d
movl %r14d, %eax
cltd
movl %r8d, 0x8(%rsp)
idivl %r8d
movl %eax, %r8d
leaq 0x5a56b7(%rip), %rax    # 0x5af640
movswl (%rax,%rdi,2), %r12d
movl %r10d, %eax
cltd
idivl %r12d
movl %eax, 0xc(%rsp)
movq %r9, 0x10(%rsp)
movl %r8d, 0x24(%rsp)
cmpl %r8d, %r9d
jg 0xa08e
movb 0x80(%rsp), %dil
movl 0x78(%rsp), %r15d
shll $0x10, 0x8(%rsp)
movl %r15d, %eax
cltd
idivl %r12d
movl %eax, 0x20(%rsp)
movl %eax, %edx
movl 0xc(%rsp), %eax
subl %eax, %edx
incl %edx
movl %edx, 0x1c(%rsp)
imull %r12d, %eax
shll $0x10, %r12d
shll $0x10, %eax
movl %eax, 0x18(%rsp)
movzbl %dil, %r13d
movswl %si, %edx
movsbl %cl, %esi
movl %r12d, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movl %esi, 0x28(%rsp)
movl 0x20(%rsp), %eax
cmpl %eax, 0xc(%rsp)
jg 0xa077
movl 0x8(%rsp), %eax
imull 0x10(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x18(%rsp), %ebp
movl 0x1c(%rsp), %ebx
movl 0x34(%rsp), %edi
movl %ebp, %esi
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl 0x2c(%rsp), %r8d
movl 0x28(%rsp), %r9d
pushq %r15
pushq %r14
pushq %r10
pushq %r11
pushq $0xd8
pushq %r13
movq %r14, %r12
movq %r10, %r14
movq %r13, %r15
movq %r11, %r13
callq 0x4bca3
movq %r13, %r11
movq %r15, %r13
movq %r14, %r10
movq %r12, %r14
movl 0x60(%rsp), %r12d
movl 0xa8(%rsp), %r15d
addq $0x30, %rsp
addl %r12d, %ebp
decl %ebx
jne 0xa01c
movq 0x10(%rsp), %rcx
leal 0x1(%rcx), %eax
cmpl 0x24(%rsp), %ecx
movq %rax, 0x10(%rsp)
jne 0x9ffd
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/b5compat.c
// Function: printext
void printext(int x, int y, char *buffer, short tilenum, unsigned char invisiblecol)
{
    int i;
    unsigned char ch;
    
    (void)invisiblecol;

    for(i=0;buffer[i]!=0;i++) {
        ch = (unsigned char)buffer[i];
        rotatesprite((x-((ch&15)<<3))<<16,(y-((ch>>4)<<3))<<16,65536L,0,tilenum,0,0,8+16+128,x,y,x+7,y+7);
        x += 8;
    }
}

// Assembly:
movb (%rdx), %al
testb %al, %al
je 0xa1d6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movl %edi, %r15d
leal 0x7(%r14), %r12d
incq %rbx
movl %edi, %r13d
shll $0x10, %r13d
movswl %cx, %ebp
movzbl %al, %ecx
shrb %al
andl $0xf, %ecx
shll $0x13, %ecx
movl %r13d, %edi
subl %ecx, %edi
movzbl %al, %eax
andl $0x78, %eax
movl %r14d, %esi
subl %eax, %esi
shll $0x10, %esi
leal 0x7(%r15), %eax
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %rax
pushq %r14
pushq %r15
pushq $0x98
pushq $0x0
callq 0x4bca3
addq $0x30, %rsp
movb (%rbx), %al
incq %rbx
addl $0x80000, %r13d         # imm = 0x80000
addl $0x8, %r15d
testb %al, %al
jne 0xa16e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/config.c
// Function: writesetup
int writesetup(const char *fn)
{
	BFILE *fp;
	int item;

	fp = Bfopen(fn,"wt");
	if (!fp) return -1;

#if USE_POLYMOST
	tmprenderer = getrendermode();
#endif
#ifdef RENDERTYPEWIN
	tmpmaxrefreshfreq = win_getmaxrefreshfreq();
#endif
	tmpsamplerate = option[7]>>4;
	tmpmusic = option[2];
	tmpmouse = !!(option[3]&1);
	tmpjoystick = !!(option[3]&2);

	for (item = 0; configspec[item].name; item++) {
		if (configspec[item].doc) {
			if (item > 0) fputs("\n", fp);
			fputs(configspec[item].doc, fp);
		}
		fputs(configspec[item].name, fp);
		fputs(" = ", fp);
		switch (configspec[item].type) {
			case type_bool: {
				fprintf(fp, "%d\n", (*(int*)configspec[item].store != 0));
				break;
			}
			case type_int: {
				fprintf(fp, "%d\n", *(int*)configspec[item].store);
				break;
			}
			case type_hex: {
				fprintf(fp, "%X\n", *(int*)configspec[item].store);
				break;
			}
			case type_double: {
				fprintf(fp, "%g\n", *(double*)configspec[item].store);
				break;
			}
			default: {
				fputs("?\n", fp);
				break;
			}
		}
	}

	Bfclose(fp);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x80bf2(%rip), %rsi     # 0x8b064
callq 0x91d0
testq %rax, %rax
je 0xa5be
movq %rax, %rbx
callq 0x4d98a
movl %eax, 0xc44b2(%rip)     # 0xce940
leaq 0xc44e3(%rip), %rax     # 0xce978
movzbl 0x7(%rax), %ecx
shrl $0x4, %ecx
movl %ecx, 0xc44a2(%rip)     # 0xce944
movzbl 0x2(%rax), %ecx
movl %ecx, 0xc449c(%rip)     # 0xce948
movzbl 0x3(%rax), %eax
movl %eax, %ecx
andl $0x1, %ecx
movl %ecx, 0xc4491(%rip)     # 0xce94c
shrl %eax
andl $0x1, %eax
movl %eax, 0xc448a(%rip)     # 0xce950
leaq 0x80ba9(%rip), %r13     # 0x8b076
leaq 0xc277c(%rip), %r12     # 0xccc50
leaq 0x80b39(%rip), %r15     # 0x8b014
xorl %r14d, %r14d
movq 0x18(%r14,%r12), %rbp
testq %rbp, %rbp
je 0xa507
testq %r14, %r14
je 0xa4fc
leaq 0x989bc(%rip), %rdi     # 0xa2eb0
movq %rbx, %rsi
callq 0x8470
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x8470
movq %r13, %rdi
movq %rbx, %rsi
callq 0x8470
leaq 0x80b4e(%rip), %rdi     # 0x8b067
movq %rbx, %rsi
callq 0x8470
movl 0x8(%r14,%r12), %eax
cmpq $0x3, %rax
ja 0xa58d
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x10(%r14,%r12), %rax
xorl %edx, %edx
cmpl $0x0, (%rax)
setne %dl
jmp 0xa54b
movq 0x10(%r14,%r12), %rax
movl (%rax), %edx
movq %rbx, %rdi
leaq 0x983fe(%rip), %rsi     # 0xa2953
jmp 0xa568
movq 0x10(%r14,%r12), %rax
movl (%rax), %edx
movq %rbx, %rdi
leaq 0x80b03(%rip), %rsi     # 0x8b06b
xorl %eax, %eax
callq 0x8290
jmp 0xa59c
movq 0x10(%r14,%r12), %rax
movsd (%rax), %xmm0
movq %rbx, %rdi
leaq 0x80aeb(%rip), %rsi     # 0x8b06f
movb $0x1, %al
callq 0x8290
jmp 0xa59c
leaq 0x80adf(%rip), %rdi     # 0x8b073
movq %rbx, %rsi
callq 0x8470
movq 0x20(%r14,%r12), %r13
addq $0x20, %r14
cmpq $0x5e0, %r14            # imm = 0x5E0
jne 0xa4de
movq %rbx, %rdi
callq 0x8640
xorl %eax, %eax
jmp 0xa5c3
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekchng.c
// Function: changescore
void
changescore(short snum, short deltascore)
{
     if( toggles[TOGGLE_GODMODE] != 0 ) {
          return;
     }

     score[snum] += deltascore;
     score[snum]&=0xFFFFFFFE;

     if( (score[snum] < 0) || (score[snum] > 99999999) )
          score[snum]=0;

}

// Assembly:
leaq 0xc434a(%rip), %rax     # 0xcea60
cmpl $0x0, 0x1c(%rax)
je 0xa71d
retq
movswl %si, %eax
movswq %di, %rcx
leaq 0x11ff55(%rip), %rdx    # 0x12a680
addl (%rdx,%rcx,4), %eax
movl %eax, %esi
andl $-0x2, %esi
xorl %edi, %edi
cmpl $0x5f5e100, %esi        # imm = 0x5F5E100
cmovgel %edi, %esi
testl %eax, %eax
cmovsl %edi, %esi
movl %esi, (%rdx,%rcx,4)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekchng.c
// Function: tekchangestun
void
tekchangestun(short snum,short deltastun)
{
     if( toggles[TOGGLE_GODMODE] != 0 ) {
          return;
     }

     switch (difficulty) {
     case 1:
          deltastun/=2;
          break;
     case 3:
          deltastun*=2;
          break;
     }
     stun[snum]+=deltastun;
     if (stun[snum] < 0) {
          stun[snum]=0;
     }
}

// Assembly:
leaq 0xc4312(%rip), %rax     # 0xcea60
cmpl $0x0, 0x1c(%rax)
je 0xa755
retq
leaq 0x1238a8(%rip), %rax    # 0x12e004
movl (%rax), %eax
cmpl $0x3, %eax
je 0xa777
cmpl $0x1, %eax
jne 0xa779
movzwl %si, %eax
shrl $0xf, %eax
addl %esi, %eax
movswl %ax, %esi
shrl %esi
jmp 0xa779
addl %esi, %esi
movswl %si, %eax
movswq %di, %rcx
leaq 0xd6c09(%rip), %rdx     # 0xe1390
addl (%rdx,%rcx,4), %eax
xorl %esi, %esi
testl %eax, %eax
cmovgl %eax, %esi
movl %esi, (%rdx,%rcx,4)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekchng.c
// Function: tekhealstun
void
tekhealstun(short snum)
{
     if( toggles[TOGGLE_GODMODE] != 0 ) {
          return;
     }

     if (stun[snum] < MAXSTUNPOINTS) {
          if (stuntics[snum] >= CLKIPS) {
               stuntics[snum]-=CLKIPS;
               tekchangestun(snum,1);
          }
     }
}

// Assembly:
leaq 0xc42c4(%rip), %rax     # 0xcea60
cmpl $0x0, 0x1c(%rax)
je 0xa7a3
retq
movswq %di, %rax
leaq 0xd6be2(%rip), %rcx     # 0xe1390
movl (%rcx,%rax,4), %edx
cmpl $0x3e7, %edx            # imm = 0x3E7
jg 0xa7a2
leaq 0xd6c10(%rip), %rsi     # 0xe13d0
movl (%rsi,%rax,4), %edi
cmpl $0x78, %edi
jl 0xa7a2
addl $-0x78, %edi
movl %edi, (%rsi,%rax,4)
leaq 0x12382f(%rip), %rsi    # 0x12e004
movl (%rsi), %esi
xorl %edi, %edi
cmpl $0x3, %esi
sete %dil
incl %edi
xorl %r8d, %r8d
cmpl $0x1, %esi
cmovel %r8d, %edi
addl %edx, %edi
testl %edi, %edi
cmovlel %r8d, %edi
movl %edi, (%rcx,%rax,4)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgame.c
// Function: debugout
void
debugout(short p)
{
     static int dbglines;

     if (dbgcolumn != 0) {
          fprintf(dbgfp,"\n");
     }
     fprintf(dbgfp,"%2d %6d %3d %04X %04d %06d %06d %06d %06d %d\n",
                    p,lockclock,movefifoplc,syncbits[p],ang[p],posx[p],posy[p],posz[p],
                    health[p],randomseed);
     dbglines++;
     dbgcolumn=0;
     if (dbglines > 2000) {
          dbglines=0;
          fclose(dbgfp);
          sprintf(dbgfname,"DEBUG.%03d",dbgfilen++);
          dbgfp=fopen(dbgfname,"wt");
          fprintf(dbgfp," P  CLOCK PLC BITS  ANG   X     Y     Z   HEALTH RSEED\n");
          fprintf(dbgfp,"== ====== === ==== ==== ===== ===== ===== ====== =========\n");
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0x0, 0xd6a2f(%rip)     # 0xe1478
je 0xaa5c
movq 0xd6a2e(%rip), %rsi     # 0xe1480
movl $0xa, %edi
callq 0x8cb0
movq 0xd6a1d(%rip), %rdi     # 0xe1480
movswl %bx, %edx
movl 0xd6a1c(%rip), %ecx     # 0xe1488
movl 0xd6a19(%rip), %r8d     # 0xe148c
movswq %dx, %rax
leaq 0xd6a12(%rip), %rsi     # 0xe1490
movzwl (%rsi,%rax,2), %r9d
leaq 0xd6a26(%rip), %rsi     # 0xe14b0
movswl (%rsi,%rax,2), %r10d
leaq 0xd6a3a(%rip), %rsi     # 0xe14d0
movl (%rsi,%rax,4), %r11d
leaq 0xd6a6f(%rip), %rsi     # 0xe1510
movl (%rsi,%rax,4), %ebx
leaq 0xd6aa5(%rip), %rsi     # 0xe1550
movl (%rsi,%rax,4), %r14d
leaq 0xd6ada(%rip), %rsi     # 0xe1590
movl (%rsi,%rax,4), %r15d
leaq 0x5d9927(%rip), %rax    # 0x5e43e8
movl (%rax), %r12d
leaq 0x813a9(%rip), %rsi     # 0x8be74
xorl %eax, %eax
pushq %r12
pushq %r15
pushq %r14
pushq %rbx
pushq %r11
pushq %r10
callq 0x8290
addq $0x30, %rsp
movl 0xd698d(%rip), %eax     # 0xe1474
leal 0x1(%rax), %ecx
movl %ecx, 0xd6984(%rip)     # 0xe1474
movl $0x0, 0xd697e(%rip)     # 0xe1478
cmpl $0x7d0, %eax            # imm = 0x7D0
jl 0xab99
movl $0x0, 0xd6965(%rip)     # 0xe1474
movq 0xd696a(%rip), %rdi     # 0xe1480
callq 0x8640
movl 0xd6abf(%rip), %edx     # 0xe15e0
leal 0x1(%rdx), %eax
movl %eax, 0xd6ab6(%rip)     # 0xe15e0
leaq 0xd6a9f(%rip), %rbx     # 0xe15d0
leaq 0x8136a(%rip), %rsi     # 0x8bea2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8f20
leaq 0x8051b(%rip), %rsi     # 0x8b064
movq %rbx, %rdi
callq 0x91d0
movq %rax, 0xd6928(%rip)     # 0xe1480
leaq 0x8134e(%rip), %rdi     # 0x8bead
movl $0x37, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x8ff0
movq 0xd6908(%rip), %rcx     # 0xe1480
leaq 0x81366(%rip), %rdi     # 0x8bee5
movl $0x3b, %esi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8ff0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgame.c
// Function: movethings
void
movethings()
{
     int      i;

     gotlastpacketclock = totalclock;
     for( i=connecthead; i>=0; i=connectpoint2[i] ) {
          baksyncvel[movefifoend][i] = fsyncvel[i];
          baksyncsvel[movefifoend][i] = fsyncsvel[i];
          baksyncangvel[movefifoend][i] = fsyncangvel[i];
          baksyncbits[movefifoend][i] = fsyncbits[i];
     }
     movefifoend = ((movefifoend+1)&(MOVEFIFOSIZ-1));

     // do this for Master/Slave switching
     for( i=connectpoint2[connecthead]; i>=0; i=connectpoint2[i] ) {
          if( syncbits[i]&512 ) {
               ready2send = 0;
          }
     }

     tektime();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x54d183(%rip), %rax    # 0x55a348
movl (%rax), %eax
movl %eax, 0xd428b(%rip)     # 0xe1458
leaq 0x79593c(%rip), %rax    # 0x7a2b10
movl (%rax), %esi
testl %esi, %esi
js 0xd269
movslq 0xd530f(%rip), %r14     # 0xe24f4
leaq 0xd5364(%rip), %rcx     # 0xe2550
movq %r14, %rdi
shlq $0x4, %rdi
leaq 0xd5a66(%rip), %rdx     # 0xe2c60
addq %rdi, %rdx
leaq 0xd539c(%rip), %rdi     # 0xe25a0
shlq $0x5, %r14
leaq 0xd6a51(%rip), %r8      # 0xe3c60
addq %r14, %r8
leaq 0xd53e7(%rip), %r9      # 0xe2600
leaq 0xd8a40(%rip), %r10     # 0xe5c60
addq %r14, %r10
leaq 0xd5416(%rip), %r11     # 0xe2640
leaq 0xdaa2f(%rip), %rbx     # 0xe7c60
addq %r14, %rbx
leaq 0x7958e5(%rip), %r14    # 0x7a2b20
movl %esi, %esi
movb (%rsi,%rcx), %bpl
movb %bpl, (%rsi,%rdx)
movzwl (%rdi,%rsi,2), %ebp
movw %bp, (%r8,%rsi,2)
movzwl (%r9,%rsi,2), %ebp
movw %bp, (%r10,%rsi,2)
movzwl (%r11,%rsi,2), %ebp
movw %bp, (%rbx,%rsi,2)
movl (%r14,%rsi,4), %esi
testl %esi, %esi
jns 0xd23b
movl 0xd5285(%rip), %ecx     # 0xe24f4
incl %ecx
movzbl %cl, %ecx
movl %ecx, 0xd527a(%rip)     # 0xe24f4
movslq (%rax), %rcx
leaq 0x79589c(%rip), %rax    # 0x7a2b20
movl (%rax,%rcx,4), %edx
testl %edx, %edx
js 0xd2a9
leaq 0xd41fe(%rip), %rcx     # 0xe1490
movl %edx, %edx
testb $0x2, 0x1(%rcx,%rdx,2)
je 0xd2a2
movb $0x0, 0xd41b1(%rip)     # 0xe1453
movl (%rax,%rdx,4), %edx
testl %edx, %edx
jns 0xd292
popq %rbx
popq %r14
popq %rbp
jmp 0x16eeb
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgame.c
// Function: doanimations
void
doanimations()
{
     int i, j;

     for(i=animatecnt-1;i>=0;i--)
     {
          j = *animateptr[i];

          if (j < animategoal[i])
               j = min(j+animatevel[i]*TICSPERFRAME,animategoal[i]);
          else
               j = max(j-animatevel[i]*TICSPERFRAME,animategoal[i]);
          animatevel[i] += animateacc[i];

          *animateptr[i] = j;

          if (j == animategoal[i])
          {
               animatecnt--;
               if (i != animatecnt)
               {
                    animateptr[i] = animateptr[animatecnt];
                    animategoal[i] = animategoal[animatecnt];
                    animatevel[i] = animatevel[animatecnt];
                    animateacc[i] = animateacc[animatecnt];
               }
          }
     }
}

// Assembly:
movslq 0xd2e41(%rip), %r8      # 0xe1470
testq %r8, %r8
jle 0xe6f2
incq %r8
leaq 0x11964e(%rip), %rax    # 0x127c90
leaq 0x11a647(%rip), %rcx    # 0x128c90
leaq 0x11ae40(%rip), %rdx    # 0x129490
leaq 0x11b639(%rip), %rsi    # 0x129c90
movq %r8, %rdi
movq -0x10(%rax,%r8,8), %r9
movl (%r9), %r10d
movl -0x8(%rcx,%r8,4), %r8d
movl -0x8(%rdx,%rdi,4), %r11d
leal (%r11,%r11,2), %r11d
cmpl %r8d, %r10d
jge 0xe681
addl %r10d, %r11d
cmpl %r8d, %r11d
cmovgel %r8d, %r11d
jmp 0xe68e
subl %r11d, %r10d
cmpl %r8d, %r10d
cmovlel %r8d, %r10d
movl %r10d, %r11d
movl -0x8(%rsi,%rdi,4), %r8d
addl %r8d, -0x8(%rdx,%rdi,4)
leaq -0x1(%rdi), %r8
movl %r11d, (%r9)
cmpl -0x8(%rcx,%rdi,4), %r11d
jne 0xe6e8
movl 0xd2dc3(%rip), %r9d     # 0xe1470
leal -0x1(%r9), %r10d
movl %r10d, 0xd2db8(%rip)    # 0xe1470
cmpq %r9, %r8
je 0xe6e8
movslq %r9d, %r9
movq -0x8(%rax,%r9,8), %r10
movq %r10, -0x10(%rax,%rdi,8)
movl -0x4(%rcx,%r9,4), %r10d
movl %r10d, -0x8(%rcx,%rdi,4)
movl -0x4(%rdx,%r9,4), %r10d
movl %r10d, -0x8(%rdx,%rdi,4)
movl -0x4(%rsi,%r9,4), %r9d
movl %r9d, -0x8(%rsi,%rdi,4)
cmpq $0x1, %r8
jg 0xe657
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgame.c
// Function: setanimation
int
setanimation(int *animptr, int thegoal, int thevel, int theacc)
{
     int i, j;

     if (animatecnt >= MAXANIMATES) return(-1);

     j = animatecnt;
     for(i=animatecnt-1;i>=0;i--)
          if (animptr == animateptr[i])
               { j = i; break; }

     animateptr[j] = animptr;
     animategoal[j] = thegoal;
     animatevel[j] = thevel;
     animateacc[j] = theacc;
     if (j == animatecnt) animatecnt++;
     return(j);
}

// Assembly:
movl 0xd2d4b(%rip), %r8d     # 0xe1470
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x1ff, %r8d            # imm = 0x1FF
jg 0xe78f
leaq -0x1(%r8), %r10
leaq 0x119552(%rip), %r9     # 0x127c90
movl %r8d, %eax
testl %eax, %eax
jle 0xe755
movl %r10d, %r11d
decl %eax
decq %r10
cmpq %rdi, (%r9,%r11,8)
jne 0xe741
jmp 0xe758
movl %r8d, %eax
movslq %eax, %r10
movq %rdi, (%r9,%r10,8)
leaq 0x11a52a(%rip), %rdi    # 0x128c90
movl %esi, (%rdi,%r10,4)
leaq 0x11ad1f(%rip), %rsi    # 0x129490
movl %edx, (%rsi,%r10,4)
leaq 0x11b514(%rip), %rdx    # 0x129c90
movl %ecx, (%rdx,%r10,4)
cmpl %r8d, %r10d
jne 0xe78f
incl %r8d
movl %r8d, 0xd2ce1(%rip)     # 0xe1470
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgame.c
// Function: waitforeverybody
void
waitforeverybody()
{
     int i, j, oldtotalclock;

     if (numplayers < 2) return;

     if (myconnectindex == connecthead)
     {
          for(j=1;j<=2;j++)
          {
               for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i])
                    playerreadyflag[i] = 0;
               oldtotalclock = totalclock-8;
               do
               {
                    getpackets();
                    if (totalclock >= oldtotalclock+8)
                    {
                         oldtotalclock = totalclock;
                         tempbuf[0] = 5;
                         tempbuf[1] = j;
                         for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i])
                              if (playerreadyflag[i] != j) sendpacket(i,tempbuf,2);
                    }
                    for(i=connectpoint2[connecthead];i>=0;i=connectpoint2[i])
                         if (playerreadyflag[i] != j) break;
               } while (i >= 0);
          }
     }
     else
     {
          playerreadyflag[connecthead] = 0;
          while (playerreadyflag[connecthead] != 2)
          {
               getpackets();
               if (playerreadyflag[connecthead] == 1)
               {
                    playerreadyflag[connecthead] = 0;
                    sendpacket(connecthead,tempbuf,2);
               }
          }
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x793a31(%rip), %rax    # 0x7a2b0c
cmpl $0x2, (%rax)
jl 0xf1fe
leaq 0x793a19(%rip), %rcx    # 0x7a2b04
leaq 0x793a1e(%rip), %r15    # 0x7a2b10
movslq (%r15), %rax
cmpl %eax, (%rcx)
jne 0xf1b6
movl $0x1, %ebp
leaq 0x793a17(%rip), %r12    # 0x7a2b20
leaq 0x11b390(%rip), %r13    # 0x12a4a0
movslq (%r15), %rax
movl (%r12,%rax,4), %eax
testl %eax, %eax
js 0xf124
movl %eax, %eax
movb $0x0, (%rax,%r13)
jmp 0xf113
movq %r15, %rbx
leaq 0x54b21a(%rip), %r15    # 0x55a348
movl (%r15), %r14d
addl $-0x8, %r14d
callq 0xedd1
movl (%r15), %r15d
leal 0x8(%r14), %eax
cmpl %eax, %r15d
jl 0xf188
movb $0x5, 0xd24a3(%rip)     # 0xe15f0
movb %bpl, 0xd249d(%rip)     # 0xe15f1
movslq (%rbx), %rax
movl (%r12,%rax,4), %eax
testl %eax, %eax
js 0xf185
movl %eax, %r14d
movsbl (%r14,%r13), %eax
cmpl %eax, %ebp
je 0xf17f
movl %r14d, %edi
leaq 0xd247b(%rip), %rsi     # 0xe15f0
movl $0x2, %edx
callq 0x5bcf2
movl (%r12,%r14,4), %eax
jmp 0xf15b
movl %r15d, %r14d
movq %rbx, %r15
movslq (%rbx), %rax
movslq (%r12,%rax,4), %rax
testq %rax, %rax
js 0xf1a9
movsbl (%rax,%r13), %ecx
cmpl %ecx, %ebp
je 0xf18e
leaq 0x54b1a1(%rip), %r15    # 0x55a348
jmp 0xf135
incl %ebp
cmpl $0x3, %ebp
jne 0xf110
jmp 0xf1fe
leaq 0x11b2e3(%rip), %r14    # 0x12a4a0
movb $0x0, (%rax,%r14)
movslq (%r15), %rax
cmpb $0x2, (%rax,%r14)
je 0xf1fe
leaq 0xd241d(%rip), %rbx     # 0xe15f0
callq 0xedd1
movslq (%r15), %rdi
cmpb $0x1, (%rdi,%r14)
jne 0xf1f4
movb $0x0, (%rdi,%r14)
movq %rbx, %rsi
movl $0x2, %edx
callq 0x5bcf2
movslq (%r15), %rax
cmpb $0x2, (%rax,%r14)
jne 0xf1d3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgun.c
// Function: restockammo
void
restockammo(int snum)
{
     ammo1[snum]=MAXAMMO;
     ammo2[snum]=MAXAMMO>>1;
     ammo3[snum]=20;
     ammo4[snum]=0;
     ammo5[snum]=MAXAMMO;
     ammo6[snum]=0;
     ammo7[snum]=0;
     ammo8[snum]=0;
}

// Assembly:
movslq %edi, %rax
leaq 0x11cf9c(%rip), %rcx    # 0x12c1e0
movw $0x64, %dx
movw %dx, (%rcx,%rax,2)
leaq 0x11cfad(%rip), %rcx    # 0x12c200
movw $0x32, (%rcx,%rax,2)
leaq 0x11cfc0(%rip), %rcx    # 0x12c220
movw $0x14, (%rcx,%rax,2)
leaq 0x11cfd3(%rip), %rcx    # 0x12c240
xorl %esi, %esi
movw %si, (%rcx,%rax,2)
leaq 0x11cfe6(%rip), %rcx    # 0x12c260
movw %dx, (%rcx,%rax,2)
leaq 0x11cffb(%rip), %rcx    # 0x12c280
movw %si, (%rcx,%rax,2)
leaq 0x11d010(%rip), %rcx    # 0x12c2a0
movw %si, (%rcx,%rax,2)
leaq 0x11d025(%rip), %rcx    # 0x12c2c0
movw %si, (%rcx,%rax,2)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgun.c
// Function: tekfiregun
void
tekfiregun(int gun,short p)  // this kicks off an animation sequence
{
     if( fireseq[p] != 0 ) {
          return;
     }
     if( tekgunrep(gun) || ((oflags[p]&2048) == 0) ) {
//          if( hasammo(gun,p) ) {
               fireseq[p]=1;
               oneshot[p]=0;
//          }
     }
}

// Assembly:
movslq %esi, %rax
leaq 0x11cf6b(%rip), %rcx    # 0x12c2e0
cmpl $0x0, (%rcx,%rax,4)
je 0xf37c
retq
incl %edi
movslq %edi, %rdx
leaq (%rdx,%rdx,8), %rdx
leaq 0xbf8c4(%rip), %rsi     # 0xcec50
cmpb $0x0, 0x6(%rsi,%rdx,2)
jne 0xf3a1
leaq 0xd35c6(%rip), %rdx     # 0xe2960
testb $0x8, 0x1(%rdx,%rax,2)
jne 0xf37b
movl $0x1, (%rcx,%rax,4)
leaq 0x11cf71(%rip), %rcx    # 0x12c320
movl $0x0, (%rcx,%rax,4)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgun.c
// Function: playerwoundplayer
int
validplayer(int snum)
{
     int       j;

     for( j=connecthead ; j >= 0 ; j=connectpoint2[j] ) {
          if( j == snum ) {
               return(1);
          }
     }
     return(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x79374f(%rip), %rax    # 0x7a2b10
movl (%rax), %eax
testl %eax, %eax
js 0xf3f8
leaq 0x793752(%rip), %rcx    # 0x7a2b20
movl %eax, %r8d
cmpl %edi, %r8d
je 0xf3e4
movl %r8d, %r8d
movl (%rcx,%r8,4), %r8d
testl %r8d, %r8d
jns 0xf3d1
jmp 0xf3f8
testl %eax, %eax
js 0xf3f8
movswl %si, %ebx
cmpl %ebx, %eax
je 0xf3ff
movl %eax, %eax
movl (%rcx,%rax,4), %eax
testl %eax, %eax
jns 0xf3eb
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addb $-0x2, %dl
cmpb $0x5, %dl
ja 0xf424
movzbl %dl, %ecx
addl %ecx, %ecx
leaq 0x7cfad(%rip), %rax     # 0x8c3c0
movzwl (%rcx,%rax), %eax
leaq 0x7cfae(%rip), %rdx     # 0x8c3cc
movzwl (%rcx,%rdx), %ebp
jmp 0xf42c
movw $0x5, %bp
movw $0xffe0, %ax            # imm = 0xFFE0
movswl %di, %edi
movswl %ax, %esi
callq 0xa5d8
testl %eax, %eax
setne %cl
shll %cl, %ebp
movswl %bp, %esi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa70f
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgun.c
// Function: playerpainsound
void
playerpainsound(int p)
{
     if( !validplayer(p) ) {
          crashgame("playerpainsnd: bad plr num");
     }

     if( krand_intercept(" GUN 341") < 1024 ) {
          playsound(S_PAIN1+(krand_intercept(" GUN 342")&1),posx[p],posy[p],0,ST_NOUPDATE);
     }
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x7935a0(%rip), %rax    # 0x7a2b10
movl (%rax), %eax
testl %eax, %eax
js 0xf58a
leaq 0x7935a3(%rip), %rcx    # 0x7a2b20
cmpl %ebx, %eax
je 0xf598
movl %eax, %eax
movl (%rcx,%rax,4), %eax
testl %eax, %eax
jns 0xf57d
leaq 0x7ce47(%rip), %rdi     # 0x8c3d8
xorl %eax, %eax
callq 0x2d800
leaq 0x7ce54(%rip), %rdi     # 0x8c3f3
callq 0x2be4a
cmpl $0x3ff, %eax            # imm = 0x3FF
jg 0xf5e2
leaq 0x7ce4a(%rip), %rdi     # 0x8c3fc
callq 0x2be4a
andl $0x1, %eax
leal 0x7b(%rax), %edi
movslq %ebx, %rax
leaq 0xd1f09(%rip), %rcx     # 0xe14d0
movl (%rcx,%rax,4), %esi
leaq 0xd1f3f(%rip), %rcx     # 0xe1510
movl (%rcx,%rax,4), %edx
xorl %ecx, %ecx
movl $0x4, %r8d
popq %rbx
jmp 0x1c1f1
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgun.c
// Function: tekhasweapon
int
tekhasweapon(int gun,short snum)
{
     int       hasit=0;

     if( mission == 7 ) {
          if( gun != 7 ) {
               if( snum == screenpeek ) {
                    notininventory=1;
               }
               return(0);
          }
          else {
               return(1);
          }
     }
     else {
          if( gun == 7 ) {
               if( snum == screenpeek ) {
                    showmessage("ONLY IN MATRIX");
               }
               return(0);
          }
     }

     hasit=(weapons[snum]&flags32[gun+1]);
     if( hasit )
          return(1);

     notininventory=1;
     return(0);
}

// Assembly:
pushq %rbx
leaq 0x11a948(%rip), %rax    # 0x12c510
cmpl $0x7, (%rax)
jne 0x11bf1
movl $0x1, %ebx
cmpl $0x7, %edi
je 0x11c45
leaq 0xcf880(%rip), %rax     # 0xe145e
xorl %ebx, %ebx
cmpw %si, (%rax)
jne 0x11c45
leaq 0x11c39c(%rip), %rax    # 0x12df88
movb $0x1, (%rax)
jmp 0x11c45
cmpl $0x7, %edi
jne 0x11c16
leaq 0xcf861(%rip), %rax     # 0xe145e
xorl %ebx, %ebx
cmpw %si, (%rax)
jne 0x11c45
leaq 0x7a885(%rip), %rdi     # 0x8c490
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x14b61
jmp 0x11c45
movswq %si, %rax
leaq 0x11a85f(%rip), %rcx    # 0x12c480
movslq %edi, %rdx
leaq 0xbdcc5(%rip), %rsi     # 0xcf8f0
movl 0x4(%rsi,%rdx,4), %edx
movl $0x1, %ebx
testl %edx, (%rcx,%rax,4)
jne 0x11c45
leaq 0x11c348(%rip), %rax    # 0x12df88
movb $0x1, (%rax)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgun.c
// Function: tekgunsave
void
tekgunsave(int fil)
{
     write(fil,fireseq,MAXPLAYERS*sizeof(int));
     write(fil,ammo1,MAXPLAYERS*sizeof(short));
     write(fil,ammo2,MAXPLAYERS*sizeof(short));
     write(fil,ammo3,MAXPLAYERS*sizeof(short));
     write(fil,ammo4,MAXPLAYERS*sizeof(short));
     write(fil,ammo5,MAXPLAYERS*sizeof(short));
     write(fil,ammo6,MAXPLAYERS*sizeof(short));
     write(fil,ammo7,MAXPLAYERS*sizeof(short));
     write(fil,ammo8,MAXPLAYERS*sizeof(short));
     write(fil,weapons,MAXPLAYERS*sizeof(int));
     write(fil,firedonetics,MAXPLAYERS*sizeof(int));
     write(fil,lastgun,MAXPLAYERS*sizeof(int));
     write(fil,&goreflag,sizeof(int));
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x11a68d(%rip), %rsi    # 0x12c2e0
movl $0x40, %edx
callq 0x8f10
leaq 0x11a57c(%rip), %rsi    # 0x12c1e0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a589(%rip), %rsi    # 0x12c200
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a596(%rip), %rsi    # 0x12c220
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a5a3(%rip), %rsi    # 0x12c240
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a5b0(%rip), %rsi    # 0x12c260
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a5bd(%rip), %rsi    # 0x12c280
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a5ca(%rip), %rsi    # 0x12c2a0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a5d7(%rip), %rsi    # 0x12c2c0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a784(%rip), %rsi    # 0x12c480
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a6e1(%rip), %rsi    # 0x12c3f0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a68e(%rip), %rsi    # 0x12c3b0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11a62b(%rip), %rsi    # 0x12c360
movl $0x4, %edx
movl %ebx, %edi
popq %rbx
jmp 0x8f10
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgun.c
// Function: tekgunload
void
tekgunload(int fil)
{
     read(fil,fireseq,MAXPLAYERS*sizeof(int));
     read(fil,ammo1,MAXPLAYERS*sizeof(short));
     read(fil,ammo2,MAXPLAYERS*sizeof(short));
     read(fil,ammo3,MAXPLAYERS*sizeof(short));
     read(fil,ammo4,MAXPLAYERS*sizeof(short));
     read(fil,ammo5,MAXPLAYERS*sizeof(short));
     read(fil,ammo6,MAXPLAYERS*sizeof(short));
     read(fil,ammo7,MAXPLAYERS*sizeof(short));
     read(fil,ammo8,MAXPLAYERS*sizeof(short));
     read(fil,weapons,MAXPLAYERS*sizeof(int));
     read(fil,firedonetics,MAXPLAYERS*sizeof(int));
     read(fil,lastgun,MAXPLAYERS*sizeof(int));
     read(fil,&goreflag,sizeof(int));
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x11a594(%rip), %rsi    # 0x12c2e0
movl $0x40, %edx
callq 0x8b20
leaq 0x11a483(%rip), %rsi    # 0x12c1e0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a490(%rip), %rsi    # 0x12c200
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a49d(%rip), %rsi    # 0x12c220
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a4aa(%rip), %rsi    # 0x12c240
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a4b7(%rip), %rsi    # 0x12c260
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a4c4(%rip), %rsi    # 0x12c280
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a4d1(%rip), %rsi    # 0x12c2a0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a4de(%rip), %rsi    # 0x12c2c0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a68b(%rip), %rsi    # 0x12c480
movl $0x40, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a5e8(%rip), %rsi    # 0x12c3f0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a595(%rip), %rsi    # 0x12c3b0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11a532(%rip), %rsi    # 0x12c360
movl $0x4, %edx
movl %ebx, %edi
popq %rbx
jmp 0x8b20
nop
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekmsc.c
// Function: finishpaletteshifts
void
finishpaletteshifts(void)
{
     if( palshifted == 1 ) {
          palshifted = 0;
#if USE_POLYMOST && USE_OPENGL
          if (getrendermode() >= 3)
               setpalettefade(0,0,0,0);
          else
#endif
               setbrightness(brightness,&palette[0],0);
     }

 return;
}

// Assembly:
pushq %rax
cmpb $0x1, 0x1197f3(%rip)    # 0x12dd38
jne 0x14566
movb $0x0, 0x1197ea(%rip)    # 0x12dd38
callq 0x4d98a
cmpl $0x3, %eax
jl 0x14568
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
popq %rax
jmp 0x4c470
popq %rax
retq
leaq 0xccef3(%rip), %rax     # 0xe1462
movswl (%rax), %edi
leaq 0x415e97(%rip), %rsi    # 0x42a410
xorl %edx, %edx
popq %rax
jmp 0x44ae3
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekmsc.c
// Function: initpaletteshifts
int
initpaletteshifts(void)
{
     unsigned char *workptr,*baseptr;
     int       i,j,delta;

     for( i=1; i<=NUMREDSHIFTS; i++ ) {
          workptr=&redshifts[i-1][0];
          baseptr=&palette[0];
          for( j=0; j<=255; j++) {
               delta=64-*baseptr;
               *workptr++=*baseptr++ + delta * i / REDSTEPS;
               delta=-*baseptr;
               *workptr++=*baseptr++ + delta * i / REDSTEPS;
               delta=-*baseptr;
               *workptr++=*baseptr++ + delta * i / REDSTEPS;
          }
     }

     for( i=1; i<=NUMWHITESHIFTS; i++ ) {
          workptr=&whiteshifts[i-1][0];
          baseptr=&palette[0];
          for( j=0; j<=255; j++ ) {
               delta = 64-*baseptr;
               *workptr++ = *baseptr++ + delta * i / WHITESTEPS;
               delta = 62-*baseptr;
               *workptr++ = *baseptr++ + delta * i / WHITESTEPS;
               delta = 0-*baseptr;
               *workptr++ = *baseptr++ + delta * i / WHITESTEPS;
          }
     }

     return 0;
}

// Assembly:
movl $0x1, %ecx
leaq 0x117f5a(%rip), %rdx    # 0x12c530
leaq 0x415e33(%rip), %rax    # 0x42a410
xorl %esi, %esi
movzbl (%rax,%rsi), %edi
movl $0x40, %r8d
subl %edi, %r8d
imull %ecx, %r8d
leal 0x7(%r8), %r9d
testl %r8d, %r8d
cmovnsl %r8d, %r9d
shrl $0x3, %r9d
addb %dil, %r9b
movb %r9b, (%rdx,%rsi)
movzbl 0x1(%rax,%rsi), %edi
movl %edi, %r8d
imull %ecx, %r8d
shrl $0x3, %r8d
subb %r8b, %dil
movb %dil, 0x1(%rdx,%rsi)
movzbl 0x2(%rax,%rsi), %edi
movl %edi, %r8d
imull %ecx, %r8d
shrl $0x3, %r8d
subb %r8b, %dil
movb %dil, 0x2(%rdx,%rsi)
addq $0x3, %rsi
cmpl $0x300, %esi            # imm = 0x300
jne 0x145df
incq %rcx
addq $0x300, %rdx            # imm = 0x300
cmpq $0x5, %rcx
jne 0x145dd
movl $0x1, %ecx
leaq 0x118ad2(%rip), %rdx    # 0x12d130
xorl %esi, %esi
movzbl (%rax,%rsi), %edi
movl $0x40, %r8d
subl %edi, %r8d
imull %ecx, %r8d
movslq %r8d, %r8
imulq $0x66666667, %r8, %r8   # imm = 0x66666667
movq %r8, %r9
shrq $0x3f, %r9
shrq $0x23, %r8
addl %r9d, %r8d
addb %dil, %r8b
movb %r8b, (%rdx,%rsi)
movzbl 0x1(%rax,%rsi), %edi
movl $0x3e, %r8d
subl %edi, %r8d
imull %ecx, %r8d
movslq %r8d, %r8
imulq $0x66666667, %r8, %r8   # imm = 0x66666667
movq %r8, %r9
shrq $0x3f, %r9
shrq $0x23, %r8
addl %r9d, %r8d
addb %dil, %r8b
movb %r8b, 0x1(%rdx,%rsi)
movzbl 0x2(%rax,%rsi), %edi
movl %edi, %r8d
imull %ecx, %r8d
movslq %r8d, %r8
imulq $-0x66666667, %r8, %r8  # imm = 0x99999999
movq %r8, %r9
shrq $0x3f, %r9
shrq $0x23, %r8
addl %r9d, %r8d
addb %dil, %r8b
movb %r8b, 0x2(%rdx,%rsi)
addq $0x3, %rsi
cmpl $0x300, %esi            # imm = 0x300
jne 0x14660
incq %rcx
addq $0x300, %rdx            # imm = 0x300
cmpq $0x4, %rcx
jne 0x1465e
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekmsc.c
// Function: showmessage
void
showmessage(char *fmt,...)
{
     va_list   vargs;

     memset(messagebuf,   '\0', MSGBUFSIZE);

     va_start(vargs,fmt);
     Bvsnprintf(messagebuf,sizeof(messagebuf),fmt,vargs);
     va_end(vargs);

     messagebuf[MSGBUFSIZE-1]='\0';
     messagex=(xdim>>1)-( (((int)strlen(messagebuf))>>1)*8 );
     if( messagex < 0 )
          messagex=0;
     messageon=1;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x14bc1
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x119175(%rip)   # 0x12dd40
movaps %xmm0, 0x11917e(%rip)   # 0x12dd50
movq $0x0, 0x119183(%rip) # 0x12dd60
leaq 0x11915c(%rip), %rbx    # 0x12dd40
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movq %rdi, 0x10(%rcx)
movl $0x28, %esi
movq %rbx, %rdi
movq %r10, %rdx
callq 0x8a10
movb $0x0, 0x11914c(%rip)    # 0x12dd67
leaq 0x5a122a(%rip), %rax    # 0x5b5e4c
movl (%rax), %ebp
sarl %ebp
movq %rbx, %rdi
callq 0x85a0
shll $0x2, %eax
andl $-0x8, %eax
subl %eax, %ebp
xorl %eax, %eax
testl %ebp, %ebp
cmovgl %ebp, %eax
movl %eax, 0x119125(%rip)    # 0x12dd68
movl $0x1, 0x1178bb(%rip)    # 0x12c508
addq $0xd8, %rsp
popq %rbx
popq %rbp
retq