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

```asm
<ilk_debug_blc_pwm_cpu_ctl2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %ecx,-0x34(%rbp)
  mov    %r8d,-0x38(%rbp)
  mov    -0x34(%rbp),%eax
  shr    $0x1f,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x42,-0x38(%rbp)
  je     L379
  cmpl   $0x46,-0x38(%rbp)
  je     L379
  cmpl   $0x102,-0x38(%rbp)
  je     L379
  cmpl   $0x112,-0x38(%rbp)
  je     L379
  cmpl   $0x122,-0x38(%rbp)
  je     L379
  cmpl   $0x106,-0x38(%rbp)
  je     L379
  cmpl   $0x116,-0x38(%rbp)
  je     L379
  cmpl   $0x126,-0x38(%rbp)
  je     L379
  cmpl   $0x10a,-0x38(%rbp)
  jne    L381
L379:
  mov    -0x34(%rbp),%eax
  and    $0x20000000,%eax
  test   %eax,%eax
  je     L461
  lea    D64(%rip),%rax
  jmp    L218
L461:
  lea    D21(%rip),%rax
L218:
  mov    %rax,-0x8(%rbp)
  jmp    L134
L381:
  mov    -0x34(%rbp),%eax
  sar    $0x1d,%eax
  and    $0x3,%eax
  cmp    $0x3,%eax
  je     L329
  cmp    $0x3,%eax
  jg     L134
  cmp    $0x2,%eax
  je     L330
  cmp    $0x2,%eax
  jg     L134
  test   %eax,%eax
  je     L360
  cmp    $0x1,%eax
  je     L439
  jmp    L134
L360:
  lea    D21(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L134
L439:
  lea    D64(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L134
L330:
  lea    D16(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L134
L329:
  cmpl   $0x152,-0x38(%rbp)
  je     L57
  cmpl   $0x162,-0x38(%rbp)
  je     L57
  cmpl   $0x156,-0x38(%rbp)
  je     L57
  cmpl   $0x166,-0x38(%rbp)
  je     L57
  cmpl   $0x15a,-0x38(%rbp)
  je     L57
  cmpl   $0x16a,-0x38(%rbp)
  jne    L251
L57:
  lea    D75(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L131
L251:
  lea    D30(%rip),%rax
  mov    %rax,-0x8(%rbp)
L131:
  nop
L134:
  cmpl   $0x42,-0x38(%rbp)
  je     L452
  cmpl   $0x46,-0x38(%rbp)
  je     L452
  cmpl   $0x102,-0x38(%rbp)
  je     L452
  cmpl   $0x112,-0x38(%rbp)
  je     L452
  cmpl   $0x122,-0x38(%rbp)
  je     L452
  cmpl   $0x106,-0x38(%rbp)
  je     L452
  cmpl   $0x116,-0x38(%rbp)
  je     L452
  cmpl   $0x126,-0x38(%rbp)
  je     L452
  cmpl   $0x10a,-0x38(%rbp)
  je     L452
  cmpl   $0x152,-0x38(%rbp)
  je     L452
  cmpl   $0x162,-0x38(%rbp)
  je     L452
  cmpl   $0x156,-0x38(%rbp)
  je     L452
  cmpl   $0x166,-0x38(%rbp)
  je     L452
  cmpl   $0x15a,-0x38(%rbp)
  je     L452
  cmpl   $0x16a,-0x38(%rbp)
  jne    L90
L452:
  mov    -0x8(%rbp),%rcx
  mov    -0x14(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rcx,%r8
  mov    %edx,%ecx
  lea    D50(%rip),%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  jmp    L65
L90:
  mov    -0x34(%rbp),%eax
  sar    $0x1c,%eax
  and    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x34(%rbp),%eax
  and    $0x8000000,%eax
  test   %eax,%eax
  je     L466
  mov    $0x8,%eax
  jmp    L66
L466:
  mov    $0x80,%eax
L66:
  mov    %eax,-0xc(%rbp)
  mov    -0x10(%rbp),%r8d
  mov    -0x8(%rbp),%rdi
  mov    -0x14(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0xc(%rbp),%ecx
  push   %rcx
  mov    %r8d,%r9d
  mov    %rdi,%r8
  mov    %edx,%ecx
  lea    D19(%rip),%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  add    $0x10,%rsp
  nop
L65:
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D64
type: string
name: disassemble_data
arguments: tag: D21
type: string
name: disassemble_data
arguments: tag: D16
type: string
name: disassemble_data
arguments: tag: D75
type: string
name: disassemble_data
arguments: tag: D30
type: string
name: disassemble_data
arguments: tag: D50
type: string
name: disassemble_data
arguments: tag: D19
type: string

tool: D64: B

tool: D21: A

tool: D16: C

tool: D75: reserved

tool: D30: EDP

tool: D50: enable %d, pipe %s

tool: D19: enable %d, pipe %s, blinking %d, granularity %d

assistant: ```c
void ilk_debug_blc_pwm_cpu_ctl2(char *result, int len, int reg, uint32_t val, uint32_t devid) {
  int enable, blinking, granularity;
  const char *pipe;
  enable = (val >> 31) & 1;
  if ((((devid) == 0x0042) || ((devid) == 0x0046)) || ((devid) == 0x0102 || (devid) == 0x0112 || (devid) == 0x0122 || (devid) == 0x0106 || (devid) == 0x0116 || (devid) == 0x0126 || (devid) == 0x010A)) {
    pipe = ((val >> 29) & 1) ? "B" : "A";
  } else {
    switch ((val >> 29) & 3) {
    case 0:
      pipe = "A";
      break;
    case 1:
      pipe = "B";
      break;
    case 2:
      pipe = "C";
      break;
    case 3:
      if (((devid) == 0x0152 || (devid) == 0x0162 || (devid) == 0x0156 || (devid) == 0x0166 || (devid) == 0x015a || (devid) == 0x016a))
        pipe = "reserved";
      else
        pipe = "EDP";
      break;
    }
  }
  if ((((devid) == 0x0042) || ((devid) == 0x0046)) || ((devid) == 0x0102 || (devid) == 0x0112 || (devid) == 0x0122 || (devid) == 0x0106 || (devid) == 0x0116 || (devid) == 0x0126 || (devid) == 0x010A) || ((devid) == 0x0152 || (devid) == 0x0162 || (devid) == 0x0156 || (devid) == 0x0166 || (devid) == 0x015a || (devid) == 0x016a)) {
    snprintf(result, len, "enable %d, pipe %s", enable, pipe);
  } else {
    blinking = (val >> 28) & 1;
    granularity = ((val >> 27) & 1) ? 8 : 128;
    snprintf(result, len,
             "enable %d, pipe %s, blinking %d, "
             "granularity %d",
             enable, pipe, blinking, granularity);
  }
}
```