ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Demonstrate the C code that generates the assembly output below:

```asm
<test_loop_messages>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x4d0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x4cc(%rbp)
  jmp    L9
L28:
  movss  -0x4cc(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  cltq
  movss  -0x4c0(%rbp,%rax,4),%xmm1
  movss  -0x4cc(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  cltq
  movss  -0x330(%rbp,%rax,4),%xmm0
  movss  -0x4cc(%rbp),%xmm2
  cvttss2si %xmm2,%eax
  addss  %xmm1,%xmm0
  cltq
  movss  %xmm0,-0x1a0(%rbp,%rax,4)
  movss  -0x4cc(%rbp),%xmm1
  movss  D2(%rip),%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x4cc(%rbp)
L9:
  movss  D1(%rip),%xmm0
  comiss -0x4cc(%rbp),%xmm0
  ja     L28
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x4c8(%rbp)
  jmp    L49
L11:
  movsd  -0x4c8(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  cltq
  movss  -0x4c0(%rbp,%rax,4),%xmm1
  movsd  -0x4c8(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  cltq
  movss  -0x330(%rbp,%rax,4),%xmm0
  movsd  -0x4c8(%rbp),%xmm2
  cvttsd2si %xmm2,%eax
  addss  %xmm1,%xmm0
  cltq
  movss  %xmm0,-0x1a0(%rbp,%rax,4)
  movsd  -0x4c8(%rbp),%xmm1
  movsd  D19(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x4c8(%rbp)
L49:
  movsd  D24(%rip),%xmm0
  comisd -0x4c8(%rbp),%xmm0
  ja     L11
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L16
  call   <__stack_chk_fail@plt>
L16:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D2
data_type: byte[4]
name: disassemble_data
arguments: label: D1
data_type: f32
name: disassemble_data
arguments: label: D19
data_type: f32[2]
name: disassemble_data
arguments: label: D24
data_type: f32[2]

tool: {"D2": [0x00,0x00,0x80,0x3f]}

tool: D1: 10

tool: {"D19": [0.0,1.875]}

tool: {"D24": [0.0,2.5625]}

assistant: ```c
void test_loop_messages() {
  float a[100], b[100], c[100];
#pragma omp target teams distribute parallel for simd
  for (float fi = 0; fi < 10.0; fi++) {
    c[(int)fi] = a[(int)fi] + b[(int)fi];
  }
#pragma omp target teams distribute parallel for simd
  for (double fi = 0; fi < 10.0; fi++) {
    c[(int)fi] = a[(int)fi] + b[(int)fi];
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<test_loop_messages>:
  endbr64
  ret
```

assistant: ```c
void test_loop_messages() {
  float a[100], b[100], c[100];
#pragma omp target teams distribute parallel for simd
  for (float fi = 0; fi < 10.0; fi++) {
    c[(int)fi] = a[(int)fi] + b[(int)fi];
  }
#pragma omp target teams distribute parallel for simd
  for (double fi = 0; fi < 10.0; fi++) {
    c[(int)fi] = a[(int)fi] + b[(int)fi];
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<test_loop_messages>:
  endbr64
  ret
```

assistant: ```c
void test_loop_messages() {
  float a[100], b[100], c[100];
#pragma omp target teams distribute parallel for simd
  for (float fi = 0; fi < 10.0; fi++) {
    c[(int)fi] = a[(int)fi] + b[(int)fi];
  }
#pragma omp target teams distribute parallel for simd
  for (double fi = 0; fi < 10.0; fi++) {
    c[(int)fi] = a[(int)fi] + b[(int)fi];
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<test_loop_messages>:
  endbr64
  ret
```

assistant: ```c
void test_loop_messages() {
  float a[100], b[100], c[100];
#pragma omp target teams distribute parallel for simd
  for (float fi = 0; fi < 10.0; fi++) {
    c[(int)fi] = a[(int)fi] + b[(int)fi];
  }
#pragma omp target teams distribute parallel for simd
  for (double fi = 0; fi < 10.0; fi++) {
    c[(int)fi] = a[(int)fi] + b[(int)fi];
  }
}
```
user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    D45(%rip),%rax
  mov    %rax,%rsi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D78(%rip),%rax
  mov    %rax,%rsi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D33(%rip),%rax
  mov    %rax,%rsi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D24(%rip),%rax
  mov    %rax,%rsi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D45
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D29
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D78
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D33
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D24
type_infered: string

tool: D45: Hello world!

tool: D29: %s


tool: D78: 100

tool: D33: while

tool: D24: return

assistant: ```c
int main() {
  printf("%s\n", "Hello world!");
  printf("%s\n", "100");
  printf("%s\n", "while");
  printf("%s\n", "return");
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbx
  lea    D10(%rip),%rsi
  lea    D5(%rip),%rbx
  mov    %rbx,%rdi
  call   <printf@plt>
  lea    D1(%rip),%rsi
  mov    %rbx,%rdi
  call   <printf@plt>
  lea    D43(%rip),%rsi
  mov    %rbx,%rdi
  call   <printf@plt>
  lea    D30(%rip),%rsi
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  pop    %rbx
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D10
datatype: string
name: parse_data
arguments: data_tag: D5
datatype: string
name: parse_data
arguments: data_tag: D1
datatype: string
name: parse_data
arguments: data_tag: D43
datatype: string
name: parse_data
arguments: data_tag: D30
datatype: string

tool: D10: Hello world!

tool: D5: %s


tool: D1: 100

tool: D43: while

tool: D30: return

assistant: ```c
int main() {
  printf("%s\n", "Hello world!");
  printf("%s\n", "100");
  printf("%s\n", "while");
  printf("%s\n", "return");
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D18(%rip),%rbp
  lea    D13(%rip),%rsi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D17(%rip),%rsi
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D49(%rip),%rsi
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D4(%rip),%rsi
  call   <printf@plt>
  xor    %eax,%eax
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: tag: D18
type_infered: string
name: parse_data
arguments: tag: D13
type_infered: string
name: parse_data
arguments: tag: D17
type_infered: string
name: parse_data
arguments: tag: D49
type_infered: string
name: parse_data
arguments: tag: D4
type_infered: string

tool: D18: %s


tool: D13: Hello world!

tool: D17: 100

tool: D49: while

tool: D4: return

assistant: ```c
int main() {
  printf("%s\n", "Hello world!");
  printf("%s\n", "100");
  printf("%s\n", "while");
  printf("%s\n", "return");
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D22(%rip),%rbp
  lea    D29(%rip),%rsi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D12(%rip),%rsi
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D43(%rip),%rsi
  call   <printf@plt>
  mov    %rbp,%rdi
  lea    D9(%rip),%rsi
  call   <printf@plt>
  xor    %eax,%eax
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D22
datatype: string
name: unpack_data
arguments: data_label: D29
datatype: string
name: unpack_data
arguments: data_label: D12
datatype: string
name: unpack_data
arguments: data_label: D43
datatype: string
name: unpack_data
arguments: data_label: D9
datatype: string

tool: D22: %s


tool: D29: Hello world!

tool: D12: 100

tool: D43: while

tool: D9: return

assistant: ```c
int main() {
  printf("%s\n", "Hello world!");
  printf("%s\n", "100");
  printf("%s\n", "while");
  printf("%s\n", "return");
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  movl   $0xa,-0x8(%rbp)
  movl   $0x2,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cltd
  idivl  -0x4(%rbp)
  pxor   %xmm2,%xmm2
  cvtsi2ss %eax,%xmm2
  movd   %xmm2,%eax
  movd   %eax,%xmm0
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x4(%rbp),%eax
  cltd
  idivl  -0x8(%rbp)
  pxor   %xmm3,%xmm3
  cvtsi2ss %eax,%xmm3
  movd   %xmm3,%eax
  movd   %eax,%xmm0
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x4(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x8(%rbp),%xmm1
  divss  %xmm1,%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D14
datatype: string
name: disassemble_data
arguments: data_label: D9
datatype: string

tool: D14: %d


tool: D9: %f


assistant: ```c
int main(int argc, char **argv) {
  int a = 10;
  int b = 2;
  printf("%d\n", a / b);
  printf("%d\n", b / a);
  printf("%f\n", (float)b / (float)a);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %rbx
  movss  D28(%rip),%xmm0
  lea    D8(%rip),%rbx
  mov    %rbx,%rdi
  call   <printf@plt>
  pxor   %xmm0,%xmm0
  mov    %rbx,%rdi
  call   <printf@plt>
  movss  D10(%rip),%xmm0
  lea    D35(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  pop    %rbx
  ret
```

tool_calls: name: read_data
arguments: data_label: D28
type_guessed: byte[4]
name: read_data
arguments: data_label: D8
type_guessed: string
name: read_data
arguments: data_label: D10
type_guessed: byte[4]
name: read_data
arguments: data_label: D35
type_guessed: string

tool: {"D28": [0x00,0x00,0xa0,0x40]}

tool: D8: %d


tool: {"D10": [0xcd,0xcc,0x4c,0x3e]}

tool: D35: %f


assistant: ```c
int main(int argc, char **argv) {
  int a = 10;
  int b = 2;
  printf("%d\n", a / b);
  printf("%d\n", b / a);
  printf("%f\n", (float)b / (float)a);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<main>:
  endbr64
  push   %rbp
  movss  D21(%rip),%xmm0
  lea    D26(%rip),%rbp
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  pxor   %xmm0,%xmm0
  call   <printf@plt>
  movss  D24(%rip),%xmm0
  lea    D28(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: tag: D21
data_type: byte[4]
name: parse_data
arguments: tag: D26
data_type: string
name: parse_data
arguments: tag: D24
data_type: byte[4]
name: parse_data
arguments: tag: D28
data_type: string

tool: {"D21": [0x00,0x00,0xa0,0x40]}

tool: D26: %d


tool: {"D24": [0xcd,0xcc,0x4c,0x3e]}

tool: D28: %f


assistant: ```c
int main(int argc, char **argv) {
  int a = 10;
  int b = 2;
  printf("%d\n", a / b);
  printf("%d\n", b / a);
  printf("%f\n", (float)b / (float)a);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  movss  D24(%rip),%xmm0
  lea    D11(%rip),%rbp
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  pxor   %xmm0,%xmm0
  call   <printf@plt>
  movss  D35(%rip),%xmm0
  lea    D36(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: tag: D24
data_type: byte[4]
name: read_data
arguments: tag: D11
data_type: string
name: read_data
arguments: tag: D35
data_type: byte[4]
name: read_data
arguments: tag: D36
data_type: string

tool: {"D24": [0x00,0x00,0xa0,0x40]}

tool: D11: %d


tool: {"D35": [0xcd,0xcc,0x4c,0x3e]}

tool: D36: %f


assistant: ```c
int main(int argc, char **argv) {
  int a = 10;
  int b = 2;
  printf("%d\n", a / b);
  printf("%d\n", b / a);
  printf("%f\n", (float)b / (float)a);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<displayArray>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x4(%rbp)
  jmp    L2
L11:
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x4(%rbp)
L2:
  mov    -0x4(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jb     L11
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D13
data_type: string
name: retrieve_data
arguments: label: D10
data_type: string
name: retrieve_data
arguments: label: D28
data_type: string

tool: D13: --Begin--

tool: D10: array[%d]=%d


tool: D28: --End--

assistant: ```c
void displayArray(const int array[], unsigned length) {
  printf("--Begin--\n");
  for (unsigned i = 0; i < length; i++) {
    printf("array[%d]=%d\n", i, array[i]);
  }
  printf("--End--\n");
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<displayArray>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %esi,%ebp
  lea    D12(%rip),%rdi
  call   <puts@plt>
  test   %ebp,%ebp
  je     L2
  mov    %ebp,%ebp
  mov    $0x0,%ebx
  lea    D29(%rip),%r13
L1:
  mov    (%r12,%rbx,4),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  jne    L1
L2:
  lea    D17(%rip),%rdi
  call   <puts@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D12
data_type: string
name: disassemble_data
arguments: data_label: D29
data_type: string
name: disassemble_data
arguments: data_label: D17
data_type: string

tool: D12: --Begin--

tool: D29: array[%d]=%d


tool: D17: --End--

assistant: ```c
void displayArray(const int array[], unsigned length) {
  printf("--Begin--\n");
  for (unsigned i = 0; i < length; i++) {
    printf("array[%d]=%d\n", i, array[i]);
  }
  printf("--End--\n");
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<displayArray>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdi,%r12
  lea    D9(%rip),%rdi
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x8,%rsp
  call   <puts@plt>
  test   %ebp,%ebp
  je     L2
  xor    %ebx,%ebx
  lea    D3(%rip),%r13
  nopl   0x0(%rax)
L1:
  mov    (%r12,%rbx,4),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L1
L2:
  add    $0x8,%rsp
  lea    D26(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1060 <puts@plt>
```

tool_calls: name: unpack_data
arguments: label: D9
data_type: string
name: unpack_data
arguments: label: D3
data_type: string
name: unpack_data
arguments: label: D26
data_type: string

tool: D9: --Begin--

tool: D3: array[%d]=%d


tool: D26: --End--

assistant: ```c
void displayArray(const int array[], unsigned length) {
  printf("--Begin--\n");
  for (unsigned i = 0; i < length; i++) {
    printf("array[%d]=%d\n", i, array[i]);
  }
  printf("--End--\n");
}
```
user: What is the c source code of the assembly code below:

```asm
<displayArray>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdi,%r12
  lea    D2(%rip),%rdi
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x8,%rsp
  call   <puts@plt>
  test   %ebp,%ebp
  je     L14
  xor    %ebx,%ebx
  lea    D16(%rip),%r13
  nopl   0x0(%rax)
L3:
  mov    (%r12,%rbx,4),%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %rbx,%rbp
  jne    L3
L14:
  add    $0x8,%rsp
  lea    D17(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1060 <puts@plt>
```

tool_calls: name: read_data
arguments: data_tag: D2
type_infered: string
name: read_data
arguments: data_tag: D16
type_infered: string
name: read_data
arguments: data_tag: D17
type_infered: string

tool: D2: --Begin--

tool: D16: array[%d]=%d


tool: D17: --End--

assistant: ```c
void displayArray(const int array[], unsigned length) {
  printf("--Begin--\n");
  for (unsigned i = 0; i < length; i++) {
    printf("array[%d]=%d\n", i, array[i]);
  }
  printf("--End--\n");
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<match_pattern>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movl   $0x1,-0x1c(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L73
L91:
  mov    -0x18(%rbp),%edx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L84
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%ebx
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,%ebx
  jae    L84
  jmp    L62
L121:
  addl   $0x1,-0x14(%rbp)
L62:
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L32
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x14(%rbp)
  jb     L121
L32:
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L16
  movl   $0x0,-0x1c(%rbp)
  jmp    L16
L84:
  mov    -0x18(%rbp),%edx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3f,%al
  jne    L89
  addl   $0x1,-0x14(%rbp)
  jmp    L16
L89:
  mov    -0x18(%rbp),%edx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L104
  movl   $0x0,-0x1c(%rbp)
  jmp    L16
L104:
  addl   $0x1,-0x14(%rbp)
L16:
  addl   $0x1,-0x18(%rbp)
L73:
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x18(%rbp)
  jb     L91
  mov    -0x1c(%rbp),%eax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int match_pattern(char *string, char *pattern) {
  unsigned int result = 1, i, j = 0;
  for (i = 0; i < strlen(pattern); i++) {
    if (pattern[i] == '*' && i + 1 < strlen(pattern)) {
      while (pattern[i + 1] != string[j] && j < strlen(string))
        j++;
      if (pattern[i + 1] != string[j])
        result = 0;
    } else if (pattern[i] == '?') {
      j++;
    } else {
      if (pattern[i] != string[j])
        result = 0;
      else
        j++;
    }
  }
  return result;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<match_pattern>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r14
  mov    %rsi,%r13
  mov    $0x0,%r12d
  mov    $0x0,%ebp
  movl   $0x1,0xc(%rsp)
  jmp    L37
L14:
  lea    0x1(%rbp),%r15d
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    %eax,%r15d
  jae    L51
  mov    %r15d,%r15d
  add    %r13,%r15
  mov    %r12d,%ebx
  add    %r14,%rbx
  movzbl (%rbx),%eax
  cmp    %al,(%r15)
  je     L8
L27:
  mov    %r14,%rdi
  call   <strlen@plt>
  cmp    %r12d,%eax
  jbe    L118
  add    $0x1,%r12d
  mov    %r12d,%ebx
  add    %r14,%rbx
  movzbl (%rbx),%eax
  cmp    %al,(%r15)
  jne    L27
  jmp    L8
L118:
  movzbl (%rbx),%eax
  cmp    %al,(%r15)
  mov    $0x0,%eax
  cmove  0xc(%rsp),%eax
  mov    %eax,0xc(%rsp)
  jmp    L8
L16:
  add    $0x1,%r12d
L8:
  add    $0x1,%ebp
L37:
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    %ebp,%eax
  jbe    L5
  mov    %ebp,%ebx
  add    %r13,%rbx
  cmpb   $0x2a,(%rbx)
  je     L14
L51:
  movzbl (%rbx),%eax
  cmp    $0x3f,%al
  je     L16
  mov    %r12d,%edx
  cmp    (%r14,%rdx,1),%al
  je     L112
  movl   $0x0,0xc(%rsp)
  jmp    L8
L112:
  add    $0x1,%r12d
  jmp    L8
L5:
  mov    0xc(%rsp),%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int match_pattern(char *string, char *pattern) {
  unsigned int result = 1, i, j = 0;
  for (i = 0; i < strlen(pattern); i++) {
    if (pattern[i] == '*' && i + 1 < strlen(pattern)) {
      while (pattern[i + 1] != string[j] && j < strlen(string))
        j++;
      if (pattern[i + 1] != string[j])
        result = 0;
    } else if (pattern[i] == '?') {
      j++;
    } else {
      if (pattern[i] != string[j])
        result = 0;
      else
        j++;
    }
  }
  return result;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<match_pattern>:
  endbr64
  push   %r15
  xor    %r15d,%r15d
  push   %r14
  push   %r13
  mov    $0x1,%r13d
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x18,%rsp
  nopl   0x0(%rax,%rax,1)
L65:
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %r15d,%eax
  jbe    L103
L70:
  mov    %r15d,%r14d
  add    $0x1,%r15d
  add    %rbp,%r14
  movzbl (%r14),%eax
  cmp    $0x2a,%al
  je     L43
L1:
  cmp    $0x3f,%al
  je     L37
  mov    %ebx,%ecx
  cmp    %al,(%r12,%rcx,1)
  je     L37
  mov    %rbp,%rdi
  xor    %r13d,%r13d
  call   <strlen@plt>
  cmp    %r15d,%eax
  ja     L70
L103:
  add    $0x18,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L37:
  add    $0x1,%ebx
  jmp    L65
  nopl   (%rax)
L43:
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %r15d,%eax
  ja     L14
  movzbl (%r14),%eax
  jmp    L1
  nopl   0x0(%rax,%rax,1)
L14:
  mov    %r15d,%r14d
  mov    %ebx,%ecx
  lea    0x0(%rbp,%r14,1),%rax
  lea    (%r12,%rcx,1),%r14
  mov    %rax,0x8(%rsp)
  movzbl (%rax),%eax
  cmp    %al,(%r14)
  jne    L114
  jmp    L65
  nopl   0x0(%rax,%rax,1)
L90:
  lea    0x1(%rbx),%ecx
  mov    0x8(%rsp),%rax
  lea    (%r12,%rcx,1),%r14
  mov    %rcx,%rbx
  movzbl (%r14),%edx
  cmp    %dl,(%rax)
  je     L65
L114:
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  ja     L90
  mov    0x8(%rsp),%rax
  movzbl (%r14),%esi
  cmp    %sil,(%rax)
  mov    $0x0,%eax
  cmovne %eax,%r13d
  jmp    L65
```

assistant: ```c
int match_pattern(char *string, char *pattern) {
  unsigned int result = 1, i, j = 0;
  for (i = 0; i < strlen(pattern); i++) {
    if (pattern[i] == '*' && i + 1 < strlen(pattern)) {
      while (pattern[i + 1] != string[j] && j < strlen(string))
        j++;
      if (pattern[i + 1] != string[j])
        result = 0;
    } else if (pattern[i] == '?') {
      j++;
    } else {
      if (pattern[i] != string[j])
        result = 0;
      else
        j++;
    }
  }
  return result;
}
```