// File: NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTCPIPHeader()
__int32 LMF_IO::WriteTCPIPHeader()
/////////////////////////////////////////////////////////////////
{
	unsigned __int32 byte_counter;
	byte_counter = 0;

	*output_lmf << frequency;	byte_counter += sizeof(double);		// frequency is always 4th value
	*output_lmf << IOaddress;	byte_counter += sizeof(__int32);		// IO address (parameter 1) always 5th value
	*output_lmf << timestamp_format_output;	byte_counter += sizeof(__int32);		// TimeInfo (parameter 2) always 6th value  (0,1,2)*32Bit

	unsigned __int32 dummy = (unsigned __int32)(DAQ_info.length());
	*output_lmf << dummy;
	byte_counter += sizeof(__int32);		// Length of DAQInfo always 7th value

	output_lmf->write(DAQ_info.c_str(), __int32(DAQ_info.length()));	// DAQInfo always 8th value
	byte_counter += (unsigned __int32)(DAQ_info.length());

	*output_lmf << LMF_Version_output; byte_counter += sizeof(__int32);
	*output_lmf << time_reference; byte_counter += sizeof(__int32);


	*output_lmf << data_format_in_userheader_output;					byte_counter   += sizeof(__int32);
	*output_lmf << number_of_channels_output;			byte_counter   += sizeof(__int32);
	*output_lmf << max_number_of_hits_output;			byte_counter   += sizeof(__int32);

	return byte_counter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq 0x2b20(%rax), %rdi
movsd 0x12c8(%rax), %xmm0
callq 0x1d130
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
addq $0x8, %rcx
movl %ecx, -0xc(%rbp)
movq 0x2b20(%rax), %rdi
movl 0x2a4(%rax), %esi
callq 0x1d170
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
addq $0x4, %rcx
movl %ecx, -0xc(%rbp)
movq 0x2b20(%rax), %rdi
movl 0x2ac(%rax), %esi
callq 0x1caf0
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
addq $0x4, %rax
movl %eax, -0xc(%rbp)
addq $0xa0, %rdi
callq 0x22b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, -0x10(%rbp)
movq 0x2b20(%rax), %rdi
movl -0x10(%rbp), %esi
callq 0x1caf0
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
addq $0x4, %rax
movl %eax, -0xc(%rbp)
movq 0x2b20(%rdi), %rax
movq %rax, -0x28(%rbp)
addq $0xa0, %rdi
callq 0x20b0
movq -0x18(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0xa0, %rdi
callq 0x22b0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl %eax, %edx
callq 0x1cd10
movq -0x18(%rbp), %rdi
addq $0xa0, %rdi
callq 0x22b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
addl -0xc(%rbp), %ecx
movl %ecx, -0xc(%rbp)
movq 0x2b20(%rax), %rdi
movl 0x12a8(%rax), %esi
callq 0x1d170
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
addq $0x4, %rcx
movl %ecx, -0xc(%rbp)
movq 0x2b20(%rax), %rdi
movl 0x240(%rax), %esi
callq 0x1d170
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
addq $0x4, %rcx
movl %ecx, -0xc(%rbp)
movq 0x2b20(%rax), %rdi
movl 0x294(%rax), %esi
callq 0x1d170
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
addq $0x4, %rcx
movl %ecx, -0xc(%rbp)
movq 0x2b20(%rax), %rdi
movl 0x2c4(%rax), %esi
callq 0x1d170
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
addq $0x4, %rcx
movl %ecx, -0xc(%rbp)
movq 0x2b20(%rax), %rdi
movl 0x2cc(%rax), %esi
callq 0x1d170
movl -0xc(%rbp), %eax
addq $0x4, %rax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)