// File: /workspace/github_c_makefile_star2_O0/inflex[P]ripMIME/logger.c
// Function: LOGGER_log
int LOGGER_log( char *format, ...)
{
	va_list ptr;
	char tmpoutput[10240];
	char linebreak[]="\n";
	char nolinebreak[]="";
	char *lineend;
	char *output;


	// get our variable arguments
	va_start(ptr,format);

	// produce output, and spit to the log file
#ifdef NO_SNPRINTF
	vsprintf(tmpoutput, format, ptr);
#else
	vsnprintf(tmpoutput,sizeof(tmpoutput),format,ptr);
#endif

	LOGGER_clean_output( tmpoutput, &output );

	if ( output[strlen(output)-1] == '\n' ) {
		lineend = nolinebreak;
	}
	else {
		lineend = linebreak;
	}

	if ( output[strlen(output)-1] == '\n' ) { lineend = nolinebreak; } else { lineend = linebreak; }

	// Send the output to the appropriate output destination
	switch (_LOGGER_mode) {
		case _LOGGER_STDERR:
			fprintf(stderr,"%s%s",output, lineend );
			break;
		case _LOGGER_SYSLOG:
			syslog(_LOGGER_syslog_mode,"%s",output);
			break;
		case _LOGGER_STDOUT:
			fprintf(stdout,"%s%s",output, lineend);
			fflush(stdout);
			break;
		case _LOGGER_FILE:
			fprintf(_LOGGER_outf,"%s%s",output,lineend);
			fflush(_LOGGER_outf);
			break;
		case _LOGGER_NULL: // 20080303-2214:PLD: Added to allow us to direct all logging to NULL.
			break;
		default:
			fprintf(stdout,"LOGGER-Default: %s%s",output,lineend);
	}


	if (output) free(output);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2910, %rsp           # imm = 0x2910
testb %al, %al
je 0x11807
movaps %xmm0, -0x28c0(%rbp)
movaps %xmm1, -0x28b0(%rbp)
movaps %xmm2, -0x28a0(%rbp)
movaps %xmm3, -0x2890(%rbp)
movaps %xmm4, -0x2880(%rbp)
movaps %xmm5, -0x2870(%rbp)
movaps %xmm6, -0x2860(%rbp)
movaps %xmm7, -0x2850(%rbp)
movq %r9, -0x28c8(%rbp)
movq %r8, -0x28d0(%rbp)
movq %rcx, -0x28d8(%rbp)
movq %rdx, -0x28e0(%rbp)
movq %rsi, -0x28e8(%rbp)
movq %rdi, -0x8(%rbp)
movw 0x81d1(%rip), %ax       # 0x19a06
movw %ax, -0x2822(%rbp)
leaq -0x2823(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x2150
leaq -0x20(%rbp), %rax
leaq -0x28f0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
leaq -0x2820(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq -0x20(%rbp), %rcx
movl $0x2800, %esi           # imm = 0x2800
callq 0x20c0
leaq -0x2820(%rbp), %rdi
leaq -0x2838(%rbp), %rsi
callq 0x115e0
movq -0x2838(%rbp), %rax
movq %rax, -0x28f8(%rbp)
movq -0x2838(%rbp), %rdi
callq 0x2100
movq %rax, %rcx
movq -0x28f8(%rbp), %rax
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x118e0
leaq -0x2823(%rbp), %rax
movq %rax, -0x2830(%rbp)
jmp 0x118ee
leaq -0x2822(%rbp), %rax
movq %rax, -0x2830(%rbp)
movq -0x2838(%rbp), %rax
movq %rax, -0x2900(%rbp)
movq -0x2838(%rbp), %rdi
callq 0x2100
movq %rax, %rcx
movq -0x2900(%rbp), %rax
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x1192f
leaq -0x2823(%rbp), %rax
movq %rax, -0x2830(%rbp)
jmp 0x1193d
leaq -0x2822(%rbp), %rax
movq %rax, -0x2830(%rbp)
movl 0x1565d(%rip), %eax     # 0x26fa0
decl %eax
movl %eax, %ecx
movq %rcx, -0x2908(%rbp)
subl $0x4, %eax
ja 0x11a23
movq -0x2908(%rbp), %rax
leaq 0xd10f(%rip), %rcx      # 0x1ea74
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x14683(%rip), %rax     # 0x25ff8
movq (%rax), %rdi
movq -0x2838(%rbp), %rdx
movq -0x2830(%rbp), %rcx
leaq 0xd14b(%rip), %rsi      # 0x1ead8
movb $0x0, %al
callq 0x2200
jmp 0x11a49
movl 0x15605(%rip), %edi     # 0x26fa4
movq -0x2838(%rbp), %rdx
leaq 0xd5fd(%rip), %rsi      # 0x1efaa
movb $0x0, %al
callq 0x22d0
jmp 0x11a49
movq 0x14610(%rip), %rax     # 0x25fd0
movq (%rax), %rdi
movq -0x2838(%rbp), %rdx
movq -0x2830(%rbp), %rcx
leaq 0xd100(%rip), %rsi      # 0x1ead8
movb $0x0, %al
callq 0x2200
movq 0x145ea(%rip), %rax     # 0x25fd0
movq (%rax), %rdi
callq 0x22b0
jmp 0x11a49
movq 0x23f29(%rip), %rdi     # 0x35920
movq -0x2838(%rbp), %rdx
movq -0x2830(%rbp), %rcx
leaq 0xd0cc(%rip), %rsi      # 0x1ead8
movb $0x0, %al
callq 0x2200
movq 0x23f06(%rip), %rdi     # 0x35920
callq 0x22b0
jmp 0x11a49
jmp 0x11a49
movq 0x145a6(%rip), %rax     # 0x25fd0
movq (%rax), %rdi
movq -0x2838(%rbp), %rdx
movq -0x2830(%rbp), %rcx
leaq 0xd086(%rip), %rsi      # 0x1eac8
movb $0x0, %al
callq 0x2200
cmpq $0x0, -0x2838(%rbp)
je 0x11a5f
movq -0x2838(%rbp), %rdi
callq 0x2030
xorl %eax, %eax
addq $0x2910, %rsp           # imm = 0x2910
popq %rbp
retq
nopw (%rax,%rax)