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

```asm
<calc_padding_ccc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x38(%rbp)
  mov    %rcx,-0x48(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x34(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x34(%rbp),%eax
  and    $0x7,%eax
  test   %eax,%eax
  je     L45
  addl   $0x1,-0x28(%rbp)
L45:
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x2aaaaaab,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x28(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  mov    %eax,%edx
  sub    %esi,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  add    %edx,-0x10(%rbp)
  movl   $0x7,-0x24(%rbp)
  cmpl   $0x500,-0x10(%rbp)
  jg     L58
  movl   $0x6,-0x24(%rbp)
L58:
  cmpl   $0x280,-0x10(%rbp)
  jg     L17
  movl   $0x5,-0x24(%rbp)
L17:
  cmpl   $0x140,-0x10(%rbp)
  jg     L108
  movl   $0x4,-0x24(%rbp)
L108:
  cmpl   $0xa0,-0x10(%rbp)
  jg     L19
  movl   $0x3,-0x24(%rbp)
L19:
  cmpl   $0x28,-0x10(%rbp)
  jg     L106
  movl   $0x2,-0x24(%rbp)
L106:
  mov    -0x48(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
  movl   $0x1,-0x20(%rbp)
  movl   $0x1,-0x18(%rbp)
  jmp    L54
L34:
  shll   -0x20(%rbp)
  addl   $0x1,-0x18(%rbp)
L54:
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x18(%rbp)
  jle    L34
  mov    -0x20(%rbp),%eax
  add    %eax,-0x10(%rbp)
  addl   $0x3,-0x10(%rbp)
  mov    -0x38(%rbp),%eax
  sub    $0x3e,%eax
  movslq %eax,%rdx
  imul   $0x78787879,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x3,%edx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
L46:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%edi
  mov    -0x10(%rbp),%eax
  cltd
  idiv   %edi
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x5a,-0x1c(%rbp)
  jg     L46
  mov    -0x40(%rbp),%rax
  mov    (%rax),%ecx
  mov    -0x10(%rbp),%eax
  cltd
  idiv   %ecx
  mov    %edx,%eax
  test   %eax,%eax
  je     L73
  addl   $0x1,-0x1c(%rbp)
L73:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  mov    -0x1c(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x3a0,-0xc(%rbp)
  jle    L21
  mov    $0x0,%eax
  jmp    L69
L21:
  mov    -0xc(%rbp),%eax
  sub    -0x20(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  subl   $0x3,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    %edx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    %eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x2,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  add    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shl    $0x3,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
L69:
  pop    %rbp
  ret
```

assistant: ```c
int calc_padding_ccc(int binary_length, int *cc_width, int lin_width, int *ecc) {
  int target_bitsize = 0;
  int byte_length, codewords_used, ecc_level, ecc_codewords, rows;
  int codewords_total, target_codewords, target_bytesize;
  int i;
  byte_length = binary_length / 8;
  if (binary_length % 8 != 0) {
    byte_length++;
  }
  codewords_used = (byte_length / 6) * 5;
  codewords_used += byte_length % 6;
  ecc_level = 7;
  if (codewords_used <= 1280) {
    ecc_level = 6;
  }
  if (codewords_used <= 640) {
    ecc_level = 5;
  }
  if (codewords_used <= 320) {
    ecc_level = 4;
  }
  if (codewords_used <= 160) {
    ecc_level = 3;
  }
  if (codewords_used <= 40) {
    ecc_level = 2;
  }
  *(ecc) = ecc_level;
  ecc_codewords = 1;
  for (i = 1; i <= (ecc_level + 1); i++) {
    ecc_codewords *= 2;
  }
  codewords_used += ecc_codewords;
  codewords_used += 3;
  *(cc_width) = (lin_width - 62) / 17;
  do {
    *(cc_width) = *(cc_width) + 1;
    rows = codewords_used / *(cc_width);
  } while (rows > 90);
  if (codewords_used % *(cc_width) != 0) {
    rows++;
  }
  codewords_total = *(cc_width)*rows;
  if (codewords_total > 928) {
    return 0;
  }
  target_codewords = codewords_total - ecc_codewords;
  target_codewords -= 3;
  target_bytesize = 6 * (target_codewords / 5);
  target_bytesize += target_codewords % 5;
  target_bitsize = 8 * target_bytesize;
  return target_bitsize;
}
```