ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What is the c source code of the assembly code below:

```asm
<obter_numero_uniforme>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  mov    %edx,-0x4(%rbp)
  mov    -0x4(%rbp),%edx
  imul   $0x64,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L5
L9:
  mov    $0x0,%eax
  call   <rand@plt>
  addl   $0x1,-0x8(%rbp)
L5:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L9
  mov    $0x0,%eax
  call   <rand@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mov    D0(%rip),%rax
  mov    (%rax),%rax
  pxor   %xmm1,%xmm1
  cvtsi2ss %rax,%xmm1
  divss  %xmm1,%xmm0
  leave
  ret
```

assistant: ```c
float obter_numero_uniforme() {
  int max_mix = rand() % 100;
  int i;
  for (i = 0; i < max_mix; i++)
    rand();
  return (float)rand() / (float)RAND_MAX;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<obter_numero_uniforme>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%rbp
  imul   $0x51eb851f,%rbp,%rbp
  sar    $0x25,%rbp
  cltd
  sub    %edx,%ebp
  imul   $0x64,%ebp,%edx
  sub    %edx,%eax
  test   %eax,%eax
  jle    L18
  mov    %eax,%ebp
  mov    $0x0,%ebx
L0:
  mov    $0x0,%eax
  call   <rand@plt>
  add    $0x1,%ebx
  cmp    %ebx,%ebp
  jne    L0
L18:
  mov    $0x0,%eax
  call   <rand@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mov    D4(%rip),%rax
  pxor   %xmm1,%xmm1
  cvtsi2ssq (%rax),%xmm1
  divss  %xmm1,%xmm0
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
float obter_numero_uniforme() {
  int max_mix = rand() % 100;
  int i;
  for (i = 0; i < max_mix; i++)
    rand();
  return (float)rand() / (float)RAND_MAX;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<obter_numero_uniforme>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  push   %rbx
  sub    $0x8,%rsp
  call   <rand@plt>
  movslq %eax,%rbp
  cltd
  imul   $0x51eb851f,%rbp,%rbp
  sar    $0x25,%rbp
  sub    %edx,%ebp
  imul   $0x64,%ebp,%edx
  sub    %edx,%eax
  test   %eax,%eax
  jle    L3
  mov    %eax,%ebp
  xor    %ebx,%ebx
  nop
L9:
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <rand@plt>
  cmp    %ebx,%ebp
  jne    L9
L3:
  xor    %eax,%eax
  call   <rand@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm0
  mov    D5(%rip),%rax
  cvtsi2ssq (%rax),%xmm1
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  divss  %xmm1,%xmm0
  ret
```

assistant: ```c
float obter_numero_uniforme() {
  int max_mix = rand() % 100;
  int i;
  for (i = 0; i < max_mix; i++)
    rand();
  return (float)rand() / (float)RAND_MAX;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<obter_numero_uniforme>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  push   %rbx
  sub    $0x8,%rsp
  call   <rand@plt>
  movslq %eax,%rbp
  cltd
  imul   $0x51eb851f,%rbp,%rbp
  sar    $0x25,%rbp
  sub    %edx,%ebp
  imul   $0x64,%ebp,%edx
  sub    %edx,%eax
  test   %eax,%eax
  jle    L5
  mov    %eax,%ebp
  xor    %ebx,%ebx
  nop
L16:
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <rand@plt>
  cmp    %ebx,%ebp
  jne    L16
L5:
  xor    %eax,%eax
  call   <rand@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm0
  mov    D9(%rip),%rax
  cvtsi2ssq (%rax),%xmm1
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  divss  %xmm1,%xmm0
  ret
```

assistant: ```c
float obter_numero_uniforme() {
  int max_mix = rand() % 100;
  int i;
  for (i = 0; i < max_mix; i++)
    rand();
  return (float)rand() / (float)RAND_MAX;
}
```
user: What is the c source code of the assembly code below:

```asm
<insertion_sort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x1,-0x10(%rbp)
  jmp    L49
L23:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L19
L42:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    0x1(%rdx),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    -0xc(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  mov    %dl,(%rax)
L19:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    %eax,-0x8(%rbp)
  jge    L48
  cmpl   $0x0,-0xc(%rbp)
  jns    L42
L48:
  addl   $0x1,-0x10(%rbp)
L49:
  mov    -0x10(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L23
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void insertion_sort(char *a, int length) {
  for (int i = 1, k, tmp, key; i < length; i++) {
    key = a[i];
    k = i - 1;
    while (key < a[k] && k >= 0) {
      tmp = a[k + 1];
      a[k + 1] = a[k];
      a[k--] = tmp;
    }
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<insertion_sort>:
  endbr64
  cmp    $0x1,%esi
  jle    L40
  push   %rbx
  lea    -0x1(%rsi),%ebx
  mov    $0x0,%r11d
  jmp    L66
L7:
  add    $0x1,%r11
  add    $0x1,%rdi
  cmp    %rbx,%r11
  je     L69
L66:
  mov    %rdi,%rsi
  movzbl 0x1(%rdi),%r10d
  mov    %r11d,%ecx
  movzbl (%rdi),%edx
  test   %r11d,%r11d
  js     L7
  cmp    %dl,%r10b
  jge    L7
  lea    -0x1(%rdi),%rax
L30:
  mov    %rsi,%r8
  mov    %rax,%rsi
  movzbl 0x2(%rax),%r9d
  mov    %dl,0x2(%rax)
  mov    %r9b,(%r8)
  movzbl (%rax),%edx
  sub    $0x1,%rax
  sub    $0x1,%ecx
  js     L7
  cmp    %dl,%r10b
  jl     L30
  jmp    L7
L69:
  pop    %rbx
  ret
L40:
  ret
```

assistant: ```c
void insertion_sort(char *a, int length) {
  for (int i = 1, k, tmp, key; i < length; i++) {
    key = a[i];
    k = i - 1;
    while (key < a[k] && k >= 0) {
      tmp = a[k + 1];
      a[k + 1] = a[k];
      a[k--] = tmp;
    }
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<insertion_sort>:
  endbr64
  cmp    $0x1,%esi
  jle    L51
  push   %rbx
  xor    %r11d,%r11d
  lea    -0x1(%rsi),%ebx
L7:
  movzbl 0x1(%rdi),%r10d
  movzbl (%rdi),%edx
  mov    %rdi,%rsi
  mov    %r11d,%ecx
  cmp    %dl,%r10b
  jge    L24
  lea    -0x1(%rdi),%rax
  mov    %r10d,%r8d
  jmp    L27
  nopl   0x0(%rax)
L57:
  cmp    $0xffffffff,%ecx
  je     L24
  movzbl 0x2(%rax),%r8d
  mov    %r9,%rsi
L27:
  mov    %dl,0x2(%rax)
  mov    %rax,%r9
  sub    $0x1,%ecx
  sub    $0x1,%rax
  mov    %r8b,(%rsi)
  movzbl 0x1(%rax),%edx
  cmp    %dl,%r10b
  jl     L57
L24:
  add    $0x1,%r11
  add    $0x1,%rdi
  cmp    %rbx,%r11
  jne    L7
  pop    %rbx
  ret
L51:
  ret
```

assistant: ```c
void insertion_sort(char *a, int length) {
  for (int i = 1, k, tmp, key; i < length; i++) {
    key = a[i];
    k = i - 1;
    while (key < a[k] && k >= 0) {
      tmp = a[k + 1];
      a[k + 1] = a[k];
      a[k--] = tmp;
    }
  }
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<insertion_sort>:
  endbr64
  cmp    $0x1,%esi
  jle    L35
  push   %rbx
  xor    %r11d,%r11d
  lea    -0x1(%rsi),%ebx
L19:
  movzbl 0x1(%rdi),%r10d
  movzbl (%rdi),%edx
  mov    %rdi,%rsi
  mov    %r11d,%ecx
  cmp    %dl,%r10b
  jge    L53
  lea    -0x1(%rdi),%rax
  jmp    L46
  nopl   0x0(%rax)
L24:
  cmp    $0xffffffff,%ecx
  je     L53
L46:
  movzbl 0x2(%rax),%r9d
  mov    %rsi,%r8
  mov    %dl,0x2(%rax)
  mov    %rax,%rsi
  sub    $0x1,%ecx
  sub    $0x1,%rax
  mov    %r9b,(%r8)
  movzbl 0x1(%rax),%edx
  cmp    %dl,%r10b
  jl     L24
L53:
  add    $0x1,%r11
  add    $0x1,%rdi
  cmp    %rbx,%r11
  jne    L19
  pop    %rbx
  ret
L35:
  ret
```

assistant: ```c
void insertion_sort(char *a, int length) {
  for (int i = 1, k, tmp, key; i < length; i++) {
    key = a[i];
    k = i - 1;
    while (key < a[k] && k >= 0) {
      tmp = a[k + 1];
      a[k + 1] = a[k];
      a[k--] = tmp;
    }
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<copy_vector>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L1
L10:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x4(%rbp)
L1:
  mov    -0x4(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L10
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void copy_vector(unsigned char *dst, unsigned char *src, int size) {
  int i;
  for (i = 0; i < size; i++) {
    dst[i] = src[i];
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<copy_vector>:
  endbr64
  test   %edx,%edx
  jle    L15
  mov    %edx,%edx
  mov    $0x0,%eax
L0:
  movzbl (%rsi,%rax,1),%ecx
  mov    %cl,(%rdi,%rax,1)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L0
L15:
  ret
```

assistant: ```c
void copy_vector(unsigned char *dst, unsigned char *src, int size) {
  int i;
  for (i = 0; i < size; i++) {
    dst[i] = src[i];
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<copy_vector>:
  endbr64
  test   %edx,%edx
  jle    L12
  movslq %edx,%rdx
  xor    %eax,%eax
  nopl   (%rax)
L16:
  movzbl (%rsi,%rax,1),%ecx
  mov    %cl,(%rdi,%rax,1)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L16
L12:
  ret
```

assistant: ```c
void copy_vector(unsigned char *dst, unsigned char *src, int size) {
  int i;
  for (i = 0; i < size; i++) {
    dst[i] = src[i];
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<copy_vector>:
  endbr64
  mov    %rdi,%rcx
  test   %edx,%edx
  jle    L29
  lea    0x1(%rsi),%r9
  mov    %edx,%r8d
  lea    -0x1(%rdx),%eax
  sub    %r9,%rdi
  cmp    $0xe,%rdi
  jbe    L61
  cmp    $0x6,%eax
  jbe    L61
  cmp    $0xe,%eax
  jbe    L148
  mov    %edx,%edi
  xor    %eax,%eax
  shr    $0x4,%edi
  shl    $0x4,%rdi
  nopl   0x0(%rax,%rax,1)
L4:
  movdqu (%rsi,%rax,1),%xmm0
  movups %xmm0,(%rcx,%rax,1)
  add    $0x10,%rax
  cmp    %rdi,%rax
  jne    L4
  mov    %edx,%edi
  and    $0xfffffff0,%edi
  mov    %edi,%eax
  cmp    %edi,%edx
  je     L29
  mov    %edx,%r8d
  sub    %edi,%r8d
  lea    -0x1(%r8),%r9d
  cmp    $0x6,%r9d
  jbe    L134
L65:
  mov    (%rsi,%rdi,1),%r9
  mov    %r9,(%rcx,%rdi,1)
  mov    %r8d,%edi
  and    $0xfffffff8,%edi
  add    %edi,%eax
  cmp    %edi,%r8d
  je     L29
L134:
  movslq %eax,%rdi
  movzbl (%rsi,%rdi,1),%r8d
  mov    %r8b,(%rcx,%rdi,1)
  lea    0x1(%rax),%edi
  cmp    %edi,%edx
  jle    L29
  movslq %edi,%rdi
  movzbl (%rsi,%rdi,1),%r8d
  mov    %r8b,(%rcx,%rdi,1)
  lea    0x2(%rax),%edi
  cmp    %edi,%edx
  jle    L29
  movslq %edi,%rdi
  movzbl (%rsi,%rdi,1),%r8d
  mov    %r8b,(%rcx,%rdi,1)
  lea    0x3(%rax),%edi
  cmp    %edi,%edx
  jle    L29
  movslq %edi,%rdi
  movzbl (%rsi,%rdi,1),%r8d
  mov    %r8b,(%rcx,%rdi,1)
  lea    0x4(%rax),%edi
  cmp    %edi,%edx
  jle    L29
  movslq %edi,%rdi
  movzbl (%rsi,%rdi,1),%r8d
  mov    %r8b,(%rcx,%rdi,1)
  lea    0x5(%rax),%edi
  cmp    %edi,%edx
  jle    L29
  movslq %edi,%rdi
  add    $0x6,%eax
  movzbl (%rsi,%rdi,1),%r8d
  mov    %r8b,(%rcx,%rdi,1)
  cmp    %eax,%edx
  jle    L29
  cltq
  movzbl (%rsi,%rax,1),%edx
  mov    %dl,(%rcx,%rax,1)
  ret
  nopw   0x0(%rax,%rax,1)
L61:
  mov    %edx,%edx
  xor    %eax,%eax
  nopl   0x0(%rax)
L146:
  movzbl (%rsi,%rax,1),%edi
  mov    %dil,(%rcx,%rax,1)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L146
L29:
  ret
L148:
  xor    %edi,%edi
  xor    %eax,%eax
  jmp    L65
```

assistant: ```c
void copy_vector(unsigned char *dst, unsigned char *src, int size) {
  int i;
  for (i = 0; i < size; i++) {
    dst[i] = src[i];
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<option_parse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L23
L13:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  sub    -0x8(%rbp),%eax
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rdx
  mov    %eax,%edi
  call   <argparse@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  je     L28
  mov    -0x4(%rbp),%eax
  add    %eax,-0x8(%rbp)
L23:
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L13
  jmp    L26
L28:
  nop
L26:
  mov    -0x8(%rbp),%eax
  leave
  ret
```

assistant: ```c
int option_parse(int args, const char *argv[], const struct opt_type *type_array, struct opt_parsed *parsed) {
  int arg;
  for (arg = 0; arg < args;) {
    int arginc;
    arginc = argparse(args - arg, argv + arg, type_array, parsed);
    if (arginc) {
      arg += arginc;
    } else {
      break;
    }
  }
  return arg;
}
```
user: What is the c source code of the assembly code below?

```asm
<option_parse>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %edi,%edi
  jle    L38
  mov    %edi,%ebp
  mov    %rsi,%r12
  mov    %rdx,%r13
  mov    %rcx,%r14
  mov    $0x0,%ebx
L32:
  movslq %ebx,%rax
  lea    (%r12,%rax,8),%rsi
  mov    %ebp,%edi
  sub    %ebx,%edi
  mov    %r14,%rcx
  mov    %r13,%rdx
  call   <argparse@plt>
  test   %eax,%eax
  je     L4
  add    %eax,%ebx
  cmp    %ebx,%ebp
  jg     L32
L4:
  mov    %ebx,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L38:
  mov    $0x0,%ebx
  jmp    L4
```

assistant: ```c
int option_parse(int args, const char *argv[], const struct opt_type *type_array, struct opt_parsed *parsed) {
  int arg;
  for (arg = 0; arg < args;) {
    int arginc;
    arginc = argparse(args - arg, argv + arg, type_array, parsed);
    if (arginc) {
      arg += arginc;
    } else {
      break;
    }
  }
  return arg;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<option_parse>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %edi,%edi
  jle    L40
  mov    %edi,%ebx
  mov    %rsi,%rbp
  mov    %rdx,%r13
  mov    %rcx,%r14
  xor    %r12d,%r12d
  jmp    L32
L28:
  add    %eax,%r12d
  cmp    %r12d,%ebx
  jle    L49
L32:
  movslq %r12d,%rax
  mov    %ebx,%edi
  mov    %r14,%rcx
  mov    %r13,%rdx
  sub    %r12d,%edi
  lea    0x0(%rbp,%rax,8),%rsi
  call   <argparse@plt>
  test   %eax,%eax
  jne    L28
L49:
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L40:
  xor    %r12d,%r12d
  jmp    L49
```

assistant: ```c
int option_parse(int args, const char *argv[], const struct opt_type *type_array, struct opt_parsed *parsed) {
  int arg;
  for (arg = 0; arg < args;) {
    int arginc;
    arginc = argparse(args - arg, argv + arg, type_array, parsed);
    if (arginc) {
      arg += arginc;
    } else {
      break;
    }
  }
  return arg;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<option_parse>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %edi,%edi
  jle    L0
  mov    %edi,%ebx
  mov    %rsi,%rbp
  mov    %rdx,%r13
  mov    %rcx,%r14
  xor    %r12d,%r12d
  jmp    L31
L34:
  add    %eax,%r12d
  cmp    %r12d,%ebx
  jle    L14
L31:
  movslq %r12d,%rax
  mov    %ebx,%edi
  mov    %r14,%rcx
  mov    %r13,%rdx
  sub    %r12d,%edi
  lea    0x0(%rbp,%rax,8),%rsi
  call   <argparse@plt>
  test   %eax,%eax
  jne    L34
L14:
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L0:
  xor    %r12d,%r12d
  jmp    L14
```

assistant: ```c
int option_parse(int args, const char *argv[], const struct opt_type *type_array, struct opt_parsed *parsed) {
  int arg;
  for (arg = 0; arg < args;) {
    int arginc;
    arginc = argparse(args - arg, argv + arg, type_array, parsed);
    if (arginc) {
      arg += arginc;
    } else {
      break;
    }
  }
  return arg;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<get_content_type>:
  endbr64
  push   %rbx
  mov    $0x2e,%esi
  call   <strrchr@plt>
  mov    %rax,%rbx
  lea    D125(%rip),%rax
  test   %rbx,%rbx
  je     L7
  lea    D18(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D29(%rip),%rax
  test   %rdx,%rdx
  jne    L27
L7:
  pop    %rbx
  ret
L27:
  lea    D97(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D29(%rip),%rax
  test   %rdx,%rdx
  je     L7
  lea    D122(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D125(%rip),%rax
  test   %rdx,%rdx
  je     L7
  lea    D20(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D7(%rip),%rax
  test   %rdx,%rdx
  je     L7
  lea    D59(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D5(%rip),%rax
  test   %rdx,%rdx
  je     L7
  lea    D53(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D5(%rip),%rax
  test   %rdx,%rdx
  je     L7
  lea    D139(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D30(%rip),%rax
  test   %rdx,%rdx
  je     L7
  lea    D113(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  lea    D125(%rip),%rax
  lea    D82(%rip),%rdx
  cmove  %rdx,%rax
  jmp    L7
```

tool_calls: name: retrieve_data
arguments: data_label: D125
data_type: string
name: retrieve_data
arguments: data_label: D18
data_type: string
name: retrieve_data
arguments: data_label: D29
data_type: string
name: retrieve_data
arguments: data_label: D97
data_type: string
name: retrieve_data
arguments: data_label: D122
data_type: string
name: retrieve_data
arguments: data_label: D20
data_type: string
name: retrieve_data
arguments: data_label: D7
data_type: string
name: retrieve_data
arguments: data_label: D59
data_type: string
name: retrieve_data
arguments: data_label: D5
data_type: string
name: retrieve_data
arguments: data_label: D53
data_type: string
name: retrieve_data
arguments: data_label: D139
data_type: string
name: retrieve_data
arguments: data_label: D30
data_type: string
name: retrieve_data
arguments: data_label: D113
data_type: string
name: retrieve_data
arguments: data_label: D82
data_type: string

tool: D125: text/plain

tool: D18: .html

tool: D29: text/html

tool: D97: .htm

tool: D122: .txt

tool: D20: .css

tool: D7: text/css

tool: D59: .jpg

tool: D5: image/jpeg

tool: D53: .jpeg

tool: D139: .gif

tool: D30: image/gif

tool: D113: .png

tool: D82: image/png

assistant: ```c
char *get_content_type(char *filename) {
  char *ext = strrchr(filename, '.');
  if (!ext) {
    return "text/plain";
  }
  if (strcmp(ext, ".html") == 0 || strcmp(ext, ".htm") == 0) {
    return "text/html";
  }
  if (strcmp(ext, ".txt") == 0) {
    return "text/plain";
  }
  if (strcmp(ext, ".css") == 0) {
    return "text/css";
  }
  if (strcmp(ext, ".jpg") == 0 || strcmp(ext, ".jpeg") == 0) {
    return "image/jpeg";
  }
  if (strcmp(ext, ".gif") == 0) {
    return "image/gif";
  }
  if (strcmp(ext, ".png") == 0) {
    return "image/png";
  }
  return "text/plain";
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<get_content_type>:
  endbr64
  push   %rbp
  mov    $0x2e,%esi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L72
  lea    D23(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L17
L51:
  lea    D28(%rip),%rax
L87:
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L17:
  lea    D137(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L51
  lea    D111(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L72
  lea    D58(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D6(%rip),%rax
  test   %r8,%r8
  je     L87
  lea    D61(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L66
  lea    D85(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L66
  lea    D94(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D37(%rip),%rax
  test   %r8,%r8
  je     L87
  lea    D103(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L72
  lea    D16(%rip),%rax
  pop    %rbp
  ret
  nopl   0x0(%rax)
L72:
  lea    D20(%rip),%rax
  pop    %rbp
  ret
  nopl   0x0(%rax)
L66:
  lea    D122(%rip),%rax
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_label: D23
type: string
name: parse_data
arguments: data_label: D28
type: string
name: parse_data
arguments: data_label: D137
type: string
name: parse_data
arguments: data_label: D111
type: string
name: parse_data
arguments: data_label: D58
type: string
name: parse_data
arguments: data_label: D6
type: string
name: parse_data
arguments: data_label: D61
type: string
name: parse_data
arguments: data_label: D85
type: string
name: parse_data
arguments: data_label: D94
type: string
name: parse_data
arguments: data_label: D37
type: string
name: parse_data
arguments: data_label: D103
type: string
name: parse_data
arguments: data_label: D16
type: string
name: parse_data
arguments: data_label: D20
type: string
name: parse_data
arguments: data_label: D122
type: string

tool: D23: .html

tool: D28: text/html

tool: D137: .htm

tool: D111: .txt

tool: D58: .css

tool: D6: text/css

tool: D61: .jpg

tool: D85: .jpeg

tool: D94: .gif

tool: D37: image/gif

tool: D103: .png

tool: D16: image/png

tool: D20: text/plain

tool: D122: image/jpeg

assistant: ```c
char *get_content_type(char *filename) {
  char *ext = strrchr(filename, '.');
  if (!ext) {
    return "text/plain";
  }
  if (strcmp(ext, ".html") == 0 || strcmp(ext, ".htm") == 0) {
    return "text/html";
  }
  if (strcmp(ext, ".txt") == 0) {
    return "text/plain";
  }
  if (strcmp(ext, ".css") == 0) {
    return "text/css";
  }
  if (strcmp(ext, ".jpg") == 0 || strcmp(ext, ".jpeg") == 0) {
    return "image/jpeg";
  }
  if (strcmp(ext, ".gif") == 0) {
    return "image/gif";
  }
  if (strcmp(ext, ".png") == 0) {
    return "image/png";
  }
  return "text/plain";
}
```