// File: /workspace/github_cpp_makefile_star2_O1/Neuromancer2701[P]OpenTool/src/Header.cpp
// Function: Header::Packup()
void Header::Packup()	{

	int Spare = HeaderTotalLength - (Length_Size + Number_Size + Revision_Size + StationID_Size + SpindleID_Size);
	OutputStream << ""; //clear string stream

	OutputStream << std::setw(Length_Size) << std::setfill('0') << Length;

	OutputStream << std::setw(Number_Size) << std::setfill('0') << Number;

	OutputStream << std::setw(Revision_Size) << std::setfill('0') << Revision;

	OutputStream << std::setw(NoAckFlag_Size) << std::setfill('0') << static_cast<int>(NoAckFlag);

	OutputStream << std::setw(StationID_Size) << std::setfill('0') << StationID;

	OutputStream << std::setw(SpindleID_Size) << std::setfill('0') << SpindleID;

	OutputStream << std::setw(Spare) << std::setfill('0') << 0 << std::endl; // Fill rest of header


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x1a0(%rdi), %rbx
leaq 0x35dc(%rip), %rsi      # 0xb305
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6460
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x4, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
addq $0x1a0, %r15            # imm = 0x1A0
cmpb $0x0, 0xe1(%r15)
jne 0x7d7f
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movl 0x318(%r14), %esi
movq %rbx, %rdi
callq 0x6640
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x4, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0x281(%r14,%rax)
jne 0x7ddc
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movl 0x31c(%r14), %esi
movq %rbx, %rdi
callq 0x6640
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x3, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0x281(%r14,%rax)
jne 0x7e39
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movl 0x320(%r14), %esi
movq %rbx, %rdi
callq 0x6640
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x1, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0x281(%r14,%rax)
jne 0x7e96
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movzbl 0x324(%r14), %esi
movq %rbx, %rdi
callq 0x6640
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x1, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0x281(%r14,%rax)
jne 0x7ef4
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movl 0x328(%r14), %esi
movq %rbx, %rdi
callq 0x6640
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0x281(%r14,%rax)
jne 0x7f51
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movl 0x32c(%r14), %esi
movq %rbx, %rdi
callq 0x6640
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x6, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0x281(%r14,%rax)
jne 0x7fae
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6640
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x62e0