user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x6,%esi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x2c(%rbp)
  jmp    L15
L123:
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x28(%rbp)
  jmp    L95
L119:
  lea    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x2c(%rbp),%eax
  cltq
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x28(%rbp)
L95:
  cmpl   $0x1,-0x28(%rbp)
  jle    L119
  addl   $0x1,-0x2c(%rbp)
L15:
  cmpl   $0x2,-0x2c(%rbp)
  jle    L123
  movl   $0x0,-0x2c(%rbp)
  jmp    L8
L170:
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L137
L52:
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  add    %rax,%rax
  add    %rdx,%rax
  mov    -0x20(%rbp,%rax,4),%eax
  add    %eax,-0x24(%rbp)
  addl   $0x1,-0x28(%rbp)
L137:
  cmpl   $0x1,-0x28(%rbp)
  jle    L52
  mov    -0x2c(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    %ecx,%esi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x2c(%rbp)
L8:
  cmpl   $0x2,-0x2c(%rbp)
  jle    L170
  movl   $0x0,-0x2c(%rbp)
  jmp    L0
L169:
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L46
L114:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%eax
  cltq
  add    %rax,%rax
  add    %rdx,%rax
  mov    -0x20(%rbp,%rax,4),%eax
  add    %eax,-0x24(%rbp)
  addl   $0x1,-0x28(%rbp)
L46:
  cmpl   $0x2,-0x28(%rbp)
  jle    L114
  mov    -0x2c(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    %ecx,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x2c(%rbp)
L0:
  cmpl   $0x1,-0x2c(%rbp)
  jle    L169
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L103
L106:
  movl   $0x0,-0x28(%rbp)
  jmp    L86
L54:
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  add    %rax,%rax
  add    %rdx,%rax
  mov    -0x20(%rbp,%rax,4),%eax
  cmp    %eax,-0x24(%rbp)
  jge    L23
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  add    %rax,%rax
  add    %rdx,%rax
  mov    -0x20(%rbp,%rax,4),%eax
  mov    %eax,-0x24(%rbp)
L23:
  addl   $0x1,-0x28(%rbp)
L86:
  cmpl   $0x1,-0x28(%rbp)
  jle    L54
  addl   $0x1,-0x2c(%rbp)
L103:
  cmpl   $0x2,-0x2c(%rbp)
  jle    L106
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L9
  call   <__stack_chk_fail@plt>
L9:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D2
type_infered: string
name: disassemble_data
arguments: data_tag: D7
type_infered: string
name: disassemble_data
arguments: data_tag: D9
type_infered: string
name: disassemble_data
arguments: data_tag: D41
type_infered: string
name: disassemble_data
arguments: data_tag: D15
type_infered: string
name: disassemble_data
arguments: data_tag: D13
type_infered: string

tool: D2: Please input %d elements for 'arr':


tool: D7: Row %d:


tool: D9: %d

tool: D41: Sum of Row %d: %d


tool: D15: Sum of Column %d: %d


tool: D13: Highest element is: %d


assistant: ```c
int main() {
  int i, j, arr[3][2], tally;
  printf("Please input %d elements for 'arr':\n", 3 * 2);
  for (i = 0; i < 3; i++) {
    printf("Row %d:\n", i + 1);
    for (j = 0; j < 2; j++) {
      scanf("%d", &arr[i][j]);
    }
  }
  for (i = 0; i < 3; i++) {
    tally = 0;
    for (j = 0; j < 2; j++) {
      tally += arr[i][j];
    }
    printf("Sum of Row %d: %d\n", i + 1, tally);
  }
  for (i = 0; i < 2; i++) {
    tally = 0;
    for (j = 0; j < 3; j++) {
      tally += arr[j][i];
    }
    printf("Sum of Column %d: %d\n", i + 1, tally);
  }
  tally = arr[0][0];
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 2; j++) {
      if (tally < arr[i][j]) {
        tally = arr[i][j];
      }
    }
  }
  printf("Highest element is: %d\n", tally);
  return 0;
}
```