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

```asm
<FindClockConfiguration>:
  endbr64
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %edi,%r12d
  sub    $0x8,%rsp
  cmp    %esi,%edi
  setl   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %r13d,%eax
  cltd
  idiv   %r12d
  cmp    $0xff,%eax
  jle    L16
  mov    %r13d,%eax
  shr    $0x1f,%eax
  add    %r13d,%eax
  sar    %eax
  cltd
  idiv   %r12d
  cmp    $0xff,%eax
  jle    L34
  test   %r13d,%r13d
  lea    0x3(%r13),%eax
  cmovns %r13d,%eax
  sar    $0x2,%eax
  cltd
  idiv   %r12d
  cmp    $0xff,%eax
  jle    L91
  test   %r13d,%r13d
  lea    0x7(%r13),%eax
  cmovns %r13d,%eax
  sar    $0x3,%eax
  cltd
  idiv   %r12d
  cmp    $0xff,%eax
  jle    L141
  test   %r13d,%r13d
  lea    0xf(%r13),%eax
  cmovns %r13d,%eax
  sar    $0x4,%eax
  cltd
  idiv   %r12d
  cmp    $0xff,%eax
  jle    L0
  test   %r13d,%r13d
  lea    0x1f(%r13),%eax
  cmovns %r13d,%eax
  sar    $0x5,%eax
  cltd
  idiv   %r12d
  cmp    $0xff,%eax
  jle    L47
  test   %r13d,%r13d
  lea    0x3f(%r13),%eax
  cmovns %r13d,%eax
  sar    $0x6,%eax
  cltd
  idiv   %r12d
  cmp    $0xff,%eax
  jle    L138
  test   %r13d,%r13d
  lea    0x7f(%r13),%eax
  cmovns %r13d,%eax
  sar    $0x7,%eax
  cltd
  idiv   %r12d
  cmp    $0xff,%eax
  jle    L5
  test   %r13d,%r13d
  lea    0xff(%r13),%eax
  cmovns %r13d,%eax
  sar    $0x8,%eax
  cltd
  idiv   %r12d
  cmp    $0xff,%eax
  jle    L121
  test   %r13d,%r13d
  lea    0x1ff(%r13),%eax
  cmovns %r13d,%eax
  sar    $0x9,%eax
  cltd
  idiv   %r12d
  cmp    $0xff,%eax
  jle    L46
  test   %r13d,%r13d
  lea    0x3ff(%r13),%eax
  mov    $0x400,%esi
  cmovns %r13d,%eax
  mov    $0xa,%r13d
  sar    $0xa,%eax
  cltd
  idiv   %r12d
L84:
  shl    $0x8,%r13d
  or     %eax,%r13d
L116:
  mov    %r12d,%ecx
  mov    %eax,%edx
  lea    D2(%rip),%rdi
  call   <TRACE_DEBUG@plt>
  add    $0x8,%rsp
  mov    %r13d,%eax
  pop    %r12
  pop    %r13
  ret
L47:
  mov    $0x20,%esi
  mov    $0x5,%r13d
  jmp    L84
  nopl   0x0(%rax)
L16:
  mov    %eax,%r13d
  mov    $0x1,%esi
  jmp    L116
  nopw   0x0(%rax,%rax,1)
L34:
  mov    $0x2,%esi
  mov    $0x1,%r13d
  jmp    L84
L91:
  mov    $0x4,%esi
  mov    $0x2,%r13d
  jmp    L84
L141:
  mov    $0x8,%esi
  mov    $0x3,%r13d
  jmp    L84
L0:
  mov    $0x10,%esi
  mov    $0x4,%r13d
  jmp    L84
L138:
  mov    $0x40,%esi
  mov    $0x6,%r13d
  jmp    L84
L5:
  mov    $0x80,%esi
  mov    $0x7,%r13d
  jmp    L84
L121:
  mov    $0x100,%esi
  mov    $0x8,%r13d
  jmp    L84
L46:
  mov    $0x200,%esi
  mov    $0x9,%r13d
  jmp    L84
```

tool_calls: name: parse_data
arguments: label: D2
datatype: string

tool: D2: Found divisor=%u and prescaler=%u for freq=%uHz


assistant: ```c
uint16_t FindClockConfiguration(uint32_t frequency, uint32_t mck) {
  uint32_t divisors[11] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024};
  uint8_t divisor = 0;
  uint32_t prescaler;
  assert(frequency < mck);
  prescaler = (mck / divisors[divisor]) / frequency;
  while ((prescaler > 255) && (divisor < 11)) {
    divisor++;
    prescaler = (mck / divisors[divisor]) / frequency;
  }
  if (divisor < 11) {
    TRACE_DEBUG("Found divisor=%u and prescaler=%u for freq=%uHz\n\r", divisors[divisor], prescaler, frequency);
    return prescaler | (divisor << 8);
  } else {
    return 0;
  }
}
```