ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Translate the below assembly code into C programming language:

```asm
<__hash_function_int>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  movl   $0x27d4eb2d,-0x4(%rbp)
  mov    -0x14(%rbp),%eax
  xor    $0x3d,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  sar    $0x10,%eax
  xor    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  shl    $0x3,%eax
  add    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  sar    $0x4,%eax
  xor    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  sar    $0xf,%eax
  xor    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
uint32_t __hash_function_int(uint32_t key) {
  uint32_t c2 = 0x27d4eb2d;
  key = (key ^ 61) ^ (key >> 16);
  key = key + (key << 3);
  key = key ^ (key >> 4);
  key = key * c2;
  key = key ^ (key >> 15);
  return key;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<__hash_function_int>:
  endbr64
  mov    %edi,%eax
  sar    $0x10,%eax
  xor    %edi,%eax
  xor    $0x3d,%eax
  lea    (%rax,%rax,8),%eax
  mov    %eax,%edx
  sar    $0x4,%edx
  xor    %eax,%edx
  imul   $0x27d4eb2d,%edx,%edx
  mov    %edx,%eax
  sar    $0xf,%eax
  xor    %edx,%eax
  ret
```

assistant: ```c
uint32_t __hash_function_int(uint32_t key) {
  uint32_t c2 = 0x27d4eb2d;
  key = (key ^ 61) ^ (key >> 16);
  key = key + (key << 3);
  key = key ^ (key >> 4);
  key = key * c2;
  key = key ^ (key >> 15);
  return key;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<__hash_function_int>:
  endbr64
  mov    %edi,%eax
  sar    $0x10,%eax
  xor    %edi,%eax
  xor    $0x3d,%eax
  lea    (%rax,%rax,8),%eax
  mov    %eax,%edx
  sar    $0x4,%edx
  xor    %eax,%edx
  imul   $0x27d4eb2d,%edx,%edx
  mov    %edx,%eax
  sar    $0xf,%eax
  xor    %edx,%eax
  ret
```

assistant: ```c
uint32_t __hash_function_int(uint32_t key) {
  uint32_t c2 = 0x27d4eb2d;
  key = (key ^ 61) ^ (key >> 16);
  key = key + (key << 3);
  key = key ^ (key >> 4);
  key = key * c2;
  key = key ^ (key >> 15);
  return key;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    $0x3,%esi
  mov    $0x2,%edi
  call   <add@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x10(%rbp)
  mov    $0x3,%esi
  mov    $0x4,%edi
  call   <sub@plt>
  movd   %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  mov    $0xa,%esi
  mov    $0x3,%edi
  call   <mul@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x8(%rbp)
  mov    $0x2,%esi
  mov    $0x6,%edi
  call   <div@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x4(%rbp)
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
int main() {
  float x = add(2, 3);
  float y = sub(4, 3);
  float z = mul(3, 10);
  float v = div(6, 2);
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x3,%esi
  mov    $0x2,%edi
  call   <add@plt>
  mov    $0x3,%esi
  mov    $0x4,%edi
  call   <sub@plt>
  mov    $0xa,%esi
  mov    $0x3,%edi
  call   <mul@plt>
  mov    $0x2,%esi
  mov    $0x6,%edi
  call   <div@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main() {
  float x = add(2, 3);
  float y = sub(4, 3);
  float z = mul(3, 10);
  float v = div(6, 2);
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x3,%esi
  mov    $0x2,%edi
  call   <add@plt>
  mov    $0x3,%esi
  mov    $0x4,%edi
  call   <sub@plt>
  mov    $0xa,%esi
  mov    $0x3,%edi
  call   <mul@plt>
  mov    $0x2,%esi
  mov    $0x6,%edi
  call   <div@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
int main() {
  float x = add(2, 3);
  float y = sub(4, 3);
  float z = mul(3, 10);
  float v = div(6, 2);
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<f>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

assistant: ```c
int *f(int **p) {
  int *ptrarray[10];
  return *p;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<f>:
  endbr64
  mov    (%rdi),%rax
  ret
```

assistant: ```c
int *f(int **p) {
  int *ptrarray[10];
  return *p;
}
```
user: Translate the below assembly code into C programming language:

```asm
<f>:
  endbr64
  mov    (%rdi),%rax
  ret
```

assistant: ```c
int *f(int **p) {
  int *ptrarray[10];
  return *p;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<matchoption>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  jmp    L16
L29:
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x30(%rbp)
L16:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    %eax,%ebx
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    %eax,%edx
  mov    %ebx,%eax
  sub    %edx,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jne    L11
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L29
L11:
  cmpl   $0x0,-0x14(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int matchoption(char *s, char *t) {
  int d;
  while (((d = toupper(*s) - toupper(*t)) == 0) && (*s != '\0')) {
    s++;
    t++;
  }
  return (d == 0);
}
```
user: Translate the below assembly code into C programming language:

```asm
<matchoption>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %rsi,%r12
  jmp    L10
L12:
  add    $0x1,%rbp
  add    $0x1,%r12
L10:
  movsbl 0x0(%rbp),%edi
  call   <toupper@plt>
  mov    %eax,%ebx
  movsbl (%r12),%edi
  call   <toupper@plt>
  sub    %eax,%ebx
  jne    L13
  cmpb   $0x0,0x0(%rbp)
  jne    L12
L13:
  test   %ebx,%ebx
  sete   %al
  movzbl %al,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int matchoption(char *s, char *t) {
  int d;
  while (((d = toupper(*s) - toupper(*t)) == 0) && (*s != '\0')) {
    s++;
    t++;
  }
  return (d == 0);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<matchoption>:
  endbr64
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  jmp    L3
L19:
  cmpb   $0x0,(%rbx)
  je     L8
  add    $0x1,%rbx
  add    $0x1,%r12
L3:
  movsbl (%rbx),%edi
  call   <toupper@plt>
  movsbl (%r12),%edi
  mov    %eax,%ebp
  call   <toupper@plt>
  cmp    %eax,%ebp
  je     L19
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L8:
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int matchoption(char *s, char *t) {
  int d;
  while (((d = toupper(*s) - toupper(*t)) == 0) && (*s != '\0')) {
    s++;
    t++;
  }
  return (d == 0);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<matchoption>:
  endbr64
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  jmp    L0
L4:
  cmpb   $0x0,(%rbx)
  je     L25
  add    $0x1,%rbx
  add    $0x1,%r12
L0:
  movsbl (%rbx),%edi
  call   <toupper@plt>
  movsbl (%r12),%edi
  mov    %eax,%ebp
  call   <toupper@plt>
  cmp    %eax,%ebp
  je     L4
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L25:
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int matchoption(char *s, char *t) {
  int d;
  while (((d = toupper(*s) - toupper(*t)) == 0) && (*s != '\0')) {
    s++;
    t++;
  }
  return (d == 0);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<read_uint6>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xc(%rbp)
  mov    -0x18(%rbp),%rcx
  lea    -0xc(%rbp),%rax
  mov    $0x6,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0xc(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L8
  call   <__stack_chk_fail@plt>
L8:
  leave
  ret
```

assistant: ```c
uint64_t read_uint6(const char *buf) {
  uint64_t tmp = 0;
  memcpy(&tmp, buf, 6);
  return tmp;
}
```
user: What is the c source code of the assembly code below?

```asm
<read_uint6>:
  endbr64
  sub    $0x18,%rsp
  mov    %rdi,%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x4(%rsp)
  lea    0x4(%rsp),%rdi
  mov    $0x6,%edx
  call   <memcpy@plt>
  mov    0x4(%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L7
  add    $0x18,%rsp
  ret
L7:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
uint64_t read_uint6(const char *buf) {
  uint64_t tmp = 0;
  memcpy(&tmp, buf, 6);
  return tmp;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<read_uint6>:
  endbr64
  sub    $0x18,%rsp
  mov    %rdi,%rsi
  mov    $0x6,%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rdi
  movl   $0x0,0x4(%rsp)
  call   <memcpy@plt>
  mov    0x4(%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L7
  add    $0x18,%rsp
  ret
L7:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
uint64_t read_uint6(const char *buf) {
  uint64_t tmp = 0;
  memcpy(&tmp, buf, 6);
  return tmp;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<read_uint6>:
  endbr64
  sub    $0x18,%rsp
  mov    %rdi,%rsi
  mov    $0x6,%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rdi
  movl   $0x0,0x4(%rsp)
  call   <memcpy@plt>
  mov    0x4(%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L0
  add    $0x18,%rsp
  ret
L0:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
uint64_t read_uint6(const char *buf) {
  uint64_t tmp = 0;
  memcpy(&tmp, buf, 6);
  return tmp;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<run_test>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <info@plt>
  mov    -0x10(%rbp),%rax
  call   *%rax
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D5
type: string

tool: D5: Running %s

assistant: ```c
void run_test(const char *test_desc, void (*test_func)(void)) {
  info("Running %s", test_desc);
  test_func();
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<run_test>:
  endbr64
  push   %rbx
  mov    %rsi,%rbx
  mov    %rdi,%rsi
  lea    D8(%rip),%rdi
  call   <info@plt>
  call   *%rbx
  pop    %rbx
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D8
type: string

tool: D8: Running %s

assistant: ```c
void run_test(const char *test_desc, void (*test_func)(void)) {
  info("Running %s", test_desc);
  test_func();
}
```
user: What is the c source code of the assembly code below:

```asm
<run_test>:
  endbr64
  push   %rbx
  mov    %rsi,%rbx
  mov    %rdi,%rsi
  lea    D8(%rip),%rdi
  call   <info@plt>
  mov    %rbx,%rax
  pop    %rbx
  jmp    *%rax
```

tool_calls: name: parse_data
arguments: tag: D8
type_guessed: string

tool: D8: Running %s

assistant: ```c
void run_test(const char *test_desc, void (*test_func)(void)) {
  info("Running %s", test_desc);
  test_func();
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<run_test>:
  endbr64
  push   %rbx
  mov    %rsi,%rbx
  mov    %rdi,%rsi
  lea    D0(%rip),%rdi
  call   <info@plt>
  mov    %rbx,%rax
  pop    %rbx
  jmp    *%rax
```

tool_calls: name: unpack_data
arguments: tag: D0
data_type: string

tool: D0: Running %s

assistant: ```c
void run_test(const char *test_desc, void (*test_func)(void)) {
  info("Running %s", test_desc);
  test_func();
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<srSLMGParseInt32>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L8
L4:
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %edx,%eax
  sub    $0x30,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
L8:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L4
  mov    -0x4(%rbp),%eax
  leave
  ret
```

assistant: ```c
int srSLMGParseInt32(char **ppsz) {
  int i;
  i = 0;
  while (isdigit((int)**ppsz)) {
    i = i * 10 + **ppsz - '0';
    ++(*ppsz);
  }
  return i;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<srSLMGParseInt32>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    $0x0,%ebp
  jmp    L15
L17:
  mov    (%rbx),%rax
  lea    0x0(%rbp,%rbp,4),%ecx
  movsbl (%rax),%edx
  lea    -0x30(%rdx,%rcx,2),%ebp
  add    $0x1,%rax
  mov    %rax,(%rbx)
L15:
  mov    (%rbx),%rax
  movsbl (%rax),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L17
  mov    %ebp,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
int srSLMGParseInt32(char **ppsz) {
  int i;
  i = 0;
  while (isdigit((int)**ppsz)) {
    i = i * 10 + **ppsz - '0';
    ++(*ppsz);
  }
  return i;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<srSLMGParseInt32>:
  endbr64
  push   %r12
  xor    %r12d,%r12d
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  mov    (%rdi),%rax
  jmp    L0
  cs nopw 0x0(%rax,%rax,1)
L15:
  mov    (%rbx),%rax
  lea    (%r12,%r12,4),%ecx
  movsbl (%rax),%edx
  add    $0x1,%rax
  mov    %rax,(%rbx)
  lea    -0x30(%rdx,%rcx,2),%r12d
L0:
  movsbl (%rax),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L15
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %r12
  ret
```

assistant: ```c
int srSLMGParseInt32(char **ppsz) {
  int i;
  i = 0;
  while (isdigit((int)**ppsz)) {
    i = i * 10 + **ppsz - '0';
    ++(*ppsz);
  }
  return i;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<srSLMGParseInt32>:
  endbr64
  push   %r12
  xor    %r12d,%r12d
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  mov    (%rdi),%rax
  jmp    L9
  cs nopw 0x0(%rax,%rax,1)
L18:
  mov    (%rbx),%rax
  lea    (%r12,%r12,4),%ecx
  movsbl (%rax),%edx
  add    $0x1,%rax
  mov    %rax,(%rbx)
  lea    -0x30(%rdx,%rcx,2),%r12d
L9:
  movsbl (%rax),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L18
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %r12
  ret
```

assistant: ```c
int srSLMGParseInt32(char **ppsz) {
  int i;
  i = 0;
  while (isdigit((int)**ppsz)) {
    i = i * 10 + **ppsz - '0';
    ++(*ppsz);
  }
  return i;
}
```
user: Translate the below assembly code into C programming language:

```asm
<xml_ishexadecimal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,%eax
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    %al,-0x4(%rbp)
  cmpb   $0x2f,-0x4(%rbp)
  jg     L29
  mov    $0x0,%eax
  jmp    L98
L29:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L93
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  shl    $0x4,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L171
L93:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
L171:
  cmpb   $0x39,-0x4(%rbp)
  jg     L51
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  movsbl -0x4(%rbp),%eax
  add    %edx,%eax
  lea    -0x30(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x1,%eax
  jmp    L98
L51:
  cmpb   $0x40,-0x4(%rbp)
  jg     L17
  mov    $0x0,%eax
  jmp    L98
L17:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L188
  cmpb   $0x46,-0x4(%rbp)
  jg     L188
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  movsbl -0x4(%rbp),%eax
  add    %edx,%eax
  lea    -0x37(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x1,%eax
  jmp    L98
L188:
  cmpb   $0x58,-0x4(%rbp)
  jne    L234
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  je     L234
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L234
  mov    -0x10(%rbp),%rax
  movl   $0x1,(%rax)
  mov    $0x1,%eax
  jmp    L98
L234:
  cmpb   $0x60,-0x4(%rbp)
  jg     L208
  mov    $0x0,%eax
  jmp    L98
L208:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L126
  cmpb   $0x66,-0x4(%rbp)
  jg     L126
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  movsbl -0x4(%rbp),%eax
  add    %edx,%eax
  lea    -0x57(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x1,%eax
  jmp    L98
L126:
  cmpb   $0x78,-0x4(%rbp)
  jne    L207
  mov    -0x10(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  je     L207
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L207
  mov    -0x10(%rbp),%rax
  movl   $0x1,(%rax)
  mov    $0x1,%eax
  jmp    L98
L207:
  mov    $0x0,%eax
L98:
  pop    %rbp
  ret
```

assistant: ```c
int xml_ishexadecimal(char ch, int *hex, int *sum) {
  if (ch < '0')
    return 0;
  if (*hex)
    *sum = 16 * *sum;
  else
    *sum = 10 * *sum;
  if (ch <= '9') {
    *sum = *sum + ch - 48;
    return 1;
  }
  if (ch < 'A')
    return 0;
  if ((*hex) && (ch <= 'F')) {
    *sum = *sum + ch - 55;
    return 1;
  }
  if ((ch == 'X') && (*hex != 1) && (*sum == 0)) {
    *hex = 1;
    return 1;
  }
  if (ch < 'a')
    return 0;
  if ((*hex) && (ch <= 'f')) {
    *sum = *sum + ch - 87;
    return 1;
  }
  if ((ch == 'x') && (*hex != 1) && (*sum == 0)) {
    *hex = 1;
    return 1;
  } else
    return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<xml_ishexadecimal>:
  endbr64
  mov    %rdx,%rax
  mov    $0x0,%edx
  cmp    $0x2f,%dil
  jle    L40
  cmpl   $0x0,(%rsi)
  je     L195
  mov    (%rax),%ecx
  shl    $0x4,%ecx
L48:
  mov    %ecx,(%rax)
  cmp    $0x39,%dil
  jle    L18
  mov    $0x0,%edx
  cmp    $0x40,%dil
  jle    L40
  mov    (%rsi),%edx
  test   %edx,%edx
  setne  %r8b
  cmp    $0x46,%dil
  jg     L122
  test   %r8b,%r8b
  jne    L184
L122:
  cmp    $0x1,%edx
  setne  %r9b
  cmp    $0x58,%dil
  jne    L128
  test   %r9b,%r9b
  jne    L3
L128:
  mov    $0x0,%edx
  cmp    $0x60,%dil
  jle    L40
  cmp    $0x66,%dil
  jg     L204
  test   %r8b,%r8b
  jne    L138
L204:
  cmp    $0x78,%dil
  jne    L64
  test   %r9b,%r9b
  je     L64
  mov    $0x0,%edx
  test   %ecx,%ecx
  jne    L40
  movl   $0x1,(%rsi)
  mov    $0x1,%edx
  jmp    L40
L195:
  mov    (%rax),%edx
  lea    (%rdx,%rdx,4),%ecx
  add    %ecx,%ecx
  jmp    L48
L18:
  movsbl %dil,%edi
  lea    -0x30(%rcx,%rdi,1),%edx
  mov    %edx,(%rax)
  mov    $0x1,%edx
L40:
  mov    %edx,%eax
  ret
L184:
  movsbl %dil,%edi
  lea    -0x37(%rcx,%rdi,1),%edx
  mov    %edx,(%rax)
  mov    $0x1,%edx
  jmp    L40
L3:
  mov    $0x0,%edx
  test   %ecx,%ecx
  jne    L40
  movl   $0x1,(%rsi)
  mov    $0x1,%edx
  jmp    L40
L138:
  movsbl %dil,%edi
  lea    -0x57(%rcx,%rdi,1),%edx
  mov    %edx,(%rax)
  mov    $0x1,%edx
  jmp    L40
L64:
  mov    $0x0,%edx
  jmp    L40
```

assistant: ```c
int xml_ishexadecimal(char ch, int *hex, int *sum) {
  if (ch < '0')
    return 0;
  if (*hex)
    *sum = 16 * *sum;
  else
    *sum = 10 * *sum;
  if (ch <= '9') {
    *sum = *sum + ch - 48;
    return 1;
  }
  if (ch < 'A')
    return 0;
  if ((*hex) && (ch <= 'F')) {
    *sum = *sum + ch - 55;
    return 1;
  }
  if ((ch == 'X') && (*hex != 1) && (*sum == 0)) {
    *hex = 1;
    return 1;
  }
  if (ch < 'a')
    return 0;
  if ((*hex) && (ch <= 'f')) {
    *sum = *sum + ch - 87;
    return 1;
  }
  if ((ch == 'x') && (*hex != 1) && (*sum == 0)) {
    *hex = 1;
    return 1;
  } else
    return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<xml_ishexadecimal>:
  endbr64
  cmp    $0x2f,%dil
  jle    L44
  mov    (%rsi),%ecx
  mov    (%rdx),%eax
  test   %ecx,%ecx
  jne    L24
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  mov    %eax,(%rdx)
  cmp    $0x39,%dil
  jle    L149
L97:
  cmp    $0x40,%dil
  jle    L44
  mov    (%rsi),%ecx
  test   %ecx,%ecx
  setne  %r8b
  cmp    $0x46,%dil
  jg     L49
  test   %r8b,%r8b
  jne    L98
L49:
  cmp    $0x1,%ecx
  setne  %cl
  cmp    $0x58,%dil
  jne    L25
  test   %cl,%cl
  jne    L61
L25:
  cmp    $0x60,%dil
  jle    L44
  cmp    $0x66,%dil
  jg     L53
  test   %r8b,%r8b
  jne    L52
L53:
  cmp    $0x78,%dil
  jne    L44
  test   %cl,%cl
  je     L44
L61:
  test   %eax,%eax
  je     L71
L44:
  xor    %eax,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L24:
  shl    $0x4,%eax
  mov    %eax,(%rdx)
  cmp    $0x39,%dil
  jg     L97
L149:
  movsbl %dil,%edi
  lea    -0x30(%rax,%rdi,1),%eax
  mov    %eax,(%rdx)
  mov    $0x1,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L98:
  movsbl %dil,%edi
  lea    -0x37(%rax,%rdi,1),%eax
  mov    %eax,(%rdx)
  mov    $0x1,%eax
  ret
L71:
  movl   $0x1,(%rsi)
  mov    $0x1,%eax
  ret
  nopl   0x0(%rax)
L52:
  movsbl %dil,%edi
  lea    -0x57(%rax,%rdi,1),%eax
  mov    %eax,(%rdx)
  mov    $0x1,%eax
  ret
```

assistant: ```c
int xml_ishexadecimal(char ch, int *hex, int *sum) {
  if (ch < '0')
    return 0;
  if (*hex)
    *sum = 16 * *sum;
  else
    *sum = 10 * *sum;
  if (ch <= '9') {
    *sum = *sum + ch - 48;
    return 1;
  }
  if (ch < 'A')
    return 0;
  if ((*hex) && (ch <= 'F')) {
    *sum = *sum + ch - 55;
    return 1;
  }
  if ((ch == 'X') && (*hex != 1) && (*sum == 0)) {
    *hex = 1;
    return 1;
  }
  if (ch < 'a')
    return 0;
  if ((*hex) && (ch <= 'f')) {
    *sum = *sum + ch - 87;
    return 1;
  }
  if ((ch == 'x') && (*hex != 1) && (*sum == 0)) {
    *hex = 1;
    return 1;
  } else
    return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<xml_ishexadecimal>:
  endbr64
  cmp    $0x2f,%dil
  jle    L75
  mov    (%rsi),%ecx
  mov    (%rdx),%eax
  test   %ecx,%ecx
  jne    L4
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  mov    %eax,(%rdx)
  cmp    $0x39,%dil
  jle    L110
L148:
  cmp    $0x40,%dil
  jle    L75
  mov    (%rsi),%ecx
  test   %ecx,%ecx
  setne  %r8b
  cmp    $0x46,%dil
  jg     L78
  test   %r8b,%r8b
  jne    L106
L78:
  cmp    $0x1,%ecx
  setne  %cl
  cmp    $0x58,%dil
  jne    L29
  test   %cl,%cl
  jne    L77
L29:
  cmp    $0x60,%dil
  jle    L75
  cmp    $0x66,%dil
  jg     L111
  test   %r8b,%r8b
  jne    L135
L111:
  cmp    $0x78,%dil
  jne    L75
  test   %cl,%cl
  je     L75
L77:
  test   %eax,%eax
  je     L27
L75:
  xor    %eax,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L4:
  shl    $0x4,%eax
  mov    %eax,(%rdx)
  cmp    $0x39,%dil
  jg     L148
L110:
  movsbl %dil,%edi
  lea    -0x30(%rax,%rdi,1),%eax
  mov    %eax,(%rdx)
  mov    $0x1,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L106:
  movsbl %dil,%edi
  lea    -0x37(%rax,%rdi,1),%eax
  mov    %eax,(%rdx)
  mov    $0x1,%eax
  ret
L27:
  movl   $0x1,(%rsi)
  mov    $0x1,%eax
  ret
  nopl   0x0(%rax)
L135:
  movsbl %dil,%edi
  lea    -0x57(%rax,%rdi,1),%eax
  mov    %eax,(%rdx)
  mov    $0x1,%eax
  ret
```

assistant: ```c
int xml_ishexadecimal(char ch, int *hex, int *sum) {
  if (ch < '0')
    return 0;
  if (*hex)
    *sum = 16 * *sum;
  else
    *sum = 10 * *sum;
  if (ch <= '9') {
    *sum = *sum + ch - 48;
    return 1;
  }
  if (ch < 'A')
    return 0;
  if ((*hex) && (ch <= 'F')) {
    *sum = *sum + ch - 55;
    return 1;
  }
  if ((ch == 'X') && (*hex != 1) && (*sum == 0)) {
    *hex = 1;
    return 1;
  }
  if (ch < 'a')
    return 0;
  if ((*hex) && (ch <= 'f')) {
    *sum = *sum + ch - 87;
    return 1;
  }
  if ((ch == 'x') && (*hex != 1) && (*sum == 0)) {
    *hex = 1;
    return 1;
  } else
    return 0;
}
```