ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What would the C source look like for the assembly code provided here?

```asm
<BSVM2_NatCall_GetSigIndexG0>:
  endbr64
  push   %r12
  push   %rbp
  sub    $0x8,%rsp
  cmpb   $0x28,(%rdi)
  jne    L33
  movzbl 0x1(%rdi),%eax
  lea    0x1(%rdi),%rbp
  mov    $0x1,%r12d
  test   %al,%al
  je     L75
  cmp    $0x29,%al
  jne    L3
  jmp    L75
  nopl   0x0(%rax,%rax,1)
L8:
  lea    (%r12,%r12,2),%edx
  mov    %rbp,%rdi
  lea    (%rax,%rdx,2),%r12d
  call   <BSVM2_NatCall_SigNext@plt>
  mov    %rax,%rbp
  movzbl (%rax),%eax
  test   %al,%al
  je     L75
  cmp    $0x29,%al
  je     L68
L3:
  mov    %rbp,%rdi
  call   <BSVM2_NatCall_GetSigBType@plt>
  test   %eax,%eax
  jns    L8
L33:
  mov    $0xffffffff,%r12d
L66:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L75:
  cmp    $0x29,%al
  jne    L66
  nopl   0x0(%rax)
L68:
  lea    0x1(%rbp),%rdi
  call   <BSVM2_NatCall_GetSigBType@plt>
  test   %eax,%eax
  js     L33
  lea    (%r12,%r12,2),%edx
  add    $0x8,%rsp
  lea    (%rax,%rdx,2),%r12d
  pop    %rbp
  mov    %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
int BSVM2_NatCall_GetSigIndexG0(char *sig) {
  char *s;
  int i, j;
  if (*sig != '(')
    return (-1);
  s = sig;
  i = 1;
  if (*s == '(')
    s++;
  while (*s && (*s != ')')) {
    j = BSVM2_NatCall_GetSigBType(s);
    if (j < 0)
      return (-1);
    i = i * 6 + j;
    s = BSVM2_NatCall_SigNext(s);
  }
  if (*s == ')') {
    s++;
    j = BSVM2_NatCall_GetSigBType(s);
    if (j < 0)
      return (-1);
    i = i * 6 + j;
  }
  return (i);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<BSVM2_NatCall_GetSigIndexG0>:
  endbr64
  push   %r12
  push   %rbp
  sub    $0x8,%rsp
  cmpb   $0x28,(%rdi)
  jne    L51
  movzbl 0x1(%rdi),%eax
  lea    0x1(%rdi),%rbp
  mov    $0x1,%r12d
  test   %al,%al
  je     L53
  cmp    $0x29,%al
  jne    L23
  jmp    L53
  nopl   0x0(%rax,%rax,1)
L56:
  lea    (%r12,%r12,2),%edx
  mov    %rbp,%rdi
  lea    (%rax,%rdx,2),%r12d
  call   <BSVM2_NatCall_SigNext@plt>
  mov    %rax,%rbp
  movzbl (%rax),%eax
  test   %al,%al
  je     L53
  cmp    $0x29,%al
  je     L59
L23:
  mov    %rbp,%rdi
  call   <BSVM2_NatCall_GetSigBType@plt>
  test   %eax,%eax
  jns    L56
L51:
  mov    $0xffffffff,%r12d
L38:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L53:
  cmp    $0x29,%al
  jne    L38
  nopl   0x0(%rax)
L59:
  lea    0x1(%rbp),%rdi
  call   <BSVM2_NatCall_GetSigBType@plt>
  test   %eax,%eax
  js     L51
  lea    (%r12,%r12,2),%edx
  add    $0x8,%rsp
  lea    (%rax,%rdx,2),%r12d
  pop    %rbp
  mov    %r12d,%eax
  pop    %r12
  ret
```

assistant: ```c
int BSVM2_NatCall_GetSigIndexG0(char *sig) {
  char *s;
  int i, j;
  if (*sig != '(')
    return (-1);
  s = sig;
  i = 1;
  if (*s == '(')
    s++;
  while (*s && (*s != ')')) {
    j = BSVM2_NatCall_GetSigBType(s);
    if (j < 0)
      return (-1);
    i = i * 6 + j;
    s = BSVM2_NatCall_SigNext(s);
  }
  if (*s == ')') {
    s++;
    j = BSVM2_NatCall_GetSigBType(s);
    if (j < 0)
      return (-1);
    i = i * 6 + j;
  }
  return (i);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<RemoveFile>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x120,%rsp
  mov    %rdi,-0x118(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x118(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rcx
  lea    D5(%rip),%rdx
  lea    D16(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <system@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L6
  call   <__stack_chk_fail@plt>
L6:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D5
type_guessed: string
name: parse_data
arguments: label: D16
type_guessed: string

tool: D5: /bin/rm -f

tool: D16: %s %s

assistant: ```c
void RemoveFile(char *fileName) {
  char command[256];
  sprintf(command, "%s %s", "/bin/rm -f", fileName);
  system(command);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<RemoveFile>:
  endbr64
  push   %rbx
  sub    $0x110,%rsp
  mov    %rdi,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  lea    D18(%rip),%rdx
  lea    D15(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <system@plt>
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x110,%rsp
  pop    %rbx
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D18
type_guessed: string
name: unpack_data
arguments: data_tag: D15
type_guessed: string

tool: D18: /bin/rm -f

tool: D15: %s %s

assistant: ```c
void RemoveFile(char *fileName) {
  char command[256];
  sprintf(command, "%s %s", "/bin/rm -f", fileName);
  system(command);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<RemoveFile>:
  endbr64
  push   %rbp
  mov    %rdi,%rcx
  lea    D12(%rip),%rdx
  lea    D9(%rip),%rsi
  sub    $0x110,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x110,%rsp
  pop    %rbp
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D12
type: string
name: disassemble_data
arguments: data_label: D9
type: string

tool: D12: /bin/rm -f

tool: D9: %s %s

assistant: ```c
void RemoveFile(char *fileName) {
  char command[256];
  sprintf(command, "%s %s", "/bin/rm -f", fileName);
  system(command);
}
```
user: Translate the below assembly code into C programming language:

```asm
<RemoveFile>:
  endbr64
  push   %rbp
  mov    %rdi,%rcx
  lea    D9(%rip),%rdx
  lea    D18(%rip),%rsi
  sub    $0x110,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <system@plt>
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x110,%rsp
  pop    %rbp
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D9
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D18
type_guessed: string

tool: D9: /bin/rm -f

tool: D18: %s %s

assistant: ```c
void RemoveFile(char *fileName) {
  char command[256];
  sprintf(command, "%s %s", "/bin/rm -f", fileName);
  system(command);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<xor>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x2c(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L9
L3:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x4(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x18(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x4(%rbp)
L9:
  mov    -0x4(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L3
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void xor (char *out, char *in1, char *in2, int n) {
  int i;
  for (i = 0; i < n; i++)
    out[i] = in1[i] ^ in2[i];
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<xor>:
  endbr64
  test   %ecx,%ecx
  jle    L0
  mov    %ecx,%ecx
  mov    $0x0,%eax
L13:
  movzbl (%rsi,%rax,1),%r8d
  xor    (%rdx,%rax,1),%r8b
  mov    %r8b,(%rdi,%rax,1)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L13
L0:
  ret
```

assistant: ```c
void xor (char *out, char *in1, char *in2, int n) {
  int i;
  for (i = 0; i < n; i++)
    out[i] = in1[i] ^ in2[i];
}
```
user: Demonstrate the C code that generates the assembly output below:

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

assistant: ```c
void xor (char *out, char *in1, char *in2, int n) {
  int i;
  for (i = 0; i < n; i++)
    out[i] = in1[i] ^ in2[i];
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<xor>:
  endbr64
  test   %ecx,%ecx
  jle    L76
  lea    0x1(%rsi),%r10
  mov    %rdi,%r8
  lea    -0x1(%rcx),%eax
  mov    %ecx,%r9d
  sub    %r10,%r8
  cmp    $0xe,%r8
  seta   %r10b
  cmp    $0x6,%eax
  seta   %r8b
  test   %r8b,%r10b
  je     L94
  lea    0x1(%rdx),%r10
  mov    %rdi,%r8
  sub    %r10,%r8
  cmp    $0xe,%r8
  jbe    L94
  cmp    $0xe,%eax
  jbe    L143
  mov    %ecx,%r8d
  xor    %eax,%eax
  shr    $0x4,%r8d
  shl    $0x4,%r8
  xchg   %ax,%ax
L129:
  movdqu (%rsi,%rax,1),%xmm0
  movdqu (%rdx,%rax,1),%xmm2
  pxor   %xmm2,%xmm0
  movups %xmm0,(%rdi,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%r8
  jne    L129
  mov    %ecx,%eax
  and    $0xfffffff0,%eax
  mov    %eax,%r8d
  cmp    %eax,%ecx
  je     L76
  mov    %ecx,%r9d
  sub    %eax,%r9d
  lea    -0x1(%r9),%r10d
  cmp    $0x6,%r10d
  jbe    L2
L17:
  movq   (%rsi,%rax,1),%xmm0
  movq   (%rdx,%rax,1),%xmm1
  pxor   %xmm1,%xmm0
  movq   %xmm0,(%rdi,%rax,1)
  mov    %r9d,%eax
  and    $0xfffffff8,%eax
  add    %eax,%r8d
  cmp    %eax,%r9d
  je     L76
L2:
  movslq %r8d,%rax
  movzbl (%rsi,%rax,1),%r9d
  xor    (%rdx,%rax,1),%r9b
  mov    %r9b,(%rdi,%rax,1)
  lea    0x1(%r8),%eax
  cmp    %eax,%ecx
  jle    L76
  cltq
  movzbl (%rsi,%rax,1),%r9d
  xor    (%rdx,%rax,1),%r9b
  mov    %r9b,(%rdi,%rax,1)
  lea    0x2(%r8),%eax
  cmp    %eax,%ecx
  jle    L76
  cltq
  movzbl (%rsi,%rax,1),%r9d
  xor    (%rdx,%rax,1),%r9b
  mov    %r9b,(%rdi,%rax,1)
  lea    0x3(%r8),%eax
  cmp    %eax,%ecx
  jle    L76
  cltq
  movzbl (%rsi,%rax,1),%r9d
  xor    (%rdx,%rax,1),%r9b
  mov    %r9b,(%rdi,%rax,1)
  lea    0x4(%r8),%eax
  cmp    %eax,%ecx
  jle    L76
  cltq
  movzbl (%rsi,%rax,1),%r9d
  xor    (%rdx,%rax,1),%r9b
  mov    %r9b,(%rdi,%rax,1)
  lea    0x5(%r8),%eax
  cmp    %eax,%ecx
  jle    L76
  cltq
  add    $0x6,%r8d
  movzbl (%rsi,%rax,1),%r9d
  xor    (%rdx,%rax,1),%r9b
  mov    %r9b,(%rdi,%rax,1)
  cmp    %r8d,%ecx
  jle    L76
  movslq %r8d,%r8
  movzbl (%rsi,%r8,1),%eax
  xor    (%rdx,%r8,1),%al
  mov    %al,(%rdi,%r8,1)
  ret
  nopl   (%rax)
L94:
  mov    %ecx,%ecx
  xor    %eax,%eax
  nopl   0x0(%rax)
L53:
  movzbl (%rsi,%rax,1),%r8d
  xor    (%rdx,%rax,1),%r8b
  mov    %r8b,(%rdi,%rax,1)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L53
L76:
  ret
L143:
  xor    %eax,%eax
  xor    %r8d,%r8d
  jmp    L17
```

assistant: ```c
void xor (char *out, char *in1, char *in2, int n) {
  int i;
  for (i = 0; i < n; i++)
    out[i] = in1[i] ^ in2[i];
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<scale>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x1c(%rbp),%eax
  imul   -0x20(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L3
L7:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x8(%rbp)
L3:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L7
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void scale(double *A, int rows, int cols, double alpha) {
  int N, i;
  N = rows * cols;
  for (i = 0; i < N; ++i) {
    A[i] = alpha * A[i];
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<scale>:
  endbr64
  imul   %edx,%esi
  test   %esi,%esi
  jle    L8
  mov    %rdi,%rax
  lea    -0x1(%rsi),%edx
  lea    0x8(%rdi,%rdx,8),%rdx
L7:
  movapd %xmm0,%xmm1
  mulsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L7
L8:
  ret
```

assistant: ```c
void scale(double *A, int rows, int cols, double alpha) {
  int N, i;
  N = rows * cols;
  for (i = 0; i < N; ++i) {
    A[i] = alpha * A[i];
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<scale>:
  endbr64
  imul   %edx,%esi
  test   %esi,%esi
  jle    L12
  lea    -0x1(%rsi),%eax
  lea    0x8(%rdi,%rax,8),%rax
  nopl   0x0(%rax,%rax,1)
L9:
  movsd  (%rdi),%xmm1
  add    $0x8,%rdi
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,-0x8(%rdi)
  cmp    %rax,%rdi
  jne    L9
L12:
  ret
```

assistant: ```c
void scale(double *A, int rows, int cols, double alpha) {
  int N, i;
  N = rows * cols;
  for (i = 0; i < N; ++i) {
    A[i] = alpha * A[i];
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<scale>:
  endbr64
  imul   %edx,%esi
  test   %esi,%esi
  jle    L22
  cmp    $0x1,%esi
  je     L10
  mov    %esi,%edx
  movapd %xmm0,%xmm2
  mov    %rdi,%rax
  shr    %edx
  unpcklpd %xmm2,%xmm2
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rdi,%rdx,1),%rdx
  nopl   0x0(%rax,%rax,1)
L4:
  movupd (%rax),%xmm1
  add    $0x10,%rax
  mulpd  %xmm2,%xmm1
  movups %xmm1,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L4
  mov    %esi,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%esi
  je     L11
L9:
  cltq
  lea    (%rdi,%rax,8),%rax
  mulsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
L22:
  ret
  xchg   %ax,%ax
L11:
  ret
L10:
  xor    %eax,%eax
  jmp    L9
```

assistant: ```c
void scale(double *A, int rows, int cols, double alpha) {
  int N, i;
  N = rows * cols;
  for (i = 0; i < N; ++i) {
    A[i] = alpha * A[i];
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<ReinitializeMusic>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <InitMusicInfo@plt>
  mov    $0x0,%eax
  call   <InitGameModeMusicInfo@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void ReinitializeMusic() {
  InitMusicInfo();
  InitGameModeMusicInfo();
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<ReinitializeMusic>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <InitMusicInfo@plt>
  mov    $0x0,%eax
  call   <InitGameModeMusicInfo@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void ReinitializeMusic() {
  InitMusicInfo();
  InitGameModeMusicInfo();
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<ReinitializeMusic>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <InitMusicInfo@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1070 <InitGameModeMusicInfo@plt>
```

assistant: ```c
void ReinitializeMusic() {
  InitMusicInfo();
  InitGameModeMusicInfo();
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<ReinitializeMusic>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <InitMusicInfo@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  jmp    1070 <InitGameModeMusicInfo@plt>
```

assistant: ```c
void ReinitializeMusic() {
  InitMusicInfo();
  InitGameModeMusicInfo();
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<parse_date_elements>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    $0x30,%edx
  mov    $0x0,%esi
  lea    D88(%rip),%rax
  mov    %rax,%rdi
  call   <memset@plt>
  cmpq   $0x0,-0x18(%rbp)
  je     L13
  cmpq   $0x0,-0x20(%rbp)
  je     L13
  cmpq   $0x0,-0x28(%rbp)
  je     L13
  cmpq   $0x0,-0x30(%rbp)
  jne    L15
L13:
  mov    $0x0,%eax
  jmp    L134
L15:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %rax,D169(%rip)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <make_month@plt>
  mov    %rax,D158(%rip)
  mov    D158(%rip),%rax
  test   %rax,%rax
  jns    L32
  mov    $0x0,%eax
  jmp    L134
L32:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,D158(%rip)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x4,%eax
  jne    L90
  mov    D158(%rip),%eax
  sub    $0x76c,%eax
  mov    %eax,D132(%rip)
  jmp    L41
L90:
  mov    D132(%rip),%eax
  cmp    $0x45,%eax
  jg     L82
  mov    D132(%rip),%eax
  add    $0x64,%eax
  mov    %eax,D132(%rip)
  jmp    L41
L82:
  mov    D132(%rip),%eax
  cmp    $0x4a38,%eax
  jle    L41
  mov    D132(%rip),%eax
  sub    $0x4a38,%eax
  mov    %eax,D132(%rip)
L41:
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,D132(%rip)
  mov    -0x30(%rbp),%rax
  mov    $0x3a,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L121
  mov    $0x0,%eax
  jmp    L134
L121:
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %rax,D74(%rip)
  mov    -0x8(%rbp),%rax
  mov    $0x3a,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L36
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %rax,D5(%rip)
L36:
  lea    D158(%rip),%rax
  mov    %rax,%rdi
  call   <tmSaneValues@plt>
  test   %rax,%rax
  je     L149
  lea    D158(%rip),%rax
  jmp    L134
L149:
  mov    $0x0,%eax
L134:
  leave
  ret
```

assistant: ```c
struct tm *parse_date_elements(const char *day, const char *month, const char *year, const char *time, const char *zone) {
  static struct tm tm;
  char *t;
  memset(&tm, 0, sizeof(tm));
  if (!day || !month || !year || !time)
    return NULL;
  tm.tm_mday = atoi(day);
  tm.tm_mon = make_month(month);
  if (tm.tm_mon < 0)
    return NULL;
  tm.tm_year = atoi(year);
  if (strlen(year) == 4)
    tm.tm_year -= 1900;
  else if (tm.tm_year < 70)
    tm.tm_year += 100;
  else if (tm.tm_year > 19000)
    tm.tm_year -= 19000;
  tm.tm_hour = make_num(time);
  t = strchr(time, ':');
  if (!t)
    return NULL;
  t++;
  tm.tm_min = atoi(t);
  t = strchr(t, ':');
  if (t)
    tm.tm_sec = atoi(t + 1);
  return tmSaneValues(&tm) ? &tm : NULL;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<parse_date_elements>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %rdx,%rbx
  mov    %rcx,%rbp
  mov    $0x30,%edx
  mov    $0x0,%esi
  lea    D26(%rip),%rdi
  call   <memset@plt>
  test   %r12,%r12
  je     L62
  test   %r13,%r13
  je     L62
  test   %rbx,%rbx
  je     L51
  test   %rbp,%rbp
  je     L51
  mov    %r12,%rdi
  call   <atoi@plt>
  mov    %rax,D117(%rip)
  mov    %r13,%rdi
  call   <make_month@plt>
  mov    %rax,%rdx
  mov    %rax,D79(%rip)
  mov    $0x0,%eax
  test   %rdx,%rdx
  js     L66
  mov    %rbx,%rdi
  call   <atoi@plt>
  mov    %eax,D79(%rip)
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    $0x4,%eax
  je     L80
  mov    D79(%rip),%eax
  cmp    $0x45,%eax
  jg     L32
  add    $0x64,%eax
  mov    %eax,D111(%rip)
  jmp    L94
L80:
  subl   $0x76c,D111(%rip)
L94:
  mov    %rbp,%rdi
  call   <make_num@plt>
  mov    %eax,D111(%rip)
  mov    $0x3a,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L66
  lea    0x1(%rax),%rbx
  mov    %rbx,%rdi
  call   <atoi@plt>
  mov    %rax,D29(%rip)
  mov    $0x3a,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L50
  lea    0x1(%rax),%rdi
  call   <atoi@plt>
  mov    %rax,D83(%rip)
L50:
  lea    D79(%rip),%rdi
  call   <tmSaneValues@plt>
  test   %rax,%rax
  lea    D79(%rip),%rax
  mov    $0x0,%edx
  cmove  %rdx,%rax
L66:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L32:
  cmp    $0x4a38,%eax
  jle    L94
  sub    $0x4a38,%eax
  mov    %eax,D42(%rip)
  jmp    L94
L62:
  mov    $0x0,%eax
  jmp    L66
L51:
  mov    $0x0,%eax
  jmp    L66
```

assistant: ```c
struct tm *parse_date_elements(const char *day, const char *month, const char *year, const char *time, const char *zone) {
  static struct tm tm;
  char *t;
  memset(&tm, 0, sizeof(tm));
  if (!day || !month || !year || !time)
    return NULL;
  tm.tm_mday = atoi(day);
  tm.tm_mon = make_month(month);
  if (tm.tm_mon < 0)
    return NULL;
  tm.tm_year = atoi(year);
  if (strlen(year) == 4)
    tm.tm_year -= 1900;
  else if (tm.tm_year < 70)
    tm.tm_year += 100;
  else if (tm.tm_year > 19000)
    tm.tm_year -= 19000;
  tm.tm_hour = make_num(time);
  t = strchr(time, ':');
  if (!t)
    return NULL;
  t++;
  tm.tm_min = atoi(t);
  t = strchr(t, ':');
  if (t)
    tm.tm_sec = atoi(t + 1);
  return tmSaneValues(&tm) ? &tm : NULL;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<parse_date_elements>:
  endbr64
  push   %r15
  lea    D58(%rip),%r15
  push   %r14
  mov    %rsi,%r14
  xor    %esi,%esi
  push   %r13
  mov    %rdi,%r13
  mov    %r15,%rdi
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rdx,%rbp
  mov    $0x30,%edx
  call   <memset@plt>
  test   %r13,%r13
  je     L116
  test   %r14,%r14
  je     L116
  test   %rbp,%rbp
  je     L116
  test   %r12,%r12
  je     L116
  mov    %r13,%rdi
  call   <atoi@plt>
  mov    %r14,%rdi
  mov    %rax,D3(%rip)
  call   <make_month@plt>
  mov    %rax,D82(%rip)
  test   %rax,%rax
  js     L116
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    %rbp,%rdi
  mov    %eax,D82(%rip)
  call   <strlen@plt>
  cmp    $0x4,%eax
  je     L51
  mov    D82(%rip),%eax
  cmp    $0x45,%eax
  jle    L75
  cmp    $0x4a38,%eax
  jle    L110
  sub    $0x4a38,%eax
  mov    %eax,D2(%rip)
  nopw   0x0(%rax,%rax,1)
L110:
  mov    %r12,%rdi
  call   <make_num@plt>
  mov    $0x3a,%esi
  mov    %r12,%rdi
  mov    %eax,D2(%rip)
  call   <strchr@plt>
  test   %rax,%rax
  je     L116
  lea    0x1(%rax),%rbp
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    $0x3a,%esi
  mov    %rbp,%rdi
  mov    %rax,D19(%rip)
  call   <strchr@plt>
  test   %rax,%rax
  je     L120
  lea    0x1(%rax),%rdi
  call   <atoi@plt>
  mov    %rax,D85(%rip)
L120:
  mov    %r15,%rdi
  call   <tmSaneValues@plt>
  mov    %rax,%r8
  lea    D82(%rip),%rax
  test   %r8,%r8
  jne    L85
  nopl   0x0(%rax)
L116:
  xor    %eax,%eax
L85:
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L75:
  add    $0x64,%eax
  mov    %eax,D90(%rip)
  jmp    L110
  xchg   %ax,%ax
L51:
  subl   $0x76c,D90(%rip)
  jmp    L110
```

assistant: ```c
struct tm *parse_date_elements(const char *day, const char *month, const char *year, const char *time, const char *zone) {
  static struct tm tm;
  char *t;
  memset(&tm, 0, sizeof(tm));
  if (!day || !month || !year || !time)
    return NULL;
  tm.tm_mday = atoi(day);
  tm.tm_mon = make_month(month);
  if (tm.tm_mon < 0)
    return NULL;
  tm.tm_year = atoi(year);
  if (strlen(year) == 4)
    tm.tm_year -= 1900;
  else if (tm.tm_year < 70)
    tm.tm_year += 100;
  else if (tm.tm_year > 19000)
    tm.tm_year -= 19000;
  tm.tm_hour = make_num(time);
  t = strchr(time, ':');
  if (!t)
    return NULL;
  t++;
  tm.tm_min = atoi(t);
  t = strchr(t, ':');
  if (t)
    tm.tm_sec = atoi(t + 1);
  return tmSaneValues(&tm) ? &tm : NULL;
}
```