// File: /workspace/github_c_makefile_star2_O1/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 %rdx, %r15
movq %rsi, %r14
movl %edi, %ebp
cmpl $0x0, 0x1343e(%rip)     # 0x192f8
jne 0x5ecd
movl $0x1, %eax
movl %eax, 0x13435(%rip)     # 0x192fc
movl %eax, 0x1342b(%rip)     # 0x192f8
movslq 0x13428(%rip), %r12     # 0x192fc
cmpq $0x1, %r12
jne 0x5f1a
movslq 0x13417(%rip), %r13     # 0x192f8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl %ebp, %r13d
jge 0x6012
movq (%r14,%r13,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x6012
cmpb $0x0, 0x1(%rdi)
je 0x6012
leaq 0x91f0(%rip), %rsi      # 0xf0fd
callq 0x31f0
testl %eax, %eax
je 0x6023
movl %ebp, 0x4(%rsp)
movslq 0x133d3(%rip), %r13     # 0x192f8
movq (%r14,%r13,8), %rbp
movsbl (%rbp,%r12), %ebx
movl %ebx, 0x13a9b(%rip)     # 0x199d0
cmpl $0x3a, %ebx
je 0x5f6e
movq %r15, %rdi
movl %ebx, %esi
callq 0x3120
testq %rax, %rax
je 0x5f6e
cmpb $0x3a, 0x1(%rax)
jne 0x5fb8
addq %r12, %rbp
leal 0x1(%r13), %eax
cmpb $0x0, 0x1(%rbp)
movl %eax, 0x13398(%rip)     # 0x192f8
je 0x5fec
incq %rbp
jmp 0x6001
movq (%r14), %rdx
leaq 0x9722(%rip), %rsi      # 0xf69a
movl $0x2, %edi
movl %ebx, %ecx
xorl %eax, %eax
callq 0xb06f
movslq 0x1336b(%rip), %rax     # 0x192f8
movq (%r14,%rax,8), %rcx
movslq 0x13364(%rip), %rdx     # 0x192fc
leaq 0x1(%rdx), %rsi
movl %esi, 0x1335a(%rip)     # 0x192fc
movl $0x3f, %ebx
cmpb $0x0, 0x1(%rcx,%rdx)
jne 0x6012
incl %eax
movl %eax, 0x13342(%rip)     # 0x192f8
jmp 0x6008
leaq 0x1(%r12), %rax
movl %eax, 0x13339(%rip)     # 0x192fc
cmpb $0x0, 0x1(%rbp,%r12)
jne 0x5fdf
movl $0x1, 0x13327(%rip)     # 0x192fc
incl %r13d
movl %r13d, 0x13319(%rip)    # 0x192f8
movq $0x0, 0x139ee(%rip) # 0x199d8
jmp 0x6012
cmpl 0x4(%rsp), %eax
jge 0x602f
leal 0x2(%r13), %eax
movl %eax, 0x132fc(%rip)     # 0x192f8
movq 0x8(%r14,%r13,8), %rbp
movq %rbp, 0x139d0(%rip)     # 0x199d8
movl $0x1, 0x132ea(%rip)     # 0x192fc
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl %r13d
movl %r13d, 0x132cb(%rip)    # 0x192f8
jmp 0x6012
movq (%r14), %rdx
leaq 0x9676(%rip), %rsi      # 0xf6af
movl $0x2, %edi
movl %ebx, %ecx
xorl %eax, %eax
callq 0xb06f
movl $0x1, 0x132ab(%rip)     # 0x192fc
movl $0x3f, %ebx
jmp 0x6012