// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/util.c
// Function: sbi_goto
static int
sbi_goto(int argc, char **argv)
{
	size_t siz;
	char label[LABELMAX];

	setmyname(argv[0]);

	if (argc < 2 || *argv[1] == EOS || isatty(FD0) != 0)
		err(FC_ERR, FMT2S, getmyname(), ERR_GENERIC);
	if ((siz = strlen(argv[1]) + 1) > sizeof(label))
		err(FC_ERR, FMT3S, getmyname(), argv[1], ERR_LABTOOLONG);
	if (lseek(FD0, (off_t)0, SEEK_SET) == -1)
		err(FC_ERR, FMT2S, getmyname(), ERR_SEEK);

	while (getlabel(label, *argv[1] & 0377, siz))
		if (strcmp(label, argv[1]) == 0) {
			(void)lseek(FD0, offset, SEEK_SET);
			return SH_TRUE;
		}

	fd_print(FD2, FMT3S, getmyname(), argv[1], ERR_LABNOTFOUND);
	return SH_FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq (%rsi), %rdi
callq 0x6ab9
cmpl $0x2, %ebp
jl 0x6ef9
movq 0x8(%rbx), %rax
cmpb $0x0, (%rax)
je 0x6ef9
xorl %edi, %edi
callq 0x20a0
testl %eax, %eax
je 0x6f1b
callq 0x6a87
leaq 0x2432(%rip), %rsi      # 0x9337
leaq 0x2595(%rip), %rcx      # 0x94a1
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
movq 0x8(%rbx), %rdi
callq 0x2130
movq %rax, %r14
leaq 0x1(%rax), %r15
cmpq $0x42, %r15
jb 0x6f57
callq 0x6a87
movq 0x8(%rbx), %rcx
leaq 0x23f2(%rip), %rsi      # 0x9333
leaq 0x27c9(%rip), %r8       # 0x9711
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
cmpq $-0x1, %rax
jne 0x6f8a
callq 0x6a87
leaq 0x23c3(%rip), %rsi      # 0x9337
leaq 0x27a5(%rip), %rcx      # 0x9720
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
leaq (%rsp,%r15), %r13
movq 0x8(%rbx), %r12
movabsq $0x200000c01, %rbp      # imm = 0x200000C01
movzbl (%r12), %r12d
incq 0xa3f8(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
je 0x70c1
movzbl %al, %ecx
cmpl $0x9, %ecx
je 0x6fc3
cmpl $0x20, %ecx
jne 0x6fda
incq 0xa3d6(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
movzbl %al, %ecx
cmovel %eax, %ecx
jmp 0x6fb9
cmpl $0x3a, %ecx
jne 0x7039
incq 0xa3ba(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
movzbl %al, %ecx
cmovel %eax, %ecx
cmpl $0x9, %ecx
je 0x6fdf
cmpl $0x20, %ecx
je 0x6fdf
cmpl %r12d, %ecx
jne 0x6fa1
movl %r12d, %ecx
movq %rsp, %r15
leal 0x1(%rcx), %eax
cmpl $0x21, %eax
ja 0x7017
btq %rax, %rbp
jb 0x7062
movb %cl, (%r15)
incq 0xa37f(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
movzbl %al, %ecx
cmovel %eax, %ecx
incq %r15
cmpq %r13, %r15
jb 0x7009
jmp 0x7066
cmpl $-0x1, %ecx
je 0x6fa1
cmpl $0xa, %ecx
je 0x6fa1
incq 0xa34e(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
movzbl %al, %ecx
cmovel %eax, %ecx
jmp 0x7039
movb $0x0, (%r15)
cmpl $-0x1, %ecx
je 0x70c1
cmpl $0xa, %ecx
je 0x7087
incq 0xa329(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
movzbl %al, %ecx
cmovel %eax, %ecx
jmp 0x7066
movq %rsp, %rax
subq %rax, %r15
cmpq %r14, %r15
jne 0x6fa1
movq 0x8(%rbx), %r12
movq %rsp, %rdi
movq %r12, %rsi
callq 0x2230
testl %eax, %eax
jne 0x6f9c
movq 0xa2ec(%rip), %rsi      # 0x113a0
xorl %ebx, %ebx
xorl %edi, %edi
xorl %edx, %edx
callq 0x21a0
jmp 0x70f0
movb $0x0, (%rsp)
callq 0x6a87
movq 0x8(%rbx), %rcx
leaq 0x225e(%rip), %rsi      # 0x9333
leaq 0x2650(%rip), %r8       # 0x972c
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x69fa
movl $0x1, %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq