ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Converte this assembly snippet into its equivalent C code:

```asm
<sutNormalizeVector3>:
  endbr64
  sub    $0x28,%rsp
  movq   (%rdi),%xmm3
  movss  (%rdi),%xmm0
  movss  0x8(%rdi),%xmm1
  mulss  %xmm0,%xmm0
  movaps %xmm3,%xmm4
  shufps $0xe5,%xmm4,%xmm4
  movaps %xmm4,%xmm2
  mulss  %xmm4,%xmm2
  addss  %xmm2,%xmm0
  movaps %xmm1,%xmm2
  mulss  %xmm1,%xmm2
  addss  %xmm2,%xmm0
  pxor   %xmm2,%xmm2
  ucomiss %xmm0,%xmm2
  ja     L4
  sqrtss %xmm0,%xmm0
L38:
  ucomiss %xmm2,%xmm0
  jp     L5
  jne    L5
  movlps %xmm3,(%rdi)
  movss  %xmm1,0x8(%rdi)
  add    $0x28,%rsp
  ret
  nopw   0x0(%rax,%rax,1)
L5:
  movss  D3(%rip),%xmm2
  divss  %xmm0,%xmm2
  mulss  %xmm2,%xmm1
  movaps %xmm2,%xmm0
  shufps $0xe0,%xmm0,%xmm0
  mulps  %xmm0,%xmm3
  movss  %xmm1,0x8(%rdi)
  movlps %xmm3,(%rdi)
  add    $0x28,%rsp
  ret
L4:
  mov    %rdi,0x18(%rsp)
  movlps %xmm3,0x10(%rsp)
  movss  %xmm1,0xc(%rsp)
  call   <sqrtf@plt>
  mov    0x18(%rsp),%rdi
  movq   0x10(%rsp),%xmm3
  pxor   %xmm2,%xmm2
  movss  0xc(%rsp),%xmm1
  jmp    L38
```

tool_calls: name: unpack_data
arguments: tag: D3
type_infered: f32

tool: D3: 1

assistant: ```c
void sutNormalizeVector3(float *inVector) {
  float len = sqrtf(inVector[0] * inVector[0] + inVector[1] * inVector[1] + inVector[2] * inVector[2]);
  float invLen = (len == 0.0f) ? 1.0f : 1.0f / len;
  inVector[0] *= invLen;
  inVector[1] *= invLen;
  inVector[2] *= invLen;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<ighmm_invert_det>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %edx,-0x14(%rbp)
  mov    %rcx,-0x20(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <ighmm_determinant@plt>
  movq   %xmm0,%rax
  mov    -0x10(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rsi
  mov    -0x8(%rbp),%rdx
  mov    -0x14(%rbp),%ecx
  mov    -0x20(%rbp),%rax
  movq   %rsi,%xmm0
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <ighmm_inverse@plt>
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
int ighmm_invert_det(double *sigmainv, double *det, int length, double *cov) {
  *det = ighmm_determinant(cov, length);
  ighmm_inverse(cov, length, *det, sigmainv);
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<ighmm_invert_det>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %edx,%ebp
  mov    %rcx,%rbx
  mov    %edx,%esi
  mov    %rcx,%rdi
  call   <ighmm_determinant@plt>
  movsd  %xmm0,0x0(%r13)
  mov    %r12,%rdx
  mov    %ebp,%esi
  mov    %rbx,%rdi
  call   <ighmm_inverse@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
int ighmm_invert_det(double *sigmainv, double *det, int length, double *cov) {
  *det = ighmm_determinant(cov, length);
  ighmm_inverse(cov, length, *det, sigmainv);
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<ighmm_invert_det>:
  endbr64
  push   %r13
  mov    %rdi,%r13
  mov    %rcx,%rdi
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    %edx,%esi
  sub    $0x8,%rsp
  call   <ighmm_determinant@plt>
  mov    %r13,%rdx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  movsd  %xmm0,(%rbx)
  call   <ighmm_inverse@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
int ighmm_invert_det(double *sigmainv, double *det, int length, double *cov) {
  *det = ighmm_determinant(cov, length);
  ighmm_inverse(cov, length, *det, sigmainv);
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<ighmm_invert_det>:
  endbr64
  push   %r13
  mov    %rdi,%r13
  mov    %rcx,%rdi
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    %edx,%esi
  sub    $0x8,%rsp
  call   <ighmm_determinant@plt>
  mov    %r13,%rdx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  movsd  %xmm0,(%rbx)
  call   <ighmm_inverse@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
int ighmm_invert_det(double *sigmainv, double *det, int length, double *cov) {
  *det = ighmm_determinant(cov, length);
  ighmm_inverse(cov, length, *det, sigmainv);
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<HibernateRTCEnable>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x400fc010,%eax
  mov    (%rax),%rax
  mov    $0x400fc010,%edx
  or     $0x1,%rax
  mov    %rax,(%rdx)
  mov    $0x0,%eax
  call   <_HibernateWriteComplete@plt>
  nop
  pop    %rbp
  ret
```

assistant: ```c
void HibernateRTCEnable(void) {
  (*((volatile unsigned long *)(0x400FC010))) |= 0x00000001;
  _HibernateWriteComplete();
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<HibernateRTCEnable>:
  endbr64
  sub    $0x8,%rsp
  mov    0x400fc010,%rax
  or     $0x1,%rax
  mov    %rax,0x400fc010
  mov    $0x0,%eax
  call   <_HibernateWriteComplete@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
void HibernateRTCEnable(void) {
  (*((volatile unsigned long *)(0x400FC010))) |= 0x00000001;
  _HibernateWriteComplete();
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<HibernateRTCEnable>:
  endbr64
  mov    0x400fc010,%rax
  or     $0x1,%rax
  mov    %rax,0x400fc010
  xor    %eax,%eax
  jmp    1050 <_HibernateWriteComplete@plt>
```

assistant: ```c
void HibernateRTCEnable(void) {
  (*((volatile unsigned long *)(0x400FC010))) |= 0x00000001;
  _HibernateWriteComplete();
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<HibernateRTCEnable>:
  endbr64
  mov    0x400fc010,%rax
  or     $0x1,%rax
  mov    %rax,0x400fc010
  xor    %eax,%eax
  jmp    1050 <_HibernateWriteComplete@plt>
```

assistant: ```c
void HibernateRTCEnable(void) {
  (*((volatile unsigned long *)(0x400FC010))) |= 0x00000001;
  _HibernateWriteComplete();
}
```
user: What is the c source code of the assembly code below?

```asm
<inc_filename>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0x1,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L38
L44:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L85
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jg     L85
  movl   $0x1,-0x4(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  je     L56
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x38,%al
  jg     L9
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  add    $0x1,%edx
  mov    %dl,(%rax)
  movl   $0x0,-0x8(%rbp)
  jmp    L19
L9:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x30,(%rax)
  movl   $0x1,-0x8(%rbp)
  jmp    L19
L85:
  cmpl   $0x0,-0x4(%rbp)
  jne    L51
L19:
  subl   $0x1,-0xc(%rbp)
L38:
  cmpl   $0x0,-0xc(%rbp)
  jns    L44
  jmp    L97
L56:
  nop
  jmp    L97
L51:
  nop
L97:
  cmpl   $0x0,-0x8(%rbp)
  sete   %al
  movzbl %al,%eax
  leave
  ret
```

assistant: ```c
int inc_filename(char *name) {
  int i, carry, done;
  carry = 1;
  done = 0;
  for (i = strlen(name) - 1; i >= 0; i--) {
    if ((name[i] >= '0') && (name[i] <= '9')) {
      done = 1;
      if (carry) {
        if (name[i] < '9') {
          name[i]++;
          carry = 0;
        } else {
          name[i] = '0';
          carry = 1;
        }
      } else {
        break;
      }
    } else {
      if (done)
        break;
    }
  }
  return !carry;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<inc_filename>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  mov    %eax,%edx
  sub    $0x1,%edx
  js     L37
  movslq %edx,%rdx
  add    %rbx,%rdx
  movslq %eax,%rcx
  lea    -0x2(%rbx,%rcx,1),%r8
  lea    -0x1(%rax),%eax
  sub    %rax,%r8
  mov    $0x0,%r9d
  mov    $0x1,%eax
  mov    $0x0,%r10d
  jmp    L9
L82:
  movb   $0x30,(%rdx)
  mov    %eax,%r9d
  jmp    L40
L1:
  test   %r9d,%r9d
  jne    L59
L40:
  sub    $0x1,%rdx
  cmp    %r8,%rdx
  je     L59
L9:
  movzbl (%rdx),%ecx
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  ja     L1
  test   %eax,%eax
  je     L59
  cmp    $0x38,%cl
  jg     L82
  add    $0x1,%ecx
  mov    %cl,(%rdx)
  mov    %eax,%r9d
  mov    %r10d,%eax
  jmp    L40
L37:
  mov    $0x1,%eax
L59:
  xor    $0x1,%eax
  pop    %rbx
  ret
```

assistant: ```c
int inc_filename(char *name) {
  int i, carry, done;
  carry = 1;
  done = 0;
  for (i = strlen(name) - 1; i >= 0; i--) {
    if ((name[i] >= '0') && (name[i] <= '9')) {
      done = 1;
      if (carry) {
        if (name[i] < '9') {
          name[i]++;
          carry = 0;
        } else {
          name[i] = '0';
          carry = 1;
        }
      } else {
        break;
      }
    } else {
      if (done)
        break;
    }
  }
  return !carry;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<inc_filename>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  mov    %eax,%ecx
  sub    $0x1,%ecx
  js     L28
  cltq
  movslq %ecx,%rdx
  mov    %ecx,%ecx
  xor    %r8d,%r8d
  lea    -0x2(%rbx,%rax,1),%rdi
  add    %rbx,%rdx
  mov    $0x1,%eax
  sub    %rcx,%rdi
  jmp    L10
L48:
  test   %eax,%eax
  je     L6
  cmp    $0x39,%cl
  je     L34
  add    $0x1,%ecx
  mov    %eax,%r8d
  xor    %eax,%eax
  mov    %cl,(%rdx)
L68:
  sub    $0x1,%rdx
  cmp    %rdi,%rdx
  je     L36
L10:
  movzbl (%rdx),%ecx
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  jbe    L48
  test   %r8d,%r8d
  je     L68
L36:
  xor    $0x1,%eax
  pop    %rbx
  ret
  nopw   0x0(%rax,%rax,1)
L34:
  movb   $0x30,(%rdx)
  mov    %eax,%r8d
  jmp    L68
L6:
  mov    $0x1,%eax
  pop    %rbx
  ret
L28:
  xor    %eax,%eax
  pop    %rbx
  ret
```

assistant: ```c
int inc_filename(char *name) {
  int i, carry, done;
  carry = 1;
  done = 0;
  for (i = strlen(name) - 1; i >= 0; i--) {
    if ((name[i] >= '0') && (name[i] <= '9')) {
      done = 1;
      if (carry) {
        if (name[i] < '9') {
          name[i]++;
          carry = 0;
        } else {
          name[i] = '0';
          carry = 1;
        }
      } else {
        break;
      }
    } else {
      if (done)
        break;
    }
  }
  return !carry;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<inc_filename>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  mov    %eax,%ecx
  sub    $0x1,%ecx
  js     L62
  cltq
  movslq %ecx,%rdx
  mov    %ecx,%ecx
  xor    %r8d,%r8d
  lea    -0x2(%rbx,%rax,1),%rdi
  add    %rbx,%rdx
  mov    $0x1,%eax
  sub    %rcx,%rdi
  jmp    L18
L78:
  test   %eax,%eax
  je     L77
  cmp    $0x39,%cl
  je     L23
  add    $0x1,%ecx
  mov    %eax,%r8d
  xor    %eax,%eax
  mov    %cl,(%rdx)
L29:
  sub    $0x1,%rdx
  cmp    %rdi,%rdx
  je     L34
L18:
  movzbl (%rdx),%ecx
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  jbe    L78
  test   %r8d,%r8d
  je     L29
L34:
  xor    $0x1,%eax
  pop    %rbx
  ret
  nopw   0x0(%rax,%rax,1)
L23:
  movb   $0x30,(%rdx)
  mov    %eax,%r8d
  jmp    L29
L77:
  mov    $0x1,%eax
  pop    %rbx
  ret
L62:
  xor    %eax,%eax
  pop    %rbx
  ret
```

assistant: ```c
int inc_filename(char *name) {
  int i, carry, done;
  carry = 1;
  done = 0;
  for (i = strlen(name) - 1; i >= 0; i--) {
    if ((name[i] >= '0') && (name[i] <= '9')) {
      done = 1;
      if (carry) {
        if (name[i] < '9') {
          name[i]++;
          carry = 0;
        } else {
          name[i] = '0';
          carry = 1;
        }
      } else {
        break;
      }
    } else {
      if (done)
        break;
    }
  }
  return !carry;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<LCDClearScreen>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    $0x75,%edi
  call   <WriteSpiCommand@plt>
  mov    $0x0,%edi
  call   <WriteSpiData@plt>
  mov    $0x83,%edi
  call   <WriteSpiData@plt>
  mov    $0x15,%edi
  call   <WriteSpiCommand@plt>
  mov    $0x0,%edi
  call   <WriteSpiData@plt>
  mov    $0x83,%edi
  call   <WriteSpiData@plt>
  mov    $0x5c,%edi
  call   <WriteSpiCommand@plt>
  movq   $0x0,-0x8(%rbp)
  jmp    L10
L13:
  mov    $0x0,%edi
  call   <WriteSpiData@plt>
  mov    $0x0,%edi
  call   <WriteSpiData@plt>
  mov    $0x0,%edi
  call   <WriteSpiData@plt>
  addq   $0x1,-0x8(%rbp)
L10:
  cmpq   $0x2183,-0x8(%rbp)
  jle    L13
  nop
  nop
  leave
  ret
```

assistant: ```c
void LCDClearScreen(void) {
  long i;
  WriteSpiCommand(0x75);
  WriteSpiData(0);
  WriteSpiData(131);
  WriteSpiCommand(0x15);
  WriteSpiData(0);
  WriteSpiData(131);
  WriteSpiCommand(0x5C);
  for (i = 0; i < ((131 * 131) / 2); i++) {
    WriteSpiData((0x000 >> 4) & 0xFF);
    WriteSpiData(((0x000 & 0xF) << 4) | ((0x000 >> 8) & 0xF));
    WriteSpiData(0x000 & 0xFF);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<LCDClearScreen>:
  endbr64
  push   %rbx
  mov    $0x75,%edi
  call   <WriteSpiCommand@plt>
  mov    $0x0,%edi
  call   <WriteSpiData@plt>
  mov    $0x83,%edi
  call   <WriteSpiData@plt>
  mov    $0x15,%edi
  call   <WriteSpiCommand@plt>
  mov    $0x0,%edi
  call   <WriteSpiData@plt>
  mov    $0x83,%edi
  call   <WriteSpiData@plt>
  mov    $0x5c,%edi
  call   <WriteSpiCommand@plt>
  mov    $0x2184,%ebx
L1:
  mov    $0x0,%edi
  call   <WriteSpiData@plt>
  mov    $0x0,%edi
  call   <WriteSpiData@plt>
  mov    $0x0,%edi
  call   <WriteSpiData@plt>
  sub    $0x1,%rbx
  jne    L1
  pop    %rbx
  ret
```

assistant: ```c
void LCDClearScreen(void) {
  long i;
  WriteSpiCommand(0x75);
  WriteSpiData(0);
  WriteSpiData(131);
  WriteSpiCommand(0x15);
  WriteSpiData(0);
  WriteSpiData(131);
  WriteSpiCommand(0x5C);
  for (i = 0; i < ((131 * 131) / 2); i++) {
    WriteSpiData((0x000 >> 4) & 0xFF);
    WriteSpiData(((0x000 & 0xF) << 4) | ((0x000 >> 8) & 0xF));
    WriteSpiData(0x000 & 0xFF);
  }
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<LCDClearScreen>:
  endbr64
  push   %rbx
  mov    $0x75,%edi
  mov    $0x2184,%ebx
  call   <WriteSpiCommand@plt>
  xor    %edi,%edi
  call   <WriteSpiData@plt>
  mov    $0x83,%edi
  call   <WriteSpiData@plt>
  mov    $0x15,%edi
  call   <WriteSpiCommand@plt>
  xor    %edi,%edi
  call   <WriteSpiData@plt>
  mov    $0x83,%edi
  call   <WriteSpiData@plt>
  mov    $0x5c,%edi
  call   <WriteSpiCommand@plt>
  nopw   0x0(%rax,%rax,1)
L5:
  xor    %edi,%edi
  call   <WriteSpiData@plt>
  xor    %edi,%edi
  call   <WriteSpiData@plt>
  xor    %edi,%edi
  call   <WriteSpiData@plt>
  sub    $0x1,%rbx
  jne    L5
  pop    %rbx
  ret
```

assistant: ```c
void LCDClearScreen(void) {
  long i;
  WriteSpiCommand(0x75);
  WriteSpiData(0);
  WriteSpiData(131);
  WriteSpiCommand(0x15);
  WriteSpiData(0);
  WriteSpiData(131);
  WriteSpiCommand(0x5C);
  for (i = 0; i < ((131 * 131) / 2); i++) {
    WriteSpiData((0x000 >> 4) & 0xFF);
    WriteSpiData(((0x000 & 0xF) << 4) | ((0x000 >> 8) & 0xF));
    WriteSpiData(0x000 & 0xFF);
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<LCDClearScreen>:
  endbr64
  push   %rbx
  mov    $0x75,%edi
  mov    $0x2184,%ebx
  call   <WriteSpiCommand@plt>
  xor    %edi,%edi
  call   <WriteSpiData@plt>
  mov    $0x83,%edi
  call   <WriteSpiData@plt>
  mov    $0x15,%edi
  call   <WriteSpiCommand@plt>
  xor    %edi,%edi
  call   <WriteSpiData@plt>
  mov    $0x83,%edi
  call   <WriteSpiData@plt>
  mov    $0x5c,%edi
  call   <WriteSpiCommand@plt>
  nopw   0x0(%rax,%rax,1)
L5:
  xor    %edi,%edi
  call   <WriteSpiData@plt>
  xor    %edi,%edi
  call   <WriteSpiData@plt>
  xor    %edi,%edi
  call   <WriteSpiData@plt>
  sub    $0x1,%rbx
  jne    L5
  pop    %rbx
  ret
```

assistant: ```c
void LCDClearScreen(void) {
  long i;
  WriteSpiCommand(0x75);
  WriteSpiData(0);
  WriteSpiData(131);
  WriteSpiCommand(0x15);
  WriteSpiData(0);
  WriteSpiData(131);
  WriteSpiCommand(0x5C);
  for (i = 0; i < ((131 * 131) / 2); i++) {
    WriteSpiData((0x000 >> 4) & 0xFF);
    WriteSpiData(((0x000 & 0xF) << 4) | ((0x000 >> 8) & 0xF));
    WriteSpiData(0x000 & 0xFF);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<OPENSSL_gmtime_diff>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x2c(%rbp),%rcx
  lea    -0x20(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <julian_adj@plt>
  test   %eax,%eax
  jne    L88
  mov    $0x0,%eax
  jmp    L53
L88:
  lea    -0x28(%rbp),%rcx
  lea    -0x18(%rbp),%rdx
  mov    -0x50(%rbp),%rax
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <julian_adj@plt>
  test   %eax,%eax
  jne    L58
  mov    $0x0,%eax
  jmp    L53
L58:
  mov    -0x18(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  sub    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%eax
  mov    -0x2c(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,-0x24(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jle    L18
  cmpl   $0x0,-0x24(%rbp)
  jns    L18
  subq   $0x1,-0x10(%rbp)
  addl   $0x15180,-0x24(%rbp)
L18:
  cmpq   $0x0,-0x10(%rbp)
  jns    L0
  cmpl   $0x0,-0x24(%rbp)
  jle    L0
  addq   $0x1,-0x10(%rbp)
  subl   $0x15180,-0x24(%rbp)
L0:
  cmpq   $0x0,-0x38(%rbp)
  je     L65
  mov    -0x10(%rbp),%rax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
L65:
  cmpq   $0x0,-0x40(%rbp)
  je     L29
  mov    -0x40(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
L29:
  mov    $0x1,%eax
L53:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L78
  call   <__stack_chk_fail@plt>
L78:
  leave
  ret
```

assistant: ```c
int OPENSSL_gmtime_diff(int *pday, int *psec, const struct tm *from, const struct tm *to) {
  int from_sec, to_sec, diff_sec;
  long from_jd, to_jd, diff_day;
  if (!julian_adj(from, 0, 0, &from_jd, &from_sec)) {
    return 0;
  }
  if (!julian_adj(to, 0, 0, &to_jd, &to_sec)) {
    return 0;
  }
  diff_day = to_jd - from_jd;
  diff_sec = to_sec - from_sec;
  if (diff_day > 0 && diff_sec < 0) {
    diff_day--;
    diff_sec += (24 * 60 * 60);
  }
  if (diff_day < 0 && diff_sec > 0) {
    diff_day++;
    diff_sec -= (24 * 60 * 60);
  }
  if (pday) {
    *pday = (int)diff_day;
  }
  if (psec) {
    *psec = diff_sec;
  }
  return 1;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<OPENSSL_gmtime_diff>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%rbx
  mov    %rdx,%rdi
  mov    %rcx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rcx
  mov    %rsp,%r8
  mov    $0x0,%edx
  mov    $0x0,%esi
  call   <julian_adj@plt>
  test   %eax,%eax
  jne    L100
L62:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L78
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L100:
  lea    0x10(%rsp),%rcx
  lea    0x4(%rsp),%r8
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <julian_adj@plt>
  test   %eax,%eax
  je     L62
  mov    0x10(%rsp),%rax
  sub    0x8(%rsp),%rax
  mov    0x4(%rsp),%edx
  sub    (%rsp),%edx
  test   %rax,%rax
  jle    L77
  test   %edx,%edx
  jns    L77
  sub    $0x1,%rax
  add    $0x15180,%edx
L99:
  test   %rbp,%rbp
  je     L103
  mov    %eax,0x0(%rbp)
L103:
  mov    $0x1,%eax
  test   %rbx,%rbx
  je     L62
  mov    %edx,(%rbx)
  jmp    L62
L77:
  test   %rax,%rax
  jns    L99
  test   %edx,%edx
  jle    L99
  add    $0x1,%rax
  sub    $0x15180,%edx
  jmp    L99
L78:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int OPENSSL_gmtime_diff(int *pday, int *psec, const struct tm *from, const struct tm *to) {
  int from_sec, to_sec, diff_sec;
  long from_jd, to_jd, diff_day;
  if (!julian_adj(from, 0, 0, &from_jd, &from_sec)) {
    return 0;
  }
  if (!julian_adj(to, 0, 0, &to_jd, &to_sec)) {
    return 0;
  }
  diff_day = to_jd - from_jd;
  diff_sec = to_sec - from_sec;
  if (diff_day > 0 && diff_sec < 0) {
    diff_day--;
    diff_sec += (24 * 60 * 60);
  }
  if (diff_day < 0 && diff_sec > 0) {
    diff_day++;
    diff_sec -= (24 * 60 * 60);
  }
  if (pday) {
    *pday = (int)diff_day;
  }
  if (psec) {
    *psec = diff_sec;
  }
  return 1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<OPENSSL_gmtime_diff>:
  endbr64
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %rdx,%rdi
  xor    %edx,%edx
  push   %rbx
  mov    %rsi,%rbx
  xor    %esi,%esi
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rcx
  mov    %rsp,%r8
  call   <julian_adj@plt>
  test   %eax,%eax
  jne    L64
L105:
  xor    %eax,%eax
L53:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L3
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L64:
  xor    %edx,%edx
  xor    %esi,%esi
  lea    0x10(%rsp),%rcx
  mov    %r12,%rdi
  lea    0x4(%rsp),%r8
  call   <julian_adj@plt>
  test   %eax,%eax
  je     L105
  mov    0x10(%rsp),%rax
  sub    0x8(%rsp),%rax
  mov    0x4(%rsp),%edx
  sub    (%rsp),%edx
  test   %rax,%rax
  jle    L57
  test   %edx,%edx
  jns    L57
  sub    $0x1,%rax
  add    $0x15180,%edx
L66:
  test   %rbp,%rbp
  je     L67
  mov    %eax,0x0(%rbp)
L67:
  mov    $0x1,%eax
  test   %rbx,%rbx
  je     L53
  mov    %edx,(%rbx)
  jmp    L53
  nopl   0x0(%rax)
L57:
  test   %rax,%rax
  jns    L66
  test   %edx,%edx
  jle    L66
  add    $0x1,%rax
  sub    $0x15180,%edx
  jmp    L66
L3:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int OPENSSL_gmtime_diff(int *pday, int *psec, const struct tm *from, const struct tm *to) {
  int from_sec, to_sec, diff_sec;
  long from_jd, to_jd, diff_day;
  if (!julian_adj(from, 0, 0, &from_jd, &from_sec)) {
    return 0;
  }
  if (!julian_adj(to, 0, 0, &to_jd, &to_sec)) {
    return 0;
  }
  diff_day = to_jd - from_jd;
  diff_sec = to_sec - from_sec;
  if (diff_day > 0 && diff_sec < 0) {
    diff_day--;
    diff_sec += (24 * 60 * 60);
  }
  if (diff_day < 0 && diff_sec > 0) {
    diff_day++;
    diff_sec -= (24 * 60 * 60);
  }
  if (pday) {
    *pday = (int)diff_day;
  }
  if (psec) {
    *psec = diff_sec;
  }
  return 1;
}
```