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

```asm
<match_types>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%r12d
  mov    %esi,0xc(%rsp)
  mov    %rdx,%r13
  mov    %rcx,%r14
  mov    %r8,(%rsp)
  test   %esi,%esi
  je     L3
  test   %edi,%edi
  jle    L33
  mov    %rdx,%rbx
  mov    %rcx,%rbp
  lea    -0x1(%rdi),%eax
  lea    (%rax,%rax,4),%rax
  lea    0x5(%rdx,%rax,1),%r15
  jmp    L140
L3:
  test   %edi,%edi
  jle    L33
  mov    %rdx,%rbx
  mov    %rcx,%rbp
  lea    -0x1(%rdi),%eax
  lea    (%rax,%rax,4),%rax
  lea    0x5(%rdx,%rax,1),%r15
  jmp    L13
L171:
  add    $0x5,%rbx
  add    $0x5,%rbp
  cmp    %rbx,%r15
  je     L33
L13:
  mov    $0x5,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L171
L110:
  mov    $0x0,%eax
  cmp    $0x1,%r12d
  jle    L194
  mov    $0x0,%eax
  mov    (%rsp),%rcx
  cmpl   $0xffffffff,(%rcx)
  je     L194
  cmpl   $0x0,0xc(%rsp)
  jne    L139
  movslq %r12d,%rax
  lea    -0x5(%rax,%rax,4),%rbp
  add    %r13,%rbp
  mov    %r14,%rbx
  lea    -0x1(%r12),%eax
  lea    (%rax,%rax,4),%rax
  lea    0x5(%r14,%rax,1),%r12
  jmp    L27
L12:
  add    $0x5,%rbx
  add    $0x5,%rbp
  cmp    %r15,%rbx
  je     L33
L140:
  mov    $0x5,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L12
  cmpb   $0x2a,0x0(%rbp)
  jne    L110
  jmp    L12
L33:
  mov    (%rsp),%rax
  movl   $0x0,(%rax)
  mov    $0x1,%eax
L194:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L94:
  sub    $0x5,%rbp
  add    $0x5,%rbx
  cmp    %r12,%rbx
  je     L232
L27:
  mov    $0x5,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L94
L156:
  mov    $0x0,%eax
  jmp    L194
L139:
  movslq %r12d,%rax
  lea    -0x5(%rax,%rax,4),%rbp
  add    %r13,%rbp
  mov    %r14,%rbx
  lea    -0x1(%r12),%eax
  lea    (%rax,%rax,4),%rax
  lea    0x5(%r14,%rax,1),%r12
  jmp    L197
L96:
  sub    $0x5,%rbp
  add    $0x5,%rbx
  cmp    %r12,%rbx
  je     L232
L197:
  mov    $0x5,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L96
  cmpb   $0x2a,(%rbx)
  jne    L156
  jmp    L96
L232:
  mov    (%rsp),%rax
  movl   $0x1,(%rax)
  mov    $0x1,%eax
  jmp    L194
```

assistant: ```c
int match_types(int n, int wildcard, char types1[][5], char types2[][5], int *backwards_ptr) {
  int k, match;
  if (wildcard == 0) {
    k = 0;
    match = 1;
    while (match && (k < n)) {
      if (strncmp(types1[k], types2[k], 5) == 0)
        k++;
      else
        match = 0;
    }
  } else {
    k = 0;
    match = 1;
    while (match && (k < n)) {
      if ((strncmp(types1[k], types2[k], 5) == 0) || (types2[k][0] == '*'))
        k++;
      else
        match = 0;
    }
  }
  if (match) {
    *backwards_ptr = 0;
    return 1;
  }
  if ((n < 2) || (*backwards_ptr == -1))
    return 0;
  if (wildcard == 0) {
    k = 0;
    match = 1;
    while (match && (k < n)) {
      if (strncmp(types1[n - k - 1], types2[k], 5) == 0)
        k++;
      else
        match = 0;
    }
  } else {
    k = 0;
    match = 1;
    while (match && (k < n)) {
      if ((strncmp(types1[n - k - 1], types2[k], 5) == 0) || (types2[k][0] == '*'))
        k++;
      else
        match = 0;
    }
  }
  if (match) {
    *backwards_ptr = 1;
    return 1;
  } else
    return 0;
}
```