user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x97,%ecx
  push   %r14
  lea    D27(%rip),%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x4e8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x4d8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbx
  lea    0x8(%rsp),%rsi
  mov    %rbx,%rdi
  rep stos %rax,%es:(%rdi)
  movl   $0x0,(%rdi)
  mov    %r14,%rdi
  call   <scanf@plt>
  movslq 0x8(%rsp),%rax
  test   %eax,%eax
  jle    L21
  mov    D8(%rip),%r13
  mov    $0x1,%r15d
  lea    0xc(%rsp),%r12
  lea    D25(%rip),%rbp
  jmp    L11
  nopw   0x0(%rax,%rax,1)
L65:
  mov    %r13,0x10(%rbx)
L60:
  movslq 0x8(%rsp),%rax
  add    $0x1,%r15d
  add    $0xc,%rbx
  cmp    %r15d,%eax
  jl     L21
L11:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  mov    (%rbx),%ecx
  mov    0x4(%rbx),%eax
  lea    -0x1(%r15),%esi
  mov    0x8(%rbx),%edi
  cmp    %eax,%ecx
  cmovle %ecx,%eax
  cmp    %eax,%edi
  mov    %eax,%edx
  cmovle %edi,%edx
  add    $0x1,%edx
  mov    %edx,0xc(%rbx)
  movslq 0xc(%rsp),%rdx
  test   %edx,%edx
  je     L65
  cmp    $0x3,%edx
  je     L48
  mov    $0x3,%eax
  movslq %esi,%rsi
  movslq %r15d,%rdi
  sub    %edx,%eax
  lea    (%rsi,%rsi,2),%rsi
  lea    (%rdi,%rdi,2),%rdi
  cltq
  add    %rdi,%rdx
  add    %rax,%rsi
  mov    0x10(%rsp,%rsi,4),%esi
  cmp    %ecx,%esi
  cmovg  %ecx,%esi
  add    %rax,%rdi
  mov    %esi,0x10(%rsp,%rdx,4)
  movl   $0x65,0x10(%rsp,%rdi,4)
  jmp    L60
  nopl   0x0(%rax,%rax,1)
L48:
  cmp    %edi,%ecx
  mov    %eax,0x14(%rbx)
  cmovle %ecx,%edi
  mov    %edi,0x10(%rbx)
  jmp    L60
L21:
  lea    (%rax,%rax,2),%rax
  mov    %r14,%rdi
  shl    $0x2,%rax
  mov    0x10(%rsp,%rax,1),%esi
  mov    0x14(%rsp,%rax,1),%edx
  mov    0x18(%rsp,%rax,1),%eax
  cmp    %edx,%esi
  cmovg  %edx,%esi
  cmp    %eax,%esi
  cmovg  %eax,%esi
  call   <printf@plt>
  mov    0x4d8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L49
  add    $0x4e8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L49:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D27
type_infered: string
name: parse_data
arguments: label: D8
type_infered: byte[8]
name: parse_data
arguments: label: D25
type_infered: string

tool: D27: %d


tool: {"D8": [0x65,0x00,0x00,0x00,0x65,0x00,0x00,0x00]}

tool: D25: %d

assistant: ```c
int main() {
  int n, i, c, t[101][3] = {0};
  scanf("%d\n", &n);
  for (i = 1; i <= n; ++i) {
    scanf("%d", &c);
    t[i][0] = (t[i - 1][0] > (t[i - 1][1] > t[i - 1][2] ? t[i - 1][2] : t[i - 1][1]) ? (t[i - 1][1] > t[i - 1][2] ? t[i - 1][2] : t[i - 1][1]) : t[i - 1][0]) + 1;
    if (!c) {
      t[i][1] = 101;
      t[i][2] = 101;
    } else if (c == 3) {
      t[i][1] = (t[i - 1][0] > t[i - 1][2] ? t[i - 1][2] : t[i - 1][0]);
      t[i][2] = (t[i - 1][0] > t[i - 1][1] ? t[i - 1][1] : t[i - 1][0]);
    } else {
      t[i][c] = (t[i - 1][0] > t[i - 1][3 - c] ? t[i - 1][3 - c] : t[i - 1][0]);
      t[i][3 - c] = 101;
    }
  }
  printf("%d\n", (t[n][0] > (t[n][1] > t[n][2] ? t[n][2] : t[n][1]) ? (t[n][1] > t[n][2] ? t[n][2] : t[n][1]) : t[n][0]));
}
```