// File: /workspace/github_cpp_makefile_star2_O2/wangyufei95[P]watchdog_linux/./maile.h
// Function: CAutoMail::send_mail_data(std::basic_ofstream<char, std::char_traits<char>>&)
void CAutoMail::send_mail_data(ofstream &ofs)
{
	char buf_send[BUF_LEN] = {0};
	char buf_recv[BUF_LEN] = {0};
	char buf_time[BUF_LEN] = {0};
	int reval = 0;

	sprintf(buf_send, "MAIL FROM: <%S>\r\n", m_str_src_mail_p.data());
	send(m_socket_server, buf_send, strlen(buf_send), 0);
	recv(m_socket_server, buf_recv, sizeof(buf_recv), 0);
	get_time(buf_time);
	ofs << buf_time << ": " << buf_recv;

	memset(buf_recv, 0, sizeof(buf_recv));
	memset(buf_time, 0, sizeof(buf_time));
	memset(buf_send, 0, sizeof(buf_send));
	sprintf(buf_send, "RCPT TO: <%S>\r\n", m_str_dst_mail_p.data());
	send(m_socket_server, buf_send, strlen(buf_send), 0);
	recv(m_socket_server, buf_recv, sizeof(buf_recv), 0);
	get_time(buf_time);
	ofs << buf_time << ": " << buf_recv;

	memset(buf_recv, 0, sizeof(buf_recv));
	memset(buf_time, 0, sizeof(buf_time));
	memset(buf_send, 0, sizeof(buf_send));
	sprintf(buf_send, "DATA\r\n");
	send(m_socket_server, buf_send, strlen(buf_send), 0);
	recv(m_socket_server, buf_recv, sizeof(buf_recv), 0);
	get_time(buf_time);
	ofs << buf_time << ": " << buf_recv;

	memset(buf_send, 0, sizeof(buf_send));

	sprintf(buf_send, "FROM: %S\r\nTO: %S\r\n", m_str_src_mail_p.data(), m_str_dst_mail_p.data());
	send(m_socket_server, buf_send, strlen(buf_send), 0);
	
	memset(buf_send, 0, sizeof(buf_send));
	sprintf(buf_send, "SUBJECT: %S\r\n", m_str_title.data());
	send(m_socket_server, buf_send, strlen(buf_send), 0);

	memset(buf_send, 0, sizeof(buf_send));
	sprintf(buf_send, "Content-type: text/plain;charset=%s\r\n", STR_CODE);
	send(m_socket_server, buf_send, strlen(buf_send), 0);

	memset(buf_send, 0, sizeof(buf_send));
	sprintf(buf_send, "\r\n%S\r\n", m_str_data.data());
	send(m_socket_server, buf_send, strlen(buf_send), 0);

	memset(buf_send, 0, sizeof(buf_send));
	memset(buf_recv, 0, sizeof(buf_recv));
	sprintf(buf_send, "\r\n.\r\n");
	send(m_socket_server, buf_send, strlen(buf_send), 0);
	recv(m_socket_server, buf_recv, sizeof(buf_recv), 0);
	get_time(buf_time);
	ofs << buf_time << ": " << buf_recv;

	memset(buf_send, 0, sizeof(buf_send));
	memset(buf_recv, 0, sizeof(buf_recv));
	sprintf(buf_send, "QUIT\r\n");
	send(m_socket_server, buf_send, strlen(buf_send), 0);
	recv(m_socket_server, buf_recv, sizeof(buf_recv), 0);
	get_time(buf_time);
	ofs << buf_time << ": " << buf_recv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq %rsi, %r12
movq %rdi, %r15
leaq -0x230(%rbp), %r13
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x31f0
leaq -0x330(%rbp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x31f0
leaq -0x130(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x31f0
movq 0x8(%r15), %rdx
leaq 0x2b6e(%rip), %rsi      # 0x710e
movq %r13, %rdi
xorl %eax, %eax
callq 0x3070
movl 0x32c(%r15), %ebx
movq %r13, %rdi
callq 0x3140
movl %ebx, %edi
movq %r13, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31c0
movl 0x32c(%r15), %edi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x30d0
leaq -0x130(%rbp), %rbx
movq %rbx, %rsi
callq 0x4212
movq %r12, %rdi
movq %r12, -0x30(%rbp)
movq %rbx, %rsi
callq 0x33a0
leaq 0x2f54(%rip), %rsi      # 0x7557
movq %rax, %rdi
callq 0x33a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x33a0
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x31f0
movq 0x48(%r15), %rdx
leaq 0x2ad2(%rip), %rsi      # 0x7120
movq %r13, %rdi
xorl %eax, %eax
callq 0x3070
movl 0x32c(%r15), %ebx
movq %r13, %rdi
callq 0x3140
movl %ebx, %edi
movq %r13, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31c0
movl 0x32c(%r15), %edi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x30d0
leaq -0x130(%rbp), %rbx
movq %rbx, %rsi
callq 0x4212
movq %r12, %rdi
movq %rbx, %rsi
movq %rbx, %r12
callq 0x33a0
movq %rax, %rdi
leaq 0x2ea4(%rip), %rsi      # 0x7557
callq 0x33a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x33a0
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
leaq -0x229(%rbp), %rbx
movl $0xf9, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x41544144, -0x7(%rbx) # imm = 0x41544144
movl $0xa0d41, -0x4(%rbx)    # imm = 0xA0D41
movl 0x32c(%r15), %ebx
movq %r13, %rdi
callq 0x3140
movl %ebx, %edi
movq %r13, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31c0
movl 0x32c(%r15), %edi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x30d0
movq %r12, %rsi
callq 0x4212
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x33a0
movq %rax, %rdi
leaq 0x2e00(%rip), %rsi      # 0x7557
callq 0x33a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x33a0
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x31f0
movq 0x8(%r15), %rdx
movq 0x48(%r15), %rcx
leaq 0x29b2(%rip), %rsi      # 0x7137
movq %r13, %rdi
xorl %eax, %eax
callq 0x3070
movl 0x32c(%r15), %ebx
movq %r13, %rdi
callq 0x3140
movl %ebx, %edi
movq %r13, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31c0
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x31f0
movq 0xc8(%r15), %rdx
leaq 0x2980(%rip), %rsi      # 0x714a
movq %r13, %rdi
xorl %eax, %eax
callq 0x3070
movl 0x32c(%r15), %ebx
movq %r13, %rdi
callq 0x3140
movl %ebx, %edi
movq %r13, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31c0
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x31f0
movq 0x5b90(%rip), %rdx      # 0xa398
leaq 0x2949(%rip), %rsi      # 0x7158
movq %r13, %rdi
xorl %eax, %eax
callq 0x3070
movl 0x32c(%r15), %ebx
movq %r13, %rdi
callq 0x3140
movl %ebx, %edi
movq %r13, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31c0
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x31f0
movq 0xe8(%r15), %rdx
leaq 0x292a(%rip), %rsi      # 0x717e
movq %r13, %rdi
xorl %eax, %eax
callq 0x3070
movl 0x32c(%r15), %ebx
movq %r13, %rdi
callq 0x3140
movl %ebx, %edi
movq %r13, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31c0
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x31f0
leaq -0x22a(%rbp), %rbx
movl $0xfa, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0xd2e0a0d, -0x6(%rbx)  # imm = 0xD2E0A0D
movw $0xa, -0x2(%rbx)
movl 0x32c(%r15), %r12d
movq %r13, %rdi
callq 0x3140
movl %r12d, %edi
movq %r13, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31c0
movl 0x32c(%r15), %edi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rbx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x30d0
leaq -0x130(%rbp), %r14
movq %r14, %rsi
callq 0x4212
movq -0x30(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x33a0
movq %rax, %rdi
leaq 0x2c49(%rip), %rsi      # 0x7557
callq 0x33a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x33a0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %rbx, %r14
xorl %esi, %esi
callq 0x31f0
movl $0xf9, %edx
leaq -0x229(%rbp), %rdi
xorl %esi, %esi
callq 0x31f0
leaq -0x22a(%rbp), %rax
movl $0x54495551, -0x6(%rax) # imm = 0x54495551
movl $0xa0d54, -0x3(%rax)    # imm = 0xA0D54
movl 0x32c(%r15), %ebx
movq %r13, %rdi
callq 0x3140
movl %ebx, %edi
movq %r13, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31c0
movl 0x32c(%r15), %edi
movl $0x100, %edx            # imm = 0x100
movq %r14, %rbx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x30d0
leaq -0x130(%rbp), %r14
movq %r14, %rsi
callq 0x4212
movq %r12, %rdi
movq %r14, %rsi
callq 0x33a0
movq %rax, %rdi
leaq 0x2ba4(%rip), %rsi      # 0x7557
callq 0x33a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x33a0
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop