ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D35(%rip),%rdi
  lea    D74(%rip),%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  lea    D57(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  lea    D13(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x14(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  cmpl   $0x1,0xc(%rsp)
  movss  D77(%rip),%xmm0
  jne    L56
  movss  D27(%rip),%xmm0
L56:
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jne    L54
  cmpl   $0x18,0x14(%rsp)
  jg     L59
  addss  %xmm0,%xmm0
L26:
  lea    D39(%rip),%rdi
  mov    $0x1,%eax
  cvtss2sd %xmm0,%xmm0
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L67
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbp
  ret
L54:
  sub    $0x1,%eax
  jne    L26
  cmpl   $0x19,0x14(%rsp)
  jg     L26
L59:
  mulss  D73(%rip),%xmm0
  jmp    L26
L67:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D35
datatype: string
name: parse_data
arguments: tag: D74
datatype: string
name: parse_data
arguments: tag: D57
datatype: string
name: parse_data
arguments: tag: D13
datatype: string
name: parse_data
arguments: tag: D77
datatype: f32
name: parse_data
arguments: tag: D27
datatype: byte[4]
name: parse_data
arguments: tag: D39
datatype: string
name: parse_data
arguments: tag: D73
datatype: f32

tool: D35: Are you married? (married=1 unmarried=0) 

tool: D74: %d

tool: D57: Are you male or female? (female=1 male=0) 

tool: D13: How old are you? 

tool: D77: 100

tool: {"D27": [0x00,0x00,0xb4,0x42]}

tool: D39: the daily rate for the customer is: %0.2f

tool: D73: 1.5

assistant: ```c
int main() {
  int married;
  printf("Are you married? (married=1 unmarried=0) ");
  scanf("%d", &married);
  int gender;
  printf("Are you male or female? (female=1 male=0) ");
  scanf("%d", &gender);
  int age;
  printf("How old are you? ");
  scanf("%d", &age);
  float nominaldr = 100;
  if (married == 1) {
    nominaldr -= 10.0;
  }
  if ((gender == 0) && (age < 25)) {
    nominaldr *= 2;
  }
  if ((gender == 0) && (age >= 25)) {
    nominaldr *= 1.5;
  }
  if ((gender == 1) && (age <= 25)) {
    nominaldr *= 1.5;
  }
  printf("the daily rate for the customer is: %0.2f", nominaldr);
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %rbp
  lea    D17(%rip),%rdi
  lea    D50(%rip),%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  lea    D56(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  lea    D69(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x14(%rsp),%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
  cmpl   $0x1,0xc(%rsp)
  movss  D9(%rip),%xmm0
  jne    L24
  movss  D4(%rip),%xmm0
L24:
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jne    L34
  cmpl   $0x18,0x14(%rsp)
  jg     L29
  addss  %xmm0,%xmm0
L36:
  lea    D46(%rip),%rdi
  mov    $0x1,%eax
  cvtss2sd %xmm0,%xmm0
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L23
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbp
  ret
L34:
  sub    $0x1,%eax
  jne    L36
  cmpl   $0x19,0x14(%rsp)
  jg     L36
L29:
  mulss  D23(%rip),%xmm0
  jmp    L36
L23:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D17
type_guessed: string
name: parse_data
arguments: data_tag: D50
type_guessed: string
name: parse_data
arguments: data_tag: D56
type_guessed: string
name: parse_data
arguments: data_tag: D69
type_guessed: string
name: parse_data
arguments: data_tag: D9
type_guessed: f32
name: parse_data
arguments: data_tag: D4
type_guessed: byte[4]
name: parse_data
arguments: data_tag: D46
type_guessed: string
name: parse_data
arguments: data_tag: D23
type_guessed: f32

tool: D17: Are you married? (married=1 unmarried=0) 

tool: D50: %d

tool: D56: Are you male or female? (female=1 male=0) 

tool: D69: How old are you? 

tool: D9: 100

tool: {"D4": [0x00,0x00,0xb4,0x42]}

tool: D46: the daily rate for the customer is: %0.2f

tool: D23: 1.5

assistant: ```c
int main() {
  int married;
  printf("Are you married? (married=1 unmarried=0) ");
  scanf("%d", &married);
  int gender;
  printf("Are you male or female? (female=1 male=0) ");
  scanf("%d", &gender);
  int age;
  printf("How old are you? ");
  scanf("%d", &age);
  float nominaldr = 100;
  if (married == 1) {
    nominaldr -= 10.0;
  }
  if ((gender == 0) && (age < 25)) {
    nominaldr *= 2;
  }
  if ((gender == 0) && (age >= 25)) {
    nominaldr *= 1.5;
  }
  if ((gender == 1) && (age <= 25)) {
    nominaldr *= 1.5;
  }
  printf("the daily rate for the customer is: %0.2f", nominaldr);
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<unget_token>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,(%rax)
  jmp    L5
L1:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,(%rax)
L5:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  test   %al,%al
  js     L1
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void unget_token(char **current) {
  (*current)--;
  while ((*(*current - 1)) & 0x80)
    (*current)--;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<unget_token>:
  endbr64
  mov    (%rdi),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,(%rdi)
  cmpb   $0x0,-0x2(%rax)
  jns    L16
  sub    $0x2,%rax
L18:
  mov    %rax,(%rdi)
  sub    $0x1,%rax
  cmpb   $0x0,(%rax)
  js     L18
L16:
  ret
```

assistant: ```c
void unget_token(char **current) {
  (*current)--;
  while ((*(*current - 1)) & 0x80)
    (*current)--;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<unget_token>:
  endbr64
  mov    (%rdi),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,(%rdi)
  cmpb   $0x0,-0x2(%rax)
  jns    L4
  sub    $0x2,%rax
  nopl   0x0(%rax,%rax,1)
L16:
  mov    %rax,(%rdi)
  sub    $0x1,%rax
  cmpb   $0x0,(%rax)
  js     L16
L4:
  ret
```

assistant: ```c
void unget_token(char **current) {
  (*current)--;
  while ((*(*current - 1)) & 0x80)
    (*current)--;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<unget_token>:
  endbr64
  mov    (%rdi),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,(%rdi)
  cmpb   $0x0,-0x2(%rax)
  jns    L2
  sub    $0x2,%rax
  nopl   0x0(%rax,%rax,1)
L3:
  mov    %rax,(%rdi)
  sub    $0x1,%rax
  cmpb   $0x0,(%rax)
  js     L3
L2:
  ret
```

assistant: ```c
void unget_token(char **current) {
  (*current)--;
  while ((*(*current - 1)) & 0x80)
    (*current)--;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<ind2sub>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%esi
  mov    -0x20(%rbp),%eax
  cltd
  idiv   %esi
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  sub    %edx,%eax
  cltd
  idivl  -0x1c(%rbp)
  mov    %eax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x20(%rbp),%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mov    -0x18(%rbp),%rax
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  movss  %xmm0,(%rax)
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  movss  %xmm0,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void ind2sub(float *subdisp, int len, int ind) {
  int search = (len - 1) / 2;
  int z = ind / (len * len);
  int x = (ind - z * len * len) / len;
  int y = ind - z * len * len - x * len;
  subdisp[0] = (float)(y - search);
  subdisp[1] = (float)(x - search);
  subdisp[2] = (float)(z - search);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<ind2sub>:
  endbr64
  mov    %rdi,%r8
  mov    %edx,%ecx
  lea    -0x1(%rsi),%eax
  mov    %eax,%edi
  shr    $0x1f,%edi
  add    %eax,%edi
  sar    %edi
  mov    %esi,%r9d
  imul   %esi,%r9d
  mov    %edx,%eax
  cltd
  idiv   %r9d
  mov    %eax,%r9d
  mov    %esi,%edx
  imul   %eax,%edx
  imul   %esi,%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  cltd
  idiv   %esi
  sub    %edi,%edx
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  movss  %xmm0,(%r8)
  sub    %edi,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,0x4(%r8)
  sub    %edi,%r9d
  pxor   %xmm0,%xmm0
  cvtsi2ss %r9d,%xmm0
  movss  %xmm0,0x8(%r8)
  ret
```

assistant: ```c
void ind2sub(float *subdisp, int len, int ind) {
  int search = (len - 1) / 2;
  int z = ind / (len * len);
  int x = (ind - z * len * len) / len;
  int y = ind - z * len * len - x * len;
  subdisp[0] = (float)(y - search);
  subdisp[1] = (float)(x - search);
  subdisp[2] = (float)(z - search);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<ind2sub>:
  endbr64
  lea    -0x1(%rsi),%eax
  mov    %rdi,%r8
  mov    %esi,%r9d
  mov    %edx,%ecx
  mov    %eax,%edi
  imul   %esi,%r9d
  pxor   %xmm0,%xmm0
  shr    $0x1f,%edi
  add    %eax,%edi
  mov    %edx,%eax
  cltd
  sar    %edi
  idiv   %r9d
  mov    %esi,%edx
  imul   %eax,%edx
  mov    %eax,%r9d
  mov    %ecx,%eax
  sub    %edi,%r9d
  imul   %esi,%edx
  sub    %edx,%eax
  cltd
  idiv   %esi
  sub    %edi,%edx
  sub    %edi,%eax
  cvtsi2ss %edx,%xmm0
  movss  %xmm0,(%r8)
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,0x4(%r8)
  pxor   %xmm0,%xmm0
  cvtsi2ss %r9d,%xmm0
  movss  %xmm0,0x8(%r8)
  ret
```

assistant: ```c
void ind2sub(float *subdisp, int len, int ind) {
  int search = (len - 1) / 2;
  int z = ind / (len * len);
  int x = (ind - z * len * len) / len;
  int y = ind - z * len * len - x * len;
  subdisp[0] = (float)(y - search);
  subdisp[1] = (float)(x - search);
  subdisp[2] = (float)(z - search);
}
```
user: Translate the below assembly code into C programming language:

```asm
<ind2sub>:
  endbr64
  lea    -0x1(%rsi),%eax
  mov    %rdi,%r8
  mov    %esi,%r9d
  mov    %edx,%ecx
  mov    %eax,%edi
  imul   %esi,%r9d
  shr    $0x1f,%edi
  add    %eax,%edi
  mov    %edx,%eax
  cltd
  sar    %edi
  idiv   %r9d
  mov    %esi,%edx
  movd   %edi,%xmm2
  pshufd $0xe0,%xmm2,%xmm1
  imul   %eax,%edx
  mov    %eax,%r9d
  mov    %ecx,%eax
  sub    %edi,%r9d
  imul   %esi,%edx
  sub    %edx,%eax
  cltd
  idiv   %esi
  movd   %edx,%xmm0
  movd   %eax,%xmm3
  punpckldq %xmm3,%xmm0
  psubd  %xmm1,%xmm0
  cvtdq2ps %xmm0,%xmm0
  movlps %xmm0,(%r8)
  pxor   %xmm0,%xmm0
  cvtsi2ss %r9d,%xmm0
  movss  %xmm0,0x8(%r8)
  ret
```

assistant: ```c
void ind2sub(float *subdisp, int len, int ind) {
  int search = (len - 1) / 2;
  int z = ind / (len * len);
  int x = (ind - z * len * len) / len;
  int y = ind - z * len * len - x * len;
  subdisp[0] = (float)(y - search);
  subdisp[1] = (float)(x - search);
  subdisp[2] = (float)(z - search);
}
```
user: What is the c source code of the assembly code below:

```asm
<attr_bitmap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x72,%al
  jne    L51
  orl    $0x8,-0x4(%rbp)
L51:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x77,%al
  jne    L39
  orl    $0x4,-0x4(%rbp)
L39:
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x78,%al
  jne    L47
  orl    $0x2,-0x4(%rbp)
L47:
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x70,%al
  jne    L10
  andl   $0xfffffffe,-0x4(%rbp)
  jmp    L40
L10:
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x73,%al
  jne    L40
  orl    $0x1,-0x4(%rbp)
L40:
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
unsigned int attr_bitmap(char *attr_str) {
  unsigned int bitmap = 0;
  if (attr_str[0] == 'r') {
    ((bitmap) |= (1 << 3));
  }
  if (attr_str[1] == 'w') {
    ((bitmap) |= (1 << 2));
  }
  if (attr_str[2] == 'x') {
    ((bitmap) |= (1 << 1));
  }
  if (attr_str[3] == 'p') {
    ((bitmap) &= (unsigned int)(~1));
  } else if (attr_str[3] == 's') {
    ((bitmap) |= 1);
  }
  return (bitmap);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<attr_bitmap>:
  endbr64
  cmpb   $0x72,(%rdi)
  sete   %al
  movzbl %al,%eax
  shl    $0x3,%eax
  cmpb   $0x77,0x1(%rdi)
  je     L13
L15:
  cmpb   $0x78,0x2(%rdi)
  je     L43
L19:
  cmpb   $0x73,0x3(%rdi)
  jne    L49
  or     $0x1,%eax
L49:
  ret
L13:
  or     $0x4,%eax
  jmp    L15
L43:
  or     $0x2,%eax
  jmp    L19
```

assistant: ```c
unsigned int attr_bitmap(char *attr_str) {
  unsigned int bitmap = 0;
  if (attr_str[0] == 'r') {
    ((bitmap) |= (1 << 3));
  }
  if (attr_str[1] == 'w') {
    ((bitmap) |= (1 << 2));
  }
  if (attr_str[2] == 'x') {
    ((bitmap) |= (1 << 1));
  }
  if (attr_str[3] == 'p') {
    ((bitmap) &= (unsigned int)(~1));
  } else if (attr_str[3] == 's') {
    ((bitmap) |= 1);
  }
  return (bitmap);
}
```
user: Translate the below assembly code into C programming language:

```asm
<attr_bitmap>:
  endbr64
  xor    %eax,%eax
  cmpb   $0x72,(%rdi)
  sete   %al
  shl    $0x3,%eax
  cmpb   $0x77,0x1(%rdi)
  jne    L8
  or     $0x4,%eax
L8:
  cmpb   $0x78,0x2(%rdi)
  jne    L24
  or     $0x2,%eax
L24:
  cmpb   $0x73,0x3(%rdi)
  je     L15
  ret
  nopl   0x0(%rax,%rax,1)
L15:
  or     $0x1,%eax
  ret
```

assistant: ```c
unsigned int attr_bitmap(char *attr_str) {
  unsigned int bitmap = 0;
  if (attr_str[0] == 'r') {
    ((bitmap) |= (1 << 3));
  }
  if (attr_str[1] == 'w') {
    ((bitmap) |= (1 << 2));
  }
  if (attr_str[2] == 'x') {
    ((bitmap) |= (1 << 1));
  }
  if (attr_str[3] == 'p') {
    ((bitmap) &= (unsigned int)(~1));
  } else if (attr_str[3] == 's') {
    ((bitmap) |= 1);
  }
  return (bitmap);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<attr_bitmap>:
  endbr64
  xor    %eax,%eax
  cmpb   $0x72,(%rdi)
  sete   %al
  shl    $0x3,%eax
  cmpb   $0x77,0x1(%rdi)
  jne    L14
  or     $0x4,%eax
L14:
  cmpb   $0x78,0x2(%rdi)
  jne    L16
  or     $0x2,%eax
L16:
  cmpb   $0x73,0x3(%rdi)
  je     L9
  ret
  nopl   0x0(%rax,%rax,1)
L9:
  or     $0x1,%eax
  ret
```

assistant: ```c
unsigned int attr_bitmap(char *attr_str) {
  unsigned int bitmap = 0;
  if (attr_str[0] == 'r') {
    ((bitmap) |= (1 << 3));
  }
  if (attr_str[1] == 'w') {
    ((bitmap) |= (1 << 2));
  }
  if (attr_str[2] == 'x') {
    ((bitmap) |= (1 << 1));
  }
  if (attr_str[3] == 'p') {
    ((bitmap) &= (unsigned int)(~1));
  } else if (attr_str[3] == 's') {
    ((bitmap) |= 1);
  }
  return (bitmap);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<create_zip_file>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x60,%rsp
  mov    %rdi,-0x1058(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x1010(%rbp)
  movq   $0x0,-0x1008(%rbp)
  lea    -0x1000(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x1fe,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  mov    -0x1058(%rbp),%rdx
  lea    -0x1010(%rbp),%rax
  mov    %rdx,%rcx
  lea    D11(%rip),%rdx
  mov    $0x1000,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  movq   $0x0,-0x1040(%rbp)
  movq   $0x0,-0x1038(%rbp)
  movq   $0x0,-0x1030(%rbp)
  movq   $0x0,-0x1028(%rbp)
  movq   $0x0,-0x1020(%rbp)
  lea    D0(%rip),%rax
  mov    %rax,-0x1040(%rbp)
  lea    D8(%rip),%rax
  mov    %rax,-0x1038(%rbp)
  lea    -0x1010(%rbp),%rax
  mov    %rax,-0x1030(%rbp)
  mov    -0x1058(%rbp),%rax
  mov    %rax,-0x1028(%rbp)
  movq   $0x0,-0x1020(%rbp)
  mov    $0x0,%eax
  call   <fork@plt>
  mov    %rax,-0x1048(%rbp)
  cmpq   $0x0,-0x1048(%rbp)
  jns    L23
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <Error@plt>
  jmp    L1
L23:
  cmpq   $0x0,-0x1048(%rbp)
  jne    L1
  mov    -0x1040(%rbp),%rax
  lea    -0x1040(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <execvp@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L1:
  mov    $0x0,%edi
  call   <wait@plt>
  mov    %rax,-0x1048(%rbp)
  mov    -0x1058(%rbp),%rax
  mov    %rax,%rdi
  call   <rename_directory@plt>
  mov    $0x1,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L17
  call   <__stack_chk_fail@plt>
L17:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D11
type_infered: string
name: extract_symbolic_data
arguments: label: D0
type_infered: string
name: extract_symbolic_data
arguments: label: D8
type_infered: string
name: extract_symbolic_data
arguments: label: D21
type_infered: string

tool: D11: %s.zip

tool: D0: cscript

tool: D8: zip.vbs

tool: D21: fork

assistant: ```c
bool create_zip_file(char *path) {
  char zip_file_path[4096] = {0};
  snprintf(zip_file_path, sizeof(zip_file_path), "%s.zip", path);
  char *args[5] = {0};
  args[0] = "cscript";
  args[1] = "zip.vbs";
  args[2] = zip_file_path;
  args[3] = path;
  args[4] = NULL;
  pid_t p = fork();
  if (p < 0)
    Error("fork");
  else if (p == 0) {
    execvp(args[0], args);
    exit(1);
  }
  p = wait(NULL);
  rename_directory(path);
  return true;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<create_zip_file>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x48,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x1038(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x30(%rsp)
  movq   $0x0,0x38(%rsp)
  lea    0x40(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0x30(%rsp),%rbp
  mov    %rbx,%rcx
  lea    D20(%rip),%rdx
  mov    $0x1000,%esi
  mov    %rbp,%rdi
  call   <snprintf@plt>
  movq   $0x0,0x20(%rsp)
  lea    D15(%rip),%rax
  mov    %rax,(%rsp)
  lea    D11(%rip),%rax
  mov    %rax,0x8(%rsp)
  mov    %rbp,0x10(%rsp)
  mov    %rbx,0x18(%rsp)
  mov    $0x0,%eax
  call   <fork@plt>
  test   %rax,%rax
  js     L8
  je     L34
L36:
  mov    $0x0,%edi
  call   <wait@plt>
  mov    %rbx,%rdi
  call   <rename_directory@plt>
  mov    0x1038(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  mov    $0x1,%eax
  add    $0x1048,%rsp
  pop    %rbx
  pop    %rbp
  ret
L8:
  lea    D34(%rip),%rdi
  call   <Error@plt>
  jmp    L36
L34:
  mov    %rsp,%rsi
  mov    (%rsp),%rdi
  call   <execvp@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L36
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D20
type_infered: string
name: extract_symbolic_data
arguments: tag: D15
type_infered: string
name: extract_symbolic_data
arguments: tag: D11
type_infered: string
name: extract_symbolic_data
arguments: tag: D34
type_infered: string

tool: D20: %s.zip

tool: D15: cscript

tool: D11: zip.vbs

tool: D34: fork

assistant: ```c
bool create_zip_file(char *path) {
  char zip_file_path[4096] = {0};
  snprintf(zip_file_path, sizeof(zip_file_path), "%s.zip", path);
  char *args[5] = {0};
  args[0] = "cscript";
  args[1] = "zip.vbs";
  args[2] = zip_file_path;
  args[3] = path;
  args[4] = NULL;
  pid_t p = fork();
  if (p < 0)
    Error("fork");
  else if (p == 0) {
    execvp(args[0], args);
    exit(1);
  }
  p = wait(NULL);
  rename_directory(path);
  return true;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<create_zip_file>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x48,%rsp
  mov    $0x1fe,%ecx
  pxor   %xmm0,%xmm0
  mov    $0x1000,%esi
  lea    D34(%rip),%rdx
  mov    %fs:0x28,%rax
  mov    %rax,0x1038(%rsp)
  xor    %eax,%eax
  mov    %rdi,%rbp
  lea    0x30(%rsp),%rbx
  lea    0x40(%rsp),%rdi
  movaps %xmm0,0x30(%rsp)
  rep stos %rax,%es:(%rdi)
  mov    %rbp,%rcx
  mov    %rbx,%rdi
  call   <snprintf@plt>
  lea    D30(%rip),%rax
  mov    %rbx,0x10(%rsp)
  mov    %rax,(%rsp)
  lea    D7(%rip),%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x20(%rsp)
  mov    %rbp,0x18(%rsp)
  call   <fork@plt>
  test   %rax,%rax
  js     L25
  je     L34
L22:
  xor    %edi,%edi
  call   <wait@plt>
  mov    %rbp,%rdi
  call   <rename_directory@plt>
  mov    0x1038(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L48
  add    $0x1048,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L34:
  mov    (%rsp),%rdi
  mov    %rsp,%rsi
  call   <execvp@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L22
  nopl   0x0(%rax,%rax,1)
L25:
  lea    D18(%rip),%rdi
  call   <Error@plt>
  jmp    L22
L48:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D34
data_type: string
name: disassemble_data
arguments: data_label: D30
data_type: string
name: disassemble_data
arguments: data_label: D7
data_type: string
name: disassemble_data
arguments: data_label: D18
data_type: string

tool: D34: %s.zip

tool: D30: cscript

tool: D7: zip.vbs

tool: D18: fork

assistant: ```c
bool create_zip_file(char *path) {
  char zip_file_path[4096] = {0};
  snprintf(zip_file_path, sizeof(zip_file_path), "%s.zip", path);
  char *args[5] = {0};
  args[0] = "cscript";
  args[1] = "zip.vbs";
  args[2] = zip_file_path;
  args[3] = path;
  args[4] = NULL;
  pid_t p = fork();
  if (p < 0)
    Error("fork");
  else if (p == 0) {
    execvp(args[0], args);
    exit(1);
  }
  p = wait(NULL);
  rename_directory(path);
  return true;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<create_zip_file>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x48,%rsp
  mov    $0x1fe,%ecx
  pxor   %xmm0,%xmm0
  mov    $0x1000,%esi
  lea    D1(%rip),%rdx
  mov    %fs:0x28,%rax
  mov    %rax,0x1038(%rsp)
  xor    %eax,%eax
  mov    %rdi,%rbp
  lea    0x30(%rsp),%rbx
  lea    0x40(%rsp),%rdi
  movaps %xmm0,0x30(%rsp)
  rep stos %rax,%es:(%rdi)
  mov    %rbp,%rcx
  mov    %rbx,%rdi
  call   <snprintf@plt>
  lea    D27(%rip),%rax
  mov    %rbx,0x10(%rsp)
  lea    D12(%rip),%rsi
  movq   %rax,%xmm1
  movq   %rsi,%xmm0
  xor    %eax,%eax
  movq   $0x0,0x20(%rsp)
  punpcklqdq %xmm1,%xmm0
  mov    %rbp,0x18(%rsp)
  movaps %xmm0,(%rsp)
  call   <fork@plt>
  test   %rax,%rax
  js     L16
  je     L1
L46:
  xor    %edi,%edi
  call   <wait@plt>
  mov    %rbp,%rdi
  call   <rename_directory@plt>
  mov    0x1038(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L34
  add    $0x1048,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  ret
L1:
  mov    (%rsp),%rdi
  mov    %rsp,%rsi
  call   <execvp@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L46
  nopl   0x0(%rax,%rax,1)
L16:
  lea    D17(%rip),%rdi
  call   <Error@plt>
  jmp    L46
L34:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D1
datatype: string
name: read_data
arguments: label: D27
datatype: string
name: read_data
arguments: label: D12
datatype: string
name: read_data
arguments: label: D17
datatype: string

tool: D1: %s.zip

tool: D27: zip.vbs

tool: D12: cscript

tool: D17: fork

assistant: ```c
bool create_zip_file(char *path) {
  char zip_file_path[4096] = {0};
  snprintf(zip_file_path, sizeof(zip_file_path), "%s.zip", path);
  char *args[5] = {0};
  args[0] = "cscript";
  args[1] = "zip.vbs";
  args[2] = zip_file_path;
  args[3] = path;
  args[4] = NULL;
  pid_t p = fork();
  if (p < 0)
    Error("fork");
  else if (p == 0) {
    execvp(args[0], args);
    exit(1);
  }
  p = wait(NULL);
  rename_directory(path);
  return true;
}
```