user: What is the c source code of the assembly code below?

```asm
<ironlake_debug_dref_ctl>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %ecx,-0x54(%rbp)
  mov    %r8d,-0x58(%rbp)
  mov    -0x54(%rbp),%eax
  and    $0x1000,%eax
  test   %eax,%eax
  je     L149
  lea    D54(%rip),%rax
  jmp    L43
L149:
  lea    D36(%rip),%rax
L43:
  mov    %rax,-0x30(%rbp)
  mov    -0x54(%rbp),%eax
  and    $0x400,%eax
  test   %eax,%eax
  je     L106
  lea    D54(%rip),%rax
  jmp    L130
L106:
  lea    D36(%rip),%rax
L130:
  mov    %rax,-0x28(%rbp)
  mov    -0x54(%rbp),%eax
  and    $0x100,%eax
  test   %eax,%eax
  je     L40
  lea    D54(%rip),%rax
  jmp    L29
L40:
  lea    D36(%rip),%rax
L29:
  mov    %rax,-0x20(%rbp)
  mov    -0x54(%rbp),%eax
  and    $0x40,%eax
  test   %eax,%eax
  je     L123
  lea    D17(%rip),%rax
  jmp    L41
L123:
  lea    D110(%rip),%rax
L41:
  mov    %rax,-0x18(%rbp)
  mov    -0x54(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L24
  lea    D54(%rip),%rax
  jmp    L70
L24:
  lea    D36(%rip),%rax
L70:
  mov    %rax,-0x10(%rbp)
  mov    -0x54(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L91
  lea    D54(%rip),%rax
  jmp    L154
L91:
  lea    D36(%rip),%rax
L154:
  mov    %rax,-0x8(%rbp)
  mov    -0x54(%rbp),%eax
  and    $0x6000,%eax
  cmp    $0x6000,%eax
  je     L135
  cmp    $0x6000,%eax
  jg     L176
  test   %eax,%eax
  je     L137
  cmp    $0x4000,%eax
  je     L78
  jmp    L176
L137:
  lea    D36(%rip),%rax
  mov    %rax,-0x38(%rbp)
  jmp    L103
L78:
  lea    D110(%rip),%rax
  mov    %rax,-0x38(%rbp)
  jmp    L103
L135:
  lea    D139(%rip),%rax
  mov    %rax,-0x38(%rbp)
  jmp    L103
L176:
  lea    D103(%rip),%rax
  mov    %rax,-0x38(%rbp)
L103:
  mov    -0x28(%rbp),%rdi
  mov    -0x30(%rbp),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x4c(%rbp),%esi
  mov    -0x48(%rbp),%rax
  push   -0x8(%rbp)
  push   -0x10(%rbp)
  push   -0x18(%rbp)
  push   -0x20(%rbp)
  mov    %rdi,%r9
  mov    %rcx,%r8
  mov    %rdx,%rcx
  lea    D146(%rip),%rdx
  mov    %rax,%rdi
  call   <snprintf@plt>
  add    $0x20,%rsp
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D54
datatype: string
name: extract_symbolic_data
arguments: label: D36
datatype: string
name: extract_symbolic_data
arguments: label: D17
datatype: string
name: extract_symbolic_data
arguments: label: D110
datatype: string
name: extract_symbolic_data
arguments: label: D139
datatype: string
name: extract_symbolic_data
arguments: label: D103
datatype: string
name: extract_symbolic_data
arguments: label: D146
datatype: string

tool: D54: enable

tool: D36: disable

tool: D17: centerspread

tool: D110: downspread

tool: D139: nonspread

tool: D103: reserved

tool: D146: cpu source %s, ssc_source %s, nonspread_source %s, superspread_source %s, ssc4_mode %s, ssc1 %s, ssc4 %s

assistant: ```c
void ironlake_debug_dref_ctl(char *result, int len, int reg, uint32_t val, uint32_t devid) {
  const char *cpu_source;
  const char *ssc_source = val & (2 << 11) ? "enable" : "disable";
  const char *nonspread_source = val & (2 << 9) ? "enable" : "disable";
  const char *superspread_source = val & (2 << 7) ? "enable" : "disable";
  const char *ssc4_mode = val & (1 << 6) ? "centerspread" : "downspread";
  const char *ssc1 = val & (1 << 1) ? "enable" : "disable";
  const char *ssc4 = val & (1) ? "enable" : "disable";
  switch (val & (3 << 13)) {
  case (0 << 13):
    cpu_source = "disable";
    break;
  case (2 << 13):
    cpu_source = "downspread";
    break;
  case (3 << 13):
    cpu_source = "nonspread";
    break;
  default:
    cpu_source = "reserved";
  }
  snprintf(result, len,
           "cpu source %s, ssc_source %s, nonspread_source %s, "
           "superspread_source %s, ssc4_mode %s, ssc1 %s, ssc4 %s",
           cpu_source, ssc_source, nonspread_source, superspread_source, ssc4_mode, ssc1, ssc4);
}
```