user: 这段汇编代码用C语言表示是什么样的?

```asm
<findMinMoves>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movl   $0x0,(%rax)
  movl   $0x0,-0x24(%rbp)
  jmp    L81
L125:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x24(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x8(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x24(%rbp)
L81:
  mov    -0x24(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L125
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltd
  idivl  -0x10(%rbp)
  mov    %edx,%eax
  test   %eax,%eax
  je     L64
  mov    $0xffffffff,%eax
  jmp    L67
L64:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltd
  idivl  -0x10(%rbp)
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L108
L60:
  mov    -0xc(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x1c(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  mov    -0x1c(%rbp),%ecx
  movslq %ecx,%rcx
  add    $0x1,%rcx
  lea    0x0(,%rcx,4),%rsi
  mov    -0x8(%rbp),%rcx
  add    %rsi,%rcx
  mov    (%rcx),%ecx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  jle    L118
  cmpl   $0x0,-0x14(%rbp)
  jle    L118
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x20(%rbp)
  jge    L68
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x20(%rbp)
  jmp    L68
L118:
  cmpl   $0x0,-0x18(%rbp)
  jns    L73
  negl   -0x18(%rbp)
L73:
  cmpl   $0x0,-0x14(%rbp)
  jns    L62
  negl   -0x14(%rbp)
L62:
  mov    -0x20(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jge    L133
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x20(%rbp)
L133:
  mov    -0x20(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jge    L68
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x20(%rbp)
L68:
  addl   $0x1,-0x1c(%rbp)
L108:
  mov    -0x1c(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L60
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%eax
L67:
  leave
  ret
```

assistant: ```c
int findMinMoves(int *machines, int machinesSize) {
  int size = machinesSize;
  int *sums = (int *)malloc((size + 1) * sizeof(int));
  sums[0] = 0;
  for (int i = 0; i < size; i++) {
    sums[i + 1] = sums[i] + machines[i];
  }
  if (sums[size] % size != 0)
    return -1;
  int avg = sums[size] / size;
  int res = 0;
  for (int i = 0; i < size; i++) {
    int l = avg * i - sums[i];
    int r = avg * (size - 1 - i) - (sums[size] - sums[i + 1]);
    if (l > 0 && r > 0) {
      if (res < l + r)
        res = l + r;
    } else {
      if (l < 0)
        l = -l;
      if (r < 0)
        r = -r;
      if (res < l)
        res = l;
      if (res < r)
        res = r;
    }
  }
  free(sums);
  return res;
}
```