// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %r14
movq %r14, %rdi
callq 0x4530
cmpl $0x5, 0x4c(%r14)
jne 0x420b
movq 0xf0(%r14), %rax
testq %rax, %rax
je 0x4131
decl 0x18(%rax)
movq 0x40(%r14), %rax
decl 0x40(%rax)
decl 0x2a2f2(%rip)           # 0x2e430
movl 0x9284(%rip), %ecx      # 0xd3c8
testb $0x1, %cl
sete %dl
andl $0x50, %ecx
cmpl $0x10, %ecx
sete %cl
orb %dl, %cl
jne 0x4195
movl 0x118(%r14), %edx
movq 0x38(%rax), %rcx
movzwl 0x48(%r14), %r8d
leaq 0x292c2(%rip), %r15     # 0x2d430
leaq 0x6290(%rip), %rsi      # 0xa405
movq %r15, %rdi
movl $0xffff, %r9d           # imm = 0xFFFF
xorl %eax, %eax
callq 0x23a0
movslq %eax, %rdx
movl $0x1, %edi
movq %r15, %rsi
callq 0x20f0
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq 0x58(%r14), %rax
testq %rax, %rax
je 0x41c1
movq 0x91ad(%rip), %rcx      # 0xd360
movq %rcx, (%rax)
movq 0x58(%r14), %rax
movq %rax, 0x919f(%rip)      # 0xd360
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x41df
movq 0x918f(%rip), %rcx      # 0xd360
movq %rcx, (%rax)
movq 0x60(%r14), %rax
movq %rax, 0x9181(%rip)      # 0xd360
movq 0x9172(%rip), %rax      # 0xd358
movq %rax, (%r14)
movq %r14, 0x9168(%rip)      # 0xd358
movq 0x9179(%rip), %rax      # 0xd370
movq %rax, (%rbx)
movq %rbx, 0x916f(%rip)      # 0xd370
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x42e4
movw $0x0, 0x38(%r14)
leaq 0x8(%r14), %r15
leaq 0x18(%r14), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x32f1
testl %eax, %eax
cmovleq %r15, %r12
movups (%r12), %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
addq $0x28, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x32f1
testl %eax, %eax
cmovleq %r15, %r14
movups (%r14), %xmm0
movups %xmm0, 0x28(%rbx)
movq %rbx, %rdi
callq 0x31a6
movq 0x28(%rbx), %r14
testq %r14, %r14
jne 0x426c
cmpq $0x0, 0x30(%rbx)
je 0x42dd
leaq 0x28(%rbx), %rsi
leaq 0x9189(%rip), %rdi      # 0xd400
callq 0x6061
testl %eax, %eax
js 0x4284
xorl %eax, %eax
jmp 0x42e4
subq 0x9175(%rip), %r14      # 0xd400
imulq $0x3e8, %r14, %rsi      # imm = 0x3E8
movq 0x30(%rbx), %rdx
movq 0x916b(%rip), %rax      # 0xd408
movq %rdx, %rcx
subq %rax, %rcx
jle 0x42b7
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
movq %rcx, %rax
imulq %rdx
jmp 0x42c7
subq %rdx, %rax
movabsq $-0x20c49ba5e353f7cf, %rcx # imm = 0xDF3B645A1CAC0831
imulq %rcx
movq %rdx, %rax
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rax
addq %rcx, %rax
addq %rsi, %rax
jmp 0x42e4
movq $-0x1, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq