user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<find_n_param>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  lea    D1(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x138,%rsp
  mov    %rdx,0x18(%rsp)
  mov    %ecx,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  call   <getenv@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  mov    %rbx,%rdi
  mov    %eax,%r13d
  call   <strlen@plt>
  test   %r15,%r15
  je     L53
  test   %r13d,%r13d
  jle    L53
  mov    %eax,%r12d
  mov    %eax,%r8d
  lea    0x20(%rsp),%rbp
  xor    %r14d,%r14d
  not    %r12d
  shr    $0x1f,%r12d
  mov    %r12d,0x14(%rsp)
  nopl   0x0(%rax)
L1:
  movslq %r14d,%r10
  movzbl (%r15,%r10,1),%esi
  cmp    $0x3d,%sil
  je     L89
  mov    %rbp,%r9
  lea    0x1(%r14),%eax
  xor    %edx,%edx
  sub    %r10,%r9
  cmpb   $0x0,0x14(%rsp)
  cltq
  jne    L18
  jmp    L89
  nopl   0x0(%rax)
L56:
  cmp    $0x3d,%sil
  je     L64
L18:
  add    $0x1,%edx
  mov    %sil,-0x1(%r9,%rax,1)
  mov    %eax,%r14d
  movzbl (%r15,%rax,1),%esi
  add    $0x1,%rax
  cmp    %edx,%r8d
  jge    L56
L64:
  movslq %edx,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    %r8d,0xc(%rsp)
  movb   $0x0,0x20(%rsp,%rdx,1)
  mov    0x10(%rsp),%edx
  lea    0x1(%r14),%r12d
  call   <strncmp@plt>
  mov    %rax,%r10
  movslq %r12d,%rax
  add    %r15,%rax
  cmp    %r12d,%r13d
  setg   %dl
  test   %r10,%r10
  je     L8
  cmpb   $0x26,(%rax)
  mov    0xc(%rsp),%r8d
  je     L82
  lea    0x2(%r14),%eax
  cltq
  test   %dl,%dl
  je     L82
  nop
L146:
  cmpb   $0x26,(%r15,%rax,1)
  mov    %eax,%r12d
  setne  %sil
  cmp    %eax,%r13d
  setg   %dl
  add    $0x1,%rax
  test   %dl,%sil
  jne    L146
L82:
  lea    0x1(%r12),%r14d
  cmp    %r14d,%r13d
  jg     L1
L53:
  mov    $0x1,%eax
L184:
  mov    0x128(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L96
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L89:
  xor    %edx,%edx
  jmp    L64
L8:
  movzbl (%rax),%esi
  cmp    $0x26,%sil
  je     L177
  test   %dl,%dl
  je     L177
  mov    $0x1,%edx
  jmp    L168
  nopl   0x0(%rax,%rax,1)
L142:
  cmp    %edi,%r13d
  jle    L143
L168:
  mov    0x18(%rsp),%rbx
  movslq %edx,%r8
  lea    (%r12,%rdx,1),%edi
  mov    %sil,-0x1(%rbx,%rdx,1)
  movzbl (%rax,%rdx,1),%esi
  add    $0x1,%rdx
  cmp    $0x26,%sil
  jne    L142
L143:
  add    %r8,0x18(%rsp)
L177:
  mov    0x18(%rsp),%rax
  movb   $0x0,(%rax)
  xor    %eax,%eax
  jmp    L184
L96:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D1
type_guessed: string

tool: D1: CONTENT_LENGTH

assistant: ```c
int find_n_param(char *buffer, char *nomeobj, char *valore_out, int n_max) {
  int param_length = atoi(getenv("CONTENT_LENGTH"));
  int i = 0, j = 0;
  char nomeparam[255];
  int n_nomeobj = strlen(nomeobj);
  if (buffer == NULL)
    return 1;
  while (i < param_length) {
    j = 0;
    while ((buffer[i] != '=') && (j <= n_nomeobj)) {
      nomeparam[j] = buffer[i];
      i++;
      j++;
    }
    i++;
    nomeparam[j] = '\0';
    if (strncmp(nomeparam, nomeobj, n_max) == 0) {
      j = 0;
      while ((buffer[i] != '&') && (i < param_length)) {
        valore_out[j] = buffer[i];
        i++;
        j++;
      }
      valore_out[j] = '\0';
      return 0;
    } else {
      while ((buffer[i] != '&') && (i < param_length))
        i++;
      i++;
    }
  }
  return 1;
}
```