// File: /workspace/github_cpp_makefile_star2_O1/SaadBazaz[P]RIP-Protocol-Simulation/ProxyRouter.cpp
// Function: sendTableToAllRouters(int)
void sendTableToAllRouters(int ignore_fd = -1){
	auto index_vec = findAllRowsByType("ROUTER");

	for (int i=0; i<index_vec.size(); i++){

		if (table[index_vec[i]].fd == ignore_fd)
			continue;

		cout<<"Index is "<<index_vec[i]<<endl;

		string table_string = serialize (table);
		auto router = table[index_vec[i]];
		auto to_send = constructNewMessage(TABLE, port, router.identifier, (void*)table_string.c_str());
		send (router.fd, to_send.c_str(), to_send.size(), 0);
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %edi, %ebx
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4856(%rip), %rsi      # 0x809f
leaq 0x4855(%rip), %rdx      # 0x80a5
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
callq 0x7150
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x368d
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x388a
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2270
movq 0x8(%rsp), %rdi
cmpq %rdi, 0x10(%rsp)
je 0x3a20
leaq 0x70(%rsp), %r14
xorl %r12d, %r12d
movq 0x7727(%rip), %r15      # 0xafd0
movslq (%rdi,%r12,4), %rax
movq 0x7974(%rip), %rcx      # 0xb228
shlq $0x6, %rax
cmpl %ebx, 0x4(%rcx,%rax)
je 0x3a03
movl $0x9, %edx
movq %r15, %rdi
leaq 0x47d5(%rip), %rsi      # 0x80a6
callq 0x22b0
movq 0x8(%rsp), %rax
movl (%rax,%r12,4), %esi
movq %r15, %rdi
callq 0x2390
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2240
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2190
leaq 0x40(%rsp), %rdi
leaq 0x790b(%rip), %rsi      # 0xb228
callq 0x2763
movq 0x8(%rsp), %rax
movslq (%rax,%r12,4), %rbp
movq 0x78f6(%rip), %r13      # 0xb228
shlq $0x6, %rbp
movups (%r13,%rbp), %xmm0
movaps %xmm0, 0x60(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x10(%r13,%rbp), %rsi
movq 0x18(%r13,%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x70c0
addq %rbp, %r13
movl 0x38(%r13), %eax
movl %eax, 0x28(%r14)
movq 0x30(%r13), %rax
movq %rax, 0x20(%r14)
movl 0x78c4(%rip), %edx      # 0xb240
movl 0x60(%rsp), %ecx
movq 0x40(%rsp), %r8
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x2a0b
movl 0x64(%rsp), %edi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
xorl %ecx, %ecx
callq 0x2120
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x39c5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2270
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x39e7
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x2270
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3a03
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2270
incq %r12
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r12, %rax
ja 0x38a9
testq %rdi, %rdi
je 0x3a32
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2270
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3aed
movq 0xb8(%rsp), %rsi
incq %rsi
jmp 0x3ae8
jmp 0x3ad3
movq %rax, %rbx
jmp 0x3a93
movq %rax, %rbx
jmp 0x3ab5
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3a93
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2270
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x3ab5
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x2270
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3ad6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2270
jmp 0x3ad6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3aed
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2270
movq %rbx, %rdi
callq 0x23a0