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

```asm
<spm_crc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0xff,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L16
L15:
  mov    -0x4(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L16:
  mov    -0x4(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jb     L15
  mov    -0x8(%rbp),%eax
  movzbl %al,%eax
  pop    %rbp
  ret
```

assistant: ```c
unsigned int spm_crc(const unsigned char *data, unsigned int size) {
  unsigned int crc = 0xFF;
  for (unsigned int i = 0; i < size; i++) {
    crc += data[i];
  }
  return 0xFF & crc;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<spm_crc>:
  endbr64
  test   %esi,%esi
  je     L17
  mov    %rdi,%rdx
  lea    -0x1(%rsi),%eax
  lea    0x1(%rdi,%rax,1),%rsi
  mov    $0xff,%eax
L1:
  movzbl (%rdx),%ecx
  add    %ecx,%eax
  add    $0x1,%rdx
  cmp    %rsi,%rdx
  jne    L1
L10:
  movzbl %al,%eax
  ret
L17:
  mov    $0xff,%eax
  jmp    L10
```

assistant: ```c
unsigned int spm_crc(const unsigned char *data, unsigned int size) {
  unsigned int crc = 0xFF;
  for (unsigned int i = 0; i < size; i++) {
    crc += data[i];
  }
  return 0xFF & crc;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<spm_crc>:
  endbr64
  test   %esi,%esi
  je     L12
  lea    -0x1(%rsi),%eax
  lea    0x1(%rdi,%rax,1),%rcx
  mov    $0xff,%eax
  nopl   (%rax)
L9:
  movzbl (%rdi),%edx
  add    $0x1,%rdi
  add    %edx,%eax
  cmp    %rdi,%rcx
  jne    L9
  movzbl %al,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L12:
  mov    $0xff,%eax
  ret
```

assistant: ```c
unsigned int spm_crc(const unsigned char *data, unsigned int size) {
  unsigned int crc = 0xFF;
  for (unsigned int i = 0; i < size; i++) {
    crc += data[i];
  }
  return 0xFF & crc;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<spm_crc>:
  endbr64
  mov    %rdi,%rcx
  mov    %esi,%edx
  test   %esi,%esi
  je     L12
  lea    -0x1(%rsi),%eax
  cmp    $0xe,%eax
  jbe    L60
  shr    $0x4,%esi
  pxor   %xmm3,%xmm3
  pxor   %xmm4,%xmm4
  mov    %rdi,%rax
  sub    $0x1,%esi
  pxor   %xmm2,%xmm2
  shl    $0x4,%rsi
  lea    0x10(%rdi,%rsi,1),%rsi
  nopl   0x0(%rax,%rax,1)
L77:
  movdqu (%rax),%xmm0
  add    $0x10,%rax
  movdqa %xmm0,%xmm1
  punpckhbw %xmm4,%xmm0
  movdqa %xmm0,%xmm5
  punpcklbw %xmm4,%xmm1
  punpckhwd %xmm2,%xmm0
  punpcklwd %xmm2,%xmm5
  paddd  %xmm5,%xmm0
  movdqa %xmm1,%xmm5
  punpckhwd %xmm2,%xmm1
  punpcklwd %xmm2,%xmm5
  paddd  %xmm5,%xmm1
  paddd  %xmm1,%xmm0
  paddd  %xmm0,%xmm3
  cmp    %rsi,%rax
  jne    L77
  movdqa %xmm3,%xmm0
  mov    %edx,%esi
  psrldq $0x8,%xmm0
  and    $0xfffffff0,%esi
  paddd  %xmm0,%xmm3
  movdqa %xmm3,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm3
  movd   %xmm3,%eax
  add    $0xff,%eax
  test   $0xf,%dl
  je     L31
L49:
  mov    %esi,%edi
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x1(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x2(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x3(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x4(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x5(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x6(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x7(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x8(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x9(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0xa(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0xb(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0xc(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0xd(%rsi),%edi
  cmp    %edi,%edx
  jbe    L31
  movzbl (%rcx,%rdi,1),%edi
  add    $0xe,%esi
  add    %edi,%eax
  cmp    %esi,%edx
  jbe    L31
  movzbl (%rcx,%rsi,1),%edx
  add    %edx,%eax
L31:
  movzbl %al,%eax
  ret
  nopl   0x0(%rax)
L12:
  mov    $0xff,%eax
  ret
L60:
  xor    %esi,%esi
  mov    $0xff,%eax
  jmp    L49
```

assistant: ```c
unsigned int spm_crc(const unsigned char *data, unsigned int size) {
  unsigned int crc = 0xFF;
  for (unsigned int i = 0; i < size; i++) {
    crc += data[i];
  }
  return 0xFF & crc;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<sec_alloc_realloc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <OPENSSL_secure_malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L2
  cmpq   $0x0,-0x8(%rbp)
  je     L16
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L16:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <OPENSSL_secure_free@plt>
L2:
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
char *sec_alloc_realloc(BUF_MEM *str, size_t len) {
  char *ret;
  ret = OPENSSL_secure_malloc(len);
  if (str->data != NULL) {
    if (ret != NULL)
      memcpy(ret, str->data, str->length);
    OPENSSL_secure_free(str->data);
  }
  return (ret);
}
```
user: Translate the below assembly code into C programming language:

```asm
<sec_alloc_realloc>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%rdi
  call   <OPENSSL_secure_malloc@plt>
  mov    %rax,%rbx
  mov    0x0(%rbp),%rsi
  test   %rsi,%rsi
  je     L14
  test   %rax,%rax
  je     L4
  mov    0x8(%rbp),%edx
  mov    %rax,%rdi
  call   <memcpy@plt>
L4:
  mov    0x0(%rbp),%rdi
  call   <OPENSSL_secure_free@plt>
L14:
  mov    %rbx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
char *sec_alloc_realloc(BUF_MEM *str, size_t len) {
  char *ret;
  ret = OPENSSL_secure_malloc(len);
  if (str->data != NULL) {
    if (ret != NULL)
      memcpy(ret, str->data, str->length);
    OPENSSL_secure_free(str->data);
  }
  return (ret);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<sec_alloc_realloc>:
  endbr64
  push   %r12
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rdi
  sub    $0x8,%rsp
  call   <OPENSSL_secure_malloc@plt>
  mov    (%rbx),%rdi
  mov    %rax,%r12
  test   %rdi,%rdi
  je     L8
  test   %rax,%rax
  je     L0
  mov    0x8(%rbx),%edx
  mov    %rdi,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    (%rbx),%rdi
L0:
  call   <OPENSSL_secure_free@plt>
L8:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
```

assistant: ```c
char *sec_alloc_realloc(BUF_MEM *str, size_t len) {
  char *ret;
  ret = OPENSSL_secure_malloc(len);
  if (str->data != NULL) {
    if (ret != NULL)
      memcpy(ret, str->data, str->length);
    OPENSSL_secure_free(str->data);
  }
  return (ret);
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<sec_alloc_realloc>:
  endbr64
  push   %r12
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rdi
  sub    $0x8,%rsp
  call   <OPENSSL_secure_malloc@plt>
  mov    (%rbx),%rdi
  mov    %rax,%r12
  test   %rdi,%rdi
  je     L6
  test   %rax,%rax
  je     L0
  mov    0x8(%rbx),%edx
  mov    %rdi,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    (%rbx),%rdi
L0:
  call   <OPENSSL_secure_free@plt>
L6:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
```

assistant: ```c
char *sec_alloc_realloc(BUF_MEM *str, size_t len) {
  char *ret;
  ret = OPENSSL_secure_malloc(len);
  if (str->data != NULL) {
    if (ret != NULL)
      memcpy(ret, str->data, str->length);
    OPENSSL_secure_free(str->data);
  }
  return (ret);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<tnt_HMAC_CTX_free>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <HMAC_cleanup@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <OPENSSL_free@plt>
  nop
  leave
  ret
```

assistant: ```c
void tnt_HMAC_CTX_free(HMAC_CTX *ctx) {
  HMAC_cleanup(ctx);
  OPENSSL_free(ctx);
}
```
user: Translate the below assembly code into C programming language:

```asm
<tnt_HMAC_CTX_free>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <HMAC_cleanup@plt>
  mov    %rbx,%rdi
  call   <OPENSSL_free@plt>
  pop    %rbx
  ret
```

assistant: ```c
void tnt_HMAC_CTX_free(HMAC_CTX *ctx) {
  HMAC_cleanup(ctx);
  OPENSSL_free(ctx);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<tnt_HMAC_CTX_free>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  call   <HMAC_cleanup@plt>
  mov    %rbp,%rdi
  pop    %rbp
  jmp    1070 <OPENSSL_free@plt>
```

assistant: ```c
void tnt_HMAC_CTX_free(HMAC_CTX *ctx) {
  HMAC_cleanup(ctx);
  OPENSSL_free(ctx);
}
```
user: Translate the below assembly code into C programming language:

```asm
<tnt_HMAC_CTX_free>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  call   <HMAC_cleanup@plt>
  mov    %rbp,%rdi
  pop    %rbp
  jmp    1070 <OPENSSL_free@plt>
```

assistant: ```c
void tnt_HMAC_CTX_free(HMAC_CTX *ctx) {
  HMAC_cleanup(ctx);
  OPENSSL_free(ctx);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<mysort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L56
L43:
  mov    -0x10(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L26
L27:
  mov    -0x14(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L60
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L60:
  addl   $0x1,-0x14(%rbp)
L26:
  mov    -0x14(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L27
  mov    -0xc(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  je     L38
  addl   $0x1,-0x18(%rbp)
L56:
  mov    -0x18(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L43
  jmp    L22
L38:
  nop
L22:
  leave
  ret
```

assistant: ```c
void mysort(char **a, int size) {
  int i, j;
  int tempswappos = size - 1;
  int lastswappos;
  char *temp;
  for (i = 0; i < size; i++) {
    lastswappos = tempswappos;
    for (j = 0; j < lastswappos; j++) {
      if (strcmp(a[j], a[j + 1]) > 0) {
        temp = a[j];
        a[j] = a[j + 1];
        a[j + 1] = temp;
        tempswappos = j;
      }
    }
    if (lastswappos == tempswappos)
      return;
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<mysort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %esi,%r15d
  lea    -0x1(%rsi),%r12d
  mov    $0x0,%r14d
  test   %esi,%esi
  jg     L35
L61:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L6:
  add    $0x1,%ebp
  add    $0x8,%rbx
  cmp    %r12d,%ebp
  je     L49
L66:
  mov    0x8(%rbx),%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L6
  mov    (%rbx),%rax
  mov    0x8(%rbx),%rdx
  mov    %rdx,(%rbx)
  mov    %rax,0x8(%rbx)
  mov    %ebp,%r13d
  jmp    L6
L49:
  cmp    %r12d,%r13d
  je     L61
  add    $0x1,%r14d
  cmp    %r14d,%r15d
  je     L61
  mov    %r13d,%r12d
L35:
  test   %r12d,%r12d
  jle    L61
  mov    0x8(%rsp),%rbx
  mov    %r12d,%r13d
  mov    $0x0,%ebp
  jmp    L66
```

assistant: ```c
void mysort(char **a, int size) {
  int i, j;
  int tempswappos = size - 1;
  int lastswappos;
  char *temp;
  for (i = 0; i < size; i++) {
    lastswappos = tempswappos;
    for (j = 0; j < lastswappos; j++) {
      if (strcmp(a[j], a[j + 1]) > 0) {
        temp = a[j];
        a[j] = a[j + 1];
        a[j + 1] = temp;
        tempswappos = j;
      }
    }
    if (lastswappos == tempswappos)
      return;
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<mysort>:
  endbr64
  push   %r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  lea    -0x1(%rsi),%ebp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,0x8(%rsp)
  test   %esi,%esi
  jle    L50
  test   %ebp,%ebp
  jle    L50
  nopl   0x0(%rax,%rax,1)
L39:
  mov    0x8(%rsp),%rbx
  mov    %ebp,%r12d
  xor    %r15d,%r15d
  nopl   0x0(%rax,%rax,1)
L58:
  mov    0x8(%rbx),%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L34
  mov    (%rbx),%rax
  mov    0x8(%rbx),%rcx
  mov    %r15d,%r12d
  mov    %rcx,(%rbx)
  mov    %rax,0x8(%rbx)
L34:
  add    $0x1,%r15d
  add    $0x8,%rbx
  cmp    %ebp,%r15d
  jne    L58
  cmp    %ebp,%r12d
  je     L50
  add    $0x1,%r13d
  cmp    %r13d,%r14d
  je     L50
  mov    %r12d,%ebp
  test   %ebp,%ebp
  jg     L39
L50:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void mysort(char **a, int size) {
  int i, j;
  int tempswappos = size - 1;
  int lastswappos;
  char *temp;
  for (i = 0; i < size; i++) {
    lastswappos = tempswappos;
    for (j = 0; j < lastswappos; j++) {
      if (strcmp(a[j], a[j + 1]) > 0) {
        temp = a[j];
        a[j] = a[j + 1];
        a[j + 1] = temp;
        tempswappos = j;
      }
    }
    if (lastswappos == tempswappos)
      return;
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<mysort>:
  endbr64
  push   %r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  lea    -0x1(%rsi),%ebp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,0x8(%rsp)
  test   %esi,%esi
  jle    L68
  test   %ebp,%ebp
  jle    L68
  nopl   0x0(%rax,%rax,1)
L39:
  mov    0x8(%rsp),%rbx
  mov    %ebp,%r12d
  xor    %r15d,%r15d
  nopl   0x0(%rax,%rax,1)
L28:
  mov    0x8(%rbx),%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L36
  movdqu (%rbx),%xmm0
  mov    %r15d,%r12d
  shufpd $0x1,%xmm0,%xmm0
  movups %xmm0,(%rbx)
L36:
  add    $0x1,%r15d
  add    $0x8,%rbx
  cmp    %ebp,%r15d
  jne    L28
  cmp    %ebp,%r12d
  je     L68
  add    $0x1,%r13d
  cmp    %r13d,%r14d
  je     L68
  mov    %r12d,%ebp
  test   %ebp,%ebp
  jg     L39
L68:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void mysort(char **a, int size) {
  int i, j;
  int tempswappos = size - 1;
  int lastswappos;
  char *temp;
  for (i = 0; i < size; i++) {
    lastswappos = tempswappos;
    for (j = 0; j < lastswappos; j++) {
      if (strcmp(a[j], a[j + 1]) > 0) {
        temp = a[j];
        a[j] = a[j + 1];
        a[j + 1] = temp;
        tempswappos = j;
      }
    }
    if (lastswappos == tempswappos)
      return;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<inner_product_single>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <_mm_setzero_ps@plt>
  mov    %eax,-0x1c(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L22
L16:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <_mm_loadu_ps@plt>
  mov    %eax,%ebx
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <_mm_loadu_ps@plt>
  mov    %ebx,%esi
  mov    %eax,%edi
  call   <_mm_mul_ps@plt>
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <_mm_add_ps@plt>
  mov    %eax,-0x1c(%rbp)
  mov    -0x20(%rbp),%eax
  cltq
  add    $0x4,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <_mm_loadu_ps@plt>
  mov    %eax,%ebx
  mov    -0x20(%rbp),%eax
  cltq
  add    $0x4,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rdi
  call   <_mm_loadu_ps@plt>
  mov    %ebx,%esi
  mov    %eax,%edi
  call   <_mm_mul_ps@plt>
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <_mm_add_ps@plt>
  mov    %eax,-0x1c(%rbp)
  addl   $0x8,-0x20(%rbp)
L22:
  mov    -0x20(%rbp),%eax
  cmp    %eax,-0x44(%rbp)
  ja     L16
  mov    -0x1c(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <_mm_movehl_ps@plt>
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <_mm_add_ps@plt>
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%ecx
  mov    -0x1c(%rbp),%eax
  mov    $0x55,%edx
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_ps@plt>
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <_mm_add_ss@plt>
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%edx
  lea    -0x24(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <_mm_store_ss@plt>
  movss  -0x24(%rbp),%xmm0
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L28
  call   <__stack_chk_fail@plt>
L28:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
float inner_product_single(const float *a, const float *b, unsigned int len) {
  int i;
  float ret;
  __m128 sum = _mm_setzero_ps();
  for (i = 0; i < len; i += 8) {
    sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a + i), _mm_loadu_ps(b + i)));
    sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a + i + 4), _mm_loadu_ps(b + i + 4)));
  }
  sum = _mm_add_ps(sum, _mm_movehl_ps(sum, sum));
  sum = _mm_add_ss(sum, _mm_shuffle_ps(sum, sum, 0x55));
  _mm_store_ss(&ret, sum);
  return ret;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<inner_product_single>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r14
  mov    %edx,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <_mm_setzero_ps@plt>
  mov    %eax,%ebp
  test   %r13d,%r13d
  je     L5
  mov    %r14,%rbx
  sub    $0x1,%r13d
  shr    $0x3,%r13d
  mov    %r13d,%r13d
  shl    $0x5,%r13
  lea    0x20(%r14,%r13,1),%r13
L0:
  mov    %rbx,%rdi
  call   <_mm_loadu_ps@plt>
  mov    %eax,%r14d
  mov    %r12,%rdi
  call   <_mm_loadu_ps@plt>
  mov    %eax,%edi
  mov    %r14d,%esi
  call   <_mm_mul_ps@plt>
  mov    %eax,%esi
  mov    %ebp,%edi
  call   <_mm_add_ps@plt>
  mov    %eax,%ebp
  lea    0x10(%rbx),%rdi
  call   <_mm_loadu_ps@plt>
  mov    %eax,%r14d
  lea    0x10(%r12),%rdi
  call   <_mm_loadu_ps@plt>
  mov    %eax,%edi
  mov    %r14d,%esi
  call   <_mm_mul_ps@plt>
  mov    %eax,%esi
  mov    %ebp,%edi
  call   <_mm_add_ps@plt>
  mov    %eax,%ebp
  add    $0x20,%rbx
  add    $0x20,%r12
  cmp    %r13,%rbx
  jne    L0
L5:
  mov    %ebp,%esi
  mov    %ebp,%edi
  call   <_mm_movehl_ps@plt>
  mov    %eax,%esi
  mov    %ebp,%edi
  call   <_mm_add_ps@plt>
  mov    %eax,%ebx
  mov    $0x55,%edx
  mov    %eax,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_ps@plt>
  mov    %eax,%esi
  mov    %ebx,%edi
  call   <_mm_add_ss@plt>
  mov    %eax,%esi
  lea    0x4(%rsp),%rdi
  call   <_mm_store_ss@plt>
  movss  0x4(%rsp),%xmm0
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L3:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
float inner_product_single(const float *a, const float *b, unsigned int len) {
  int i;
  float ret;
  __m128 sum = _mm_setzero_ps();
  for (i = 0; i < len; i += 8) {
    sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a + i), _mm_loadu_ps(b + i)));
    sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a + i + 4), _mm_loadu_ps(b + i + 4)));
  }
  sum = _mm_add_ps(sum, _mm_movehl_ps(sum, sum));
  sum = _mm_add_ss(sum, _mm_shuffle_ps(sum, sum, 0x55));
  _mm_store_ss(&ret, sum);
  return ret;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<inner_product_single>:
  endbr64
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <_mm_setzero_ps@plt>
  mov    %eax,%ebp
  test   %r13d,%r13d
  je     L4
  sub    $0x1,%r13d
  shr    $0x3,%r13d
  shl    $0x5,%r13
  lea    0x20(%rbx,%r13,1),%r13
  cs nopw 0x0(%rax,%rax,1)
L13:
  mov    %rbx,%rdi
  call   <_mm_loadu_ps@plt>
  mov    %r12,%rdi
  mov    %eax,%r14d
  call   <_mm_loadu_ps@plt>
  mov    %r14d,%esi
  mov    %eax,%edi
  call   <_mm_mul_ps@plt>
  mov    %ebp,%edi
  mov    %eax,%esi
  call   <_mm_add_ps@plt>
  lea    0x10(%rbx),%rdi
  add    $0x20,%rbx
  mov    %eax,%ebp
  call   <_mm_loadu_ps@plt>
  lea    0x10(%r12),%rdi
  add    $0x20,%r12
  mov    %eax,%r14d
  call   <_mm_loadu_ps@plt>
  mov    %r14d,%esi
  mov    %eax,%edi
  call   <_mm_mul_ps@plt>
  mov    %ebp,%edi
  mov    %eax,%esi
  call   <_mm_add_ps@plt>
  mov    %eax,%ebp
  cmp    %r13,%rbx
  jne    L13
L4:
  mov    %ebp,%esi
  mov    %ebp,%edi
  call   <_mm_movehl_ps@plt>
  mov    %ebp,%edi
  mov    %eax,%esi
  call   <_mm_add_ps@plt>
  mov    $0x55,%edx
  mov    %eax,%esi
  mov    %eax,%edi
  mov    %eax,%ebp
  call   <_mm_shuffle_ps@plt>
  mov    %ebp,%edi
  mov    %eax,%esi
  call   <_mm_add_ss@plt>
  lea    0x4(%rsp),%rdi
  mov    %eax,%esi
  call   <_mm_store_ss@plt>
  movss  0x4(%rsp),%xmm0
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L3:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
float inner_product_single(const float *a, const float *b, unsigned int len) {
  int i;
  float ret;
  __m128 sum = _mm_setzero_ps();
  for (i = 0; i < len; i += 8) {
    sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a + i), _mm_loadu_ps(b + i)));
    sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a + i + 4), _mm_loadu_ps(b + i + 4)));
  }
  sum = _mm_add_ps(sum, _mm_movehl_ps(sum, sum));
  sum = _mm_add_ss(sum, _mm_shuffle_ps(sum, sum, 0x55));
  _mm_store_ss(&ret, sum);
  return ret;
}
```