LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: findPath
char* findPath(char* path, char* env)
{
	char *p, *envp;
	static char name[_MAX_PATH+1];

	if (*path == '/' ||   	/* qualified name */
	    *path == '.')
		return path;
	if ((envp = getenv(env)) != NULL)   /* lookup all pathes */
	  while (*envp) {
		p = name;
		while (*envp && (*p = *envp++) != ':') {
			if ((uint)(p - name) >= sizeof(name))
				break;
			++p;
		}
		if (*--p != '/')
			*++p = '/';
		++p;
		if ((p - name) + strlen(path) >= sizeof(name))
			break;
		strcpy(p, path);
		if (access(name, F_OK) == 0)
			return name;
	  }
    /* search within startdir */
	p=buildname(StartDir, path);
	if (access(p, F_OK) == 0)	/* file exist in current dir */
		return p;
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %al
andb $-0x2, %al
cmpb $0x2e, %al
je 0x87b2
movq %rsi, %rdi
callq 0x2040
testq %rax, %rax
je 0x878e
movq %rax, %r14
leaq 0x10beca(%rip), %r15    # 0x1145c0
cmpb $0x0, (%r14)
je 0x878e
movb (%r14), %cl
testb %cl, %cl
je 0x872f
xorl %r12d, %r12d
movq %r12, %rax
movb %cl, (%r12,%r15)
cmpb $0x3a, %cl
je 0x8734
cmpl $0x104, %eax            # imm = 0x104
ja 0x8734
movb 0x1(%r14,%rax), %cl
leaq 0x1(%rax), %r12
testb %cl, %cl
jne 0x870a
addq %r15, %r12
jmp 0x8738
movq %r15, %r12
jmp 0x873e
leaq (%r15,%rax), %r12
addq %rax, %r14
incq %r14
cmpb $0x2f, -0x1(%r12)
jne 0x874b
decq %r12
jmp 0x8750
movb $0x2f, (%r12)
movq %rbx, %rdi
callq 0x20e0
subq %r15, %rax
addq %r12, %rax
incq %rax
cmpq $0x104, %rax            # imm = 0x104
ja 0x878e
incq %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2090
movq %r15, %rdi
xorl %esi, %esi
callq 0x2330
testl %eax, %eax
jne 0x86f6
movq %r15, %rbx
jmp 0x87b2
leaq 0x10bf3b(%rip), %rdi    # 0x1146d0
movq %rbx, %rsi
callq 0x85e1
movq %rax, %r14
xorl %ebx, %ebx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2330
testl %eax, %eax
cmoveq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: mkFCB
void mkFCB( byte *p, char *s)
{
    int i, c;

    *p = 0;
    if ( s[ 1] == ':') {
        if (( c = *s) >= 'a') c &= 0x5f;
        *p = (byte)( c - 'A' + 1); s += 2;
    }
    p++;
    for ( i = 0; i < 8; i++) {
        c = ( *s && *s != '.') ? *s++ : ' ';
//	if ( c >= 'a' && c <= 'z') c &= 0x5f;
        *p++ = (byte)c;
    }
    while ( *s && *s != '.') s++;
    if ( *s) s++;
    for ( i = 0; i < 3; i++) {
        c = ( *s) ? *s++ : ' ';
//	if ( c >= 'a' && c <= 'z') c &= 0x5f;
        *p++ = (byte)c;
    }
}

// Assembly:
movb $0x0, (%rdi)
cmpb $0x3a, 0x1(%rsi)
jne 0x8d94
movzbl (%rsi), %eax
movl %eax, %ecx
andb $0x5f, %cl
cmpb $0x61, %al
movzbl %cl, %ecx
cmovll %eax, %ecx
addb $-0x40, %cl
movb %cl, (%rdi)
addq $0x2, %rsi
incq %rdi
xorl %eax, %eax
movzbl (%rsi), %edx
movb $0x20, %cl
testl %edx, %edx
je 0x8dac
cmpl $0x2e, %edx
je 0x8dac
incq %rsi
movl %edx, %ecx
movb %cl, (%rdi,%rax)
incq %rax
cmpl $0x8, %eax
jne 0x8d99
jmp 0x8dbc
incq %rsi
movzbl (%rsi), %ecx
testl %ecx, %ecx
je 0x8dc8
cmpl $0x2e, %ecx
jne 0x8db9
cmpb $0x1, %cl
sbbq $-0x1, %rsi
xorl %ecx, %ecx
movl $0x20, %edx
leaq (%rdi,%rcx), %r8
movzbl (%rsi), %r9d
xorl %r10d, %r10d
testb %r9b, %r9b
setne %r10b
cmovel %edx, %r9d
addq %r10, %rsi
movb %r9b, (%rax,%r8)
incq %rcx
cmpl $0x3, %ecx
jne 0x8dd6
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: mk_filename
char *mk_filename( char *s, byte *fcb)
{
    int i, j;
    char *dir;
#ifdef __linux__
    char *dot=NULL;
#endif
    i = fcb[ 0];
    if ( i == '?' || i == 0) i = cpm_disk_no;
    else i--;
    if ( i >= MAXDRV) return NULL;
    if ( cpm_drive[ i] == NULL) {
	if ( cpm_disk_vct == 0) setup_disk_vct();
	if ( cpm_drive[ i] == NULL) return NULL;
    }
    strcpy( s, cpm_drive[ i]);
    s += i = strlen( s);
    if ( i && s[ -1] != CH_SLASH && s[ -1] != '/' && s[ -1] != ':') *s++ = '/';
    dir = s;

    for ( j = 8; j >= 1 && fcb[ j] == '?'; j--);
    j++;
    for ( i = 1; i < j; i++) {
		if ( fcb[ i] == ' ') break;
		*s++ = fcb[ i];
    }
    if ( i == j && i <= 8) *s++ = '*';

#ifdef __linux__
	dot=s;
#endif
    *s++ = '.';

    for ( j = 11; j >= 9 && fcb[ j] == '?'; j--);
    j++;
    for ( i = 9; i < j; i++) {
	if ( fcb[ i] == ' ') break;
		*s++ = fcb[ i];
#ifdef __linux__
		dot=NULL;
#endif
    }
    if ( i == j && i <= 11) *s++ = '*';
#ifdef __linux__
	if (dot) s=dot;
#endif
	*s = '\0';
    return dir;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzbl (%rsi), %eax
cmpl $0x3f, %eax
je 0x8e16
testl %eax, %eax
jne 0x8e1f
movzbl 0xb3f3(%rip), %eax      # 0x14210
jmp 0x8e21
decl %eax
cmpl $0xf, %eax
jle 0x8e2d
xorl %ebx, %ebx
jmp 0x8f4c
movl %eax, %r15d
leaq 0x10b609(%rip), %r12    # 0x114440
cmpq $0x0, (%r12,%r15,8)
jne 0x8e54
cmpw $0x0, 0x10b4d4(%rip)    # 0x11431a
jne 0x8e4d
callq 0x8426
cmpq $0x0, (%r12,%r15,8)
je 0x8e26
movq (%r12,%r15,8), %rsi
movq %rbx, %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x20e0
cltq
addq %rax, %rbx
testl %eax, %eax
je 0x8e85
movzbl -0x1(%rbx), %eax
cmpl $0x2f, %eax
je 0x8e85
cmpl $0x3a, %eax
je 0x8e85
movb $0x2f, (%rbx)
incq %rbx
movl $0x9, %ecx
leal -0x1(%rcx), %eax
cmpb $0x3f, (%r14,%rax)
jne 0x8e9d
decl %ecx
cmpl $0x1, %ecx
ja 0x8e8a
xorl %eax, %eax
leal 0x1(%rax), %ecx
testl %eax, %eax
jle 0x8ec6
movl %eax, %edx
xorl %eax, %eax
movb 0x1(%r14,%rax), %sil
cmpb $0x20, %sil
je 0x8ed0
movb %sil, (%rbx,%rax)
incq %rax
cmpq %rax, %rdx
jne 0x8ea8
addq %rbx, %rax
movl %ecx, %edx
jmp 0x8ed6
movl $0x1, %edx
movq %rbx, %rax
jmp 0x8ed6
leal 0x1(%rax), %edx
addq %rbx, %rax
cmpl %ecx, %edx
setne %cl
cmpl $0x9, %edx
setae %dl
orb %cl, %dl
jne 0x8eeb
movb $0x2a, (%rax)
incq %rax
movb $0x2e, (%rax)
movl $0xc, %ecx
leal -0x1(%rcx), %edi
cmpb $0x3f, (%r14,%rdi)
jne 0x8f09
decl %ecx
cmpl $0x9, %ecx
ja 0x8ef3
movl $0x8, %edi
leal 0x1(%rdi), %edx
leaq 0x1(%rax), %rcx
movl $0x9, %esi
cmpl $0x9, %edi
jl 0x8f24
movb 0x9(%r14), %r8b
cmpb $0x20, %r8b
jne 0x8f5b
movq %rax, %rdi
cmpl %edx, %esi
setne %dl
cmpl $0xc, %esi
setae %sil
orb %dl, %sil
jne 0x8f42
addq $0x2, %rax
movb $0x2a, (%rcx)
movq %rax, %rcx
testq %rdi, %rdi
cmovneq %rdi, %rcx
movb $0x0, (%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %edi, %edi
movl $0x9, %esi
movq %rcx, %rax
movb %r8b, (%rcx)
incq %rcx
cmpq %rsi, %rdi
je 0x8f86
movb 0x1(%r14,%rsi), %r8b
incq %rsi
cmpb $0x20, %r8b
jne 0x8f62
leaq 0x1(%rax), %rcx
xorl %edi, %edi
jmp 0x8f27
xorl %edi, %edi
movl %edx, %esi
jmp 0x8f27
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: FindNextFile
int FindNextFile(
    DIR *hFndFile,				    	// handle to search  
    WIN32_FIND_DATA *lpFindFileData) 	// pointer to structure for data on found file  
{
    struct dirent *pDirent;
    struct stat statbuf;
	if (hFndFile==INVALID_HANDLE_VALUE)
		return 0;
    while ((pDirent = readdir(hFndFile)) != NULL) {
       	strncpy(lpFindFileData->cFileName, pDirent->d_name, _MAX_PATH-1);
		if (fnmatch(ffName, CharUpperX(pDirent->d_name), FNM_CASEFOLD)==0) {
			if (stat(buildname(ffDir,lpFindFileData->cFileName), &statbuf)!=0) { 
				DEBUGOUT(stderr, "FindNext ERROR: failed while stat file `%s`\n",lpFindFileData->cFileName);
				break;
			}
			if (!(statbuf.st_mode & S_IFDIR)) {
				lpFindFileData->cAlternateFileName[0]=0;
				lpFindFileData->dwFileAttributes=(*(lpFindFileData->cFileName)=='.' ? FILE_ATTRIBUTE_HIDDEN : 0);	
				lpFindFileData->nFileSizeHigh=0;
				lpFindFileData->nFileSizeLow=(DWORD)statbuf.st_size;
				return 1;
			}
		}
    }
//    if (hFndFile!=INVALID_HANDLE_VALUE) closedir(hFndFile);
//    hFindFile=INVALID_HANDLE_VALUE;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x92ed
movq %rsi, %r14
movq %rdi, %r12
callq 0x2280
testq %rax, %rax
je 0x92ed
movq %rax, %rbx
movq %r14, (%rsp)
leaq 0x18(%r14), %r15
leaq 0x10ce00(%rip), %r13    # 0x116000
leaq 0x13(%rbx), %rbp
movl $0x103, %edx            # imm = 0x103
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2070
movb 0x13(%rbx), %r14b
testb %r14b, %r14b
je 0x923e
callq 0x2030
addq $0x14, %rbx
movq (%rax), %rcx
movsbq %r14b, %rdx
movb (%rcx,%rdx,4), %cl
movb %cl, -0x1(%rbx)
movb (%rbx), %r14b
incq %rbx
testb %r14b, %r14b
jne 0x9226
movq %r13, %rdi
movq %rbp, %rsi
movl $0x10, %edx
callq 0x2140
testl %eax, %eax
jne 0x9279
leaq 0x10cc97(%rip), %rdi    # 0x115ef0
movq %r15, %rsi
callq 0x85e1
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2240
testl %eax, %eax
jne 0x9291
testb $0x40, 0x21(%rsp)
je 0x92be
movq %r12, %rdi
callq 0x2280
movq %rax, %rbx
testq %rax, %rax
jne 0x9200
xorl %ebp, %ebp
jmp 0x92ed
cmpl $0x0, 0x10b07c(%rip)    # 0x114314
movl $0x0, %ebp
je 0x92ed
movq 0xad52(%rip), %rax      # 0x13ff8
movq (%rax), %rdi
leaq 0x7b45(%rip), %rsi      # 0x10df5
xorl %ebp, %ebp
movq %r15, %rdx
xorl %eax, %eax
callq 0x2210
jmp 0x92ed
movq (%rsp), %rcx
movb $0x0, 0x11c(%rcx)
xorl %eax, %eax
cmpb $0x2e, 0x18(%rcx)
sete %al
addl %eax, %eax
movq %rax, (%rcx)
movq $0x0, 0x8(%rcx)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rcx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: FindClose
int FindClose(
    DIR *hFndFile 					// file search handle 
   )
{
	int res;
	if (hFndFile && (hFndFile!=INVALID_HANDLE_VALUE)) {
		res=closedir(hFndFile);
		hFindFile=INVALID_HANDLE_VALUE;
		return res==0;
	}
	return TRUE;
}

// Assembly:
testq %rdi, %rdi
je 0x9325
pushq %rax
callq 0x21a0
movl %eax, %ecx
movq $0x0, 0x10cbc7(%rip) # 0x115ee0
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x8, %rsp
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: GetDiskFreeSpace
int GetDiskFreeSpace(
    char* lpRootPathName,			// address of root path 
    DWORD *lpSectorsPerCluster,		// address of sectors per cluster 
    DWORD *lpBytesPerSector,		// address of bytes per sector 
    DWORD *lpNumberOfFreeClusters,	// address of number of free clusters  
    DWORD *lpTotalNumberOfClusters 	// address of total number of clusters  
   )	
{ 
  struct statvfs stat;
  if (statvfs(lpRootPathName, &stat) != 0) {
    // error happens, just quits here
    return 0;
  }
  *lpTotalNumberOfClusters=stat.f_blocks;
  *lpNumberOfFreeClusters=stat.f_bavail;
  *lpBytesPerSector=stat.f_bsize;
  *lpSectorsPerCluster=stat.f_frsize/stat.f_bsize;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r8, %r12
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x22e0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x937f
movq 0x18(%rsp), %rax
movq %rax, (%r12)
movq 0x28(%rsp), %rax
movq %rax, (%r15)
movq 0x8(%rsp), %rcx
movq %rcx, (%r14)
movq 0x10(%rsp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, (%rbx)
movl $0x1, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_findnext
byte cpm_findnext( void)
{
    WIN32_FIND_DATA aFindData;
    char *p;
    struct FCB *fcb = (struct FCB *)(mem + cpm_dma_addr);

    if ( hFindFile == INVALID_HANDLE_VALUE) return 0xff;

    while ( FindNextFile( hFindFile, &aFindData)) {
	p = aFindData.cAlternateFileName;
	if ( !*p) p = aFindData.cFileName;
	if (( aFindData.dwFileAttributes & 
		(FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_HIDDEN)) == 0) {
	    DWORD l = aFindData.nFileSizeLow;
	    if ( aFindData.nFileSizeHigh || l > 0x7fff80) l = 0x7fff80;
	    l = (l + 0x7f) >> 7;
	    fcb->ex = (byte)(l >> 7);
	    fcb->rc = (byte)(l & 0x7f);
	    mkFCB( mem + cpm_dma_addr, p);
	    return 0;
	}
    }
    FindClose( hFindFile); 
    hFindFile = INVALID_HANDLE_VALUE;
    return 0xff;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movb $-0x1, %bl
cmpq $0x0, 0x10cb3d(%rip)    # 0x115ee0
je 0x9463
movq 0xae48(%rip), %r15      # 0x141f8
movzwl 0xae5a(%rip), %r12d     # 0x14212
leaq 0x8(%rsp), %r14
movq 0x10cb1c(%rip), %rdi    # 0x115ee0
movq %r14, %rsi
callq 0x91be
testl %eax, %eax
je 0x943c
movzwl 0x8(%rsp), %eax
testl $0x4002, %eax           # imm = 0x4002
jne 0x93bd
leaq 0x124(%rsp), %rsi
cmpb $0x0, (%rsi)
leaq 0x20(%rsp), %rax
cmoveq %rax, %rsi
movq -0x8(%rax), %rcx
movl $0x7fff80, %edx         # imm = 0x7FFF80
cmpq %rdx, %rcx
cmovbq %rcx, %rdx
addl $0x7f, %edx
shrl $0x7, %edx
cmpq $0x0, -0x10(%rax)
movl $0xffff, %eax           # imm = 0xFFFF
cmoveq %rdx, %rax
movl %eax, %ecx
shrl $0x7, %ecx
movb %cl, 0xc(%r15,%r12)
andb $0x7f, %al
movb %al, 0xf(%r15,%r12)
movzwl 0xade6(%rip), %edi      # 0x14212
addq 0xadc5(%rip), %rdi      # 0x141f8
callq 0x8d72
xorl %ebx, %ebx
jmp 0x9463
movq 0x10ca9d(%rip), %rdi    # 0x115ee0
testq %rdi, %rdi
je 0x9458
callq 0x21a0
movq $0x0, 0x10ca88(%rip) # 0x115ee0
movq $0x0, 0x10ca7d(%rip) # 0x115ee0
movl %ebx, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_findfirst
byte cpm_findfirst( byte *fcbaddr)
{
    WIN32_FIND_DATA aFindData;
    char *p;
    struct FCB *fcb = (struct FCB *)(mem + cpm_dma_addr);
    DWORD l;

    if ( hFindFile != INVALID_HANDLE_VALUE) FindClose( hFindFile);

    if ( !mk_filename( filename, fcbaddr)) return 0xff;

    hFindFile = FindFirstFile( filename, &aFindData);
    if ( hFindFile == INVALID_HANDLE_VALUE) return 0xff;

    p = aFindData.cAlternateFileName;
    if ( !*p) p = aFindData.cFileName;
    if ( aFindData.dwFileAttributes & 
	 (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_HIDDEN)) {
		return cpm_findnext();
    }

    l = aFindData.nFileSizeLow;
    if ( aFindData.nFileSizeHigh || l > 0x7fff80) l = 0x7fff80;
    l = (l + 0x7f) >> 7;
    fcb->ex = (byte)(l >> 7);
    fcb->rc = (byte)(l & 0x7f);
    mkFCB( mem + cpm_dma_addr, p);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movq %rdi, %rbx
movq 0xad6e(%rip), %r14      # 0x141f8
movzwl 0xad80(%rip), %r15d     # 0x14212
movq 0x10ca47(%rip), %rdi    # 0x115ee0
testq %rdi, %rdi
je 0x94ae
callq 0x21a0
movq $0x0, 0x10ca32(%rip) # 0x115ee0
leaq 0x10c62b(%rip), %rdi    # 0x115ae0
movq %rbx, %rsi
callq 0x8dfc
movb $-0x1, %bl
testq %rax, %rax
je 0x9555
leaq 0x10c611(%rip), %rdi    # 0x115ae0
movq %rsp, %rsi
callq 0x8f8c
movq %rax, 0x10ca02(%rip)    # 0x115ee0
testq %rax, %rax
je 0x9555
movzwl (%rsp), %eax
testl $0x4002, %eax           # imm = 0x4002
je 0x94f7
callq 0x938b
movl %eax, %ebx
jmp 0x9555
leaq 0x11c(%rsp), %rsi
cmpb $0x0, (%rsi)
leaq 0x18(%rsp), %rax
cmoveq %rax, %rsi
movq -0x8(%rax), %rcx
movl $0x7fff80, %edx         # imm = 0x7FFF80
cmpq %rdx, %rcx
cmovbq %rcx, %rdx
addl $0x7f, %edx
shrl $0x7, %edx
cmpq $0x0, -0x10(%rax)
movl $0xffff, %eax           # imm = 0xFFFF
cmoveq %rdx, %rax
movl %eax, %ecx
shrl $0x7, %ecx
movb %cl, 0xc(%r14,%r15)
andb $0x7f, %al
movb %al, 0xf(%r14,%r15)
movzwl 0xaccb(%rip), %edi      # 0x14212
addq 0xacaa(%rip), %rdi      # 0x141f8
callq 0x8d72
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_file_close
byte cpm_file_close( byte *fcbaddr)
{
    int i;
    struct FCB *fcb = (struct FCB *)fcbaddr;

	if (( i = fcb->d[ 0]) > 0 && --i < MAXFCB) {
DEBUGOUT( stderr, "CLOSE %d - ", i);
	    if ( fcbs[ i].fp) fclose( fcbs[ i].fp);
	    fcbs[ i].fp = 0;
	    fcb->d[ 0] = 0;
	    return 0;
	}
	if ( i == 0) return 0;
	return 0xff;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movzbl 0x10(%rdi), %ebp
xorl %eax, %eax
movl $0x0, %ecx
testl %ebp, %ebp
je 0x9854
movl %ebp, %ecx
decl %ebp
cmpb $0x40, %cl
ja 0x9852
movq %rdi, %rbx
cmpl $0x0, 0x10aaf2(%rip)    # 0x114314
jne 0x985d
movl %ebp, %eax
shlq $0x5, %rax
leaq 0x10c8df(%rip), %rcx    # 0x116110
leaq (%rcx,%rax), %r14
movq (%rax,%rcx), %rdi
testq %rdi, %rdi
je 0x9843
callq 0x20c0
movq $0x0, (%r14)
movb $0x0, 0x10(%rbx)
xorl %eax, %eax
jmp 0x9858
movl %ebp, %ecx
negl %ecx
sbbl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0xa794(%rip), %rax      # 0x13ff8
movq (%rax), %rdi
leaq 0x75c9(%rip), %rsi      # 0x10e37
movl %ebp, %edx
xorl %eax, %eax
callq 0x2210
jmp 0x9824
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_change_filesize
void cpm_change_filesize( byte *fcbaddr)
{
    int i, sz;
    struct FCB *fcb = (struct FCB *)fcbaddr;

    sz = (fcb->d[ 3] << 16) + (fcb->d[2] << 8) + fcb->d[1];
    if (( sz >> 7) == fcb->ex && (sz & 0x7f) > fcb->rc &&
	 mk_filename( filename, fcbaddr) &&
	 ( i = open( filename, O_RDWR)) != -1) {
		chsize( i, (( fcb->ex << 7) + fcb->rc) << 7);
		close( i);
DEBUGOUT( stderr, "Change file size : %s\n", filename);
    }
}

// Assembly:
movzbl 0x13(%rdi), %eax
shll $0x10, %eax
movzbl 0x12(%rdi), %ecx
shll $0x8, %ecx
orl %eax, %ecx
movzbl 0x11(%rdi), %eax
orl %eax, %ecx
shrl $0x7, %ecx
movzbl 0xc(%rdi), %edx
cmpl %edx, %ecx
jne 0x9907
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
andl $0x7f, %eax
movzbl 0xf(%rdi), %ecx
cmpl %ecx, %eax
jbe 0x9901
leaq 0x10c22e(%rip), %rdi    # 0x115ae0
movq %rbx, %rsi
callq 0x8dfc
testq %rax, %rax
je 0x9901
leaq 0x10c21a(%rip), %rdi    # 0x115ae0
movl $0x2, %esi
xorl %eax, %eax
callq 0x2320
cmpl $-0x1, %eax
je 0x9901
movl %eax, %ebp
movzbl 0xc(%rbx), %eax
movzbl 0xf(%rbx), %esi
shll $0xe, %eax
shll $0x7, %esi
addq %rax, %rsi
movl %ebp, %edi
callq 0x2120
movl %ebp, %edi
callq 0x2190
cmpl $0x0, 0x10aa15(%rip)    # 0x114314
jne 0x9908
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x23e0
jmp 0x9901
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_file_size
byte cpm_file_size( byte *fcbaddr)
{
    struct FCB *fcb = (struct FCB *)fcbaddr;
    DWORD d;

    if ( cpm_file_open( fcbaddr, CF_OPEN)) return 0xff;
    d = fcb->d[1] + (fcb->d[2] << 8) + (fcb->d[3] << 16);
    fcb->r0 = (byte)d;
    fcb->r1 = (byte)(d >> 8); 
    fcb->r2 = (byte)(d >> 16);
    cpm_file_close( fcbaddr);

    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x9564
movl %eax, %ecx
movb $-0x1, %al
testb %cl, %cl
jne 0x9c6c
movzwl 0x11(%rbx), %eax
movb 0x13(%rbx), %cl
movw %ax, 0x21(%rbx)
movb %cl, 0x23(%rbx)
movq %rbx, %rdi
callq 0x97fc
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_file_delete
byte cpm_file_delete( byte *fcbaddr)
{
    struct FCB *fcb = (struct FCB *)fcbaddr;
    int i;
    HANDLE hFndFile;
    WIN32_FIND_DATA aFindData;
    char *fname;
    byte st = 0xff;

    if ( memcmp( fcbaddr, "\1$$$     SUB", 1+8+3) == 0) abort_submit = TRUE;

    if (( i = fcb->d[ 0]) > 0 && --i < MAXFCB && 
		fcbs[ i].addr == fcbaddr && fcbs[ i].fp) {
DEBUGOUT( stderr, "REUSE %d - ", i);
	fclose( fcbs[ i].fp); fcbs[ i].fp = NULL;
    }

    if (( fname = mk_filename( filename, fcbaddr)) == NULL) return 0xff;
    hFndFile = FindFirstFile( filename, &aFindData);
    if ( hFndFile == INVALID_HANDLE_VALUE) return 0xff;
    do {
	char *p = aFindData.cAlternateFileName;
	if ( !*p) p = aFindData.cFileName;
	if ( *p != '.') {
	    strcpy( fname, p);
	    if ( remove( filename) == 0) st = 0;
	}
    } while( FindNextFile( hFndFile, &aFindData));
    FindClose( hFndFile);

    return st;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdi, %rbx
movabsq $0x2020202024242401, %rax # imm = 0x2020202024242401
xorq (%rdi), %rax
movl 0x8(%rdi), %ecx
xorq $0x42555320, %rcx       # imm = 0x42555320
orq %rax, %rcx
jne 0x9ca8
movl $0x1, 0x10cc68(%rip)    # 0x116910
movzbl 0x10(%rbx), %edx
testl %edx, %edx
je 0x9cf0
cmpb $0x40, %dl
ja 0x9cf0
decl %edx
movl %edx, %eax
shlq $0x5, %rax
leaq 0x10c44c(%rip), %r14    # 0x116110
cmpq %rbx, 0x10(%rax,%r14)
jne 0x9cf0
addq %rax, %r14
cmpq $0x0, (%r14)
je 0x9cf0
cmpl $0x0, 0x10a639(%rip)    # 0x114314
jne 0x9da0
movq (%r14), %rdi
callq 0x20c0
movq $0x0, (%r14)
leaq 0x10bde9(%rip), %rdi    # 0x115ae0
movq %rbx, %rsi
callq 0x8dfc
movb $-0x1, %bl
testq %rax, %rax
je 0x9d8c
movq %rax, %r14
leaq 0x10bdcc(%rip), %rdi    # 0x115ae0
leaq 0x8(%rsp), %rsi
callq 0x8f8c
testq %rax, %rax
je 0x9d8c
movq %rax, %r15
leaq 0x124(%rsp), %rbp
movb $-0x1, %bl
leaq 0x20(%rsp), %r13
leaq 0x8(%rsp), %r12
cmpb $0x0, 0x124(%rsp)
movq %rbp, %rsi
cmoveq %r13, %rsi
cmpb $0x2e, (%rsi)
je 0x9d6a
movq %r14, %rdi
callq 0x2090
leaq 0x10bd83(%rip), %rdi    # 0x115ae0
callq 0x2080
testl %eax, %eax
movzbl %bl, %ebx
cmovel %eax, %ebx
movq %r15, %rdi
movq %r12, %rsi
callq 0x91be
testl %eax, %eax
jne 0x9d3a
movq %r15, %rdi
callq 0x21a0
movq $0x0, 0x10c154(%rip) # 0x115ee0
movl %ebx, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa251(%rip), %rax      # 0x13ff8
movq (%rax), %rdi
leaq 0x70e8(%rip), %rsi      # 0x10e99
xorl %eax, %eax
callq 0x2210
jmp 0x9ce1
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_set_rndrec
byte cpm_set_rndrec( byte *fcbaddr)
{
    struct FCB *fcb = (struct FCB *)fcbaddr;
    unsigned d = (fcb->cr & 0x7f) + (fcb->ex << 7); /* 2012.02 bugfix 8->7 */

    fcb->r0 = (byte)d;
    fcb->r1 = (byte)(d >> 8); 
    fcb->r2 = (byte)(d >> 16);

    return 0;
}

// Assembly:
movb 0xc(%rdi), %al
movb 0x20(%rdi), %cl
andb $0x7f, %cl
movl %eax, %edx
shlb $0x7, %dl
orb %cl, %dl
movb %dl, 0x21(%rdi)
shrb %al
movb %al, 0x22(%rdi)
movb $0x0, 0x23(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: frameup_dpb_alloc
void frameup_dpb_alloc( void)
{
    DWORD spc, bps, free, total;
    DWORD *alloc = (DWORD *)(mem + DMY_ALLOC);
    byte sft;
    int i;

    GetDiskFreeSpace( NULL, &spc, &bps, &free, &total);
    spc *= bps;
    spc >>= 9; sft = 2;
    /* 2008.12 for large disk space (> 2TBytes) */
    while ( spc && (spc & 1) == 0) { spc >>= 1; sft++; }
    free *= spc;
    while ( free > MAXBLK) { free >>= 1; sft++; }
    mem[ DMY_DPB_SFT] = sft;
    *(word *)(mem + DMY_DPB_MSK) = (word)((1 << sft) - 1);

    i = 0;
    while ( free >= 32) {
        free -= 32; alloc[ i++] = 0;
    }
    alloc[ i++] = ~0 << free;
    while ( i < MAXBLK/32) alloc[ i++] = ~0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq 0xa3b9(%rip), %r15      # 0x141f8
xorl %ebx, %ebx
movq %rsp, %rsi
xorl %edi, %edi
callq 0x22e0
testl %eax, %eax
jne 0x9e69
movq 0x8(%rsp), %rbx
movq 0x20(%rsp), %rsi
movq %rbx, %rax
xorl %edx, %edx
divq (%rsp)
subq %rdx, %rbx
shrq $0x9, %rbx
testq %rbx, %rbx
sete %al
movb $0x2, %cl
movl %ebx, %edx
orb %al, %dl
testb $0x1, %dl
jne 0x9e91
movq %rbx, %rax
shrq %rax
incb %cl
testq %rbx, %rbx
je 0x9e94
andl $0x2, %ebx
movq %rax, %rbx
je 0x9e7d
jmp 0x9e94
movq %rbx, %rax
imulq %rsi, %rax
cmpq $0x401, %rax            # imm = 0x401
jb 0x9eb5
movq %rax, %rbx
shrq %rbx
incb %cl
cmpq $0x801, %rax            # imm = 0x801
movq %rbx, %rax
ja 0x9ea3
jmp 0x9eb8
movq %rax, %rbx
leaq 0xff20(%r15), %r14
movq 0xa332(%rip), %rax      # 0x141f8
movb %cl, 0xff12(%rax)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
notl %edx
movw %dx, 0xff13(%rax)
xorl %r12d, %r12d
cmpq $0x20, %rbx
jb 0x9f17
addq $-0x20, %rbx
movq %rbx, %r12
shrq $0x5, %r12
leaq 0x8(,%r12,8), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2150
leaq 0x1(%r12), %rax
andl $0x1f, %ebx
decq %rax
jne 0x9f0f
incl %r12d
movl %ebx, %ecx
shll %cl, %ebp
movslq %ebp, %rcx
movl %r12d, %eax
movq %rcx, (%r14,%rax,8)
cmpl $0x1e, %r12d
ja 0x9f5c
leaq (%r15,%rax,8), %rdi
addq $0xff28, %rdi           # imm = 0xFF28
movl $0x1e, %eax
subl %r12d, %eax
leaq 0x8(,%rax,8), %rdx
movl $0xff, %esi
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2150
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_gettime
byte cpm_gettime( byte *buf, time_t t)
{
    int d;
    static time_t time780101;

    if ( time780101 == 0) {
 	struct tm tm;
	memset( &tm, 0, sizeof tm);
	tm.tm_year = 78;
	tm.tm_mon =   0;
	tm.tm_mday =  1;
	time780101 = mktime( &tm);
    }

    t -= time780101;
    d = t % 60; t /= 60;
    buf[ 4] = (byte)((d % 10) + ((d / 10) << 4));
    d = t % 60; t /= 60;
    buf[ 3] = (byte)((d % 10) + ((d / 10) << 4));
    d = t % 24; t /= 24;
    buf[ 2] = (byte)((d % 10) + ((d / 10) << 4));
    d = t + 1;
    buf[ 0] = (byte)d;
    buf[ 1] = (byte)(d >> 8);

    return buf[ 4];
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x10c99a(%rip)    # 0x116918
jne 0x9fba
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movaps %xmm0, 0x20(%rdi)
movq $0x0, 0x30(%rdi)
movabsq $0x4e00000000, %rax     # imm = 0x4E00000000
movq %rax, 0x10(%rdi)
movl $0x1, 0xc(%rdi)
callq 0x22c0
movq %rax, 0x10c95e(%rip)    # 0x116918
subq 0x10c957(%rip), %r14    # 0x116918
movabsq $-0x7777777777777777, %rdi # imm = 0x8888888888888889
movq %r14, %rax
imulq %rdi
movq %rdx, %rsi
addq %r14, %rsi
movq %rsi, %rax
shrq $0x3f, %rax
sarq $0x5, %rsi
addq %rax, %rsi
imulq $0x3c, %rsi, %rax
movq %r14, %rcx
subq %rax, %rcx
movslq %ecx, %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
leal (%rcx,%rcx), %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %eax
shll $0x4, %ecx
addl %eax, %ecx
movb %cl, 0x4(%rbx)
movq %rsi, %rax
imulq %rdi
addq %rsi, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x5, %rdx
addq %rax, %rdx
imulq $0x3c, %rdx, %rax
subq %rax, %rsi
movabsq $0x48d159e26af37c05, %rdx # imm = 0x48D159E26AF37C05
movq %r14, %rax
imulq %rdx
movq %rdx, %rdi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xa, %rdi
addq %rax, %rdi
movslq %esi, %rax
imulq $0x66666667, %rax, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
leal (%rdx,%rdx), %esi
leal (%rsi,%rsi,4), %esi
subl %esi, %eax
shll $0x4, %edx
addl %eax, %edx
movb %dl, 0x3(%rbx)
movabsq $0x2aaaaaaaaaaaaaab, %rdx # imm = 0x2AAAAAAAAAAAAAAB
movq %rdi, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x2, %rdx
addq %rax, %rdx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rax
subq %rax, %rdi
movabsq $0x1845c8a0ce512957, %rdx # imm = 0x1845C8A0CE512957
movq %r14, %rax
imulq %rdx
movq %rdx, %rax
shrq $0xd, %rax
shrq $0x3f, %rdx
movslq %edi, %rsi
imulq $0x66666667, %rsi, %rdi # imm = 0x66666667
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x22, %rdi
addl %r8d, %edi
leal (%rdi,%rdi), %r8d
leal (%r8,%r8,4), %r8d
subl %r8d, %esi
shll $0x4, %edi
addl %esi, %edi
movb %dil, 0x2(%rbx)
addl %edx, %eax
incl %eax
movb %al, (%rbx)
movb %ah, 0x1(%rbx)
movl %ecx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_disk_reset
byte cpm_disk_reset( void)
{
    HANDLE hFndFile;
    WIN32_FIND_DATA aFindData;

    cpm_disk_no = 0;
    cpm_dma_addr = 0x80;

    sprintf( filename, "%s|*.*", cpm_drive[ cpm_disk_no]);
    hFndFile = FindFirstFile( filename, &aFindData);
    if ( hFndFile == INVALID_HANDLE_VALUE) return 0;
    FindClose( hFndFile);
    return 0xff;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movb $0x0, 0xa100(%rip)      # 0x14210
movw $0x80, 0xa0f9(%rip)     # 0x14212
movq 0x10a320(%rip), %rdx    # 0x114440
leaq 0x10b9b9(%rip), %r14    # 0x115ae0
leaq 0x6d77(%rip), %rsi      # 0x10ea5
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2390
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x8f8c
testq %rax, %rax
je 0xa161
movq %rax, %rdi
callq 0x21a0
movq $0x0, 0x10bd81(%rip) # 0x115ee0
movb $-0x1, %bl
movl %ebx, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_lst_out
void cpm_lst_out( byte c)	/* LST: out */
{
    static int err;

    if ( lstfp == NULL && !err) {
	char *dev = getenv( "CPMLST");
	err = ( lstfp = fopen( dev ? dev : "PRN:", "wb")) == NULL;
    }
    if ( lstfp) putc( c, lstfp);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
cmpq $0x0, 0x10c7af(%rip)    # 0x116928
jne 0xa1bf
cmpl $0x0, 0x10c79e(%rip)    # 0x116920
jne 0xa1bf
leaq 0x6d21(%rip), %rdi      # 0x10eac
callq 0x2040
testq %rax, %rax
leaq 0x6d19(%rip), %rdi      # 0x10eb3
cmovneq %rax, %rdi
leaq 0x6d13(%rip), %rsi      # 0x10eb8
callq 0x2340
movq %rax, 0x10c777(%rip)    # 0x116928
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
movl %ecx, 0x10c761(%rip)    # 0x116920
movq 0x10c762(%rip), %rsi    # 0x116928
testq %rsi, %rsi
je 0xa1d4
movzbl %bl, %edi
popq %rbx
jmp 0x21f0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_rdr_in
byte cpm_rdr_in( void)		/* RDR: in */
{
    static int err;
    char *dev;
    int c, ct = 16;

    if ( rdrfp == NULL && !err) {
	if (( dev = getenv( "CPMRDR")) != NULL) {
	    err = ( rdrfp = fopen( dev, "r+b")) == NULL;
	} else if ( punfp) {
	    rdrfp = punfp;
	} else {
	    dev = getenv( "CPMAUX");
	    err = ( rdrfp = fopen( dev ? dev : "AUX:", "r+b")) == NULL;
	}
    }
    if ( rdrfp && ( c = getc( rdrfp)) != EOF) return (byte)c;
    if ( --ct == 0) exit( 0);
    return '\x1a';
}

// Assembly:
pushq %rax
cmpq $0x0, 0x10c759(%rip)    # 0x116938
jne 0xa234
cmpl $0x0, 0x10c748(%rip)    # 0x116930
jne 0xa234
leaq 0x6cca(%rip), %rdi      # 0x10ebb
callq 0x2040
testq %rax, %rax
je 0xa221
leaq 0x6c31(%rip), %rsi      # 0x10e33
movq %rax, %rdi
callq 0x2340
movq %rax, 0x10c727(%rip)    # 0x116938
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
movl %ecx, 0x10c711(%rip)    # 0x116930
jmp 0xa234
movq 0x10c718(%rip), %rax    # 0x116940
testq %rax, %rax
je 0xa258
movq %rax, 0x10c704(%rip)    # 0x116938
movq 0x10c6fd(%rip), %rdi    # 0x116938
testq %rdi, %rdi
je 0xa254
callq 0x23c0
movl %eax, %ecx
cmpl $-0x1, %eax
movl $0x1a, %eax
cmovnel %ecx, %eax
jmp 0xa256
movb $0x1a, %al
popq %rcx
retq
leaq 0x6c63(%rip), %rdi      # 0x10ec2
callq 0x2040
testq %rax, %rax
leaq 0x6c5b(%rip), %rdi      # 0x10ec9
cmovneq %rax, %rdi
leaq 0x6bba(%rip), %rsi      # 0x10e33
jmp 0xa205
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_pun_out
void cpm_pun_out( byte c)	/* PUN: out */
{
    static int err;
    char *dev;

    if ( punfp == NULL && !err) {
	if (( dev = getenv( "CPMPUN")) != NULL) {
	    err = ( punfp = fopen( dev, "r+b")) == NULL;
	} else if ( rdrfp) {
	    punfp = rdrfp;
	} else {
	    dev = getenv( "CPMAUX");
	    err = ( punfp = fopen( dev ? dev : "AUX:", "r+b")) == NULL;
	}
    }
    if ( punfp) putc( c, punfp);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
cmpq $0x0, 0x10c6ba(%rip)    # 0x116940
jne 0xa2db
cmpl $0x0, 0x10c6b9(%rip)    # 0x116948
jne 0xa2db
leaq 0x6c36(%rip), %rdi      # 0x10ece
callq 0x2040
testq %rax, %rax
je 0xa2c8
leaq 0x6b8a(%rip), %rsi      # 0x10e33
movq %rax, %rdi
callq 0x2340
movq %rax, 0x10c688(%rip)    # 0x116940
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
movl %ecx, 0x10c682(%rip)    # 0x116948
jmp 0xa2db
movq 0x10c669(%rip), %rax    # 0x116938
testq %rax, %rax
je 0xa2f2
movq %rax, 0x10c665(%rip)    # 0x116940
movq 0x10c65e(%rip), %rsi    # 0x116940
testq %rsi, %rsi
je 0xa2f0
movzbl %bl, %edi
popq %rbx
jmp 0x21f0
popq %rbx
retq
leaq 0x6bc9(%rip), %rdi      # 0x10ec2
callq 0x2040
testq %rax, %rax
leaq 0x6bc1(%rip), %rdi      # 0x10ec9
cmovneq %rax, %rdi
leaq 0x6b20(%rip), %rsi      # 0x10e33
jmp 0xa2ac
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpull
int cpull()					/* FIFO imitation */
{
        int res=xgch;
        xgch=xgch2;
        xgch2=xgch3;
        xgch3=CON_BUF_EMPTY;
        return res;
}

// Assembly:
movl 0x9ede(%rip), %eax      # 0x14234
movl 0x9edc(%rip), %ecx      # 0x14238
movl %ecx, 0x9ed2(%rip)      # 0x14234
movl 0x9ed4(%rip), %ecx      # 0x1423c
movl %ecx, 0x9eca(%rip)      # 0x14238
movl $0xffffffff, 0x9ec4(%rip) # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: getCursorPosition
void getCursorPosition(int *row, int *col) {
	fflush(0);
    printf("\x1b[6n");
    char buff[128];
    int indx = 0;
    for(;;) {
        int cc = getchar();
        buff[indx] = (char)cc;
        indx++;
        if(cc == 'R') {
            buff[indx + 1] = '\0';
            break;
        }
    }    
    sscanf(buff, "\x1b[%d;%dR", row, col);
    fseek(stdin, 0, SEEK_END);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
callq 0x22a0
leaq 0x6b3c(%rip), %rdi      # 0x10ed5
xorl %eax, %eax
callq 0x2100
movl $0x1, %r15d
callq 0x2200
movb %al, -0x1(%rsp,%r15)
incq %r15
cmpl $0x52, %eax
jne 0xa3a6
movl %r15d, %eax
movb $0x0, (%rsp,%rax)
leaq 0x6b14(%rip), %rsi      # 0x10eda
movq %rsp, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x22b0
movq 0x9bfb(%rip), %rax      # 0x13fd8
movq (%rax), %rdi
xorl %esi, %esi
movl $0x2, %edx
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x22d0
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: w32_gotodxy
void w32_gotodxy( int dx, int dy)
{
#ifdef __linux__
	int x,y,sx=80,sy=24;
#ifdef TIOCGSIZE
    struct ttysize ts;
    ioctl(STDIN_FILENO, TIOCGSIZE, &ts);
    sx = ts.ts_cols;
    sy = ts.ts_lines;
#elif defined(TIOCGWINSZ)
    struct winsize ts;
    ioctl(STDIN_FILENO, TIOCGWINSZ, &ts);
    sx = ts.ws_col;
    sy = ts.ws_row;
#endif /* TIOCGSIZE */
	getCursorPosition(&y,&x);
	dx+=x;
	dy+=y;
    if ( dx >= sx) dx = sx - 1;
    else if ( dx < 0) dx = 0;
    if ( dy >= sy) dy = sy - 1;
    else if ( dy < 0) dy = 0;
	moveTo((short)dy,(short)dx);
	fflush(stdout);
#else
    CONSOLE_SCREEN_BUFFER_INFO csbi;
    GetConsoleScreenBufferInfo( hConOut, &csbi);
    dx += csbi.dwCursorPosition.X;
    dy += csbi.dwCursorPosition.Y;
    if ( dx >= csbi.dwSize.X) dx = csbi.dwSize.X - 1;
    else if ( dx < 0) dx = 0;
    if ( dy >= csbi.dwSize.Y) dy = csbi.dwSize.Y - 1;
    else if ( dy < 0) dy = 0;
    csbi.dwCursorPosition.X = (short)dx;
    csbi.dwCursorPosition.Y = (short)dy;
    SetConsoleCursorPosition( hConOut, csbi.dwCursorPosition);
#endif	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0x10(%rsp), %r14
movl $0x5413, %esi           # imm = 0x5413
xorl %edi, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2160
movzwl 0x2(%r14), %r12d
movzwl (%r14), %r13d
leaq 0x8(%rsp), %r14
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xa379
addl (%r15), %ebp
addl (%r14), %ebx
leal -0x1(%r12), %eax
testl %ebp, %ebp
movl $0x0, %ecx
cmovgl %ebp, %ecx
cmpl %r12d, %ebp
cmovgel %eax, %ecx
leal -0x1(%r13), %eax
testl %ebx, %ebx
movl $0x0, %edx
cmovgl %ebx, %edx
cmpl %r13d, %ebx
cmovgel %eax, %edx
movswl %dx, %esi
movswl %cx, %edx
leaq 0x6f39(%rip), %rdi      # 0x113b3
xorl %eax, %eax
callq 0x2100
movq 0x9b48(%rip), %rax      # 0x13fd0
movq (%rax), %rdi
callq 0x22a0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_const
byte cpm_const( void)
{
#ifdef __linux__
	if (kbhit()) 
		return 0xff;
	else
		return 0;
#else
		DWORD t;
    static DWORD t0, ct;

    if ( conin  ? kbhit() 
		: WaitForSingleObject( hStdIn, 0) != WAIT_TIMEOUT) {
	return 0xff;
    }
    if ( kbwait) {
	t = GetTickCount();
	if ( t != t0) ct = (( t - t0) * 4) >> kbwait;
	if ( ct == 0) Sleep( 1 << (kbwait - 1));
	else --ct;
	t0 = t;
    }
    return 0;
#endif
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movq $0x1, (%rsi)
xorl %ebx, %ebx
movl $0x1, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2270
negl %eax
sbbl %ebx, %ebx
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/serge-404[P]CPM32/cpm.c
// Function: cpm_gets
byte cpm_gets( byte *buf)
{
    int i;
	reset_terminal_mode();
	if ( fgets((char *)buf + 2, buf[ 0], stdin) == NULL) {
		set_conio_terminal_mode();
		if ( --eofcount == 0) {
			cpm_conio_restore();
			exit( 0);
		}
		strcpy((char *)buf + 2, "\x1a\n");
    }
	set_conio_terminal_mode();
    i = strlen((char *)buf + 2);
    if (i > 0) i--;
    buf[ 2 + i] = '\r'; buf[ 1] = (byte)i;
    if ( conout && conin) w32_up();
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9953(%rip), %rdx      # 0x14260
xorl %edi, %edi
xorl %esi, %esi
callq 0x2310
leaq 0x2(%rbx), %r14
movzbl (%rbx), %esi
movq 0x96b4(%rip), %rax      # 0x13fd8
movq (%rax), %rdx
movq %r14, %rdi
callq 0x21d0
testq %rax, %rax
jne 0xa94c
callq 0x2b15
decl 0x98f1(%rip)            # 0x14230
je 0xa9aa
movb $0x0, 0x2(%r14)
movw $0xa1a, (%r14)          # imm = 0xA1A
callq 0x2b15
movq %r14, %rdi
callq 0x20e0
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
subl %ecx, %eax
cltq
movb $0xd, 0x2(%rbx,%rax)
movb %al, 0x1(%rbx)
cmpl $0x0, 0x10bfdd(%rip)    # 0x116950
je 0xa9a0
cmpl $0x0, 0x10bfd8(%rip)    # 0x116954
je 0xa9a0
leaq 0x6a4b(%rip), %rdi      # 0x113d0
movl $0x1, %esi
xorl %eax, %eax
callq 0x2100
movq 0x9638(%rip), %rax      # 0x13fd0
movq (%rax), %rdi
callq 0x22a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xa6dc
xorl %edi, %edi
callq 0x23a0
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/warnp/main.c
// Function: main
int
main(int argc, char * argv[])
{
	const char * extra_message;
	int desired_test;

	WARNP_INIT;

	/* Parse command-line argument. */
	if (argc != 3) {
		fprintf(stderr, "usage: test_warnp STRING NUM\n");
		exit(1);
	}
	extra_message = argv[1];
	if (PARSENUM(&desired_test, argv[2], 1, 2)) {
		warnp("parsenum");
		goto err0;
	}

	/* Run the desired test. */
	switch (desired_test) {
	case 1:
		check_stderr_syslog(extra_message);
		break;
	case 2:
		if (check_multithread())
			goto err0;
		break;
	default:
		warn0("invalid test number");
		goto err0;
	}

	/* Switch to syslog again. */
	warnp_syslog(1);
	warn0("syslog again");

	/* Success! */
	exit(0);

err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x13ac
callq 0x1678
cmpl $0x3, %ebx
jne 0x13e8
movq 0x8(%r14), %r15
callq 0x1070
movl $0x0, (%rax)
movq 0x10(%r14), %r12
testq %r12, %r12
jne 0x140d
leaq 0xc7c(%rip), %rdi       # 0x204c
leaq 0xc7f(%rip), %rsi       # 0x2056
leaq 0xc8e(%rip), %rcx       # 0x206c
movl $0xa7, %edx
callq 0x1090
movq 0x2c09(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xc0b(%rip), %rdi       # 0x2004
movl $0x1d, %esi
movl $0x1, %edx
callq 0x1130
jmp 0x1557
movq %rax, %rbx
movq %rsp, %r14
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1040
movq (%r14), %rdx
movl $0x16, %ecx
cmpq %r12, %rdx
je 0x1446
cmpb $0x0, (%rdx)
jne 0x1446
movq %rax, %rcx
addq $-0x3, %rcx
cmpq $-0x3, %rcx
ja 0x1448
movl $0x22, %ecx
xorl %eax, %eax
movl %ecx, (%rbx)
cmpl $0x0, (%rbx)
jne 0x14b5
cmpl $0x2, %eax
je 0x14c8
cmpl $0x1, %eax
jne 0x152d
movq %r15, %rdi
callq 0x1561
movl $0x1, %edi
callq 0x1918
movq %r15, %rdi
callq 0x1561
xorl %edi, %edi
callq 0x1918
leaq 0xc2e(%rip), %rdi       # 0x20b1
xorl %eax, %eax
callq 0x1817
movl $0x0, (%rbx)
movl $0x1, %edi
callq 0x1918
leaq 0xb9e(%rip), %rdi       # 0x203f
xorl %eax, %eax
callq 0x1817
movl $0x0, (%rbx)
xorl %edi, %edi
callq 0x1120
leaq 0xb66(%rip), %rdi       # 0x2022
xorl %eax, %eax
callq 0x16f8
jmp 0x1551
leaq 0x1c(%rsp), %r12
xorl %ebp, %ebp
leaq 0x157(%rip), %r13       # 0x162d
leaq 0xc09(%rip), %r15       # 0x20e6
movl %ebp, (%r12)
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
callq 0x10f0
testl %eax, %eax
jne 0x153d
incq %rbp
addq $0x8, %r14
addq $0x4, %r12
cmpq $0x3, %rbp
jne 0x14dd
xorl %r14d, %r14d
leaq 0xbe9(%rip), %r15       # 0x20f9
movq (%rsp,%r14,8), %rdi
xorl %esi, %esi
callq 0x1140
testl %eax, %eax
jne 0x153d
incq %r14
cmpq $0x3, %r14
jne 0x1510
jmp 0x1490
leaq 0xaf7(%rip), %rdi       # 0x202b
xorl %eax, %eax
callq 0x1817
jmp 0x1551
movl %eax, %edi
callq 0x1160
movq %r15, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x1817
movl $0x0, (%rbx)
movl $0x1, %edi
callq 0x1120
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/warnp/main.c
// Function: print_stuff
static void
print_stuff(const char * extra_message)
{

	/* Output the nonce word; also warn0 with a formatted message. */
	warn0("begin output, nonce=%s", extra_message);

	/* Output NULL. */
	warn0(NULL);

	/* Do errno=2 first, so that we don't repeat the same message. */
	errno = 2;
	warnp(NULL);
	errno = 0;
	warnp(NULL);

	/* Output messages involving warnp with a formatted message. */
	errno = 0;
	warnp("warnp errno %d", 0);

	errno = 2;
	warnp("warnp errno %d", 2);

	/* Output long message. */
	print_long_message();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdi, %rsi
leaq 0xb48(%rip), %rdi       # 0x20c0
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x1817
callq 0x1070
movq %rax, %rbx
movl %r15d, (%rax)
xorl %edi, %edi
xorl %eax, %eax
callq 0x1817
movl $0x2, %ebp
movl %ebp, (%rbx)
xorl %edi, %edi
xorl %eax, %eax
callq 0x16f8
movl %r15d, (%rbx)
xorl %edi, %edi
xorl %eax, %eax
callq 0x1817
movl %r15d, (%rbx)
leaq 0xb1b(%rip), %r14       # 0x20d7
movq %r14, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1817
movl %ebp, (%rbx)
movq %r14, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x16f8
movl %r15d, (%rbx)
movl $0x1, %eax
movb $0x61, %cl
movabsq $0x5f5f5f5f5f5f5f5f, %rdx # imm = 0x5F5F5F5F5F5F5F5F
movb %cl, -0x1(%rsp,%rax)
movq %rdx, (%rsp,%rax)
movb $0x5f, 0x8(%rsp,%rax)
addq $0xa, %rax
incb %cl
cmpq $0x12d, %rax            # imm = 0x12D
jne 0x15ed
movq %rsp, %rdi
movb $0x0, 0x12c(%rdi)
xorl %eax, %eax
callq 0x1817
movl $0x0, (%rbx)
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/warnp/main.c
// Function: workthread
static void *
workthread(void * cookie)
{
	int num = *((int *)cookie);
	int i;

	/* Output a bunch of messages. */
	for (i = 0; i < 10; i++) {
		errno = ENOENT;
		warnp("thread #%d val %d", num, i);
	}

	/* Success! */
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl (%rdi), %ebx
callq 0x1070
movq %rax, %r14
leaq 0xac5(%rip), %r15       # 0x210a
xorl %ebp, %ebp
movl $0x2, (%r14)
movq %r15, %rdi
movl %ebx, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x16f8
movl $0x0, (%r14)
incl %ebp
cmpl $0xa, %ebp
jne 0x1647
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/naleksiev[P]jread/test/test.c
// Function: handler
void handler(jr_type_t type, const jr_str_t* data, void* user_data) {
    switch (type) {
        case jr_type_error:
            printf("ERROR: '%.*s'\n", data->len, data->cstr);
            exit(1);
        default:
            return;
    }
}

// Assembly:
testl %edi, %edi
je 0x1f1d1
retq
pushq %rax
movl 0x8(%rsi), %eax
movq (%rsi), %rdx
leaq 0xe31(%rip), %rdi       # 0x20010
movl %eax, %esi
xorl %eax, %eax
callq 0x1f070
movl $0x1, %edi
callq 0x1f0c0
// File: /workspace/github_c_makefile_star2_O1/naleksiev[P]jread/test/test.c
// Function: main
int main(int argc, char *argv[]) {
    if (argc != 2)
        return 1;
    FILE* fp = fopen(argv[1], "rb");
    if (!fp)
        return 1;
    fseek(fp, 0, SEEK_END);
    int32_t size = (int32_t)ftell(fp);
    fseek(fp, 0, SEEK_SET);

    char* buffer = (char*)malloc(size + 1);
    if (fread(buffer, 1, size, fp) < size)
        return 1;
    buffer[size] = '\0';
    fclose(fp);
    clock_t start = clock();
    jr_read(&handler, buffer, 0);
    printf("%.4f\n", (double)(clock() - start) / CLOCKS_PER_SEC);
    free(buffer);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %ebx
cmpl $0x2, %edi
jne 0x1f2c8
movq 0x8(%rsi), %rdi
leaq 0xe0c(%rip), %rsi       # 0x2001f
callq 0x1f0b0
testq %rax, %rax
je 0x1f2c8
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1f0a0
movq %r15, %rdi
callq 0x1f080
movq %rax, %r12
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1f0a0
leal 0x1(%r12), %eax
movslq %eax, %rdi
callq 0x1f090
movq %rax, %r14
movslq %r12d, %r12
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x1f040
cmpq %r12, %rax
jb 0x1f2c8
movb $0x0, (%r14,%r12)
movq %r15, %rdi
callq 0x1f060
callq 0x1f050
movq %rax, %rbx
leaq -0xc5(%rip), %rdi       # 0x1f1cc
movq %r14, %rsi
xorl %edx, %edx
callq 0x1f2d8
callq 0x1f050
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0xd58(%rip), %xmm0      # 0x20008
leaq 0xd6b(%rip), %rdi       # 0x20022
movb $0x1, %al
callq 0x1f070
movq %r14, %rdi
callq 0x1f030
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/cond.c
// Function: wait_thread
void *wait_thread(void *arg)
{
	(void)arg;
	sleep(g_hibernation);

	pthread_mutex_lock(&g_data.mutex);
	g_data.value = 1; /* main's predicate */
	pthread_cond_signal(&g_data.cond);
	pthread_mutex_unlock(&g_data.mutex);

	return NULL;
}

// Assembly:
pushq %rbx
movl 0x2ead(%rip), %edi      # 0x4070
callq 0x10a0
leaq 0x2eb1(%rip), %rbx      # 0x4080
movq %rbx, %rdi
callq 0x10b0
movl $0x1, 0x2ef7(%rip)      # 0x40d8
leaq 0x2ec0(%rip), %rdi      # 0x40a8
callq 0x1040
movq %rbx, %rdi
callq 0x1060
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/cond.c
// Function: main
int main(int argc, const char **argv)
{
	pthread_t wait_thread_id;
	struct timespec timeout = {0};

	if (argc > 1)
		g_hibernation = atoi(argv[1]);

	pthread_create(&wait_thread_id, NULL, wait_thread, NULL);

	/* if g_hibernation > 2 this will time out */
	timeout.tv_sec = time(NULL)+2;

	pthread_mutex_lock(&g_data.mutex);
	while (g_data.value == 0)
	{
		int status = pthread_cond_timedwait(
			&g_data.cond, &g_data.mutex, &timeout);
		if (status == ETIMEDOUT)
		{
			puts("Condition var timeout");
			break;
		}
	}
	if (g_data.value != 0)
		puts("Condition var got signaled");
	pthread_mutex_unlock(&g_data.mutex);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
cmpl $0x2, %edi
jl 0x1220
movq 0x8(%rsi), %rdi
callq 0x1090
movl %eax, 0x2e50(%rip)      # 0x4070
leaq -0x6b(%rip), %rdx       # 0x11bc
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1070
xorl %edi, %edi
callq 0x1050
addq $0x2, %rax
movq %rax, (%rsp)
leaq 0x2e35(%rip), %rdi      # 0x4080
callq 0x10b0
cmpl $0x0, 0x2e81(%rip)      # 0x40d8
jne 0x129c
leaq 0x2e48(%rip), %rbx      # 0x40a8
leaq 0x2e19(%rip), %r14      # 0x4080
movq %rsp, %r15
leaq 0xd93(%rip), %r12       # 0x2004
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1080
movl %eax, %ebp
cmpl $0x6e, %eax
jne 0x128e
movq %r12, %rdi
callq 0x1030
cmpl $0x6e, %ebp
je 0x129c
cmpl $0x0, 0x2e3e(%rip)      # 0x40d8
je 0x1271
cmpl $0x0, 0x2e35(%rip)      # 0x40d8
je 0x12b1
leaq 0xd6e(%rip), %rdi       # 0x201a
callq 0x1030
leaq 0x2dc8(%rip), %rdi      # 0x4080
callq 0x1060
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq