user: 请将以下的汇编代码转换成C语言代码:

```asm
<check_sum>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %ecx,-0x54(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x50(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L105
  mov    $0x0,%eax
  mov    %rbx,%rsp
  jmp    L61
L105:
  movl   $0x0,-0x38(%rbp)
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L132:
  cmp    %rdx,%rsp
  je     L135
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L132
L135:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L20
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L20:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L82
L83:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x20(%rbp),%rax
  mov    -0x34(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rax,%rdx,4)
  addl   $0x1,-0x34(%rbp)
L82:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L83
  movl   $0x0,-0x30(%rbp)
  jmp    L45
L50:
  cmpl   $0x0,-0x30(%rbp)
  je     L94
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  neg    %edx
  mov    %edx,(%rax)
L94:
  movl   $0x0,-0x2c(%rbp)
  jmp    L149
L37:
  mov    -0x20(%rbp),%rax
  mov    -0x2c(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%edx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  je     L88
  movl   $0x1,-0x38(%rbp)
L88:
  addl   $0x1,-0x2c(%rbp)
L149:
  mov    -0x2c(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L37
  cmpl   $0x0,-0x38(%rbp)
  je     L85
  mov    -0x54(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <array_sum@plt>
  cmp    %eax,-0x4c(%rbp)
  jne    L95
  mov    -0x4c(%rbp),%edx
  mov    -0x54(%rbp),%ecx
  mov    -0x48(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <printer@plt>
L95:
  mov    -0x50(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    -0x54(%rbp),%edx
  mov    -0x4c(%rbp),%esi
  mov    -0x48(%rbp),%rax
  mov    %edx,%ecx
  mov    %edi,%edx
  mov    %rax,%rdi
  call   <check_sum>
  jmp    L26
L85:
  mov    -0x50(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    -0x54(%rbp),%edx
  mov    -0x4c(%rbp),%esi
  mov    -0x48(%rbp),%rax
  mov    %edx,%ecx
  mov    %edi,%edx
  mov    %rax,%rdi
  call   <check_sum>
L26:
  addl   $0x1,-0x30(%rbp)
L45:
  cmpl   $0x1,-0x30(%rbp)
  jle    L50
  mov    %rbx,%rsp
L61:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L75
  call   <__stack_chk_fail@plt>
L75:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int check_sum(int array[], int sum, int position, int len) {
  if (position >= len) {
    return 0;
  }
  int flag = 0;
  int cur_rotation[len];
  for (int i = 0; i < len; i++) {
    cur_rotation[i] = array[i];
  }
  for (int i = 0; i < 2; i++) {
    if (i != 0) {
      array[position] *= -1;
    }
    for (int k = 0; k < len; k++) {
      if (cur_rotation[k] != array[k]) {
        flag = 1;
      }
    }
    if (flag) {
      if (array_sum(array, len) == sum) {
        printer(array, len, sum);
      }
      check_sum(array, sum, position + 1, len);
    } else {
      check_sum(array, sum, position + 1, len);
    }
  }
}
```