ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<_readv>:
  endbr64
  push   %r14
  mov    %edi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %rsi,%rbx
  test   %edx,%edx
  jle    L12
  lea    -0x1(%rdx),%edx
  mov    %rsi,%rax
  xor    %r12d,%r12d
  shl    $0x4,%rdx
  lea    0x10(%rsi,%rdx,1),%rdx
  xchg   %ax,%ax
L79:
  add    (%rax),%r12d
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L79
L63:
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L61
L21:
  mov    %r12d,%edx
  mov    %r13,%rsi
  mov    %r14d,%edi
  call   <read@plt>
  mov    %eax,%r12d
  cmp    $0xffffffff,%eax
  je     L9
L25:
  test   %ebp,%ebp
  jle    L15
  lea    -0x1(%rbp),%eax
  xor    %ebp,%ebp
  shl    $0x4,%rax
  lea    0x10(%rbx,%rax,1),%r14
  nopl   0x0(%rax)
L45:
  mov    0x8(%rbx),%edi
  mov    (%rbx),%rdx
  lea    0x0(%r13,%rbp,1),%rsi
  add    $0x10,%rbx
  call   <memcpy@plt>
  add    -0x10(%rbx),%rbp
  cmp    %rbx,%r14
  jne    L45
L15:
  mov    %r13,%rdi
  call   <free@plt>
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L9:
  lea    D15(%rip),%rdi
  call   <exitErr@plt>
  jmp    L25
  xchg   %ax,%ax
L61:
  lea    D12(%rip),%rdi
  call   <exitErr@plt>
  jmp    L21
  nopl   0x0(%rax)
L12:
  xor    %r12d,%r12d
  jmp    L63
```

tool_calls: name: unpack_data
arguments: tag: D15
type_guessed: string
name: unpack_data
arguments: tag: D12
type_guessed: string

tool: D15: read

tool: D12: malloc

assistant: ```c
ssize_t _readv(int fd, const struct iovec *iov, int iovcnt) {
  int i;
  size_t bytesCopied = 0;
  ssize_t bytesRead, bytesRequired = 0;
  void *buf;
  for (i = 0; i < iovcnt; ++i) {
    bytesRequired += iov[i].iov_len;
  }
  buf = malloc(bytesRequired);
  if (buf == NULL)
    exitErr("malloc");
  bytesRead = read(fd, buf, bytesRequired);
  if (bytesRead == -1)
    exitErr("read");
  for (i = 0; i < iovcnt; ++i) {
    memcpy(iov[i].iov_base, buf + bytesCopied, iov[i].iov_len);
    bytesCopied += iov[i].iov_len;
  }
  free(buf);
  return bytesRead;
}
```
user: Translate the below assembly code into C programming language:

```asm
<_readv>:
  endbr64
  push   %r14
  mov    %edi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %rsi,%rbx
  test   %edx,%edx
  jle    L42
  lea    -0x1(%rdx),%edx
  cmp    $0x3,%edx
  jbe    L129
  mov    %edx,%ecx
  mov    %rsi,%rax
  pxor   %xmm1,%xmm1
  shr    $0x2,%ecx
  sub    $0x1,%ecx
  shl    $0x6,%rcx
  lea    0x40(%rsi,%rcx,1),%rcx
L28:
  movdqu (%rax),%xmm0
  movdqu 0x10(%rax),%xmm3
  add    $0x40,%rax
  movdqu -0x20(%rax),%xmm2
  movdqu -0x10(%rax),%xmm4
  punpcklqdq %xmm3,%xmm0
  punpcklqdq %xmm4,%xmm2
  shufps $0x88,%xmm2,%xmm0
  paddd  %xmm0,%xmm1
  cmp    %rcx,%rax
  jne    L28
  movdqa %xmm1,%xmm0
  mov    %edx,%eax
  psrldq $0x8,%xmm0
  and    $0xfffffffc,%eax
  paddd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm1
  movd   %xmm1,%r12d
L59:
  movslq %eax,%rdx
  lea    0x1(%rax),%ecx
  shl    $0x4,%rdx
  add    (%rbx,%rdx,1),%r12d
  cmp    %ebp,%ecx
  jge    L79
  lea    0x2(%rax),%ecx
  add    0x10(%rbx,%rdx,1),%r12d
  cmp    %ecx,%ebp
  jle    L79
  add    $0x3,%eax
  add    0x20(%rbx,%rdx,1),%r12d
  cmp    %eax,%ebp
  jle    L79
  add    0x30(%rbx,%rdx,1),%r12d
L79:
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L37
L112:
  mov    %r12d,%edx
  mov    %r13,%rsi
  mov    %r14d,%edi
  call   <read@plt>
  mov    %eax,%r12d
  cmp    $0xffffffff,%eax
  je     L85
L16:
  test   %ebp,%ebp
  jle    L94
  lea    -0x1(%rbp),%eax
  xor    %ebp,%ebp
  shl    $0x4,%rax
  lea    0x10(%rbx,%rax,1),%r14
  nopl   0x0(%rax,%rax,1)
L57:
  mov    0x8(%rbx),%edi
  mov    (%rbx),%rdx
  lea    0x0(%r13,%rbp,1),%rsi
  add    $0x10,%rbx
  call   <memcpy@plt>
  add    -0x10(%rbx),%rbp
  cmp    %r14,%rbx
  jne    L57
L94:
  mov    %r13,%rdi
  call   <free@plt>
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L85:
  lea    D9(%rip),%rdi
  call   <exitErr@plt>
  jmp    L16
  cs nopw 0x0(%rax,%rax,1)
L37:
  lea    D5(%rip),%rdi
  call   <exitErr@plt>
  jmp    L112
  nopl   0x0(%rax)
L42:
  xor    %r12d,%r12d
  jmp    L79
L129:
  xor    %r12d,%r12d
  xor    %eax,%eax
  jmp    L59
```

tool_calls: name: retrieve_data
arguments: label: D9
datatype: string
name: retrieve_data
arguments: label: D5
datatype: string

tool: D9: read

tool: D5: malloc

assistant: ```c
ssize_t _readv(int fd, const struct iovec *iov, int iovcnt) {
  int i;
  size_t bytesCopied = 0;
  ssize_t bytesRead, bytesRequired = 0;
  void *buf;
  for (i = 0; i < iovcnt; ++i) {
    bytesRequired += iov[i].iov_len;
  }
  buf = malloc(bytesRequired);
  if (buf == NULL)
    exitErr("malloc");
  bytesRead = read(fd, buf, bytesRequired);
  if (bytesRead == -1)
    exitErr("read");
  for (i = 0; i < iovcnt; ++i) {
    memcpy(iov[i].iov_base, buf + bytesCopied, iov[i].iov_len);
    bytesCopied += iov[i].iov_len;
  }
  free(buf);
  return bytesRead;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<autohelperowl_attackpat148>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %ecx,-0x24(%rbp)
  mov    %r8d,-0x28(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  mov    %edx,%ecx
  mov    %eax,%edx
  mov    $0xffffffff,%esi
  mov    $0xfffffffe,%edi
  call   <offset@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  mov    %edx,%ecx
  mov    %eax,%edx
  mov    $0x0,%esi
  mov    $0xffffffff,%edi
  call   <offset@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  mov    %edx,%ecx
  mov    %eax,%edx
  mov    $0x0,%esi
  mov    $0xfffffffe,%edi
  call   <offset@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  mov    %edx,%ecx
  mov    %eax,%edx
  mov    $0x1,%esi
  mov    $0xffffffff,%edi
  call   <offset@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <countlib@plt>
  cmp    $0x3,%eax
  jg     L14
  mov    -0x8(%rbp),%edx
  mov    -0x10(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <owl_proper_eye@plt>
  test   %rax,%rax
  je     L14
  mov    -0x8(%rbp),%edx
  mov    -0xc(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <owl_proper_eye@plt>
  test   %rax,%rax
  je     L14
  mov    $0x1,%eax
  jmp    L20
L14:
  mov    $0x0,%eax
L20:
  leave
  ret
```

assistant: ```c
int autohelperowl_attackpat148(struct pattern *patt, int transformation, int move, int color, int action) {
  int a, b, C, D;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(-2, -1, move, transformation);
  b = offset(-1, 0, move, transformation);
  C = offset(-2, 0, move, transformation);
  D = offset(-1, 1, move, transformation);
  return countlib(D) <= 3 && owl_proper_eye(a, C) && owl_proper_eye(b, C);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<autohelperowl_attackpat148>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebp
  mov    %edx,%ebx
  mov    %esi,%ecx
  mov    $0xffffffff,%esi
  mov    $0xfffffffe,%edi
  call   <offset@plt>
  mov    %eax,%r13d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  mov    $0x0,%esi
  mov    $0xffffffff,%edi
  call   <offset@plt>
  mov    %eax,%r14d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  mov    $0x0,%esi
  mov    $0xfffffffe,%edi
  call   <offset@plt>
  mov    %eax,%r12d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  mov    $0x1,%esi
  mov    $0xffffffff,%edi
  call   <offset@plt>
  mov    %eax,%edi
  call   <countlib@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  cmp    $0x3,%edx
  jle    L29
L1:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L29:
  mov    %r12d,%esi
  mov    %r13d,%edi
  call   <owl_proper_eye@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L1
  mov    %r12d,%esi
  mov    %r14d,%edi
  call   <owl_proper_eye@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  jmp    L1
```

assistant: ```c
int autohelperowl_attackpat148(struct pattern *patt, int transformation, int move, int color, int action) {
  int a, b, C, D;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(-2, -1, move, transformation);
  b = offset(-1, 0, move, transformation);
  C = offset(-2, 0, move, transformation);
  D = offset(-1, 1, move, transformation);
  return countlib(D) <= 3 && owl_proper_eye(a, C) && owl_proper_eye(b, C);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<autohelperowl_attackpat148>:
  endbr64
  push   %r15
  mov    %esi,%ecx
  mov    $0xfffffffe,%edi
  push   %r14
  push   %r13
  mov    %esi,%r13d
  mov    $0xffffffff,%esi
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  call   <offset@plt>
  xor    %esi,%esi
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    $0xffffffff,%edi
  mov    %eax,%r14d
  call   <offset@plt>
  xor    %esi,%esi
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    $0xfffffffe,%edi
  mov    %eax,%r15d
  call   <offset@plt>
  mov    $0xffffffff,%edi
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    $0x1,%esi
  mov    %eax,%ebp
  call   <offset@plt>
  mov    %eax,%edi
  call   <countlib@plt>
  cmp    $0x3,%eax
  jle    L13
L7:
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L13:
  mov    %ebp,%esi
  mov    %r14d,%edi
  call   <owl_proper_eye@plt>
  test   %rax,%rax
  je     L7
  mov    %ebp,%esi
  mov    %r15d,%edi
  call   <owl_proper_eye@plt>
  pop    %rbp
  pop    %r12
  test   %rax,%rax
  pop    %r13
  pop    %r14
  setne  %al
  pop    %r15
  movzbl %al,%eax
  ret
```

assistant: ```c
int autohelperowl_attackpat148(struct pattern *patt, int transformation, int move, int color, int action) {
  int a, b, C, D;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(-2, -1, move, transformation);
  b = offset(-1, 0, move, transformation);
  C = offset(-2, 0, move, transformation);
  D = offset(-1, 1, move, transformation);
  return countlib(D) <= 3 && owl_proper_eye(a, C) && owl_proper_eye(b, C);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<autohelperowl_attackpat148>:
  endbr64
  push   %r15
  mov    %esi,%ecx
  mov    $0xfffffffe,%edi
  push   %r14
  push   %r13
  mov    %esi,%r13d
  mov    $0xffffffff,%esi
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  call   <offset@plt>
  xor    %esi,%esi
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    $0xffffffff,%edi
  mov    %eax,%r14d
  call   <offset@plt>
  xor    %esi,%esi
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    $0xfffffffe,%edi
  mov    %eax,%r15d
  call   <offset@plt>
  mov    $0xffffffff,%edi
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    $0x1,%esi
  mov    %eax,%ebp
  call   <offset@plt>
  mov    %eax,%edi
  call   <countlib@plt>
  cmp    $0x3,%eax
  jle    L14
L17:
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L14:
  mov    %ebp,%esi
  mov    %r14d,%edi
  call   <owl_proper_eye@plt>
  test   %rax,%rax
  je     L17
  mov    %ebp,%esi
  mov    %r15d,%edi
  call   <owl_proper_eye@plt>
  pop    %rbp
  pop    %r12
  test   %rax,%rax
  pop    %r13
  pop    %r14
  setne  %al
  pop    %r15
  movzbl %al,%eax
  ret
```

assistant: ```c
int autohelperowl_attackpat148(struct pattern *patt, int transformation, int move, int color, int action) {
  int a, b, C, D;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(-2, -1, move, transformation);
  b = offset(-1, 0, move, transformation);
  C = offset(-2, 0, move, transformation);
  D = offset(-1, 1, move, transformation);
  return countlib(D) <= 3 && owl_proper_eye(a, C) && owl_proper_eye(b, C);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<linsched_init_rand>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    $0x4,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  xor    $0x75bcd15,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
int *linsched_init_rand(const unsigned int seed) {
  unsigned int *state = malloc(sizeof(unsigned int));
  *state = seed ^ 123456789;
  return state;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<linsched_init_rand>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  mov    $0x4,%edi
  call   <malloc@plt>
  xor    $0x75bcd15,%ebx
  mov    %ebx,(%rax)
  pop    %rbx
  ret
```

assistant: ```c
int *linsched_init_rand(const unsigned int seed) {
  unsigned int *state = malloc(sizeof(unsigned int));
  *state = seed ^ 123456789;
  return state;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<linsched_init_rand>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  mov    $0x4,%edi
  xor    $0x75bcd15,%ebx
  call   <malloc@plt>
  mov    %ebx,(%rax)
  pop    %rbx
  ret
```

assistant: ```c
int *linsched_init_rand(const unsigned int seed) {
  unsigned int *state = malloc(sizeof(unsigned int));
  *state = seed ^ 123456789;
  return state;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<linsched_init_rand>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  mov    $0x4,%edi
  xor    $0x75bcd15,%ebx
  call   <malloc@plt>
  mov    %ebx,(%rax)
  pop    %rbx
  ret
```

assistant: ```c
int *linsched_init_rand(const unsigned int seed) {
  unsigned int *state = malloc(sizeof(unsigned int));
  *state = seed ^ 123456789;
  return state;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<get_index>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movq   $0x1505,-0x8(%rbp)
  jmp    L0
L6:
  mov    -0x8(%rbp),%rax
  shl    $0x5,%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbq %al,%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
L0:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  test   %al,%al
  jne    L6
  mov    -0x20(%rbp),%rax
  sub    $0x1,%rax
  and    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
unsigned long get_index(char const *key, size_t size) {
  unsigned long hash = 5381;
  while (*key++) {
    hash = ((hash << 5) + hash) + *key;
  }
  return hash & (size - 1);
}
```
user: What is the c source code of the assembly code below:

```asm
<get_index>:
  endbr64
  mov    %rsi,%rax
  lea    0x1(%rdi),%rcx
  cmpb   $0x0,(%rdi)
  je     L29
  mov    $0x1505,%edx
L13:
  mov    %rdx,%rdi
  shl    $0x5,%rdi
  add    %rdi,%rdx
  movzbl (%rcx),%edi
  movsbq %dil,%r8
  add    %r8,%rdx
  add    $0x1,%rcx
  test   %dil,%dil
  jne    L13
L10:
  sub    $0x1,%rax
  and    %rdx,%rax
  ret
L29:
  mov    $0x1505,%edx
  jmp    L10
```

assistant: ```c
unsigned long get_index(char const *key, size_t size) {
  unsigned long hash = 5381;
  while (*key++) {
    hash = ((hash << 5) + hash) + *key;
  }
  return hash & (size - 1);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<get_index>:
  endbr64
  cmpb   $0x0,(%rdi)
  mov    %rsi,%rax
  lea    0x1(%rdi),%rcx
  mov    $0x1505,%edx
  je     L19
  nopl   (%rax)
L5:
  mov    %rdx,%rdi
  movsbq (%rcx),%r8
  add    $0x1,%rcx
  shl    $0x5,%rdi
  add    %rdi,%rdx
  add    %r8,%rdx
  test   %r8b,%r8b
  jne    L5
L19:
  sub    $0x1,%rax
  and    %rdx,%rax
  ret
```

assistant: ```c
unsigned long get_index(char const *key, size_t size) {
  unsigned long hash = 5381;
  while (*key++) {
    hash = ((hash << 5) + hash) + *key;
  }
  return hash & (size - 1);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<get_index>:
  endbr64
  cmpb   $0x0,(%rdi)
  mov    %rsi,%rax
  lea    0x1(%rdi),%rcx
  mov    $0x1505,%edx
  je     L19
  nopl   (%rax)
L9:
  mov    %rdx,%rdi
  movsbq (%rcx),%r8
  add    $0x1,%rcx
  shl    $0x5,%rdi
  add    %rdi,%rdx
  add    %r8,%rdx
  test   %r8b,%r8b
  jne    L9
L19:
  sub    $0x1,%rax
  and    %rdx,%rax
  ret
```

assistant: ```c
unsigned long get_index(char const *key, size_t size) {
  unsigned long hash = 5381;
  while (*key++) {
    hash = ((hash << 5) + hash) + *key;
  }
  return hash & (size - 1);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<Gmatch>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    $0x7fff,%r9d
L310:
  movzbl 0x0(%rbp),%ecx
  mov    %ecx,%r8d
  and    $0x7f,%r8d
  mov    %ecx,%eax
  and    $0x7f,%eax
  lea    0x1(%rsi),%rbx
  movzbl (%rsi),%edx
  cmp    $0x3f,%dl
  je     L20
  jg     L217
  test   %dl,%dl
  je     L103
  cmp    $0x2a,%dl
  jne    L227
  mov    $0x1,%eax
  cmpb   $0x0,0x1(%rsi)
  je     L80
  test   %cl,%cl
  je     L52
L299:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <Gmatch>
  test   %eax,%eax
  jne    L151
  add    $0x1,%rbp
  cmpb   $0x0,0x0(%rbp)
  jne    L299
  jmp    L80
L217:
  cmp    $0x5b,%dl
  jne    L227
  lea    0x2(%rsi),%rcx
  movsbl 0x1(%rsi),%edx
  test   %edx,%edx
  je     L209
  mov    %r9d,%esi
  mov    $0x0,%edi
  jmp    L168
L25:
  test   %edi,%edi
  je     L106
  mov    %rcx,%rbx
  jmp    L185
L106:
  mov    %edi,%eax
  jmp    L80
L181:
  cmp    %esi,%eax
  jl     L120
  lea    0x2(%rbx),%rdx
  cmp    %r8b,0x1(%rbx)
  jl     L291
  add    $0x1,%edi
  mov    %rdx,%rbx
  jmp    L64
L120:
  mov    %rcx,%rbx
L64:
  lea    0x1(%rbx),%rcx
  movsbl (%rbx),%edx
  test   %edx,%edx
  je     L263
L168:
  cmp    $0x5d,%edx
  je     L25
  cmp    $0x2d,%edx
  je     L181
  mov    %edx,%esi
  mov    %rcx,%rbx
  cmp    %edx,%eax
  jne    L64
  add    $0x1,%edi
  jmp    L64
L291:
  mov    %rdx,%rbx
  jmp    L64
L103:
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
L80:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L227:
  and    $0x7f,%edx
  cmp    %dl,%r8b
  je     L185
  mov    $0x0,%eax
  jmp    L80
L20:
  test   %eax,%eax
  je     L80
L185:
  add    $0x1,%rbp
  mov    %rbx,%rsi
  jmp    L310
L209:
  mov    %edx,%eax
  jmp    L80
L52:
  mov    $0x0,%eax
  jmp    L80
L151:
  mov    $0x1,%eax
  jmp    L80
L263:
  test   %edi,%edi
  jne    L185
  mov    %edi,%eax
  jmp    L80
```

assistant: ```c
int Gmatch(register char *s, register char *p) {
  register int scc;
  int ok, lc;
  int c, cc;
  for (;;) {
    scc = *s++ & 0177;
    switch (c = *p++) {
    case '[':
      ok = 0;
      lc = 077777;
      while ((cc = *p++) != '\0') {
        if (cc == ']') {
          if (ok)
            break;
          return (0);
        }
        if (cc == '-') {
          if (lc <= scc && scc <= *p++)
            ok++;
        } else if (scc == (lc = cc))
          ok++;
      }
      if (cc == 0) {
        if (ok)
          p--;
        else
          return 0;
      }
      continue;
    case '*':
      if (!*p)
        return (1);
      for (s--; *s; s++)
        if (Gmatch(s, p))
          return (1);
      return (0);
    case 0:
      return (scc == 0);
    default:
      if ((c & 0177) != scc)
        return (0);
      continue;
    case '?':
      if (scc == 0)
        return (0);
      continue;
    }
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<Gmatch>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
L121:
  movzbl 0x0(%rbp),%edx
  movzbl (%rsi),%eax
  lea    0x1(%rsi),%rbx
  mov    %edx,%r9d
  mov    %edx,%edi
  and    $0x7f,%r9d
  and    $0x7f,%edi
  cmp    $0x3f,%al
  je     L266
  jg     L111
  test   %al,%al
  je     L159
  cmp    $0x2a,%al
  jne    L70
  cmpb   $0x0,0x1(%rsi)
  mov    $0x1,%eax
  je     L229
  test   %dl,%dl
  je     L181
L172:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <Gmatch>
  test   %eax,%eax
  jne    L269
  add    $0x1,%rbp
  cmpb   $0x0,0x0(%rbp)
  jne    L172
L229:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   (%rax)
L111:
  cmp    $0x5b,%al
  jne    L70
  movsbl 0x1(%rsi),%edx
  lea    0x2(%rsi),%r8
  test   %edx,%edx
  je     L181
  mov    $0x7fff,%ecx
  xor    %eax,%eax
  jmp    L264
  nopl   0x0(%rax)
L18:
  mov    %edx,%ecx
  xor    %edx,%edx
  mov    %r8,%rbx
  cmp    %ecx,%edi
  sete   %dl
  add    %edx,%eax
L148:
  movsbl (%rbx),%edx
  lea    0x1(%rbx),%r8
  test   %edx,%edx
  je     L246
L264:
  cmp    $0x5d,%edx
  je     L8
  cmp    $0x2d,%edx
  jne    L18
  cmp    %ecx,%edi
  jl     L69
  lea    0x2(%rbx),%rdx
  cmp    %r9b,0x1(%rbx)
  jl     L100
  mov    %rdx,%rbx
  add    $0x1,%eax
  movsbl (%rbx),%edx
  lea    0x1(%rbx),%r8
  test   %edx,%edx
  jne    L264
  xchg   %ax,%ax
L246:
  test   %eax,%eax
  je     L229
L2:
  add    $0x1,%rbp
  mov    %rbx,%rsi
  jmp    L121
L70:
  and    $0x7f,%eax
  cmp    %al,%r9b
  je     L2
L181:
  xor    %eax,%eax
L202:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L69:
  mov    %r8,%rbx
  jmp    L148
  nopl   (%rax)
L159:
  xor    %eax,%eax
  test   %edi,%edi
  sete   %al
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  xchg   %ax,%ax
L266:
  test   %r9b,%r9b
  jne    L2
  xor    %eax,%eax
  jmp    L202
  nopl   0x0(%rax)
L100:
  mov    %rdx,%rbx
  jmp    L148
  nopl   0x0(%rax,%rax,1)
L8:
  test   %eax,%eax
  je     L229
  mov    %r8,%rbx
  add    $0x1,%rbp
  mov    %rbx,%rsi
  jmp    L121
  nopw   0x0(%rax,%rax,1)
L269:
  mov    $0x1,%eax
  jmp    L229
```

assistant: ```c
int Gmatch(register char *s, register char *p) {
  register int scc;
  int ok, lc;
  int c, cc;
  for (;;) {
    scc = *s++ & 0177;
    switch (c = *p++) {
    case '[':
      ok = 0;
      lc = 077777;
      while ((cc = *p++) != '\0') {
        if (cc == ']') {
          if (ok)
            break;
          return (0);
        }
        if (cc == '-') {
          if (lc <= scc && scc <= *p++)
            ok++;
        } else if (scc == (lc = cc))
          ok++;
      }
      if (cc == 0) {
        if (ok)
          p--;
        else
          return 0;
      }
      continue;
    case '*':
      if (!*p)
        return (1);
      for (s--; *s; s++)
        if (Gmatch(s, p))
          return (1);
      return (0);
    case 0:
      return (scc == 0);
    default:
      if ((c & 0177) != scc)
        return (0);
      continue;
    case '?':
      if (scc == 0)
        return (0);
      continue;
    }
  }
}
```