// File: sjtuwrk[P]SunwayMR/tools/SunwayMRHelper.hpp
// Function: SunwayMRHelper::saveLocalHostFile()
void SunwayMRHelper::saveLocalHostFile() {
	stringstream ss;
	ss << localAddr << " " << threads << " " << memory << " " << listenPort;
	bool ret = writeFile(fileSaveDir, localHostFileName, ss.str());
	if (!ret) {
		stringstream error;
		error << "SunwayMRHelper: unable to write file: " << fileSaveDir << localHostFileName;
		Logging::logError(error.str());
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x400, %rsp            # imm = 0x400
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3b8(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x4280
movq -0x3b8(%rbp), %rsi
leaq -0x180(%rbp), %rdi
addq $0x110, %rsi            # imm = 0x110
callq 0x4380
movq %rax, -0x3b0(%rbp)
jmp 0xd669
movq -0x3b0(%rbp), %rdi
leaq 0xcefb(%rip), %rsi      # 0x1a572
callq 0x43f0
movq %rax, -0x3c0(%rbp)
jmp 0xd685
movq -0x3c0(%rbp), %rdi
movq -0x3b8(%rbp), %rax
movl 0x134(%rax), %esi
callq 0x4750
movq %rax, -0x3c8(%rbp)
jmp 0xd6a7
movq -0x3c8(%rbp), %rdi
leaq 0xcebd(%rip), %rsi      # 0x1a572
callq 0x43f0
movq %rax, -0x3d0(%rbp)
jmp 0xd6c3
movq -0x3d0(%rbp), %rdi
movq -0x3b8(%rbp), %rax
movl 0x138(%rax), %esi
callq 0x4750
movq %rax, -0x3d8(%rbp)
jmp 0xd6e5
movq -0x3d8(%rbp), %rdi
leaq 0xce7f(%rip), %rsi      # 0x1a572
callq 0x43f0
movq %rax, -0x3e0(%rbp)
jmp 0xd701
movq -0x3e0(%rbp), %rdi
movq -0x3b8(%rbp), %rax
movl 0x13c(%rax), %esi
callq 0x4750
jmp 0xd71c
leaq 0x17d95(%rip), %rsi     # 0x254b8
leaq -0x1c0(%rbp), %rdi
callq 0x41a0
jmp 0xd731
leaq 0x17da0(%rip), %rsi     # 0x254d8
leaq -0x1e0(%rbp), %rdi
callq 0x41a0
jmp 0xd746
leaq -0x200(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x43e0
jmp 0xd75b
leaq -0x1c0(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
leaq -0x200(%rbp), %rdx
callq 0x5c40
movb %al, -0x3e1(%rbp)
jmp 0xd77d
leaq -0x200(%rbp), %rdi
callq 0x4878
leaq -0x1e0(%rbp), %rdi
callq 0x4878
leaq -0x1c0(%rbp), %rdi
callq 0x4878
movb -0x3e1(%rbp), %al
andb $0x1, %al
movb %al, -0x19d(%rbp)
testb $0x1, -0x19d(%rbp)
jne 0xd90e
leaq -0x388(%rbp), %rdi
callq 0x4280
jmp 0xd7ca
leaq -0x378(%rbp), %rdi
leaq 0xd00c(%rip), %rsi      # 0x1a7e4
callq 0x43f0
movq %rax, -0x3f0(%rbp)
jmp 0xd7e6
movq -0x3f0(%rbp), %rdi
leaq 0x17cc4(%rip), %rsi     # 0x254b8
callq 0x4380
movq %rax, -0x3f8(%rbp)
jmp 0xd802
movq -0x3f8(%rbp), %rdi
leaq 0x17cc8(%rip), %rsi     # 0x254d8
callq 0x4380
jmp 0xd817
leaq -0x3a8(%rbp), %rdi
leaq -0x388(%rbp), %rsi
callq 0x43e0
jmp 0xd82c
leaq -0x3a8(%rbp), %rdi
callq 0x7300
jmp 0xd83a
leaq -0x3a8(%rbp), %rdi
callq 0x4878
leaq -0x388(%rbp), %rdi
callq 0x42b0
jmp 0xd90e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0xd923
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0xd8c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0xd8b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x4878
leaq -0x1e0(%rbp), %rdi
callq 0x4878
leaq -0x1c0(%rbp), %rdi
callq 0x4878
jmp 0xd923
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0xd900
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x3a8(%rbp), %rdi
callq 0x4878
leaq -0x388(%rbp), %rdi
callq 0x42b0
jmp 0xd923
leaq -0x190(%rbp), %rdi
callq 0x42b0
addq $0x400, %rsp            # imm = 0x400
popq %rbp
retq
leaq -0x190(%rbp), %rdi
callq 0x42b0
movq -0x198(%rbp), %rdi
callq 0x4780
nopl (%rax,%rax)