// File: /workspace/github_c_makefile_star2_O0/dalnefre[P]kernel_abe/dbug.c
// Function: parse
static int
parse(char *p)
{
	int c;
#define	GET()		((*p)?(*p++):'\0')
#define	UNGET(c)	((c)?(*--p = c):'\0')
	char *q;

	if (*p == '-') {		/* command line option prefix */
		++p;
	}
	while (*p == '#') {		/* DBUG option letter */
		++p;
	}
	if (*p == '+') {		/* add to existing modes */
		++p;
	} else {
		dbug_cfg->mode = 0;
	}
	for (;;) {
		c = GET();
		switch (c) {
		case 'd':
			dbug_cfg->mode |= DBUG_IS_ON;
			dbug_cfg->kw_list = p;
			break;
		case 'o':
			fflush(dbug_cfg->output);
			dbug_cfg->output = open_output(p);
			break;
		case 't':
			dbug_cfg->mode |= DBUG_TRACE_ON;
			q = mk_string(p);
			if (*q) {
				dbug_cfg->maxdepth = atoi(q);
			}
			break;
		case 'c':
			dbug_cfg->mode |= DBUG_CALLS_ON;
			q = mk_string(p);
			if (*q) {
				dbug_cfg->maxdepth = atoi(q);
			}
			break;
		case 'p':	dbug_cfg->proc_list = p;		break;
		case 'u':	dbug_cfg->unit_list = p;		break;
		case 'f':	dbug_cfg->fn_list = p;			break;
		case 'N':	dbug_cfg->mode |= DBUG_NUMBER_ON;	break;
		case 'T':	dbug_cfg->mode |= DBUG_TIME_ON;		break;
		case 'F':	dbug_cfg->mode |= DBUG_FILE_ON;		break;
		case 'L':	dbug_cfg->mode |= DBUG_LINE_ON;		break;
		case 'P':	dbug_cfg->mode |= DBUG_PROC_ON;		break;
		case 'I':	dbug_cfg->mode |= DBUG_PID_ON;		break;
		case 'U':	dbug_cfg->mode |= DBUG_UNIT_ON;		break;
		case 'n': /* --obsolete-- */
		case 'D':	dbug_cfg->mode |= DBUG_DEPTH_ON;	break;
		case 'r':
			dbug_cfg->ctx->depth = atoi(mk_string(p));
			break;
		case 'i':
			dbug_cfg->indent = atoi(mk_string(p));
			if (dbug_cfg->indent < 1) {
				dbug_cfg->indent = 1;
			}
			break;
		case ':':
			UNGET(':');
			break;
		case '\0':
			return 0;	/* success */
		default:
			/* unrecognized option */
			dbug_fatal("unrecognized option '%c' (0x%02x)",
				c, c);
			break;
		}
		while (((c = GET()) != '\0') && (c != ':'))
			;
	}
	/* NOTREACHED */
	return 0;		/* success */
#undef GET
#undef UNGET
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x27c04
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x27c06
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x27c20
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x27c06
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x27c3a
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x27c47
movq 0x76df(%rip), %rax      # 0x2f320
movl $0x0, (%rax)
jmp 0x27c49
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x27c6c
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x27c73
xorl %eax, %eax
movl %eax, -0x1c(%rbp)
jmp 0x27c73
movl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x28(%rbp)
subq $0x75, %rax
ja 0x27ece
movq -0x28(%rbp), %rax
leaq 0x3aab(%rip), %rcx      # 0x2b740
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x767b(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x1, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rcx
movq 0x7669(%rip), %rax      # 0x2f320
movq %rcx, 0x48(%rax)
jmp 0x27ee2
movq 0x7659(%rip), %rax      # 0x2f320
movq 0x18(%rax), %rdi
callq 0x21c0
movq -0x8(%rbp), %rdi
callq 0x28870
movq %rax, %rcx
movq 0x763d(%rip), %rax      # 0x2f320
movq %rcx, 0x18(%rax)
jmp 0x27ee2
movq 0x762d(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
callq 0x28940
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x27d25
movq -0x18(%rbp), %rdi
callq 0x2210
movl %eax, %ecx
movq 0x75fe(%rip), %rax      # 0x2f320
movl %ecx, 0x24(%rax)
jmp 0x27ee2
movq 0x75ef(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x4, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
callq 0x28940
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x27d63
movq -0x18(%rbp), %rdi
callq 0x2210
movl %eax, %ecx
movq 0x75c0(%rip), %rax      # 0x2f320
movl %ecx, 0x24(%rax)
jmp 0x27ee2
movq -0x8(%rbp), %rcx
movq 0x75ad(%rip), %rax      # 0x2f320
movq %rcx, 0x30(%rax)
jmp 0x27ee2
movq -0x8(%rbp), %rcx
movq 0x7599(%rip), %rax      # 0x2f320
movq %rcx, 0x38(%rax)
jmp 0x27ee2
movq -0x8(%rbp), %rcx
movq 0x7585(%rip), %rax      # 0x2f320
movq %rcx, 0x40(%rax)
jmp 0x27ee2
movq 0x7575(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, (%rax)
jmp 0x27ee2
movq 0x755f(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x200, %ecx            # imm = 0x200
movl %ecx, (%rax)
jmp 0x27ee2
movq 0x7549(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x400, %ecx            # imm = 0x400
movl %ecx, (%rax)
jmp 0x27ee2
movq 0x7533(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x800, %ecx            # imm = 0x800
movl %ecx, (%rax)
jmp 0x27ee2
movq 0x751d(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %ecx, (%rax)
jmp 0x27ee2
movq 0x7507(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x2000, %ecx           # imm = 0x2000
movl %ecx, (%rax)
jmp 0x27ee2
movq 0x74f1(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x4000, %ecx           # imm = 0x4000
movl %ecx, (%rax)
jmp 0x27ee2
movq 0x74db(%rip), %rax      # 0x2f320
movl (%rax), %ecx
orl $0x8000, %ecx           # imm = 0x8000
movl %ecx, (%rax)
jmp 0x27ee2
movq -0x8(%rbp), %rdi
callq 0x28940
movq %rax, %rdi
callq 0x2210
movl %eax, %ecx
movq 0x74b2(%rip), %rax      # 0x2f320
movq 0x50(%rax), %rax
movl %ecx, 0x8(%rax)
jmp 0x27ee2
movq -0x8(%rbp), %rdi
callq 0x28940
movq %rax, %rdi
callq 0x2210
movl %eax, %ecx
movq 0x748f(%rip), %rax      # 0x2f320
movl %ecx, 0x20(%rax)
movq 0x7485(%rip), %rax      # 0x2f320
cmpl $0x1, 0x20(%rax)
jge 0x27eaf
movq 0x7478(%rip), %rax      # 0x2f320
movl $0x1, 0x20(%rax)
jmp 0x27ee2
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x3a, -0x1(%rax)
jmp 0x27ee2
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
movl -0xc(%rbp), %esi
movl -0xc(%rbp), %edx
leaq 0x3ae1(%rip), %rdi      # 0x2b9bc
movb $0x0, %al
callq 0x28300
jmp 0x27ee4
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x27f07
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0x27f0e
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x27f0e
movl -0x2c(%rbp), %ecx
movl %ecx, -0xc(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x2d(%rbp)
je 0x27f28
cmpl $0x3a, -0xc(%rbp)
setne %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x27f31
jmp 0x27f33
jmp 0x27ee4
jmp 0x27c49
nopl (%rax,%rax)