// File: /workspace/github_c_makefile_star2_O1/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 0x4528
cmpl $0x5, 0x4c(%r14)
jne 0x4206
movq 0xf0(%r14), %rax
testq %rax, %rax
je 0x4129
decl 0x18(%rax)
movq 0x40(%r14), %rax
decl 0x40(%rax)
decl 0x2a2fa(%rip)           # 0x2e430
movl 0x928c(%rip), %ecx      # 0xd3c8
testb $0x1, %cl
sete %dl
andl $0x50, %ecx
cmpl $0x10, %ecx
sete %cl
orb %dl, %cl
jne 0x418d
movl 0x118(%r14), %edx
movq 0x38(%rax), %rcx
movzwl 0x48(%r14), %r8d
leaq 0x292ca(%rip), %r15     # 0x2d430
leaq 0x61a8(%rip), %rsi      # 0xa315
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 (%rbx), %rax
movq %rcx, 0x8(%rax)
movq 0x58(%r14), %rax
testq %rax, %rax
je 0x41bc
movq 0x91b2(%rip), %rcx      # 0xd360
movq %rcx, (%rax)
movq 0x58(%r14), %rax
movq %rax, 0x91a4(%rip)      # 0xd360
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x41da
movq 0x9194(%rip), %rcx      # 0xd360
movq %rcx, (%rax)
movq 0x60(%r14), %rax
movq %rax, 0x9186(%rip)      # 0xd360
movq 0x9177(%rip), %rax      # 0xd358
movq %rax, (%r14)
movq %r14, 0x916d(%rip)      # 0xd358
movq 0x917e(%rip), %rax      # 0xd370
movq %rax, (%rbx)
movq %rbx, 0x9174(%rip)      # 0xd370
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x42df
movw $0x0, 0x38(%r14)
leaq 0x8(%r14), %r15
leaq 0x18(%r14), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3331
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 0x3331
testl %eax, %eax
cmovleq %r15, %r14
movups (%r14), %xmm0
movups %xmm0, 0x28(%rbx)
movq %rbx, %rdi
callq 0x31e4
movq 0x28(%rbx), %r14
testq %r14, %r14
jne 0x4267
cmpq $0x0, 0x30(%rbx)
je 0x42d8
leaq 0x28(%rbx), %rsi
leaq 0x918e(%rip), %rdi      # 0xd400
callq 0x6044
testl %eax, %eax
js 0x427f
xorl %eax, %eax
jmp 0x42df
subq 0x917a(%rip), %r14      # 0xd400
imulq $0x3e8, %r14, %rsi      # imm = 0x3E8
movq 0x30(%rbx), %rdx
movq 0x9170(%rip), %rax      # 0xd408
movq %rdx, %rcx
subq %rax, %rcx
jle 0x42b2
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
movq %rcx, %rax
imulq %rdx
jmp 0x42c2
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 0x42df
movq $-0x1, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq