user: What would the C source look like for the assembly code provided here:

```asm
<i830_debug_sdvo>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %esi,-0x5c(%rbp)
  mov    %edx,-0x60(%rbp)
  mov    %ecx,-0x64(%rbp)
  mov    %r8d,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x0,-0x64(%rbp)
  jns    L52
  lea    D53(%rip),%rax
  jmp    L82
L52:
  lea    D86(%rip),%rax
L82:
  mov    %rax,-0x40(%rbp)
  mov    -0x64(%rbp),%eax
  and    $0x40000000,%eax
  test   %eax,%eax
  je     L16
  mov    $0x42,%eax
  jmp    L45
L16:
  mov    $0x41,%eax
L45:
  mov    %al,-0x41(%rbp)
  mov    -0x64(%rbp),%eax
  and    $0x20000000,%eax
  test   %eax,%eax
  je     L85
  lea    D53(%rip),%rax
  jmp    L17
L85:
  lea    D86(%rip),%rax
L17:
  mov    %rax,-0x38(%rbp)
  mov    -0x64(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L128
  lea    D16(%rip),%rax
  jmp    L61
L128:
  lea    D38(%rip),%rax
L61:
  mov    %rax,-0x30(%rbp)
  mov    -0x64(%rbp),%eax
  and    $0x10000,%eax
  test   %eax,%eax
  je     L136
  lea    D71(%rip),%rax
  jmp    L118
L136:
  lea    D16(%rip),%rax
L118:
  mov    %rax,-0x28(%rbp)
  cmpl   $0x2582,-0x68(%rbp)
  je     L50
  cmpl   $0x258a,-0x68(%rbp)
  je     L50
  cmpl   $0x2592,-0x68(%rbp)
  jne    L105
L50:
  mov    -0x64(%rbp),%eax
  sar    $0x17,%eax
  and    $0x7,%eax
  lea    0x1(%rax),%edx
  lea    -0x20(%rbp),%rax
  lea    D26(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L102
L105:
  movb   $0x0,-0x20(%rbp)
L102:
  movsbl -0x41(%rbp),%edi
  mov    -0x38(%rbp),%r8
  mov    -0x40(%rbp),%rdx
  mov    -0x5c(%rbp),%esi
  mov    -0x58(%rbp),%rax
  sub    $0x8,%rsp
  push   -0x28(%rbp)
  lea    -0x20(%rbp),%rcx
  push   %rcx
  push   -0x30(%rbp)
  mov    %r8,%r9
  mov    %edi,%r8d
  mov    %rdx,%rcx
  lea    D28(%rip),%rdx
  mov    %rax,%rdi
  call   <snprintf@plt>
  add    $0x20,%rsp
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L131
  call   <__stack_chk_fail@plt>
L131:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D53
type: string
name: read_data
arguments: data_tag: D86
type: string
name: read_data
arguments: data_tag: D16
type: string
name: read_data
arguments: data_tag: D38
type: string
name: read_data
arguments: data_tag: D71
type: string
name: read_data
arguments: data_tag: D26
type: string
name: read_data
arguments: data_tag: D28
type: string

tool: D53: enabled

tool: D86: disabled

tool: 

tool: D38: not 

tool: D71: , gang mode

tool: D26: , SDVO mult %d

tool: D28: %s, pipe %c, stall %s, %sdetected%s%s

assistant: ```c
void i830_debug_sdvo(char *result, int len, int reg, uint32_t val, uint32_t devid) {
  const char *enable = val & (1 << 31) ? "enabled" : "disabled";
  char disp_pipe = val & (1 << 30) ? 'B' : 'A';
  const char *stall = val & (1 << 29) ? "enabled" : "disabled";
  const char *detected = val & (1 << 2) ? "" : "not ";
  const char *gang = val & (1 << 16) ? ", gang mode" : "";
  char sdvoextra[20];
  if (((devid) == 0x2582 || (devid) == 0x258A || (devid) == 0x2592)) {
    sprintf(sdvoextra, ", SDVO mult %d", (int)((val & (7 << 23)) >> 23) + 1);
  } else {
    sdvoextra[0] = '\0';
  }
  snprintf(result, len, "%s, pipe %c, stall %s, %sdetected%s%s", enable, disp_pipe, stall, detected, sdvoextra, gang);
}
```