LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/umbrant[P]Non-blocking-Buffers/nameserver.c
// Function: handle_client
void handle_client(char* arg)
{
  printf("\n** Handling client\n");

  char* msg = (char*)malloc(50*sizeof(char));
  int service_id;
  int channel_id; 

  service_id = find_service(arg);

  if(service_id == -1) {
    printf("** Unable to find service: %s\n", arg);
    strcpy(msg, UNKNOWN_SERVICE);

    nbb_insert_item(CHANNEL_ID, msg, strlen(msg));
    free(msg);
    return;
  }

  printf("** Able to find service: %s\n", arg);

  channel_id = bind_client_service(service_id);
  if(channel_id == -1) {
    printf("** Service has no channel free\n");
    strcpy(msg, SERVICE_BUSY);

    nbb_insert_item(CHANNEL_ID, msg, strlen(msg));
    free(msg);
    return;
  }

  printf("** Service could accept connection\n");

  char tmp[2]; 
  sprintf(tmp, "%d", service_lists[service_id].pid); 

  sprintf(msg, "%d", channel_id);
  strcat(msg, " "); 
  strcat(msg, tmp);

  nbb_insert_item(CHANNEL_ID, msg, strlen(msg));
  free(msg);
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x1328(%rip), %rdi      # 0x3a6a
callq 0x1070
movl $0x32, %edi
callq 0x1170
movq %rax, %rbx
movq %r14, %rdi
callq 0x2873
cmpl $-0x1, %eax
je 0x27ab
movl %eax, %ebp
leaq 0x127b(%rip), %rdi      # 0x39e5
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
movslq %ebp, %rax
leaq (%rax,%rax,4), %r14
leaq 0x415e(%rip), %r15      # 0x68e0
movslq 0x18(%r15,%r14,8), %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
jle 0x27d9
leaq (%r15,%r14,8), %rcx
movq 0x10(%rcx), %rsi
xorl %edx, %edx
cmpl $0x0, (%rsi,%rdx,4)
je 0x27cb
incq %rdx
cmpq %rdx, %rax
jne 0x279b
jmp 0x27d9
leaq 0x1214(%rip), %rdi      # 0x39c6
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
movaps 0x131d(%rip), %xmm0     # 0x3ae0
movups %xmm0, (%rbx)
jmp 0x284c
movl $0x1, (%rsi,%rdx,4)
movq 0x8(%rcx), %rax
movl (%rax,%rdx,4), %ebp
cmpl $-0x1, %ebp
je 0x2832
leaq 0x1299(%rip), %rdi      # 0x3a7e
callq 0x1070
movl 0x1c(%r15,%r14,8), %edx
leaq 0x8aa(%rip), %r14       # 0x30a0
leaq 0x6(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1220
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1220
movq %rbx, %rdi
callq 0x10b0
movw $0x20, (%rbx,%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1210
jmp 0x284c
leaq 0x1268(%rip), %rdi      # 0x3aa1
callq 0x1070
movaps 0x12ab(%rip), %xmm0     # 0x3af0
movups %xmm0, (%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0x10b0
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x166d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/umbrant[P]Non-blocking-Buffers/nameserver.c
// Function: bind_client_service
int bind_client_service(int service_id)
{
  int i;

  for(i = 0;i < service_lists[service_id].num_channels;i++) {
    if(!service_lists[service_id].is_channel_busy[i]) {
      service_lists[service_id].is_channel_busy[i] = 1;
      return service_lists[service_id].channel_ids[i];
    }
  }

  return -1;
}

// Assembly:
movslq %edi, %rax
leaq (%rax,%rax,4), %rdx
leaq 0x401e(%rip), %rsi      # 0x68e0
movslq 0x18(%rsi,%rdx,8), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
jle 0x28e9
leaq (%rsi,%rdx,8), %rdx
movq 0x10(%rdx), %rdi
xorl %esi, %esi
cmpl $0x0, (%rdi,%rsi,4)
je 0x28ea
incq %rsi
cmpq %rsi, %rcx
jne 0x28db
retq
movl $0x1, (%rdi,%rsi,4)
movq 0x8(%rdx), %rax
movl (%rax,%rsi,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/umbrant[P]Non-blocking-Buffers/nameserver.c
// Function: reserve_channel
int reserve_channel(int slot)
{
  int i;
  int count = 0;

  for(i = 0;i < TOTAL_CHANNELS;i++) {
    if(free_lists[i] == 0) {
      free_lists[i] = 1;
      service_lists[slot].channel_ids[count] = i + 1; // Since nameserver is bind to id 0 
      count++;
    }

    if(count == service_lists[slot].num_channels) {
      break;
    }
  }
  
  // Couldn't reserve all of the channels requested
  if(count != service_lists[slot].num_channels) {
    dealloc_service(slot);
    return -1;
  }

  return 0;
}

// Assembly:
pushq %rax
movslq %edi, %rax
leaq (%rax,%rax,4), %rcx
leaq 0x3dd4(%rip), %rdx      # 0x68e0
leaq (%rdx,%rcx,8), %rax
addq $0x8, %rax
xorl %r8d, %r8d
movl $0x1, %esi
leaq 0x3e8d(%rip), %r9       # 0x69b0
xorl %r10d, %r10d
cmpl $0x0, (%r8,%r9)
jne 0x2b42
movl $0x1, (%r8,%r9)
movq (%rax), %r11
movslq %r10d, %r10
movl %esi, (%r11,%r10,4)
incl %r10d
cmpl 0x10(%rax), %r10d
je 0x2b5a
leaq 0x4(%r8), %r11
incl %esi
cmpq $0xc4, %r8
movq %r11, %r8
jne 0x2b26
xorl %eax, %eax
cmpl 0x18(%rdx,%rcx,8), %r10d
je 0x2b6d
callq 0x2b6f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/umbrant[P]Non-blocking-Buffers/nameserver.c
// Function: dealloc_service
void dealloc_service(int slot)
{
  int i;

  for(i = 0;i < service_lists[slot].num_channels;i++) {
    free_lists[service_lists[slot].channel_ids[i]] = 0;
  }

  service_lists[slot].is_use = 0;  
  free(service_lists[slot].name);
  free(service_lists[slot].channel_ids);
}

// Assembly:
pushq %rbx
movslq %edi, %rax
leaq (%rax,%rax,4), %rax
leaq 0x3d62(%rip), %rcx      # 0x68e0
leaq (%rcx,%rax,8), %rbx
movslq 0x18(%rbx), %rax
testq %rax, %rax
jle 0x2bab
movq 0x8(%rbx), %rcx
xorl %edx, %edx
leaq 0x3e18(%rip), %rsi      # 0x69b0
movslq (%rcx,%rdx,4), %rdi
movl $0x0, (%rsi,%rdi,4)
incq %rdx
cmpq %rdx, %rax
jne 0x2b98
movl $0x0, 0x20(%rbx)
movq (%rbx), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/dropletzhu[P]msuite/tcpserver.c
// Function: echo_server
void echo_server(int socket_fd)
{
	int result;
	char buffer[512];

	memset(buffer, 0, 512);

	result = recv(socket_fd, buffer, 512, 0);
	printf("recv %d\n", result);

	result = send(socket_fd, buffer, 512, 0);
	printf("send %d\n", result);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movl %edi, %ebx
movq %rsp, %r14
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
xorl %esi, %esi
callq 0x10b0
movl $0x200, %edx            # imm = 0x200
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x1030
leaq 0xcb4(%rip), %rdi       # 0x2004
movl %eax, %esi
xorl %eax, %eax
callq 0x10a0
movl $0x200, %edx            # imm = 0x200
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x1090
leaq 0xc9c(%rip), %rdi       # 0x200d
movl %eax, %esi
xorl %eax, %eax
callq 0x10a0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/dropletzhu[P]msuite/tcpserver.c
// Function: long_lived_server
void long_lived_server(int socket_fd)
{
	int result;
	fd_set readset;
	char buffer[2048];

	while (1) {
		do {
			FD_ZERO(&readset);
			FD_SET(socket_fd, &readset);
			result = select(socket_fd + 1, &readset, NULL, NULL, NULL);
		} while (result == -1 && errno == EINTR);

		if (result > 0) {
			if (FD_ISSET(socket_fd, &readset)) {
				do {
					result = recv(socket_fd, buffer, 2048, 0);
				} while (result > 0);

				if (result < 0) {
					printf("Error on recv(): %s\n", strerror(errno));
				}
			}
		} else if (result < 0) {
			printf("Error on select(): %s\n", strerror(errno));
			break;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x888, %rsp            # imm = 0x888
movl %edi, %ebx
leal 0x3f(%rbx), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %edi, %ecx
subl %edx, %ecx
movl $0x1, %r12d
shlq %cl, %r12
sarl $0x6, %eax
movslq %eax, %r14
leal 0x1(%rbx), %ebp
leaq 0x80(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
orq %r12, (%rsp,%r14,8)
movl %ebp, %edi
movq %rsp, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10e0
movl %eax, %r13d
cmpl $-0x1, %eax
jne 0x1414
callq 0x1040
cmpl $0x4, (%rax)
je 0x13c3
testl %r13d, %r13d
jle 0x1458
testq %r12, (%rsp,%r14,8)
je 0x13c3
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x1030
testl %eax, %eax
jg 0x141f
jns 0x13c3
callq 0x1040
movl (%rax), %edi
callq 0x1160
leaq 0xbcd(%rip), %rdi       # 0x2016
movq %rax, %rsi
xorl %eax, %eax
callq 0x10a0
jmp 0x13c3
jns 0x13c3
callq 0x1040
movl (%rax), %edi
callq 0x1160
leaq 0xbba(%rip), %rdi       # 0x202b
movq %rax, %rsi
xorl %eax, %eax
callq 0x10a0
addq $0x888, %rsp            # imm = 0x888
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: my_malloc
char * my_malloc(long size)
{
  char * help;
  if ( (help = (char *)malloc(size)) != NULL){
    totalMemory += size;
    return help;
  } else {
    Error(-NOMEM_ERR,"");
  }
  return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3160
testq %rax, %rax
je 0x3333
addq %rbx, 0x11077(%rip)     # 0x143a8
jmp 0x3346
leaq 0x9c58(%rip), %rsi      # 0xcf92
movl $0xfffffffa, %edi       # imm = 0xFFFFFFFA
callq 0xa2c8
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: writeConstByte
void writeConstByte(char c)
{
  if (Global.genesis >0 ){
    if ( code.Size + 1 > MAX_CODE_SIZE ){
      Error(CODEMEM_ERR,"");
      Global.genesis = -1;
    } else {
      *code.Ptr++ = c;
      ++code.Size;
    }
  }
  Global.pc++;
}

// Assembly:
cmpl $0x0, 0x11075(%rip)     # 0x143c4
jle 0x339c
cmpq $0x200000, 0x1127c(%rip) # imm = 0x200000
jl 0x3380
pushq %rax
leaq 0x9c2c(%rip), %rsi      # 0xcf92
movl $0x15, %edi
callq 0xa2c8
movl $0xffffffff, 0x1104a(%rip) # imm = 0xFFFFFFFF
addq $0x8, %rsp
jmp 0x339c
movq 0x11259(%rip), %rax     # 0x145e0
leaq 0x1(%rax), %rcx
movq %rcx, 0x1124e(%rip)     # 0x145e0
movb %dil, (%rax)
incq 0x1123c(%rip)           # 0x145d8
incl 0x1100e(%rip)           # 0x143b0
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: writeRelocByte
void writeRelocByte(char c, int reloc)
{
  if (Global.genesis >0 ){
    if ( code.Size + 1 > MAX_CODE_SIZE ){
      Error(CODEMEM_ERR,"");
      Global.genesis = -1;
    } else {
      if ( reloc ){
//      printf("reloc: %d: %04x\n",reloc,Global.pc);
      }
      *code.Ptr++ = c;
      ++code.Size;
    }
  }
  Global.pc++;
}

// Assembly:
cmpl $0x0, 0x1101a(%rip)     # 0x143c4
jle 0x33f7
cmpq $0x200000, 0x11221(%rip) # imm = 0x200000
jl 0x33db
pushq %rax
leaq 0x9bd1(%rip), %rsi      # 0xcf92
movl $0x15, %edi
callq 0xa2c8
movl $0xffffffff, 0x10fef(%rip) # imm = 0xFFFFFFFF
addq $0x8, %rsp
jmp 0x33f7
movq 0x111fe(%rip), %rax     # 0x145e0
leaq 0x1(%rax), %rcx
movq %rcx, 0x111f3(%rip)     # 0x145e0
movb %dil, (%rax)
incq 0x111e1(%rip)           # 0x145d8
incl 0x10fb3(%rip)           # 0x143b0
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: writeSameBytes
void writeSameBytes(char c,int count)
{
  if (Global.genesis >0 ){
    if ( code.Size + count > MAX_CODE_SIZE ){
      Error(CODEMEM_ERR,"");
      Global.genesis = -1;
    } else {
      int i = count+1;
      while ( --i ){
        *code.Ptr++ = c;
      }
      code.Size += count;
    }
  }
  Global.pc+=count;
}

// Assembly:
pushq %rbx
movl %esi, %ebx
cmpl $0x0, 0x10f61(%rip)     # 0x143c4
jle 0x34be
movslq %ebx, %rax
movq 0x11169(%rip), %rcx     # 0x145d8
addq %rax, %rcx
cmpq $0x200001, %rcx         # imm = 0x200001
jl 0x3498
leaq 0x9b10(%rip), %rsi      # 0xcf92
movl $0x15, %edi
callq 0xa2c8
movl $0xffffffff, 0x10f2e(%rip) # imm = 0xFFFFFFFF
jmp 0x34be
testl %ebx, %ebx
je 0x34b7
movl %ebx, %ecx
movq 0x1113b(%rip), %rdx     # 0x145e0
leaq 0x1(%rdx), %rsi
movq %rsi, 0x11130(%rip)     # 0x145e0
movb %dil, (%rdx)
decl %ecx
jne 0x349e
addq %rax, 0x1111a(%rip)     # 0x145d8
addl %ebx, 0x10eec(%rip)     # 0x143b0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: writeBytes
void writeBytes(char *src,int count)
{
  if (Global.genesis >0 ){
    if ( code.Size + count > MAX_CODE_SIZE ){
      Error(CODEMEM_ERR,"");
      Global.genesis = -1;
    } else {
      int i = count+1;
      while ( --i ){
        *code.Ptr++ = *src++;
      }
      code.Size += count;
    }
  }
  Global.pc+=count;
}

// Assembly:
pushq %rbx
movl %esi, %ebx
cmpl $0x0, 0x10ef4(%rip)     # 0x143c4
jle 0x3534
movslq %ebx, %rax
movq 0x110fc(%rip), %rcx     # 0x145d8
addq %rax, %rcx
cmpq $0x200001, %rcx         # imm = 0x200001
jl 0x3505
leaq 0x9aa3(%rip), %rsi      # 0xcf92
movl $0x15, %edi
callq 0xa2c8
movl $0xffffffff, 0x10ec1(%rip) # imm = 0xFFFFFFFF
jmp 0x3534
testl %ebx, %ebx
je 0x352d
movl %ebx, %ecx
xorl %edx, %edx
movb (%rdi,%rdx), %sil
movq 0x110c8(%rip), %r8      # 0x145e0
leaq 0x1(%r8), %r9
movq %r9, 0x110bd(%rip)      # 0x145e0
movb %sil, (%r8)
incq %rdx
cmpl %edx, %ecx
jne 0x350d
addq %rax, 0x110a4(%rip)     # 0x145d8
addl %ebx, 0x10e76(%rip)     # 0x143b0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: writeWordLittle
void writeWordLittle(short w)
{
  if (Global.genesis >0 ){
    if ( code.Size + 2 > MAX_CODE_SIZE ){
      Error(CODEMEM_ERR,"");
      Global.genesis = -1;
    } else {
      *code.Ptr++ = (char) (w & 0xff);
      *code.Ptr++ = (char) (w >> 8);
      code.Size += 2;
    }
  }
  Global.pc+=2;
}

// Assembly:
cmpl $0x0, 0x10e81(%rip)     # 0x143c4
jle 0x35a6
cmpq $0x1fffff, 0x11088(%rip) # imm = 0x1FFFFF
jl 0x3574
pushq %rax
leaq 0x9a38(%rip), %rsi      # 0xcf92
movl $0x15, %edi
callq 0xa2c8
movl $0xffffffff, 0x10e56(%rip) # imm = 0xFFFFFFFF
addq $0x8, %rsp
jmp 0x35a6
movl %edi, %eax
movq 0x11063(%rip), %rcx     # 0x145e0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x11058(%rip)     # 0x145e0
movb %al, (%rcx)
movq 0x1104f(%rip), %rcx     # 0x145e0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x11044(%rip)     # 0x145e0
movb %ah, (%rcx)
addq $0x2, 0x11032(%rip)     # 0x145d8
addl $0x2, 0x10e03(%rip)     # 0x143b0
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: writeWordBig
void writeWordBig(short w)
{
  //  printf("%04x ",w & 0xffff);
  if (Global.genesis >0 ){
    if ( code.Size + 2 > MAX_CODE_SIZE ){
      Error(CODEMEM_ERR,"");
      Global.genesis = -1;
    } else {
      *code.Ptr++ = (char) (w >> 8);
      *code.Ptr++ = (char) (w & 0xff);
      code.Size += 2;
    }
  }
  Global.pc+=2;
}

// Assembly:
cmpl $0x0, 0x10e0f(%rip)     # 0x143c4
jle 0x3618
cmpq $0x1fffff, 0x11016(%rip) # imm = 0x1FFFFF
jl 0x35e6
pushq %rax
leaq 0x99c6(%rip), %rsi      # 0xcf92
movl $0x15, %edi
callq 0xa2c8
movl $0xffffffff, 0x10de4(%rip) # imm = 0xFFFFFFFF
addq $0x8, %rsp
jmp 0x3618
movl %edi, %eax
movq 0x10ff1(%rip), %rcx     # 0x145e0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10fe6(%rip)     # 0x145e0
movb %ah, (%rcx)
movq 0x10fdd(%rip), %rcx     # 0x145e0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10fd2(%rip)     # 0x145e0
movb %al, (%rcx)
addq $0x2, 0x10fc0(%rip)     # 0x145d8
addl $0x2, 0x10d91(%rip)     # 0x143b0
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: writeLongLittle
void writeLongLittle(int32_t l)
{
  if (Global.genesis >0 ){
    if ( code.Size + 4 > MAX_CODE_SIZE ){
      Error(CODEMEM_ERR,"");
      Global.genesis = -1;
    } else {
      *code.Ptr++ = (char) (l & 0xff);
      *code.Ptr++ = (char) (l >> 8);
      *code.Ptr++ = (char) (l >> 16);
      *code.Ptr++ = (char) (l >> 24);
      code.Size += 4;
    }
  }
  Global.pc+=4;
}

// Assembly:
cmpl $0x0, 0x10d9d(%rip)     # 0x143c4
jle 0x36be
cmpq $0x1ffffd, 0x10fa0(%rip) # imm = 0x1FFFFD
jl 0x365c
pushq %rax
leaq 0x9950(%rip), %rsi      # 0xcf92
movl $0x15, %edi
callq 0xa2c8
movl $0xffffffff, 0x10d6e(%rip) # imm = 0xFFFFFFFF
addq $0x8, %rsp
jmp 0x36be
movl %edi, %eax
movq 0x10f7b(%rip), %rcx     # 0x145e0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10f70(%rip)     # 0x145e0
movb %al, (%rcx)
movq 0x10f67(%rip), %rcx     # 0x145e0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10f5c(%rip)     # 0x145e0
movb %ah, (%rcx)
movl %edi, %ecx
shrl $0x10, %ecx
movq 0x10f4e(%rip), %rdx     # 0x145e0
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10f43(%rip)     # 0x145e0
movb %cl, (%rdx)
shrl $0x18, %eax
movq 0x10f37(%rip), %rcx     # 0x145e0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10f2c(%rip)     # 0x145e0
movb %al, (%rcx)
addq $0x4, 0x10f1a(%rip)     # 0x145d8
addl $0x4, 0x10ceb(%rip)     # 0x143b0
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: writePhraseLittle
void writePhraseLittle(int64_t l)
{
  if (Global.genesis >0 ){
    if ( code.Size + 4 > MAX_CODE_SIZE ){
      Error(CODEMEM_ERR,"");
      Global.genesis = -1;
    } else {
      *code.Ptr++ = (char) (l & 0xff);
      *code.Ptr++ = (char) (l >> 8);
      *code.Ptr++ = (char) (l >> 16);
      *code.Ptr++ = (char) (l >> 24);
      *code.Ptr++ = (char) (l >> 32);
      *code.Ptr++ = (char) (l >> 40);
      *code.Ptr++ = (char) (l >> 48);
      *code.Ptr++ = (char) (l >> 56);
      code.Size += 8;
    }
  }
  Global.pc+=4;
}

// Assembly:
cmpl $0x0, 0x10c4f(%rip)     # 0x143c4
jle 0x387b
cmpq $0x1ffffd, 0x10e52(%rip) # imm = 0x1FFFFD
jl 0x37ad
pushq %rax
leaq 0x9802(%rip), %rsi      # 0xcf92
movl $0x15, %edi
callq 0xa2c8
movl $0xffffffff, 0x10c20(%rip) # imm = 0xFFFFFFFF
addq $0x8, %rsp
jmp 0x387b
movq %rdi, %rax
movq 0x10e29(%rip), %rcx     # 0x145e0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10e1e(%rip)     # 0x145e0
movb %al, (%rcx)
movq 0x10e15(%rip), %rcx     # 0x145e0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10e0a(%rip)     # 0x145e0
movb %ah, (%rcx)
movl %eax, %ecx
shrl $0x10, %ecx
movq 0x10dfc(%rip), %rdx     # 0x145e0
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10df1(%rip)     # 0x145e0
movb %cl, (%rdx)
movl %eax, %ecx
shrl $0x18, %ecx
movq 0x10de3(%rip), %rdx     # 0x145e0
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10dd8(%rip)     # 0x145e0
movb %cl, (%rdx)
movq %rdi, %rcx
shrq $0x20, %rcx
movq 0x10dc8(%rip), %rdx     # 0x145e0
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10dbd(%rip)     # 0x145e0
movb %cl, (%rdx)
movq %rdi, %rcx
shrq $0x28, %rcx
movq 0x10dad(%rip), %rdx     # 0x145e0
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10da2(%rip)     # 0x145e0
movb %cl, (%rdx)
movq %rdi, %rcx
shrq $0x30, %rcx
movq 0x10d92(%rip), %rdx     # 0x145e0
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10d87(%rip)     # 0x145e0
movb %cl, (%rdx)
shrq $0x38, %rax
movq 0x10d7a(%rip), %rcx     # 0x145e0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10d6f(%rip)     # 0x145e0
movb %al, (%rcx)
addq $0x8, 0x10d5d(%rip)     # 0x145d8
addl $0x4, 0x10b2e(%rip)     # 0x143b0
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: LoadFile
int LoadFile(char *dst, long offset, long max_len, char *fn, long *len)
{
  FILE *f;
  size_t readlen;

  ConvertFilename(fn);

  if ( (f = fopen(fn,"rb")) == NULL ) return Error(-FILE_ERR,fn);

  if ( offset ){
    fseek(f,offset,SEEK_SET);
  }

  readlen = fread(dst,1,max_len,f);

  *len = (long)readlen;

  fclose( f);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq %rcx, %rax
movzbl (%rax), %ecx
cmpl $0x5c, %ecx
je 0x39dd
testl %ecx, %ecx
jne 0x39e0
jmp 0x39e5
movb $0x2f, (%rax)
incq %rax
jmp 0x39cf
leaq 0x86dc(%rip), %rsi      # 0xc0c8
movq %r13, %rdi
callq 0x3190
testq %rax, %rax
je 0x3a3d
movq %rax, %rbp
testq %r12, %r12
je 0x3a0e
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x3170
movl $0x1, %esi
movq %r15, %rdi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x3090
movq %rax, (%rbx)
movq %rbp, %rdi
callq 0x30a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
movq %r13, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa2c8
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: CheckForUnsolvedLocals
void CheckForUnsolvedLocals()
{
  if ( refFirst ){
    REFERENCE *ptr1,*ptr = refFirst;
    int flag = 1;

    while ( ptr ){
      ptr1 = ptr->up;

      if ( (ptr->unknown->type & (LOCAL|MACRO)) == LOCAL){
        if ( flag ){
          Error(UNSOLVED_ERR,"local");
          flag=0;
        }
        printf("<%32s> [%5d %s]\n",ptr->unknown->name,
               ptr->line+1,file_list[ptr->file].name);
        ptr->unknown = 0;

        if ( ptr->down ){
          ptr->down->up = ptr->up;
        }
        if ( ptr->up ){
          ptr->up->down = ptr->down;
        }
        if ( ptr == refFirst ) refFirst = ptr->up;
        if ( ptr == refLast ) refLast = ptr->down;
        free(ptr);
      }
      ptr = ptr1;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1e897(%rip), %r12     # 0x22da0
movq (%r12), %r15
testq %r15, %r15
je 0x45db
movl $0x1, %eax
leaq 0x102be(%rip), %r13     # 0x147e0
leaq 0x8a6a(%rip), %rbx      # 0xcf93
leaq 0x1e878(%rip), %rbp     # 0x22da8
movq (%r15), %r14
movq 0x38(%r15), %rcx
movl 0x4(%rcx), %ecx
andl $0x6, %ecx
cmpl $0x2, %ecx
jne 0x45cf
testl %eax, %eax
je 0x455b
movl $0x1d, %edi
leaq 0x8ade(%rip), %rsi      # 0xd034
callq 0xa2c8
movq 0x38(%r15), %rsi
addq $0x38, %rsi
movl 0x14(%r15), %edx
incl %edx
movslq 0x18(%r15), %rax
movq %rax, %rcx
shlq $0x9, %rcx
leaq (%rcx,%rax,4), %rax
leaq (%rax,%r13), %rcx
addq $0x4, %rcx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c0
movq $0x0, 0x38(%r15)
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x45a1
movq (%r15), %rcx
movq %rcx, (%rax)
movq (%r15), %rcx
testq %rcx, %rcx
je 0x45ad
movq %rax, 0x8(%rcx)
cmpq (%r12), %r15
jne 0x45b7
movq %rcx, (%r12)
cmpq (%rbp), %r15
jne 0x45c5
movq 0x8(%r15), %rax
movq %rax, (%rbp)
movq %r15, %rdi
callq 0x3050
xorl %eax, %eax
movq %r14, %r15
testq %r14, %r14
jne 0x4530
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/lyxass.c
// Function: checkCode
int checkCode(char * s,int firstCol)
{
  int err;

  if ( (err = CheckPseudo(s)) >= 0) return err;

  if ( Current.Macro.Define ) return 0;

  if ( (err = CheckMnemonic(s)) >= 0) return err;

  if ( !(err = CheckMacro(s)) && firstCol ){
    return Error(SYNTAX_ERR,"");
  }
  return err;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x8085
testl %eax, %eax
jns 0x4850
xorl %eax, %eax
cmpl $0x0, 0xfe00(%rip)      # 0x14614
jne 0x4850
movq %r14, %rdi
callq 0x948b
testl %eax, %eax
jns 0x4850
movq %r14, %rdi
callq 0xa0a5
testl %eax, %eax
setne %cl
testl %ebx, %ebx
sete %dl
orb %cl, %dl
jne 0x4850
leaq 0x8753(%rip), %rsi      # 0xcf92
movl $0x12, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa2c8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/parser.c
// Function: GetChar
int GetChar()
{
  if ( Current.SrcPtr ){
    ch = *Current.SrcPtr++;
    next_ch = *Current.SrcPtr;
  } else {
    ch = EOF;
    next_ch = EOF;
  }

  switch ( ch ){
  case 0 :
  case EOF:
    ch = EOF;
    Current.SrcPtr = NULL;
    break;
  case 0xA:
    ch = EOL;
    break;
  case '\r':             // replace CR by SPACE
  case '\t':
  case ' ':
    ch = SPACE;
    break;
  default:
    ;
  }
  return ( ch != EOF && ch != EOL );
}

// Assembly:
leaq 0xfaed(%rip), %rax      # 0x14608
movq 0x198(%rax), %rcx
testq %rcx, %rcx
je 0x4b41
leaq 0x1(%rcx), %rdx
movq %rdx, 0x198(%rax)
movsbl (%rcx), %edx
movl %edx, 0x182d5(%rip)     # 0x1ce10
movsbl 0x1(%rcx), %ecx
jmp 0x4b50
movl $0xffffffff, 0x182c5(%rip) # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x182be(%rip)     # 0x1ce14
movl 0x182b4(%rip), %ecx     # 0x1ce10
incl %ecx
cmpl $0x21, %ecx
ja 0x4bb1
movabsq $0x200004400, %rdx      # imm = 0x200004400
btq %rcx, %rdx
jb 0x4b95
movl $0x3, %edx
btq %rcx, %rdx
jae 0x4ba1
movl $0xffffffff, 0x18288(%rip) # imm = 0xFFFFFFFF
movq $0x0, 0x198(%rax)
jmp 0x4bb1
movl $0x20, 0x18271(%rip)    # 0x1ce10
jmp 0x4bb1
cmpq $0xb, %rcx
jne 0x4bb1
movl $0xfffffffe, 0x1825f(%rip) # imm = 0xFFFFFFFE
xorl %eax, %eax
cmpl $-0x2, 0x18256(%rip)    # 0x1ce10
setb %al
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/parser.c
// Function: InsertMacroVar
char * InsertMacroVar(char *ptr,int var)
{
  char *ptr2;

  ptr2 = macrovars[Current.Macro.Processing-1][var];
  while ( *ptr2 )
    *ptr++ = *ptr2++;

  return ptr;
}

// Assembly:
movq %rdi, %rax
leaq 0xfa40(%rip), %rcx      # 0x14608
movslq 0x8(%rcx), %rcx
leaq (%rcx,%rcx,4), %rdx
shlq $0x8, %rdx
movslq %esi, %rcx
leaq (%rcx,%rcx,4), %rsi
shlq $0x4, %rsi
leaq 0x191ba(%rip), %rcx     # 0x1dda0
addq %rdx, %rcx
movb -0x500(%rsi,%rcx), %cl
testb %cl, %cl
je 0x4c16
addq %rsi, %rdx
leaq 0x191a2(%rip), %rsi     # 0x1dda0
addq %rsi, %rdx
addq $-0x4ff, %rdx           # imm = 0xFB01
movb %cl, (%rax)
incq %rax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x4c08
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/parser.c
// Function: GetAtom
int GetAtom(void)
{
  last_atom = atom;
  atom = *srcLinePtr++;
  next_atom = *srcLinePtr;

  if ( !atom ) srcLinePtr--;

  return atom;
}

// Assembly:
movl 0x18015(%rip), %eax     # 0x1cf30
movl %eax, 0x18013(%rip)     # 0x1cf34
movq 0x17ff8(%rip), %rcx     # 0x1cf20
leaq 0x1(%rcx), %rax
movq %rax, 0x17fed(%rip)     # 0x1cf20
movsbl (%rcx), %eax
movl %eax, 0x17ff4(%rip)     # 0x1cf30
movsbl 0x1(%rcx), %edx
movl %edx, 0x17ff2(%rip)     # 0x1cf38
testl %eax, %eax
je 0x4f4b
retq
movq %rcx, 0x17fce(%rip)     # 0x1cf20
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/parser.c
// Function: TestAtom
int TestAtom(int x)
{
  KillSpace();
  if ( atom == (x) ){
    GetAtom();
    return 1;
  }
  return 0;
}

// Assembly:
movl 0x17f87(%rip), %eax     # 0x1cf30
cmpl $0x20, %eax
jne 0x4fee
movq 0x17f6b(%rip), %rcx     # 0x1cf20
movl %eax, 0x17f79(%rip)     # 0x1cf34
leaq 0x1(%rcx), %rdx
movq %rdx, 0x17f5a(%rip)     # 0x1cf20
movsbl (%rcx), %eax
movl %eax, 0x17f61(%rip)     # 0x1cf30
movsbl 0x1(%rcx), %esi
movl %esi, 0x17f5f(%rip)     # 0x1cf38
testl %eax, %eax
jne 0x4fe7
movq %rcx, 0x17f3c(%rip)     # 0x1cf20
movq %rcx, %rdx
movq %rdx, %rcx
cmpb $0x20, %al
je 0x4fb5
movl 0x17f3c(%rip), %ecx     # 0x1cf30
xorl %eax, %eax
cmpl %edi, %ecx
jne 0x502e
movl %ecx, 0x17f34(%rip)     # 0x1cf34
movq 0x17f19(%rip), %rcx     # 0x1cf20
leaq 0x1(%rcx), %rax
movq %rax, 0x17f0e(%rip)     # 0x1cf20
movsbl (%rcx), %edx
movl %edx, 0x17f15(%rip)     # 0x1cf30
movsbl 0x1(%rcx), %eax
movl %eax, 0x17f13(%rip)     # 0x1cf38
movl $0x1, %eax
testl %edx, %edx
je 0x502f
retq
movq %rcx, 0x17eea(%rip)     # 0x1cf20
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/parser.c
// Function: TestAtomOR
int TestAtomOR(int x, int y)
{
  KillSpace();
  if ( atom == x || atom == y){
    GetAtom();
    return 1;
  }
  return 0;
}

// Assembly:
movl 0x17ea7(%rip), %eax     # 0x1cf30
cmpl $0x20, %eax
jne 0x50d0
movq 0x17e8b(%rip), %rcx     # 0x1cf20
movl %eax, 0x17e99(%rip)     # 0x1cf34
leaq 0x1(%rcx), %rdx
movq %rdx, 0x17e7a(%rip)     # 0x1cf20
movsbl (%rcx), %eax
movl %eax, 0x17e81(%rip)     # 0x1cf30
movsbl 0x1(%rcx), %r8d
movl %r8d, 0x17e7d(%rip)     # 0x1cf38
testl %eax, %eax
jne 0x50c9
movq %rcx, 0x17e5a(%rip)     # 0x1cf20
movq %rcx, %rdx
movq %rdx, %rcx
cmpb $0x20, %al
je 0x5095
movl 0x17e5a(%rip), %ecx     # 0x1cf30
cmpl %edi, %ecx
setne %dl
cmpl %esi, %ecx
setne %sil
xorl %eax, %eax
testb %sil, %dl
jne 0x511c
movl %ecx, 0x17e46(%rip)     # 0x1cf34
movq 0x17e2b(%rip), %rcx     # 0x1cf20
leaq 0x1(%rcx), %rax
movq %rax, 0x17e20(%rip)     # 0x1cf20
movsbl (%rcx), %edx
movl %edx, 0x17e27(%rip)     # 0x1cf30
movsbl 0x1(%rcx), %eax
movl %eax, 0x17e25(%rip)     # 0x1cf38
movl $0x1, %eax
testl %edx, %edx
je 0x511d
retq
movq %rcx, 0x17dfc(%rip)     # 0x1cf20
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/parser.c
// Function: GetString
int GetString(char * ptr, char endmark)
{
  while ( atom && atom != endmark ){
    *ptr++ = atom;
    GetAtom();
  }
  *ptr = 0;

  if ( TestAtom(endmark) ){
    return 1;
  } else {
    return 0;
  }
}

// Assembly:
movl 0x17e05(%rip), %eax     # 0x1cf30
testl %eax, %eax
sete %cl
cmpl %esi, %eax
sete %dl
orb %cl, %dl
jne 0x5188
movb %al, (%rdi)
movl 0x17def(%rip), %eax     # 0x1cf30
movl %eax, 0x17ded(%rip)     # 0x1cf34
movq 0x17dd2(%rip), %rax     # 0x1cf20
leaq 0x1(%rax), %rcx
movq %rcx, 0x17dc7(%rip)     # 0x1cf20
movsbl (%rax), %ecx
movl %ecx, 0x17dce(%rip)     # 0x1cf30
movsbl 0x1(%rax), %edx
movl %edx, 0x17dcc(%rip)     # 0x1cf38
testl %ecx, %ecx
jne 0x5177
movq %rax, 0x17da9(%rip)     # 0x1cf20
incq %rdi
movl 0x17db0(%rip), %eax     # 0x1cf30
testl %eax, %eax
je 0x5188
cmpl %esi, %eax
jne 0x5139
movb $0x0, (%rdi)
movl %esi, %edi
jmp 0x4fa3
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/parser.c
// Function: GetCmd
int GetCmd(void)
{
  extern int LabelTable[256];

  int len = 0;
  char *ptr = Current.Cmd;

  memset(Current.Cmd, 0, 80);
  Current.CmdLen = 0;

  if ( KillSpace() ){
    if (isalpha(atom) || atom == '_' || atom == '.' )
      do{
        *ptr++ = atom;
        len++;
      }while ( GetAtom() && (LabelTable[atom] || atom == '.') );
  }
  Current.CmdLen = len;
  *ptr++ = 0;
  return (len == 0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorps %xmm0, %xmm0
leaq 0xebf0(%rip), %rbx      # 0x14608
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0x90(%rbx)
movl $0x0, 0xe0(%rbx)
movl 0x174e5(%rip), %eax     # 0x1cf30
cmpl $0x20, %eax
jne 0x5a90
movq 0x174c9(%rip), %rcx     # 0x1cf20
movl %eax, 0x174d7(%rip)     # 0x1cf34
leaq 0x1(%rcx), %rdx
movq %rdx, 0x174b8(%rip)     # 0x1cf20
movsbl (%rcx), %eax
movl %eax, 0x174bf(%rip)     # 0x1cf30
movsbl 0x1(%rcx), %esi
movl %esi, 0x174bd(%rip)     # 0x1cf38
testl %eax, %eax
jne 0x5a89
movq %rcx, 0x1749a(%rip)     # 0x1cf20
movq %rcx, %rdx
movq %rdx, %rcx
cmpb $0x20, %al
je 0x5a57
xorl %r14d, %r14d
testl %eax, %eax
je 0x5b31
callq 0x31e0
movq (%rax), %rcx
movslq 0x17486(%rip), %rax     # 0x1cf30
movzwl (%rcx,%rax,2), %ecx
btl $0xa, %ecx
jb 0x5abe
cmpl $0x5f, %eax
je 0x5abe
cmpl $0x2e, %eax
jne 0x5b31
movl 0x1746c(%rip), %edx     # 0x1cf30
movl $0x95, %edi
addq 0xd510(%rip), %rdi      # 0x12fe0
movq 0x17449(%rip), %rcx     # 0x1cf20
incq %rcx
movl $0x1, %r8d
leaq 0x17cc9(%rip), %rsi     # 0x1d7b0
movl %r8d, %r14d
movq %rdi, %rax
movb %dl, -0x1(%rdi)
movl %edx, 0x1743e(%rip)     # 0x1cf34
movq %rcx, 0x17423(%rip)     # 0x1cf20
movsbl -0x1(%rcx), %edx
movl %edx, 0x17429(%rip)     # 0x1cf30
movsbl (%rcx), %edi
movl %edi, 0x17428(%rip)     # 0x1cf38
testl %edx, %edx
je 0x5b3f
movslq %edx, %r9
incq %rcx
leal 0x1(%r14), %r8d
leaq 0x1(%rax), %rdi
cmpb $0x2e, %r9b
je 0x5ae7
cmpl $0x0, (%rsi,%r9,4)
jne 0x5ae7
jmp 0x5b49
movl $0x94, %eax
addq 0xd4a3(%rip), %rax      # 0x12fe0
jmp 0x5b49
decq %rcx
movq %rcx, 0x173d7(%rip)     # 0x1cf20
movl %r14d, 0x90(%rbx)
movb $0x0, (%rax)
xorl %eax, %eax
testl %r14d, %r14d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/parser.c
// Function: GetComment
int GetComment(void)
{
  if ( !KillSpace() ) return 0;

  if ( atom != ';' ){
    return 1;
  }

  return 0;
}

// Assembly:
movl 0x173c7(%rip), %eax     # 0x1cf30
cmpl $0x20, %eax
jne 0x5bae
movq 0x173ab(%rip), %rcx     # 0x1cf20
movl %eax, 0x173b9(%rip)     # 0x1cf34
leaq 0x1(%rcx), %rdx
movq %rdx, 0x1739a(%rip)     # 0x1cf20
movsbl (%rcx), %eax
movl %eax, 0x173a1(%rip)     # 0x1cf30
movsbl 0x1(%rcx), %esi
movl %esi, 0x1739f(%rip)     # 0x1cf38
testl %eax, %eax
jne 0x5ba7
movq %rcx, 0x1737c(%rip)     # 0x1cf20
movq %rcx, %rdx
movq %rdx, %rcx
cmpb $0x20, %al
je 0x5b75
testl %eax, %eax
setne %al
cmpl $0x3b, 0x17376(%rip)    # 0x1cf30
setne %cl
andb %al, %cl
movzbl %cl, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: InitLabels
void InitLabels(void)
{
  int c,c1;

  memset((char *) hash, 0, 256*sizeof(label_t *));
  next_local =
    local_labels = (label_t *)my_malloc( sizeof(label_t) * MAX_LOCAL_LABELS );
  next_global =
    global_labels = (label_t *)my_malloc( sizeof(label_t) * MAX_GLOBAL_LABELS );
  next_macro =
    macro_labels = (label_t *)my_malloc( sizeof(label_t) * MAX_MACRO_LABELS );
  next_macroname =
    macronames = (label_t *)my_malloc( sizeof(label_t) * MAX_MACROS);

  memset((char *)LabelTable, FALSE, 256 * sizeof(int) );

  for (c = 'A',c1 = 'a'; c <= 'Z'; c++,c1++){
    LabelTable[ c ] = TRUE;
    LabelTable[ c1 ]= TRUE;
  }
  for (c = '0'; c <= '9'; c++)
    LabelTable[ c ] = TRUE;

  LabelTable[(int)'_'] = TRUE;
  LabelTable[(int)'@'] = TRUE;
  LabelTable[(int)'.'] = TRUE;
}

// Assembly:
pushq %rbx
leaq 0x17344(%rip), %rdi     # 0x1cf70
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x30d0
movl $0xc000, %edi           # imm = 0xC000
callq 0x331c
movq %rax, 0x17b27(%rip)     # 0x1d770
movq %rax, 0x17b28(%rip)     # 0x1d778
movl $0xc0000, %edi          # imm = 0xC0000
callq 0x331c
movq %rax, 0x17b1f(%rip)     # 0x1d780
movq %rax, 0x17b20(%rip)     # 0x1d788
movl $0xc000, %edi           # imm = 0xC000
callq 0x331c
movq %rax, 0x17b17(%rip)     # 0x1d790
movq %rax, 0x17b18(%rip)     # 0x1d798
movl $0x18000, %edi          # imm = 0x18000
callq 0x331c
movq %rax, 0x17b0f(%rip)     # 0x1d7a0
movq %rax, 0x17b10(%rip)     # 0x1d7a8
leaq 0x17b11(%rip), %rbx     # 0x1d7b0
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
xorl %esi, %esi
callq 0x30d0
movq $-0x1a, %rax
movl $0x1, %ecx
movl %ecx, 0x16c(%rbx,%rax,4)
movl %ecx, 0x1ec(%rbx,%rax,4)
incq %rax
jne 0x5cba
xorl %eax, %eax
movl $0x1, 0xc0(%rbx,%rax,4)
incq %rax
cmpq $0xa, %rax
jne 0x5ccf
movl $0x1, %eax
movl %eax, 0x17c3e(%rip)     # 0x1d92c
movl %eax, 0x17bbc(%rip)     # 0x1d8b0
movl %eax, 0x17b6e(%rip)     # 0x1d868
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: ComputeHash
int ComputeHash(char * s)
{
  int hashval = 0;
  int pos = 0;
  while ( *s ){
    hashval ^= pos;
    hashval += (int) *s;
    ++s;
    ++pos;
  }
  return (hashval & 255);
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x5d1e
xorl %ecx, %ecx
xorl %edx, %edx
movl %ecx, %esi
xorl %edx, %esi
movzbl %al, %edx
addl %esi, %edx
movb 0x1(%rdi,%rcx), %al
incq %rcx
testb %al, %al
jne 0x5d06
movzbl %dl, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: ClearLocals
void ClearLocals()
{
  CheckForUnsolvedLocals();
  next_local = local_labels;
  local_hook = NULL;
  memset((char *)local_labels, 0,  sizeof(label_t)*MAX_LOCAL_LABELS);
}

// Assembly:
pushq %rax
xorl %eax, %eax
callq 0x44f7
movq 0x17a40(%rip), %rdi     # 0x1d770
movq %rdi, 0x17a41(%rip)     # 0x1d778
movq $0x0, 0x171fe(%rip) # 0x1cf40
movl $0xc000, %edx           # imm = 0xC000
xorl %esi, %esi
popq %rax
jmp 0x30d0
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: FindLabel
label_t * FindLabel(label_t *l, int32_t *value)
{
  label_t *next;

  if ( l->type & LOCAL ){
    next = local_hook;
    if ( l->type & MACRO ){
      next = macro_hook;
    }
  } else {
    next = hash[ComputeHash(l->name)];
  }

  for ( ; next; next = next->next ){

    //  printf("FindLabel:(%s)%p\n",next->name,next->next);

    if ( (l->len == next->len) && !strcmp(l->name,next->name)){
      *value = (int32_t)next->value;
      l->type = next->type;
      if ( next->type & UNSOLVED )
        return 0;
      else
        return next;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %eax
testb $0x2, %al
jne 0x6187
movb 0x38(%rbx), %cl
xorl %eax, %eax
testb %cl, %cl
je 0x617a
xorl %edx, %edx
movl %edx, %esi
xorl %eax, %esi
movzbl %cl, %eax
addl %esi, %eax
movb 0x39(%rbx,%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x6163
movzbl %al, %eax
leaq 0x16def(%rip), %rcx     # 0x1cf70
leaq (%rcx,%rax,8), %rax
jmp 0x619b
testb $0x4, %al
leaq 0x16db0(%rip), %rcx     # 0x1cf40
leaq 0x16db1(%rip), %rax     # 0x1cf48
cmoveq %rcx, %rax
movq (%rax), %r13
testq %r13, %r13
je 0x61cd
movl (%rbx), %ebp
leaq 0x38(%rbx), %r12
xorl %r15d, %r15d
cmpl (%r13), %ebp
jne 0x61c2
leaq 0x38(%r13), %rsi
movq %r12, %rdi
callq 0x3110
testl %eax, %eax
je 0x61d2
movq 0x28(%r13), %r13
testq %r13, %r13
jne 0x61ac
jmp 0x61ec
xorl %r15d, %r15d
jmp 0x61ec
movl 0x8(%r13), %eax
movl %eax, (%r14)
movl 0x4(%r13), %eax
movl %eax, 0x4(%rbx)
xorl %r15d, %r15d
testb $-0x80, 0x4(%r13)
cmoveq %r13, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: FindMacro
int FindMacro(char *s, label_t ** macro)
{
  label_t *ptr = macroname_hook;

  while ( ptr ){
    if ( ! strcmp(s,ptr->name) ){
      break;
    }
    ptr = ptr->next;
  }
  if ( ! ptr ){
    return 1;
  }

  *macro = ptr;

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x16d43(%rip), %r12     # 0x1cf50
movl $0x1, %ebx
testq %r12, %r12
je 0x623f
movq %rsi, %r14
movq %rdi, %r15
leaq 0x38(%r12), %rsi
movq %r15, %rdi
callq 0x3110
testl %eax, %eax
je 0x623a
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x621d
jmp 0x623f
movq %r12, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: DumpGlobals
void DumpGlobals()
{
  label_t * next;
  int i;
  fprintf(my_stderr,"Global labels:\n");
  for (i = 0; i < 256; ++i){
    for( next = hash[i] ; next ; next = next->next ){
      if ( !(next->type & UNSOLVED) && (next->type & GLOBAL)){
        if ( Global.mainMode == JAGUAR_DSP || Global.mainMode == JAGUAR_GPU ){
          fprintf(my_stderr,"<%32s> = %016"PRIx64" %02x [%5d %s]\n",
                  next->name, next->value, next->type,
                  next->line, file_list[next->file].name);
        } else {
          fprintf(my_stderr,"<%32s> = %08x %02x [%5d %s]\n",
                  next->name, (uint32_t)next->value, next->type,
                  next->line, file_list[next->file].name);
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xe382(%rip), %r15      # 0x145f8
movq (%r15), %rcx
leaq 0x6e7c(%rip), %rdi      # 0xd0fc
movl $0xf, %esi
movl $0x1, %edx
callq 0x31d0
leaq 0xe11a(%rip), %r13      # 0x143b0
leaq 0xe543(%rip), %rbp      # 0x147e0
leaq 0x6e87(%rip), %r14      # 0xd12b
xorl %r12d, %r12d
leaq 0x16cc2(%rip), %rax     # 0x1cf70
movq (%rax,%r12,8), %rbx
testq %rbx, %rbx
je 0x6342
movl 0x4(%rbx), %r8d
movl %r8d, %eax
andl $0x88, %eax
cmpl $0x8, %eax
jne 0x6339
movl 0x1c(%r13), %eax
andl $-0x2, %eax
leaq 0x38(%rbx), %rdx
movq (%r15), %rdi
movq 0x8(%rbx), %rcx
cmpl $0x2, %eax
jne 0x6311
movl 0x10(%rbx), %r9d
movslq 0x14(%rbx), %rax
movq %rax, %rsi
shlq $0x9, %rsi
leaq (%rsi,%rax,4), %rax
addq %rbp, %rax
addq $0x4, %rax
movq %rax, (%rsp)
leaq 0x6e04(%rip), %rsi      # 0xd10c
xorl %eax, %eax
callq 0x3130
jmp 0x6339
movl 0x10(%rbx), %r9d
movslq 0x14(%rbx), %rax
movq %rax, %rsi
shlq $0x9, %rsi
leaq (%rsi,%rax,4), %rax
addq %rbp, %rax
addq $0x4, %rax
movq %rax, (%rsp)
movq %r14, %rsi
xorl %eax, %eax
callq 0x3130
movq 0x28(%rbx), %rbx
jmp 0x62b2
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x62a7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: writeSymbols
void writeSymbols(char *fn, int hex)
{
  label_t * next;
  int i;
  FILE *fh;
  char *help = fn + strlen(fn);

  while ( *help != '.' )
    --help;

  ++help;
  *help = 0;

  help = my_malloc((long)strlen(fn)+4UL);
  strcpy(help,fn);
  strcat(help,"equ");
  if ( (fh = fopen(help,"w")) == NULL ){
    Error(-WRITE_ERR,fn);
    return;
  }

  for (i = 0; i < 256; ++i){
    for( next = hash[i] ; next ; next = next->next ){
      if ( !(next->type & UNSOLVED) && (next->type & GLOBAL)){
        if ( Global.mainMode == JAGUAR_DSP || Global.mainMode == JAGUAR_GPU ){
          if ( hex ){
            fprintf(fh,"%-24s EQU $%016"PRIx64"\n",next->name,next->value);
          } else {
            fprintf(fh,"%-24s EQU %"PRIi64"\n",next->name,next->value);
          }
        } else {
          if ( hex ){
            fprintf(fh,"%-24s EQU $%08x\n",next->name,(uint32_t)next->value);
          } else {
            fprintf(fh,"%-24s EQU %d\n",next->name,(uint32_t)next->value);
          }
        }
      }
    }
  }
  fclose(fh);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r15
callq 0x30b0
addq %r15, %rax
addq $0x2, %rax
cmpb $0x2e, -0x2(%rax)
leaq -0x1(%rax), %rax
jne 0x637d
movb $0x0, (%rax)
movq %r15, %rdi
callq 0x30b0
leaq 0x4(%rax), %rdi
callq 0x331c
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x3070
movq %r14, %rdi
callq 0x30b0
movl $0x757165, (%r14,%rax)  # imm = 0x757165
leaq 0x6d88(%rip), %rsi      # 0xd148
movq %r14, %rdi
callq 0x3190
testq %rax, %rax
je 0x6476
movq %rax, %r14
movl $0x88, %r15d
leaq 0xdfcf(%rip), %r13      # 0x143b0
xorl %r12d, %r12d
leaq 0x16b85(%rip), %rax     # 0x1cf70
movq (%rax,%r12,8), %rbp
testq %rbp, %rbp
je 0x6454
movl 0x4(%rbp), %eax
andl %r15d, %eax
cmpl $0x8, %eax
jne 0x644e
movl 0x1c(%r13), %eax
andl $-0x2, %eax
leaq 0x38(%rbp), %rdx
movq 0x8(%rbp), %rcx
movq %r14, %rdi
cmpl $0x2, %eax
jne 0x6423
testl %ebx, %ebx
je 0x6430
leaq 0x6d29(%rip), %rsi      # 0xd14a
jmp 0x6437
testl %ebx, %ebx
je 0x6440
leaq 0x6d3e(%rip), %rsi      # 0xd16c
jmp 0x6447
leaq 0x6d26(%rip), %rsi      # 0xd15d
xorl %eax, %eax
callq 0x3130
jmp 0x644e
leaq 0x6d36(%rip), %rsi      # 0xd17d
xorl %eax, %eax
callq 0x3130
movq 0x28(%rbp), %rbp
jmp 0x63ef
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x63e4
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30a0
movl $0xffffffd7, %edi       # imm = 0xFFFFFFD7
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa2c8
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: hashStatistics
void hashStatistics()
{
  int i,total = 0;
  label_t *next;
  for(i = 0 ; i < 256;++i){
    int o = 0;
    for (next = hash[i]; next; next = next->next ){
      ++o;
    }
    total += o;
    printf("%4d ",o);
  }
  printf("\n total:%d\n",total);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x16ad0(%rip), %r15     # 0x1cf70
leaq 0x6ce4(%rip), %r14      # 0xd18b
xorl %r12d, %r12d
xorl %ebx, %ebx
movq (%r15,%r12,8), %rax
movl $0x0, %esi
testq %rax, %rax
je 0x64c7
xorl %esi, %esi
incl %esi
movq 0x28(%rax), %rax
testq %rax, %rax
jne 0x64bc
addl %esi, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c0
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x64ac
leaq 0x6caa(%rip), %rdi      # 0xd190
movl %ebx, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x30c0
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: DumpLocals
void DumpLocals()
{
  label_t * next = local_labels;
  fprintf(my_stderr,"Local labels:\n");
  for ( ; next ; next = next->next ){
    if ( Global.mainMode == JAGUAR_DSP || Global.mainMode == JAGUAR_GPU ){
      fprintf(my_stderr,"<%32s> = %0"PRIx64" [%5d %s]\n",
              next->name,next->value,next->line,file_list[next->file].name);
    } else {
      fprintf(my_stderr,"<%32s> = %04x [%5d %s]\n",
              next->name,(uint32_t)next->value,
              next->line,file_list[next->file].name);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x17264(%rip), %r15     # 0x1d770
leaq 0xe0e5(%rip), %r12      # 0x145f8
movq (%r12), %rcx
leaq 0x6c7e(%rip), %rdi      # 0xd19c
movl $0xe, %esi
movl $0x1, %edx
callq 0x31d0
testq %r15, %r15
je 0x65bf
leaq 0xde73(%rip), %r13      # 0x143b0
leaq 0xe29c(%rip), %rbp      # 0x147e0
leaq 0x6c60(%rip), %rbx      # 0xd1ab
leaq 0x6c71(%rip), %r14      # 0xd1c3
movl 0x1c(%r13), %eax
andl $-0x2, %eax
leaq 0x38(%r15), %rdx
movq (%r12), %rdi
movq 0x8(%r15), %rcx
cmpl $0x2, %eax
jne 0x6591
movl 0x10(%r15), %r8d
movslq 0x14(%r15), %rax
movq %rax, %rsi
shlq $0x9, %rsi
leaq (%rsi,%rax,4), %rax
leaq (%rax,%rbp), %r9
addq $0x4, %r9
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3130
jmp 0x65b6
movl 0x10(%r15), %r8d
movslq 0x14(%r15), %rax
movq %rax, %rsi
shlq $0x9, %rsi
leaq (%rsi,%rax,4), %rax
leaq (%rax,%rbp), %r9
addq $0x4, %r9
movq %r14, %rsi
xorl %eax, %eax
callq 0x3130
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0x6552
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: DumpMacros
void DumpMacros()
{
  label_t * next = macroname_hook;
  fprintf(my_stderr,"Macros:\n");
  for ( ; next ; next = next->next ){
    fprintf(my_stderr,"<%32s> [%5d %s]\n",
            next->name,next->line,file_list[next->file].name);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x16973(%rip), %r14     # 0x1cf50
leaq 0xe014(%rip), %r15      # 0x145f8
movq (%r15), %rcx
leaq 0x6bed(%rip), %rdi      # 0xd1db
movl $0x8, %esi
movl $0x1, %edx
callq 0x31d0
testq %r14, %r14
je 0x6645
leaq 0xe1d7(%rip), %r12      # 0x147e0
leaq 0x6983(%rip), %rbx      # 0xcf93
movq (%r15), %rdi
leaq 0x38(%r14), %rdx
movl 0x10(%r14), %ecx
movslq 0x14(%r14), %rax
movq %rax, %rsi
shlq $0x9, %rsi
leaq (%rsi,%rax,4), %rax
leaq (%r12,%rax), %r8
addq $0x4, %r8
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3130
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x6610
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/label.c
// Function: newSymbol
label_t * newSymbol(const char *name, uint64_t value)
{
  label_t label = {0};
  int solved;

  label.value = value;
  label.type = NORMAL;
  strcpy(label.name, name);
  label.len   = strlen(name);
  label.file  = 0;
  label.line  = 0;

  return DefineLabel(&label, &solved);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x48(%rsp), %r14
movaps %xmm0, 0x18(%r14)
movaps %xmm0, 0x8(%r14)
movaps %xmm0, -0x8(%r14)
movaps %xmm0, -0x18(%r14)
movaps %xmm0, -0x28(%r14)
movaps %xmm0, -0x38(%r14)
movq %rsi, -0x30(%r14)
movl $0x1, -0x34(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3070
movq %rbx, %rdi
callq 0x30b0
movl %eax, -0x38(%r14)
movq $0x0, -0x28(%r14)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x5d4f
addq $0x78, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/42Bastian[P]lyxass/opcode.c
// Function: SearchOpcode
int SearchOpcode(const struct opcode_s *list, const char *s)
{
  const struct opcode_s *curr;

  if ( strlen(s) > 7 ){
    return -1;
  }
  curr = list;
  while ( curr->name[0] ){
    if ( !strcasecmp(curr->name,s) ){
      //      printf("Found (%s)\n",curr->name);
      return curr->func( curr->misc );
    }
    curr++;
  }
  return -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x30b0
cmpq $0x7, %rax
ja 0x66fc
cmpb $0x0, (%r14)
je 0x66fc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3060
testl %eax, %eax
je 0x6709
cmpb $0x0, 0x20(%r14)
leaq 0x20(%r14), %r14
jne 0x66e2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rax
movl 0x18(%r14), %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x10(%rax)