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

```asm
<ohci_dumpportstat>:
  endbr64
  push   %rbx
  mov    %esi,%edx
  mov    %esi,%ebx
  xor    %eax,%eax
  mov    %edi,%esi
  lea    D53(%rip),%rdi
  call   <printf@plt>
  test   $0x1,%bl
  jne    L56
  test   $0x2,%bl
  jne    L135
L66:
  test   $0x4,%bl
  jne    L92
L110:
  test   $0x8,%bl
  jne    L96
L179:
  test   $0x10,%bl
  jne    L25
L225:
  test   $0x1,%bh
  jne    L109
L143:
  test   $0x2,%bh
  jne    L204
L201:
  test   $0x10000,%ebx
  jne    L219
L186:
  test   $0x20000,%ebx
  jne    L52
L172:
  test   $0x40000,%ebx
  jne    L76
L128:
  test   $0x80000,%ebx
  jne    L51
L62:
  and    $0x100000,%ebx
  jne    L6
L35:
  mov    $0xa,%edi
  pop    %rbx
  jmp    1060 <putchar@plt>
  nop
L56:
  xor    %eax,%eax
  lea    D22(%rip),%rdi
  call   <printf@plt>
  test   $0x2,%bl
  je     L66
L135:
  xor    %eax,%eax
  lea    D35(%rip),%rdi
  call   <printf@plt>
  test   $0x4,%bl
  je     L110
L92:
  xor    %eax,%eax
  lea    D58(%rip),%rdi
  call   <printf@plt>
  test   $0x8,%bl
  je     L179
L96:
  xor    %eax,%eax
  lea    D112(%rip),%rdi
  call   <printf@plt>
  test   $0x10,%bl
  je     L225
L25:
  xor    %eax,%eax
  lea    D77(%rip),%rdi
  call   <printf@plt>
  test   $0x1,%bh
  je     L143
L109:
  xor    %eax,%eax
  lea    D52(%rip),%rdi
  call   <printf@plt>
  test   $0x2,%bh
  je     L201
L204:
  xor    %eax,%eax
  lea    D81(%rip),%rdi
  call   <printf@plt>
  test   $0x10000,%ebx
  je     L186
L219:
  xor    %eax,%eax
  lea    D51(%rip),%rdi
  call   <printf@plt>
  test   $0x20000,%ebx
  je     L172
L52:
  xor    %eax,%eax
  lea    D99(%rip),%rdi
  call   <printf@plt>
  test   $0x40000,%ebx
  je     L128
L76:
  xor    %eax,%eax
  lea    D3(%rip),%rdi
  call   <printf@plt>
  test   $0x80000,%ebx
  je     L62
L51:
  xor    %eax,%eax
  lea    D24(%rip),%rdi
  call   <printf@plt>
  and    $0x100000,%ebx
  je     L35
L6:
  lea    D106(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  pop    %rbx
  jmp    1060 <putchar@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D53
type: string
name: extract_symbolic_data
arguments: data_label: D22
type: string
name: extract_symbolic_data
arguments: data_label: D35
type: string
name: extract_symbolic_data
arguments: data_label: D58
type: string
name: extract_symbolic_data
arguments: data_label: D112
type: string
name: extract_symbolic_data
arguments: data_label: D77
type: string
name: extract_symbolic_data
arguments: data_label: D52
type: string
name: extract_symbolic_data
arguments: data_label: D81
type: string
name: extract_symbolic_data
arguments: data_label: D51
type: string
name: extract_symbolic_data
arguments: data_label: D99
type: string
name: extract_symbolic_data
arguments: data_label: D3
type: string
name: extract_symbolic_data
arguments: data_label: D24
type: string
name: extract_symbolic_data
arguments: data_label: D106
type: string

tool: D53: Port %d: %08X  

tool: D22: Connected 

tool: D35: PortEnabled 

tool: D58: PortSuspended 

tool: D112: PortOverCurrent 

tool: D77: PortReset 

tool: D52: PortPowered 

tool: D81: LowSpeed 

tool: D51: ConnectStatusChange 

tool: D99: PortEnableStatusChange 

tool: D3: PortSuspendStatusChange 

tool: D24: OverCurrentIndicatorChange 

tool: D106: PortResetStatusChange 

assistant: ```c
void ohci_dumpportstat(int idx, uint32_t reg) {
  printf("Port %d: %08X  ", idx, reg);
  if (reg & (((uint32_t)(1)) << ((uint32_t)(0))))
    printf("Connected ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(1))))
    printf("PortEnabled ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(2))))
    printf("PortSuspended ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(3))))
    printf("PortOverCurrent ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(4))))
    printf("PortReset ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(8))))
    printf("PortPowered ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(9))))
    printf("LowSpeed ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(16))))
    printf("ConnectStatusChange ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(17))))
    printf("PortEnableStatusChange ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(18))))
    printf("PortSuspendStatusChange ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(19))))
    printf("OverCurrentIndicatorChange ");
  if (reg & (((uint32_t)(1)) << ((uint32_t)(20))))
    printf("PortResetStatusChange ");
  printf("\n");
}
```