LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: f_random
static int f_random(lua_State *L) {
  lua_Integer low, up;
  double r = (double)(px_rand() % 100000) / 100000.0;
  switch (lua_gettop(L)) {
  case 0: lua_pushnumber(L, (lua_Number)r); return 1;
  case 1: low = 1; up = luaL_checkinteger(L, 1); break;
  case 2: low = luaL_checkinteger(L, 1); up = luaL_checkinteger(L, 2); break;
  default: return luaL_error(L, "wrong number of arguments");
  }
  luaL_argcheck(L, low <= up, 1, "interval is empty");
  luaL_argcheck(L, low >= 0 || up <= LUA_MAXINTEGER + low, 1, "interval too large");
  r *= (double)(up - low) + 1.0;
  lua_pushinteger(L, (lua_Integer)r + low);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x111b20(%rip), %eax    # 0x13fb48
movl %eax, %ecx
shll $0xd, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shrl $0x11, %eax
xorl %ecx, %eax
movl %eax, %ecx
shll $0x5, %ecx
xorl %eax, %ecx
movl %ecx, 0x111b05(%rip)    # 0x13fb48
movl %ecx, %eax
shrl $0x5, %eax
imulq $0xa7c5ac5, %rax, %rax  # imm = 0xA7C5AC5
shrq $0x27, %rax
imull $0x186a0, %eax, %eax    # imm = 0x186A0
subl %eax, %ecx
cvtsi2sd %ecx, %xmm0
divsd 0x3e69(%rip), %xmm0     # 0x31ed0
movsd %xmm0, (%rsp)
callq 0x7261
cmpl $0x2, %eax
je 0x2e09a
cmpl $0x1, %eax
je 0x2e095
testl %eax, %eax
jne 0x2e149
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x8758
jmp 0x2e138
movl %eax, %r14d
jmp 0x2e0af
movq %rbx, %rdi
movl $0x1, %esi
callq 0xc56e
movq %rax, %r14
movl $0x2, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0xc56e
movq %rax, %r15
movq %rax, %r12
subq %r14, %r12
jge 0x2e0d8
leaq 0x2f2f(%rip), %rdx      # 0x30ffa
movq %rbx, %rdi
movl $0x1, %esi
callq 0xbccb
testq %r14, %r14
sets %al
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
addq %r14, %rcx
cmpq %rcx, %r15
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x2e10c
leaq 0x2f0d(%rip), %rdx      # 0x3100c
movq %rbx, %rdi
movl $0x1, %esi
callq 0xbccb
xorps %xmm0, %xmm0
cvtsi2sd %r12, %xmm0
addsd 0x1be4(%rip), %xmm0     # 0x2fd00
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
addq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x876d
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2e90(%rip), %rsi      # 0x30fe0
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xbda0
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: f_resolution
static int f_resolution(lua_State *L) {
  int width = (int)luaL_checkinteger(L, 1);
  int height = (int)luaL_checkinteger(L, 2);
  luaL_argcheck(L, width > 0 && width < PX_SCREEN_MAX_WIDTH, 1, "invalid width value");
  luaL_argcheck(L, height > 0 && height < PX_SCREEN_MAX_HEIGHT, 2, "invalid height value");
  px_create_texture(L, width, height);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0xc56e
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0xc56e
movq %rax, %r15
leal -0x1(%r14), %eax
cmpl $0x3ff, %eax            # imm = 0x3FF
jb 0x2e1fd
leaq 0x44ba(%rip), %rdx      # 0x326aa
movq %rbx, %rdi
movl $0x1, %esi
callq 0xbccb
leal -0x1(%r15), %eax
cmpl $0x3ff, %eax            # imm = 0x3FF
jb 0x2e21c
leaq 0x44af(%rip), %rdx      # 0x326be
movq %rbx, %rdi
movl $0x2, %esi
callq 0xbccb
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x2e73c
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: f_compress
static int f_compress(lua_State *L) {
  size_t source_size;
  luaL_Buffer buffer;
  const char *source = luaL_checklstring(L, 1, &source_size);
  int dest_size = LZ4_compressBound((int)source_size);
  char *dest = luaL_buffinitsize(L, &buffer, dest_size);
  dest_size = LZ4_compress_default(source, dest, (int)source_size, dest_size);
  if (!dest_size) luaL_error(L, "compression failed");
  luaL_pushresultsize(&buffer, dest_size);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2030, %rsp           # imm = 0x2030
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0xc445
movq %rax, %r15
movl (%r14), %edi
callq 0x24b2a
movslq %eax, %r12
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0xc93d
movl (%r14), %edx
movq %r15, %rdi
movq %rax, %rsi
movl %r12d, %ecx
callq 0x25e7a
movl %eax, %ebp
testl %eax, %eax
jne 0x2e29c
leaq 0x44af(%rip), %rsi      # 0x32741
movq %rbx, %rdi
xorl %eax, %eax
callq 0xbda0
movslq %ebp, %rsi
leaq 0x10(%rsp), %rdi
callq 0xc881
movl $0x1, %eax
addq $0x2030, %rsp           # imm = 0x2030
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: f_decompress
static int f_decompress(lua_State *L) {
  size_t source_size;
  luaL_Buffer buffer;
  const char *source = luaL_checklstring(L, 1, &source_size);
  int dest_size = (int)luaL_optinteger(L, 2, 64 * 1024);
  char *dest = luaL_buffinitsize(L, &buffer, dest_size);
  dest_size = LZ4_decompress_safe(source, dest, (int)source_size, dest_size);
  if (!dest_size) luaL_error(L, "decompression failed");
  luaL_pushresultsize(&buffer, dest_size);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2030, %rsp           # imm = 0x2030
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0xc445
movq %rax, %r15
movl $0x10000, %edx          # imm = 0x10000
movq %rbx, %rdi
movl $0x2, %esi
callq 0xc5c9
movslq %eax, %r12
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0xc93d
movl (%r14), %edx
movq %r15, %rdi
movq %rax, %rsi
movl %r12d, %ecx
callq 0x28aa8
movl %eax, %ebp
testl %eax, %eax
jne 0x2e332
leaq 0x4417(%rip), %rsi      # 0x3273f
movq %rbx, %rdi
xorl %eax, %eax
callq 0xbda0
movslq %ebp, %rsi
leaq 0x10(%rsp), %rdi
callq 0xc881
movl $0x1, %eax
addq $0x2030, %rsp           # imm = 0x2030
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: f_bind
static int f_bind(lua_State *L) {
  struct sockaddr_in sin;
  Uint16 port = (Uint16)luaL_checkinteger(L, 1);
  // prepare addr
  SDL_zero(sin);
  sin.sin_family = AF_INET;
  sin.sin_port = htons(port);
  sin.sin_addr.s_addr = htonl(INADDR_ANY);
  // bind socket
  net_create_socket(L);
  if (bind(socket_fd, (struct sockaddr*)&sin, sizeof(sin))) luaL_error(L, "Cannot bind on port %d", port);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0xc56e
movq %rax, %r14
movq %rsp, %r15
movl $0x10, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x6250
movw $0x2, (%r15)
movl %r14d, %eax
rolw $0x8, %ax
movw %ax, 0x2(%r15)
movl $0x0, 0x4(%r15)
movq %rbx, %rdi
callq 0x2e862
movl 0x1117a5(%rip), %edi    # 0x13fb4c
movq %r15, %rsi
movl $0x10, %edx
callq 0x60f0
testl %eax, %eax
je 0x2e3cd
movzwl %r14w, %edx
leaq 0x4391(%rip), %rsi      # 0x32754
movq %rbx, %rdi
xorl %eax, %eax
callq 0xbda0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: f_unbind
static int f_unbind(lua_State *L) {
  (void)L;
  if (socket_fd != INVALID_SOCKET) {
    closesocket(socket_fd);
    socket_fd = INVALID_SOCKET;
  }
  return 0;
}

// Assembly:
movl 0x11176d(%rip), %edi    # 0x13fb4c
cmpl $-0x1, %edi
je 0x2e3f8
pushq %rax
callq 0x6890
movl $0xffffffff, 0x111758(%rip) # imm = 0xFFFFFFFF
addq $0x8, %rsp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: f_recv
static int f_recv(lua_State *L) {
  struct sockaddr_in sin;
  int datalen = 1024 * 4;
  socklen_t sinlen;
  luaL_Buffer buffer;
  char *data;
  struct timeval tv;
  fd_set set;
  // check socket for data
  net_create_socket(L);
  FD_ZERO(&set); FD_SET(socket_fd, &set);
  tv.tv_sec = 0; tv.tv_usec = 0;
  if (select(socket_fd + 1, &set, NULL, NULL, &tv) <= 0) return 0;
  if (!FD_ISSET(socket_fd, &set)) return 0;
  // reset addr
  SDL_zero(sin);
  sin.sin_family = AF_INET;
  sin.sin_port = 0;
  sin.sin_addr.s_addr = INADDR_ANY;
  sinlen = sizeof(sin);
  // receive
  data = luaL_buffinitsize(L, &buffer, datalen);
  datalen = recvfrom(socket_fd, data, datalen, 0, (struct sockaddr*)&sin, &sinlen);
  if (datalen < 0) return 0;
  luaL_pushresultsize(&buffer, datalen);
  lua_pushinteger(L, ntohl(sin.sin_addr.s_addr));
  lua_pushinteger(L, ntohs(sin.sin_port));
  return 3;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20d8, %rsp           # imm = 0x20D8
movq %rdi, %rbx
callq 0x2e862
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %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)
movaps %xmm0, (%rsi)
movl 0x11170e(%rip), %edi    # 0x13fb4c
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %edi, %ecx
subl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
sarl $0x6, %eax
cltq
orq %rdx, 0x30(%rsp,%rax,8)
incl %edi
leaq 0x20(%rsp), %r8
movaps %xmm0, (%r8)
xorl %r14d, %r14d
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x64a0
testl %eax, %eax
jle 0x2e53f
movl 0x1116c6(%rip), %eax    # 0x13fb4c
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
movq 0x30(%rsp,%rcx,8), %rcx
btq %rax, %rcx
jae 0x2e53f
leaq 0x10(%rsp), %r15
xorl %r14d, %r14d
movl $0x10, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x6250
movq $0x2, (%r15)
leaq 0xc(%rsp), %r12
movl $0x10, (%r12)
leaq 0xb8(%rsp), %rsi
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rdi
callq 0xc93d
movl 0x111663(%rip), %edi    # 0x13fb4c
movl $0x1000, %edx           # imm = 0x1000
movq %rax, %rsi
xorl %ecx, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0x63a0
testl %eax, %eax
js 0x2e53f
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0xb8(%rsp), %rdi
movq %rax, %rsi
callq 0xc881
movl 0x14(%rsp), %esi
bswapl %esi
movq %rbx, %rdi
callq 0x876d
movzwl 0x12(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x876d
movl $0x3, %r14d
movl %r14d, %eax
addq $0x20d8, %rsp           # imm = 0x20D8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: f_send
static int f_send(lua_State *L) {
  struct sockaddr_in sin;
  size_t datalen;
  int sent;
  const char *data = luaL_checklstring(L, 1, &datalen);
  Uint32 host = (Uint32)luaL_checkinteger(L, 2);
  Uint16 port = (Uint16)luaL_checkinteger(L, 3);
  // prepare addr
  SDL_zero(sin);
  sin.sin_family = AF_INET;
  sin.sin_port = htons(port);
  sin.sin_addr.s_addr = htonl(host);
  // sned
  net_create_socket(L);
  sent = sendto(socket_fd, data, (int)datalen, 0, (struct sockaddr*)&sin, sizeof(sin));
  lua_pushboolean(L, sent == (int)datalen);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0xc445
movq %rax, %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0xc56e
movq %rax, %r12
movq %rbx, %rdi
movl $0x3, %esi
callq 0xc56e
movq %rax, %r13
leaq 0x8(%rsp), %rbp
movl $0x10, %edx
movq %rbp, %rdi
xorl %esi, %esi
callq 0x6250
rolw $0x8, %r13w
movw $0x2, (%rbp)
movw %r13w, 0x2(%rbp)
bswapl %r12d
movl %r12d, 0x4(%rbp)
movq %rbx, %rdi
callq 0x2e862
movl 0x11157e(%rip), %edi    # 0x13fb4c
movslq (%r14), %rdx
movq %r15, %rsi
xorl %ecx, %ecx
movq %rbp, %r8
movl $0x10, %r9d
callq 0x6090
xorl %esi, %esi
cmpl (%r14), %eax
sete %sil
movq %rbx, %rdi
callq 0x8f77
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: f_resolve
static int f_resolve(lua_State *L) {
  struct addrinfo hints, *result;
  const char *hostname = luaL_checkstring(L, 1);
  SDL_zero(hints);
  hints.ai_family = AF_INET;
  if (getaddrinfo(hostname, NULL, &hints, &result) == 0) {
    if (result) {
      lua_pushinteger(L, ntohl(((struct sockaddr_in*)(result->ai_addr))->sin_addr.s_addr));
      freeaddrinfo(result);
      return 1;
    }
  }
  lua_pushnil(L);
  lua_pushfstring(L, "cannot resolve " LUA_QS, hostname);
  return 2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movl $0x1, %ebx
movl $0x1, %esi
xorl %edx, %edx
callq 0xc445
movq %rax, %r15
leaq 0x10(%rsp), %r12
movl $0x30, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x6250
movl $0x2, 0x4(%r12)
leaq 0x8(%rsp), %r13
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r13, %rcx
callq 0x6610
testl %eax, %eax
sete %cl
movq (%r13), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2e692
movq 0x18(%rax), %rax
movl 0x4(%rax), %esi
bswapl %esi
movq %r14, %rdi
callq 0x876d
movq 0x8(%rsp), %rdi
callq 0x6630
jmp 0x2e6b3
movq %r14, %rdi
callq 0x8744
leaq 0x40e3(%rip), %rsi      # 0x32784
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8dcc
movl $0x2, %ebx
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: mml_reset_channel
static void mml_reset_channel(AudioChannel *channel) {
  if (channel->source) SDL_free((void*)channel->source);
  SDL_zerop(channel);
  channel->tempo = 140;
  channel->octave = 3;
  channel->waveform = PX_WAVEFORM_PULSE_50;
  channel->default_length = 4;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x2e6d4
callq 0x6290
movl $0x38, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6250
movabsq $0x30000008c, %rax      # imm = 0x30000008C
movq %rax, 0x28(%rbx)
movl $0x3, 0x1c(%rbx)
movl $0x4, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: px_create_texture
static void px_create_texture(lua_State *L, int width, int height) {
  SDL_DisplayMode display_mode;

  // create new texture
  if (texture) SDL_DestroyTexture(texture);
  texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_STREAMING, width, height);
  if (!texture) luaL_error(L, "SDL_CreateTexture() failed: %s", SDL_GetError());
  if (SDL_RenderSetLogicalSize(renderer, width, height)) luaL_error(L, "SDL_RenderSetLogicalSize() failed: %s", SDL_GetError());
  screen_width = width; screen_height = height;

  // determine the best window size and center it
  if (SDL_GetDesktopDisplayMode(0, &display_mode)) luaL_error(L, "SDL_GetDesktopDisplayMode() failed: %s", SDL_GetError());
  width = (display_mode.w - PX_WINDOW_PADDING) / screen_width;
  height = (display_mode.h - PX_WINDOW_PADDING) / screen_height;
  if (width < height) {
    height = screen_height * width;
    width = screen_width * width;
  } 
  else {
    width = screen_width * height;
    height = screen_height * height;
  }
  SDL_SetWindowSize(window, width, height);
  SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x10d8d(%rip), %rdi     # 0x3f4e0
testq %rdi, %rdi
je 0x2e75d
callq 0x6380
movq 0x10d74(%rip), %rdi     # 0x3f4d8
movl $0x16462004, %esi       # imm = 0x16462004
movl $0x1, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x6840
movq %rax, 0x10d60(%rip)     # 0x3f4e0
testq %rax, %rax
jne 0x2e79e
callq 0x6390
leaq 0x3f42(%rip), %rsi      # 0x326d3
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xbda0
movq 0x10d33(%rip), %rdi     # 0x3f4d8
movl %r14d, %esi
movl %ebp, %edx
callq 0x61e0
testl %eax, %eax
je 0x2e7cc
callq 0x6390
leaq 0x3f33(%rip), %rsi      # 0x326f2
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xbda0
movl %r14d, 0x110d35(%rip)   # 0x13f508
movl %ebp, 0x110d33(%rip)    # 0x13f50c
leaq 0x8(%rsp), %rsi
xorl %edi, %edi
callq 0x6720
testl %eax, %eax
je 0x2e802
callq 0x6390
leaq 0x3f23(%rip), %rsi      # 0x32718
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xbda0
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
addl $-0x20, %eax
movl 0x110cf5(%rip), %edi    # 0x13f508
cltd
idivl %edi
movl %eax, %esi
addl $-0x20, %ecx
movl 0x110cea(%rip), %r8d    # 0x13f50c
movl %ecx, %eax
cltd
idivl %r8d
cmpl %eax, %esi
cmovgel %eax, %esi
imull %esi, %r8d
imull %edi, %esi
movq 0x10c95(%rip), %rdi     # 0x3f4d0
movl %r8d, %edx
callq 0x6760
movq 0x10c86(%rip), %rdi     # 0x3f4d0
movl $0x2fff0000, %esi       # imm = 0x2FFF0000
movl $0x2fff0000, %edx       # imm = 0x2FFF0000
callq 0x6080
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: px_open_controllers
static void px_open_controllers(lua_State *L) {
  int i;
  SDL_GameController *controller;
  for (i = 0; i < SDL_NumJoysticks(); ++i) {
    if (SDL_IsGameController(i)) {
      controller = SDL_GameControllerOpen(i);
      if (!controller) luaL_error(L, "SDL_GameControllerOpen() failed: %s", SDL_GetError());
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x6340
testl %eax, %eax
jle 0x2ec7d
leaq 0x3c7e(%rip), %r14      # 0x328c2
xorl %ebp, %ebp
movl %ebp, %edi
callq 0x6810
testl %eax, %eax
je 0x2ec72
movl %ebp, %edi
callq 0x6460
testq %rax, %rax
jne 0x2ec72
callq 0x6390
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xbda0
incl %ebp
callq 0x6340
cmpl %eax, %ebp
jl 0x2ec46
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: mml_parse_number
static int mml_parse_number(AudioChannel *channel) {
  int value = 0;
  mml_skip_spaces(channel);
  while (SDL_isdigit(*channel->in)) {
    value *= 10;
    value += *channel->in++ - '0';
  }
  return value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2ec82
movq 0x8(%rbx), %rax
movsbl (%rax), %edi
callq 0x61c0
xorl %r14d, %r14d
testl %eax, %eax
je 0x2ecef
leal (%r14,%r14,4), %eax
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movsbl (%rcx), %edx
leal (%rdx,%rax,2), %r14d
addl $-0x30, %r14d
movsbl 0x1(%rcx), %edi
callq 0x61c0
jmp 0x2ecc5
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: mml_parse_duration
static void mml_parse_duration(AudioChannel *channel) {
  float duration = (float)mml_parse_number(channel);
  if (duration == 0.0f) duration = (float)channel->default_length;
  duration = mixing_frequency / ((float)channel->tempo * 0.25f / 60.0f) * (1.0f / duration);
  if (mml_is_next(channel, '.')) duration *= 1.5f;
  channel->duration = (int)duration;
  if (mml_is_next(channel, '&')) channel->silence = 0;
  else channel->silence = (int)(duration * (1.0f / 8.0f));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x2ecaa
testl %eax, %eax
jne 0x2ed0e
movl 0x30(%rbx), %eax
cvtsi2ss %eax, %xmm0
cvtsi2ssl 0x28(%rbx), %xmm1
mulss 0x37f5(%rip), %xmm1     # 0x32514
divss 0x3815(%rip), %xmm1     # 0x3253c
movss 0x110da1(%rip), %xmm2   # 0x13fad0
divss %xmm1, %xmm2
movss %xmm2, 0xc(%rsp)
movss 0x37cb(%rip), %xmm1     # 0x3250c
divss %xmm0, %xmm1
movss %xmm1, 0x8(%rsp)
movq %rbx, %rdi
callq 0x2ec82
movq 0x8(%rbx), %rcx
movb (%rcx), %al
cmpb $0x2e, %al
jne 0x2ed64
incq %rcx
movq %rcx, 0x8(%rbx)
movss 0x8(%rsp), %xmm0
mulss 0xc(%rsp), %xmm0
cmpb $0x2e, %al
jne 0x2ed7c
mulss 0x37c4(%rip), %xmm0     # 0x32540
movss %xmm0, 0x8(%rsp)
cvttss2si %xmm0, %eax
movl %eax, 0x20(%rbx)
movq %rbx, %rdi
callq 0x2ec82
movq 0x8(%rbx), %rax
cmpb $0x26, (%rax)
jne 0x2eda5
incq %rax
movq %rax, 0x8(%rbx)
xorl %eax, %eax
jmp 0x2edb7
movss 0x8(%rsp), %xmm0
mulss 0x3785(%rip), %xmm0     # 0x32538
cvttss2si %xmm0, %eax
movl %eax, 0x24(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/kieselsteini[P]PiXL-old/pixl.c
// Function: mml_parse_note
static void mml_parse_note(AudioChannel *channel, int key) {
  if (mml_is_next(channel, '#')) ++key;
  else if (mml_is_next(channel, '+')) ++key;
  else if (mml_is_next(channel, '-')) --key;
  key += (channel->octave - 1) * 12;
  channel->frequency = (float)SDL_pow(2.0, ((double)key - 49.0) / 12.0) * 440.0f;
  channel->t = 0.0f;
  mml_parse_duration(channel);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
callq 0x2ec82
movq 0x8(%rbx), %rax
cmpb $0x23, (%rax)
je 0x2ede9
movq %rbx, %rdi
callq 0x2ec82
movq 0x8(%rbx), %rax
cmpb $0x2b, (%rax)
jne 0x2edf5
incq %rax
movq %rax, 0x8(%rbx)
incl %r14d
jmp 0x2ee18
movq %rbx, %rdi
callq 0x2ec82
movq 0x8(%rbx), %rcx
movb (%rcx), %al
cmpb $0x2d, %al
jne 0x2ee0e
incq %rcx
movq %rcx, 0x8(%rbx)
xorl %ecx, %ecx
cmpb $0x2d, %al
sete %cl
subl %ecx, %r14d
movl 0x2c(%rbx), %eax
leal (%rax,%rax,2), %eax
leal (%r14,%rax,4), %eax
addl $-0xc, %eax
cvtsi2sd %eax, %xmm1
addsd 0x30af(%rip), %xmm1     # 0x31ee0
divsd 0x30af(%rip), %xmm1     # 0x31ee8
movsd 0xeef(%rip), %xmm0      # 0x2fd30
callq 0x6560
cvtsd2ss %xmm0, %xmm0
mulss 0x36f2(%rip), %xmm0     # 0x32544
movss %xmm0, 0x18(%rbx)
movl $0x0, 0x14(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2ecfa
// File: /workspace/github_c_makefile_star2_O2/codeniko[P]CS214-Malloc-Free/mymalloc.c
// Function: myfree
void myfree(void *p, char *file, int line)
{
	struct MemEntry *ptr;
	struct MemEntry *prev;
	struct MemEntry *next;

	if (p == NULL) {
		fprintf(stderr, "Pointer is NULL in file, free failed in FILE: '%s' on LINE: '%d'\n", file, line);
		return;
	}

	ptr = (struct MemEntry*)((char*)p - sizeof(struct MemEntry));
	
	//check if valid memEntry ptr
	int i;
	int valid = 0;
	for (i = 0; i < entriesSize; i++) {
		if (ptr == memEntries[i] && !ptr->isfree) {
			valid = 1; //memEntry is valid
			break;
		}
	}
	if (!valid) {
		fprintf(stderr, "Attempting to free memory that was not malloced in FILE: '%s' on LINE: '%d'\n", file, line);
		return;
	}

	if((prev = ptr->prev) != 0 && prev->isfree)
	{
		// the previous chunk is free, so
		// merge this chunk with the previous chunk
		prev->size += sizeof(struct MemEntry) + ptr->size;
		memEntries[i] = 0; //merged with previous, so removing free memEntry
	}
	else
	{ //not setting memEntry to null b/c not necessarily removing it, just isfree=1
		ptr->isfree = 1;
		prev = ptr;	// used for the step below
	}
	if((next = ptr->next) != 0 && next->isfree)
	{
		// the next chunk is free, merge with it
		prev->size += sizeof(struct MemEntry) + next->size;
		prev->next = next->next;
		//prev->isfree = 1;
		for (i = 0; i < entriesSize; i++) {
			if (next == memEntries[i]) {
				memEntries[i] = 0; //merged with next, so removing free memEntry
				break;
			}
		}
	}
}

// Assembly:
movl %edx, %ecx
movq %rsi, %rdx
testq %rdi, %rdi
je 0x1358
leaq -0x18(%rdi), %rsi
xorl %r8d, %r8d
leaq 0x8f4b(%rip), %rax      # 0xa200
cmpq $0x2090, %r8            # imm = 0x2090
je 0x1345
cmpq (%r8,%rax), %rsi
jne 0x12ce
cmpl $0x0, -0x8(%rdi)
je 0x12d4
addq $0x8, %r8
jmp 0x12b5
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x12fa
cmpl $0x0, 0x10(%rcx)
je 0x12fa
movl -0x4(%rdi), %edx
movl 0x14(%rcx), %esi
addl %esi, %edx
addl $0x18, %edx
movl %edx, 0x14(%rcx)
andq $0x0, (%r8,%rax)
movq %rcx, %rsi
jmp 0x1301
movl $0x1, -0x8(%rdi)
movq -0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x1344
cmpl $0x0, 0x10(%rcx)
je 0x1344
movl 0x14(%rcx), %edx
movl 0x14(%rsi), %edi
addl %edi, %edx
addl $0x18, %edx
movl %edx, 0x14(%rsi)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsi)
xorl %edx, %edx
cmpq $0x412, %rdx            # imm = 0x412
je 0x1344
leaq 0x1(%rdx), %rsi
cmpq (%rax,%rdx,8), %rcx
movq %rsi, %rdx
jne 0x1328
andq $0x0, -0x8(%rax,%rsi,8)
retq
movq 0x2cac(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd7c(%rip), %rsi       # 0x20d2
jmp 0x1369
movq 0x2c99(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd27(%rip), %rsi       # 0x2090
xorl %eax, %eax
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/codeniko[P]CS214-Malloc-Free/mymalloc.c
// Function: getFreeIndex
static int getFreeIndex() {
	int i;
	for (i = 0; i < entriesSize; i++)
		if (memEntries[i] == 0) 
			return i;
	return 1; //should never reach here but 0 is always set as root
}

// Assembly:
leaq 0x8e89(%rip), %rdx      # 0xa200
xorl %ecx, %ecx
pushq $0x1
popq %rax
cmpq $0x412, %rcx            # imm = 0x412
je 0x1396
cmpq $0x0, (%rdx)
je 0x1394
incq %rcx
addq $0x8, %rdx
jmp 0x137c
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_image_write.h
// Function: stbiw__sbgrowf
static void *stbiw__sbgrowf(void **arr, int increment, int itemsize)
{
   int m = *arr ? 2*stbiw__sbm(*arr)+increment : increment+1;
   void *p = STBIW_REALLOC_SIZED(*arr ? stbiw__sbraw(*arr) : 0, *arr ? (stbiw__sbm(*arr)*itemsize + sizeof(int)*2) : 0, itemsize * m + sizeof(int)*2);
   STBIW_ASSERT(p);
   if (p) {
      if (!*arr) ((int *) p)[1] = 0;
      *arr = (void *) ((int *) p + 2);
      stbiw__sbm(*arr) = m;
   }
   return *arr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x24b9
movl -0x8(%rax), %ecx
leal 0x1(,%rcx,2), %r14d
jmp 0x24bd
pushq $0x2
popq %r14
leaq -0x8(%rax), %rdi
testq %rax, %rax
cmoveq %rax, %rdi
imull %r14d, %esi
movslq %esi, %rsi
addq $0x8, %rsi
callq 0x11a0
testq %rax, %rax
je 0x24f9
cmpq $0x0, (%rbx)
jne 0x24e7
andl $0x0, 0x4(%rax)
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, (%rbx)
movl %r14d, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xc146(%rip), %rdi      # 0xe646
leaq 0xb69b(%rip), %rsi      # 0xdba2
leaq 0xba7c(%rip), %rcx      # 0xdf8a
movl $0x319, %edx            # imm = 0x319
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_image_write.h
// Function: stbiw__zlib_flushf
static unsigned char *stbiw__zlib_flushf(unsigned char *data, unsigned int *bitbuffer, int *bitcount)
{
   while (*bitcount >= 8) {
      stbiw__sbpush(data, STBIW_UCHAR(*bitbuffer));
      *bitbuffer >>= 8;
      *bitcount -= 8;
   }
   return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rax
leaq -0x28(%rbp), %r15
movq %rdi, (%r15)
movl (%rdx), %ecx
pushq $0x1
popq %r12
cmpl $0x8, %ecx
jl 0x2581
testq %rax, %rax
je 0x2552
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2567
movq %r15, %rdi
movl %r12d, %esi
callq 0x249a
movq -0x28(%rbp), %rax
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movb (%r14), %sil
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movb %sil, (%rax,%rcx)
shrl $0x8, (%r14)
movl (%rbx), %ecx
addl $-0x8, %ecx
movl %ecx, (%rbx)
jmp 0x253d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_image_write.h
// Function: stbiw__zhash
static unsigned int stbiw__zhash(unsigned char *data)
{
   stbiw_uint32 hash = data[0] + (data[1] << 8) + (data[2] << 16);
   hash ^= hash << 3;
   hash += hash >> 5;
   hash ^= hash << 4;
   hash += hash >> 17;
   hash ^= hash << 25;
   hash += hash >> 6;
   return hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl (%rdi), %eax
movzbl 0x2(%rdi), %ecx
shll $0x10, %ecx
orl %eax, %ecx
leal (,%rcx,8), %eax
xorl %ecx, %eax
movl %eax, %ecx
shrl $0x5, %ecx
addl %eax, %ecx
movl %ecx, %eax
shll $0x4, %eax
xorl %ecx, %eax
movl %eax, %ecx
shrl $0x11, %ecx
addl %eax, %ecx
movl %ecx, %edx
shll $0x19, %edx
xorl %ecx, %edx
movl %edx, %eax
shrl $0x6, %eax
addl %edx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_image_write.h
// Function: stbiw__zlib_countm
static unsigned int stbiw__zlib_countm(unsigned char *a, unsigned char *b, int limit)
{
   int i;
   for (i=0; i < limit && i < 258; ++i)
      if (a[i] != b[i]) break;
   return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %edx, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jge 0x25ef
cmpq $0x101, %rax            # imm = 0x101
ja 0x25ef
movb (%rdi,%rax), %dl
cmpb (%rsi,%rax), %dl
jne 0x25ef
incq %rax
jmp 0x25d5
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_image_write.h
// Function: stbiw__zlib_bitrev
static int stbiw__zlib_bitrev(int code, int codebits)
{
   int res=0;
   while (codebits--) {
      res = (res << 1) | (code & 1);
      code >>= 1;
   }
   return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
subl $0x1, %esi
jb 0x2608
movl %edi, %ecx
andl $0x1, %ecx
leal (%rcx,%rax,2), %eax
sarl %edi
jmp 0x25f7
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_image_write.h
// Function: stbi_write_png
STBIWDEF int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)
{
   FILE *f;
   int len;
   unsigned char *png = stbi_write_png_to_mem((const unsigned char *) data, stride_bytes, x, y, comp, &len);
   if (png == NULL) return 0;

   f = stbiw__fopen(filename, "wb");
   if (!f) { STBIW_FREE(png); return 0; }
   fwrite(png, 1, len, f);
   fclose(f);
   STBIW_FREE(png);
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %r9d, %r10d
movl %ecx, %eax
movl %edx, %ecx
movl %esi, %edx
movq %rdi, %r14
leaq -0x14(%rbp), %r9
movq %r8, %rdi
movl %r10d, %esi
movl %eax, %r8d
callq 0x260a
testq %rax, %rax
je 0x2d21
movq %rax, %rbx
leaq 0xaf74(%rip), %rsi      # 0xdc65
movq %r14, %rdi
callq 0x11c0
testq %rax, %rax
je 0x2d26
movq %rax, %r14
movslq -0x14(%rbp), %rdx
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x1200
movq %r14, %rdi
callq 0x1080
pushq $0x1
popq %r14
jmp 0x2d29
xorl %r14d, %r14d
jmp 0x2d31
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x1030
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_image_write.h
// Function: stbi_write_png_to_func
STBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int stride_bytes)
{
   int len;
   unsigned char *png = stbi_write_png_to_mem((const unsigned char *) data, stride_bytes, x, y, comp, &len);
   if (png == NULL) return 0;
   func(context, png, len);
   STBIW_FREE(png);
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x10(%rbp), %esi
leaq -0x1c(%rbp), %r9
movq %rax, %rdi
callq 0x260a
testq %rax, %rax
je 0x2d7f
movq %rax, %r15
movl -0x1c(%rbp), %edx
movq %r14, %rdi
movq %rax, %rsi
callq *%rbx
movq %r15, %rdi
callq 0x1030
pushq $0x1
popq %rax
jmp 0x2d81
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt_GetGlyphBox
STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1)
{
   if (info->cff.size) {
      stbtt__GetGlyphInfoT2(info, glyph_index, x0, y0, x1, y1);
   } else {
      int g = stbtt__GetGlyfOffset(info, glyph_index);
      if (g < 0) return 0;

      if (x0) *x0 = ttSHORT(info->data + g + 2);
      if (y0) *y0 = ttSHORT(info->data + g + 4);
      if (x1) *x1 = ttSHORT(info->data + g + 6);
      if (y1) *y1 = ttSHORT(info->data + g + 8);
   }
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %r15
cmpl $0x0, 0x4c(%rdi)
je 0x40c6
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0x4164
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x41f9
testl %eax, %eax
js 0x415d
movl %eax, %ecx
testq %r13, %r13
je 0x40f7
movq 0x8(%r15), %rax
movzbl 0x2(%rax,%rcx), %edx
shll $0x8, %edx
movzbl 0x3(%rax,%rcx), %eax
movswl %dx, %edx
orl %eax, %edx
movl %edx, (%r13)
testq %r12, %r12
je 0x4116
movq 0x8(%r15), %rax
movzbl 0x4(%rax,%rcx), %edx
shll $0x8, %edx
movzbl 0x5(%rax,%rcx), %eax
movswl %dx, %edx
orl %eax, %edx
movl %edx, (%r12)
testq %r14, %r14
je 0x4134
movq 0x8(%r15), %rax
movzbl 0x6(%rax,%rcx), %edx
shll $0x8, %edx
movzbl 0x7(%rax,%rcx), %eax
movswl %dx, %edx
orl %eax, %edx
movl %edx, (%r14)
pushq $0x1
popq %rax
testq %rbx, %rbx
je 0x40b7
movq 0x8(%r15), %rdx
movzbl 0x8(%rdx,%rcx), %esi
shll $0x8, %esi
movzbl 0x9(%rdx,%rcx), %ecx
movswl %si, %edx
orl %ecx, %edx
movl %edx, (%rbx)
jmp 0x40b7
xorl %eax, %eax
jmp 0x40b7
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__GetGlyphInfoT2
static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1)
{
   stbtt__csctx c = STBTT__CSCTX_INIT(1);
   int r = stbtt__run_charstring(info, glyph_index, &c);
   if (x0)  *x0 = r ? c.min_x : 0;
   if (y0)  *y0 = r ? c.min_y : 0;
   if (x1)  *x1 = r ? c.max_x : 0;
   if (y1)  *y1 = r ? c.max_y : 0;
   return r ? c.num_vertices : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x20(%rdx)
movaps %xmm0, 0x10(%rdx)
andq $0x0, 0x30(%rdx)
movl $0x1, (%rdx)
callq 0x9d25
testq %r12, %r12
je 0x41b3
movl %eax, %ecx
testl %eax, %eax
je 0x41af
movl -0x48(%rbp), %ecx
movl %ecx, (%r12)
testq %r15, %r15
je 0x41c4
movl %eax, %ecx
testl %eax, %eax
je 0x41c1
movl -0x40(%rbp), %ecx
movl %ecx, (%r15)
testq %r14, %r14
je 0x41d5
movl %eax, %ecx
testl %eax, %eax
je 0x41d2
movl -0x44(%rbp), %ecx
movl %ecx, (%r14)
testq %rbx, %rbx
je 0x41e5
movl %eax, %ecx
testl %eax, %eax
je 0x41e3
movl -0x3c(%rbp), %ecx
movl %ecx, (%rbx)
testl %eax, %eax
je 0x41ec
movl -0x30(%rbp), %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__GetGlyfOffset
static int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_index)
{
   int g1,g2;

   STBTT_assert(!info->cff.size);

   if (glyph_index >= info->numGlyphs) return -1; // glyph index out of range
   if (info->indexToLocFormat >= 2)    return -1; // unknown index->glyph map format

   if (info->indexToLocFormat == 0) {
      g1 = info->glyf + ttUSHORT(info->data + info->loca + glyph_index * 2) * 2;
      g2 = info->glyf + ttUSHORT(info->data + info->loca + glyph_index * 2 + 2) * 2;
   } else {
      g1 = info->glyf + ttULONG (info->data + info->loca + glyph_index * 4);
      g2 = info->glyf + ttULONG (info->data + info->loca + glyph_index * 4 + 4);
   }

   return g1==g2 ? -1 : g1; // if length is 0, return -1
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x0, 0x4c(%rdi)
jne 0x4285
pushq $-0x1
popq %rax
cmpl %esi, 0x14(%rdi)
jle 0x427c
movl 0x38(%rdi), %ecx
cmpl $0x1, %ecx
jg 0x427c
movslq 0x18(%rdi), %r15
addq 0x8(%rdi), %r15
movl 0x20(%rdi), %r14d
testl %ecx, %ecx
je 0x424a
shll $0x2, %esi
movslq %esi, %r12
leaq (%r15,%r12), %rdi
callq 0x37ad
movl %eax, %ebx
leaq (%r15,%r12), %rdi
addq $0x4, %rdi
callq 0x37ad
jmp 0x4270
movslq %esi, %rax
movzbl (%r15,%rax,2), %ecx
movzbl 0x1(%r15,%rax,2), %edx
shll $0x9, %ecx
leal (%rcx,%rdx,2), %ebx
movzbl 0x2(%r15,%rax,2), %ecx
movzbl 0x3(%r15,%rax,2), %eax
shll $0x9, %ecx
leal (%rcx,%rax,2), %eax
addl %ebx, %r14d
cmpl %eax, %ebx
pushq $-0x1
popq %rax
cmovnel %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9d26(%rip), %rdi      # 0xdfb2
leaq 0x99d5(%rip), %rsi      # 0xdc68
leaq 0x9d28(%rip), %rcx      # 0xdfc2
movl $0x613, %edx            # imm = 0x613
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt_IsGlyphEmpty
STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_index)
{
   stbtt_int16 numberOfContours;
   int g;
   if (info->cff.size)
      return stbtt__GetGlyphInfoT2(info, glyph_index, NULL, NULL, NULL, NULL) == 0;
   g = stbtt__GetGlyfOffset(info, glyph_index);
   if (g < 0) return 1;
   numberOfContours = ttSHORT(info->data + g);
   return numberOfContours == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x4c(%rdi)
je 0x430f
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4164
testl %eax, %eax
jmp 0x4328
movq %rbx, %rdi
callq 0x41f9
testl %eax, %eax
js 0x4335
movq 0x8(%rbx), %rcx
movl %eax, %eax
movb 0x1(%rcx,%rax), %dl
orb (%rcx,%rax), %dl
sete %al
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movb $0x1, %al
jmp 0x432b
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt_GetGlyphHMetrics
STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing)
{
   stbtt_uint16 numOfLongHorMetrics = ttUSHORT(info->data+info->hhea + 34);
   if (glyph_index < numOfLongHorMetrics) {
      if (advanceWidth)     *advanceWidth    = ttSHORT(info->data + info->hmtx + 4*glyph_index);
      if (leftSideBearing)  *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*glyph_index + 2);
   } else {
      if (advanceWidth)     *advanceWidth    = ttSHORT(info->data + info->hmtx + 4*(numOfLongHorMetrics-1));
      if (leftSideBearing)  *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*numOfLongHorMetrics + 2*(glyph_index - numOfLongHorMetrics));
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movslq 0x24(%rdi), %r8
movzwl 0x22(%rax,%r8), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r9d
movl %esi, %r8d
subl %r9d, %r8d
jge 0x43a7
testq %rdx, %rdx
je 0x4384
movslq 0x28(%rdi), %r8
addq %rax, %r8
movslq %esi, %r9
movzbl (%r8,%r9,4), %r10d
shll $0x8, %r10d
movzbl 0x1(%r8,%r9,4), %r8d
movswl %r10w, %r9d
orl %r8d, %r9d
movl %r9d, (%rdx)
testq %rcx, %rcx
je 0x4400
movslq 0x28(%rdi), %rdx
addq %rdx, %rax
shll $0x2, %esi
movslq %esi, %rsi
leaq (%rsi,%rax), %rdx
addq $0x2, %rdx
addq %rsi, %rax
addq $0x3, %rax
jmp 0x43f0
movl %r9d, %esi
testq %rdx, %rdx
je 0x43d0
movslq 0x28(%rdi), %r9
addq %rax, %r9
movzbl -0x4(%r9,%rsi,4), %r10d
shll $0x8, %r10d
movzbl -0x3(%r9,%rsi,4), %r9d
movswl %r10w, %r10d
orl %r9d, %r10d
movl %r10d, (%rdx)
testq %rcx, %rcx
je 0x4400
movslq 0x28(%rdi), %rdx
addq %rdx, %rax
leaq (%rax,%rsi,4), %rax
addl %r8d, %r8d
movslq %r8d, %rsi
leaq (%rax,%rsi), %rdx
addq %rsi, %rax
incq %rax
movzbl (%rdx), %edx
shll $0x8, %edx
movzbl (%rax), %eax
movswl %dx, %edx
orl %eax, %edx
movl %edx, (%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt_GetFontVMetricsOS2
STBTT_DEF int  stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int *typoAscent, int *typoDescent, int *typoLineGap)
{
   int tab = stbtt__find_table(info->data, info->fontstart, "OS/2");
   if (!tab)
      return 0;
   if (typoAscent ) *typoAscent  = ttSHORT(info->data+tab + 68);
   if (typoDescent) *typoDescent = ttSHORT(info->data+tab + 70);
   if (typoLineGap) *typoLineGap = ttSHORT(info->data+tab + 72);
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq 0x8(%rdi), %r14
movl 0x10(%rdi), %esi
leaq 0x92d1(%rip), %rdx      # 0xdce7
movq %r14, %rdi
callq 0x4a85
testl %eax, %eax
je 0x4a7a
movslq %eax, %rcx
testq %r12, %r12
je 0x4a40
movzbl 0x44(%r14,%rcx), %eax
shll $0x8, %eax
movzbl 0x45(%r14,%rcx), %edx
cwtl
orl %edx, %eax
movl %eax, (%r12)
testq %r15, %r15
je 0x4a5a
movzbl 0x46(%r14,%rcx), %eax
shll $0x8, %eax
movzbl 0x47(%r14,%rcx), %edx
cwtl
orl %edx, %eax
movl %eax, (%r15)
pushq $0x1
popq %rax
testq %rbx, %rbx
je 0x4a7c
movzbl 0x48(%r14,%rcx), %edx
shll $0x8, %edx
movzbl 0x49(%r14,%rcx), %ecx
movswl %dx, %edx
orl %ecx, %edx
movl %edx, (%rbx)
jmp 0x4a7c
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__find_table
static stbtt_uint32 stbtt__find_table(stbtt_uint8 *data, stbtt_uint32 fontstart, const char *tag)
{
   stbtt_int32 num_tables = ttUSHORT(data+fontstart+4);
   stbtt_uint32 tabledir = fontstart + 12;
   stbtt_int32 i;
   for (i=0; i < num_tables; ++i) {
      stbtt_uint32 loc = tabledir + 16*i;
      if (stbtt_tag(data+loc+0, tag))
         return ttULONG(data+loc+8);
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
movzwl 0x4(%rdi,%rax), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
addl $0xc, %esi
subq $0x1, %rcx
jb 0x4ae5
movl %esi, %eax
movzbl (%rdi,%rax), %r8d
movsbl (%rdx), %r9d
cmpl %r9d, %r8d
jne 0x4ae0
addq %rdi, %rax
movzbl 0x1(%rax), %r8d
movsbl 0x1(%rdx), %r9d
cmpl %r9d, %r8d
jne 0x4ae0
movzbl 0x2(%rax), %r8d
movsbl 0x2(%rdx), %r9d
cmpl %r9d, %r8d
jne 0x4ae0
movzbl 0x3(%rax), %r8d
movsbl 0x3(%rdx), %r9d
cmpl %r9d, %r8d
je 0x4ae9
addl $0x10, %esi
jmp 0x4a9a
xorl %eax, %eax
popq %rbp
retq
addq $0x8, %rax
movq %rax, %rdi
popq %rbp
jmp 0x37ad
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt_GetGlyphBitmapBoxSubpixel
STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1)
{
   int x0=0,y0=0,x1,y1; // =0 suppresses compiler warning
   if (!stbtt_GetGlyphBox(font, glyph, &x0,&y0,&x1,&y1)) {
      // e.g. space character
      if (ix0) *ix0 = 0;
      if (iy0) *iy0 = 0;
      if (ix1) *ix1 = 0;
      if (iy1) *iy1 = 0;
   } else {
      // move to integral bboxes (treating pixels as little squares, what pixels get touched)?
      if (ix0) *ix0 = STBTT_ifloor( x0 * scale_x + shift_x);
      if (iy0) *iy0 = STBTT_ifloor(-y1 * scale_y + shift_y);
      if (ix1) *ix1 = STBTT_iceil ( x1 * scale_x + shift_x);
      if (iy1) *iy1 = STBTT_iceil (-y0 * scale_y + shift_y);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movss %xmm3, -0x30(%rbp)
movss %xmm2, -0x28(%rbp)
movss %xmm1, -0x2c(%rbp)
movss %xmm0, -0x24(%rbp)
leaq -0x40(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x3c(%rbp), %rcx
andl $0x0, (%rcx)
leaq -0x38(%rbp), %r8
leaq -0x34(%rbp), %r9
callq 0x407d
testl %eax, %eax
je 0x4cb1
testq %r12, %r12
je 0x4c4a
cvtsi2ssl -0x40(%rbp), %xmm0
mulss -0x24(%rbp), %xmm0
addss -0x28(%rbp), %xmm0
callq 0x11d0
cvttss2si %xmm0, %eax
movl %eax, (%r12)
testq %r15, %r15
je 0x4c6e
xorl %eax, %eax
subl -0x34(%rbp), %eax
cvtsi2ss %eax, %xmm0
mulss -0x2c(%rbp), %xmm0
addss -0x30(%rbp), %xmm0
callq 0x11d0
cvttss2si %xmm0, %eax
movl %eax, (%r15)
testq %r14, %r14
je 0x4c8e
cvtsi2ssl -0x38(%rbp), %xmm0
mulss -0x24(%rbp), %xmm0
addss -0x28(%rbp), %xmm0
callq 0x1110
cvttss2si %xmm0, %eax
movl %eax, (%r14)
testq %rbx, %rbx
je 0x4cd6
xorl %eax, %eax
subl -0x3c(%rbp), %eax
cvtsi2ss %eax, %xmm0
mulss -0x2c(%rbp), %xmm0
addss -0x30(%rbp), %xmm0
callq 0x1110
cvttss2si %xmm0, %eax
jmp 0x4cd4
testq %r12, %r12
je 0x4cbb
andl $0x0, (%r12)
testq %r15, %r15
je 0x4cc4
andl $0x0, (%r15)
testq %r14, %r14
je 0x4ccd
andl $0x0, (%r14)
xorl %eax, %eax
testq %rbx, %rbx
je 0x4cd6
movl %eax, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt_MakeGlyphBitmapSubpixel
STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph)
{
   int ix0,iy0;
   stbtt_vertex *vertices;
   int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices);
   stbtt__bitmap gbm;   

   stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,0,0);
   gbm.pixels = output;
   gbm.w = out_w;
   gbm.h = out_h;
   gbm.stride = out_stride;

   if (gbm.w && gbm.h)
      stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0,iy0, 1, info->userdata);

   STBTT_free(vertices, info->userdata);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %ebx
movss %xmm3, -0x38(%rbp)
movss %xmm2, -0x34(%rbp)
movss %xmm1, -0x30(%rbp)
movss %xmm0, -0x2c(%rbp)
movl %r8d, -0x40(%rbp)
movl %ecx, %r14d
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %r15
leaq -0x50(%rbp), %rdx
movl %r9d, %esi
callq 0x37da
movl %eax, -0x3c(%rbp)
leaq -0x48(%rbp), %rdx
leaq -0x44(%rbp), %rcx
movq %r15, %rdi
movl %ebx, %esi
movss -0x2c(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
movss -0x34(%rbp), %xmm2
movss -0x38(%rbp), %xmm3
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4bd7
movq %r13, -0x58(%rbp)
movl %r12d, -0x68(%rbp)
movl %r14d, -0x64(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x60(%rbp)
testl %r12d, %r12d
sete %al
testl %r14d, %r14d
sete %cl
leaq -0x50(%rbp), %rdx
movq (%rdx), %r14
orb %al, %cl
jne 0x5f3b
movl -0x48(%rbp), %ecx
movl -0x44(%rbp), %r8d
leaq -0x68(%rbp), %rdi
movss 0x7bb0(%rip), %xmm0     # 0xdac8
pushq $0x1
popq %r9
movq %r14, %rsi
movl -0x3c(%rbp), %edx
movss -0x2c(%rbp), %xmm1
movss -0x30(%rbp), %xmm2
movss -0x34(%rbp), %xmm3
movss -0x38(%rbp), %xmm4
callq 0x4d74
movq %r14, %rdi
callq 0x1030
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt_MakeGlyphBitmapSubpixelPrefilter
STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int prefilter_x, int prefilter_y, float *sub_x, float *sub_y, int glyph)
{
   stbtt_MakeGlyphBitmapSubpixel(info,
                                 output,
                                 out_w - (prefilter_x - 1),
                                 out_h - (prefilter_y - 1),
                                 out_stride,
                                 scale_x,
                                 scale_y,
                                 shift_x,
                                 shift_y,
                                 glyph);

   if (prefilter_x > 1)
      stbtt__h_prefilter(output, out_w, out_h, out_stride, prefilter_x);

   if (prefilter_y > 1)
      stbtt__v_prefilter(output, out_w, out_h, out_stride, prefilter_y);

   *sub_x = stbtt__oversample_shift(prefilter_x);
   *sub_y = stbtt__oversample_shift(prefilter_y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r14d
movl %r8d, %r15d
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %rbx
movl 0x28(%rbp), %r9d
subl %r14d, %edx
incl %edx
subl 0x10(%rbp), %ecx
incl %ecx
callq 0x5e69
cmpl $0x2, %r14d
jl 0x60ab
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %r14d, %r8d
callq 0x6615
movl 0x10(%rbp), %esi
cmpl $0x2, %esi
jl 0x60cb
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl 0x10(%rbp), %r8d
callq 0x6821
movl 0x10(%rbp), %esi
movq 0x18(%rbp), %rcx
xorps %xmm0, %xmm0
pushq $0x1
popq %rax
xorps %xmm1, %xmm1
testl %r14d, %r14d
je 0x60f3
movl %eax, %edx
subl %r14d, %edx
cvtsi2ss %edx, %xmm1
cvtsi2ss %r14d, %xmm2
addss %xmm2, %xmm2
divss %xmm2, %xmm1
movq 0x20(%rbp), %rdx
movss %xmm1, (%rcx)
testl %esi, %esi
je 0x6111
subl %esi, %eax
cvtsi2ss %eax, %xmm0
cvtsi2ss %esi, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
movss %xmm0, (%rdx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq