// File: mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_compcoup_transport::dataset_output_incoming_consume(scdc_transport_connection_t*, _scdc_dataset_inout_t*, bool*)
bool scdc_compcoup_transport::dataset_output_incoming_consume(scdc_transport_connection_t *conn, scdc_dataset_output_t *output, bool *next)
{
  scdc_dataset_output_t output_null;

  /* use null output for consuming all output */
  if (!output)
  {
    scdc_dataset_output_unset(&output_null);
    output = &output_null;
  }

  *next = true;

  while (*next)
  {
    SCDC_TRACE("dataset_output_incoming_consume: incoming receive");
    if (!dataset_output_incoming_recv(conn, output, next))
    {
      SCDC_FAIL("dataset_output_incoming_consume: receive failed");
      return false;
    }

    if (output == &output_null) continue; 

    if (!output->next) break;

    SCDC_TRACE("dataset_output_incoming_consume: next");
    if (!output->next(output, 0))
    {
      SCDC_FAIL("dataset_output_incoming_consume: next failed");
      return false;
    }
  }

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xa05bf
leaq -0x78(%rbp), %rdi
callq 0x433f0
leaq -0x78(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movb $0x1, (%rax)
movq -0x20(%rbp), %rax
testb $0x1, (%rax)
je 0xa0747
jmp 0xa05d5
jmp 0xa05d7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xa2330
testb $0x1, %al
jne 0xa067b
jmp 0xa05f2
leaq 0x340af(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0xa0670
leaq 0x3409a(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25800
leaq 0x3408b(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x5b81(%rip), %rsi      # 0xa61b0
callq 0xc670
movq %rax, %rdi
leaq 0x9809(%rip), %rsi      # 0xa9e47
callq 0xc670
movq %rax, %rdi
leaq 0x9d22(%rip), %rsi      # 0xaa36f
callq 0xc670
movq %rax, %rdi
movq 0x33964(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
leaq 0x34040(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0xa0672
movb $0x0, -0x1(%rbp)
jmp 0xa074b
leaq -0x78(%rbp), %rax
cmpq %rax, -0x18(%rbp)
jne 0xa068a
jmp 0xa05c6
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0xa069a
jmp 0xa0747
jmp 0xa069c
jmp 0xa069e
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
cmpq $0x0, %rax
jne 0xa0742
jmp 0xa06bc
leaq 0x33fe5(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0xa073a
leaq 0x33fd0(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25800
leaq 0x33fc1(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x5ab7(%rip), %rsi      # 0xa61b0
callq 0xc670
movq %rax, %rdi
leaq 0x973f(%rip), %rsi      # 0xa9e47
callq 0xc670
movq %rax, %rdi
leaq 0x9c88(%rip), %rsi      # 0xaa39f
callq 0xc670
movq %rax, %rdi
movq 0x3389a(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
leaq 0x33f76(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0xa073c
movb $0x0, -0x1(%rbp)
jmp 0xa074b
jmp 0xa05c6
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)