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

```asm
<MagicCube>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%rcx
  mov    $0x0,%ebx
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L50
L34:
  movl   $0x0,-0x20(%rbp)
  jmp    L24
L79:
  mov    -0x24(%rbp),%edx
  movslq %edx,%rcx
  movslq %eax,%rdx
  imul   %rcx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x40(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rcx,%rdx,4),%edx
  add    %edx,-0x2c(%rbp)
  addl   $0x1,-0x20(%rbp)
L24:
  mov    -0x20(%rbp),%edx
  cmp    -0x34(%rbp),%edx
  jl     L79
  cmpl   $0x0,-0x24(%rbp)
  jne    L127
  mov    -0x2c(%rbp),%edx
  mov    %edx,-0x28(%rbp)
L127:
  mov    -0x2c(%rbp),%edx
  cmp    -0x28(%rbp),%edx
  je     L136
  mov    $0x0,%eax
  jmp    L33
L136:
  movl   $0x0,-0x2c(%rbp)
  addl   $0x1,-0x24(%rbp)
L50:
  mov    -0x24(%rbp),%edx
  cmp    -0x34(%rbp),%edx
  jl     L34
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L68
L134:
  mov    -0x24(%rbp),%edx
  movslq %edx,%rcx
  movslq %eax,%rdx
  imul   %rcx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x40(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rcx,%rdx,4),%edx
  add    %edx,-0x2c(%rbp)
  addl   $0x1,-0x24(%rbp)
L68:
  mov    -0x24(%rbp),%edx
  cmp    -0x34(%rbp),%edx
  jl     L134
  mov    -0x2c(%rbp),%edx
  cmp    -0x28(%rbp),%edx
  je     L108
  mov    $0x0,%eax
  jmp    L33
L108:
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x24(%rbp)
  mov    -0x34(%rbp),%edx
  sub    $0x1,%edx
  mov    %edx,-0x1c(%rbp)
  jmp    L103
L116:
  mov    -0x24(%rbp),%edx
  movslq %edx,%rcx
  movslq %eax,%rdx
  imul   %rcx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x40(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rcx,%rdx,4),%edx
  add    %edx,-0x2c(%rbp)
  addl   $0x1,-0x24(%rbp)
  subl   $0x1,-0x1c(%rbp)
L103:
  mov    -0x24(%rbp),%edx
  cmp    -0x34(%rbp),%edx
  jl     L116
  mov    -0x2c(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  je     L91
  mov    $0x0,%eax
  jmp    L33
L91:
  mov    $0x1,%eax
L33:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int MagicCube(int input, int multidimentionalArray[input][input]) {
  int firstSum = 0;
  int secondSum = 0;
  int counter = 0;
  for (counter = 0; counter < input; counter++) {
    int SecondCounter;
    for (SecondCounter = 0; SecondCounter < input; SecondCounter++) {
      firstSum += multidimentionalArray[counter][SecondCounter];
    }
    if (counter == 0) {
      secondSum = firstSum;
    }
    if (firstSum != secondSum) {
      return 0;
    }
    firstSum = 0;
  }
  firstSum = 0;
  for (counter = 0; counter < input; counter++) {
    firstSum += multidimentionalArray[counter][counter];
  }
  if (firstSum != secondSum) {
    return 0;
  }
  firstSum = 0;
  int SecondCounter;
  for (counter = 0, SecondCounter = input - 1; counter < input; counter++, SecondCounter--) {
    firstSum += multidimentionalArray[counter][SecondCounter];
  }
  if (firstSum != SecondCounter) {
    return 0;
  }
  return 1;
}
```