LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: push_onecapture
static void push_onecapture(MatchState*ms,int i,const char*s,
const char*e){
if(i>=ms->level){
if(i==0)
lua_pushlstring(ms->L,s,e-s);
else
luaL_error(ms->L,"invalid capture index");
}
else{
ptrdiff_t l=ms->capture[i].len;
if(l==(-1))luaL_error(ms->L,"unfinished capture");
if(l==(-2))
lua_pushinteger(ms->L,ms->capture[i].init-ms->src_init+1);
else
lua_pushlstring(ms->L,ms->capture[i].init,l);
}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movl 0x1c(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpl 0x18(%rcx), %eax
jl 0x1fc5a
cmpl $0x0, 0x1c(%rsp)
jne 0x1fc3e
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rax
subq %rax, %rdx
callq 0xf860
jmp 0x1fc55
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x36f1(%rip), %rsi      # 0x2333f
movb $0x0, %al
callq 0x10790
jmp 0x1fcff
movq 0x20(%rsp), %rax
addq $0x20, %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
cmpq $-0x1, (%rsp)
jne 0x1fc95
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x36c7(%rip), %rsi      # 0x23355
movb $0x0, %al
callq 0x10790
cmpq $-0x2, (%rsp)
jne 0x1fcd3
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x20(%rsp), %rax
addq $0x20, %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x20(%rsp), %rax
movq (%rax), %rax
subq %rax, %rsi
addq $0x1, %rsi
callq 0x1ab20
jmp 0x1fcfd
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x20(%rsp), %rax
addq $0x20, %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq (%rsp), %rdx
callq 0xf860
jmp 0x1fcff
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: scanformat
static const char*scanformat(lua_State*L,const char*strfrmt,char*form){
const char*p=strfrmt;
while(*p!='\0'&&strchr("-+ #0",*p)!=NULL)p++;
if((size_t)(p-strfrmt)>=sizeof("-+ #0"))
luaL_error(L,"invalid format (repeated flags)");
if(isdigit(uchar(*p)))p++;
if(isdigit(uchar(*p)))p++;
if(*p=='.'){
p++;
if(isdigit(uchar(*p)))p++;
if(isdigit(uchar(*p)))p++;
}
if(isdigit(uchar(*p)))
luaL_error(L,"invalid format (width or precision too long)");
*(form++)='%';
strncpy(form,strfrmt,p-strfrmt+1);
form+=p-strfrmt+1;
*form='\0';
return p;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x7(%rsp)
je 0x1fd5f
movq 0x8(%rsp), %rax
movsbl (%rax), %esi
leaq 0x363b(%rip), %rdi      # 0x2338a
callq 0x3100
cmpq $0x0, %rax
setne %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x1fd69
jmp 0x1fd79
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x1fd2d
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rcx, %rax
cmpq $0x6, %rax
jb 0x1fd9f
movq 0x20(%rsp), %rdi
leaq 0x35f8(%rip), %rsi      # 0x23390
movb $0x0, %al
callq 0x10790
callq 0x32d0
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1fdce
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
callq 0x32d0
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1fdfd
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x1fe78
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
callq 0x32d0
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1fe47
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
callq 0x32d0
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1fe76
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x1fe78
callq 0x32d0
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1feac
movq 0x20(%rsp), %rdi
leaq 0x350b(%rip), %rsi      # 0x233b0
movb $0x0, %al
callq 0x10790
movq 0x10(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rsp)
movb $0x25, (%rax)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rax
subq %rax, %rdx
addq $0x1, %rdx
callq 0x3050
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rcx, %rax
addq $0x1, %rax
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: luaL_checknumber
static lua_Number luaL_checknumber(lua_State*L,int narg){
lua_Number d=lua_tonumber(L,narg);
if(d==0&&!lua_isnumber(L,narg))
tag_error(L,narg,3);
return d;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x1a3e0
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1ff66
jp 0x1ff66
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x117c0
cmpl $0x0, %eax
jne 0x1ff66
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl $0x3, %edx
callq 0x114a0
movsd (%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: addintlen
static void addintlen(char*form){
size_t l=strlen(form);
char spec=form[l-1];
strcpy(form+l-1,"l");
form[l+sizeof("l")-2]=spec;
form[l+sizeof("l")-1]='\0';
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x30f0
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
subq $0x1, %rcx
movb (%rax,%rcx), %al
movb %al, 0x7(%rsp)
movq 0x10(%rsp), %rdi
addq 0x8(%rsp), %rdi
addq $-0x1, %rdi
leaq 0x2c3d(%rip), %rsi      # 0x22bef
callq 0x3070
movb 0x7(%rsp), %dl
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
addq $0x2, %rcx
subq $0x2, %rcx
movb %dl, (%rax,%rcx)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
addq $0x2, %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: gmatch_aux
static int gmatch_aux(lua_State*L){
MatchState ms;
size_t ls;
const char*s=lua_tolstring(L,lua_upvalueindex(1),&ls);
const char*p=lua_tostring(L,lua_upvalueindex(2));
const char*src;
ms.L=L;
ms.src_init=s;
ms.src_end=s+ls;
for(src=s+(size_t)lua_tointeger(L,lua_upvalueindex(3));
src<=ms.src_end;
src++){
const char*e;
ms.level=0;
if((e=match(&ms,src,p))!=NULL){
lua_Integer newstart=e-s;
if(e==src)newstart++;
lua_pushinteger(L,newstart);
lua_replace(L,lua_upvalueindex(3));
return push_captures(&ms,src,e);
}
}
return 0;
}

// Assembly:
subq $0x268, %rsp            # imm = 0x268
movq %rdi, 0x258(%rsp)
movq 0x258(%rsp), %rdi
movl $0xffffd8ed, %esi       # imm = 0xFFFFD8ED
leaq 0x30(%rsp), %rdx
callq 0x3c60
movq %rax, 0x28(%rsp)
movq 0x258(%rsp), %rdi
movl $0xffffd8ec, %esi       # imm = 0xFFFFD8EC
xorl %eax, %eax
movl %eax, %edx
callq 0x3c60
movq %rax, 0x20(%rsp)
movq 0x258(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x28(%rsp), %rax
addq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x258(%rsp), %rdi
movl $0xffffd8eb, %esi       # imm = 0xFFFFD8EB
callq 0x11740
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x40(%rsp), %rax
ja 0x203bf
movl $0x0, 0x50(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x1eca0
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x203aa
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x20369
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x258(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x1ab20
movq 0x258(%rsp), %rdi
movl $0xffffd8eb, %esi       # imm = 0xFFFFD8EB
callq 0x1c010
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x1f0f0
movl %eax, 0x264(%rsp)
jmp 0x203ca
jmp 0x203ac
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x20306
movl $0x0, 0x264(%rsp)
movl 0x264(%rsp), %eax
addq $0x268, %rsp            # imm = 0x268
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: add_value
static void add_value(MatchState*ms,luaL_Buffer*b,const char*s,
const char*e){
lua_State*L=ms->L;
switch(lua_type(L,3)){
case 3:
case 4:{
add_s(ms,b,s,e);
return;
}
case 6:{
int n;
lua_pushvalue(L,3);
n=push_captures(ms,s,e);
lua_call(L,n,1);
break;
}
case 5:{
push_onecapture(ms,0,s,e);
lua_gettable(L,3);
break;
}
}
if(!lua_toboolean(L,-1)){
lua_pop(L,1);
lua_pushlstring(L,s,e-s);
}
else if(!lua_isstring(L,-1))
luaL_error(L,"invalid replacement value (a %s)",luaL_typename(L,-1));
luaL_addvalue(b);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0x10930
movl %eax, %ecx
movl %ecx, %eax
addl $-0x3, %eax
movl %ecx, 0x18(%rsp)
subl $0x2, %eax
jb 0x2043d
jmp 0x20427
movl 0x18(%rsp), %eax
subl $0x5, %eax
je 0x20497
jmp 0x20432
movl 0x18(%rsp), %eax
subl $0x6, %eax
je 0x2045b
jmp 0x204bc
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x20570
jmp 0x20562
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0xf7f0
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x1f0f0
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl $0x1, %edx
callq 0xf480
jmp 0x204bc
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rcx
xorl %esi, %esi
callq 0x1fbf0
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0x20750
movq 0x20(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x10720
cmpl $0x0, %eax
jne 0x204fd
movq 0x20(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x11600
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rax
subq %rax, %rdx
callq 0xf860
jmp 0x20558
movq 0x20(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x11690
cmpl $0x0, %eax
jne 0x20556
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x10930
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x11570
movq 0x10(%rsp), %rdi
movq %rax, %rdx
leaq 0x2eb5(%rip), %rsi      # 0x23404
movb $0x0, %al
callq 0x10790
jmp 0x20558
movq 0x38(%rsp), %rdi
callq 0x1b760
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: add_s
static void add_s(MatchState*ms,luaL_Buffer*b,const char*s,
const char*e){
size_t l,i;
const char*news=lua_tolstring(ms->L,3,&l);
for(i=0;i<l;i++){
if(news[i]!='%')
luaL_addchar(b,news[i]);
else{
i++;
if(!isdigit(uchar(news[i])))
luaL_addchar(b,news[i]);
else if(news[i]=='0')
luaL_addlstring(b,s,e-s);
else{
push_onecapture(ms,news[i]-'1',s,e);
luaL_addvalue(b);
}
}
}
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x3, %esi
leaq 0x20(%rsp), %rdx
callq 0x3c60
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x20740
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x25, %eax
je 0x20633
movq 0x38(%rsp), %rax
movq (%rax), %rcx
movq 0x38(%rsp), %rdx
addq $0x18, %rdx
addq $0x2000, %rdx           # imm = 0x2000
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, 0xf(%rsp)
jb 0x20609
movq 0x38(%rsp), %rdi
callq 0x1b990
cmpq $0x0, %rax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movb (%rax,%rcx), %cl
movq 0x38(%rsp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
jmp 0x2072b
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
callq 0x32d0
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x206c7
movq 0x38(%rsp), %rax
movq (%rax), %rcx
movq 0x38(%rsp), %rdx
addq $0x18, %rdx
addq $0x2000, %rdx           # imm = 0x2000
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, 0xe(%rsp)
jb 0x206a0
movq 0x38(%rsp), %rdi
callq 0x1b990
cmpq $0x0, %rax
setne %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movb (%rax,%rcx), %cl
movq 0x38(%rsp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
jmp 0x20729
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jne 0x206f8
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rax
subq %rax, %rdx
callq 0x1b690
jmp 0x20727
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movsbl (%rax,%rcx), %esi
subl $0x31, %esi
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x1fbf0
movq 0x38(%rsp), %rdi
callq 0x1b760
jmp 0x20729
jmp 0x2072b
jmp 0x2072d
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x205ae
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: luaF_newCclosure
static Closure*luaF_newCclosure(lua_State*L,int nelems,Table*e){
Closure*c=cast(Closure*,luaM_malloc(L,sizeCclosure(nelems)));
luaC_link(L,obj2gco(c),6);
c->c.isC=1;
c->c.env=e;
c->c.nupvalues=cast_byte(nelems);
return c;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %eax
subl $0x1, %eax
cltq
shlq $0x4, %rax
addl $0x38, %eax
movslq %eax, %rcx
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x4b30
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl $0x6, %edx
callq 0xd320
movq 0x8(%rsp), %rax
movb $0x1, 0xa(%rax)
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movl 0x1c(%rsp), %eax
movb %al, %cl
movq 0x8(%rsp), %rax
movb %cl, 0xb(%rax)
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: luaI_openlib
static void luaI_openlib(lua_State*L,const char*libname,
const luaL_Reg*l,int nup){
if(libname){
int size=libsize(l);
luaL_findtable(L,(-10000),"_LOADED",1);
lua_getfield(L,-1,libname);
if(!lua_istable(L,-1)){
lua_pop(L,1);
if(luaL_findtable(L,(-10002),libname,size)!=NULL)
luaL_error(L,"name conflict for module "LUA_QL("%s"),libname);
lua_pushvalue(L,-1);
lua_setfield(L,-3,libname);
}
lua_remove(L,-2);
lua_insert(L,-(nup+1));
}
for(;l->name;l++){
int i;
for(i=0;i<nup;i++)
lua_pushvalue(L,-nup);
lua_pushcclosure(L,l->func,nup);
lua_setfield(L,-(nup+2),l->name);
}
lua_pop(L,nup);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x20920
movq 0x10(%rsp), %rdi
callq 0x209c0
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
leaq 0x2bc3(%rip), %rdx      # 0x23425
movl $0x1, %ecx
callq 0x20a00
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1c290
movq 0x20(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x10930
cmpl $0x5, %eax
je 0x208fc
movq 0x20(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x11600
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
movl 0x8(%rsp), %ecx
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x20a00
cmpq $0x0, %rax
je 0x208d9
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x2b5b(%rip), %rsi      # 0x2342d
movb $0x0, %al
callq 0x10790
movq 0x20(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xf7f0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x3800
movq 0x20(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1a7e0
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %eax
addl $0x1, %eax
xorl %esi, %esi
subl %eax, %esi
callq 0x118a0
jmp 0x20922
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x209a0
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x2095c
movq 0x20(%rsp), %rdi
xorl %esi, %esi
subl 0xc(%rsp), %esi
callq 0xf7f0
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x20935
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
movl 0xc(%rsp), %edx
callq 0xf340
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %eax
addl $0x2, %eax
xorl %esi, %esi
subl %eax, %esi
movq 0x10(%rsp), %rax
movq (%rax), %rdx
callq 0x3800
movq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
jmp 0x20922
movq 0x20(%rsp), %rdi
xorl %esi, %esi
subl 0xc(%rsp), %esi
subl $0x1, %esi
callq 0x11600
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: luaL_findtable
static const char*luaL_findtable(lua_State*L,int idx,
const char*fname,int szhint){
const char*e;
lua_pushvalue(L,idx);
do{
e=strchr(fname,'.');
if(e==NULL)e=fname+strlen(fname);
lua_pushlstring(L,fname,e-fname);
lua_rawget(L,-2);
if(lua_isnil(L,-1)){
lua_pop(L,1);
lua_createtable(L,0,(*e=='.'?1:szhint));
lua_pushlstring(L,fname,e-fname);
lua_pushvalue(L,-2);
lua_settable(L,-4);
}
else if(!lua_istable(L,-1)){
lua_pop(L,2);
return fname;
}
lua_remove(L,-2);
fname=e+1;
}while(*e=='.');
return NULL;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0xf7f0
movq 0x28(%rsp), %rdi
movl $0x2e, %esi
callq 0x3100
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x20a64
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x30f0
movq %rax, %rcx
movq 0x10(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x28(%rsp), %rax
subq %rax, %rdx
callq 0xf860
movq 0x38(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1a210
movq 0x38(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x10930
cmpl $0x0, %eax
jne 0x20b2c
movq 0x38(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x11600
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x20ad8
movl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x20ae0
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %edx
xorl %esi, %esi
callq 0x3630
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x28(%rsp), %rax
subq %rax, %rdx
callq 0xf860
movq 0x38(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xf7f0
movq 0x38(%rsp), %rdi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0x20ba0
jmp 0x20b5d
movq 0x38(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x10930
cmpl $0x5, %eax
je 0x20b5b
movq 0x38(%rsp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x11600
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x20b94
jmp 0x20b5d
movq 0x38(%rsp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1a7e0
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x20a24
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: lua_settable
static void lua_settable(lua_State*L,int idx){
StkId t;
api_checknelems(L,2);
t=index2adr(L,idx);
api_checkvalidindex(L,t);
luaV_settable(L,t,L->top-2,L->top-1);
L->top-=2;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0xfd90
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdx
addq $-0x20, %rdx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x10, %rcx
callq 0xaac0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x20, %rcx
movq %rcx, 0x10(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: tohex
static int tohex(lua_State*L){
UB b=barg(L,1);
int n=lua_isnone(L,2)?8:(int)barg(L,2);
const char*hexdigits="0123456789abcdef";
char buf[8];
int i;
if(n<0){n=-n;hexdigits="0123456789ABCDEF";}
if(n>8)n=8;
for(i=(int)n;--i>=0;){buf[i]=hexdigits[b&15];b>>=4;}
lua_pushlstring(L,buf,(size_t)n);
return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x21130
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x10930
cmpl $-0x1, %eax
jne 0x2107a
movl $0x8, %eax
movl %eax, (%rsp)
jmp 0x2108c
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x21130
movl %eax, (%rsp)
movl (%rsp), %eax
movl %eax, 0x18(%rsp)
leaq 0x23e9(%rip), %rax      # 0x23483
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x18(%rsp)
jge 0x210bc
xorl %eax, %eax
subl 0x18(%rsp), %eax
movl %eax, 0x18(%rsp)
leaq 0x23dd(%rip), %rax      # 0x23494
movq %rax, 0x10(%rsp)
cmpl $0x8, 0x18(%rsp)
jle 0x210cb
movl $0x8, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rsp)
cmpl $0x0, %eax
jl 0x2110a
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
andl $0xf, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %cl
movslq 0x4(%rsp), %rax
movb %cl, 0x8(%rsp,%rax)
movl 0x1c(%rsp), %eax
shrl $0x4, %eax
movl %eax, 0x1c(%rsp)
jmp 0x210d3
movq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movslq 0x18(%rsp), %rdx
callq 0xf860
movl $0x1, %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: barg
static UB barg(lua_State*L,int idx){
union{lua_Number n;U64 b;}bn;
bn.n=lua_tonumber(L,idx)+6755399441055744.0;
if(bn.n==0.0&&!lua_isnumber(L,idx))luaL_typerror(L,idx,"number");
return(UB)bn.b;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x1a3e0
movsd 0x163d(%rip), %xmm1     # 0x22790
addsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x21194
jp 0x21194
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x117c0
cmpl $0x0, %eax
jne 0x21194
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
leaq 0x174d(%rip), %rdx      # 0x228dc
callq 0x114f0
movq (%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: errfile
static int errfile(lua_State*L,const char*what,int fnameindex){
const char*serr=strerror(errno);
const char*filename=lua_tostring(L,fnameindex)+1;
lua_pushfstring(L,"cannot %s %s: %s",what,filename,serr);
lua_remove(L,fnameindex);
return(5+1);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
callq 0x3040
movl (%rax), %edi
callq 0x32b0
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movl 0x14(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3c60
addq $0x1, %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
leaq 0x22c8(%rip), %rsi      # 0x234bf
movb $0x0, %al
callq 0x11350
movq 0x20(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1a7e0
movl $0x6, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/minilua.c
// Function: getF
static const char*getF(lua_State*L,void*ud,size_t*size){
LoadF*lf=(LoadF*)ud;
(void)L;
if(lf->extraline){
lf->extraline=0;
*size=1;
return"\n";
}
if(feof(lf->f))return NULL;
*size=fread(lf->buff,1,sizeof(lf->buff),lf->f);
return(*size>0)?lf->buff:NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, (%rax)
je 0x2126c
movq 0x10(%rsp), %rax
movl $0x0, (%rax)
movq 0x18(%rsp), %rax
movq $0x1, (%rax)
leaq 0x1870(%rip), %rax      # 0x22ad5
movq %rax, 0x30(%rsp)
jmp 0x212e4
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x31a0
cmpl $0x0, %eax
je 0x2128a
movq $0x0, 0x30(%rsp)
jmp 0x212e4
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rcx
movl $0x1, %esi
movl $0x2000, %edx           # imm = 0x2000
callq 0x30b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
jbe 0x212d1
movq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x8(%rsp)
jmp 0x212da
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x212da
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.13/spin-condvar.c
// Function: main
int main(){
	int i, flag_is_set;
	pthread_t thread_id;
	char option;

	initialize_flag();

	pthread_create(&thread_id, NULL, &thread_function, NULL);

	printf("Presione enter para empezar a generar listas aleatorias...\n");

	getchar();

	do{
		set_thread_flag(1);

		while(get_thread_flag());

		for(i = 0; i < TAM; ++i)
			printf("%d, ", lista_random[i]);

		printf("\nGenerar otra?: (s/n)\n");
		scanf("%c", &option);
		getchar();
		printf("\n");

	}while(option == 's');

	printf("\nPrograma finalizado!\n");
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
callq 0x1320
leaq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq 0xbd(%rip), %rdx        # 0x12b0
movq %rcx, %rsi
callq 0x1080
leaq 0xe02(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1030
callq 0x1050
movl $0x1, %edi
callq 0x12e0
callq 0x1390
cmpl $0x0, %eax
je 0x1224
jmp 0x1218
movl $0x0, -0x8(%rbp)
cmpl $0x14, -0x8(%rbp)
jge 0x1258
movslq -0x8(%rbp), %rcx
leaq 0x2e54(%rip), %rax      # 0x4090
movl (%rax,%rcx,4), %esi
leaq 0xdfa(%rip), %rdi       # 0x2040
movb $0x0, %al
callq 0x1030
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x122b
leaq 0xde6(%rip), %rdi       # 0x2045
movb $0x0, %al
callq 0x1030
leaq 0xdef(%rip), %rdi       # 0x205c
leaq -0x19(%rbp), %rsi
movb $0x0, %al
callq 0x1090
callq 0x1050
leaq 0xdf0(%rip), %rdi       # 0x2074
movb $0x0, %al
callq 0x1030
movsbl -0x19(%rbp), %eax
cmpl $0x73, %eax
je 0x120e
leaq 0xdc0(%rip), %rdi       # 0x205f
movb $0x0, %al
callq 0x1030
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.13/spin-condvar.c
// Function: thread_function
void* thread_function (void* thread_arg){
	srand(time(NULL));
	while (1) {
		if (get_thread_flag())
			do_work ();
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1060
movl %eax, %edi
callq 0x1040
callq 0x1390
cmpl $0x0, %eax
je 0x12db
callq 0x1340
jmp 0x12cc
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.13/spin-condvar.c
// Function: do_work
void do_work(){
	int i;
	for(i = 0; i < TAM; ++i)
		lista_random[i] = rand() % 100;
	set_thread_flag(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x14, -0x4(%rbp)
jge 0x137b
callq 0x10c0
movl $0x64, %ecx
cltd
idivl %ecx
movslq -0x4(%rbp), %rcx
leaq 0x2d23(%rip), %rax      # 0x4090
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x134f
xorl %edi, %edi
callq 0x12e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.13/spin-condvar.c
// Function: get_thread_flag
int get_thread_flag(){
	int flag_is_set;
	/* Protect the flag with a mutex lock. */
	pthread_mutex_lock (&thread_flag_mutex);
	flag_is_set = thread_flag;
	pthread_mutex_unlock (&thread_flag_mutex);

	return flag_is_set;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2d41(%rip), %rdi      # 0x40e0
callq 0x10b0
movl 0x2d5e(%rip), %eax      # 0x4108
movl %eax, -0x4(%rbp)
leaq 0x2d2c(%rip), %rdi      # 0x40e0
callq 0x1070
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/demo/output.c
// Function: main
int main(int argc, char **argv) {
    (void)argc; (void)argv;
    int ret = tb_init();
    if (ret) {
        fprintf(stderr, "tb_init() failed with error code %d\n", ret);
        return 1;
    }

    draw_all();

    struct tb_event ev;
    while (tb_poll_event(&ev)) {
        switch (ev.type) {
        case TB_EVENT_KEY:
            switch (ev.key) {
            case TB_KEY_ESC:
                goto done;
                break;
            }
            break;
        case TB_EVENT_RESIZE:
            draw_all();
            break;
        }
    }
done:
    tb_shutdown();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x3e70
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x33a8
movq 0x6c6d(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movl -0x14(%rbp), %edx
leaq 0x3c6c(%rip), %rsi      # 0x7004
movb $0x0, %al
callq 0x3160
movl $0x1, -0x4(%rbp)
jmp 0x33f8
callq 0x3410
leaq -0x2c(%rbp), %rdi
callq 0x49f0
cmpl $0x0, %eax
je 0x33ea
movzbl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
subl $0x1, %eax
je 0x33d3
jmp 0x33c9
movl -0x30(%rbp), %eax
subl $0x2, %eax
je 0x33e3
jmp 0x33e8
movw -0x2a(%rbp), %ax
subw $0x1b, %ax
jne 0x33e1
jmp 0x33df
jmp 0x33ec
jmp 0x33e8
callq 0x3410
jmp 0x33ad
jmp 0x33ec
callq 0x3e90
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/demo/output.c
// Function: print_combinations_table
static void print_combinations_table(int sx, int sy, const uint16_t *attrs, int attrs_n) {
    int i, c;
    for (i = 0; i < attrs_n; i++) {
        for (c = TB_DEFAULT; c <= TB_WHITE; c++) {
            uint16_t bg = attrs[i] | c;
            draw_line(sx, sy, bg);
            sy++;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3694
movl $0x0, -0x1c(%rbp)
cmpl $0x8, -0x1c(%rbp)
jg 0x3687
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
orl -0x1c(%rbp), %eax
movw %ax, -0x1e(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movzwl -0x1e(%rbp), %edx
callq 0x36a0
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x364b
jmp 0x3689
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x363c
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/demo/output.c
// Function: draw_line
static void draw_line(int x, int y, uint16_t bg) {
    int a, c;
    int current_char = 0;
    for (a = 0; a < 4; a++) {
        for (c = TB_DEFAULT; c <= TB_WHITE; c++) {
            uint16_t fg = all_attrs[a] | c;
            tb_change_cell(x, y, chars[current_char], fg, bg);
            current_char = next_char(current_char);
            x++;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x4, -0x10(%rbp)
jge 0x373e
movl $0x0, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jg 0x3731
movslq -0x10(%rbp), %rcx
leaq 0x3955(%rip), %rax      # 0x7036
movzwl (%rax,%rcx,2), %eax
orl -0x14(%rbp), %eax
movw %ax, -0x1a(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movslq -0x18(%rbp), %rcx
leaq 0x3943(%rip), %rax      # 0x7040
movsbl (%rax,%rcx), %edx
movw -0x1a(%rbp), %ax
movzwl %ax, %ecx
movzwl -0xa(%rbp), %r8d
callq 0x4800
movl -0x18(%rbp), %edi
callq 0x3750
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x36d0
jmp 0x3733
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x36c3
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/demo/output.c
// Function: next_char
static int next_char(int current) {
    current++;
    if (!chars[current])
        current = 0;
    return current;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x38d5(%rip), %rax      # 0x7040
cmpb $0x0, (%rax,%rcx)
jne 0x3778
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: bytebuffer_init
static void bytebuffer_init(struct bytebuffer *b, int cap) {
    b->cap = 0;
    b->len = 0;
    b->buf = 0;

    if (cap > 0) {
        b->cap = cap;
        b->buf = malloc(cap); // just assume malloc works always
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
cmpl $0x0, -0xc(%rbp)
jle 0x3bf3
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movslq -0xc(%rbp), %rdi
callq 0x31b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: send_clear
static void send_clear(void) {
    send_attr(foreground, background);
    bytebuffer_puts(&output_buffer, funcs[T_CLEAR_SCREEN]);
    if (!IS_CURSOR_HIDDEN(cursor_x, cursor_y))
        write_cursor(cursor_x, cursor_y);
    bytebuffer_flush(&output_buffer, inout);

    /* we need to invalidate cursor position too and these two vars are
     * used only for simple cursor positioning optimization, cursor
     * actually may be in the correct place, but we simply discard
     * optimization once and it gives us simple solution for the case when
     * cursor moved */
    lastx = LAST_COORD_INIT;
    lasty = LAST_COORD_INIT;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw 0x6d89(%rip), %ax       # 0xa9d4
movzwl %ax, %edi
movzwl 0x6d81(%rip), %esi      # 0xa9d6
callq 0x4390
movq 0x6d47(%rip), %rax      # 0xa9a8
movq 0x20(%rax), %rsi
leaq 0x6d2c(%rip), %rdi      # 0xa998
callq 0x3c00
cmpl $-0x1, 0x64d8(%rip)     # 0xa150
je 0x3c94
cmpl $-0x1, 0x64d3(%rip)     # 0xa154
je 0x3c94
movl 0x64c7(%rip), %edi      # 0xa150
movl 0x64c5(%rip), %esi      # 0xa154
callq 0x4640
movl 0x6ca6(%rip), %esi      # 0xa940
leaq 0x6cf7(%rip), %rdi      # 0xa998
callq 0x3fe0
movl $0xffffffff, 0x6498(%rip) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x6492(%rip) # imm = 0xFFFFFFFF
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: update_term_size
static void update_term_size(void) {
    struct winsize sz;
    memset(&sz, 0, sizeof(sz));

    ioctl(inout, TIOCGWINSZ, &sz);

    termw = sz.ws_col > 0 ? sz.ws_col : 80;
    termh = sz.ws_row > 0 ? sz.ws_row : 24;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x3100
movl 0x6c62(%rip), %edi      # 0xa940
movl $0x5413, %esi           # imm = 0x5413
leaq -0x8(%rbp), %rdx
movb $0x0, %al
callq 0x3110
movzwl -0x6(%rbp), %eax
cmpl $0x0, %eax
jle 0x3d00
movzwl -0x6(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3d0a
movl $0x50, %eax
movl %eax, -0xc(%rbp)
jmp 0x3d0a
movl -0xc(%rbp), %eax
movl %eax, 0x642d(%rip)      # 0xa140
movzwl -0x8(%rbp), %eax
cmpl $0x0, %eax
jle 0x3d25
movzwl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x3d2f
movl $0x18, %eax
movl %eax, -0x10(%rbp)
jmp 0x3d2f
movl -0x10(%rbp), %eax
movl %eax, 0x640c(%rip)      # 0xa144
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: cellbuf_init
static void cellbuf_init(struct cellbuf *buf, int width, int height) {
    buf->cells =
        (struct tb_cell *)malloc(sizeof(struct tb_cell) * width * height);
    assert(buf->cells);
    buf->width = width;
    buf->height = height;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movslq -0xc(%rbp), %rdi
shlq $0x3, %rdi
movslq -0x10(%rbp), %rax
imulq %rax, %rdi
callq 0x31b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3d7f
jmp 0x3d9e
leaq 0x35e5(%rip), %rdi      # 0x736b
leaq 0x35e9(%rip), %rsi      # 0x7376
movl $0x3ff, %edx            # imm = 0x3FF
leaq 0x35e7(%rip), %rcx      # 0x7380
callq 0x30e0
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: cellbuf_clear
static void cellbuf_clear(struct cellbuf *buf) {
    int i;
    int ncells = buf->width * buf->height;

    for (i = 0; i < ncells; ++i) {
        buf->cells[i].ch = ' ';
        buf->cells[i].fg = foreground;
        buf->cells[i].bg = background;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
imull 0x4(%rcx), %eax
movl %eax, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x3e36
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movl $0x20, (%rax,%rcx,8)
movw 0x6bd2(%rip), %dx       # 0xa9d4
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movw %dx, 0x4(%rax,%rcx,8)
movw 0x6bbc(%rip), %dx       # 0xa9d6
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movw %dx, 0x6(%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3de0
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: tb_shutdown
void tb_shutdown(void) {
    if (termw == -1) {
        fputs("tb_shutdown() should not be called twice.", stderr);
        abort();
    }

    bytebuffer_puts(&output_buffer, funcs[T_SHOW_CURSOR]);
    bytebuffer_puts(&output_buffer, funcs[T_SGR0]);
    bytebuffer_puts(&output_buffer, funcs[T_CLEAR_SCREEN]);
    bytebuffer_puts(&output_buffer, funcs[T_EXIT_CA]);
    bytebuffer_puts(&output_buffer, funcs[T_EXIT_KEYPAD]);
    bytebuffer_puts(&output_buffer, funcs[T_EXIT_MOUSE]);
    bytebuffer_flush(&output_buffer, inout);
    tcsetattr(inout, TCSAFLUSH, &orig_tios);

    shutdown_term();
    close(inout);
    close(winch_fds[0]);
    close(winch_fds[1]);

    cellbuf_free(&back_buffer);
    cellbuf_free(&front_buffer);
    bytebuffer_free(&output_buffer);
    bytebuffer_free(&input_buffer);
    termw = termh = -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $-0x1, 0x62a5(%rip)     # 0xa140
jne 0x3eb8
movq 0x6154(%rip), %rax      # 0x9ff8
movq (%rax), %rsi
leaq 0x3243(%rip), %rdi      # 0x70f1
callq 0x30f0
callq 0x3050
movq 0x6ae9(%rip), %rax      # 0xa9a8
movq 0x10(%rax), %rsi
leaq 0x6ace(%rip), %rdi      # 0xa998
callq 0x3c00
movq 0x6ad2(%rip), %rax      # 0xa9a8
movq 0x28(%rax), %rsi
leaq 0x6ab7(%rip), %rdi      # 0xa998
callq 0x3c00
movq 0x6abb(%rip), %rax      # 0xa9a8
movq 0x20(%rax), %rsi
leaq 0x6aa0(%rip), %rdi      # 0xa998
callq 0x3c00
movq 0x6aa4(%rip), %rax      # 0xa9a8
movq 0x8(%rax), %rsi
leaq 0x6a89(%rip), %rdi      # 0xa998
callq 0x3c00
movq 0x6a8d(%rip), %rax      # 0xa9a8
movq 0x58(%rax), %rsi
leaq 0x6a72(%rip), %rdi      # 0xa998
callq 0x3c00
movq 0x6a76(%rip), %rax      # 0xa9a8
movq 0x68(%rax), %rsi
leaq 0x6a5b(%rip), %rdi      # 0xa998
callq 0x3c00
movl 0x69f8(%rip), %esi      # 0xa940
leaq 0x6a49(%rip), %rdi      # 0xa998
callq 0x3fe0
movl 0x69e6(%rip), %edi      # 0xa940
movl $0x2, %esi
leaq 0x69e6(%rip), %rdx      # 0xa94c
callq 0x31f0
callq 0x4020
movl 0x69ca(%rip), %edi      # 0xa940
callq 0x3120
movl 0x69c3(%rip), %edi      # 0xa944
callq 0x3120
movl 0x69bc(%rip), %edi      # 0xa948
callq 0x3120
leaq 0x6a18(%rip), %rdi      # 0xa9b0
callq 0x40b0
leaq 0x6a1c(%rip), %rdi      # 0xa9c0
callq 0x40b0
leaq 0x69e8(%rip), %rdi      # 0xa998
callq 0x40d0
leaq 0x69cc(%rip), %rdi      # 0xa988
callq 0x40d0
movl $0xffffffff, 0x6179(%rip) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x616b(%rip) # imm = 0xFFFFFFFF
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: shutdown_term
static void shutdown_term(void) {
    if (init_from_terminfo) {
        int i;
        for (i = 0; i < TB_KEYS_NUM; i++) {
            free((void *)keys[i]);
        }
        // the last two entries are reserved for mouse. because the table offset
        // is not there, the two entries have to fill in manually and do not
        // need to be freed.
        for (i = 0; i < T_FUNCS_NUM - 2; i++) {
            free((void *)funcs[i]);
        }
        free(keys);
        free(funcs);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
testb $0x1, 0x69a9(%rip)      # 0xa9d8
je 0x40a1
movl $0x0, -0x4(%rbp)
cmpl $0x16, -0x4(%rbp)
jge 0x405d
movq 0x699b(%rip), %rax      # 0xa9e0
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x3040
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x4038
movl $0x0, -0x4(%rbp)
cmpl $0xc, -0x4(%rbp)
jge 0x4089
movq 0x6937(%rip), %rax      # 0xa9a8
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x3040
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x4064
movq 0x6950(%rip), %rdi      # 0xa9e0
callq 0x3040
movq 0x690c(%rip), %rdi      # 0xa9a8
callq 0x3040
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: update_size
static void update_size(void) {
    update_term_size();
    cellbuf_resize(&back_buffer, termw, termh);
    cellbuf_resize(&front_buffer, termw, termh);
    cellbuf_clear(&front_buffer);
    send_clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x3cc0
movl 0x5df1(%rip), %esi      # 0xa140
movl 0x5def(%rip), %edx      # 0xa144
leaq 0x6654(%rip), %rdi      # 0xa9b0
callq 0x5990
movl 0x5dd9(%rip), %esi      # 0xa140
movl 0x5dd7(%rip), %edx      # 0xa144
leaq 0x664c(%rip), %rdi      # 0xa9c0
callq 0x5990
leaq 0x6640(%rip), %rdi      # 0xa9c0
callq 0x3dc0
callq 0x3c40
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: send_char
static void send_char(int x, int y, uint32_t c) {
    char buf[7];
    int bw = tb_utf8_unicode_to_char(buf, c);
    if (x - 1 != lastx || y != lasty)
        write_cursor(x, y);
    lastx = x;
    lasty = y;
    if (!c)
        buf[0] = ' '; // replace 0 with whitespace
    bytebuffer_append(&output_buffer, buf, bw);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
leaq -0x13(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x6550
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %eax
subl $0x1, %eax
cmpl 0x5b5c(%rip), %eax      # 0xa148
jne 0x45f9
movl -0x8(%rbp), %eax
cmpl 0x5b55(%rip), %eax      # 0xa14c
je 0x4604
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x4640
movl -0x4(%rbp), %eax
movl %eax, 0x5b3b(%rip)      # 0xa148
movl -0x8(%rbp), %eax
movl %eax, 0x5b36(%rip)      # 0xa14c
cmpl $0x0, -0xc(%rbp)
jne 0x4620
movb $0x20, -0x13(%rbp)
leaq -0x13(%rbp), %rsi
movl -0x18(%rbp), %edx
leaq 0x636a(%rip), %rdi      # 0xa998
callq 0x55c0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: write_cursor
static void write_cursor(int x, int y) {
    char buf[32];
    WRITE_LITERAL("\033[");
    WRITE_INT(y + 1);
    WRITE_LITERAL(";");
    WRITE_INT(x + 1);
    WRITE_LITERAL("H");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq 0x6343(%rip), %rdi      # 0xa998
leaq 0x2d0c(%rip), %rsi      # 0x7368
movl $0x2, %edx
callq 0x55c0
leaq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x8(%rbp), %edi
addl $0x1, %edi
leaq -0x30(%rbp), %rsi
callq 0x5620
movq -0x40(%rbp), %rsi
movl %eax, %edx
leaq 0x630e(%rip), %rdi      # 0xa998
callq 0x55c0
leaq 0x6302(%rip), %rdi      # 0xa998
leaq 0x2d15(%rip), %rsi      # 0x73b2
movl $0x1, %edx
callq 0x55c0
leaq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x4(%rbp), %edi
addl $0x1, %edi
leaq -0x30(%rbp), %rsi
callq 0x5620
movq -0x38(%rbp), %rsi
movl %eax, %edx
leaq 0x62cd(%rip), %rdi      # 0xa998
callq 0x55c0
leaq 0x62c1(%rip), %rdi      # 0xa998
leaq 0x2bde(%rip), %rsi      # 0x72bc
movl $0x1, %edx
callq 0x55c0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: tb_set_cursor
void tb_set_cursor(int cx, int cy) {
    if (IS_CURSOR_HIDDEN(cursor_x, cursor_y) && !IS_CURSOR_HIDDEN(cx, cy))
        bytebuffer_puts(&output_buffer, funcs[T_SHOW_CURSOR]);

    if (!IS_CURSOR_HIDDEN(cursor_x, cursor_y) && IS_CURSOR_HIDDEN(cx, cy))
        bytebuffer_puts(&output_buffer, funcs[T_HIDE_CURSOR]);

    cursor_x = cx;
    cursor_y = cy;
    if (!IS_CURSOR_HIDDEN(cursor_x, cursor_y))
        write_cursor(cursor_x, cursor_y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
cmpl $-0x1, 0x5a4b(%rip)     # 0xa150
je 0x4710
cmpl $-0x1, 0x5a46(%rip)     # 0xa154
jne 0x4733
cmpl $-0x1, -0x4(%rbp)
je 0x4733
cmpl $-0x1, -0x8(%rbp)
je 0x4733
movq 0x6285(%rip), %rax      # 0xa9a8
movq 0x10(%rax), %rsi
leaq 0x626a(%rip), %rdi      # 0xa998
callq 0x3c00
cmpl $-0x1, 0x5a16(%rip)     # 0xa150
je 0x4768
cmpl $-0x1, 0x5a11(%rip)     # 0xa154
je 0x4768
cmpl $-0x1, -0x4(%rbp)
je 0x4751
cmpl $-0x1, -0x8(%rbp)
jne 0x4768
movq 0x6250(%rip), %rax      # 0xa9a8
movq 0x18(%rax), %rsi
leaq 0x6235(%rip), %rdi      # 0xa998
callq 0x3c00
movl -0x4(%rbp), %eax
movl %eax, 0x59df(%rip)      # 0xa150
movl -0x8(%rbp), %eax
movl %eax, 0x59da(%rip)      # 0xa154
cmpl $-0x1, 0x59cf(%rip)     # 0xa150
je 0x479d
cmpl $-0x1, 0x59ca(%rip)     # 0xa154
je 0x479d
movl 0x59be(%rip), %edi      # 0xa150
movl 0x59bc(%rip), %esi      # 0xa154
callq 0x4640
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: tb_put_cell
void tb_put_cell(int x, int y, const struct tb_cell *cell) {
    if ((unsigned)x >= (unsigned)back_buffer.width)
        return;
    if ((unsigned)y >= (unsigned)back_buffer.height)
        return;
    CELL(&back_buffer, x, y) = *cell;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x61e9(%rip), %eax      # 0xa9b0
jb 0x47cb
jmp 0x47fa
movl -0x8(%rbp), %eax
cmpl 0x61e0(%rip), %eax      # 0xa9b4
jb 0x47d8
jmp 0x47fa
movq 0x61d9(%rip), %rax      # 0xa9b8
movl -0x8(%rbp), %ecx
imull 0x61c7(%rip), %ecx      # 0xa9b0
addl -0x4(%rbp), %ecx
movslq %ecx, %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
movq %rdx, (%rax,%rcx,8)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/termbox[P]termbox/termbox.c
// Function: tb_peek_event
int tb_peek_event(struct tb_event *event, int timeout) {
    struct timeval tv;
    tv.tv_sec = timeout / 1000;
    tv.tv_usec = (timeout - (tv.tv_sec * 1000)) * 1000;
    return wait_fill_event(event, &tv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
cltq
movq %rax, -0x20(%rbp)
movslq -0xc(%rbp), %rax
imulq $0x3e8, -0x20(%rbp), %rcx # imm = 0x3E8
subq %rcx, %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x4a10
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)