user: 请从给定的汇编指令推导出C源代码：

```asm
<ilk_debug_blc_pwm_cpu_ctl2>:
  endbr64
  mov    %r8d,%edx
  mov    %ecx,%r10d
  mov    %ecx,%r11d
  and    $0xfffffffb,%edx
  shr    $0x1f,%r10d
  cmp    $0x42,%edx
  je     L26
  lea    -0x102(%r8),%edx
  mov    %r8d,%eax
  cmp    $0x24,%edx
  ja     L66
  movabs $0x1100110111,%rcx
  bt     %rdx,%rcx
  jb     L86
  mov    %r11d,%ecx
  sar    $0x1d,%ecx
  and    $0x3,%ecx
  cmp    $0x2,%ecx
  je     L24
L39:
  cmp    $0x3,%ecx
  je     L64
  cmp    $0x1,%ecx
  lea    D104(%rip),%r8
  lea    D112(%rip),%rcx
  cmovne %rcx,%r8
L150:
  lea    -0x152(%rax),%r9d
  cmp    $0x126,%eax
  jg     L32
  cmp    $0x101,%eax
  jg     L40
L45:
  mov    %r11d,%r9d
  sub    $0x10,%rsp
  and    $0x8000000,%r11d
  mov    %r10d,%ecx
  sar    $0x1c,%r9d
  cmp    $0x1,%r11d
  lea    D126(%rip),%rdx
  sbb    %eax,%eax
  and    $0x1,%r9d
  and    $0x78,%eax
  add    $0x8,%eax
  push   %rax
  xor    %eax,%eax
  call   <snprintf@plt>
  add    $0x18,%rsp
  ret
  cs nopw 0x0(%rax,%rax,1)
L26:
  and    $0x20000000,%r11d
  lea    D112(%rip),%r8
  lea    D104(%rip),%rax
  cmovne %rax,%r8
L51:
  mov    %r10d,%ecx
  lea    D110(%rip),%rdx
  xor    %eax,%eax
  jmp    1050 <snprintf@plt>
  nopw   0x0(%rax,%rax,1)
L24:
  lea    D64(%rip),%r8
L40:
  movabs $0x1100110111,%rax
  bt     %rdx,%rax
  jae    L45
  jmp    L51
  nopl   (%rax)
L64:
  lea    -0x152(%rax),%r9d
  test   $0xffffffef,%r9d
  je     L164
  lea    -0x156(%rax),%ecx
  cmp    $0x14,%ecx
  ja     L57
  mov    $0x110011,%eax
  lea    D66(%rip),%r8
  shr    %cl,%rax
  test   $0x1,%al
  lea    D4(%rip),%rax
  cmove  %rax,%r8
  nop
L32:
  cmp    $0x18,%r9d
  ja     L45
  mov    $0x1110111,%eax
  bt     %r9,%rax
  jae    L45
  jmp    L51
  xchg   %ax,%ax
L86:
  test   $0x20000000,%r11d
  lea    D104(%rip),%r8
  lea    D112(%rip),%rcx
  cmove  %rcx,%r8
  jmp    L150
L66:
  sar    $0x1d,%ecx
  and    $0x3,%ecx
  cmp    $0x2,%ecx
  jne    L39
  lea    D64(%rip),%r8
  jmp    L150
  nopl   0x0(%rax)
L164:
  lea    D66(%rip),%r8
  jmp    L150
L57:
  lea    D4(%rip),%r8
  jmp    L150
```

tool_calls: name: disassemble_data
arguments: data_tag: D104
data_type: string
name: disassemble_data
arguments: data_tag: D112
data_type: string
name: disassemble_data
arguments: data_tag: D126
data_type: string
name: disassemble_data
arguments: data_tag: D110
data_type: string
name: disassemble_data
arguments: data_tag: D64
data_type: string
name: disassemble_data
arguments: data_tag: D66
data_type: string
name: disassemble_data
arguments: data_tag: D4
data_type: string

tool: D104: B

tool: D112: A

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

tool: D110: enable %d, pipe %s

tool: D64: C

tool: D66: reserved

tool: D4: EDP

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);
  }
}
```