// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/motion.c
// Function: find_unnested_paren
static bool find_unnested_paren(
		const int ptofind, const int porig, const int dir,
		list_t **pl, point_t *pos)
{
	int nest = 0;

	for(list_t *l = *pl;
	    l;
	    l = *pl = list_advance_y(l, dir, &pos->y, &pos->x))
	{
		if((unsigned)pos->x >= l->len_line)
			continue;

		char in_quote = 0; /* scoped here - ignore multi-line quotes */

		char *p = l->line + pos->x;
		while(1){
			if((*p == '\'' || *p == '"')
			&& (!in_quote || in_quote == *p))
			{
				if(in_quote == *p){
					in_quote = 0;
				}else{
					in_quote = *p;
				}
			}else if(in_quote){
				/* skipping quotes */
			}else if(*p == ptofind){
				if(nest == 0){
					pos->x = p - l->line;
					return true;
				}
				nest--;
			}else if(*p == porig){
				nest++;
			}

			if(dir > 0){
				if(p == l->line + l->len_line - 1)
					break;
				p++;
			}else{
				if(p == l->line)
					break;
				p--;
			}
		}
	}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1027c
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jb 0x1013b
jmp 0x10254
movb $0x0, -0x31(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
je 0x1016c
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x101a1
cmpb $0x0, -0x31(%rbp)
je 0x10181
movsbl -0x31(%rbp), %eax
movq -0x40(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x101a1
movsbl -0x31(%rbp), %eax
movq -0x40(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x10196
movb $0x0, -0x31(%rbp)
jmp 0x1019f
movq -0x40(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
jmp 0x10200
cmpb $0x0, -0x31(%rbp)
je 0x101a9
jmp 0x101fe
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x101e5
cmpl $0x0, -0x24(%rbp)
jne 0x101da
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x10280
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x101fc
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x101fa
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x101fc
jmp 0x101fe
jmp 0x10200
cmpl $0x0, -0x10(%rbp)
jle 0x10232
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq -0x30(%rbp), %rdx
addq 0x8(%rdx), %rcx
addq $-0x1, %rcx
cmpq %rcx, %rax
jne 0x10224
jmp 0x10252
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1024d
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x10241
jmp 0x10252
movq -0x40(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x10154
jmp 0x10254
movq -0x30(%rbp), %rdi
movl -0x10(%rbp), %esi
movq -0x20(%rbp), %rdx
addq $0x4, %rdx
movq -0x20(%rbp), %rcx
callq 0xe400
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
movq %rax, -0x30(%rbp)
jmp 0x1011b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)