// File: DoubleString[P]RtConverter/src/Rnxobs/Log.cpp
// Function: bamboo::Log::m_wtMsg(char const*, ...)
void Log::m_wtMsg(const char * fmt_msg, ...) {
	char log_msg_buff[40960] = { 0 };
	char filName[256] = {0};
	bool l_wtAll;
	map<string, LogItem*>::iterator itr;
	va_list args;
	va_start(args, fmt_msg);
	vsprintf(log_msg_buff, fmt_msg, args);
	va_end(args);
	l_wtAll = false;
	def_lock(&_lock);
	if (log_msg_buff[0] == '@') {
		sscanf(log_msg_buff, "@%s", filName);
		if(!strncmp(filName,"ALL",3) && strlen(filName) == 3)
			l_wtAll = true;
		itr = mapOut.find(filName);
		if (itr != mapOut.end()) {
			l_wtAll = false;
			// check whether update the file
			m_chkUpdate(filName,(*itr).second);
			(*(*(*itr).second).of) << log_msg_buff + strlen(filName) + 1 + 1; // remove the blankspace
			(*(*itr).second).of->flush();
		}
	}
	if (l_wtAll) {
		for (itr = mapOut.begin(); itr != mapOut.end(); itr++) {
			// check whether update the file
			m_chkUpdate((*itr).first.c_str(),(*itr).second);
			(*(*(*itr).second).of) << log_msg_buff;
			(*(*itr).second).of->flush();
		}
	}
	def_unlock(&_lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa290, %rsp           # imm = 0xA290
testb %al, %al
je 0x39cb7
movaps %xmm0, -0xa220(%rbp)
movaps %xmm1, -0xa210(%rbp)
movaps %xmm2, -0xa200(%rbp)
movaps %xmm3, -0xa1f0(%rbp)
movaps %xmm4, -0xa1e0(%rbp)
movaps %xmm5, -0xa1d0(%rbp)
movaps %xmm6, -0xa1c0(%rbp)
movaps %xmm7, -0xa1b0(%rbp)
movq %r9, -0xa228(%rbp)
movq %r8, -0xa230(%rbp)
movq %rcx, -0xa238(%rbp)
movq %rdx, -0xa240(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa258(%rbp)
leaq -0xa010(%rbp), %rdi
xorl %esi, %esi
movl $0xa000, %edx           # imm = 0xA000
callq 0x93d0
leaq -0xa110(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x93d0
leaq -0xa120(%rbp), %rdi
callq 0x3a960
leaq -0xa140(%rbp), %rax
leaq -0xa250(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0xa010(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0xa140(%rbp), %rdx
callq 0x9340
movq -0xa258(%rbp), %rdi
leaq -0xa140(%rbp), %rax
movb $0x0, -0xa111(%rbp)
addq $0x60, %rdi
callq 0x9ad0
movsbl -0xa010(%rbp), %eax
cmpl $0x40, %eax
jne 0x39f7b
leaq -0xa010(%rbp), %rdi
leaq -0xa110(%rbp), %rdx
leaq 0x8375e(%rip), %rsi     # 0xbd4f7
movb $0x0, %al
callq 0x9750
leaq -0xa110(%rbp), %rdi
leaq 0x84ab5(%rip), %rsi     # 0xbe863
movl $0x3, %edx
callq 0x9360
cmpl $0x0, %eax
jne 0x39dd6
leaq -0xa110(%rbp), %rdi
callq 0x92e0
cmpq $0x3, %rax
jne 0x39dd6
movb $0x1, -0xa111(%rbp)
movq -0xa258(%rbp), %rax
movq %rax, -0xa268(%rbp)
leaq -0xa169(%rbp), %rdi
movq %rdi, -0xa260(%rbp)
callq 0x9d30
movq -0xa260(%rbp), %rdx
leaq -0xa168(%rbp), %rdi
leaq -0xa110(%rbp), %rsi
callq 0x9a30
jmp 0x39e13
movq -0xa268(%rbp), %rdi
leaq -0xa168(%rbp), %rsi
callq 0x3aab0
movq %rax, -0xa270(%rbp)
jmp 0x39e2f
movq -0xa270(%rbp), %rax
movq %rax, -0xa148(%rbp)
movq -0xa148(%rbp), %rax
movq %rax, -0xa120(%rbp)
leaq -0xa168(%rbp), %rdi
callq 0x9480
leaq -0xa169(%rbp), %rdi
callq 0x97e0
movq -0xa258(%rbp), %rdi
callq 0x3a9e0
movq %rax, -0xa188(%rbp)
leaq -0xa120(%rbp), %rdi
leaq -0xa188(%rbp), %rsi
callq 0x3a9b0
testb $0x1, %al
jne 0x39e92
jmp 0x39f79
movb $0x0, -0xa111(%rbp)
leaq -0xa110(%rbp), %rax
movq %rax, -0xa288(%rbp)
leaq -0xa120(%rbp), %rdi
callq 0x3aa10
movq -0xa258(%rbp), %rdi
movq -0xa288(%rbp), %rsi
movq 0x20(%rax), %rdx
callq 0x39a10
leaq -0xa120(%rbp), %rdi
callq 0x3aa10
movq 0x20(%rax), %rax
movq (%rax), %rax
movq %rax, -0xa278(%rbp)
leaq -0xa010(%rbp), %rax
movq %rax, -0xa280(%rbp)
leaq -0xa110(%rbp), %rdi
callq 0x92e0
movq -0xa280(%rbp), %rsi
movq -0xa278(%rbp), %rdi
addq %rax, %rsi
addq $0x1, %rsi
addq $0x1, %rsi
callq 0x9760
leaq -0xa120(%rbp), %rdi
callq 0x3aa10
movq 0x20(%rax), %rax
movq (%rax), %rdi
callq 0x9510
jmp 0x39f79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa178(%rbp)
movl %eax, -0xa17c(%rbp)
jmp 0x39f68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa178(%rbp)
movl %eax, -0xa17c(%rbp)
leaq -0xa168(%rbp), %rdi
callq 0x9480
leaq -0xa169(%rbp), %rdi
callq 0x97e0
jmp 0x3a082
jmp 0x39f7b
testb $0x1, -0xa111(%rbp)
je 0x3a069
movq -0xa258(%rbp), %rdi
callq 0x3a980
movq %rax, -0xa190(%rbp)
movq -0xa190(%rbp), %rax
movq %rax, -0xa120(%rbp)
movq -0xa258(%rbp), %rdi
callq 0x3a9e0
movq %rax, -0xa198(%rbp)
leaq -0xa120(%rbp), %rdi
leaq -0xa198(%rbp), %rsi
callq 0x3a9b0
testb $0x1, %al
jne 0x39fd8
jmp 0x3a067
leaq -0xa120(%rbp), %rdi
callq 0x3aa10
movq %rax, %rdi
callq 0x92b0
movq %rax, -0xa290(%rbp)
leaq -0xa120(%rbp), %rdi
callq 0x3aa10
movq -0xa258(%rbp), %rdi
movq -0xa290(%rbp), %rsi
movq 0x20(%rax), %rdx
callq 0x39a10
leaq -0xa120(%rbp), %rdi
callq 0x3aa10
movq 0x20(%rax), %rax
movq (%rax), %rdi
leaq -0xa010(%rbp), %rsi
callq 0x9760
leaq -0xa120(%rbp), %rdi
callq 0x3aa10
movq 0x20(%rax), %rax
movq (%rax), %rdi
callq 0x9510
leaq -0xa120(%rbp), %rdi
xorl %esi, %esi
callq 0x3ac20
movq %rax, -0xa1a0(%rbp)
jmp 0x39fa9
jmp 0x3a069
movq -0xa258(%rbp), %rdi
addq $0x60, %rdi
callq 0x95a0
addq $0xa290, %rsp           # imm = 0xA290
popq %rbp
retq
movq -0xa178(%rbp), %rdi
callq 0x9d20
nop