// File: /workspace/github_c_makefile_star2_O0/aligrudi[P]neatmkfn/trfn.c
// Function: trfn_name
static int trfn_name(char *dst, char *src, int codepoint)
{
	char ch[GNLEN];
	char *d = dst;
	char *s;
	int i;
	if (codepoint) {
		utf8put(&dst, codepoint);
		return 0;
	}
	if (!src || src[0] == '.')
		return 1;
	while (*src && *src != '.') {
		s = ch;
		if (src[0] == '_')
			src++;
		while (*src && *src != '_' && *src != '.')
			*s++ = *src++;
		*s = '\0';
		if (!agl_map(d, ch)) {
			d = strchr(d, '\0');
		} else if (ch[0] == 'u' && ch[1] == 'n' &&
				ch[2] == 'i' && hexval(ch + 3, 4) > 0) {
			for (i = 0; strlen(ch + 3 + 4 * i) >= 4; i++)
				utf8put(&d, hexval(ch + 3 + 4 * i, 4));
		} else if (ch[0] == 'u' && hexval(ch + 1, 4) > 0) {
			utf8put(&d, hexval(ch + 1, 6));
		} else if (achar_map(ch)) {
			utf8put(&d, achar_map(ch));
		} else {
			return 1;
		}
	}
	ashape(dst, src);
	return *src && strcmp(src, ".medi") && strcmp(src, ".fina") &&
			strcmp(src, ".init") && strcmp(src, ".isol");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x3decc
movl -0x1c(%rbp), %esi
leaq -0x10(%rbp), %rdi
callq 0x3e640
movl $0x0, -0x4(%rbp)
jmp 0x3e168
cmpq $0x0, -0x18(%rbp)
je 0x3dedf
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x3deeb
movl $0x1, -0x4(%rbp)
jmp 0x3e168
jmp 0x3deed
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x75(%rbp)
je 0x3df0e
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
setne %al
movb %al, -0x75(%rbp)
movb -0x75(%rbp), %al
testb $0x1, %al
jne 0x3df1a
jmp 0x3e0d2
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5f, %eax
jne 0x3df3a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3df3c
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x76(%rbp)
je 0x3df6e
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x5f, %ecx
movb %al, -0x76(%rbp)
je 0x3df6e
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
setne %al
movb %al, -0x76(%rbp)
movb -0x76(%rbp), %al
testb $0x1, %al
jne 0x3df77
jmp 0x3df9b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %cl
movq -0x70(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x70(%rbp)
movb %cl, (%rax)
jmp 0x3df3c
movq -0x70(%rbp), %rax
movb $0x0, (%rax)
movq -0x68(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3e770
cmpl $0x0, %eax
jne 0x3dfc8
movq -0x68(%rbp), %rdi
xorl %esi, %esi
callq 0x3d0a0
movq %rax, -0x68(%rbp)
jmp 0x3e0cd
movsbl -0x60(%rbp), %eax
cmpl $0x75, %eax
jne 0x3e058
movsbl -0x5f(%rbp), %eax
cmpl $0x6e, %eax
jne 0x3e058
movsbl -0x5e(%rbp), %eax
cmpl $0x69, %eax
jne 0x3e058
leaq -0x60(%rbp), %rdi
addq $0x3, %rdi
movl $0x4, %esi
callq 0x3e830
cmpl $0x0, %eax
jle 0x3e058
movl $0x0, -0x74(%rbp)
leaq -0x60(%rbp), %rdi
addq $0x3, %rdi
movl -0x74(%rbp), %eax
shll $0x2, %eax
cltq
addq %rax, %rdi
callq 0x3d080
cmpq $0x4, %rax
jb 0x3e056
leaq -0x60(%rbp), %rdi
addq $0x3, %rdi
movl -0x74(%rbp), %eax
shll $0x2, %eax
cltq
addq %rax, %rdi
movl $0x4, %esi
callq 0x3e830
movl %eax, %esi
leaq -0x68(%rbp), %rdi
callq 0x3e640
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x3e005
jmp 0x3e0cb
movsbl -0x60(%rbp), %eax
cmpl $0x75, %eax
jne 0x3e097
leaq -0x60(%rbp), %rdi
addq $0x1, %rdi
movl $0x4, %esi
callq 0x3e830
cmpl $0x0, %eax
jle 0x3e097
leaq -0x60(%rbp), %rdi
addq $0x1, %rdi
movl $0x6, %esi
callq 0x3e830
movl %eax, %esi
leaq -0x68(%rbp), %rdi
callq 0x3e640
jmp 0x3e0c9
leaq -0x60(%rbp), %rdi
callq 0x3e900
cmpl $0x0, %eax
je 0x3e0bb
leaq -0x60(%rbp), %rdi
callq 0x3e900
movl %eax, %esi
leaq -0x68(%rbp), %rdi
callq 0x3e640
jmp 0x3e0c7
movl $0x1, -0x4(%rbp)
jmp 0x3e168
jmp 0x3e0c9
jmp 0x3e0cb
jmp 0x3e0cd
jmp 0x3deed
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3ead0
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x77(%rbp)
je 0x3e15d
movq -0x18(%rbp), %rdi
leaq 0x86b0(%rip), %rsi      # 0x467ab
callq 0x3d120
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x77(%rbp)
je 0x3e15d
movq -0x18(%rbp), %rdi
leaq 0x869a(%rip), %rsi      # 0x467b1
callq 0x3d120
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x77(%rbp)
je 0x3e15d
movq -0x18(%rbp), %rdi
leaq 0x8684(%rip), %rsi      # 0x467b7
callq 0x3d120
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x77(%rbp)
je 0x3e15d
movq -0x18(%rbp), %rdi
leaq 0x866e(%rip), %rsi      # 0x467bd
callq 0x3d120
cmpl $0x0, %eax
setne %al
movb %al, -0x77(%rbp)
movb -0x77(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)