user: Converte this assembly snippet into its equivalent C code:

```asm
<dma_mm2s_status>:
  endbr64
  push   %rbx
  mov    $0x4,%esi
  call   <dma_get@plt>
  mov    %eax,%ebx
  mov    $0x4,%edx
  mov    %eax,%esi
  lea    D58(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   $0x1,%bl
  je     L206
  lea    D115(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L202:
  test   $0x2,%bl
  jne    L35
L193:
  test   $0x8,%bl
  jne    L86
L99:
  test   $0x10,%bl
  jne    L61
L21:
  test   $0x20,%bl
  jne    L36
L158:
  test   $0x40,%bl
  jne    L65
L218:
  test   $0x1,%bh
  jne    L48
L10:
  test   $0x2,%bh
  jne    L66
L200:
  test   $0x4,%bh
  jne    L45
L25:
  test   $0x10,%bh
  jne    L93
L60:
  test   $0x20,%bh
  jne    L186
L95:
  test   $0x40,%bh
  jne    L128
L49:
  mov    $0xa,%edi
  call   <putchar@plt>
  pop    %rbx
  ret
L206:
  lea    D66(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L202
L35:
  lea    D95(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L193
L86:
  lea    D64(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L99
L61:
  lea    D34(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L21
L36:
  lea    D136(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L158
L65:
  lea    D118(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L218
L48:
  lea    D79(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L10
L66:
  lea    D55(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L200
L45:
  lea    D123(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L25
L93:
  lea    D14(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L60
L186:
  lea    D78(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L95
L128:
  lea    D56(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L49
```

tool_calls: name: disassemble_data
arguments: data_label: D58
type_guessed: string
name: disassemble_data
arguments: data_label: D115
type_guessed: string
name: disassemble_data
arguments: data_label: D66
type_guessed: string
name: disassemble_data
arguments: data_label: D95
type_guessed: string
name: disassemble_data
arguments: data_label: D64
type_guessed: string
name: disassemble_data
arguments: data_label: D34
type_guessed: string
name: disassemble_data
arguments: data_label: D136
type_guessed: string
name: disassemble_data
arguments: data_label: D118
type_guessed: string
name: disassemble_data
arguments: data_label: D79
type_guessed: string
name: disassemble_data
arguments: data_label: D55
type_guessed: string
name: disassemble_data
arguments: data_label: D123
type_guessed: string
name: disassemble_data
arguments: data_label: D14
type_guessed: string
name: disassemble_data
arguments: data_label: D78
type_guessed: string
name: disassemble_data
arguments: data_label: D56
type_guessed: string

tool: D58: Memory-mapped to stream status (0x%08x@0x%02x):

tool: D115:  halted

tool: D66:  running

tool: D95:  idle

tool: D64:  SGIncld

tool: D34:  DMAIntErr

tool: D136:  DMASlvErr

tool: D118:  DMADecErr

tool: D79:  SGIntErr

tool: D55:  SGSlvErr

tool: D123:  SGDecErr

tool: D14:  IOC_Irq

tool: D78:  Dly_Irq

tool: D56:  Err_Irq

assistant: ```c
void dma_mm2s_status(unsigned int *dma_virtual_address) {
  unsigned int status = dma_get(dma_virtual_address, 0x04);
  printf("Memory-mapped to stream status (0x%08x@0x%02x):", status, 0x04);
  if (status & 0x00000001)
    printf(" halted");
  else
    printf(" running");
  if (status & 0x00000002)
    printf(" idle");
  if (status & 0x00000008)
    printf(" SGIncld");
  if (status & 0x00000010)
    printf(" DMAIntErr");
  if (status & 0x00000020)
    printf(" DMASlvErr");
  if (status & 0x00000040)
    printf(" DMADecErr");
  if (status & 0x00000100)
    printf(" SGIntErr");
  if (status & 0x00000200)
    printf(" SGSlvErr");
  if (status & 0x00000400)
    printf(" SGDecErr");
  if (status & 0x00001000)
    printf(" IOC_Irq");
  if (status & 0x00002000)
    printf(" Dly_Irq");
  if (status & 0x00004000)
    printf(" Err_Irq");
  printf("\n");
}
```