LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/doy[P]libvt100/src/screen.c
// Function: vt100_screen_set_icon_name
void vt100_screen_set_icon_name(VT100Screen *vt, char *buf, size_t len)
{
    free(vt->icon_name);
    vt->icon_name_len = len;
    vt->icon_name = malloc(vt->icon_name_len);
    memcpy(vt->icon_name, buf, vt->icon_name_len);
    vt->update_icon_name = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%rdi), %rdi
callq 0x3050
movq %rbx, 0x30(%r15)
movq %rbx, %rdi
callq 0x34f0
movq %rax, 0x28(%r15)
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3430
orb $0x10, 0x4a(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/doy[P]libvt100/src/screen.c
// Function: vt100_screen_row_max_col
int vt100_screen_row_max_col(VT100Screen *vt, int row)
{
    struct vt100_cell *cells = vt->grid->rows[row].cells;
    int i, max = -1;

    for (i = 0; i < vt->grid->max.col; ++i) {
        if (cells[i].len) {
            max = i;
        }
    }

    if (max == -1) {
        return 0;
    }

    return max + ((max < vt->grid->max.col - 1 && cells[max].is_wide) ? 2 : 1);
}

// Assembly:
movq (%rdi), %rax
movq 0x30(%rax), %rcx
movslq %esi, %rdx
shlq $0x4, %rdx
movq (%rcx,%rdx), %rdx
movslq 0xc(%rax), %rsi
testq %rsi, %rsi
jle 0x74c0
leaq 0x8(%rdx), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %edi, %edi
cmpq $0x0, (%rax)
cmovnel %edi, %ecx
incq %rdi
addq $0x20, %rax
cmpq %rdi, %rsi
jne 0x74ab
jmp 0x74c5
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $-0x1, %ecx
je 0x74e9
decl %esi
movl $0x1, %eax
cmpl %esi, %ecx
jge 0x74e6
movslq %ecx, %rax
shlq $0x5, %rax
movzbl 0x1c(%rdx,%rax), %eax
andl $0x1, %eax
incl %eax
addl %ecx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/doy[P]libvt100/src/screen.c
// Function: vt100_screen_cleanup
void vt100_screen_cleanup(VT100Screen *vt)
{
    int i;

    vt100_screen_use_normal_buffer(vt);

    for (i = 0; i < vt->grid->row_count; ++i) {
        free(vt->grid->rows[i].cells);
    }
    free(vt->grid->rows);
    free(vt->grid);

    free(vt->title);
    free(vt->icon_name);

    vt100_parser_yylex_destroy(vt->parser_state->scanner);
    free(vt->parser_state);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x3150
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
jle 0x7739
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x30(%rax), %rax
movq (%rax,%r14), %rdi
callq 0x3050
incq %r15
movq (%rbx), %rax
movslq 0x20(%rax), %rcx
addq $0x10, %r14
cmpq %rcx, %r15
jl 0x7719
movq 0x30(%rax), %rdi
callq 0x3050
movq (%rbx), %rdi
callq 0x3050
movq 0x18(%rbx), %rdi
callq 0x3050
movq 0x28(%rbx), %rdi
callq 0x3050
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x3520
movq 0x10(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3050
// File: /workspace/github_c_makefile_star2_O1/doy[P]libvt100/src/screen.c
// Function: vt100_screen_push_string
static void vt100_screen_push_string(char **strp, size_t *lenp,
                                     size_t *capacity, char *append,
                                     size_t append_len)
{
    if (*lenp + append_len > *capacity) {
        *capacity *= 1.5;
        *strp = realloc(*strp, *capacity);
    }
    memcpy(*strp + *lenp, append, append_len);
    *lenp += append_len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %r12
movq (%rsi), %rcx
addq %r8, %rcx
movq (%rdx), %rax
cmpq %rax, %rcx
jbe 0x7802
movq %rax, %xmm0
punpckldq 0x2149(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x2151(%rip), %xmm0     # 0x9910
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x210d(%rip), %xmm1     # 0x98e0
cvttsd2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x2101(%rip), %xmm1     # 0x98e8
cvttsd2si %xmm1, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %rsi, (%rdx)
movq (%r12), %rdi
callq 0x3570
movq %rax, (%r12)
movq (%r12), %rdi
addq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3430
addq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: JS_MatchCstats
void
JS_MatchCstats(void)
{
     char      what[50];
     int       i,ans;

     sprintf(what, "1=YES,MATCH SPR CSTATS. 0 TO CANCEL. ");
     ans=getnumber16(what, 0, 2L, 0);

     if( ans != 1 ) {
          printmessage16("Cancelled...");
          return;
     }

     for( i=0; i<MAXSPRITES; i++ ) {
          if( sprite[i].cstat & 0x0001 ) {
               sprite[i].cstat|=0x0100;
          }
     }

     printmessage16("All sprite hitscans match blocking...");

 return;
}

// Assembly:
subq $0x38, %rsp
movups 0x6b2ed(%rip), %xmm0    # 0x7220b
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x6b2cf(%rip), %xmm0    # 0x721fb
movaps %xmm0, (%rdi)
movabsq $0x202e4c45434e41, %rax # imm = 0x202E4C45434E41
movq %rax, 0x1e(%rdi)
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x1b33f
cmpw $0x1, %ax
jne 0x6f85
movl $0xc, %eax
leaq 0x274d53(%rip), %rcx    # 0x27bcb0
leaq 0x6b2ca(%rip), %rdi     # 0x7222e
movzwl (%rcx,%rax), %edx
testb $0x1, %dl
je 0x6f77
orl $0x100, %edx            # imm = 0x100
movw %dx, (%rcx,%rax)
addq $0x2c, %rax
cmpq $0xb000c, %rax          # imm = 0xB000C
jne 0x6f64
jmp 0x6f8c
leaq 0x6b295(%rip), %rdi     # 0x72221
callq 0x19277
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: JS_RecordExt
void
JS_RecordExt(int sn)
{
     char      what[50];

     clearmidstatbar16();

     if( sprite[sn].extra < 0 ) {
          sprintf(what, "Sprite has no EXT to record !");
          printmessage16(what);
          return;
     }

     recordXT=sprite[sn].extra;

     JS_ShowSpriteExts(sn);

     sprintf(what, "Recording Ext %d for copying...", sn);
     printmessage16(what);

     memcpy(&recXT, &spriteXT[recordXT], sizeof(struct spriteextension));     
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edi, %ebx
callq 0x1ad03
movslq %ebx, %rax
imulq $0x2c, %rax, %rax
leaq 0x274a9c(%rip), %rcx    # 0x27bcb0
movzwl 0x2a(%rcx,%rax), %eax
testw %ax, %ax
js 0x728a
movw %ax, 0x8b4f3(%rip)      # 0x92718
movswl %bx, %edi
callq 0x72af
leaq 0x6b051(%rip), %rsi     # 0x72285
movq %rsp, %r14
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x6b00
movq %r14, %rdi
callq 0x19277
movswq 0x8b4c5(%rip), %rax     # 0x92718
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rcx,%rax,2), %rax
leaq 0x9d5ab(%rip), %rcx     # 0xa4810
movups (%rcx,%rax), %xmm0
movups 0x10(%rcx,%rax), %xmm1
movups %xmm0, 0x9d56b(%rip)    # 0xa47e0
movups %xmm1, 0x9d574(%rip)    # 0xa47f0
movzwl 0x20(%rcx,%rax), %eax
movw %ax, 0x9d578(%rip)      # 0xa4800
jmp 0x72a7
movups 0x6afe4(%rip), %xmm0    # 0x72275
movq %rsp, %rdi
movups %xmm0, 0xe(%rdi)
movups 0x6afc8(%rip), %xmm0    # 0x72267
movaps %xmm0, (%rdi)
callq 0x19277
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: JS_InitExtension
int
JS_InitExtension(short sn, short en)
{
 memset(&spriteXT[en], 0, sizeof(struct spriteextension));     
 spriteXT[en].basestat=sprite[sn].statnum;
 spriteXT[en].basepic=sprite[sn].picnum;

 return(1);
}

// Assembly:
movslq %esi, %rax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rcx,%rax,2), %rax
leaq 0x9bd8c(%rip), %rcx     # 0xa4810
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rcx,%rax)
movups %xmm0, (%rcx,%rax)
movw $0x0, 0x20(%rcx,%rax)
movslq %edi, %rdx
imulq $0x2c, %rdx, %rdx
leaq 0x27320b(%rip), %rsi    # 0x27bcb0
movzwl 0x1a(%rsi,%rdx), %edi
movw %di, 0x8(%rcx,%rax)
movzwl 0xe(%rsi,%rdx), %edx
movw %dx, 0xa(%rcx,%rax)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: JS_DeleteExt
void
JS_DeleteExt(short sn)
{
     short     x=sprite[sn].extra;

     memset(&spriteXT[x], 0, sizeof(struct spriteextension));

     if( qsetmode != 200 ) {
          printmessage16("Deleting Extension...");
     }

     // reset recordXT
     if( x == recordXT ) {
          recordXT=-1;
     }

 return;
}

// Assembly:
pushq %rbx
movslq %edi, %rax
imulq $0x2c, %rax, %rax
leaq 0x2731b3(%rip), %rcx    # 0x27bcb0
movswq 0x2a(%rcx,%rax), %rbx
movq %rbx, %rax
shlq $0x5, %rax
leaq (%rax,%rbx,2), %rax
leaq 0x9bcfb(%rip), %rcx     # 0xa4810
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rcx,%rax)
movups %xmm0, (%rcx,%rax)
movw $0x0, 0x20(%rcx,%rax)
leaq 0x1aeef9(%rip), %rax    # 0x1b7a28
cmpl $0xc8, (%rax)
je 0x8b43
leaq 0x69843(%rip), %rdi     # 0x72381
callq 0x19277
cmpw 0x89bce(%rip), %bx      # 0x92718
jne 0x8b55
movw $0xffff, 0x89bc3(%rip)  # imm = 0xFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: JS_ClearAllExts
void
JS_ClearAllExts(void)
{
     char      what[50];
     int       i,ans;

     sprintf(what, "1=YES,DELETE ALL EXTS, 0 TO CANCEL. ");
     ans=getnumber16(what, 0, 2L, 0);

     if( ans != 1 ) {
          printmessage16("Cancelled...");
          return;
     }

     sprintf(what, "REALLY DELETE EXTS ? 1=YES  0=NO ");
     ans=getnumber16(what, 0, 2L, 0);

     if( ans != 1 ) {
          printmessage16("Cancelled...");
          return;
     }

     for( i=0; i<MAXSPRITES; i++ ) {
          memset(&spriteXT[i], 0, sizeof(struct spriteextension));
     }
     for( i=0; i<MAXSPRITES; i++ ) {
          sprite[i].extra=-1;
     }

     printmessage16("All sprite EXTS cleared...");

 return;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movups 0x69844(%rip), %xmm0    # 0x723a7
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x69826(%rip), %xmm0    # 0x72397
movaps %xmm0, (%rdi)
movabsq $0x202e4c45434e41, %rax # imm = 0x202E4C45434E41
movq %rax, 0x1d(%rdi)
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x1b33f
leaq 0x6968a(%rip), %rbx     # 0x72221
cmpw $0x1, %ax
jne 0x8c07
movups 0x69828(%rip), %xmm0    # 0x723cc
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x6980a(%rip), %xmm0    # 0x723bc
movaps %xmm0, (%rdi)
movw $0x20, 0x20(%rdi)
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x1b33f
cmpw $0x1, %ax
jne 0x8c07
leaq 0x9bc3a(%rip), %rdi     # 0xa4810
movl $0x88000, %edx          # imm = 0x88000
xorl %esi, %esi
callq 0x62f0
movl $0x2a, %eax
leaq 0x2730c2(%rip), %rcx    # 0x27bcb0
leaq 0x697e9(%rip), %rbx     # 0x723de
movw $0xffff, (%rcx,%rax)    # imm = 0xFFFF
addq $0x2c, %rax
cmpq $0xb002a, %rax          # imm = 0xB002A
jne 0x8bf5
movq %rbx, %rdi
callq 0x19277
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: JS_ClearAllSprites
void
JS_ClearAllSprites(void)
{
     char      what[50];
     int       i,ans;

     sprintf(what, "1=YES,DELETE ALL SPRITES, 0 TO CANCEL. ");
     ans=getnumber16(what, 0, 2L, 0);

     if( ans != 1 ) {
          printmessage16("Cancelled...");
          return;
     }

     sprintf(what, "REALLY DELETE SPRITES ? 1=YES  0=NO ");
     ans=getnumber16(what, 0, 2L, 0);

     if( ans != 1 ) {
          printmessage16("Cancelled...");
          return;
     }

     for( i=0; i<MAXSPRITES; i++ ) {
          deletesprite(i);
          memset(&spriteXT[i], 0, sizeof(struct spriteextension));
          sprite[i].extra=-1;
     }

     printmessage16("All sprites gone...");

 return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movups 0x697e2(%rip), %xmm0    # 0x72409
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x697c4(%rip), %xmm0    # 0x723f9
movaps %xmm0, (%rdi)
movabsq $0x202e4c45434e41, %rax # imm = 0x202E4C45434E41
movq %rax, 0x20(%rdi)
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x1b33f
leaq 0x695c6(%rip), %rbx     # 0x72221
cmpw $0x1, %ax
jne 0x8cf1
movups 0x697c5(%rip), %xmm0    # 0x72431
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movups 0x697a7(%rip), %xmm0    # 0x72421
movaps %xmm0, (%rdi)
movabsq $0x204f4e3d302020, %rax # imm = 0x204F4E3D302020
movq %rax, 0x1d(%rdi)
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x1b33f
cmpw $0x1, %ax
jne 0x8cf1
leaq 0x27300a(%rip), %r14    # 0x27bcb0
addq $0x2a, %r14
leaq 0x9bb5f(%rip), %r15     # 0xa4810
xorl %r12d, %r12d
leaq 0x6978b(%rip), %rbx     # 0x72446
movswl %r12w, %edi
callq 0x35b53
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movups %xmm0, 0x10(%r15)
movw $0x0, 0x20(%r15)
movw $0xffff, (%r14)         # imm = 0xFFFF
incq %r12
addq $0x22, %r15
addq $0x2c, %r14
cmpq $0x4000, %r12           # imm = 0x4000
jne 0x8cbb
movq %rbx, %rdi
callq 0x19277
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: JS_SaveSpriteExts
int
JS_SaveSpriteExts(const char *mapname)
{
     int       fh,i;

     buildputs("Appending extensions...\n");

     fh=open(mapname, O_BINARY | O_WRONLY, 0);
     if ( fh == -1 ) {
          return(-1);
     }

     //checkextras();

     // prepare trailer
     memset(&XTtrailer, 0, sizeof(struct XTtrailertype));
     strncpy(XTtrailer.mapname, mapname, 12);
     XTtrailer.mapname[12]='\0';
     strcpy(XTtrailer.ID, TRAILERID);
     XTtrailer.ID[12]='\0';
     XTtrailer.numXTs=0L;

     // go to end of map = beginning of eXTensions
     XTtrailer.start=(int)lseek(fh, 0, SEEK_END);

     // verify extension then
     // write extensions to end of map file
     XTtrailer.numXTs=0L;
     for (i=0; i<MAXSPRITES; i++) {
          if( spriteXT[i].lock == 0xFF ) {
               memset(&XTsave, 0, sizeof(struct XTsavetype));
               XTtrailer.numXTs++;
               XTsave.XTnum=i;
               XTsave.sprXT=spriteXT[i];
               write(fh, &XTsave, sizeof(struct XTsavetype));
          }
     }

     // write trailer 
     write(fh, &XTtrailer, sizeof(struct XTtrailertype));
     close(fh);

 return(0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x696cf(%rip), %rdi     # 0x725c0
callq 0x32200
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x6490
cmpl $-0x1, %eax
je 0x9037
movl %eax, %ebx
xorps %xmm0, %xmm0
movups %xmm0, 0x123901(%rip)   # 0x12c820
movups %xmm0, 0x1238ea(%rip)   # 0x12c810
movw $0x0, 0x123901(%rip)    # 0x12c830
leaq 0x1238e2(%rip), %rdi    # 0x12c818
movl $0xc, %edx
movq %r14, %rsi
callq 0x6190
movb %r15b, 0x1238da(%rip)   # 0x12c824
movabsq $0x2a2a535458455f, %rax # imm = 0x2A2A535458455F
movq %rax, 0x1238cf(%rip)    # 0x12c82a
movabsq $0x58455f50414d2a2a, %rax # imm = 0x58455F50414D2A2A
movq %rax, 0x1238b9(%rip)    # 0x12c825
movb %r15b, 0x1238be(%rip)   # 0x12c831
movl %r15d, 0x123896(%rip)   # 0x12c810
movl %ebx, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x62b0
movl %eax, 0x123886(%rip)    # 0x12c814
movl %r15d, 0x12387b(%rip)   # 0x12c810
leaq 0x9b874(%rip), %r12     # 0xa4810
leaq 0x12388f(%rip), %r14    # 0x12c832
cmpb $-0x1, 0x1e(%r12)
jne 0x9009
xorps %xmm0, %xmm0
movups %xmm0, 0x12387d(%rip)   # 0x12c832
movups %xmm0, 0x123886(%rip)   # 0x12c842
incl 0x12384e(%rip)          # 0x12c810
movl $0x0, 0x123886(%rip)    # 0x12c852
movw %r15w, 0x12385e(%rip)   # 0x12c832
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm0, 0x12384e(%rip)   # 0x12c834
movups %xmm1, 0x123857(%rip)   # 0x12c844
movzwl 0x20(%r12), %eax
movw %ax, 0x12385a(%rip)     # 0x12c854
movl $0x24, %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x6af0
incq %r15
addq $0x22, %r12
cmpq $0x4000, %r15           # imm = 0x4000
jne 0x8fa3
leaq 0x1237f0(%rip), %rsi    # 0x12c810
movl $0x22, %edx
movl %ebx, %edi
callq 0x6af0
movl %ebx, %edi
callq 0x6220
xorl %eax, %eax
jmp 0x903c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: JS_GetPicInfo
void
JS_GetPicInfo(struct picattribtype *picattr, short picnum)
{
     long      amask=picanm[picnum];

     memset(picattr, 0, sizeof(struct picattribtype));

     picattr->numframes=amask&0x0000003F;     
     picattr->animtype =( amask&0x000000C0 )>>6;
     picattr->xcenteroffset=( amask&0x0000FF00 )>>8;
     picattr->ycenteroffset=( amask&0x00FF0000 )>>16;
     picattr->animspeed=( amask&0x0F000000 )>>24;
}

// Assembly:
movslq %esi, %rax
leaq 0x230a0e(%rip), %rcx    # 0x239a60
movl (%rcx,%rax,4), %eax
movl $0x0, (%rdi)
movl %eax, %ecx
andb $0x3f, %cl
movb %cl, (%rdi)
movl %eax, %ecx
shrb $0x6, %cl
movb %cl, 0x1(%rdi)
movb %ah, 0x3(%rdi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x2(%rdi)
shrl $0x18, %eax
andb $0xf, %al
movb %al, 0x4(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: JS_ChangeVelocity
int
JS_ChangeVelocity(short sn)
{
     char      what[50];

     sprintf(what, "sprite[%d].xvel  = ", sn);
     sprite[sn].xvel=getnumber16(what, sprite[sn].xvel, 10L, 0);

     sprintf(what, "sprite[%d].yvel  = ", sn);          
     sprite[sn].yvel=getnumber16(what, sprite[sn].yvel, 10L, 0);

     sprintf(what, "sprite[%d].zvel  = ", sn);
     sprite[sn].zvel=getnumber16(what, sprite[sn].zvel, 10L, 0);

     printmessage16("Velocities adjusted");

     keystatus[56]=1;
     keystatus[15]=1;

 return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edi, %ebp
leaq 0x69075(%rip), %rsi     # 0x72c6a
movq %rsp, %rbx
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x6b00
movslq %ebp, %r14
imulq $0x2c, %r14, %r15
leaq 0x27209e(%rip), %r12    # 0x27bcb0
movswl 0x20(%r12,%r15), %esi
movq %rbx, %rdi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x1b33f
movw %ax, 0x20(%r12,%r15)
leaq 0x6904a(%rip), %rsi     # 0x72c7e
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x6b00
movswl 0x22(%r12,%r15), %esi
movq %rbx, %rdi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x1b33f
movw %ax, 0x22(%r12,%r15)
leaq 0x6902f(%rip), %rsi     # 0x72c92
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x6b00
movswl 0x24(%r12,%r15), %esi
movq %rbx, %rdi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x1b33f
movw %ax, 0x24(%r12,%r15)
leaq 0x69014(%rip), %rdi     # 0x72ca6
callq 0x19277
leaq 0x1735f2(%rip), %rax    # 0x17d290
movb $0x1, %cl
movb %cl, 0x38(%rax)
movb %cl, 0xf(%rax)
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: ExtShowWallData
void ExtShowWallData(short wallnum)       //F6
{
	if (qsetmode == 200)    //In 3D mode
	{
	}
	else
	{
		clearmidstatbar16();             //Clear middle of status bar

		sprintf(tempbuf,"Wall %d",wallnum);
		printext16(8,32,11,-1,tempbuf,0);
	}
}

// Assembly:
leaq 0x1ad05f(%rip), %rax    # 0x1b7a28
cmpl $0xc8, (%rax)
jne 0xa9d2
retq
pushq %rbx
movl %edi, %ebx
callq 0x1ad03
movswl %bx, %edx
leaq 0x99cfc(%rip), %rbx     # 0xa46e0
leaq 0x685ed(%rip), %rsi     # 0x72fd8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6b00
movl $0x8, %edi
movl $0x20, %esi
movl $0xb, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rbx, %r8
xorl %r9d, %r9d
popq %rbx
jmp 0x19108
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: ExtShowSpriteData
void ExtShowSpriteData(short spritenum)   //F6
{
    if( elapsedtime == 1) {
         elapsedtime=0;
    }
    else if( copyext ) {
         copyext=0;
         JS_CopyExt(spritenum);
    }
    else if( recordext ) {
         recordext=0;
         JS_RecordExt(spritenum);
    }
    else {
         JS_ShowSpriteExts(spritenum);
    }
}

// Assembly:
cmpb $0x1, 0x99cb9(%rip)     # 0xa46d5
jne 0xaa26
movb $0x0, 0x99cb0(%rip)     # 0xa46d5
retq
cmpb $0x0, 0x99ca9(%rip)     # 0xa46d6
je 0xaa3e
movb $0x0, 0x99ca0(%rip)     # 0xa46d6
movswl %di, %edi
jmp 0x8858
cmpb $0x0, 0x99c92(%rip)     # 0xa46d7
je 0xaa56
movb $0x0, 0x99c89(%rip)     # 0xa46d7
movswl %di, %edi
jmp 0x71f8
movswl %di, %edi
jmp 0x72af
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/bstub.c
// Function: ExtEditSpriteData
void ExtEditSpriteData(short spritenum)   //F8
{
     if (qsetmode == 200)    //In 3D mode
     {
          return;
     }
     cursprite=spritenum;
     curspritenum=0;
     if ( editvelocity == 1 ) {
          JS_ChangeVelocity(spritenum);
          editvelocity=0;
          keystatus[0x42]=0;
          return;
     }
     if ( docleanup == 1 ) {
          JS_CleanupExtensions();
          docleanup=0;
          keystatus[0x42]=0;
          return;
     }
     sprintf(tempbuf,"Current Sprite %d",cursprite);
     printmessage16(tempbuf);
     JS_EditSpriteExts(spritenum);
     keystatus[0x42]=0;
}

// Assembly:
leaq 0x1acf73(%rip), %rax    # 0x1b7a28
cmpl $0xc8, (%rax)
je 0xab50
pushq %r14
pushq %rbx
subq $0x38, %rsp
cmpb $0x1, 0x99c05(%rip)     # 0xa46d4
jne 0xaae2
movswl %di, %edi
callq 0x9be0
movb $0x0, 0x99bf4(%rip)     # 0xa46d4
jmp 0xab3e
cmpb $0x1, 0x99bf1(%rip)     # 0xa46da
jne 0xab12
movups 0x67762(%rip), %xmm0    # 0x72254
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movl $0x2e2e2e, 0xf(%rdi)    # imm = 0x2E2E2E
callq 0x19277
callq 0x6fbd
movb $0x0, 0x99bca(%rip)     # 0xa46da
jmp 0xab3e
movswl %di, %ebx
leaq 0x99bc4(%rip), %r14     # 0xa46e0
leaq 0x684bd(%rip), %rsi     # 0x72fe0
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x6b00
movq %r14, %rdi
callq 0x19277
movl %ebx, %edi
callq 0x9746
leaq 0x17274b(%rip), %rax    # 0x17d290
movb $0x0, 0x42(%rax)
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: osdcmd_restartvid
static int osdcmd_restartvid(const osdfuncparm_t *parm)
{
	extern int qsetmode;

	(void)parm;

	if (qsetmode != 200) return OSDCMD_OK;

	resetvideomode();
	if (setgamemode(fullscreen,xdim,ydim,bpp))
		buildputs("restartvid: Reset failed...\n");

	return OSDCMD_OK;
}

// Assembly:
pushq %rax
leaq 0x1ac536(%rip), %rax    # 0x1b7a28
cmpl $0xc8, (%rax)
jne 0xb539
callq 0x6d1ee
leaq 0x171ba2(%rip), %rax    # 0x17d0a8
movsbl (%rax), %edi
leaq 0x3fbadc(%rip), %rax    # 0x406fec
movl (%rax), %esi
leaq 0x3fbad7(%rip), %rax    # 0x406ff0
movl (%rax), %edx
leaq 0x171b82(%rip), %rax    # 0x17d0a4
movl (%rax), %ecx
callq 0x332f0
testl %eax, %eax
je 0xb539
leaq 0x68951(%rip), %rdi     # 0x73e85
callq 0x32200
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: osdcmd_vidmode
static int osdcmd_vidmode(const osdfuncparm_t *parm)
{
	int newx = xdim, newy = ydim, newbpp = bpp, newfullscreen = fullscreen;
	extern int qsetmode;

	if (qsetmode != 200) return OSDCMD_OK;

	if (parm->numparms < 1 || parm->numparms > 4) {
		return OSDCMD_SHOWHELP;
	}

	if (parm->numparms == 4) {
		// fs, res, bpp switch
		newfullscreen = (atoi(parm->parms[3]) != 0);
	}
	if (parm->numparms >= 3) {
		// res & bpp switch
		newbpp = atoi(parm->parms[2]);
	}
	if (parm->numparms >= 2) {
		// res switch
		newy = atoi(parm->parms[1]);
		newx = atoi(parm->parms[0]);
	}
	if (parm->numparms == 1) {
		// bpp switch
		newbpp = atoi(parm->parms[0]);
	}

	if (setgamemode(newfullscreen,newx,newy,newbpp))
		buildputs("vidmode: Mode change failed!\n");
	xdimgame = newx;
	ydimgame = newy;
	bppgame = newbpp;
	fullscreen = newfullscreen;
	return OSDCMD_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1ac4d9(%rip), %rcx    # 0x1b7a28
xorl %eax, %eax
cmpl $0xc8, (%rcx)
jne 0xb644
movq %rdi, %r14
movl (%rdi), %r12d
leal -0x5(%r12), %ecx
movl $0x1, %eax
cmpl $-0x4, %ecx
jb 0xb644
leaq 0x3fba6f(%rip), %rax    # 0x406fec
movl (%rax), %ebp
leaq 0x3fba6a(%rip), %rax    # 0x406ff0
movl (%rax), %ebx
leaq 0x171b15(%rip), %rax    # 0x17d0a4
movl (%rax), %r15d
leaq 0x171b0f(%rip), %rax    # 0x17d0a8
cmpl $0x4, %r12d
jne 0xb5b7
movq 0x10(%r14), %rax
movq 0x18(%rax), %rdi
callq 0x6310
xorl %r13d, %r13d
testl %eax, %eax
setne %r13b
jmp 0xb5ba
movl (%rax), %r13d
cmpl $0x3, %r12d
jl 0xb5d0
movq 0x10(%r14), %rax
movq 0x10(%rax), %rdi
callq 0x6310
movl %eax, %r15d
cmpl $0x2, %r12d
jl 0xb5f0
movq 0x10(%r14), %rbp
movq 0x8(%rbp), %rdi
callq 0x6310
movl %eax, %ebx
movq (%rbp), %rdi
callq 0x6310
movl %eax, %ebp
cmpl $0x1, %r12d
jne 0xb605
movq 0x10(%r14), %rax
movq (%rax), %rdi
callq 0x6310
movl %eax, %r15d
movsbl %r13b, %edi
movl %ebp, %esi
movl %ebx, %edx
movl %r15d, %ecx
callq 0x332f0
testl %eax, %eax
je 0xb625
leaq 0x68882(%rip), %rdi     # 0x73ea2
callq 0x32200
movl %ebp, 0x979b5(%rip)     # 0xa2fe0
movl %ebx, 0x979b3(%rip)     # 0xa2fe4
movl %r15d, 0x979b0(%rip)    # 0xa2fe8
leaq 0x171a69(%rip), %rax    # 0x17d0a8
movl %r13d, (%rax)
xorl %eax, %eax
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/jfbuild/src/build.c
// Function: osdcmd_mapversion
static int osdcmd_mapversion(const osdfuncparm_t *parm)
{
	int newversion;

	if (parm->numparms < 1) {
		buildprintf("mapversion is %d\n", mapversion);
		return OSDCMD_OK;
	}
	newversion = atoi(parm->parms[0]);
	if (newversion < 5 || newversion > 8) {
		return OSDCMD_SHOWHELP;
	}

	buildprintf("mapversion is now %d (was %d)\n", newversion, mapversion);
	mapversion = newversion;

	return OSDCMD_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x0, (%rdi)
jle 0xb69c
movq 0x10(%rdi), %rax
movq (%rax), %rdi
callq 0x6310
movl %eax, %r14d
leal -0x9(%r14), %eax
movl $0x1, %ebx
cmpl $-0x4, %eax
jb 0xb6b5
leaq 0x98117(%rip), %r15     # 0xa3798
movl (%r15), %edx
leaq 0x68847(%rip), %rdi     # 0x73ed2
xorl %ebx, %ebx
movl %r14d, %esi
xorl %eax, %eax
callq 0x24cb4
movl %r14d, (%r15)
jmp 0xb6b5
leaq 0x980f5(%rip), %rax     # 0xa3798
movl (%rax), %esi
leaq 0x68814(%rip), %rdi     # 0x73ec0
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x24cb4
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: osdcmd_showspriteextents
static int osdcmd_showspriteextents(const osdfuncparm_t *parm)
{
	int newval;

	if (parm->numparms != 1) {
		buildprintf("showspriteextents is %d\n", showspriteextents);
		return OSDCMD_OK;
	}
	newval = atoi(parm->parms[0]);
	if (newval < 0 || newval > 2) {
		return OSDCMD_SHOWHELP;
	}

	buildprintf("showspriteextents is now %d (was %d)\n", newval, showspriteextents);
	showspriteextents = newval;
	return OSDCMD_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpl $0x1, (%rdi)
jne 0xb6ff
movq 0x10(%rdi), %rax
movq (%rax), %rdi
callq 0x6310
movl $0x1, %ebx
cmpl $0x2, %eax
ja 0xb716
movl %eax, %ebp
movswl 0x121244(%rip), %edx    # 0x12c928
leaq 0x6881f(%rip), %rdi     # 0x73f0a
xorl %ebx, %ebx
movl %eax, %esi
xorl %eax, %eax
callq 0x24cb4
movw %bp, 0x12122b(%rip)     # 0x12c928
jmp 0xb716
movswl 0x121222(%rip), %esi    # 0x12c928
leaq 0x687e4(%rip), %rdi     # 0x73ef1
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x24cb4
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: updatenumsprites
void updatenumsprites(void)
{
	int i;

	numsprites = 0;
	for(i=0;i<MAXSPRITES;i++)
		if (sprite[i].statnum < MAXSTATUS)
			numsprites++;
}

// Assembly:
movl $0x0, 0x165c91(%rip)    # 0x1791cc
xorl %eax, %eax
movl $0x1a, %ecx
leaq 0x268767(%rip), %rdx    # 0x27bcb0
cmpw $0x3ff, (%rdx,%rcx)     # imm = 0x3FF
jg 0x13559
incl %eax
movl %eax, 0x165c73(%rip)    # 0x1791cc
addq $0x2c, %rcx
cmpq $0xb001a, %rcx          # imm = 0xB001A
jne 0x13549
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: printmessage256
void printmessage256(char *name)
{
	char snotbuf[40];
	int i;

	i = 0;
	while ((name[i] != 0) && (i < 38))
	{
		snotbuf[i] = name[i];
		i++;
	}
	while (i < 38)
	{
		snotbuf[i] = 32;
		i++;
	}
	snotbuf[38] = 0;

	printext256(0L,0L,whitecol,blackcol,snotbuf,0);
}

// Assembly:
subq $0x28, %rsp
movb (%rdi), %dl
testb %dl, %dl
je 0x1358d
xorl %ecx, %ecx
movb %dl, (%rsp,%rcx)
leaq 0x1(%rcx), %rax
cmpq $0x24, %rcx
ja 0x1358f
movb 0x1(%rdi,%rcx), %dl
movq %rax, %rcx
testb %dl, %dl
jne 0x13573
jmp 0x1358f
xorl %eax, %eax
cmpl $0x25, %eax
ja 0x135ae
movl %eax, %ecx
leaq (%rsp,%rcx), %rdi
movl $0x25, %edx
subl %eax, %edx
incq %rdx
movl $0x20, %esi
callq 0x62f0
movq %rsp, %r8
movb $0x0, 0x26(%r8)
movswl 0x11978b(%rip), %edx    # 0x12cd48
movswl 0x119788(%rip), %ecx    # 0x12cd4c
xorl %edi, %edi
xorl %esi, %esi
xorl %r9d, %r9d
callq 0x3c433
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: fixspritesectors
void fixspritesectors(void)
{
	int i, j, dax, day, daz;

	for(i=numsectors-1;i>=0;i--)
		if ((sector[i].wallnum <= 0) || (sector[i].wallptr >= numwalls))
			deletesector((short)i);

	for(i=0;i<MAXSPRITES;i++)
		if (sprite[i].statnum < MAXSTATUS)
		{
			dax = sprite[i].x;
			day = sprite[i].y;
			if (inside(dax,day,sprite[i].sectnum) != 1)
			{
				daz = ((tilesizy[sprite[i].picnum]*sprite[i].yrepeat)<<2);

				for(j=0;j<numsectors;j++)
					if (inside(dax,day,(short)j) == 1)
						if (sprite[i].z >= getceilzofslope(j,dax,day))
							if (sprite[i].z-daz <= getflorzofslope(j,dax,day))
							{
								changespritesect((short)i,(short)j);
								break;
							}
			}
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x3bb95b(%rip), %rax    # 0x3cef60
movswq (%rax), %rbx
testq %rbx, %rbx
jle 0x13658
leaq (%rbx,%rbx,4), %rax
incq %rbx
leaq 0x22f444(%rip), %rcx    # 0x242a60
leaq (%rcx,%rax,8), %r14
addq $-0x26, %r14
leaq 0x40263d(%rip), %r15    # 0x415c68
cmpw $0x0, (%r14)
jle 0x1363d
movzwl -0x2(%r14), %eax
cmpw (%r15), %ax
jl 0x1364b
leal 0xfffe(%rbx), %eax
movswl %ax, %edi
callq 0x1c1d4
decq %rbx
addq $-0x28, %r14
cmpq $0x1, %rbx
jg 0x1362b
xorl %r15d, %r15d
imulq $0x2c, %r15, %r13
leaq 0x26864a(%rip), %rax    # 0x27bcb0
cmpw $0x3ff, 0x1a(%rax,%r13) # imm = 0x3FF
jg 0x13731
addq 0x7e94d(%rip), %r13     # 0x91fc8
movl (%r13), %ebx
movl 0x4(%r13), %ebp
movswl 0x18(%r13), %edx
movl %ebx, %edi
movl %ebp, %esi
callq 0x355a7
cmpl $0x1, %eax
je 0x13731
leaq 0x3bb8bf(%rip), %rax    # 0x3cef60
cmpw $0x0, (%rax)
jle 0x13731
movswq 0xe(%r13), %rax
leaq 0x3ed129(%rip), %rcx    # 0x4007e0
movswl (%rcx,%rax,2), %eax
movzbl 0x15(%r13), %ecx
imull %eax, %ecx
shll $0x2, %ecx
movl %ecx, 0x4(%rsp)
xorl %r14d, %r14d
movswl %r14w, %edx
movl %ebx, %edi
movl %ebp, %esi
callq 0x355a7
cmpl $0x1, %eax
jne 0x13710
movl 0x8(%r13), %r12d
movswl %r14w, %edi
movl %ebx, %esi
movl %ebp, %edx
callq 0x398a4
cmpl %eax, %r12d
jl 0x13710
movl 0x8(%r13), %r12d
subl 0x4(%rsp), %r12d
movswl %r14w, %edi
movl %ebx, %esi
movl %ebp, %edx
callq 0x397ca
cmpl %eax, %r12d
jle 0x13724
incl %r14d
leaq 0x3bb846(%rip), %rax    # 0x3cef60
movswl (%rax), %eax
cmpl %eax, %r14d
jl 0x136cd
jmp 0x13731
movswl %r14w, %esi
movswl %r15w, %edi
callq 0x35819
incq %r15
cmpq $0x4000, %r15           # imm = 0x4000
jne 0x1365b
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/jfbuild/src/build.c
// Function: clearfilenames
void clearfilenames(void)
{
	klistfree(finddirs);
	klistfree(findfiles);
	finddirs = findfiles = NULL;
	numfiles = numdirs = 0;
}

// Assembly:
pushq %rax
movq 0x165e78(%rip), %rdi    # 0x1795d0
callq 0x206c1
movq 0x165e74(%rip), %rdi    # 0x1795d8
callq 0x206c1
xorl %eax, %eax
movq %rax, 0x165e66(%rip)    # 0x1795d8
movq %rax, 0x165e57(%rip)    # 0x1795d0
movl %eax, 0x165e61(%rip)    # 0x1795e0
movl %eax, 0x165e5f(%rip)    # 0x1795e4
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: showmouse
void showmouse(void)
{
	drawline256((searchx+1)<<12, (searchy  )<<12, (searchx+5)<<12, (searchy  )<<12, whitecol);
	drawline256((searchx  )<<12, (searchy+1)<<12, (searchx  )<<12, (searchy+5)<<12, whitecol);
	drawline256((searchx-1)<<12, (searchy  )<<12, (searchx-5)<<12, (searchy  )<<12, whitecol);
	drawline256((searchx  )<<12, (searchy-1)<<12, (searchx  )<<12, (searchy-5)<<12, whitecol);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x904ab(%rip), %r14     # 0xa3c40
movl (%r14), %edx
shll $0xc, %edx
movl $0x1000, %ebx           # imm = 0x1000
leal (%rdx,%rbx), %edi
leaq 0x4046be(%rip), %r15    # 0x417e68
movl (%r15), %ecx
shll $0xc, %ecx
movl $0x5000, %ebp           # imm = 0x5000
addl %ebp, %edx
movzbl 0x119589(%rip), %r8d    # 0x12cd48
movl %ecx, %esi
callq 0x3c09a
movl (%r14), %edi
shll $0xc, %edi
movl (%r15), %ecx
shll $0xc, %ecx
addl %ecx, %ebx
addl %ebp, %ecx
movzbl 0x11956a(%rip), %r8d    # 0x12cd48
movl %ebx, %esi
movl %edi, %edx
callq 0x3c09a
movl (%r14), %edx
shll $0xc, %edx
movl $0xfffff000, %ebx       # imm = 0xFFFFF000
leal (%rdx,%rbx), %edi
movl (%r15), %ecx
shll $0xc, %ecx
movl $0xffffb000, %ebp       # imm = 0xFFFFB000
addl %ebp, %edx
movzbl 0x11953e(%rip), %r8d    # 0x12cd48
movl %ecx, %esi
callq 0x3c09a
movl (%r14), %edi
shll $0xc, %edi
movl (%r15), %ecx
shll $0xc, %ecx
addl %ecx, %ebx
addl %ebp, %ecx
movzbl 0x11951f(%rip), %r8d    # 0x12cd48
movl %ebx, %esi
movl %edi, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3c09a
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: setoverheadviewport16
void setoverheadviewport16(void)
{
	bakydim16 = ydim16;
	bakytop16 = ytop16;
	ydim16 = yres - STATUS2DSIZ;
	ytop16 = 0;
}

// Assembly:
movl 0x119526(%rip), %eax    # 0x12cd68
movl %eax, 0x8f7c8(%rip)     # 0xa3010
movl 0x11951e(%rip), %eax    # 0x12cd6c
movl %eax, 0x8f7c0(%rip)     # 0xa3014
leaq 0x8f7d9(%rip), %rax     # 0xa3034
movl $0xffffff70, %ecx       # imm = 0xFFFFFF70
addl (%rax), %ecx
movl %ecx, 0x119500(%rip)    # 0x12cd68
movl $0x0, 0x1194fa(%rip)    # 0x12cd6c
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: setstatusbarviewport16
void setstatusbarviewport16(void)
{
	bakydim16 = ydim16;
	bakytop16 = ytop16;
	ydim16 = STATUS2DSIZ;
	ytop16 = yres - STATUS2DSIZ;
}

// Assembly:
movl 0x1194ef(%rip), %eax    # 0x12cd68
movl %eax, 0x8f791(%rip)     # 0xa3010
movl 0x1194e7(%rip), %eax    # 0x12cd6c
movl %eax, 0x8f789(%rip)     # 0xa3014
movl $0x90, 0x1194d3(%rip)   # 0x12cd68
leaq 0x8f798(%rip), %rax     # 0xa3034
movl $0xffffff70, %ecx       # imm = 0xFFFFFF70
addl (%rax), %ecx
movl %ecx, 0x1194c3(%rip)    # 0x12cd6c
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: restoreviewport16
void restoreviewport16(void)
{
	if (bakytop16 < 0) {
		debugprintf("restoreviewport16: no viewport saved\n");
		return;
	}
	ydim16 = bakydim16;
	ytop16 = bakytop16;
	bakytop16 = bakydim16 = -1;
}

// Assembly:
movl 0x8f764(%rip), %eax     # 0xa3014
testl %eax, %eax
js 0x138d8
movl 0x8f756(%rip), %ecx     # 0xa3010
movl %ecx, 0x1194a8(%rip)    # 0x12cd68
movl %eax, 0x1194a6(%rip)    # 0x12cd6c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x8f73f(%rip)     # 0xa3010
movl %eax, 0x8f73d(%rip)     # 0xa3014
retq
leaq 0x5fb5f(%rip), %rdi     # 0x7343e
xorl %eax, %eax
jmp 0x6c31f
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: fixrepeats
void fixrepeats(short i)
{
	int dax, day, dist;

	dax = wall[wall[i].point2].x-wall[i].x;
	day = wall[wall[i].point2].y-wall[i].y;
	dist = ksqrt(dax*dax+day*day);
	dax = wall[i].xrepeat; day = wall[i].yrepeat;
	wall[i].xrepeat = (unsigned char)min(max(mulscale10(dist,day),1),255);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %rbx
shlq $0x5, %rbx
leaq 0x19fe04(%rip), %r14    # 0x1b7a50
movswq 0x8(%r14,%rbx), %rax
shlq $0x5, %rax
movl (%r14,%rax), %ecx
movl 0x4(%r14,%rax), %edi
subl (%r14,%rbx), %ecx
subl 0x4(%r14,%rbx), %edi
imull %ecx, %ecx
imull %edi, %edi
addl %ecx, %edi
callq 0x35745
movzbl 0x17(%r14,%rbx), %ecx
cltq
imulq %rcx, %rax
shrq $0xa, %rax
cmpl $0x2, %eax
movl $0x1, %ecx
cmovgel %eax, %ecx
movl $0xff, %edx
cmpl %edx, %eax
cmovgel %edx, %ecx
movb %cl, 0x16(%r14,%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: changechar
unsigned char changechar(unsigned char dachar, int dadir, unsigned char smooshyalign, unsigned char boundcheck)
{
	if (dadir < 0)
	{
		if ((dachar > 0) || (boundcheck == 0))
		{
			dachar--;
			if (smooshyalign > 0)
				dachar = (dachar&0xf8);
		}
	}
	else if (dadir > 0)
	{
		if ((dachar < 255) || (boundcheck == 0))
		{
			dachar++;
			if (smooshyalign > 0)
			{
				if (dachar >= 256-8) dachar = 255;
				else dachar = ((dachar+7)&0xf8);
			}
		}
	}
	return(dachar);
}

// Assembly:
testl %esi, %esi
js 0x183fe
je 0x18422
cmpb $-0x1, %dil
sete %al
testb %cl, %cl
setne %cl
testb %cl, %al
jne 0x18422
leal 0x1(%rdi), %eax
testb %dl, %dl
je 0x18421
cmpb $-0x9, %al
movb $-0x1, %al
ja 0x18421
andb $-0x8, %dil
addb $0x8, %dil
jmp 0x18422
testb %dil, %dil
sete %al
testb %cl, %cl
setne %cl
testb %cl, %al
jne 0x18422
decb %dil
movzbl %dil, %ecx
andb $-0x8, %dil
testb %dl, %dl
movzbl %dil, %eax
cmovel %ecx, %eax
retq
movl %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: getnumber256
short getnumber256(char *namestart, short num, int maxnumber, char sign)
{
	char buffer[80], ch;
	int n, danum, oldnum;

	danum = (int)num;
	oldnum = danum;
	bflushchars();
	while (keystatus[0x1] == 0)
	{
		if (handleevents()) {
			if (quitevent) quitevent = 0;
		}

		drawrooms(posx,posy,posz,ang,horiz,cursectnum);
		ExtAnalyzeSprites();
		drawmasks();

		ch = bgetchar();

		snprintf(buffer, sizeof(buffer), "%s%d_ ",namestart,danum);
		printmessage256(buffer);
		showframe();

		if (ch >= '0' && ch <= '9') {
			if (sign && danum<0)
				n = (danum*10)-(ch-'0');
			else
				n = (danum*10)+(ch-'0');
			if (n < maxnumber) danum = n;
		} else if (ch == 8 || ch == 127) {	// backspace
			danum /= 10;
		} else if (ch == 13) {
			oldnum = danum;
			asksave = 1;
			break;
		} else if (ch == '-' && sign) {	// negate
			danum = -danum;
		}
	}
	clearkeys();

	lockclock = totalclock;  //Reset timing

	return((short)oldnum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %ebx
movq %rdi, %r15
callq 0x1ec2f
leaq 0x164c77(%rip), %rax    # 0x17d290
cmpb $0x0, 0x1(%rax)
jne 0x1874a
movl %r14d, 0xc(%rsp)
movl %ebx, 0x8(%rsp)
movswl %bx, %r12d
leaq 0x10(%rsp), %rbx
movq %rax, %r14
callq 0x6d55e
testl %eax, %eax
je 0x18657
leaq 0x164a58(%rip), %rax    # 0x17d0a0
cmpb $0x0, (%rax)
je 0x18657
leaq 0x164a4c(%rip), %rax    # 0x17d0a0
movb $0x0, (%rax)
movl 0x1146f3(%rip), %edi    # 0x12cd50
movl 0x1146f1(%rip), %esi    # 0x12cd54
movl 0x1146ef(%rip), %edx    # 0x12cd58
movswl 0x1146ec(%rip), %ecx    # 0x12cd5c
movl 0x8a959(%rip), %r8d     # 0xa2fd0
movswl 0x1146df(%rip), %r9d    # 0x12cd5e
callq 0x2573e
callq 0xab56
callq 0x2925e
callq 0x1ebf5
movl %eax, %r13d
movl $0x50, %esi
movq %rbx, %rdi
leaq 0x5b323(%rip), %rdx     # 0x739c8
movq %r15, %rcx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x64f0
movq %rbx, %rdi
callq 0x13567
callq 0x6d200
leal -0x30(%r13), %ecx
movzbl %r13b, %eax
cmpb $0x9, %cl
ja 0x186f7
leal (%r12,%r12), %ecx
leal (%rcx,%rcx,4), %ecx
leal (%rax,%rcx), %edx
addl $-0x30, %edx
subl %eax, %ecx
addl $0x30, %ecx
testl %r12d, %r12d
cmovnsl %edx, %ecx
testb %bpl, %bpl
cmovel %edx, %ecx
cmpl 0xc(%rsp), %ecx
cmovgel %r12d, %ecx
movl %ecx, %r12d
jmp 0x18738
cmpb $0x8, %r13b
je 0x18720
cmpl $0x7f, %eax
je 0x18720
cmpl $0xd, %eax
je 0x1877d
movl %r12d, %eax
negl %eax
cmpb $0x2d, %r13b
cmovnel %r12d, %eax
testb %bpl, %bpl
cmovel %r12d, %eax
movl %eax, %r12d
jmp 0x18738
movslq %r12d, %rax
imulq $0x66666667, %rax, %r12 # imm = 0x66666667
movq %r12, %rax
shrq $0x3f, %rax
sarq $0x22, %r12
addl %eax, %r12d
movq %r14, %rax
cmpb $0x0, 0x1(%r14)
je 0x18635
movl 0x8(%rsp), %ebx
leaq 0x164b3f(%rip), %rdi    # 0x17d290
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x62f0
leaq 0x392d84(%rip), %rax    # 0x3ab4e8
movl (%rax), %eax
movl %eax, 0x1145f4(%rip)    # 0x12cd60
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x1, 0x1141a0(%rip)    # 0x12c926
movl %r12d, %ebx
jmp 0x1874a
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: qsetmodeany
void qsetmodeany(int daxdim, int daydim)
{
	if (daxdim < 640) daxdim = 640;
	if (daydim < 480) daydim = 480;

	if (qsetmode != ((daxdim<<16)|(daydim&0xffff))) {
		if (setvideomode(daxdim, daydim, 8, fullscreen) < 0)
			return;
		setbrightness(0,NULL,4);

		xdim = xres;
		ydim = yres;
		pixelaspect = 65536;

		setvgapalette();

		setoverheadviewport16();
		bakydim16 = -1; bakytop16 = -1;
		halfxdim16 = xres >> 1;
		midydim16 = scale(200,yres,480);

		clearbuf((void *)(frameplace + (ydim16*bytesperline)), (bytesperline*STATUS2DSIZ) >> 2, 0x08080808l);
		clearbuf((void *)frameplace, (ydim16*bytesperline) >> 2, 0L);
	}

	qsetmode = ((daxdim<<16)|(daydim&0xffff));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
movl %edi, %ecx
cmpl $0x281, %edi            # imm = 0x281
movl $0x280, %edi            # imm = 0x280
cmovgel %ecx, %edi
cmpl $0x1e1, %esi            # imm = 0x1E1
movl $0x1e0, %esi            # imm = 0x1E0
cmovgel %eax, %esi
leaq 0x19ed9d(%rip), %rbx    # 0x1b7a28
movl %edi, %eax
shll $0x10, %eax
movzwl %si, %ebp
orl %eax, %ebp
cmpl %ebp, (%rbx)
je 0x18da6
leaq 0x164404(%rip), %rax    # 0x17d0a8
movl (%rax), %ecx
movl $0x8, %edx
callq 0x6cb10
testl %eax, %eax
js 0x18da8
xorl %edi, %edi
xorl %esi, %esi
movl $0x4, %edx
callq 0x33747
leaq 0x8a363(%rip), %r14     # 0xa3030
movl (%r14), %eax
leaq 0x3ee315(%rip), %rcx    # 0x406fec
movl %eax, (%rcx)
leaq 0x8a354(%rip), %r15     # 0xa3034
movl (%r15), %eax
leaq 0x3ee306(%rip), %rcx    # 0x406ff0
movl %eax, (%rcx)
leaq 0x3fcf85(%rip), %rax    # 0x415c78
movl $0x10000, (%rax)        # imm = 0x10000
callq 0x3b069
movslq (%r15), %rax
leaq -0x90(%rax), %rsi
movl %esi, 0x11405a(%rip)    # 0x12cd68
movl $0x0, 0x114054(%rip)    # 0x12cd6c
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x8a2ed(%rip)     # 0xa3010
movl %ecx, 0x8a2eb(%rip)     # 0xa3014
movl (%r14), %ecx
sarl %ecx
movl %ecx, 0x160490(%rip)    # 0x1791c4
imulq $0xc8, %rax, %rcx
movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889
movq %rcx, %rax
imulq %rdx
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x8, %rdx
addl %eax, %edx
leaq 0x164522(%rip), %r14    # 0x17d284
movslq (%r14), %rax
movq %rax, %rdi
imulq %rsi, %rdi
leaq 0x16433d(%rip), %r15    # 0x17d0b0
addq (%r15), %rdi
movl %edx, 0x16044c(%rip)    # 0x1791c8
shll $0x4, %eax
leal (%rax,%rax,8), %esi
sarl $0x2, %esi
movl $0x8080808, %edx        # imm = 0x8080808
callq 0x4abc9
movq (%r15), %rdi
movl (%r14), %esi
imull 0x113fcc(%rip), %esi    # 0x12cd68
sarl $0x2, %esi
xorl %edx, %edx
callq 0x4abc9
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: printext16
void printext16(int xpos, int ypos, short col, short backcol, const char *name, char fontsize)
{
	int stx, i, x, y;
	const unsigned char *letptr;
	unsigned char *ptr;
	const struct textfontspec *f;

	f = &textfonts[min((unsigned)fontsize, 2)];
	stx = xpos;

	for(i=0;name[i];i++)
	{
		letptr = &f->font[((int)(unsigned char)name[i])*f->cellh + f->cellyoff];
		ptr = (unsigned char *)(bytesperline*(ytop16+ypos+f->charysiz-1)+stx+frameplace);
		for(y=f->charysiz-1;y>=0;y--)
		{
			for(x=f->charxsiz-1;x>=0;x--)
			{
				if (letptr[y]&pow2char[7-x-f->cellxoff])
					ptr[x] = (unsigned char)col;
				else if (backcol >= 0)
					ptr[x] = (unsigned char)backcol;
			}
			ptr -= bytesperline;
		}
		stx += f->charxsiz;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, -0x3c(%rsp)
movl %edi, -0x38(%rsp)
movq %r8, -0x10(%rsp)
movb (%r8), %sil
testb %sil, %sil
je 0x1926c
movzbl %r9b, %eax
cmpb $0x2, %al
movl $0x2, %edi
cmovbl %eax, %edi
movzbl %dil, %edi
shll $0x5, %edi
leaq 0x788a9(%rip), %r8      # 0x919f0
leaq (%r8,%rdi), %rax
movq (%r8,%rdi), %r9
movq %r9, -0x18(%rsp)
movslq 0x10(%r8,%rdi), %r9
movq %r9, -0x20(%rsp)
movslq 0x18(%r8,%rdi), %r9
movq %r9, -0x28(%rsp)
movl 0xc(%r8,%rdi), %r9d
movq %r9, -0x30(%rsp)
decl -0x3c(%rsp)
movl 0x8(%r8,%rdi), %edi
movl %edi, -0x34(%rsp)
xorl %edi, %edi
leaq 0x8a618(%rip), %r13     # 0xa37a0
movq %rdi, -0x8(%rsp)
cmpl $0x0, -0x30(%rsp)
jle 0x19249
movzbl %sil, %r15d
imulq -0x20(%rsp), %r15
addq -0x28(%rsp), %r15
addq -0x18(%rsp), %r15
movl 0x113bba(%rip), %esi    # 0x12cd6c
addl -0x3c(%rsp), %esi
movq -0x30(%rsp), %r11
addl %r11d, %esi
leaq 0x1640bf(%rip), %rdi    # 0x17d284
imull (%rdi), %esi
addl -0x38(%rsp), %esi
movslq %esi, %r9
leaq 0x163eda(%rip), %rsi    # 0x17d0b0
addq (%rsi), %r9
movslq 0x8(%rax), %rsi
movq %rsi, %rbp
incq %rbp
leaq -0x1(%r11), %rbx
testl %esi, %esi
jle 0x19233
movl 0x14(%rax), %r10d
addl %esi, %r10d
movl $0x8, %r8d
subl %r10d, %r8d
movq %rbp, %r10
testw %cx, %cx
sets %dil
movslq %r8d, %r14
movb (%r13,%r14), %r14b
andb (%r15,%rbx), %r14b
sete %r12b
testb %dil, %r12b
jne 0x19227
testb %r14b, %r14b
movl %ecx, %edi
cmovnel %edx, %edi
movb %dil, -0x2(%r9,%r10)
decq %r10
incl %r8d
cmpq $0x1, %r10
jg 0x191fe
leaq 0x16404a(%rip), %rdi    # 0x17d284
movslq (%rdi), %rdi
subq %rdi, %r9
cmpq $0x1, %r11
movq %rbx, %r11
jg 0x191e3
movl -0x34(%rsp), %esi
addl %esi, -0x38(%rsp)
movq -0x10(%rsp), %rsi
movq -0x8(%rsp), %rdi
movb 0x1(%rsi,%rdi), %sil
incq %rdi
testb %sil, %sil
jne 0x19188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: printmessage16
void printmessage16(char *name)
{
	char snotbuf[60];
	int i;

	i = 0;
	while ((name[i] != 0) && (i < 54))
	{
		snotbuf[i] = name[i];
		i++;
	}
	while (i < 54)
	{
		snotbuf[i] = 32;
		i++;
	}
	snotbuf[54] = 0;

	setstatusbarviewport16();
	printext16(200L, 8L, 0, 6, snotbuf, 0);
	restoreviewport16();
}

// Assembly:
subq $0x48, %rsp
movb (%rdi), %dl
testb %dl, %dl
je 0x1929d
xorl %ecx, %ecx
movb %dl, (%rsp,%rcx)
leaq 0x1(%rcx), %rax
cmpq $0x34, %rcx
ja 0x1929f
movb 0x1(%rdi,%rcx), %dl
movq %rax, %rcx
testb %dl, %dl
jne 0x19283
jmp 0x1929f
xorl %eax, %eax
cmpl $0x35, %eax
ja 0x192be
movl %eax, %ecx
leaq (%rsp,%rcx), %rdi
movl $0x35, %edx
subl %eax, %edx
incq %rdx
movl $0x20, %esi
callq 0x62f0
movq %rsp, %r8
movb $0x0, 0x36(%r8)
movl 0x113a9c(%rip), %eax    # 0x12cd68
movl %eax, 0x89d3e(%rip)     # 0xa3010
movl 0x113a94(%rip), %eax    # 0x12cd6c
movl %eax, 0x89d36(%rip)     # 0xa3014
movl $0x90, 0x113a80(%rip)   # 0x12cd68
leaq 0x89d45(%rip), %rax     # 0xa3034
movl $0xffffff70, %ecx       # imm = 0xFFFFFF70
addl (%rax), %ecx
movl %ecx, 0x113a70(%rip)    # 0x12cd6c
movl $0xc8, %edi
movl $0x8, %esi
xorl %edx, %edx
movl $0x6, %ecx
xorl %r9d, %r9d
callq 0x19108
movl 0x89cf9(%rip), %eax     # 0xa3014
testl %eax, %eax
js 0x19347
movl 0x89ceb(%rip), %ecx     # 0xa3010
movl %ecx, 0x113a3d(%rip)    # 0x12cd68
movl %eax, 0x113a3b(%rip)    # 0x12cd6c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x89cd4(%rip)     # 0xa3010
movl %eax, 0x89cd2(%rip)     # 0xa3014
addq $0x48, %rsp
retq
leaq 0x5a0f0(%rip), %rdi     # 0x7343e
xorl %eax, %eax
addq $0x48, %rsp
jmp 0x6c31f