// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: print_block_vector
void print_block_vector (
   void        *v,       /* IN - Address of vector */
   MPI_Datatype dtype,   /* IN - Vector element type */
   int          n,       /* IN - Elements in vector */
   MPI_Comm     comm)    /* IN - Communicator */
{
   int        datum_size; /* Bytes per vector element */
   int        i;
   int        prompt;     /* Dummy variable */
   MPI_Status status;     /* Result of receive */
   void       *tmp;       /* Other process's subvector */
   int        id;         /* Process rank */
   int        p;          /* Number of processes */

   MPI_Comm_size (comm, &p);
   MPI_Comm_rank (comm, &id);
   datum_size = get_size (dtype);

   if (!id) {
      print_subvector (v, dtype, BLOCK_SIZE(id,p,n));
      if (p > 1) {
         tmp = my_malloc (id,BLOCK_SIZE(p-1,p,n)*datum_size);
         for (i = 1; i < p; i++) {
            MPI_Send (&prompt, 1, MPI_INT, i, PROMPT_MSG,
               comm);
            MPI_Recv (tmp, BLOCK_SIZE(i,p,n), dtype, i,
               RESPONSE_MSG, comm, &status);
            print_subvector (tmp, dtype, BLOCK_SIZE(i,p,n));
         }
         free (tmp);
      }
      printf ("\n\n");
   } else {
      MPI_Recv (&prompt, 1, MPI_INT, 0, PROMPT_MSG, comm,
         &status);
      MPI_Send (v, BLOCK_SIZE(id,p,n), dtype, 0,
         RESPONSE_MSG, comm);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x10f0
movq -0x20(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0x1160
movq -0x10(%rbp), %rdi
callq 0x1f70
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x54(%rbp)
jne 0x3b81
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x54(%rbp), %eax
addl $0x1, %eax
imull -0x14(%rbp), %eax
cltd
idivl -0x58(%rbp)
subl $0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x54(%rbp), %eax
imull -0x14(%rbp), %eax
cltd
idivl -0x58(%rbp)
movl -0x5c(%rbp), %edx
subl %eax, %edx
addl $0x1, %edx
callq 0x32e0
cmpl $0x1, -0x58(%rbp)
jle 0x3b71
movl -0x54(%rbp), %edi
movl -0x58(%rbp), %eax
subl $0x1, %eax
addl $0x1, %eax
imull -0x14(%rbp), %eax
cltd
idivl -0x58(%rbp)
movl %eax, %esi
subl $0x1, %esi
movl -0x58(%rbp), %eax
subl $0x1, %eax
imull -0x14(%rbp), %eax
cltd
idivl -0x58(%rbp)
subl %eax, %esi
addl $0x1, %esi
imull -0x24(%rbp), %esi
callq 0x2020
movq %rax, -0x50(%rbp)
movl $0x1, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x3b68
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %r9
leaq -0x2c(%rbp), %rdi
movl $0x1, %r8d
movq 0x24cf(%rip), %rdx      # 0x5fa8
movl %r8d, %esi
callq 0x1040
movq -0x50(%rbp), %rdi
movl -0x28(%rbp), %eax
addl $0x1, %eax
imull -0x14(%rbp), %eax
cltd
idivl -0x58(%rbp)
movl %eax, %esi
subl $0x1, %esi
movl -0x28(%rbp), %eax
imull -0x14(%rbp), %eax
cltd
idivl -0x58(%rbp)
subl %eax, %esi
addl $0x1, %esi
movq -0x10(%rbp), %rdx
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %r9
movl $0x2, %r8d
leaq -0x48(%rbp), %rax
movq %rax, (%rsp)
callq 0x1130
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x28(%rbp), %eax
addl $0x1, %eax
imull -0x14(%rbp), %eax
cltd
idivl -0x58(%rbp)
subl $0x1, %eax
movl %eax, -0x60(%rbp)
movl -0x28(%rbp), %eax
imull -0x14(%rbp), %eax
cltd
idivl -0x58(%rbp)
movl -0x60(%rbp), %edx
subl %eax, %edx
addl $0x1, %edx
callq 0x32e0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3ab5
movq -0x50(%rbp), %rdi
callq 0x10e0
leaq 0x674(%rip), %rdi       # 0x41ec
movb $0x0, %al
callq 0x1050
jmp 0x3be4
movq -0x20(%rbp), %r9
leaq -0x2c(%rbp), %rdi
movl $0x1, %r8d
movq 0x2412(%rip), %rdx      # 0x5fa8
xorl %ecx, %ecx
leaq -0x48(%rbp), %rax
movl %r8d, %esi
movq %rax, (%rsp)
callq 0x1130
movq -0x8(%rbp), %rdi
movl -0x54(%rbp), %eax
addl $0x1, %eax
imull -0x14(%rbp), %eax
cltd
idivl -0x58(%rbp)
movl %eax, %esi
subl $0x1, %esi
movl -0x54(%rbp), %eax
imull -0x14(%rbp), %eax
cltd
idivl -0x58(%rbp)
subl %eax, %esi
addl $0x1, %esi
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %r9
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x1040
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)