// File: /workspace/github_cpp_makefile_star2_O3/sun98[P]Mini-DFS/datanode.cpp
// Function: DataServer::put()
void DataServer::put()
{
    int start = 0;
    std::ofstream os;
    while (start < bufSize)
    {
        int offset = start / chunkSize;
        std::string filePath = name_ + "/" + std::to_string(fid) + " " + std::to_string(offset);
        os.open(filePath);
        if (!os)
            std::cerr << "Failed in creating file in data server: " << filePath << std::endl;
        os.write(&buf[start], std::min(chunkSize, bufSize - start));
        start += chunkSize;
        os.close();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdi, %r15
leaq -0x2f8(%rbp), %rdi
callq 0x3450
cmpl $0x0, 0xa4(%r15)
jle 0x3e45
leaq -0x38(%rbp), %r14
xorl %eax, %eax
leaq -0x48(%rbp), %rbx
movq %r15, -0xf8(%rbp)
movq %rax, -0xf0(%rbp)
cltd
idivl 0x88ca(%rip)            # 0xc288
movl %eax, %r12d
movq %r14, -0x48(%rbp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x4fda
movq %rbx, %rdi
leaq 0x564d(%rip), %rsi      # 0x902e
callq 0x34e0
movl 0xa0(%r15), %r15d
movl %r15d, %r13d
negl %r13d
cmovsl %r15d, %r13d
movl $0x1, %ebx
cmpl $0xa, %r13d
jb 0x3a44
movl $0x4, %ebx
movl %r13d, %eax
cmpl $0x63, %eax
jbe 0x3a3d
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x3a42
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x3a44
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x3a0a
addl $-0x3, %ebx
jmp 0x3a44
addl $-0x2, %ebx
jmp 0x3a44
decl %ebx
shrl $0x1f, %r15d
leal (%rbx,%r15), %esi
leaq -0xb8(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0xc8(%rbp), %rdi
movl $0x2d, %edx
callq 0x32f0
addq -0xc8(%rbp), %r15
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x4f59
movq -0x48(%rbp), %rcx
movl $0xf, %edi
leaq -0x38(%rbp), %r13
cmpq %r13, %rcx
je 0x3a95
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %r8
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
leaq -0x58(%rbp), %rbx
leaq -0xd8(%rbp), %r15
jbe 0x3ad8
movl $0xf, %edi
leaq -0xb8(%rbp), %r9
cmpq %r9, %rsi
je 0x3ad3
movq -0xb8(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x3ae3
leaq -0x48(%rbp), %rdi
callq 0x3100
jmp 0x3af3
leaq -0xc8(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32c0
movq %rbx, -0x68(%rbp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x3b10
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x3b16
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0x68(%rbp), %rdi
leaq 0x5734(%rip), %rsi      # 0x9271
callq 0x34e0
movq %r15, -0xe8(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3b6b
movq %rdx, -0xe8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xd8(%rbp)
jmp 0x3b72
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0xe0(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %r12d, %r15d
negl %r15d
cmovsl %r12d, %r15d
movl $0x1, %ebx
cmpl $0xa, %r15d
jb 0x3be3
movl $0x4, %ebx
movl %r15d, %eax
cmpl $0x63, %eax
jbe 0x3bdc
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x3be1
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x3be3
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x3ba9
addl $-0x3, %ebx
jmp 0x3be3
addl $-0x2, %ebx
jmp 0x3be3
decl %ebx
shrl $0x1f, %r12d
leal (%rbx,%r12), %esi
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0xa8(%rbp), %rdi
movl $0x2d, %edx
callq 0x32f0
movl %r12d, %edi
addq -0xa8(%rbp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x4f59
movq -0xe8(%rbp), %rcx
movl $0xf, %edi
leaq -0xd8(%rbp), %r15
cmpq %r15, %rcx
je 0x3c3d
movq -0xd8(%rbp), %rdi
movq -0xe0(%rbp), %r8
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
leaq -0x58(%rbp), %rbx
leaq -0x78(%rbp), %r12
jbe 0x3c80
movl $0xf, %edi
leaq -0x98(%rbp), %r9
cmpq %r9, %rsi
je 0x3c7b
movq -0x98(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x3c8e
leaq -0xe8(%rbp), %rdi
callq 0x3100
jmp 0x3c9e
leaq -0xa8(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32c0
movq %r12, -0x88(%rbp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x3cc1
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x3cc9
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x80(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x3cfd
callq 0x3270
movq -0xe8(%rbp), %rdi
cmpq %r15, %rdi
je 0x3d0e
callq 0x3270
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
movq -0xf8(%rbp), %r15
je 0x3d23
callq 0x3270
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
leaq -0x2f8(%rbp), %rbx
je 0x3d42
callq 0x3270
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3d50
callq 0x3270
movq %r13, %r14
movq %rbx, %rdi
leaq -0x88(%rbp), %rsi
movl $0x10, %edx
callq 0x3160
movq -0x2f8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x2d8(%rbp,%rax)
je 0x3dd5
movl $0x28, %edx
movq 0x8268(%rip), %rdi      # 0xbff0
leaq 0x52a1(%rip), %rsi      # 0x9030
callq 0x32e0
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq 0x824a(%rip), %rdi      # 0xbff0
callq 0x32e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq -0xf0(%rbp), %rcx
movslq %ecx, %rsi
addq 0xb0(%r15), %rsi
movl 0xa4(%r15), %eax
subl %ecx, %eax
movl 0x8493(%rip), %ecx      # 0xc288
cmpl %ecx, %eax
cmovgel %ecx, %eax
movslq %eax, %rdx
leaq -0x2f8(%rbp), %r13
movq %r13, %rdi
callq 0x3350
movl 0x8476(%rip), %ebx      # 0xc288
movq %r13, %rdi
callq 0x3390
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x3e2b
callq 0x3270
movq -0xf0(%rbp), %rax
addl %ebx, %eax
cmpl 0xa4(%r15), %eax
leaq -0x48(%rbp), %rbx
jl 0x39b0
movq 0x8174(%rip), %rax      # 0xbfc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x2f0(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x2f8(%rbp,%rcx)
callq 0x3220
leaq -0x200(%rbp), %rdi
callq 0x3110
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3f2d
jmp 0x3e97
movq %rax, %rbx
jmp 0x3f08
movq %rax, %rbx
jmp 0x3ef0
movq %rax, %rbx
jmp 0x3ede
movq %rax, %rbx
jmp 0x3ec6
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x3ec6
callq 0x3270
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x3ede
callq 0x3270
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x3ef0
callq 0x3270
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x3f08
callq 0x3270
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
jne 0x3f28
jmp 0x3f2d
jmp 0x3f19
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x3f2d
callq 0x3270
leaq -0x2f8(%rbp), %rdi
callq 0x33d0
movq %rbx, %rdi
callq 0x34a0
nop