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

```asm
<reg_match>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %esi,-0x8(%rbp)
  mov    %rdx,-0x10(%rbp)
  mov    %rcx,-0x18(%rbp)
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L176
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L122
L176:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L84
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L84
  mov    $0x1,%eax
  jmp    L45
L84:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L30
  addl   $0x1,-0x4(%rbp)
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%esi
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <reg_match>
  jmp    L45
L30:
  mov    $0x0,%eax
  jmp    L45
L122:
  addl   $0x1,-0x4(%rbp)
  addl   $0x1,-0x8(%rbp)
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3f,%al
  jne    L140
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%esi
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <reg_match>
  jmp    L45
L140:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L107
  jmp    L175
L130:
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%esi
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <reg_match>
  test   %eax,%eax
  je     L120
  mov    $0x1,%eax
  jmp    L45
L120:
  addl   $0x1,-0x8(%rbp)
L175:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L130
  mov    $0x0,%eax
  jmp    L45
L107:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x4(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L168
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%esi
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <reg_match>
  jmp    L45
L168:
  mov    -0x18(%rbp),%rcx
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%esi
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <reg_match>
L45:
  leave
  ret
```

assistant: ```c
int reg_match(int i, int j, char *r, char *s) {
  if (!r[i] || !s[j]) {
    if (!r[i] && !s[j])
      return 1;
    else if (r[i] == '*')
      return reg_match(++i, j, r, s);
    else
      return 0;
  }
  i++, j++;
  if (r[i] == '?')
    return reg_match(i, j, r, s);
  else if (r[i] == '*') {
    for (; s[j]; j++)
      if (reg_match(i, j, r, s))
        return 1;
    return 0;
  } else if (r[i] == s[i])
    return reg_match(i, j, r, s);
  else
    reg_match(i, j, r, s);
}
```