user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x10(%rbp)
  jmp    L74
L26:
  movsbl -0x1d(%rbp),%edx
  lea    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <append@plt>
L74:
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    %al,-0x1d(%rbp)
  cmpb   $0xa,-0x1d(%rbp)
  jne    L26
L128:
  movl   $0x1,-0x1c(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <length@plt>
  sub    $0x2,%eax
  mov    %eax,-0x18(%rbp)
  jmp    L22
L140:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <show@plt>
  movl   $0x0,-0x14(%rbp)
  jmp    L134
L142:
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  addl   $0x1,-0x14(%rbp)
L134:
  mov    -0x14(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L142
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x10(%rbp),%rax
  mov    -0x18(%rbp),%edx
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <valueAt@plt>
  cmp    $0x28,%al
  jne    L111
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <valueAt@plt>
  cmp    $0x29,%al
  je     L58
L111:
  mov    -0x10(%rbp),%rax
  mov    -0x18(%rbp),%edx
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <valueAt@plt>
  cmp    $0x5b,%al
  jne    L107
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <valueAt@plt>
  cmp    $0x5d,%al
  je     L58
L107:
  mov    -0x10(%rbp),%rax
  mov    -0x18(%rbp),%edx
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <valueAt@plt>
  cmp    $0x7b,%al
  jne    L25
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <valueAt@plt>
  cmp    $0x7d,%al
  jne    L25
L58:
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  lea    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <deleteAt@plt>
  mov    -0x18(%rbp),%edx
  lea    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <deleteAt@plt>
  movl   $0x0,-0x1c(%rbp)
  subl   $0x1,-0x18(%rbp)
L25:
  subl   $0x1,-0x18(%rbp)
L22:
  cmpl   $0x0,-0x18(%rbp)
  jns    L140
  cmpl   $0x0,-0x1c(%rbp)
  jne    L96
  jmp    L128
L96:
  nop
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <show@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <length@plt>
  test   %eax,%eax
  jne    L84
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L118
L84:
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L118:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L110
  call   <__stack_chk_fail@plt>
L110:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D32
type: string
name: unpack_data
arguments: data_label: D4
type: string
name: unpack_data
arguments: data_label: D1
type: string
name: unpack_data
arguments: data_label: D17
type: string

tool: D32:  

tool: D4: ^^


tool: D1: correct


tool: D17: wrong


assistant: ```c
int main(void) {
  struct string_node *head = NULL;
  char c;
  int is_break;
  int i, j;
  while ((c = getchar()) != '\n') {
    append(&head, c);
  }
  while (1) {
    is_break = 1;
    for (i = length(head) - 2; 0 <= i; i--) {
      show(head);
      for (j = 0; j < i; j++) {
        printf(" ");
      }
      printf("^^\n");
      if ((valueAt(head, i) == '(' && valueAt(head, i + 1) == ')') || (valueAt(head, i) == '[' && valueAt(head, i + 1) == ']') || (valueAt(head, i) == '{' && valueAt(head, i + 1) == '}')) {
        deleteAt(&head, i + 1);
        deleteAt(&head, i);
        is_break = 0;
        i--;
      }
    }
    if (is_break)
      break;
  }
  show(head);
  if (length(head) == 0) {
    printf("correct\n");
  } else {
    printf("wrong\n");
  }
  return 0;
}
```