user: What is the c source code of the assembly code below?

```asm
<__argmatch_internal>:
  endbr64
  push   %r15
  mov    %r8d,%r15d
  push   %r14
  mov    %rcx,%r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdx,0x18(%rsp)
  mov    %r8d,0xc(%rsp)
  call   <strlen@plt>
  mov    (%r12),%r13
  test   %r13,%r13
  je     L144
  mov    %rax,%rbx
  mov    0x18(%rsp),%rax
  test   %r15d,%r15d
  jne    L225
  test   %rax,%rax
  je     L61
  mov    %rax,0x10(%rsp)
  xor    %r15d,%r15d
  movl   $0xffffffff,0x8(%rsp)
  jmp    L177
  cs nopw 0x0(%rax,%rax,1)
L121:
  movslq %eax,%rdi
  mov    0x10(%rsp),%rsi
  mov    %r14,%rdx
  imul   %r14,%rdi
  add    0x18(%rsp),%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmove  0xc(%rsp),%eax
  mov    %eax,0xc(%rsp)
L159:
  add    $0x1,%r15
  add    %r14,0x10(%rsp)
  mov    (%r12,%r15,8),%r13
  test   %r13,%r13
  je     L132
L177:
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  jne    L159
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    %rax,%rbx
  je     L173
  mov    0x8(%rsp),%eax
  cmp    $0xffffffff,%eax
  jne    L121
  mov    %r15d,0x8(%rsp)
  jmp    L159
  nopl   0x0(%rax,%rax,1)
L225:
  test   %rax,%rax
  je     L50
  mov    %rax,0x10(%rsp)
  xor    %r15d,%r15d
  movl   $0x0,0xc(%rsp)
  movl   $0xffffffff,0x8(%rsp)
  jmp    L57
  nopl   0x0(%rax,%rax,1)
L285:
  movslq %eax,%rdi
  mov    0x10(%rsp),%rsi
  mov    %r14,%rdx
  imul   %r14,%rdi
  add    0x18(%rsp),%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmove  0xc(%rsp),%eax
  mov    %eax,0xc(%rsp)
L91:
  add    $0x1,%r15
  add    %r14,0x10(%rsp)
  mov    (%r12,%r15,8),%r13
  test   %r13,%r13
  je     L132
L57:
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L91
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    %rax,%rbx
  je     L173
  mov    0x8(%rsp),%eax
  cmp    $0xffffffff,%eax
  jne    L285
  mov    %r15d,0x8(%rsp)
  jmp    L91
  nop
L132:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  mov    $0xfffffffe,%eax
  cmove  0x8(%rsp),%eax
  mov    %eax,0x8(%rsp)
L178:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L50:
  movl   $0x0,0xc(%rsp)
  xor    %r14d,%r14d
  movl   $0xffffffff,0x8(%rsp)
  jmp    L251
  nopl   (%rax)
L28:
  movl   $0x1,0xc(%rsp)
L229:
  add    $0x1,%r14
  mov    (%r12,%r14,8),%r13
  test   %r13,%r13
  je     L132
L251:
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L229
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    %rbx,%rax
  je     L47
  cmpl   $0xffffffff,0x8(%rsp)
  jne    L28
  mov    %r14d,0x8(%rsp)
  jmp    L229
  cs nopw 0x0(%rax,%rax,1)
L61:
  movl   $0xffffffff,0x8(%rsp)
  xor    %r14d,%r14d
  jmp    L230
  nopl   (%rax)
L72:
  movl   $0x1,0xc(%rsp)
L139:
  add    $0x1,%r14
  mov    (%r12,%r14,8),%r13
  test   %r13,%r13
  je     L132
L230:
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  jne    L139
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    %rax,%rbx
  je     L47
  cmpl   $0xffffffff,0x8(%rsp)
  jne    L72
  mov    %r14d,0x8(%rsp)
  jmp    L139
  cs nopw 0x0(%rax,%rax,1)
L173:
  mov    %r15d,0x8(%rsp)
  add    $0x28,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L47:
  mov    %r14d,0x8(%rsp)
  add    $0x28,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L144:
  movl   $0xffffffff,0x8(%rsp)
  mov    0x8(%rsp),%eax
  jmp    L178
```

assistant: ```c
int __argmatch_internal(const char *arg, const char *const *arglist, const char *vallist, size_t valsize, int case_sensitive) {
  int i;
  size_t arglen;
  int matchind = -1;
  int ambiguous = 0;
  arglen = strlen(arg);
  for (i = 0; arglist[i]; i++) {
    if (case_sensitive ? !strncmp(arglist[i], arg, arglen) : !strncasecmp(arglist[i], arg, arglen)) {
      if (strlen(arglist[i]) == arglen)
        return i;
      else if (matchind == -1)
        matchind = i;
      else {
        if (vallist == NULL || memcmp(vallist + valsize * matchind, vallist + valsize * i, valsize)) {
          ambiguous = 1;
        }
      }
    }
  }
  if (ambiguous)
    return -2;
  else
    return matchind;
}
```