// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/unitig.c
// Function: check_left
static int check_left(aux_t *a, int beg, int rbeg, const kstring_t *s)
{
	int i, ret;
	rldintv_t tmp;
	assert(a->nei.n == 1);
	ret = check_left_simple(a, beg, rbeg, s);
	if (ret == 0) return 0;
	// when ret<0, the back fork may be caused by a contained read. we have to do more to confirm this.
	tmp = a->nei.a[0]; // backup the neighbour as it will be overwritten by try_right()
	a->a[0].n = a->a[1].n = a->nei.n = 0;
	ks_resize(&a->str, s->l - rbeg + 1);
	for (i = s->l - 1, a->str.l = 0; i >= rbeg; --i)
		a->str.s[a->str.l++] = fm6_comp(s->s[i]);
	a->str.s[a->str.l] = 0;
	try_right(a, 0, &a->str);
	assert(a->nei.n >= 1);
	ret = a->nei.n > 1? -1 : 0;
	a->nei.n = 1; a->nei.a[0] = tmp; // recover the original neighbour
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x1, 0x40(%rax)
jne 0x11f73
jmp 0x11f92
leaq 0x139d8(%rip), %rdi     # 0x25952
leaq 0x13870(%rip), %rsi     # 0x257f1
movl $0x101, %edx            # imm = 0x101
leaq 0x139d3(%rip), %rcx     # 0x25960
callq 0x20f0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x121a0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0x11fba
movl $0x0, -0x4(%rbp)
jmp 0x12191
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq (%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movslq -0x18(%rbp), %rax
subq %rax, %rsi
addq $0x1, %rsi
callq 0x11a30
movq -0x20(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x80(%rax)
movl -0x24(%rbp), %eax
cmpl -0x18(%rbp), %eax
jl 0x120e3
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x1, %eax
jl 0x12096
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x4, %eax
jg 0x12096
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movl $0x5, %eax
subl %ecx, %eax
movl %eax, -0x4c(%rbp)
jmp 0x120a9
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq -0x10(%rbp), %rsi
movq 0x80(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x80(%rsi)
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x12044
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x80, %rdx
xorl %esi, %esi
callq 0x11ee0
movq -0x10(%rbp), %rax
cmpq $0x1, 0x40(%rax)
jb 0x12120
jmp 0x1213f
leaq 0x1386e(%rip), %rdi     # 0x25995
leaq 0x136c3(%rip), %rsi     # 0x257f1
movl $0x10c, %edx            # imm = 0x10C
leaq 0x13826(%rip), %rcx     # 0x25960
callq 0x20f0
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq $0x1, %rdx
cmoval %ecx, %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq $0x1, 0x40(%rax)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)