// File: /workspace/github_c_makefile_star2_O0/blasphemy[P]mmc-utils/mmc.c
// Function: check_ambiguity
static int check_ambiguity(struct Command *cmd, char **argv){
	int		i;
	struct Command	*cp;
	/* check for ambiguity */
	for( i = 0 ; i < cmd->ncmds ; i++ ){
		int match;
		for( match = 0, cp = commands; cp->verb; cp++ ){
			int	j, skip;
			char	*s1, *s2;

			if( cp->ncmds < i )
				continue;

			for( skip = 0, j = 0 ; j < i ; j++ )
				if( strcmp(cmd->cmds[j], cp->cmds[j])){
					skip=1;
					break;
				}
			if(skip)
				continue;

			if( !strcmp(cmd->cmds[i], cp->cmds[i]))
				continue;
			for(s2 = cp->cmds[i], s1 = argv[i+1];
				*s1 == *s2 && *s1; s1++, s2++ ) ;
			if( !*s1 )
				match++;
		}
		if(match){
			int j;
			fprintf(stderr, "ERROR: in command '");
			for( j = 0 ; j <= i ; j++ )
				fprintf(stderr, "%s%s",j?" ":"", argv[j+1]);
			fprintf(stderr, "', '%s' is ambiguous\n",argv[j]);
			return -2;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x3d4d
movl $0x0, -0x2c(%rbp)
leaq 0x1760b(%rip), %rax     # 0x1b150
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3c93
movq -0x28(%rbp), %rax
movl 0x30(%rax), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3b69
jmp 0x3c82
movl $0x0, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3bbf
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3170
cmpl $0x0, %eax
je 0x3bb2
movl $0x1, -0x34(%rbp)
jmp 0x3bbf
jmp 0x3bb4
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x3b77
cmpl $0x0, -0x34(%rbp)
je 0x3bca
jmp 0x3c82
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3170
cmpl $0x0, %eax
jne 0x3bf9
jmp 0x3c82
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movsbl (%rax), %ecx
movq -0x48(%rbp), %rax
movsbl (%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x4d(%rbp)
jne 0x3c49
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x4d(%rbp)
movb -0x4d(%rbp), %al
testb $0x1, %al
jne 0x3c52
jmp 0x3c6e
jmp 0x3c54
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x3c22
movq -0x40(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x3c80
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3c82
movq -0x28(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x28(%rbp)
jmp 0x3b49
cmpl $0x0, -0x2c(%rbp)
je 0x3d3d
movq 0x1734c(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
leaq 0xf94f(%rip), %rsi      # 0x135fd
movb $0x0, %al
callq 0x3180
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x3d10
movq 0x17325(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
movl -0x4c(%rbp), %ecx
leaq 0xf924(%rip), %rdx      # 0x135fc
leaq 0x12c5f(%rip), %rax     # 0x1693e
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movq -0x18(%rbp), %rax
movl -0x4c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
leaq 0xf913(%rip), %rsi      # 0x13611
movb $0x0, %al
callq 0x3180
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3cbc
movq 0x172d9(%rip), %rax     # 0x1aff0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0xf8e9(%rip), %rsi      # 0x13616
movb $0x0, %al
callq 0x3180
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x3d54
jmp 0x3d3f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3b27
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)