// File: vianna274[P]dropbox/src/Operations.cpp
// Function: Dropbox::Operations::sendUploadAll(Dropbox::WrapperSocket*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<Dropbox::_FileRecord, std::allocator<Dropbox::_FileRecord>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Operations::sendUploadAll(WrapperSocket * socket, string dirPath, vector<FileRecord> files, string username) {
	if(files.empty()) {
		this->sendNothing(socket);
        return;
    }
	MessageData packet = make_packet(TYPE_SEND_UPLOAD_ALL, 1, 1, -1, "send_upload_all");
	socket->send(&packet);
    int seq = 1;
    for(FileRecord record : files) {
		this->sendFile(socket, dirPath + record.filename, record, username);
        seq++;
    }
	packet = make_packet(TYPE_SEND_UPLOAD_ALL_DONE, 1, 1, -1, "send_upload_all_done");
	socket->send(&packet);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2330, %rsp           # imm = 0x2330
movq %rcx, -0x2230(%rbp)
movq %rdi, %rax
movq -0x2230(%rbp), %rdi
movq %rdx, -0x2228(%rbp)
movq %rdi, -0x2220(%rbp)
movq %r8, -0x2218(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2210(%rbp)
callq 0xbc00
testb $0x1, %al
jne 0xb61b
jmp 0xb630
movq -0x2210(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb850
jmp 0xb83b
leaq -0xffc(%rbp), %rdi
movl $0x9, %esi
movl $0x1, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
leaq 0xdca9(%rip), %r9       # 0x192f7
movl %ecx, %edx
callq 0x97a0
movq -0x10(%rbp), %rdi
leaq -0xffc(%rbp), %rsi
callq 0x17d90
movq -0x2220(%rbp), %rax
movl $0x1, -0x1000(%rbp)
movq %rax, -0x1008(%rbp)
movq -0x1008(%rbp), %rdi
callq 0x6f40
movq %rax, -0x1010(%rbp)
movq -0x1008(%rbp), %rdi
callq 0x6fb0
movq %rax, -0x1018(%rbp)
leaq -0x1010(%rbp), %rdi
leaq -0x1018(%rbp), %rsi
callq 0x6f70
testb $0x1, %al
jne 0xb6bf
jmp 0xb7ee
leaq -0x1010(%rbp), %rdi
callq 0x7180
movq %rax, %rsi
leaq -0x1100(%rbp), %rdi
movq %rdi, -0x2240(%rbp)
movl $0xe8, %edx
movq %rdx, -0x2238(%rbp)
callq 0x3300
movq -0x2228(%rbp), %rsi
movq -0x2240(%rbp), %rdx
movq -0x10(%rbp), %rax
movq %rax, -0x2248(%rbp)
leaq -0x1120(%rbp), %rdi
callq 0xbb80
movq -0x2240(%rbp), %rsi
movq -0x2238(%rbp), %rdx
leaq -0x1208(%rbp), %rdi
callq 0x3300
movq -0x2218(%rbp), %rsi
leaq -0x1228(%rbp), %rdi
callq 0x3190
jmp 0xb741
movq %rsp, %rdi
movl $0x1d, %ecx
leaq -0x1208(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq -0x2248(%rbp), %rsi
movq -0x2210(%rbp), %rdi
leaq -0x1120(%rbp), %rdx
leaq -0x1228(%rbp), %rcx
callq 0x9ee0
jmp 0xb776
leaq -0x1228(%rbp), %rdi
callq 0x3280
leaq -0x1120(%rbp), %rdi
callq 0x3280
movl -0x1000(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1000(%rbp)
leaq -0x1010(%rbp), %rdi
callq 0x72e0
jmp 0xb6a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1230(%rbp)
movl %eax, -0x1234(%rbp)
jmp 0xb7e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1230(%rbp)
movl %eax, -0x1234(%rbp)
leaq -0x1228(%rbp), %rdi
callq 0x3280
leaq -0x1120(%rbp), %rdi
callq 0x3280
jmp 0xb844
leaq -0x2208(%rbp), %rdi
movl $0xa, %esi
movl $0x1, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
leaq 0xdafb(%rip), %r9       # 0x19307
movl %ecx, %edx
callq 0x97a0
leaq -0xffc(%rbp), %rdi
leaq -0x2208(%rbp), %rsi
movl $0xfd4, %edx            # imm = 0xFD4
callq 0x3300
movq -0x10(%rbp), %rdi
leaq -0xffc(%rbp), %rsi
callq 0x17d90
addq $0x2330, %rsp           # imm = 0x2330
popq %rbp
retq
movq -0x1230(%rbp), %rdi
callq 0x3610