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

```asm
<parse_innermost>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  lea    D11(%rip),%r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
L133:
  xor    %r14d,%r14d
  xor    %ebx,%ebx
  xor    %r12d,%r12d
  jmp    L30
  nopl   0x0(%rax,%rax,1)
L2:
  add    $0x1,%ebx
  cmp    $0x29,%al
  je     L153
L160:
  add    $0x1,%r14
L30:
  mov    %r15,%rdi
  call   <strlen@plt>
  cmp    %r14d,%eax
  jle    L153
  movzbl (%r15,%r14,1),%eax
  cmp    $0x28,%al
  jne    L2
  mov    %r14d,%r12d
  xor    %ebx,%ebx
  jmp    L160
  nopl   0x0(%rax,%rax,1)
L153:
  lea    0x2(%rbx),%eax
  mov    %rsp,%rcx
  cltq
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L24
L78:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L78
L24:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L181
  orq    $0x0,-0x8(%rsp,%rdx,1)
L181:
  movslq %r12d,%rcx
  lea    0x1(%rbx),%r14d
  mov    %rsp,%r10
  mov    %rsp,%rdi
  mov    %r14d,%edx
  lea    (%r15,%rcx,1),%rsi
  mov    %r10,-0x58(%rbp)
  movslq %r14d,%r14
  mov    %rcx,-0x50(%rbp)
  call   <memcpy@plt>
  mov    %rsp,%rdi
  movb   $0x0,(%rsp,%r14,1)
  call   <parse_buffer@plt>
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    -0x50(%rbp),%rcx
  mov    %rsp,%rdx
  mov    -0x58(%rbp),%r10
  sub    %r12d,%eax
  add    %ebx,%eax
  add    $0xf,%rcx
  mov    %eax,-0x48(%rbp)
  add    $0x1,%eax
  mov    %eax,-0x44(%rbp)
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L203
L42:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L42
L203:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L31
  orq    $0x0,-0x8(%rsp,%rax,1)
L31:
  movslq -0x44(%rbp),%rax
  mov    %rsp,%rcx
  mov    %rsp,%r11
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L19
L39:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L39
L19:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L61
  orq    $0x0,-0x8(%rsp,%rdx,1)
L61:
  mov    %r11,%rdi
  mov    %r10,-0x50(%rbp)
  mov    %r11,-0x58(%rbp)
  mov    %rsp,-0x60(%rbp)
  call   <strlen@plt>
  mov    %rsp,%rdi
  mov    %eax,%r14d
  call   <strlen@plt>
  mov    -0x50(%rbp),%rdi
  add    %eax,%r14d
  call   <strlen@plt>
  mov    %rsp,%rcx
  mov    -0x58(%rbp),%r11
  mov    -0x50(%rbp),%r10
  add    %r14d,%eax
  cltq
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L53
L94:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L94
L53:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L83
  orq    $0x0,-0x8(%rsp,%rax,1)
L83:
  mov    %rsp,%r14
  test   %r12d,%r12d
  je     L126
  mov    %r11,%rdi
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %r10,-0x58(%rbp)
  mov    %r11,-0x50(%rbp)
  call   <memcpy@plt>
  mov    -0x50(%rbp),%r11
  lea    0x1(%r12),%eax
  mov    %rsp,%rdi
  cltq
  lea    D17(%rip),%rsi
  movb   $0x0,(%r11,%rax,1)
  mov    %r11,%rdx
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    -0x58(%rbp),%r10
L126:
  mov    %r14,%rdx
  mov    %r10,%rcx
  mov    %r13,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    -0x44(%rbp),%edx
  test   %edx,%edx
  jle    L13
  add    %ebx,%r12d
  mov    -0x60(%rbp),%rbx
  movslq %r12d,%r12
  lea    0x1(%r15,%r12,1),%rsi
  mov    %rbx,%rdi
  call   <memcpy@plt>
  mov    -0x48(%rbp),%eax
  mov    %rbx,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r14,%rdi
  add    $0x2,%eax
  cltq
  movb   $0x0,(%rbx,%rax,1)
  xor    %eax,%eax
  call   <sprintf@plt>
L13:
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <strcpy@plt>
  lea    D14(%rip),%rsi
  mov    %r15,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L133
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L63
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L63:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D11
type_guessed: string
name: read_data
arguments: tag: D17
type_guessed: string
name: read_data
arguments: tag: D14
type_guessed: string

tool: D11: %s%s

tool: D17: %s

tool: D14: (

assistant: ```c
void parse_innermost(char *line) {
  int pos = 0, length = 0;
  for (int i = 0; i < strlen(line); i++) {
    length++;
    if (line[i] == '(') {
      pos = i;
      length = 0;
    } else if (line[i] == ')') {
      break;
    }
  }
  char subseq[length + 2];
  memcpy(subseq, &line[pos], length + 1);
  subseq[length + 1] = 0x00;
  parse_buffer(subseq);
  int sufc = strlen(line) - pos + length + 1;
  char pre[pos];
  char suf[sufc];
  int mergedc = strlen(pre) + strlen(suf) + strlen(subseq);
  char merged[mergedc];
  if (pos > 0) {
    memcpy(pre, &line[0], pos);
    pre[pos + 1] = 0x00;
    sprintf(merged, "%s", pre);
  }
  sprintf(merged, "%s%s", merged, subseq);
  if (sufc > 0) {
    memcpy(suf, &line[pos + length + 1], sufc);
    suf[sufc + 1] = 0x00;
    sprintf(merged, "%s%s", merged, suf);
  }
  strcpy(line, merged);
  if (strstr(line, "(")) {
    parse_innermost(line);
  }
}
```