// File: /workspace/github_c_makefile_star2_O0/howerj[P]eweb/main.c
// Function: eweb_getopt
static int eweb_getopt(eweb_getopt_t *opt, const int argc, char *const argv[], const char *fmt) {
	assert(opt);
	assert(fmt);
	assert(argv);
	enum { BADARG_E = ':', BADCH_E = '?' };
	static const char *string_empty = "";

	if (!(opt->init)) {
		opt->place = string_empty; /* option letter processing */
		opt->init  = 1;
		opt->index = 1;
	}

	if (opt->reset || !*opt->place) { /* update scanning pointer */
		opt->reset = 0;
		if (opt->index >= argc || *(opt->place = argv[opt->index]) != '-') {
			opt->place = string_empty;
			return -1;
		}
		if (opt->place[1] && *++opt->place == '-') { /* found "--" */
			opt->index++;
			opt->place = string_empty;
			return -1;
		}
	}

	const char *oli; /* option letter list index */
	if ((opt->option = *opt->place++) == ':' || !(oli = strchr(fmt, opt->option))) { /* option letter okay? */
		 /* if the user didn't specify '-' as an option, assume it means -1.  */
		if (opt->option == '-')
			return -1;
		if (!*opt->place)
			opt->index++;
		if (opt->error && *fmt != ':')
			fprintf(stderr, "illegal option -- %c\n", opt->option);
		return BADCH_E;
	}

	if (*++oli != ':') { /* don't need argument */
		opt->arg = NULL;
		if (!*opt->place)
			opt->index++;
	} else {  /* need an argument */
		if (*opt->place) { /* no white space */
			opt->arg = opt->place;
		} else if (argc <= ++opt->index) { /* no arg */
			opt->place = string_empty;
			if (*fmt == ':')
				return BADARG_E;
			if (opt->error)
				fprintf(stderr, "option requires an argument -- %c\n", opt->option);
			return BADCH_E;
		} else	{ /* white space */
			opt->arg = argv[opt->index];
		}
		opt->place = string_empty;
		opt->index++;
	}
	return opt->option; /* dump back option letter */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2610
jmp 0x262f
leaq 0x4a3d(%rip), %rdi      # 0x7054
leaq 0x4a3a(%rip), %rsi      # 0x7058
movl $0x1c, %edx
leaq 0x4a35(%rip), %rcx      # 0x705f
callq 0x2100
cmpq $0x0, -0x28(%rbp)
je 0x2638
jmp 0x2657
leaq 0x4a69(%rip), %rdi      # 0x70a8
leaq 0x4a12(%rip), %rsi      # 0x7058
movl $0x1d, %edx
leaq 0x4a0d(%rip), %rcx      # 0x705f
callq 0x2100
cmpq $0x0, -0x20(%rbp)
je 0x2660
jmp 0x267f
leaq 0x4a45(%rip), %rdi      # 0x70ac
leaq 0x49ea(%rip), %rsi      # 0x7058
movl $0x1e, %edx
leaq 0x49e5(%rip), %rcx      # 0x705f
callq 0x2100
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x26ae
movq 0x8b28(%rip), %rcx      # 0xb1b8
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0xc(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x26c9
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpb $0x0, (%rax)
jne 0x2772
movq -0x10(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0x14(%rbp), %eax
jge 0x2700
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movq %rax, 0x18(%rcx)
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x271b
movq 0x8ab1(%rip), %rcx      # 0xb1b8
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x292b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x2770
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x18(%rcx)
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x2770
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movq 0x8a5c(%rip), %rcx      # 0xb1b8
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x292b
jmp 0x2772
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x18(%rcx)
movsbl (%rax), %eax
movq -0x10(%rbp), %rcx
movl %eax, 0x10(%rcx)
cmpl $0x3a, %eax
je 0x27ae
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x20e0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x281f
movq -0x10(%rbp), %rax
cmpl $0x2d, 0x10(%rax)
jne 0x27c4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x292b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpb $0x0, (%rax)
jne 0x27de
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x2813
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
je 0x2813
movq 0x87f5(%rip), %rax      # 0xaff0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x48a5(%rip), %rsi      # 0x70b1
movb $0x0, %al
callq 0x21b0
movl $0x3f, -0x4(%rbp)
jmp 0x292b
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movsbl 0x1(%rax), %eax
cmpl $0x3a, %eax
je 0x2861
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpb $0x0, (%rax)
jne 0x285c
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x2921
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpb $0x0, (%rax)
je 0x2882
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x2905
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rdx
movl 0xc(%rdx), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rdx)
cmpl %ecx, %eax
jg 0x28ec
movq 0x891b(%rip), %rcx      # 0xb1b8
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x28ba
movl $0x3a, -0x4(%rbp)
jmp 0x292b
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x28e3
movq 0x8725(%rip), %rax      # 0xaff0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x47eb(%rip), %rsi      # 0x70c7
movb $0x0, %al
callq 0x21b0
movl $0x3f, -0x4(%rbp)
jmp 0x292b
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x2905
movq 0x88ac(%rip), %rcx      # 0xb1b8
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)