// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x0, 0x17cce(%rip)     # 0x1f2f8
jne 0x7640
movl $0x1, 0x17cc6(%rip)     # 0x1f2fc
movl $0x1, 0x17cb8(%rip)     # 0x1f2f8
cmpl $0x1, 0x17cb5(%rip)     # 0x1f2fc
jne 0x76d2
movl 0x17ca5(%rip), %eax     # 0x1f2f8
cmpl -0x8(%rbp), %eax
jge 0x7687
movq -0x10(%rbp), %rax
movslq 0x17c95(%rip), %rcx     # 0x1f2f8
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x7687
movq -0x10(%rbp), %rax
movslq 0x17c7e(%rip), %rcx     # 0x1f2f8
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x7693
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x78bd
movq -0x10(%rbp), %rax
movslq 0x17c5a(%rip), %rcx     # 0x1f2f8
movq (%rax,%rcx,8), %rdi
leaq 0xdaa8(%rip), %rsi      # 0x15151
callq 0x31e0
cmpl $0x0, %eax
jne 0x76ce
movl 0x17c3f(%rip), %eax     # 0x1f2f8
addl $0x1, %eax
movl %eax, 0x17c36(%rip)     # 0x1f2f8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x78bd
jmp 0x76d0
jmp 0x76d2
movq -0x10(%rbp), %rax
movslq 0x17c1b(%rip), %rcx     # 0x1f2f8
movq (%rax,%rcx,8), %rax
movslq 0x17c14(%rip), %rcx     # 0x1f2fc
movsbl (%rax,%rcx), %eax
movl %eax, -0x1c(%rbp)
movl %eax, 0x1836b(%rip)     # 0x1fa60
cmpl $0x3a, -0x1c(%rbp)
je 0x7711
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x3120
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x777d
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movl -0x1c(%rbp), %ecx
movl $0x2, %edi
leaq 0xdfc1(%rip), %rsi      # 0x156e8
movb $0x0, %al
callq 0xf3a0
movq -0x10(%rbp), %rax
movslq 0x17bbf(%rip), %rcx     # 0x1f2f8
movq (%rax,%rcx,8), %rax
movl 0x17bb9(%rip), %ecx     # 0x1f2fc
addl $0x1, %ecx
movl %ecx, 0x17bb0(%rip)     # 0x1f2fc
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x7771
movl 0x17b9a(%rip), %eax     # 0x1f2f8
addl $0x1, %eax
movl %eax, 0x17b91(%rip)     # 0x1f2f8
movl $0x1, 0x17b8b(%rip)     # 0x1f2fc
movl $0x3f, -0x4(%rbp)
jmp 0x78bd
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl 0x1(%rax), %eax
cmpl $0x3a, %eax
jne 0x7869
movq -0x10(%rbp), %rax
movslq 0x17b54(%rip), %rcx     # 0x1f2f8
movq (%rax,%rcx,8), %rax
movl 0x17b4e(%rip), %ecx     # 0x1f2fc
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x77f1
movq -0x10(%rbp), %rax
movl 0x17b31(%rip), %ecx     # 0x1f2f8
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x17b26(%rip)     # 0x1f2f8
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x17b1d(%rip), %ecx     # 0x1f2fc
addl $0x1, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x18279(%rip)     # 0x1fa68
jmp 0x785d
movl 0x17b01(%rip), %eax     # 0x1f2f8
addl $0x1, %eax
movl %eax, 0x17af8(%rip)     # 0x1f2f8
cmpl -0x8(%rbp), %eax
jl 0x7838
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movl -0x1c(%rbp), %ecx
movl $0x2, %edi
leaq 0xdee2(%rip), %rsi      # 0x156fd
movb $0x0, %al
callq 0xf3a0
movl $0x1, 0x17ad0(%rip)     # 0x1f2fc
movl $0x3f, -0x4(%rbp)
jmp 0x78bd
movq -0x10(%rbp), %rax
movl 0x17ab6(%rip), %ecx     # 0x1f2f8
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x17aab(%rip)     # 0x1f2f8
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x1820d(%rip)     # 0x1fa68
jmp 0x785d
movl $0x1, 0x17a95(%rip)     # 0x1f2fc
jmp 0x78b7
movq -0x10(%rbp), %rax
movslq 0x17a84(%rip), %rcx     # 0x1f2f8
movq (%rax,%rcx,8), %rax
movl 0x17a7e(%rip), %ecx     # 0x1f2fc
addl $0x1, %ecx
movl %ecx, 0x17a75(%rip)     # 0x1f2fc
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x78ac
movl $0x1, 0x17a5f(%rip)     # 0x1f2fc
movl 0x17a55(%rip), %eax     # 0x1f2f8
addl $0x1, %eax
movl %eax, 0x17a4c(%rip)     # 0x1f2f8
movq $0x0, 0x181b1(%rip) # 0x1fa68
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)