// File: chhylp123[P]hifiasm/inter.cpp
// Function: push_emask0(kv_emask_t*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ul_ov_t*)
void push_emask0(kv_emask_t *res, uint64_t q0l, uint64_t t0l, uint64_t e0l, uint64_t q1l, uint64_t t1l, uint64_t e1l,
uint64_t end, uint64_t is_pe, uint64_t minov, ul_ov_t *p)
{
	emask_t *m;
	m = &(res->a[res->n++]); memset(m, 0, sizeof((*m))); 
	m->dir = end; m->pe = is_pe;
	m->tn = p->tn; m->rev = p->rev; m->rn = (uint32_t)-1;
	if(!end) {///left end
		assert(q0l >= minov && t0l >= minov);
		m->el = e0l; 
		m->qs = p->qs; m->qe = p->qs + q0l;
		if(!(m->rev)) {
			m->ts = p->ts; m->te = p->ts + t0l;
		} else {
			m->te = p->te; m->ts = p->te - t0l;
		}
	} else {///right end
		assert(q1l >= minov && t1l >= minov);
		m->el = e1l;
		m->qe = p->qe; m->qs = p->qe - q1l;
		if(!(m->rev)) {
			m->te = p->te; m->ts = p->te - t1l;
		} else {
			m->ts = p->ts; m->te = p->ts + t1l;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x2100
movq 0x18(%rbp), %rax
movb %al, %dl
movq -0x38(%rbp), %rax
movb 0x1c(%rax), %cl
andb $0x1f, %dl
andb $-0x20, %cl
orb %dl, %cl
movb %cl, 0x1c(%rax)
movq 0x20(%rbp), %rax
movb %al, %dl
movq -0x38(%rbp), %rax
movb 0x1c(%rax), %cl
andb $0x1, %dl
shlb $0x5, %dl
andb $-0x21, %cl
orb %dl, %cl
movb %cl, 0x1c(%rax)
movq 0x30(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq 0x30(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x1f, %eax
movb %al, %dl
movq -0x38(%rbp), %rax
movb 0x1c(%rax), %cl
andb $0x1, %dl
shlb $0x7, %dl
andb $0x7f, %cl
orb %dl, %cl
movb %cl, 0x1c(%rax)
movq -0x38(%rbp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
cmpq $0x0, 0x18(%rbp)
jne 0x2cb7ef
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq 0x28(%rbp), %rcx
movb %al, -0x39(%rbp)
jb 0x2cb73d
movq -0x18(%rbp), %rax
cmpq 0x28(%rbp), %rax
setae %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x2cb746
jmp 0x2cb748
jmp 0x2cb767
leaq 0xc73b6(%rip), %rdi     # 0x392b05
leaq 0xc50d9(%rip), %rsi     # 0x39082f
movl $0x2f89, %edx           # imm = 0x2F89
leaq 0xc73c0(%rip), %rcx     # 0x392b22
callq 0x2130
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
movq 0x30(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0xc(%rax)
movq 0x30(%rbp), %rax
movl 0x4(%rax), %eax
addq -0x10(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rax
movb 0x1c(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
jne 0x2cb7c8
movq 0x30(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x14(%rax)
movq 0x30(%rbp), %rax
movl 0x10(%rax), %eax
addq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0x2cb7ea
movq 0x30(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
movq 0x30(%rbp), %rax
movl 0x14(%rax), %eax
subq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x2cb8bb
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq 0x28(%rbp), %rcx
movb %al, -0x3a(%rbp)
jb 0x2cb80c
movq -0x30(%rbp), %rax
cmpq 0x28(%rbp), %rax
setae %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
testb $0x1, %al
jne 0x2cb815
jmp 0x2cb817
jmp 0x2cb836
leaq 0xc7388(%rip), %rdi     # 0x392ba6
leaq 0xc500a(%rip), %rsi     # 0x39082f
movl $0x2f92, %edx           # imm = 0x2F92
leaq 0xc72f1(%rip), %rcx     # 0x392b22
callq 0x2130
movq 0x10(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
movq 0x30(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq 0x30(%rbp), %rax
movl 0x8(%rax), %eax
subq -0x28(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
movb 0x1c(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
jne 0x2cb897
movq 0x30(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
movq 0x30(%rbp), %rax
movl 0x14(%rax), %eax
subq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x2cb8b9
movq 0x30(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x14(%rax)
movq 0x30(%rbp), %rax
movl 0x10(%rax), %eax
addq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0x2cb8bb
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)