user: Please show me the C implementation that matches the assembly code listed below:

```asm
<deflate_put_length>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  lea    -0x3(%rdi),%eax
  cmp    $0x7,%eax
  jbe    L34
  cmp    $0x12,%edi
  jle    L91
  cmp    $0x22,%edi
  jle    L93
  cmp    $0x42,%edi
  jle    L119
  cmp    $0x82,%edi
  jle    L48
  cmp    $0x101,%edi
  jle    L116
  cmp    $0x102,%edi
  je     L84
L122:
  pop    %rbx
  ret
L34:
  lea    0xfe(%rdi),%edi
  call   <deflate_put_literal@plt>
  jmp    L122
L91:
  lea    -0xb(%rdi),%eax
  mov    %eax,%edi
  shr    $0x1f,%edi
  add    %eax,%edi
  sar    %edi
  add    $0x109,%edi
  call   <deflate_put_literal@plt>
  sub    $0x3,%ebx
  mov    %ebx,%eax
  shr    $0x1f,%eax
  lea    (%rbx,%rax,1),%esi
  and    $0x1,%esi
  sub    %eax,%esi
  mov    $0x1,%edi
  call   <deflate_put_bits@plt>
  jmp    L122
L93:
  lea    -0x10(%rdi),%edi
  mov    %ebx,%eax
  sub    $0x13,%eax
  cmovns %eax,%edi
  sar    $0x2,%edi
  add    $0x10d,%edi
  call   <deflate_put_literal@plt>
  sub    $0x3,%ebx
  mov    %ebx,%eax
  sar    $0x1f,%eax
  shr    $0x1e,%eax
  lea    (%rbx,%rax,1),%esi
  and    $0x3,%esi
  sub    %eax,%esi
  mov    $0x2,%edi
  call   <deflate_put_bits@plt>
  jmp    L122
L119:
  lea    -0x1c(%rdi),%edi
  mov    %ebx,%eax
  sub    $0x23,%eax
  cmovns %eax,%edi
  sar    $0x3,%edi
  add    $0x111,%edi
  call   <deflate_put_literal@plt>
  sub    $0x3,%ebx
  mov    %ebx,%eax
  sar    $0x1f,%eax
  shr    $0x1d,%eax
  lea    (%rbx,%rax,1),%esi
  and    $0x7,%esi
  sub    %eax,%esi
  mov    $0x3,%edi
  call   <deflate_put_bits@plt>
  jmp    L122
L48:
  lea    -0x34(%rdi),%edi
  mov    %ebx,%eax
  sub    $0x43,%eax
  cmovns %eax,%edi
  sar    $0x4,%edi
  add    $0x115,%edi
  call   <deflate_put_literal@plt>
  sub    $0x3,%ebx
  mov    %ebx,%eax
  sar    $0x1f,%eax
  shr    $0x1c,%eax
  lea    (%rbx,%rax,1),%esi
  and    $0xf,%esi
  sub    %eax,%esi
  mov    $0x4,%edi
  call   <deflate_put_bits@plt>
  jmp    L122
L116:
  lea    -0x64(%rdi),%edi
  mov    %ebx,%eax
  sub    $0x83,%eax
  cmovns %eax,%edi
  sar    $0x5,%edi
  add    $0x119,%edi
  call   <deflate_put_literal@plt>
  sub    $0x3,%ebx
  mov    %ebx,%eax
  sar    $0x1f,%eax
  shr    $0x1b,%eax
  lea    (%rbx,%rax,1),%esi
  and    $0x1f,%esi
  sub    %eax,%esi
  mov    $0x5,%edi
  call   <deflate_put_bits@plt>
  jmp    L122
L84:
  mov    $0x11d,%edi
  call   <deflate_put_literal@plt>
  jmp    L122
```

assistant: ```c
void deflate_put_length(int len) {
  if (len > 2 && len < 11) {
    deflate_put_literal(254 + len);
    return;
  }
  if (len < 19) {
    deflate_put_literal(265 + (len - 11) / 2);
    deflate_put_bits(1, (len - 3) % 2);
    return;
  }
  if (len < 35) {
    deflate_put_literal(269 + (len - 19) / 4);
    deflate_put_bits(2, (len - 3) % 4);
    return;
  }
  if (len < 67) {
    deflate_put_literal(273 + (len - 35) / 8);
    deflate_put_bits(3, (len - 3) % 8);
    return;
  }
  if (len < 131) {
    deflate_put_literal(277 + (len - 67) / 16);
    deflate_put_bits(4, (len - 3) % 16);
    return;
  }
  if (len < 258) {
    deflate_put_literal(281 + (len - 131) / 32);
    deflate_put_bits(5, (len - 3) % 32);
    return;
  }
  if (len == 258) {
    deflate_put_literal(285);
    return;
  }
  return;
}
```