// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libcpuid/recog_amd.c
// Function: amd_has_turion_modelname
static int amd_has_turion_modelname(const char *bs)
{
	/* We search for something like TL-60. Ahh, I miss regexes...*/
	int i, l, k;
	char code[3] = {0};
	const char* codes[] = { "ML", "MT", "MK", "TK", "TL", "RM", "ZM", "" };
	l = (int) strlen(bs);
	for (i = 3; i < l - 2; i++) {
		if (bs[i] == '-' &&
		    isupper(bs[i-1]) && isupper(bs[i-2]) && !isupper(bs[i-3]) &&
		    isdigit(bs[i+1]) && isdigit(bs[i+2]) && !isdigit(bs[i+3]))
		{
			code[0] = bs[i-2];
			code[1] = bs[i-1];
			for (k = 0; codes[k][0]; k++)
				if (!strcmp(codes[k], code)) return 1;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x1f(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x5a200
leaq -0x60(%rbp), %rdi
leaq 0xcfda9(%rip), %rsi     # 0x207b40
movl $0x40, %edx
callq 0x593a0
movq -0x10(%rbp), %rdi
callq 0x5a790
movl %eax, -0x18(%rbp)
movl $0x3, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x137f64
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2d, %eax
jne 0x137f54
callq 0x596d0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x137f54
callq 0x596d0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
subl $0x2, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x137f54
callq 0x596d0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
subl $0x3, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x137f54
callq 0x596d0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x137f54
callq 0x596d0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x137f54
callq 0x596d0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
addl $0x3, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x137f54
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x1f(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x1e(%rbp)
movl $0x0, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
movq -0x60(%rbp,%rax,8), %rax
cmpb $0x0, (%rax)
je 0x137f52
movslq -0x1c(%rbp), %rax
movq -0x60(%rbp,%rax,8), %rdi
leaq -0x1f(%rbp), %rsi
callq 0x5c440
cmpl $0x0, %eax
jne 0x137f45
movl $0x1, -0x4(%rbp)
jmp 0x137f6b
jmp 0x137f47
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x137f17
jmp 0x137f54
jmp 0x137f56
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x137db4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop