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

```asm
<i830_debug_chdecmisc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %ecx,-0x34(%rbp)
  mov    %r8d,-0x38(%rbp)
  movq   $0x0,-0x18(%rbp)
  mov    -0x34(%rbp),%eax
  sar    $0x5,%eax
  and    $0x3,%eax
  cmp    $0x3,%eax
  je     L1
  cmp    $0x3,%eax
  jg     L44
  cmp    $0x2,%eax
  je     L82
  cmp    $0x2,%eax
  jg     L44
  test   %eax,%eax
  je     L6
  cmp    $0x1,%eax
  jne    L44
  lea    D32(%rip),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L44
L82:
  lea    D65(%rip),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L44
L1:
  lea    D4(%rip),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L44
L6:
  lea    D144(%rip),%rax
  mov    %rax,-0x18(%rbp)
  nop
L44:
  mov    -0x34(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L8
  lea    D60(%rip),%rcx
  jmp    L37
L8:
  lea    D84(%rip),%rcx
L37:
  mov    -0x34(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L175
  lea    D8(%rip),%rdx
  jmp    L49
L175:
  lea    D119(%rip),%rdx
L49:
  mov    -0x34(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L51
  lea    D8(%rip),%rax
  jmp    L28
L51:
  lea    D119(%rip),%rax
L28:
  mov    -0x34(%rbp),%esi
  and    $0x8,%esi
  test   %esi,%esi
  je     L140
  lea    D8(%rip),%rdi
  jmp    L11
L140:
  lea    D119(%rip),%rdi
L11:
  mov    -0x34(%rbp),%esi
  and    $0x10,%esi
  test   %esi,%esi
  je     L102
  lea    D8(%rip),%rsi
  jmp    L69
L102:
  lea    D119(%rip),%rsi
L69:
  mov    -0x18(%rbp),%rbx
  mov    -0x2c(%rbp),%r11d
  mov    -0x28(%rbp),%r10
  sub    $0x8,%rsp
  push   %rcx
  push   %rdx
  push   %rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  mov    %rbx,%rcx
  lea    D36(%rip),%rax
  mov    %rax,%rdx
  mov    %r11d,%esi
  mov    %r10,%rdi
  call   <snprintf@plt>
  add    $0x20,%rsp
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D32
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D65
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D4
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D144
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D60
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D84
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D8
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D119
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D36
type_guessed: string

tool: D32: XOR bank/rank

tool: D65: swap bank

tool: D4: XOR bank

tool: D144: none

tool: 

tool: D84: not 

tool: D8: en

tool: D119: dis

tool: D36: %s, ch2 enh %sabled, ch1 enh %sabled, ch0 enh %sabled, flex %sabled, ep %spresent

assistant: ```c
void i830_debug_chdecmisc(char *result, int len, int reg, uint32_t val, uint32_t devid) {
  const char *enhmodesel = NULL;
  switch ((val >> 5) & 3) {
  case 1:
    enhmodesel = "XOR bank/rank";
    break;
  case 2:
    enhmodesel = "swap bank";
    break;
  case 3:
    enhmodesel = "XOR bank";
    break;
  case 0:
    enhmodesel = "none";
    break;
  }
  snprintf(result, len,
           "%s, ch2 enh %sabled, ch1 enh %sabled, "
           "ch0 enh %sabled, "
           "flex %sabled, ep %spresent",
           enhmodesel, (val & (1 << 4)) ? "en" : "dis", (val & (1 << 3)) ? "en" : "dis", (val & (1 << 2)) ? "en" : "dis", (val & (1 << 1)) ? "en" : "dis", (val & (1 << 0)) ? "" : "not ");
}
```