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

```asm
<gcd_hupper_get_description>:
  endbr64
  lea    D3(%rip),%rax
  ret
```

tool_calls: name: parse_data
arguments: data_label: D3
data_type: string

tool: D3: Determine the PID of the gcd process. Send it SIGHUP (may require root privileges). If a sleep value is specified, the process sleeps. If a repeat count is specified, then the task repeats that number of times. The repeat count is given by the -n or --repeat option, otherwise it defaults to 1. A repeat count of zero repeats forever. The sleep value is given by the -p or --sleep option, otherwise it defaults to 1. Sleep is specified in milliseconds.

assistant: ```c
const char *gcd_hupper_get_description(void) {
  return "Determine the PID of the gcd process. "
         "Send it SIGHUP (may require root privileges). "
         "If a sleep value is specified, the process sleeps. "
         "If a repeat count is specified, then the task repeats "
         "that number of times. "
         "The repeat count is given by the -n or --repeat option, "
         "otherwise it defaults to 1. "
         "A repeat count of zero repeats forever. "
         "The sleep value is given by the -p or --sleep option, "
         "otherwise it defaults to 1. "
         "Sleep is specified in milliseconds.";
}
```
user: What is the c source code of the assembly code below?

```asm
<gcd_hupper_get_description>:
  endbr64
  lea    D1(%rip),%rax
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D1
type_guessed: string

tool: D1: Determine the PID of the gcd process. Send it SIGHUP (may require root privileges). If a sleep value is specified, the process sleeps. If a repeat count is specified, then the task repeats that number of times. The repeat count is given by the -n or --repeat option, otherwise it defaults to 1. A repeat count of zero repeats forever. The sleep value is given by the -p or --sleep option, otherwise it defaults to 1. Sleep is specified in milliseconds.

assistant: ```c
const char *gcd_hupper_get_description(void) {
  return "Determine the PID of the gcd process. "
         "Send it SIGHUP (may require root privileges). "
         "If a sleep value is specified, the process sleeps. "
         "If a repeat count is specified, then the task repeats "
         "that number of times. "
         "The repeat count is given by the -n or --repeat option, "
         "otherwise it defaults to 1. "
         "A repeat count of zero repeats forever. "
         "The sleep value is given by the -p or --sleep option, "
         "otherwise it defaults to 1. "
         "Sleep is specified in milliseconds.";
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<gcd_hupper_get_description>:
  endbr64
  lea    D7(%rip),%rax
  ret
```

tool_calls: name: unpack_data
arguments: label: D7
type_guessed: string

tool: D7: Determine the PID of the gcd process. Send it SIGHUP (may require root privileges). If a sleep value is specified, the process sleeps. If a repeat count is specified, then the task repeats that number of times. The repeat count is given by the -n or --repeat option, otherwise it defaults to 1. A repeat count of zero repeats forever. The sleep value is given by the -p or --sleep option, otherwise it defaults to 1. Sleep is specified in milliseconds.

assistant: ```c
const char *gcd_hupper_get_description(void) {
  return "Determine the PID of the gcd process. "
         "Send it SIGHUP (may require root privileges). "
         "If a sleep value is specified, the process sleeps. "
         "If a repeat count is specified, then the task repeats "
         "that number of times. "
         "The repeat count is given by the -n or --repeat option, "
         "otherwise it defaults to 1. "
         "A repeat count of zero repeats forever. "
         "The sleep value is given by the -p or --sleep option, "
         "otherwise it defaults to 1. "
         "Sleep is specified in milliseconds.";
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<CalculateV>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L6
L1:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  addl   $0x1,-0xc(%rbp)
L6:
  mov    $0x0,%eax
  call   <GetDataSize@plt>
  cmp    %eax,-0xc(%rbp)
  jl     L1
  movsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double CalculateV(double **dm, double *lineSum, int i) {
  double v = 0;
  int j;
  for (j = 0; j < GetDataSize(); ++j) {
    v += dm[i][j] / lineSum[j];
  }
  return v;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<CalculateV>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rsi,%rbp
  movslq %edx,%rdx
  lea    (%rdi,%rdx,8),%r12
  mov    $0x0,%ebx
  pxor   %xmm2,%xmm2
  movsd  %xmm2,0x8(%rsp)
  jmp    L11
L9:
  mov    (%r12),%rax
  movsd  (%rax,%rbx,8),%xmm0
  divsd  0x0(%rbp,%rbx,8),%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  add    $0x1,%rbx
L11:
  mov    $0x0,%eax
  call   <GetDataSize@plt>
  cmp    %ebx,%eax
  jg     L9
  movsd  0x8(%rsp),%xmm0
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
double CalculateV(double **dm, double *lineSum, int i) {
  double v = 0;
  int j;
  for (j = 0; j < GetDataSize(); ++j) {
    v += dm[i][j] / lineSum[j];
  }
  return v;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<CalculateV>:
  endbr64
  push   %r12
  movslq %edx,%rdx
  pxor   %xmm2,%xmm2
  push   %rbp
  lea    (%rdi,%rdx,8),%r12
  mov    %rsi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x10,%rsp
  movsd  %xmm2,0x8(%rsp)
  jmp    L10
  nopl   0x0(%rax)
L1:
  mov    (%r12),%rax
  movsd  (%rax,%rbx,8),%xmm0
  divsd  0x0(%rbp,%rbx,8),%xmm0
  add    $0x1,%rbx
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
L10:
  xor    %eax,%eax
  call   <GetDataSize@plt>
  cmp    %ebx,%eax
  jg     L1
  movsd  0x8(%rsp),%xmm0
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
double CalculateV(double **dm, double *lineSum, int i) {
  double v = 0;
  int j;
  for (j = 0; j < GetDataSize(); ++j) {
    v += dm[i][j] / lineSum[j];
  }
  return v;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<CalculateV>:
  endbr64
  push   %r12
  movslq %edx,%rdx
  pxor   %xmm2,%xmm2
  push   %rbp
  lea    (%rdi,%rdx,8),%r12
  mov    %rsi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x10,%rsp
  movsd  %xmm2,0x8(%rsp)
  jmp    L2
  nopl   0x0(%rax)
L14:
  mov    (%r12),%rax
  movsd  (%rax,%rbx,8),%xmm0
  divsd  0x0(%rbp,%rbx,8),%xmm0
  add    $0x1,%rbx
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
L2:
  xor    %eax,%eax
  call   <GetDataSize@plt>
  cmp    %ebx,%eax
  jg     L14
  movsd  0x8(%rsp),%xmm0
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
double CalculateV(double **dm, double *lineSum, int i) {
  double v = 0;
  int j;
  for (j = 0; j < GetDataSize(); ++j) {
    v += dm[i][j] / lineSum[j];
  }
  return v;
}
```
user: Translate the below assembly code into C programming language:

```asm
<swap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%ecx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rdx
  mov    %rsi,%r8
  mov    %eax,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x20(%rbp),%rax
  mov    -0x4(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%ecx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rdx
  mov    %rsi,%r8
  mov    %eax,%esi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D15
datatype: string
name: disassemble_data
arguments: data_tag: D17
datatype: string

tool: D15: entering this, it is %d (%p) %d (%p)


tool: D17: exiting this, it is %d (%p) %d (%p)


assistant: ```c
void swap(int *a, int *b) {
  printf("entering this, it is %d (%p) %d (%p)\n", *a, a, *b, b);
  int temp = *a;
  *a = *b;
  *b = temp;
  printf("exiting this, it is %d (%p) %d (%p)\n", *a, a, *b, b);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<swap>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %rsi,%r8
  mov    (%rsi),%ecx
  mov    %rdi,%rdx
  mov    (%rdi),%esi
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    (%rbx),%ecx
  mov    0x0(%rbp),%eax
  mov    %eax,(%rbx)
  mov    %ecx,0x0(%rbp)
  mov    %rbp,%r8
  mov    %rbx,%rdx
  mov    (%rbx),%esi
  lea    D17(%rip),%rdi
  call   <printf@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: label: D8
data_type: string
name: parse_data
arguments: label: D17
data_type: string

tool: D8: entering this, it is %d (%p) %d (%p)


tool: D17: exiting this, it is %d (%p) %d (%p)


assistant: ```c
void swap(int *a, int *b) {
  printf("entering this, it is %d (%p) %d (%p)\n", *a, a, *b, b);
  int temp = *a;
  *a = *b;
  *b = temp;
  printf("exiting this, it is %d (%p) %d (%p)\n", *a, a, *b, b);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<swap>:
  endbr64
  push   %rbp
  mov    %rsi,%r8
  mov    %rsi,%rbp
  mov    %rdi,%rdx
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  mov    (%rsi),%ecx
  mov    (%rdi),%esi
  lea    D17(%rip),%rdi
  call   <printf@plt>
  mov    (%rbx),%ecx
  mov    0x0(%rbp),%eax
  mov    %rbp,%r8
  mov    %rbx,%rdx
  lea    D15(%rip),%rdi
  mov    %eax,(%rbx)
  mov    %ecx,0x0(%rbp)
  mov    (%rbx),%esi
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  jmp    1050 <printf@plt>
```

tool_calls: name: parse_data
arguments: label: D17
type: string
name: parse_data
arguments: label: D15
type: string

tool: D17: entering this, it is %d (%p) %d (%p)


tool: D15: exiting this, it is %d (%p) %d (%p)


assistant: ```c
void swap(int *a, int *b) {
  printf("entering this, it is %d (%p) %d (%p)\n", *a, a, *b, b);
  int temp = *a;
  *a = *b;
  *b = temp;
  printf("exiting this, it is %d (%p) %d (%p)\n", *a, a, *b, b);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<swap>:
  endbr64
  push   %rbp
  mov    %rsi,%r8
  mov    %rsi,%rbp
  mov    %rdi,%rdx
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  mov    (%rsi),%ecx
  mov    (%rdi),%esi
  lea    D18(%rip),%rdi
  call   <printf@plt>
  mov    (%rbx),%ecx
  mov    0x0(%rbp),%eax
  mov    %rbp,%r8
  mov    %rbx,%rdx
  lea    D12(%rip),%rdi
  mov    %eax,(%rbx)
  mov    %ecx,0x0(%rbp)
  mov    (%rbx),%esi
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  jmp    1050 <printf@plt>
```

tool_calls: name: parse_data
arguments: tag: D18
type_infered: string
name: parse_data
arguments: tag: D12
type_infered: string

tool: D18: entering this, it is %d (%p) %d (%p)


tool: D12: exiting this, it is %d (%p) %d (%p)


assistant: ```c
void swap(int *a, int *b) {
  printf("entering this, it is %d (%p) %d (%p)\n", *a, a, *b, b);
  int temp = *a;
  *a = *b;
  *b = temp;
  printf("exiting this, it is %d (%p) %d (%p)\n", *a, a, *b, b);
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<_MM_CVTEPI32_EPI64>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    $0x0,%eax
  call   <_mm_setzero_si128@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x8(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <_mm_cmpgt_epi32@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <_mm_unpacklo_epi32@plt>
  leave
  ret
```

assistant: ```c
extern __attribute__((__gnu___, __always___, __artificial__)) __m128i _MM_CVTEPI32_EPI64(__m128i a) {
  __m128i zero = _mm_setzero_si128();
  __m128i sign = _mm_cmpgt_epi32(zero, a);
  return _mm_unpacklo_epi32(a, sign);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<_MM_CVTEPI32_EPI64>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  mov    $0x0,%eax
  call   <_mm_setzero_si128@plt>
  mov    %eax,%edi
  mov    %ebx,%esi
  call   <_mm_cmpgt_epi32@plt>
  mov    %eax,%esi
  mov    %ebx,%edi
  call   <_mm_unpacklo_epi32@plt>
  pop    %rbx
  ret
```

assistant: ```c
extern __attribute__((__gnu___, __always___, __artificial__)) __m128i _MM_CVTEPI32_EPI64(__m128i a) {
  __m128i zero = _mm_setzero_si128();
  __m128i sign = _mm_cmpgt_epi32(zero, a);
  return _mm_unpacklo_epi32(a, sign);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<_MM_CVTEPI32_EPI64>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  mov    %edi,%ebp
  call   <_mm_setzero_si128@plt>
  mov    %ebp,%esi
  mov    %eax,%edi
  call   <_mm_cmpgt_epi32@plt>
  mov    %ebp,%edi
  pop    %rbp
  mov    %eax,%esi
  jmp    1070 <_mm_unpacklo_epi32@plt>
```

assistant: ```c
extern __attribute__((__gnu___, __always___, __artificial__)) __m128i _MM_CVTEPI32_EPI64(__m128i a) {
  __m128i zero = _mm_setzero_si128();
  __m128i sign = _mm_cmpgt_epi32(zero, a);
  return _mm_unpacklo_epi32(a, sign);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<_MM_CVTEPI32_EPI64>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  mov    %edi,%ebp
  call   <_mm_setzero_si128@plt>
  mov    %ebp,%esi
  mov    %eax,%edi
  call   <_mm_cmpgt_epi32@plt>
  mov    %ebp,%edi
  pop    %rbp
  mov    %eax,%esi
  jmp    1070 <_mm_unpacklo_epi32@plt>
```

assistant: ```c
extern __attribute__((__gnu___, __always___, __artificial__)) __m128i _MM_CVTEPI32_EPI64(__m128i a) {
  __m128i zero = _mm_setzero_si128();
  __m128i sign = _mm_cmpgt_epi32(zero, a);
  return _mm_unpacklo_epi32(a, sign);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<BRBase58CheckDecode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x4000(%rsp),%r11
L7:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L7
  sub    $0xd0,%rsp
  mov    %rdi,-0x40b8(%rbp)
  mov    %rsi,-0x40c0(%rbp)
  mov    %rdx,-0x40c8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0x40c8(%rbp)
  je     L57
  mov    -0x40c8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  jmp    L76
L57:
  mov    $0x0,%eax
L76:
  mov    %rax,-0x40a0(%rbp)
  cmpq   $0x1000,-0x40a0(%rbp)
  ja     L114
  lea    -0x4010(%rbp),%rax
  jmp    L108
L114:
  mov    -0x40a0(%rbp),%rax
  mov    %rax,%rdi
  call   <malloc@plt>
L108:
  mov    %rax,-0x4098(%rbp)
  cmpq   $0x0,-0x40c8(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  cmpq   $0x0,-0x4098(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x40c8(%rbp),%rdx
  mov    -0x40a0(%rbp),%rcx
  mov    -0x4098(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <BRBase58Decode@plt>
  mov    %rax,-0x40a8(%rbp)
  cmpq   $0x3,-0x40a8(%rbp)
  jbe    L137
  subq   $0x4,-0x40a8(%rbp)
  mov    -0x40a8(%rbp),%rdx
  mov    -0x4098(%rbp),%rcx
  lea    -0x4090(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <BRSHA256_2@plt>
  mov    -0x40a8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x4098(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0x4090(%rbp),%rax
  mov    $0x4,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  je     L81
  movq   $0x0,-0x40a8(%rbp)
L81:
  cmpq   $0x0,-0x40b8(%rbp)
  je     L92
  mov    -0x40a8(%rbp),%rax
  cmp    -0x40c0(%rbp),%rax
  ja     L92
  mov    -0x40a8(%rbp),%rdx
  mov    -0x4098(%rbp),%rcx
  mov    -0x40b8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  jmp    L92
L137:
  movq   $0x0,-0x40a8(%rbp)
L92:
  mov    -0x40a0(%rbp),%rdx
  mov    -0x4098(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mem_clean@plt>
  lea    -0x4010(%rbp),%rax
  cmp    %rax,-0x4098(%rbp)
  je     L58
  mov    -0x4098(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L58:
  cmpq   $0x0,-0x40b8(%rbp)
  je     L147
  mov    -0x40a8(%rbp),%rax
  cmp    -0x40c0(%rbp),%rax
  ja     L94
L147:
  mov    -0x40a8(%rbp),%rax
  jmp    L37
L94:
  mov    $0x0,%eax
L37:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L40
  call   <__stack_chk_fail@plt>
L40:
  leave
  ret
```

assistant: ```c
size_t BRBase58CheckDecode(uint8_t *data, size_t dataLen, const char *str) {
  size_t len, bufLen = (str) ? strlen(str) : 0;
  uint8_t md[256 / 8], _buf[0x1000], *buf = (bufLen <= 0x1000) ? _buf : malloc(bufLen);
  assert(str != NULL);
  assert(buf != NULL);
  len = BRBase58Decode(buf, bufLen, str);
  if (len >= 4) {
    len -= 4;
    BRSHA256_2(md, buf, len);
    if (memcmp(&buf[len], md, sizeof(uint32_t)) != 0)
      len = 0;
    if (data && len <= dataLen)
      memcpy(data, buf, len);
  } else
    len = 0;
  mem_clean(buf, bufLen);
  if (buf != _buf)
    free(buf);
  return (!data || len <= dataLen) ? len : 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<BRBase58CheckDecode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L138:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L138
  sub    $0xa8,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r14
  mov    %rdx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x4098(%rsp)
  xor    %eax,%eax
  test   %rdx,%rdx
  je     L66
  mov    %rdx,%rdi
  call   <strlen@plt>
  mov    %rax,%r15
  lea    0x90(%rsp),%rbx
  cmp    $0x1000,%rax
  ja     L110
L69:
  test   %rbp,%rbp
  setne  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  test   %rbx,%rbx
  setne  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbp,%rdx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <BRBase58Decode@plt>
  mov    $0x0,%ebp
  cmp    $0x3,%rax
  ja     L78
L114:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <mem_clean@plt>
  lea    0x90(%rsp),%rax
  cmp    %rax,%rbx
  je     L17
L19:
  mov    %rbx,%rdi
  call   <free@plt>
L81:
  test   %r13,%r13
  je     L17
  cmp    %rbp,%r14
  mov    $0x0,%eax
  cmovb  %rax,%rbp
L17:
  mov    0x4098(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L119
  mov    %rbp,%rax
  add    $0x40a8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L110:
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rbx
  jmp    L69
L66:
  mov    $0x0,%r15d
  lea    0x90(%rsp),%rbx
  jmp    L69
L78:
  lea    -0x4(%rax),%rbp
  lea    0x10(%rsp),%rax
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdi
  call   <BRSHA256_2@plt>
  lea    (%rbx,%rbp,4),%rdi
  mov    $0x4,%edx
  mov    0x8(%rsp),%rsi
  call   <memcmp@plt>
  mov    %rbp,%r12
  test   %rax,%rax
  mov    $0x0,%ebp
  cmove  %r12,%rbp
  test   %r13,%r13
  je     L24
  cmp    %r14,%rbp
  jbe    L25
L24:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <mem_clean@plt>
  lea    0x90(%rsp),%rax
  cmp    %rax,%rbx
  jne    L19
  jmp    L81
L25:
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <memcpy@plt>
  jmp    L114
L119:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
size_t BRBase58CheckDecode(uint8_t *data, size_t dataLen, const char *str) {
  size_t len, bufLen = (str) ? strlen(str) : 0;
  uint8_t md[256 / 8], _buf[0x1000], *buf = (bufLen <= 0x1000) ? _buf : malloc(bufLen);
  assert(str != NULL);
  assert(buf != NULL);
  len = BRBase58Decode(buf, bufLen, str);
  if (len >= 4) {
    len -= 4;
    BRSHA256_2(md, buf, len);
    if (memcmp(&buf[len], md, sizeof(uint32_t)) != 0)
      len = 0;
    if (data && len <= dataLen)
      memcpy(data, buf, len);
  } else
    len = 0;
  mem_clean(buf, bufLen);
  if (buf != _buf)
    free(buf);
  return (!data || len <= dataLen) ? len : 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<BRBase58CheckDecode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L125:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L125
  sub    $0xa8,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %rdi,%rbx
  mov    %rdx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x4098(%rsp)
  xor    %eax,%eax
  test   %rdx,%rdx
  je     L158
  mov    %rdx,%rdi
  call   <strlen@plt>
  mov    %rax,%r13
  cmp    $0x1000,%rax
  ja     L32
  lea    0x90(%rsp),%r15
  mov    $0x1,%r14d
  mov    %r15,%rbp
L135:
  xor    %edi,%edi
  test   %r12,%r12
  setne  %dil
  call   <assert@plt>
  mov    %r14d,%edi
  xor    %r14d,%r14d
  call   <assert@plt>
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <BRBase58Decode@plt>
  cmp    $0x3,%rax
  ja     L100
L15:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <mem_clean@plt>
  cmp    %r15,%rbp
  je     L142
  cmp    %r14,0x8(%rsp)
  setae  %r12b
L63:
  mov    %rbp,%rdi
  call   <free@plt>
L111:
  test   %rbx,%rbx
  je     L142
  xor    %eax,%eax
  test   %r12b,%r12b
  cmove  %rax,%r14
L142:
  mov    0x4098(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L151
  add    $0x40a8,%rsp
  mov    %r14,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L32:
  mov    %rax,%rdi
  xor    %r14d,%r14d
  lea    0x90(%rsp),%r15
  call   <malloc@plt>
  test   %rax,%rax
  mov    %rax,%rbp
  setne  %r14b
  jmp    L135
  nopw   0x0(%rax,%rax,1)
L100:
  lea    -0x4(%rax),%r14
  lea    0x10(%rsp),%r12
  mov    %rbp,%rsi
  mov    %r14,%rdx
  mov    %r12,%rdi
  call   <BRSHA256_2@plt>
  lea    0x0(%rbp,%r14,4),%rdi
  mov    $0x4,%edx
  mov    %r12,%rsi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L90
  cmp    0x8(%rsp),%r14
  setbe  %r12b
  test   %rbx,%rbx
  je     L105
L115:
  test   %r12b,%r12b
  je     L105
  mov    %r14,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <memcpy@plt>
  jmp    L15
  nopl   0x0(%rax)
L158:
  lea    0x90(%rsp),%r15
  mov    $0x1,%r14d
  xor    %r13d,%r13d
  mov    %r15,%rbp
  jmp    L135
  nopl   0x0(%rax)
L90:
  mov    $0x1,%r12d
  xor    %r14d,%r14d
  test   %rbx,%rbx
  jne    L115
L105:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <mem_clean@plt>
  cmp    %r15,%rbp
  jne    L63
  jmp    L111
L151:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
size_t BRBase58CheckDecode(uint8_t *data, size_t dataLen, const char *str) {
  size_t len, bufLen = (str) ? strlen(str) : 0;
  uint8_t md[256 / 8], _buf[0x1000], *buf = (bufLen <= 0x1000) ? _buf : malloc(bufLen);
  assert(str != NULL);
  assert(buf != NULL);
  len = BRBase58Decode(buf, bufLen, str);
  if (len >= 4) {
    len -= 4;
    BRSHA256_2(md, buf, len);
    if (memcmp(&buf[len], md, sizeof(uint32_t)) != 0)
      len = 0;
    if (data && len <= dataLen)
      memcpy(data, buf, len);
  } else
    len = 0;
  mem_clean(buf, bufLen);
  if (buf != _buf)
    free(buf);
  return (!data || len <= dataLen) ? len : 0;
}
```