// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/getopt.c
// Function: rc_getopt
extern int rc_getopt(int argc, char **argv, char *opts) {
	static int sp = 1;
	int c;
	char *cp;
	if (rc_optind == 0) /* reset rc_getopt() */
		rc_optind = sp = 1;
	if (sp == 1) {
		if (rc_optind >= argc || argv[rc_optind][0] != '-' || argv[rc_optind][1] == '\0') {
			return -1;
		} else if (strcmp(argv[rc_optind], "--") == 0) {
			rc_optind++;
			return -1;
		}
	}
	rc_optopt = c = argv[rc_optind][sp];
	if (c == ':' || (cp=strchr(opts, c)) == 0) {
		fprint(2, "%s: bad option: -%c\n", argv[0], c);
		if (argv[rc_optind][++sp] == '\0') {
			rc_optind++;
			sp = 1;
		}
		return '?';
	}
	if (*++cp == ':') {
		if (argv[rc_optind][sp+1] != '\0') {
			rc_optarg = &argv[rc_optind++][sp+1];
		} else if (++rc_optind >= argc) {
			fprint(2, "%s: option requires an argument -- %c\n", argv[0], c);
			sp = 1;
			return '?';
		} else
			rc_optarg = argv[rc_optind++];
		sp = 1;
	} else {
		if (argv[rc_optind][++sp] == '\0') {
			sp = 1;
			rc_optind++;
		}
		rc_optarg = NULL;
	}
	return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
movslq 0x13541(%rip), %r15     # 0x192f8
testq %r15, %r15
je 0x5e2f
movslq 0x13539(%rip), %r13     # 0x192fc
cmpq $0x1, %r13
je 0x5e43
movq (%r14,%r15,8), %r12
movb (%r12,%r13), %al
movsbl %al, %ebx
movl %ebx, 0x13bf6(%rip)     # 0x199d0
movl $0x3a, %ecx
cmpb $0x3a, %bl
je 0x5ea7
movslq %r13d, %rax
addq %r12, %rax
movq %rax, (%rsp)
movq %rdx, %rdi
movl %ebx, %esi
callq 0x3120
testq %rax, %rax
je 0x5ea5
cmpb $0x3a, 0x1(%rax)
jne 0x5eef
leal 0x1(%r15), %eax
movq (%rsp), %rcx
cmpb $0x0, 0x1(%rcx)
movl %eax, 0x134d7(%rip)     # 0x192f8
je 0x5f30
incq %rcx
jmp 0x5f45
movl $0x1, %r15d
movl %r15d, 0x134c0(%rip)    # 0x192fc
movl %r15d, 0x134b5(%rip)    # 0x192f8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl %ebp, %r15d
jge 0x5f56
movslq %r15d, %rax
movq (%r14,%rax,8), %r12
cmpb $0x2d, (%r12)
jne 0x5f56
movzbl 0x1(%r12), %eax
testl %eax, %eax
je 0x5f56
cmpl $0x2d, %eax
jne 0x5f25
cmpb $0x0, 0x2(%r12)
je 0x5f67
leaq 0x1(%r12), %rcx
movq %rcx, (%rsp)
movl %eax, 0x13b3b(%rip)     # 0x199d0
movl $0x1, %r13d
movl $0x2d, %ebx
jmp 0x5df2
movl %ebx, %ecx
movq (%r14), %rdx
leaq 0x97d9(%rip), %rsi      # 0xf68a
movl $0x2, %edi
xorl %eax, %eax
callq 0xaf8c
movslq 0x13434(%rip), %rax     # 0x192f8
movq (%r14,%rax,8), %rcx
movslq 0x1342d(%rip), %rdx     # 0x192fc
leaq 0x1(%rdx), %rsi
movl %esi, 0x13423(%rip)     # 0x192fc
movl $0x3f, %ebx
cmpb $0x0, 0x1(%rcx,%rdx)
jne 0x5f56
incl %eax
movl %eax, 0x1340b(%rip)     # 0x192f8
jmp 0x5f4c
movslq %r13d, %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0x13400(%rip)     # 0x192fc
cmpb $0x0, 0x1(%r12,%rax)
jne 0x5f18
movl $0x1, 0x133ee(%rip)     # 0x192fc
incl %r15d
movl %r15d, 0x133e0(%rip)    # 0x192f8
movq $0x0, 0x13ab5(%rip) # 0x199d8
jmp 0x5f56
movl $0x1, %r13d
jmp 0x5dd1
cmpl %ebp, %eax
jge 0x5f73
addl $0x2, %r15d
movl %r15d, 0x133b9(%rip)    # 0x192f8
cltq
movq (%r14,%rax,8), %rcx
movq %rcx, 0x13a8c(%rip)     # 0x199d8
movl $0x1, 0x133a6(%rip)     # 0x192fc
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl %r15d
movl %r15d, 0x13387(%rip)    # 0x192f8
jmp 0x5f56
movq (%r14), %rdx
leaq 0x9722(%rip), %rsi      # 0xf69f
movl $0x2, %edi
movl %ebx, %ecx
xorl %eax, %eax
callq 0xaf8c
movl $0x1, 0x13367(%rip)     # 0x192fc
movl $0x3f, %ebx
jmp 0x5f56