LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/goodpaul6[P]generic/hashmap.c
// Function: free_bucket
static void free_bucket(hashmap_node_t* bucket)
{
	if(!bucket) return;
	
	hashmap_node_t* node = bucket;
	hashmap_node_t* next = NULL;
	
	while(node)
	{
		next = node->next;
		free(node->key);
		free(node);
		node = next;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x122f5
jmp 0x12337
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x12337
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2030
movq -0x10(%rbp), %rdi
callq 0x2030
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x12305
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/woffer.c
// Function: file_outfn
static void file_outfn(const char *buf,int len,void *context) // {{{
{
  FILE *f=(FILE *)context;
  if (fwrite(buf,1,len,f)!=len) {
    fprintf(stderr,"Short write: %m\n");
    assert(0);
    return;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x11d0
movslq -0xc(%rbp), %rcx
cmpq %rcx, %rax
je 0x19a1
movq 0x9667(%rip), %rax      # 0xafd8
movq (%rax), %rdi
leaq 0x68d8(%rip), %rsi      # 0x8253
movb $0x0, %al
callq 0x1170
leaq 0x6fca(%rip), %rdi      # 0x8953
leaq 0x68d4(%rip), %rsi      # 0x8264
movl $0x78, %edx
leaq 0x68d1(%rip), %rcx      # 0x826d
callq 0x10d0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/codeniko[P]CS214-Malloc-Free/Test3.c
// Function: main
void main()
{
    int i;
    for(i = 0; i < 5; i++){
        int* p = malloc(sizeof(int));
        *p = i;
        printf("address: %p, value: %d\n",p, *p);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x5, -0x4(%rbp)
jge 0x11ab
movl $0x4, %edi
leaq 0xe93(%rip), %rsi       # 0x2004
movl $0x8, %edx
callq 0x11c0
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movl (%rax), %edx
leaq 0xe73(%rip), %rdi       # 0x200c
movb $0x0, %al
callq 0x1030
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x115f
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/./kbhit.c
// Function: kbhit
int kbhit(void){
    struct termios oldt, newt;
    int ch;
    int oldf;

    tcgetattr(STDIN_FILENO, &oldt);
    newt = oldt;
    newt.c_lflag &= ~(ICANON | ECHO);
    tcsetattr(STDIN_FILENO, TCSANOW, &newt);
    oldf = fcntl(STDIN_FILENO, F_GETFL, 0);
    fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK);

    ch = getchar();

    tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
    fcntl(STDIN_FILENO, F_SETFL, oldf);

    if (ch != EOF) {
        ungetc(ch, stdin);
        return 1;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
xorl %edi, %edi
leaq -0x40(%rbp), %rsi
callq 0x1120
leaq -0x7c(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x3c, %edx
callq 0x10e0
movl -0x70(%rbp), %eax
andl $-0xb, %eax
movl %eax, -0x70(%rbp)
xorl %esi, %esi
leaq -0x7c(%rbp), %rdx
movl %esi, %edi
callq 0x1130
xorl %edx, %edx
movl $0x3, %esi
movl %edx, %edi
movb $0x0, %al
callq 0x1040
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %edx
orl $0x800, %edx            # imm = 0x800
xorl %edi, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x1040
callq 0x10d0
movl %eax, -0x80(%rbp)
xorl %esi, %esi
leaq -0x40(%rbp), %rdx
movl %esi, %edi
callq 0x1130
movl -0x84(%rbp), %edx
xorl %edi, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x1040
cmpl $-0x1, -0x80(%rbp)
je 0x1358
movl -0x80(%rbp), %edi
movq 0x2c99(%rip), %rax      # 0x3fe0
movq (%rax), %rsi
callq 0x1110
movl $0x1, -0x4(%rbp)
jmp 0x135f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/petit15writer.c
// Function: log_date
void log_date(char *s){
    time_t error_time;
    struct tm *error_time_st;
    
    time(&error_time);
    error_time_st = localtime(&error_time);
    printf("%4d/%02d/%02d %02d:%02d:%02d %s\n",
        error_time_st->tm_year+1900,
        error_time_st->tm_mon+1,
        error_time_st->tm_mday,
        error_time_st->tm_hour,
        error_time_st->tm_min,
        error_time_st->tm_sec,
        s
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x10f0
leaq -0x10(%rbp), %rdi
callq 0x1030
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl $0x76c, %esi            # imm = 0x76C
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edx
addl $0x1, %edx
movq -0x18(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x8(%rax), %r8d
movq -0x18(%rbp), %rax
movl 0x4(%rax), %r9d
movq -0x18(%rbp), %rax
movl (%rax), %r10d
movq -0x8(%rbp), %rax
leaq 0xc32(%rip), %rdi       # 0x2004
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x1080
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/petit15writer.c
// Function: uart_open
int uart_open(char const *device, struct termios *saveattr)
{
    struct termios ComTio;                          // シリアル端末設定用の構造体変数
    speed_t speed = B115200;                        // 通信速度の設定

    ComFd=open(device, O_RDWR|O_NONBLOCK);   // シリアルポートのオープン

    if (ComFd < 0) {
        return -1;
    }
    tcgetattr(ComFd, &ComTio_Bk);           // 現在のシリアル端末設定状態を保存
    ComTio.c_iflag = 0;                     // シリアル入力設定の初期化
    ComTio.c_oflag = 0;                     // シリアル出力設定の初期化
    ComTio.c_cflag = CLOCAL|CREAD|CS8;      // シリアル制御設定の初期化
    ComTio.c_lflag = 0;                     // シリアルローカル設定の初期化
    bzero(ComTio.c_cc,sizeof(ComTio.c_cc)); // シリアル特殊文字設定の初期化
    cfsetispeed(&ComTio, speed);            // シリアル入力の通信速度の設定
    cfsetospeed(&ComTio, speed);            // シリアル出力の通信速度の設定
    ComTio.c_cc[VMIN] = 0;                  // リード待ち容量0バイト(待たない)
    ComTio.c_cc[VTIME] = 1;                 // リード待ち時間
    tcflush(ComFd,TCIFLUSH);                // バッファのクリア
    tcsetattr(ComFd, TCSANOW, &ComTio);     // シリアル端末に設定
    return ComFd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1002, -0x58(%rbp)    # imm = 0x1002
movq -0x10(%rbp), %rdi
movl $0x802, %esi            # imm = 0x802
movb $0x0, %al
callq 0x1140
movl %eax, 0x2ccb(%rip)      # 0x40e8
cmpl $0x0, 0x2cc4(%rip)      # 0x40e8
jge 0x1432
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x14bb
movl 0x2cb0(%rip), %edi      # 0x40e8
leaq 0x2cad(%rip), %rsi      # 0x40ec
callq 0x1120
movl $0x0, -0x54(%rbp)
movl $0x0, -0x50(%rbp)
movl $0x8b0, -0x4c(%rbp)     # imm = 0x8B0
movl $0x0, -0x48(%rbp)
leaq -0x54(%rbp), %rdi
addq $0x11, %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x10a0
movl -0x58(%rbp), %esi
leaq -0x54(%rbp), %rdi
callq 0x1150
movl -0x58(%rbp), %esi
leaq -0x54(%rbp), %rdi
callq 0x1050
movb $0x0, -0x3d(%rbp)
movb $0x1, -0x3e(%rbp)
movl 0x2c4e(%rip), %edi      # 0x40e8
xorl %esi, %esi
callq 0x1070
movl 0x2c41(%rip), %edi      # 0x40e8
xorl %esi, %esi
leaq -0x54(%rbp), %rdx
callq 0x1130
movl 0x2c30(%rip), %eax      # 0x40e8
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bokunimowakaru[P]petit15term/petit15writer.c
// Function: read_serial_port
char read_serial_port(void){
    char c='\0';                                    // シリアル受信した文字の代入用
    fd_set ComReadFds;                              // select命令用構造体ComReadFdを定義
    struct timeval tv;                              // タイムアウト値の保持用
    FD_ZERO(&ComReadFds);                           // ComReadFdの初期化
    FD_SET(ComFd, &ComReadFds);                     // ファイルディスクリプタを設定
    tv.tv_sec=0; tv.tv_usec=10000;                  // 受信のタイムアウト設定(10ms)
    if(select(ComFd+1, &ComReadFds, 0, 0, &tv)) read(ComFd, &c, 1); // データを受信
    usleep(5000);                                   // 5msの(IchigoJam処理)待ち時間
    return c;                                       // 戻り値＝受信データ(文字変数c)
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb $0x0, -0x1(%rbp)
leaq -0x88(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl $0x0, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
cmpq $0x10, %rax
jae 0x1529
movq -0xa8(%rbp), %rax
movl -0x9c(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x14f7
jmp 0x152b
movl 0x2bb7(%rip), %eax      # 0x40e8
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl 0x2b9a(%rip), %eax      # 0x40e8
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x88(%rbp,%rax,8), %rcx
movq %rcx, -0x88(%rbp,%rax,8)
movq $0x0, -0x98(%rbp)
movq $0x2710, -0x90(%rbp) # imm = 0x2710
movl 0x2b64(%rip), %edi      # 0x40e8
addl $0x1, %edi
leaq -0x88(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x98(%rbp), %r8
movq %rcx, %rdx
callq 0x1100
cmpl $0x0, %eax
je 0x15ba
movl 0x2b3c(%rip), %edi      # 0x40e8
leaq -0x1(%rbp), %rsi
movl $0x1, %edx
callq 0x10c0
movl $0x1388, %edi           # imm = 0x1388
callq 0x1190
movb -0x1(%rbp), %al
addq $0xb0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/marcespie[P]unix-samples/lab/pollsig1.c
// Function: main
int
main()
{
	struct pollfd pfd[1];

	int pip[2];
	errwrap(pipe(pip));

	int pid;

	errwrap(pid = fork());
	if (pid == 0) {
		sleep(5);
		fprintf(stderr, "Okay thxbye\n");
		exit(0);
	}

	// now we "wait"
	pfd[0].fd = pip[0];
	pfd[0].events = POLLIN;
	// note that by default this WON'T exit, with SIGCHLD's default
	// behavior.
	int n = poll(pfd, 1, INFTIM);
	if (n == -1 && errno == EINTR) {
		fprintf(stderr, "Everything is okay\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x14(%rbp), %rdi
callq 0x1040
cmpl $-0x1, %eax
jne 0x11e0
movl $0x1, %edi
leaq 0xe2b(%rip), %rsi       # 0x2004
movb $0x0, %al
callq 0x1060
jmp 0x11e2
jmp 0x11e4
callq 0x10a0
movl %eax, -0x18(%rbp)
cmpl $-0x1, %eax
jne 0x1204
movl $0x1, %edi
leaq 0xe11(%rip), %rsi       # 0x200e
movb $0x0, %al
callq 0x1060
jmp 0x1206
cmpl $0x0, -0x18(%rbp)
jne 0x1235
movl $0x5, %edi
callq 0x1090
movq 0x2ddb(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xdf4(%rip), %rsi       # 0x201b
movb $0x0, %al
callq 0x1050
xorl %edi, %edi
callq 0x1080
movl -0x14(%rbp), %eax
movl %eax, -0xc(%rbp)
movw $0x1, -0x8(%rbp)
leaq -0xc(%rbp), %rdi
movl $0x1, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1070
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x127f
callq 0x1030
cmpl $0x4, (%rax)
jne 0x127f
movq 0x2d8a(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xdb0(%rip), %rsi       # 0x2028
movb $0x0, %al
callq 0x1050
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/src/object.c
// Function: createObject
robj *createObject(int type, void *ptr) {
    robj *o = zmalloc(sizeof(*o));
    o->type = type;
    o->encoding = OBJ_ENCODING_RAW;
    o->ptr = ptr;
    o->refcount = 1;

    /* Set the LRU to the current lruclock (minutes resolution). */
    o->lru = LRU_CLOCK();

#ifdef AOF_NO_COW
    o->aof_version = server.aof_no_cow.version;
    o->shared = 0;
#endif

    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x10, %edi
callq 0x3ac60
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xf, %edx
andl $-0x10, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movl $0x3e8, %eax            # imm = 0x3E8
leaq 0x145d24(%rip), %rcx    # 0x18e198
cltd
idivl 0x20(%rcx)
cmpl $0x3e8, %eax            # imm = 0x3E8
jg 0x48493
leaq 0x145d12(%rip), %rax    # 0x18e198
movl 0x48(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x1c(%rbp)
jmp 0x4849b
callq 0x309f0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/src/object.c
// Function: createEmbeddedStringObject
robj *createEmbeddedStringObject(const char *ptr, size_t len) {
    robj *o = zmalloc(sizeof(robj)+sizeof(struct sdshdr8)+len+1);
    struct sdshdr8 *sh = (void*)(o+1);

    o->type = OBJ_STRING;
    o->encoding = OBJ_ENCODING_EMBSTR;
    o->ptr = sh+1;
    o->refcount = 1;
    o->lru = LRU_CLOCK();

#ifdef AOF_NO_COW
    o->aof_version = server.aof_no_cow.version;
    o->shared = 0;
#endif

    sh->len = len;
    sh->alloc = len;
    sh->flags = SDS_TYPE_8;
    if (ptr) {
        memcpy(sh->buf,ptr,len);
        sh->buf[len] = '\0';
    } else {
        memset(sh->buf,0,len+1);
    }
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x13, %rdi
addq $0x1, %rdi
callq 0x3ac60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $-0x10, %ecx
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x80, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
addq $0x3, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movl $0x3e8, %eax            # imm = 0x3E8
leaq 0x145c1e(%rip), %rcx    # 0x18e198
cltd
idivl 0x20(%rcx)
cmpl $0x3e8, %eax            # imm = 0x3E8
jg 0x48599
leaq 0x145c0c(%rip), %rax    # 0x18e198
movl 0x48(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x24(%rbp)
jmp 0x485a1
callq 0x309f0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x2(%rax)
cmpq $0x0, -0x8(%rbp)
je 0x48609
movq -0x20(%rbp), %rdi
addq $0x3, %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x26c70
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x0, 0x3(%rax,%rcx)
jmp 0x48620
movq -0x20(%rbp), %rdi
addq $0x3, %rdi
movq -0x10(%rbp), %rdx
addq $0x1, %rdx
xorl %esi, %esi
callq 0x26110
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: stopAppendOnly
void stopAppendOnly(void) {
    serverAssert(server.aof_state != AOF_OFF);
    flushAppendOnlyFile(1);
    aof_fsync(server.aof_fd);
    close(server.aof_fd);

    server.aof_fd = -1;
    server.aof_selected_db = -1;
    server.aof_state = AOF_OFF;
    /* rewrite operation in progress? kill it, wait child exit */
    if (server.aof_child_pid != -1) {
        int statloc;

        serverLog(LL_NOTICE,"Killing running AOF rewrite child: %ld",
            (long) server.aof_child_pid);
        if (kill(server.aof_child_pid,SIGUSR1) != -1) {
#ifndef AOF_NO_COW
            while(wait3(&statloc,0,NULL) != server.aof_child_pid);
#else
            while(wait3(&statloc, __WALL, NULL) != server.aof_child_pid);
#endif
        }
        /* reset the buffer accumulating changes while the child saves */
        aofRewriteBufferReset();
        aofRemoveTempFile(server.aof_child_pid);
        server.aof_child_pid = -1;
        server.aof_rewrite_time_start = -1;
        /* close pipes used for IPC between the two processes. */
        aofClosePipes();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x11d879(%rip), %rax    # 0x18e198
cmpl $0x0, 0x658(%rax)
je 0x7092a
jmp 0x7094c
leaq 0xe19fa(%rip), %rdi     # 0x15232b
leaq 0xe1a0f(%rip), %rsi     # 0x152347
movl $0xd6, %edx
callq 0x769b0
movl $0x1, %edi
callq 0x263d0
movl $0x1, %edi
callq 0x70a70
leaq 0x11d83b(%rip), %rax    # 0x18e198
movl 0x6a0(%rax), %edi
callq 0x26570
leaq 0x11d829(%rip), %rax    # 0x18e198
movl 0x6a0(%rax), %edi
callq 0x26180
leaq 0x11d817(%rip), %rax    # 0x18e198
movl $0xffffffff, 0x6a0(%rax) # imm = 0xFFFFFFFF
leaq 0x11d806(%rip), %rax    # 0x18e198
movl $0xffffffff, 0x6a4(%rax) # imm = 0xFFFFFFFF
leaq 0x11d7f5(%rip), %rax    # 0x18e198
movl $0x0, 0x658(%rax)
leaq 0x11d7e4(%rip), %rax    # 0x18e198
cmpl $-0x1, 0x68c(%rax)
je 0x70a61
leaq 0x11d7d0(%rip), %rax    # 0x18e198
movslq 0x68c(%rax), %rdx
movl $0x2, %edi
leaq 0xe1972(%rip), %rsi     # 0x15234d
movb $0x0, %al
callq 0x2fc60
leaq 0x11d7af(%rip), %rax    # 0x18e198
movl 0x68c(%rax), %edi
movl $0xa, %esi
callq 0x26680
cmpl $-0x1, %eax
je 0x70a22
jmp 0x70a00
leaq -0x4(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x26880
leaq 0x11d782(%rip), %rcx    # 0x18e198
cmpl 0x68c(%rcx), %eax
je 0x70a20
jmp 0x70a00
jmp 0x70a22
callq 0x70420
leaq 0x11d76a(%rip), %rax    # 0x18e198
movl 0x68c(%rax), %edi
callq 0x71130
leaq 0x11d758(%rip), %rax    # 0x18e198
movl $0xffffffff, 0x68c(%rax) # imm = 0xFFFFFFFF
leaq 0x11d747(%rip), %rax    # 0x18e198
movq $-0x1, 0x6c0(%rax)
callq 0x71170
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/src/cluster.c
// Function: representClusterNodeFlags
sds representClusterNodeFlags(sds ci, uint16_t flags) {
    if (flags == 0) {
        ci = sdscat(ci,"noflags,");
    } else {
        int i, size = sizeof(redisNodeFlagsTable)/sizeof(struct redisNodeFlags);
        for (i = 0; i < size; i++) {
            struct redisNodeFlags *nodeflag = redisNodeFlagsTable + i;
            if (flags & nodeflag->flag) ci = sdscat(ci, nodeflag->name);
        }
    }
    sdsIncrLen(ci,-1); /* Remove trailing comma. */
    return ci;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
cmpl $0x0, %eax
jne 0x7ed82
movq -0x8(%rbp), %rdi
leaq 0xd696e(%rip), %rsi     # 0x1556e5
callq 0x39060
movq %rax, -0x8(%rbp)
jmp 0x7ede4
movl $0x7, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x7ede2
movslq -0x10(%rbp), %rcx
leaq 0x10e47d(%rip), %rax    # 0x18d220
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movzwl -0xa(%rbp), %eax
movq -0x20(%rbp), %rcx
movzwl (%rcx), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x7edd5
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x39060
movq %rax, -0x8(%rbp)
jmp 0x7edd7
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7ed90
jmp 0x7ede4
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x38c70
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/src/cluster.c
// Function: clusterDelNodeSlots
int clusterDelNodeSlots(clusterNode *node) {
    int deleted = 0, j;

    for (j = 0; j < CLUSTER_SLOTS; j++) {
        if (clusterNodeGetSlotBit(node,j)) clusterDelSlot(j);
        deleted++;
    }
    return deleted;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x4000, -0x10(%rbp)    # imm = 0x4000
jge 0x807a0
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x819b0
cmpl $0x0, %eax
je 0x8078c
movl -0x10(%rbp), %edi
callq 0x7d640
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x8076a
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/src/cluster.c
// Function: clusterRedirectBlockedClientIfNeeded
int clusterRedirectBlockedClientIfNeeded(client *c) {
    if (c->flags & CLIENT_BLOCKED && c->btype == BLOCKED_LIST) {
        dictEntry *de;
        dictIterator *di;

        /* If the cluster is down, unblock the client with the right error. */
        if (server.cluster->state == CLUSTER_FAIL) {
            clusterRedirectClient(c,NULL,0,CLUSTER_REDIR_DOWN_STATE);
            return 1;
        }

        di = dictGetIterator(c->bpop.keys);
        while((de = dictNext(di)) != NULL) {
            robj *key = dictGetKey(de);
            int slot = keyHashSlot((char*)key->ptr, sdslen(key->ptr));
            clusterNode *node = server.cluster->slots[slot];

            /* We send an error and unblock the client if:
             * 1) The slot is unassigned, emitting a cluster down error.
             * 2) The slot is not handled by this node, nor being imported. */
            if (node != myself &&
                server.cluster->importing_slots_from[slot] == NULL)
            {
                if (node == NULL) {
                    clusterRedirectClient(c,NULL,0,
                        CLUSTER_REDIR_DOWN_UNBOUND);
                } else {
                    clusterRedirectClient(c,node,slot,
                        CLUSTER_REDIR_MOVED);
                }
                return 1;
            }
        }
        dictReleaseIterator(di);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x872c5
movq -0x10(%rbp), %rax
cmpl $0x1, 0x168(%rax)
jne 0x872c5
leaq 0x106fee(%rip), %rax    # 0x18e198
movq 0x9a0(%rax), %rax
cmpl $0x1, 0x10(%rax)
jne 0x871d7
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x5, %ecx
callq 0x87010
movl $0x1, -0x4(%rbp)
jmp 0x872cc
movq -0x10(%rbp), %rax
movq 0x178(%rax), %rdi
callq 0x2e400
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x872bc
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x7cc30
movq -0x40(%rbp), %rdi
movl %eax, %esi
callq 0x7dbe0
movl %eax, -0x2c(%rbp)
leaq 0x106f5d(%rip), %rax    # 0x18e198
movq 0x9a0(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq 0x40028(%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq 0x11b8b3(%rip), %rax    # 0x1a2b10
je 0x872b7
leaq 0x106f32(%rip), %rax    # 0x18e198
movq 0x9a0(%rax), %rax
movslq -0x2c(%rbp), %rcx
cmpq $0x0, 0x20028(%rax,%rcx,8)
jne 0x872b7
cmpq $0x0, -0x38(%rbp)
jne 0x87299
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x6, %ecx
callq 0x87010
jmp 0x872ae
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl $0x4, %ecx
callq 0x87010
movl $0x1, -0x4(%rbp)
jmp 0x872cc
jmp 0x871eb
movq -0x20(%rbp), %rdi
callq 0x2e600
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/trumabrat[P]GrandProjet/hachageMain.c
// Function: main
int main()
{
    // Q4.2
    float k;
    for (int i = 0; i < 11; i++)
    {
        for (int j = 0; j < 11; j++)
        {
            k = fonctionCle(i, j);
            printf("x = %d, y = %d, k = %.2f\n", i, j, k);
        }
    }

    // lecture et creation d'une instance de Chaines et de Reseau
    FILE* f = NULL;
    f = fopen("00014_burma.cha", "r");
    Chaines *c = lectureChaines(f);
    fclose(f);
    Reseau *R = reconstitueReseauHachage(c, 5);
    FILE* f2 = NULL;

    // // l'enregistrement dans un fichier
    f2 = fopen("resHachage.txt", "w");
    ecrireReseau(R, f2);
    fclose(f2);

    // affichage
    afficheReseauSVG(R, "resoHachage");

    // liberation de memoire
    liberer_chaines(c);
    liberation_reseau(R);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0xb, -0xc(%rbp)
jge 0x310a
movl $0x0, -0x10(%rbp)
cmpl $0xb, -0x10(%rbp)
jge 0x30fd
cvtsi2sdl -0xc(%rbp), %xmm0
cvtsi2sdl -0x10(%rbp), %xmm1
callq 0x1220
fstps -0x34(%rbp)
movss -0x34(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movss -0x8(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1306(%rip), %rdi      # 0x43f1
movb $0x1, %al
callq 0x1080
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x30b3
jmp 0x30ff
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x30a6
movq $0x0, -0x18(%rbp)
leaq 0x12f2(%rip), %rdi      # 0x440b
leaq 0x12fb(%rip), %rsi      # 0x441b
callq 0x10d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2810
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1070
movq -0x20(%rbp), %rdi
movl $0x5, %esi
callq 0x15d0
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
leaq 0x12bd(%rip), %rdi      # 0x441d
leaq 0x10c7(%rip), %rsi      # 0x422e
callq 0x10d0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1e00
movq -0x30(%rbp), %rdi
callq 0x1070
movq -0x28(%rbp), %rdi
leaq 0x129b(%rip), %rsi      # 0x442c
callq 0x2090
movq -0x20(%rbp), %rdi
callq 0x3060
movq -0x28(%rbp), %rdi
callq 0x2420
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/eric-lo[P]3150/6-Memory/data_vs_bss.c
// Function: main
int main(void) {
	static int static_data = 10;
	static int static_bss;

	printf("global  bss = %p\n", &global_bss);
	printf("static  bss = %p\n", &static_bss);
	printf("global data = %p\n", &global_data);
	printf("static data = %p\n", &static_data);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
leaq 0xeae(%rip), %rdi       # 0x2004
leaq 0x2ee3(%rip), %rsi      # 0x4040
movb $0x0, %al
callq 0x1030
leaq 0xeab(%rip), %rdi       # 0x2016
leaq 0x2eca(%rip), %rsi      # 0x403c
movb $0x0, %al
callq 0x1030
leaq 0xea8(%rip), %rdi       # 0x2028
leaq 0x2ea9(%rip), %rsi      # 0x4030
movb $0x0, %al
callq 0x1030
leaq 0xea5(%rip), %rdi       # 0x203a
leaq 0x2e98(%rip), %rsi      # 0x4034
movb $0x0, %al
callq 0x1030
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/alloc.c
// Function: alloc_homes
void alloc_homes(program_t *prog) {
    pair_t *pair;
    map_for_each(prog->fn_defs, pair) {
        fn_def_t *curr_fn = pair->value;
        debug("allocating for function %s\n", string_get(curr_fn->name));
        curr_fn->sp_offset = alloc_scoped_env(curr_fn->env, 0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
addq $0x10, %rdi
leaq -0x10(%rbp), %rsi
callq 0x49c0
testb $0x1, %al
jne 0x1278
jmp 0x12a2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x1286
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x12b0
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x125b
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/alloc.c
// Function: alloc_scoped_env
static int alloc_scoped_env(env_t *env, int offset) {
    pair_t *pair;

    // Allocate homes for each variable at the current level
    map_for_each(env->homes, pair) {
        var_info_t *v = pair->value;
        string_t *name = pair->key;

        offset -= 8;
        debug("Found variable %s\n", string_get(name));
        v->home.reg = REG_RBP;
        v->home.offset = offset;
    }

    // Recursively allocate vars for all child envs
    env_t *child_env;
    list_for_each(env->children, child_env) {
        int child_offset = alloc_scoped_env(child_env, offset); 
        if (child_offset < offset)
            offset = child_offset;
    }

    return offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
addq $0x10, %rdi
leaq -0x18(%rbp), %rsi
callq 0x49c0
testb $0x1, %al
jne 0x12fb
jmp 0x1336
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
subl $0x8, %eax
movl %eax, -0xc(%rbp)
jmp 0x131d
movq -0x20(%rbp), %rax
movl $0x5, 0x8(%rax)
movslq -0xc(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x12de
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x10, %rdi
leaq -0x30(%rbp), %rsi
callq 0x49c0
testb $0x1, %al
jne 0x136c
jmp 0x138b
movq -0x30(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x12b0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1389
movl -0x34(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x1351
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: gen_asm
list_t *gen_asm(program_t *prog) {
    if (!prog || !prog->fn_defs) {
        UNREACHABLE("gen_asm: malformed program\n");
    }
    debug("=====================Generating ASM=====================\n");
    list_t *output = list_new();

    pair_t *fn_pair;
    map_for_each(prog->fn_defs, fn_pair) {
        fn_def_t *fn_def = fn_pair->value;
        if (!fn_def->stmts)
            continue;
        list_t *fn_instrs = fn_def_to_asm(fn_def);
        if (!fn_instrs) {
            UNREACHABLE("gen_asm: null fn_instrs\n");
        }
        list_concat(output, fn_instrs);
    }
    debug("length: %d\n", output->len);
    return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x13bd
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x13ea
jmp 0x13bf
leaq 0x7c3e(%rip), %rdi      # 0x9004
leaq 0x7c71(%rip), %rsi      # 0x903e
movl $0x354, %edx            # imm = 0x354
leaq 0x7c6b(%rip), %rcx      # 0x9044
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
jmp 0x13ec
jmp 0x13ee
callq 0x45f0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
addq $0x10, %rdi
leaq -0x18(%rbp), %rsi
callq 0x49c0
testb $0x1, %al
jne 0x1433
jmp 0x149f
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x144c
jmp 0x1416
movq -0x20(%rbp), %rdi
callq 0x14b0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x148d
jmp 0x1462
leaq 0x7b9b(%rip), %rdi      # 0x9004
leaq 0x7bce(%rip), %rsi      # 0x903e
movl $0x360, %edx            # imm = 0x360
leaq 0x7be4(%rip), %rcx      # 0x9060
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x4740
jmp 0x1416
jmp 0x14a1
jmp 0x14a3
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: new_label
static output_t *new_label(string_t *name, int linkage) {
    output_t *ret = malloc(sizeof(output_t));
    ret->type = OUTPUT_LABEL;
    ret->label.name = name;
    ret->label.linkage = linkage;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x40, %edi
callq 0x10e0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: fn_callee_prologue
static list_t *fn_callee_prologue(fn_def_t *fn_def) {
    // function prologue
    list_t *ret = list_new();

    // Allocate space for locals
    list_push(ret, instr_r(OP_PUSH, REG_RBP));
    list_push(ret, instr_r2r(OP_MOV, REG_RSP, REG_RBP));
    list_push(ret, instr_i2r(OP_ADD, fn_def->sp_offset, REG_RSP));

    // Save callee-save registers
    list_push(ret, instr_r(OP_PUSH, REG_RBX));
    //list_push(ret, instr_r(OP_PUSH, REG_R12));
    //list_push(ret, instr_r(OP_PUSH, REG_R13));
    //list_push(ret, instr_r(OP_PUSH, REG_R14));
    //list_push(ret, instr_r(OP_PUSH, REG_R15));

    if (!fn_def->params || !fn_def->params->len)
        return ret;

    // Move parameters from registers into their homes on the stack
    string_t *var_name;
    var_info_t *var_info;
    int param_number = 0;
    list_for_each(fn_def->params, var_name) {
        var_info = map_get(fn_def->env->homes, var_name);
        list_push(ret, instr_r2m(OP_MOV, ordered_param_regs[param_number++], var_info->home));
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
callq 0x45f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x8, %edi
movl $0x5, %esi
callq 0x2650
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x1, %edi
movl $0x6, %esi
movl $0x5, %edx
callq 0x2720
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movl $0x2, %edi
movl $0x6, %edx
callq 0x2810
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x8, %edi
movl $0x2, %esi
callq 0x2650
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1777
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x18(%rax)
jne 0x1784
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1824
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x10, %rdi
leaq -0x20(%rbp), %rsi
callq 0x49c0
testb $0x1, %al
jne 0x17c1
jmp 0x181c
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x4ba0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x2c(%rbp)
movslq %eax, %rcx
leaq 0x7e1a(%rip), %rax      # 0x9610
movl (%rax,%rcx,4), %esi
movq -0x28(%rbp), %rax
movl 0x8(%rax), %edx
movq 0x10(%rax), %rcx
movl $0x1, %edi
callq 0x2900
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
jmp 0x17a6
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: unique_label
static string_t *unique_label(char *seed) {
    static int count = 0;
    char buf[32];

    string_t *name = string_new();
    string_append(name, seed, strnlen(seed, 100));

    snprintf(buf, 32, "%d", count++);
    string_append(name, buf, strnlen(buf, 32));
    return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
callq 0x7a40
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movl $0x64, %esi
callq 0x10a0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl %eax, %edx
callq 0x7a80
leaq -0x30(%rbp), %rdi
movl 0xb830(%rip), %ecx      # 0xd0ac
movl %ecx, %eax
addl $0x1, %eax
movl %eax, 0xb825(%rip)      # 0xd0ac
movl $0x20, %esi
leaq 0x78e7(%rip), %rdx      # 0x917a
movb $0x0, %al
callq 0x1080
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
movl $0x20, %esi
callq 0x10a0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %eax, %edx
callq 0x7a80
movq -0x38(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: fn_callee_epilogue
static list_t *fn_callee_epilogue(void) {
    list_t *ret = list_new();

    // Restore callee-save registers
    //list_push(ret, instr_r(OP_PUSH, REG_R15));
    //list_push(ret, instr_r(OP_PUSH, REG_R14));
    //list_push(ret, instr_r(OP_PUSH, REG_R13));
    //list_push(ret, instr_r(OP_PUSH, REG_R12));
    list_push(ret, instr_r(OP_PUSH, REG_RBX));

    list_push(ret, instr_r2r(OP_MOV, REG_RBP, REG_RSP));
    list_push(ret, instr_r(OP_POP, REG_RBP));

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x45f0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x8, %edi
movl $0x2, %esi
callq 0x2650
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x1, %edi
movl $0x5, %esi
movl $0x6, %edx
callq 0x2720
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x9, %edi
movl $0x5, %esi
callq 0x2650
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x46a0
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: instr_noarg
static output_t *instr_noarg(opcode_t op) {
    output_t *out = malloc(sizeof(output_t));
    if (!out) {
        UNREACHABLE("instr: malloc failed");
    }

    out->instr.num_args = op_to_num_args(op);
    if (out->instr.num_args != 0) {
        UNREACHABLE("instr: opcode has nonzero number of args\n");
    }

    out->type = OUTPUT_INSTR;
    out->instr.op = op;

    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x40, %edi
callq 0x10e0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x25dd
jmp 0x25b2
leaq 0x6a4b(%rip), %rdi      # 0x9004
leaq 0x6a7e(%rip), %rsi      # 0x903e
movl $0xcc, %edx
leaq 0x7003(%rip), %rcx      # 0x95cf
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movl -0x4(%rbp), %edi
callq 0x29c0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x2625
jmp 0x25fa
leaq 0x6a03(%rip), %rdi      # 0x9004
leaq 0x6a36(%rip), %rsi      # 0x903e
movl $0xd1, %edx
leaq 0x6fd0(%rip), %rcx      # 0x95e4
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: instr_r
static output_t *instr_r(opcode_t op, reg_t src) {
    output_t *out = malloc(sizeof(output_t));
    if (!out) {
        UNREACHABLE("instr_r: malloc failed\n");
    }

    out->instr.num_args = op_to_num_args(op);
    if (out->instr.num_args != 1) {
        UNREACHABLE("instr_r: num args != 1 for this opcode\n");
    }

    out->type = OUTPUT_INSTR;
    out->instr.op = op;

    out->instr.src.type = OPERAND_REG;
    out->instr.src.reg = src;
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x40, %edi
callq 0x10e0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x26a0
jmp 0x2675
leaq 0x6988(%rip), %rdi      # 0x9004
leaq 0x69bb(%rip), %rsi      # 0x903e
movl $0xa2, %edx
leaq 0x6a17(%rip), %rcx      # 0x90a6
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movl -0x4(%rbp), %edi
callq 0x29c0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
cmpl $0x1, 0xc(%rax)
je 0x26e8
jmp 0x26bd
leaq 0x6940(%rip), %rdi      # 0x9004
leaq 0x6973(%rip), %rsi      # 0x903e
movl $0xa7, %edx
leaq 0x69e7(%rip), %rcx      # 0x90be
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x10(%rax)
movl -0x8(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: instr_r2r
static output_t *instr_r2r(opcode_t op, reg_t src, reg_t dst) {
    output_t *out = malloc(sizeof(output_t));
    if (!out) {
        UNREACHABLE("instr_r2r: malloc failed\n");
    }

    out->instr.num_args = op_to_num_args(op);
    if (out->instr.num_args != 2) {
        UNREACHABLE("instr_r2r: num args != 2\n");
    }

    out->type = OUTPUT_INSTR;
    out->instr.op = op;
    out->instr.src.type = OPERAND_REG;
    out->instr.src.reg = src;

    out->instr.dst.type = OPERAND_REG;
    out->instr.dst.reg = dst;
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl $0x40, %edi
callq 0x10e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2773
jmp 0x2748
leaq 0x68b5(%rip), %rdi      # 0x9004
leaq 0x68e8(%rip), %rsi      # 0x903e
movl $0x3d, %edx
leaq 0x6984(%rip), %rcx      # 0x90e6
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movl -0x4(%rbp), %edi
callq 0x29c0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
cmpl $0x2, 0xc(%rax)
je 0x27bb
jmp 0x2790
leaq 0x686d(%rip), %rdi      # 0x9004
leaq 0x68a0(%rip), %rsi      # 0x903e
movl $0x42, %edx
leaq 0x6956(%rip), %rcx      # 0x9100
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movl -0x8(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x28(%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: instr_i2r
static output_t *instr_i2r(opcode_t op, imm_t src, reg_t dst) {
    output_t *out = malloc(sizeof(output_t));
    if (!out) {
        UNREACHABLE("instr_i2r: malloc failed\n");
    }

    out->instr.num_args = op_to_num_args(op);
    if (out->instr.num_args != 2) {
        UNREACHABLE("instr_i2r: num args != 2\n");
    }

    out->type = OUTPUT_INSTR;
    out->instr.op = op;

    out->instr.src.type = OPERAND_IMM;
    out->instr.src.imm = src;

    out->instr.dst.type = OPERAND_REG;
    out->instr.dst.reg = dst;
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x40, %edi
callq 0x10e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2864
jmp 0x2839
leaq 0x67c4(%rip), %rdi      # 0x9004
leaq 0x67f7(%rip), %rsi      # 0x903e
movl $0x52, %edx
leaq 0x68c7(%rip), %rcx      # 0x911a
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movl -0x4(%rbp), %edi
callq 0x29c0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rax
cmpl $0x2, 0xc(%rax)
je 0x28ac
jmp 0x2881
leaq 0x677c(%rip), %rdi      # 0x9004
leaq 0x67af(%rip), %rsi      # 0x903e
movl $0x57, %edx
leaq 0x6899(%rip), %rcx      # 0x9134
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movl -0x4(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x3, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x28(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: instr_r2m
static output_t *instr_r2m(opcode_t op, reg_t src, mem_loc_t dst) {
    output_t *out = malloc(sizeof(output_t)); 
    out->instr.num_args = op_to_num_args(op);
    if (out->instr.num_args != 2) {
        UNREACHABLE("instr_r2m requires opcode that uses 2 args\n");
    }

    out->type = OUTPUT_INSTR;
    out->instr.op = op;

    out->instr.src.type = OPERAND_REG;
    out->instr.src.reg = src;

    out->instr.dst.type = OPERAND_MEM_LOC;
    out->instr.dst.mem = dst;
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edx, -0x10(%rbp)
movq %rcx, -0x8(%rbp)
movl %edi, -0x14(%rbp)
movl %esi, -0x18(%rbp)
movl $0x40, %edi
callq 0x10e0
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %edi
callq 0x29c0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rax
cmpl $0x2, 0xc(%rax)
je 0x296b
jmp 0x2940
leaq 0x66bd(%rip), %rdi      # 0x9004
leaq 0x66f0(%rip), %rsi      # 0x903e
movl $0x69, %edx
leaq 0x67f4(%rip), %rcx      # 0x914e
movb $0x0, %al
callq 0x1070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x10(%rax)
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x28(%rax)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/johnvtan[P]ccccc/asm.c
// Function: op_to_num_args
static int op_to_num_args(opcode_t op) {
    switch (op) {
        case OP_ADD:
        case OP_MOV:
        case OP_CMP:
        case OP_SUB:
        case OP_MUL:
        case OP_XCHG:
            return 2;
        case OP_NEG:
        case OP_NOT:
        case OP_SETE:
        case OP_PUSH:
        case OP_POP:
        case OP_DIV:
        case OP_SETNE:
        case OP_SETL:
        case OP_SETLE:
        case OP_SETG:
        case OP_SETGE:
        case OP_JMP:
        case OP_JE:
        case OP_JNE:
        case OP_CALL:
            return 1;
        case OP_RET:
        case OP_CQO:
        default:
            return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
decl %eax
subl $0x2, %eax
jb 0x2a2f
jmp 0x29d6
movl -0xc(%rbp), %eax
subl $0x3, %eax
je 0x2a41
jmp 0x29e0
movl -0xc(%rbp), %eax
subl $0x4, %eax
je 0x2a2f
jmp 0x29ea
movl -0xc(%rbp), %eax
addl $-0x5, %eax
subl $0x5, %eax
jb 0x2a38
jmp 0x29f7
movl -0xc(%rbp), %eax
addl $-0xa, %eax
subl $0x2, %eax
jb 0x2a2f
jmp 0x2a04
movl -0xc(%rbp), %eax
subl $0xc, %eax
je 0x2a38
jmp 0x2a0e
movl -0xc(%rbp), %eax
subl $0xd, %eax
je 0x2a2f
jmp 0x2a18
movl -0xc(%rbp), %eax
subl $0xe, %eax
je 0x2a41
jmp 0x2a22
movl -0xc(%rbp), %eax
addl $-0xf, %eax
subl $0x9, %eax
jb 0x2a38
jmp 0x2a43
movl $0x2, -0x4(%rbp)
jmp 0x2a4a
movl $0x1, -0x4(%rbp)
jmp 0x2a4a
jmp 0x2a43
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop