user: What would the C source look like for the assembly code provided here?

```asm
<old_search_block>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8d,-0x2c(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  setle  %al
  movzbl %al,%eax
  mov    %eax,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  je     L83
  jmp    L5
L39:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x20(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L50
L20:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x4(%rbp),%eax
  cltq
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L50:
  mov    -0x4(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L21
  cmpl   $0x0,-0x8(%rbp)
  jne    L20
L21:
  addl   $0x1,-0xc(%rbp)
L5:
  cmpl   $0x0,-0x8(%rbp)
  jne    L12
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L39
  jmp    L12
L65:
  movl   $0x1,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L88
L71:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x4(%rbp),%eax
  cltq
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L88:
  mov    -0x4(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L44
  cmpl   $0x0,-0x8(%rbp)
  jne    L71
L44:
  addl   $0x1,-0xc(%rbp)
L83:
  cmpl   $0x0,-0x8(%rbp)
  jne    L12
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L65
L12:
  cmpl   $0x0,-0x8(%rbp)
  je     L140
  mov    -0xc(%rbp),%eax
  jmp    L48
L140:
  mov    $0xffffffff,%eax
L48:
  leave
  ret
```

assistant: ```c
int old_search_block(char *argument, int begin, int length, char **list, int mode) {
  int guess, found, search;
  found = (length < 1);
  guess = 0;
  if (mode)
    while (!found && *(list[guess]) != '\n') {
      found = (length == strlen(list[guess]));
      for (search = 0; (search < length && found); search++)
        found = (*(argument + begin + search) == *(list[guess] + search));
      guess++;
    }
  else {
    while (!found && *(list[guess]) != '\n') {
      found = 1;
      for (search = 0; (search < length && found); search++)
        found = (*(argument + begin + search) == *(list[guess] + search));
      guess++;
    }
  }
  return (found ? guess : -1);
}
```