LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: process_session
int process_session(struct task *t) {
    struct session *s = t->context;

    process_cli(s);

    if (s->cli_state != CL_STCLOSE) {
	struct timeval min1;
	s->res_cw = s->res_cr = RES_SILENT;

	tv_min(&min1, &s->crexpire, &s->cwexpire);
	tv_min(&t->expire, &min1, &s->cnexpire);

	/* restore t to its place in the task list */
	task_queue(t);

	return tv_remain2(&now, &t->expire); /* nothing more to do */
    }

    if (s->srv)
	s->srv->cur_sess--;

    s->proxy->nbconn--;
    actconn--;
    
    if ((global.mode & MODE_DEBUG) && (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))) {
	int len;
	len = sprintf(trash, "%08x:%s.closed[%04x:%04x]\n", s->uniq_id, s->proxy->id, (unsigned short)s->cli_fd, (unsigned short)-1);
	(void)!write(1, trash, len);
    }

    /* the task MUST not be in the run queue anymore */
    task_delete(t);
    session_free(s);
    task_free(t);
    return TIME_ETERNITY; /* rest in peace for eternity */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5b20
movq -0x18(%rbp), %rax
cmpl $0x5, 0x4c(%rax)
je 0x5592
movq -0x18(%rbp), %rax
movb $0x0, 0x38(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x39(%rax)
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
movq -0x18(%rbp), %rdx
addq $0x18, %rdx
leaq -0x28(%rbp), %rdi
callq 0x56b0
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movq -0x18(%rbp), %rdx
addq $0x28, %rdx
leaq -0x28(%rbp), %rsi
callq 0x56b0
movq -0x10(%rbp), %rdi
callq 0x3870
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
leaq 0xbe8b(%rip), %rdi      # 0x11410
callq 0x84c0
movl %eax, -0x4(%rbp)
jmp 0x5674
movq -0x18(%rbp), %rax
cmpq $0x0, 0xf0(%rax)
je 0x55b4
movq -0x18(%rbp), %rax
movq 0xf0(%rax), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x40(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x40(%rax)
movl 0x2ce75(%rip), %eax     # 0x32440
addl $-0x1, %eax
movl %eax, 0x2ce6c(%rip)     # 0x32440
movl 0xbe02(%rip), %eax      # 0x113dc
andl $0x1, %eax
cmpl $0x0, %eax
je 0x5652
movl 0xbdf4(%rip), %eax      # 0x113dc
andl $0x10, %eax
cmpl $0x0, %eax
je 0x55fe
movl 0xbde6(%rip), %eax      # 0x113dc
andl $0x40, %eax
cmpl $0x0, %eax
je 0x5652
movq -0x18(%rbp), %rax
movl 0x118(%rax), %edx
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x38(%rax), %rcx
movq -0x18(%rbp), %rax
movl 0x48(%rax), %eax
movzwl %ax, %r8d
leaq 0x2be1a(%rip), %rdi     # 0x31440
leaq 0x8e0b(%rip), %rsi      # 0xe438
movl $0xffff, %r9d           # imm = 0xFFFF
movb $0x0, %al
callq 0x23d0
movl %eax, -0x2c(%rbp)
movslq -0x2c(%rbp), %rdx
movl $0x1, %edi
leaq 0x2bdf3(%rip), %rsi     # 0x31440
callq 0x20e0
movq -0x10(%rbp), %rdi
callq 0x3b60
movq -0x18(%rbp), %rdi
callq 0x8590
movq -0x10(%rbp), %rdi
callq 0x8620
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: tv_min
static inline struct timeval *tv_min(struct timeval *tvmin,
				     struct timeval *tv1, struct timeval *tv2) {

    if (tv_cmp2(tv1, tv2) <= 0)
	*tvmin = *tv1;
    else
	*tvmin = *tv2;

    return tvmin;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3ba0
cmpl $0x0, %eax
jg 0x56ee
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x5704
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: buffer_replace
int buffer_replace(struct buffer *b, char *pos, char *end, char *str) {
    int delta;
    int len;

    len = strlen(str);
    delta = len - (end - pos);

    if (delta + b->r >= b->data + BUFSIZE)
	return 0;  /* no space left */

    /* first, protect the end of the buffer */
    memmove(end + delta, end, b->data + b->l - end);

    /* now, copy str over pos */
    memcpy(pos, str,len);

    /* we only move data after the displaced zone */
    if (b->r  > pos) b->r  += delta;
    if (b->w  > pos) b->w  += delta;
    if (b->h  > pos) b->h  += delta;
    if (b->lr > pos) b->lr += delta;
    b->l += delta;

    return delta;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2120
movl %eax, -0x30(%rbp)
movslq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
addq $0x1000, %rcx           # imm = 0x1000
cmpq %rcx, %rax
jb 0x577a
movl $0x0, -0x4(%rbp)
jmp 0x5854
movq -0x20(%rbp), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x10(%rbp), %rax
movl (%rax), %eax
addq %rax, %rdx
movq -0x20(%rbp), %rax
subq %rax, %rdx
callq 0x2330
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movslq -0x30(%rbp), %rdx
callq 0x2270
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jbe 0x57da
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
jbe 0x57fd
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x18(%rbp), %rax
jbe 0x5820
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x18(%rbp), %rax
jbe 0x5843
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x20(%rax)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: buffer_replace2
int buffer_replace2(struct buffer *b, char *pos, char *end, char *str, int len) {
    int delta;

    delta = len - (end - pos);

    if (delta + b->r >= b->data + BUFSIZE)
	return 0;  /* no space left */

    if (b->data + b->l < end)
	/* The data has been stolen, we could have crashed. Maybe we should abort() ? */
	return 0;

    /* first, protect the end of the buffer */
    memmove(end + delta, end, b->data + b->l - end);

    /* now, copy str over pos */
    if (len)
	memcpy(pos, str, len);

    /* we only move data after the displaced zone */
    if (b->r  > pos) b->r  += delta;
    if (b->w  > pos) b->w  += delta;
    if (b->h  > pos) b->h  += delta;
    if (b->lr > pos) b->lr += delta;
    b->l += delta;

    return delta;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
addq $0x1000, %rcx           # imm = 0x1000
cmpq %rcx, %rax
jb 0x58c2
movl $0x0, -0x4(%rbp)
jmp 0x59c5
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jae 0x58e5
movl $0x0, -0x4(%rbp)
jmp 0x59c5
movq -0x20(%rbp), %rdi
movslq -0x30(%rbp), %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x10(%rbp), %rax
movl (%rax), %eax
addq %rax, %rdx
movq -0x20(%rbp), %rax
subq %rax, %rdx
callq 0x2330
cmpl $0x0, -0x2c(%rbp)
je 0x5928
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movslq -0x2c(%rbp), %rdx
callq 0x2270
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jbe 0x594b
movl -0x30(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
jbe 0x596e
movl -0x30(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x18(%rbp), %rax
jbe 0x5991
movl -0x30(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x18(%rbp), %rax
jbe 0x59b4
movl -0x30(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x20(%rax)
movl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: buffer_slow_realign
void buffer_slow_realign(struct buffer *buf)
{
    char *end = buf->data + BUFSIZE;
    int off   = buf->data + BUFSIZE - buf->w;

    /* two possible cases :
     *   - the buffer is in one contiguous block, we move it in-place
     *   - the buffer is in two blocks, we move it via the trash
     */
    if (buf->l) {
	int block1 = buf->l;
	int block2 = 0;
	if (buf->r <= buf->w) {
	    /* non-contiguous block */
	    block1 = buf->data + BUFSIZE - buf->w;
	    block2 = buf->r - buf->data;
	}
	if (block2)
	    memcpy(trash, buf->data, block2);
	memmove(buf->data, buf->w, block1);
	if (block2)
	    memcpy(buf->data + block1, trash, block2);
    }

    /* adjust all known pointers */
    buf->w    = buf->data;
    buf->r   += off; if (buf->r   >= end) buf->r   -= BUFSIZE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
addq $0x1000, %rax           # imm = 0x1000
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
addq $0x1000, %rax           # imm = 0x1000
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
je 0x5ac9
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
ja 0x5a6b
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
addq $0x1000, %rax           # imm = 0x1000
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x5a89
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rsi
movslq -0x1c(%rbp), %rdx
leaq 0x2b9bc(%rip), %rdi     # 0x31440
callq 0x2270
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movslq -0x18(%rbp), %rdx
callq 0x2330
cmpl $0x0, -0x1c(%rbp)
je 0x5ac7
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movslq -0x18(%rbp), %rax
addq %rax, %rdi
movslq -0x1c(%rbp), %rdx
leaq 0x2b97e(%rip), %rsi     # 0x31440
callq 0x2270
jmp 0x5ac9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jb 0x5b0f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1000, %rcx          # imm = 0xF000
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: tv_diff
static inline unsigned long tv_diff(struct timeval *tv1, struct timeval *tv2) {
    unsigned long ret;
  
    ret = (tv2->tv_sec - tv1->tv_sec) * 1000;
    if (tv2->tv_usec > tv1->tv_usec)
	ret += (tv2->tv_usec - tv1->tv_usec) / 1000;
    else
	ret -= (tv1->tv_usec - tv2->tv_usec) / 1000;
    return (unsigned long) ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
subq (%rcx), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jle 0x784b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
subq 0x8(%rcx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x7873
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: get_server_rr
static inline struct server *get_server_rr(struct proxy *px) {
    if (px->srv_map_sz == 0)
	return NULL;

    if (px->srv_rr_idx < 0 || px->srv_rr_idx >= px->srv_map_sz)
	px->srv_rr_idx = 0;
    return px->srv_map[px->srv_rr_idx++];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x789c
movq $0x0, -0x8(%rbp)
jmp 0x78e3
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jl 0x78b6
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jl 0x78c1
movq -0x10(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdx
movl 0x2c(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x2c(%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: fd_delete
static void fd_delete(int fd) {
    my_fd_clr(fd, StaticReadEvent);
    my_fd_clr(fd, StaticWriteEvent);
#if defined(ENABLE_EPOLL)
    if (PrevReadEvent) {
	my_fd_clr(fd, PrevReadEvent);
	my_fd_clr(fd, PrevWriteEvent);
    }
#endif

    close(fd);
    fdtab[fd].state = FD_STCLOSE;

    while ((maxfd-1 >= 0) && (fdtab[maxfd-1].state == FD_STCLOSE))
	    maxfd--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
movq 0x9ae3(%rip), %rsi      # 0x11408
callq 0x3fd0
movl -0x4(%rbp), %edi
movq 0x29afc(%rip), %rsi     # 0x31430
callq 0x3fd0
movl -0x4(%rbp), %edi
callq 0x21d0
movq 0x9a68(%rip), %rax      # 0x113b0
movslq -0x4(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x0, 0x18(%rax)
movl 0x2aafc(%rip), %ecx     # 0x3245c
subl $0x1, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x5(%rbp)
jl 0x7991
movq 0x9a3c(%rip), %rax      # 0x113b0
movl 0x2aae2(%rip), %ecx     # 0x3245c
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
sete %al
movb %al, -0x5(%rbp)
movb -0x5(%rbp), %al
testb $0x1, %al
jne 0x799a
jmp 0x79ab
movl 0x2aabc(%rip), %eax     # 0x3245c
addl $-0x1, %eax
movl %eax, 0x2aab3(%rip)     # 0x3245c
jmp 0x795a
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: tv_cmp2_ms
static int tv_cmp2_ms(struct timeval *tv1, struct timeval *tv2) {
    if (tv_iseternity(tv1))
	if (tv_iseternity(tv2))
	    return 0; /* same */
	else
	    return 1; /* tv1 later than tv2 */
    else if (tv_iseternity(tv2))
	return -1; /* tv2 later than tv1 */
    
    if (tv1->tv_sec == tv2->tv_sec) {
	if (tv1->tv_usec >= tv2->tv_usec + 1000)
	    return 1;
	else if (tv2->tv_usec >= tv1->tv_usec + 1000)
	    return -1;
	else
	    return 0;
    }
    else if ((tv1->tv_sec > tv2->tv_sec + 1) ||
	     ((tv1->tv_sec == tv2->tv_sec + 1) && (tv1->tv_usec + 1000000 >= tv2->tv_usec + 1000)))
	return 1;
    else if ((tv2->tv_sec > tv1->tv_sec + 1) ||
	     ((tv2->tv_sec == tv1->tv_sec + 1) && (tv2->tv_usec + 1000000 >= tv1->tv_usec + 1000)))
	return -1;
    else
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3b20
cmpl $0x0, %eax
je 0x7a04
movq -0x18(%rbp), %rdi
callq 0x3b20
cmpl $0x0, %eax
je 0x79f8
movl $0x0, -0x4(%rbp)
jmp 0x7b45
movl $0x1, -0x4(%rbp)
jmp 0x7b45
movq -0x18(%rbp), %rdi
callq 0x3b20
cmpl $0x0, %eax
je 0x7a1e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7b45
jmp 0x7a20
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x7a8c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq $0x3e8, %rcx            # imm = 0x3E8
cmpq %rcx, %rax
jl 0x7a58
movl $0x1, -0x4(%rbp)
jmp 0x7b45
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq $0x3e8, %rcx            # imm = 0x3E8
cmpq %rcx, %rax
jl 0x7a80
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7b45
movl $0x0, -0x4(%rbp)
jmp 0x7b45
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jg 0x7adc
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x7ae5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq $0xf4240, %rax          # imm = 0xF4240
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq $0x3e8, %rcx            # imm = 0x3E8
cmpq %rcx, %rax
jl 0x7ae5
movl $0x1, -0x4(%rbp)
jmp 0x7b45
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jg 0x7b35
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x7b3e
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq $0xf4240, %rax          # imm = 0xF4240
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq $0x3e8, %rcx            # imm = 0x3E8
cmpq %rcx, %rax
jl 0x7b3e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7b45
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: tv_remain2
static unsigned long tv_remain2(struct timeval *tv1, struct timeval *tv2) {
    unsigned long ret;

    if (tv_iseternity(tv2))
	return TIME_ETERNITY;

    if (tv_cmp_ms(tv1, tv2) >= 0)
	return 0; /* event elapsed */

    ret = (tv2->tv_sec - tv1->tv_sec) * 1000;
    if (tv2->tv_usec > tv1->tv_usec)
	ret += (tv2->tv_usec - tv1->tv_usec) / 1000;
    else
	ret -= (tv1->tv_usec - tv2->tv_usec) / 1000;
    return (unsigned long) ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3b20
cmpl $0x0, %eax
je 0x84eb
movq $-0x1, -0x8(%rbp)
jmp 0x8586
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8780
cmpl $0x0, %eax
jl 0x8507
movq $0x0, -0x8(%rbp)
jmp 0x8586
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
subq (%rcx), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jle 0x8556
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x857e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
subq 0x8(%rcx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: session_free
static void session_free(struct session *s) {
    if (s->req)
	pool_free(buffer, s->req);
    if (s->rep)
	pool_free(buffer, s->rep);

    pool_free(session, s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x85c8
movq 0x8de6(%rip), %rcx      # 0x11390
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x8dcc(%rip)      # 0x11390
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x85f8
movq 0x8db6(%rip), %rcx      # 0x11390
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, 0x8d9c(%rip)      # 0x11390
movq %rax, -0x18(%rbp)
movq 0x8d89(%rip), %rcx      # 0x11388
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq %rax, 0x8d77(%rip)      # 0x11388
movq %rax, -0x20(%rbp)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: process_runnable_tasks
int process_runnable_tasks() {
  int next_time;
  struct task *t, *tnext;

  next_time = TIME_ETERNITY; /* set the timer to wait eternally first */

  /* look for expired tasks and add them to the run queue.
   */
  tnext = ((struct task *)LIST_HEAD(wait_queue[0]))->next;
  while ((t = tnext) != LIST_HEAD(wait_queue[0])) { /* we haven't looped ? */
      tnext = t->next;
      if (t->state & TASK_RUNNING)
	  continue;
      
      if (tv_iseternity(&t->expire))
	  continue;

      /* wakeup expired entries. It doesn't matter if they are
       * already running because of a previous event
       */
      if (tv_cmp_ms(&t->expire, &now) <= 0) {
	  task_wakeup(&rq, t);
      }
      else {
	  /* first non-runnable task. Use its expiration date as an upper bound */
	  int temp_time = tv_remain(&now, &t->expire);
	  if (temp_time)
	      next_time = temp_time;
	  break;
      }
  }

  /* process each task in the run queue now. Each task may be deleted
   * since we only use the run queue's head. Note that any task can be
   * woken up by any other task and it will be processed immediately
   * after as it will be queued on the run queue's head.
   */
  while ((t = rq) != NULL) {
      int temp_time;

      task_sleep(&rq, t);
      temp_time = t->process(t);
      next_time = MINTIME(temp_time, next_time);
  }
  return next_time;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movq 0x8bfa(%rip), %rax      # 0x11260
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x8be7(%rip), %rcx      # 0x11260
cmpq %rcx, %rax
je 0x8707
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x869e
jmp 0x866a
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x3b20
cmpl $0x0, %eax
je 0x86b2
jmp 0x866a
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
leaq 0x8d4f(%rip), %rsi      # 0x11410
callq 0x8780
cmpl $0x0, %eax
jg 0x86dd
movq -0x10(%rbp), %rsi
leaq 0x8ce2(%rip), %rdi      # 0x113b8
callq 0x4110
jmp 0x8702
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
leaq 0x8d24(%rip), %rdi      # 0x11410
callq 0x88c0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x8700
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8707
jmp 0x866a
jmp 0x8709
movq 0x8ca8(%rip), %rax      # 0x113b8
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x8773
movq -0x10(%rbp), %rsi
leaq 0x8c93(%rip), %rdi      # 0x113b8
callq 0x8980
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x4(%rbp)
jge 0x8749
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x876b
cmpl $0x0, -0x20(%rbp)
jl 0x8757
movl -0x4(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x875f
movl -0x4(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x8765
movl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8709
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: tv_cmp_ms
static int tv_cmp_ms(struct timeval *tv1, struct timeval *tv2) {
    if (tv1->tv_sec == tv2->tv_sec) {
	if (tv2->tv_usec >= tv1->tv_usec + 1000)
	    return -1;
	else if (tv1->tv_usec >= tv2->tv_usec + 1000)
	    return 1;
	else
	    return 0;
    }
    else if ((tv2->tv_sec > tv1->tv_sec + 1) ||
	     ((tv2->tv_sec == tv1->tv_sec + 1) && (tv2->tv_usec + 1000000 >= tv1->tv_usec + 1000)))
	return -1;
    else if ((tv1->tv_sec > tv2->tv_sec + 1) ||
	     ((tv1->tv_sec == tv2->tv_sec + 1) && (tv1->tv_usec + 1000000 >= tv2->tv_usec + 1000)))
	return 1;
    else
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x87f8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq $0x3e8, %rcx            # imm = 0x3E8
cmpq %rcx, %rax
jl 0x87c4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x88b1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq $0x3e8, %rcx            # imm = 0x3E8
cmpq %rcx, %rax
jl 0x87ec
movl $0x1, -0x4(%rbp)
jmp 0x88b1
movl $0x0, -0x4(%rbp)
jmp 0x88b1
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jg 0x8848
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x8851
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq $0xf4240, %rax          # imm = 0xF4240
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq $0x3e8, %rcx            # imm = 0x3E8
cmpq %rcx, %rax
jl 0x8851
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x88b1
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jg 0x88a1
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x88aa
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq $0xf4240, %rax          # imm = 0xF4240
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq $0x3e8, %rcx            # imm = 0x3E8
cmpq %rcx, %rax
jl 0x88aa
movl $0x1, -0x4(%rbp)
jmp 0x88b1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: tv_remain
static inline unsigned long tv_remain(struct timeval *tv1, struct timeval *tv2) {
    unsigned long ret;
  
    if (tv_cmp_ms(tv1, tv2) >= 0)
	return 0; /* event elapsed */

    ret = (tv2->tv_sec - tv1->tv_sec) * 1000;
    if (tv2->tv_usec > tv1->tv_usec)
	ret += (tv2->tv_usec - tv1->tv_usec) / 1000;
    else
	ret -= (tv1->tv_usec - tv2->tv_usec) / 1000;
    return (unsigned long) ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8780
cmpl $0x0, %eax
jl 0x88ec
movq $0x0, -0x8(%rbp)
jmp 0x896b
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
subq (%rcx), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jle 0x893b
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x8963
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
subq 0x8(%rcx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: task_sleep
static inline struct task *task_sleep(struct task **q, struct task *t) {
    if (t->state == TASK_RUNNING) {
	*q = t->rqnext;
	t->state = TASK_IDLE; /* tell that s has left the run queue */
    }
    return *q; /* return next running task */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x20(%rax)
jne 0x89b0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: sig_dump_state
void sig_dump_state(int sig) {
    struct proxy *p = proxy;

    Warning("SIGHUP received, dumping servers states.\n");
    while (p) {
	struct server *s = p->srv;

	while (s) {
	    snprintf(trash, sizeof(trash),
		     "SIGHUP: Server %s/%s : Conn: %d act, %d pend, %d tot.",
		     p->id, s->id,
		     s->cur_sess, 0, s->cum_sess);
	    Warning("%s\n", trash);
	    s = s->next;
	}

	snprintf(trash, sizeof(trash),
		 "SIGHUP: Proxy %s has %d active servers available."
		 " Conn: %d act, %d pend (%d unass), %d tot.",
		 p->id, p->srv_act, 
		 p->nbconn, 0, 0, p->cum_conn);
	Warning("%s\n", trash);
	p = p->next;
    }
    signal(sig, sig_dump_state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq 0x85f6(%rip), %rax      # 0x113a8
movq %rax, -0x10(%rbp)
leaq 0x5696(%rip), %rdi      # 0xe453
movb $0x0, %al
callq 0x2eb0
cmpq $0x0, -0x10(%rbp)
je 0x8ec0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8e4b
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r8
movq -0x18(%rbp), %rax
movl 0x18(%rax), %r9d
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
leaq 0x28638(%rip), %rdi     # 0x31440
movl $0x1000, %esi           # imm = 0x1000
leaq 0x5669(%rip), %rdx      # 0xe47d
xorl %r10d, %r10d
movl $0x0, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x2180
leaq 0x5f5b(%rip), %rdi      # 0xed8b
leaq 0x28609(%rip), %rsi     # 0x31440
movb $0x0, %al
callq 0x2eb0
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x8ddb
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x10(%rbp), %rax
movl 0x18(%rax), %r8d
movq -0x10(%rbp), %rax
movl 0x40(%rax), %r9d
movq -0x10(%rbp), %rax
movl 0x44(%rax), %eax
leaq 0x285cf(%rip), %rdi     # 0x31440
movl $0x1000, %esi           # imm = 0x1000
leaq 0x5636(%rip), %rdx      # 0xe4b3
xorl %r10d, %r10d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x2180
leaq 0x5eea(%rip), %rdi      # 0xed8b
leaq 0x28598(%rip), %rsi     # 0x31440
movb $0x0, %al
callq 0x2eb0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x8dc4
movl -0x4(%rbp), %edi
leaq -0x12a(%rip), %rsi      # 0x8da0
callq 0x2230
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: init_default_instance
void init_default_instance() {
    memset(&defproxy, 0, sizeof(defproxy));
    defproxy.state = PR_STNEW;
    defproxy.maxconn = cfg_maxconn ? cfg_maxconn : global.maxconn;
    if (!defproxy.maxconn)
	defproxy.maxconn = DEFAULT_MAXPCONN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x28ee1(%rip), %rdi     # 0x32460
xorl %esi, %esi
movl $0xe0, %edx
callq 0x21c0
movl $0x0, 0x28ed3(%rip)     # 0x32468
cmpl $0x0, 0x7dc4(%rip)      # 0x11360
je 0x95a9
movl 0x7dbc(%rip), %eax      # 0x11360
movl %eax, -0x4(%rbp)
jmp 0x95b2
movl 0x7e1d(%rip), %eax      # 0x113cc
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, 0x28eed(%rip)     # 0x324a8
cmpl $0x0, 0x28ee6(%rip)     # 0x324a8
jne 0x95ce
movl $0x40000000, 0x28eda(%rip) # imm = 0x40000000
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: recount_servers
static void recount_servers(struct proxy *px) {
    struct server *srv;

    px->srv_act = 0; px->tot_wact = 0;
    for (srv = px->srv; srv != NULL; srv = srv->next) {
	px->srv_act++;
	px->tot_wact += srv->eweight + 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb400
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movzbl 0x11(%rax), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xb3ca
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: recalc_server_map
static void recalc_server_map(struct proxy *px) {
    int o, tot;
    struct server *cur, *best;

    tot  = px->tot_wact;

    /* this algorithm gives priority to the first server, which means that
     * it will respect the declaration order for equivalent weights, and
     * that whatever the weights, the first server called will always be
     * the first declard. This is an important asumption for the backup
     * case, where we want the first server only.
     */
    for (cur = px->srv; cur; cur = cur->next)
	cur->wscore = 0;

    for (o = 0; o < tot; o++) {
	int max = 0;
	best = NULL;
	for (cur = px->srv; cur; cur = cur->next) {
	    int v;

	    /* If we are forced to return only one server, we don't want to
	     * go further, because we would return the wrong one due to
	     * divide overflow.
	     */
	    if (tot == 1) {
		best = cur;
		break;
	    }

	    cur->wscore += cur->eweight + 1;
	    v = (cur->wscore + tot) / tot; /* result between 0 and 3 */
	    if (best == NULL || v > max) {
		max = v;
		best = cur;
	    }
	}
	px->srv_map[o] = best;
	best->wscore -= tot;
    }
    px->srv_map_sz = tot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xb44d
movq -0x18(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xb42e
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xb516
movl $0x0, -0x24(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xb4e5
cmpl $0x1, -0x10(%rbp)
jne 0xb492
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xb4e5
movq -0x18(%rbp), %rax
movzbl 0x11(%rax), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
addl -0x10(%rbp), %eax
xorl %edx, %edx
divl -0x10(%rbp)
movl %eax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xb4c8
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0xb4d6
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xb4d8
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xb47b
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rax
movl 0x14(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x14(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xb454
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: pool_destroy
void pool_destroy(void **pool)
{
    void *temp, *next;
    next = pool;
    while (next) {
	temp = next;
	next = *(void **)temp;
	free(temp);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xbf39
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2040
jmp 0xbf14
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/wtarreau[P]httpterm/httpterm.c
// Function: deinit
void deinit(void) {
    struct proxy *p = proxy;
    struct server *s,*s_next;
    struct listener *l,*l_next;
  
    while (p) {
	if (p->id)
	    free(p->id);

	/* only strup if the user have set in config.
	   When should we free it?!
	   if (p->errmsg.msg400) free(p->errmsg.msg400);
	   if (p->errmsg.msg403) free(p->errmsg.msg403);
	   if (p->errmsg.msg408) free(p->errmsg.msg408);
	   if (p->errmsg.msg500) free(p->errmsg.msg500);
	   if (p->errmsg.msg502) free(p->errmsg.msg502);
	   if (p->errmsg.msg503) free(p->errmsg.msg503);
	   if (p->errmsg.msg504) free(p->errmsg.msg504);
	*/

	s = p->srv;
	while (s) {
	    s_next = s->next;
	    if (s->id)
		free(s->id);
	    
	    free(s);
	    s = s_next;
	}/* end while(s) */
	
	l = p->listen;
	while (l) {
	    l_next = l->next;
	    free(l);
	    l = l_next;
	}/* end while(l) */
	
	p = p->next;
    }/* end while(p) */
    
    if (global.chroot)    free(global.chroot);
    if (global.pidfile)   free(global.pidfile);
    
    if (StaticReadEvent)  free(StaticReadEvent);
    if (StaticWriteEvent) free(StaticWriteEvent);
    if (fdtab)            free(fdtab);
    
    pool_destroy(pool_session);
    pool_destroy(pool_buffer);
    pool_destroy(pool_fdtab);
    pool_destroy(pool_task);
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x5459(%rip), %rax      # 0x113a8
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc004
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0xbf76
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xbfbf
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xbfac
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rdi
callq 0x2040
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xbf82
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xbff3
movq -0x20(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2040
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xbfca
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xbf53
cmpq $0x0, 0x53d4(%rip)      # 0x113e0
je 0xc01a
movq 0x53cb(%rip), %rdi      # 0x113e0
callq 0x2040
cmpq $0x0, 0x53c6(%rip)      # 0x113e8
je 0xc030
movq 0x53bd(%rip), %rdi      # 0x113e8
callq 0x2040
cmpq $0x0, 0x53d0(%rip)      # 0x11408
je 0xc046
movq 0x53c7(%rip), %rdi      # 0x11408
callq 0x2040
cmpq $0x0, 0x253e2(%rip)     # 0x31430
je 0xc05c
movq 0x253d9(%rip), %rdi     # 0x31430
callq 0x2040
cmpq $0x0, 0x534c(%rip)      # 0x113b0
je 0xc072
movq 0x5343(%rip), %rdi      # 0x113b0
callq 0x2040
movq 0x530f(%rip), %rdi      # 0x11388
callq 0xbf00
movq 0x530b(%rip), %rdi      # 0x11390
callq 0xbf00
movq 0x5307(%rip), %rdi      # 0x11398
callq 0xbf00
movq 0x5303(%rip), %rdi      # 0x113a0
callq 0xbf00
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/codeniko[P]CS214-Malloc-Free/Test8.c
// Function: main
void main()
{
    void* p = malloc(2);
    free(p);
    printf("p has been freed\n");
    free(p + 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x2, %edi
leaq 0xea0(%rip), %rsi       # 0x2004
movl $0x6, %edx
callq 0x11c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xe87(%rip), %rsi       # 0x2004
movl $0x7, %edx
callq 0x13c0
leaq 0xe7e(%rip), %rdi       # 0x200c
movb $0x0, %al
callq 0x1030
movq -0x8(%rbp), %rdi
addq $0x1, %rdi
leaq 0xe60(%rip), %rsi       # 0x2004
movl $0x9, %edx
callq 0x13c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/ramirezsebas[P]TP-LISTINGS/./src/capitulo_5/5.12/socket-inet.c
// Function: get_home_page
void get_home_page (int socket_fd)
{
  char buffer[10000];
  ssize_t number_characters_read;
  /* Send the HTTP GET command for the home page. */
  sprintf (buffer, "GET /\n");
  write (socket_fd, buffer, strlen (buffer));
  /* Read from the socket. The call to read may not return all the data at one time, so keep
  trying until we run out. */
  while (1) {
    number_characters_read = read (socket_fd, buffer, 10000);
    if (number_characters_read == 0)
      return;
    /* Write the data to standard output. */
    fwrite (buffer, sizeof (char), number_characters_read, stdout);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2740, %rsp           # imm = 0x2740
movl %edi, -0x4(%rbp)
leaq -0x2720(%rbp), %rdi
leaq 0xe18(%rip), %rsi       # 0x2004
movb $0x0, %al
callq 0x1090
movl -0x4(%rbp), %eax
movl %eax, -0x2734(%rbp)
leaq -0x2720(%rbp), %rax
movq %rax, -0x2730(%rbp)
leaq -0x2720(%rbp), %rdi
callq 0x1040
movl -0x2734(%rbp), %edi
movq -0x2730(%rbp), %rsi
movq %rax, %rdx
callq 0x1030
movl -0x4(%rbp), %edi
leaq -0x2720(%rbp), %rsi
movl $0x2710, %edx           # imm = 0x2710
callq 0x1060
movq %rax, -0x2728(%rbp)
cmpq $0x0, -0x2728(%rbp)
jne 0x1259
addq $0x2740, %rsp           # imm = 0x2740
popq %rbp
retq
leaq -0x2720(%rbp), %rdi
movq -0x2728(%rbp), %rdx
movq 0x2d72(%rip), %rax      # 0x3fe0
movq (%rax), %rcx
movl $0x1, %esi
callq 0x10b0
jmp 0x122b
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ramirezsebas[P]TP-LISTINGS/./src/capitulo_5/5.12/socket-inet.c
// Function: main
int main (int argc, char* const argv[])
{
  int socket_fd;
  struct sockaddr_in name;
  struct hostent* hostinfo;
  /* Create the socket. */
  socket_fd = socket (PF_INET, SOCK_STREAM, 0);
  /* Store the server’s name in the socket address. */
  name.sin_family = AF_INET;
  /* Convert from strings to numbers. */
  hostinfo = gethostbyname (argv[1]);
  if (hostinfo == NULL)
    return 1;
  else
    name.sin_addr = *((struct in_addr *) hostinfo->h_addr);
  /* Web servers use port 80. */
  name.sin_port = htons (80);
  /*Connect to the Web server*/

  if (connect (socket_fd, (const struct sockaddr *)&name, sizeof (struct sockaddr_in)) == -1) {
    perror ("connect");
    return 1;
  }
  /* Retrieve the server’s home page. */
  get_home_page (socket_fd);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x10c0
movl %eax, -0x14(%rbp)
movw $0x2, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1070
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x12d1
movl $0x1, -0x4(%rbp)
jmp 0x1329
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x50, %edi
callq 0x1050
movw %ax, -0x22(%rbp)
movl -0x14(%rbp), %edi
leaq -0x24(%rbp), %rsi
movl $0x10, %edx
callq 0x10a0
cmpl $-0x1, %eax
jne 0x131a
leaq 0xcff(%rip), %rdi       # 0x200b
callq 0x1080
movl $0x1, -0x4(%rbp)
jmp 0x1329
movl -0x14(%rbp), %edi
callq 0x11d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/aes256otrsv2/ref/OTR.c
// Function: Setup
int Setup(const uint8 *skey)
{
	uint8 cst[16] = {0};

	KeySchedule(KeyLen, ENC, skey);
	Encryption(KeyLen, cst, gamma);
	mul2(gamma, gamma2); 
	mul2(gamma2, Q); /* Q = 4gamma */
	return SUCCESS;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsp, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1030
movq 0x10(%rsp), %rdx
movl $0x100, %edi            # imm = 0x100
xorl %esi, %esi
callq 0x1090
movq %rsp, %rsi
movl $0x100, %edi            # imm = 0x100
movq 0x3d50(%rip), %rdx      # 0x4f88
callq 0x10f0
movq 0x3d44(%rip), %rdi      # 0x4f88
movq 0x3da5(%rip), %rsi      # 0x4ff0
callq 0x1270
movq 0x3d99(%rip), %rdi      # 0x4ff0
movq 0x3d5a(%rip), %rsi      # 0x4fb8
callq 0x1270
xorl %eax, %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/aes256otrsv2/ref/OTR.c
// Function: mul2
static void mul2(const uint8 *in, uint8 *out)
{
	int i, t = in[0] >> 7;
    for(i = 0; i < 15; i++)
        out[i] = (in[i] << 1) | (in[i + 1] >> 7);
    out[15] = (in[15] << 1) ^ cst_mul[t];
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movzbl (%rax), %eax
sarl $0x7, %eax
movl %eax, -0x18(%rsp)
movl $0x0, -0x14(%rsp)
cmpl $0xf, -0x14(%rsp)
jge 0x12dc
movq -0x8(%rsp), %rax
movslq -0x14(%rsp), %rcx
movzbl (%rax,%rcx), %eax
shll %eax
movq -0x8(%rsp), %rcx
movl -0x14(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
sarl $0x7, %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x10(%rsp), %rax
movslq -0x14(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x1291
movq -0x8(%rsp), %rax
movzbl 0xf(%rax), %eax
shll %eax
movslq -0x18(%rsp), %rdx
leaq 0x1d0d(%rip), %rcx      # 0x3000
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
movb %al, %cl
movq -0x10(%rsp), %rax
movb %cl, 0xf(%rax)
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/aes256otrsv2/ref/OTR.c
// Function: nEnc
int nEnc(const uint8 *nonce, uint32 nonce_len, uint32 t_len){
	uint8 tmp[BLOCK]={0};

	memcpy(&tmp[BLOCK-nonce_len],nonce,nonce_len);
	tmp[0]=(uint8)((t_len*8)%(BLOCK*8)<<1);
	tmp[BLOCK-nonce_len-1] |= 0x01;
#ifdef INTERMEDIATE
	printf("(Format(tau,N)||0*||1||N) :\n"); printbseq(tmp,BLOCK);
#endif
	Encryption(KeyLen, tmp, delta);	// delta = E(Format(tau,N))
	if(ADP==Seri){
		xor(delta, TA, delta); // delta ^= TA
	}
	mul2(delta, L);
	mul2(L, L); //L = 4delta
	return SUCCESS;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movq %rsp, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1030
movl $0x10, %eax
subl 0x1c(%rsp), %eax
movl %eax, %eax
movq %rsp, %rdi
addq %rax, %rdi
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %eax
movl %eax, %edx
callq 0x1110
movl 0x18(%rsp), %eax
shll $0x3, %eax
andl $0x7f, %eax
shll %eax
movb %al, (%rsp)
movl $0x10, %eax
subl 0x1c(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movzbl (%rsp,%rax), %ecx
orl $0x1, %ecx
movb %cl, (%rsp,%rax)
movq %rsp, %rsi
movl $0x100, %edi            # imm = 0x100
movq 0x3c41(%rip), %rdx      # 0x4fc8
callq 0x10f0
movq 0x3c35(%rip), %rdx      # 0x4fc8
movq 0x3c4e(%rip), %rsi      # 0x4fe8
movq %rdx, %rdi
callq 0x13d0
movq 0x3c1f(%rip), %rdi      # 0x4fc8
movq 0x3be8(%rip), %rsi      # 0x4f98
callq 0x1270
movq 0x3bdc(%rip), %rsi      # 0x4f98
movq %rsi, %rdi
callq 0x1270
xorl %eax, %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)