// File: /workspace/github_c_makefile_star2_O0/inflex[P]ripMIME/uuencode.c
// Function: UUENCODE_is_uuencode_header
int UUENCODE_is_uuencode_header( char *line )
{
	struct PLD_strtok tx;
	char buf[UUENCODE_STRLEN_MAX];
	char *bp,*fp;
	int result = 0;

	// If we're not supposed to be decoding UUencoded files, then return 0
	if (glb.decode == 0) return 0;

	snprintf( buf, sizeof(buf), "%s", line );

	bp = buf;

	// If you're wondering why we dont check for "begin ",it's because we dont know
	// if begin is followed by a \t or ' ' or some other white space
	// Also, check to see that we don't have a VCARD ( look to see if there's a trailing
	//		colon after the BEGIN
	//
	// 2003-08-12:PLD:Added *(bp+6) test as recommended by Bernard Fischer to ensure there's more
	//						data after the begin	

	if ((bp)&&(strncasecmp(bp,"begin",5)==0)&&(*(bp+5)!=':')&&(isspace((int)*(bp+5)))&&(*(bp+6)))
	{
		fp = NULL;
		bp = PLD_strtok(&tx, buf, " \n\r\t"); // Get the begin

		if (bp) fp = PLD_strtok(&tx, NULL, " \n\r\t"); // Get the file-permissions

		if (fp)
		{
			if (UUENCODE_DNORMAL) LOGGER_log("%s:%d:UUENCODE_is_uuencode_header:DEBUG: PERMISSIONS = %s\n", FL, fp);

			if ((atoi(fp) == 0)||(atoi(fp) > 777))   // Maximum is 777, because R+W+X = 7
			{
				result = 0;
			}
			else result = 1;

		}
		else {
			if (UUENCODE_DNORMAL)	LOGGER_log("%s:%d:UUENCODE_is_uuencode_header:WARNING: Cannot read permissions for UUENCODED data file (%s)\n", FL, line);
		}
	}


	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x10(%rbp)
movl $0x0, -0x434(%rbp)
cmpl $0x0, 0x22bbc(%rip)     # 0x35d7c
jne 0x131ce
movl $0x0, -0x4(%rbp)
jmp 0x1336b
leaq -0x420(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x400, %esi            # imm = 0x400
leaq 0xbdc5(%rip), %rdx      # 0x1efaa
movb $0x0, %al
callq 0x2130
leaq -0x420(%rbp), %rax
movq %rax, -0x428(%rbp)
cmpq $0x0, -0x428(%rbp)
je 0x13362
movq -0x428(%rbp), %rdi
leaq 0xc08f(%rip), %rsi      # 0x1f2a5
movl $0x5, %edx
callq 0x22a0
cmpl $0x0, %eax
jne 0x13362
movq -0x428(%rbp), %rax
movsbl 0x5(%rax), %eax
cmpl $0x3a, %eax
je 0x13362
callq 0x23c0
movq (%rax), %rax
movq -0x428(%rbp), %rcx
movsbl 0x5(%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x13362
movq -0x428(%rbp), %rax
movsbl 0x6(%rax), %eax
cmpl $0x0, %eax
je 0x13362
movq $0x0, -0x430(%rbp)
leaq -0x420(%rbp), %rsi
leaq -0x20(%rbp), %rdi
leaq 0xa1c0(%rip), %rdx      # 0x1d456
callq 0x10a10
movq %rax, -0x428(%rbp)
cmpq $0x0, -0x428(%rbp)
je 0x132c7
leaq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xa19b(%rip), %rdx      # 0x1d456
callq 0x10a10
movq %rax, -0x430(%rbp)
cmpq $0x0, -0x430(%rbp)
je 0x13337
cmpl $0x1, 0x22a98(%rip)     # 0x35d70
jl 0x132fb
movq -0x430(%rbp), %rcx
leaq 0xbfc3(%rip), %rdi      # 0x1f2ab
leaq 0xbff7(%rip), %rsi      # 0x1f2e6
movl $0x110, %edx            # imm = 0x110
movb $0x0, %al
callq 0x117c0
movq -0x430(%rbp), %rdi
callq 0x2340
cmpl $0x0, %eax
je 0x1331f
movq -0x430(%rbp), %rdi
callq 0x2340
cmpl $0x309, %eax            # imm = 0x309
jle 0x1332b
movl $0x0, -0x434(%rbp)
jmp 0x13335
movl $0x1, -0x434(%rbp)
jmp 0x13360
cmpl $0x1, 0x22a32(%rip)     # 0x35d70
jl 0x1335e
movq -0x10(%rbp), %rcx
leaq 0xbfa6(%rip), %rdi      # 0x1f2f1
leaq 0xbf94(%rip), %rsi      # 0x1f2e6
movl $0x11a, %edx            # imm = 0x11A
movb $0x0, %al
callq 0x117c0
jmp 0x13360
jmp 0x13362
movl -0x434(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
nopw (%rax,%rax)