// File: /workspace/github_c_makefile_star2_O1/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 0x6b41
cmpl $0x2, %ebp
jl 0x6f8a
movq 0x8(%rbx), %rax
cmpb $0x0, (%rax)
je 0x6f8a
xorl %edi, %edi
callq 0x20a0
testl %eax, %eax
je 0x6fac
callq 0x6b0f
leaq 0x23a7(%rip), %rsi      # 0x933d
leaq 0x250e(%rip), %rcx      # 0x94ab
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x68c8
movq 0x8(%rbx), %rdi
callq 0x2130
movq %rax, %r14
leaq 0x1(%rax), %r15
cmpq $0x42, %r15
jb 0x6fe8
callq 0x6b0f
movq 0x8(%rbx), %rcx
leaq 0x2367(%rip), %rsi      # 0x9339
leaq 0x26ef(%rip), %r8       # 0x96c8
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x68c8
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
cmpq $-0x1, %rax
jne 0x701b
callq 0x6b0f
leaq 0x2338(%rip), %rsi      # 0x933d
leaq 0x26cb(%rip), %rcx      # 0x96d7
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x68c8
leaq (%rsp,%r15), %r12
movabsq $0x200000c01, %r13      # imm = 0x200000C01
movq 0x8(%rbx), %rax
movzbl (%rax), %ebp
incq 0xa369(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
je 0x7169
movzbl %al, %ecx
cmpl $0x9, %ecx
je 0x70da
cmpl $0x20, %ecx
je 0x70da
cmpl $0x3a, %ecx
jne 0x70b9
incq 0xa33a(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
movzbl %al, %ecx
cmovel %eax, %ecx
cmpl $0x9, %ecx
je 0x705f
cmpl $0x20, %ecx
je 0x705f
cmpl %ebp, %ecx
jne 0x7124
movq %rsp, %r15
leal 0x1(%rcx), %eax
cmpl $0x21, %eax
ja 0x7097
btq %rax, %r13
jb 0x70f4
movb %cl, (%r15)
incq 0xa2ff(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
movzbl %al, %ecx
cmovel %eax, %ecx
incq %r15
cmpq %r12, %r15
jb 0x7089
jmp 0x70f8
cmpl $-0x1, %ecx
je 0x7124
cmpl $0xa, %ecx
je 0x7124
incq 0xa2d6(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
movzbl %al, %ecx
cmovel %eax, %ecx
jmp 0x70b9
incq 0xa2bf(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
movzbl %al, %ecx
cmovel %eax, %ecx
jmp 0x7048
movb $0x0, (%r15)
cmpl $-0x1, %ecx
je 0x7169
cmpl $0xa, %ecx
je 0x7119
incq 0xa297(%rip)            # 0x113a0
callq 0x2240
cmpl $-0x1, %eax
movzbl %al, %ecx
cmovel %eax, %ecx
jmp 0x70f8
movq %rsp, %rax
subq %rax, %r15
cmpq %r14, %r15
je 0x7141
incq 0xa275(%rip)            # 0x113a0
callq 0x2240
movzbl %al, %ecx
cmpl $-0x1, %eax
cmovel %eax, %ecx
jne 0x7048
jmp 0x7169
movq 0x8(%rbx), %rsi
movq %rsp, %rdi
callq 0x2230
testl %eax, %eax
jne 0x7029
movq 0xa244(%rip), %rsi      # 0x113a0
xorl %ebx, %ebx
xorl %edi, %edi
xorl %edx, %edx
callq 0x21a0
jmp 0x7198
movb $0x0, (%rsp)
callq 0x6b0f
movq 0x8(%rbx), %rcx
leaq 0x21bc(%rip), %rsi      # 0x9339
leaq 0x255f(%rip), %r8       # 0x96e3
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6a82
movl $0x1, %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq