LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/kieselsteini[P]PiXL-old/pixl.c
// Function: f_circle
static int f_circle(lua_State *L) {
  Uint8 color = (Uint8)luaL_checkinteger(L, 1);
  int x0 = (int)luaL_checknumber(L, 2);
  int y0 = (int)luaL_checknumber(L, 3);
  int radius = (int)luaL_checknumber(L, 4);
  int fill = lua_toboolean(L, 5);
  int r0sq = fill ? 0 : (radius - 1) * (radius - 1);
  int r1sq = radius * radius;
  int x, y, dx, dy, dist;
  for (y = y0 - radius; y <= y0 + radius; ++y) {
    dy = y0 - y; dy *= dy;
    for (x = x0 - radius; x <= x0 + radius; ++x) {
      dx = x0 - x; dx *= dx;
      dist = dx + dy;
      if ((dist >= r0sq) && (dist < r1sq)) _pixel(color, x, y);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movl $0x1, %esi
callq 0xe462
movq %rax, %rbx
movq %r14, %rdi
movl $0x2, %esi
callq 0xe3e3
movsd %xmm0, (%rsp)
movq %r14, %rdi
movl $0x3, %esi
callq 0xe3e3
cvttsd2si %xmm0, %r15d
movq %r14, %rdi
movl $0x4, %esi
callq 0xe3e3
cvttsd2si %xmm0, %r12d
movq %r14, %rdi
movl $0x5, %esi
callq 0x9fd6
movl %r15d, %ecx
subl %r12d, %ecx
movq %r15, 0x30(%rsp)
movq %r12, 0x18(%rsp)
leal (%r12,%r15), %edx
movl %edx, 0x14(%rsp)
cmpl %edx, %ecx
jg 0x2fb7c
cvttsd2si (%rsp), %esi
movq 0x18(%rsp), %rdx
leal -0x1(%rdx), %edi
imull %edi, %edi
movl %edx, %r8d
imull %edx, %r8d
movl %esi, %r9d
subl %edx, %r9d
movl %r9d, (%rsp)
leal (%rdx,%rsi), %r9d
movl %r9d, 0x10(%rsp)
movl 0x112a51(%rip), %r9d    # 0x142504
movq %r9, 0x20(%rsp)
movl 0x112a4a(%rip), %ebp    # 0x142508
movl 0x112a47(%rip), %r14d   # 0x14250c
leal 0x1(,%rdx,2), %r9d
movl %r9d, 0xc(%rsp)
addl 0x112a28(%rip), %esi    # 0x142500
subl %edx, %esi
movq %rsi, 0x28(%rsp)
movl 0x10(%rsp), %edx
cmpl %edx, (%rsp)
jg 0x2fb6d
movq 0x30(%rsp), %rdx
movl %edx, %r15d
subl %ecx, %r15d
imull %r15d, %r15d
movq 0x20(%rsp), %rdx
leal (%rdx,%rcx), %r13d
movq 0x28(%rsp), %rdx
movl %edx, %esi
movq 0x18(%rsp), %rdx
movl %edx, %r10d
movl 0xc(%rsp), %edx
testl %eax, %eax
setne %r9b
movl %r10d, %r12d
imull %r10d, %r12d
addl %r15d, %r12d
cmpl %r12d, %edi
setbe %r11b
orb %r9b, %r11b
cmpb $0x1, %r11b
jne 0x2fb64
cmpl %r8d, %r12d
jae 0x2fb64
testl %esi, %esi
js 0x2fb64
cmpl %ebp, %esi
jge 0x2fb64
testl %r13d, %r13d
js 0x2fb64
cmpl %r14d, %r13d
jge 0x2fb64
movl %esi, %r9d
shlq $0xa, %r9
leaq 0x129a4(%rip), %r11     # 0x42500
addq %r11, %r9
movb %bl, (%r13,%r9)
decl %r10d
incl %esi
decl %edx
jne 0x2fb17
leal 0x1(%rcx), %edx
cmpl 0x14(%rsp), %ecx
movl %edx, %ecx
jne 0x2fadf
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/kieselsteini[P]PiXL-old/pixl.c
// Function: f_translate
static int f_translate(lua_State *L) {
  if (lua_gettop(L) == 2) {
    int x = (int)luaL_checknumber(L, 1);
    int y = (int)luaL_checknumber(L, 2);
    translation.x = x;
    translation.y = y;
  }
  lua_pushinteger(L, translation.x);
  lua_pushinteger(L, translation.y);
  return 2;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x8f4d
cmpl $0x2, %eax
jne 0x2fbd9
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe3e3
movapd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0xe3e3
movapd (%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
cvttpd2dq %xmm1, %xmm0
movlpd %xmm0, 0x11292d(%rip)   # 0x142500
movd %xmm0, %eax
jmp 0x2fbdf
movl 0x112921(%rip), %eax    # 0x142500
movslq %eax, %rsi
movq %rbx, %rdi
callq 0xa4be
movslq 0x112913(%rip), %rsi    # 0x142504
movq %rbx, %rdi
callq 0xa4be
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/kieselsteini[P]PiXL-old/pixl.c
// Function: f_sprite
static int f_sprite(lua_State *L) {
  size_t length;
  Uint8 color;
  int x, y, w, h;
  int x0 = (int)luaL_checknumber(L, 1);
  int y0 = (int)luaL_checknumber(L, 2);
  const char *data = luaL_checklstring(L, 3, &length);
  int transparent = (int)luaL_optinteger(L, 4, -1);
  switch (length) {
  case 64: w = h = 8; break;
  case 256: w = h = 16; break;
  case 1024: w = h = 32; break;
  case 384: w = 16; h = 24; break;
  default: return luaL_argerror(L, 3, "invalid sprite data length");
  }
  for (y = y0; y < y0 + h; ++y) {
    for (x = x0; x < x0 + w; ++x) {
      color = sprite_color_map[(*data++) & 127];
      if (color != transparent) _pixel(color, x, y);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movl $0x1, %esi
callq 0xe3e3
movsd %xmm0, (%rsp)
movq %r14, %rdi
movl $0x2, %esi
callq 0xe3e3
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movl $0x3, %esi
movq %r15, %rdx
callq 0xe339
movq %rax, %rbx
movq %r14, %rdi
movl $0x4, %esi
movq $-0x1, %rdx
callq 0xe4bd
movq (%r15), %rcx
cmpq $0x17f, %rcx            # imm = 0x17F
jg 0x2fc8a
cmpq $0x40, %rcx
je 0x2fcc1
cmpq $0x100, %rcx            # imm = 0x100
jne 0x2fca8
movl $0x10, %ecx
movl $0x10, %esi
jmp 0x2fcd7
cmpq $0x180, %rcx            # imm = 0x180
je 0x2fccd
cmpq $0x400, %rcx            # imm = 0x400
jne 0x2fca8
movl $0x20, %ecx
movl $0x20, %esi
jmp 0x2fcd7
leaq 0x5829(%rip), %rdx      # 0x354d8
movq %r14, %rdi
movl $0x3, %esi
callq 0xdabf
jmp 0x2fd61
movl $0x8, %ecx
movl $0x8, %esi
jmp 0x2fcd7
movl $0x18, %esi
movl $0x10, %ecx
cvttsd2si (%rsp), %edx
cvttsd2si 0x8(%rsp), %edi
addl %edi, %esi
movl %edx, (%rsp)
addl %edx, %ecx
movl 0x112811(%rip), %edx    # 0x142500
movl 0x11280e(%rip), %r9d    # 0x142504
movl 0x11280b(%rip), %r10d   # 0x142508
movl 0x112808(%rip), %r11d   # 0x14250c
leaq 0x51b5(%rip), %r14      # 0x34ec0
leaq 0x127ee(%rip), %r15     # 0x42500
leal (%r9,%rdi), %r12d
movl (%rsp), %ebp
movzbl (%rbx), %r8d
andl $0x7f, %r8d
movzbl (%r8,%r14), %r13d
cmpl %eax, %r13d
je 0x2fd50
movl %edx, %r8d
addl %ebp, %r8d
js 0x2fd50
cmpl %r10d, %r8d
jge 0x2fd50
testl %r12d, %r12d
js 0x2fd50
cmpl %r11d, %r12d
jge 0x2fd50
movl %r8d, %r8d
shlq $0xa, %r8
addq %r15, %r8
movb %r13b, (%r12,%r8)
incq %rbx
incl %ebp
cmpl %ecx, %ebp
jl 0x2fd19
incl %edi
cmpl %esi, %edi
jl 0x2fd12
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/kieselsteini[P]PiXL-old/pixl.c
// Function: f_print
static int f_print(lua_State *L) {
  int x, y;
  Uint8 glyph;
  Uint8 color = (Uint8)luaL_checkinteger(L, 1);
  int x0 = (int)luaL_checknumber(L, 2);
  int y0 = (int)luaL_checknumber(L, 3);
  const char *str = luaL_checkstring(L, 4);
  for (; *str; ++str, x0 += 8) {
    for (y = 0; y < 8; ++y) {
      glyph = font8x8[*str & 127][y];
      for (x = 0; x < 8; ++x) {
        if (glyph & (1 << x)) _pixel(color, x0 + x, y0 + y);
      }
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movl $0x1, %esi
callq 0xe462
movq %rax, %rbx
movq %r14, %rdi
movl $0x2, %esi
callq 0xe3e3
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movl $0x3, %esi
callq 0xe3e3
movsd %xmm0, 0x10(%rsp)
movq %r14, %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0xe339
cmpb $0x0, (%rax)
je 0x2fe99
cvttsd2si 0x10(%rsp), %edi
cvttsd2si 0x8(%rsp), %r8d
movslq 0x112720(%rip), %r10    # 0x142500
movslq 0x11271d(%rip), %rcx    # 0x142504
movslq 0x11271a(%rip), %rdx    # 0x142508
movslq 0x112717(%rip), %rsi    # 0x14250c
movslq %edi, %rdi
movslq %r8d, %r9
addq %r10, %r9
movq %r9, %r8
shlq $0xa, %r8
leaq 0x126f4(%rip), %r11     # 0x42500
addq %rdi, %r11
addq %rcx, %r11
addq %r8, %r11
leaq 0x5124(%rip), %r10      # 0x34f40
movq %r11, 0x8(%rsp)
xorl %r14d, %r14d
movzbl (%rax), %r8d
andl $0x7f, %r8d
leaq (%r10,%r8,8), %r8
movzbl (%r14,%r8), %ebp
leaq (%r14,%rdi), %r15
addq %rcx, %r15
movq %r11, %r12
xorl %r13d, %r13d
btl %r13d, %ebp
jae 0x2fe63
movq %r9, %r8
addq %r13, %r8
js 0x2fe63
cmpq %rdx, %r8
jge 0x2fe63
testq %r15, %r15
js 0x2fe63
cmpq %rsi, %r15
jge 0x2fe63
movb %bl, (%r12)
incq %r13
addq $0x400, %r12            # imm = 0x400
cmpq $0x8, %r13
jne 0x2fe42
incq %r14
incq %r11
cmpq $0x8, %r14
jne 0x2fe24
movq 0x8(%rsp), %r11
addq $0x2000, %r11           # imm = 0x2000
addq $0x8, %r9
cmpb $0x0, 0x1(%rax)
leaq 0x1(%rax), %rax
jne 0x2fe1c
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/kieselsteini[P]PiXL-old/pixl.c
// Function: f_play
static int f_play(lua_State *L) {
  AudioChannel *channel;
  int i = (int)luaL_checkinteger(L, 1);
  const char *str = luaL_checkstring(L, 2);
  luaL_argcheck(L, i >= 0 && i < PX_AUDIO_CHANNELS, 1, "invalid channel");
  if (audio_device) {
    SDL_LockAudioDevice(audio_device);
    channel = &channels[i];
    mml_reset_channel(channel);
    channel->source = channel->in = SDL_strdup(str);
    channel->looping = lua_toboolean(L, 3);
    SDL_UnlockAudioDevice(audio_device);
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0xe462
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0xe339
movq %rax, %r15
testl $0xfffffff8, %r14d      # imm = 0xFFFFFFF8
je 0x2fef1
leaq 0x560f(%rip), %rdx      # 0x354f3
movq %rbx, %rdi
movl $0x1, %esi
callq 0xdabf
movl 0x125f1(%rip), %edi     # 0x424e8
testl %edi, %edi
je 0x2ff45
callq 0x64b0
movslq %r14d, %rax
imulq $0x38, %rax, %r14
leaq 0x112602(%rip), %r12    # 0x142510
leaq (%r12,%r14), %rdi
callq 0x3084c
movq %r15, %rdi
callq 0x61b0
movq %rax, 0x8(%r14,%r12)
movq %rax, (%r14,%r12)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x9fd6
movl %eax, 0x10(%r14,%r12)
movl 0x125a8(%rip), %edi     # 0x424e8
callq 0x6770
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/kieselsteini[P]PiXL-old/pixl.c
// Function: f_stop
static int f_stop(lua_State *L) {
  int i = (int)luaL_checkinteger(L, 1);
  luaL_argcheck(L, i >= 0 && i < PX_AUDIO_CHANNELS, 1, "invalid channel");
  if (audio_device) {
    SDL_LockAudioDevice(audio_device);
    mml_reset_channel(&channels[i]);
    SDL_UnlockAudioDevice(audio_device);
  }
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %esi
callq 0xe462
movq %rax, %rbx
testl $0xfffffff8, %ebx       # imm = 0xFFFFFFF8
je 0x2ff83
leaq 0x557d(%rip), %rdx      # 0x354f3
movq %r14, %rdi
movl $0x1, %esi
callq 0xdabf
movl 0x1255f(%rip), %edi     # 0x424e8
testl %edi, %edi
je 0x2ffb3
callq 0x64b0
movslq %ebx, %rax
imulq $0x38, %rax, %rax
leaq 0x112570(%rip), %rdi    # 0x142510
addq %rax, %rdi
callq 0x3084c
movl 0x1253a(%rip), %edi     # 0x424e8
callq 0x6770
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/kieselsteini[P]PiXL-old/pixl.c
// Function: f_mouse
static int f_mouse(lua_State *L) {
  Input *input = &inputs[_check_controller(L)];
  lua_pushinteger(L, input->mouse.x + translation.x);
  lua_pushinteger(L, input->mouse.y + translation.y);
  return 2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x3088a
cltq
leaq (%rax,%rax,2), %r14
leaq 0x112a40(%rip), %r15    # 0x142ae0
movslq 0x4(%r15,%r14,4), %rax
movslq 0x112454(%rip), %rsi    # 0x142500
addq %rax, %rsi
movq %rbx, %rdi
callq 0xa4be
movslq 0x8(%r15,%r14,4), %rax
movslq 0x112441(%rip), %rsi    # 0x142504
addq %rax, %rsi
movq %rbx, %rdi
callq 0xa4be
movl $0x2, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/kieselsteini[P]PiXL-old/pixl.c
// Function: f_clipboard
static int f_clipboard(lua_State *L) {
  if (lua_gettop(L) > 0) {
    const char *text = luaL_checkstring(L, 1);
    if (SDL_SetClipboardText(text)) luaL_error(L, "SDL_SetClipboardText() failed: %s", SDL_GetError());
    lua_pushstring(L, text);
    return 1;
  }
  else {
    lua_pushstring(L, SDL_GetClipboardText());
    return 1;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8f4d
testl %eax, %eax
jle 0x30122
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xe339
movq %rax, %r14
movq %rax, %rdi
callq 0x67d0
testl %eax, %eax
je 0x3012a
callq 0x6380
leaq 0x541d(%rip), %rsi      # 0x35530
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xdb8f
jmp 0x3012a
callq 0x6220
movq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa67f
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/kieselsteini[P]PiXL-old/pixl.c
// Function: f_randomseed
static int f_randomseed(lua_State *L) {
  if (lua_gettop(L) > 0) {
    Uint32 x = (Uint32)luaL_checkinteger(L, 1);
    px_randomseed(x);
  }
  lua_pushinteger(L, (lua_Integer)seed);
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x8f4d
testl %eax, %eax
jle 0x3018c
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe462
testl %eax, %eax
movl $0x2f, %ecx
cmovnel %eax, %ecx
movl $0x400, %eax            # imm = 0x400
movl %ecx, %edx
shll $0xd, %edx
xorl %ecx, %edx
movl %edx, %esi
shrl $0x11, %esi
xorl %edx, %esi
movl %esi, %ecx
shll $0x5, %ecx
xorl %esi, %ecx
decl %eax
jne 0x3016b
movl %ecx, 0x1129be(%rip)    # 0x142b48
jmp 0x30192
movl 0x1129b6(%rip), %ecx    # 0x142b48
movl %ecx, %esi
movq %rbx, %rdi
callq 0xa4be
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x112994(%rip), %eax    # 0x142b48
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, 0x112979(%rip)    # 0x142b48
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 0x4b7d(%rip), %xmm0     # 0x34d70
movsd %xmm0, (%rsp)
callq 0x8f4d
movl %eax, %r15d
cmpl $0x2, %eax
je 0x30227
movq %r15, %r14
cmpl $0x1, %eax
je 0x30237
testl %eax, %eax
jne 0x302d2
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0xa4a9
jmp 0x302c1
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe462
movq %rax, %r14
movq %rbx, %rdi
movl %r15d, %esi
callq 0xe462
movq %rax, %r15
movq %rax, %r12
subq %r14, %r12
jge 0x30261
leaq 0x3e3a(%rip), %rdx      # 0x3408e
movq %rbx, %rdi
movl $0x1, %esi
callq 0xdabf
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 0x30295
leaq 0x3e18(%rip), %rdx      # 0x340a0
movq %rbx, %rdi
movl $0x1, %esi
callq 0xdabf
xorps %xmm0, %xmm0
cvtsi2sd %r12, %xmm0
addsd 0x2b3b(%rip), %xmm0     # 0x32de0
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
addq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa4be
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3d9b(%rip), %rsi      # 0x34074
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xdb8f
// File: /workspace/github_c_makefile_star2_O3/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 0xe462
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0xe462
movq %rax, %r15
leal -0x1(%r14), %eax
cmpl $0x3ff, %eax            # imm = 0x3FF
jb 0x30386
leaq 0x51d9(%rip), %rdx      # 0x35552
movq %rbx, %rdi
movl $0x1, %esi
callq 0xdabf
leal -0x1(%r15), %eax
cmpl $0x3ff, %eax            # imm = 0x3FF
jb 0x303a5
leaq 0x51ce(%rip), %rdx      # 0x35566
movq %rbx, %rdi
movl $0x2, %esi
callq 0xdabf
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x308c5
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe339
movq %rax, %r15
movl (%r14), %edi
callq 0x293aa
movslq %eax, %r12
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0xe83c
movl (%r14), %edx
movq %r15, %rdi
movq %rax, %rsi
movl %r12d, %ecx
callq 0x7d1a
movl %eax, %ebp
testl %eax, %eax
jne 0x30425
leaq 0x51ce(%rip), %rsi      # 0x355e9
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdb8f
movslq %ebp, %rsi
leaq 0x10(%rsp), %rdi
callq 0xe780
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_O3/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 0xe339
movq %rax, %r15
movl $0x10000, %edx          # imm = 0x10000
movq %rbx, %rdi
movl $0x2, %esi
callq 0xe4bd
movslq %eax, %r12
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0xe83c
movl (%r14), %edx
movq %r15, %rdi
movq %rax, %rsi
movl %r12d, %ecx
callq 0x2b38b
movl %eax, %ebp
testl %eax, %eax
jne 0x304bb
leaq 0x5136(%rip), %rsi      # 0x355e7
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdb8f
movslq %ebp, %rsi
leaq 0x10(%rsp), %rdi
callq 0xe780
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_O3/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 0xe462
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 0x309eb
movl 0x11261c(%rip), %edi    # 0x142b4c
movq %r15, %rsi
movl $0x10, %edx
callq 0x60f0
testl %eax, %eax
je 0x30556
movzwl %r14w, %edx
leaq 0x50b0(%rip), %rsi      # 0x355fc
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdb8f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1125e4(%rip), %edi    # 0x142b4c
cmpl $-0x1, %edi
je 0x30581
pushq %rax
callq 0x6880
movl $0xffffffff, 0x1125cf(%rip) # imm = 0xFFFFFFFF
addq $0x8, %rsp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x309eb
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 0x112585(%rip), %edi    # 0x142b4c
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 0x6490
testl %eax, %eax
jle 0x306c8
movl 0x11253d(%rip), %eax    # 0x142b4c
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 0x306c8
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 0xe83c
movl 0x1124da(%rip), %edi    # 0x142b4c
movl $0x1000, %edx           # imm = 0x1000
movq %rax, %rsi
xorl %ecx, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0x6390
testl %eax, %eax
js 0x306c8
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0xb8(%rsp), %rdi
movq %rax, %rsi
callq 0xe780
movl 0x14(%rsp), %esi
bswapl %esi
movq %rbx, %rdi
callq 0xa4be
movzwl 0x12(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
movq %rbx, %rdi
callq 0xa4be
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_O3/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 0xe339
movq %rax, %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0xe462
movq %rax, %r12
movq %rbx, %rdi
movl $0x3, %esi
callq 0xe462
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 0x309eb
movl 0x1123f5(%rip), %edi    # 0x142b4c
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 0xad1e
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_O3/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 0xe339
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 0x6600
testl %eax, %eax
sete %cl
movq (%r13), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x3081b
movq 0x18(%rax), %rax
movl 0x4(%rax), %esi
bswapl %esi
movq %r14, %rdi
callq 0xa4be
movq 0x8(%rsp), %rdi
callq 0x6620
jmp 0x3083c
movq %r14, %rdi
callq 0xa495
leaq 0x4e02(%rip), %rsi      # 0x3562c
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xab73
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_O3/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 0x3085d
callq 0x6280
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_O3/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 0x11c04(%rip), %rdi     # 0x424e0
testq %rdi, %rdi
je 0x308e6
callq 0x6370
movq 0x11beb(%rip), %rdi     # 0x424d8
movl $0x16462004, %esi       # imm = 0x16462004
movl $0x1, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x6830
movq %rax, 0x11bd7(%rip)     # 0x424e0
testq %rax, %rax
jne 0x30927
callq 0x6380
leaq 0x4c61(%rip), %rsi      # 0x3557b
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xdb8f
movq 0x11baa(%rip), %rdi     # 0x424d8
movl %r14d, %esi
movl %ebp, %edx
callq 0x61e0
testl %eax, %eax
je 0x30955
callq 0x6380
leaq 0x4c52(%rip), %rsi      # 0x3559a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xdb8f
movl %r14d, 0x111bac(%rip)   # 0x142508
movl %ebp, 0x111baa(%rip)    # 0x14250c
leaq 0x8(%rsp), %rsi
xorl %edi, %edi
callq 0x6710
testl %eax, %eax
je 0x3098b
callq 0x6380
leaq 0x4c42(%rip), %rsi      # 0x355c0
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xdb8f
movl 0xc(%rsp), %eax
movl 0x10(%rsp), %ecx
addl $-0x20, %eax
movl 0x111b6c(%rip), %edi    # 0x142508
cltd
idivl %edi
movl %eax, %esi
addl $-0x20, %ecx
movl 0x111b61(%rip), %r8d    # 0x14250c
movl %ecx, %eax
cltd
idivl %r8d
cmpl %eax, %esi
cmovgel %eax, %esi
imull %esi, %r8d
imull %edi, %esi
movq 0x11b0c(%rip), %rdi     # 0x424d0
movl %r8d, %edx
callq 0x6750
movq 0x11afd(%rip), %rdi     # 0x424d0
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_O3/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 0x6330
testl %eax, %eax
jle 0x30e4b
leaq 0x4958(%rip), %r14      # 0x3576a
xorl %ebp, %ebp
movl %ebp, %edi
callq 0x6800
testl %eax, %eax
je 0x30e40
movl %ebp, %edi
callq 0x6450
testq %rax, %rax
jne 0x30e40
callq 0x6380
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xdb8f
incl %ebp
callq 0x6330
cmpl %eax, %ebp
jl 0x30e14
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x30e50
movq 0x8(%rbx), %rax
movsbl (%rax), %edi
callq 0x61c0
xorl %r14d, %r14d
testl %eax, %eax
je 0x30ebd
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 0x30e93
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x30e78
testl %eax, %eax
jne 0x30edc
movl 0x30(%rbx), %eax
cvtsi2ss %eax, %xmm0
cvtsi2ssl 0x28(%rbx), %xmm1
mulss 0x44bb(%rip), %xmm1     # 0x353a8
divss 0x44db(%rip), %xmm1     # 0x353d0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movss 0x111bd0(%rip), %xmm1   # 0x142ad0
movaps 0x44d9(%rip), %xmm2     # 0x353e0
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
divps %xmm0, %xmm2
movaps %xmm2, %xmm0
shufps $0x55, %xmm2, %xmm0     # xmm0 = xmm0[1,1],xmm2[1,1]
mulss %xmm2, %xmm0
movaps %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x30e50
movq 0x8(%rbx), %rax
cmpb $0x2e, (%rax)
jne 0x30f42
incq %rax
movq %rax, 0x8(%rbx)
movaps (%rsp), %xmm0
mulss 0x4494(%rip), %xmm0     # 0x353d4
jmp 0x30f46
movaps (%rsp), %xmm0
movaps %xmm0, (%rsp)
cvttss2si %xmm0, %eax
movl %eax, 0x20(%rbx)
movq %rbx, %rdi
callq 0x30e50
movq 0x8(%rbx), %rax
cmpb $0x26, (%rax)
jne 0x30f6d
incq %rax
movq %rax, 0x8(%rbx)
xorl %eax, %eax
jmp 0x30f7d
movaps (%rsp), %xmm0
mulss 0x4453(%rip), %xmm0     # 0x353cc
cvttss2si %xmm0, %eax
movl %eax, 0x24(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x30e50
movq 0x8(%rbx), %rax
movl $0x1, %ebp
cmpb $0x23, (%rax)
je 0x30fca
movq %rbx, %rdi
callq 0x30e50
movq 0x8(%rbx), %rax
cmpb $0x2b, (%rax)
je 0x30fca
movq %rbx, %rdi
callq 0x30e50
movq 0x8(%rbx), %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpb $0x2d, (%rax)
jne 0x30fd4
incq %rax
movq %rax, 0x8(%rbx)
addl %ebp, %r14d
movl 0x2c(%rbx), %eax
leal (%rax,%rax,2), %eax
leal (%r14,%rax,4), %eax
addl $-0xc, %eax
cvtsi2sd %eax, %xmm1
addsd 0x3d93(%rip), %xmm1     # 0x34d80
divsd 0x3d93(%rip), %xmm1     # 0x34d88
movsd 0x1e13(%rip), %xmm0     # 0x32e10
callq 0x6550
cvtsd2ss %xmm0, %xmm0
mulss 0x43ca(%rip), %xmm0     # 0x353d8
movss %xmm0, 0x18(%rbx)
movl $0x0, 0x14(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x30ec8