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

```asm
<prestd>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x38,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %rcx,0x10(%rsp)
  movss  %xmm0,0x18(%rsp)
  movss  %xmm2,0x1c(%rsp)
  movss  %xmm3,0x28(%rsp)
  test   %edx,%edx
  jle    L23
  movslq %edx,%rax
  mov    %r8d,0x2c(%rsp)
  xor    %r13d,%r13d
  mov    0x78(%rsp),%r14
  shl    $0x2,%rax
  mov    %edx,%r12d
  mov    %r9,%r15
  mov    %r13,%rbp
  mov    %rax,0x20(%rsp)
  nopl   (%rax)
L19:
  mov    0x8(%rsp),%rax
  movss  0x18(%rsp),%xmm0
  mov    %r12d,%edx
  mov    %ebx,%esi
  lea    (%r15,%rbp,1),%rcx
  movss  %xmm1,0x4(%rsp)
  lea    (%rax,%rbp,1),%r13
  mov    %r13,%rdi
  call   <mapstd_stride@plt>
  mov    %r12d,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <mean_stride@plt>
  mov    %r12d,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  movss  %xmm0,(%r14,%rbp,1)
  call   <std_stride@plt>
  mov    0x80(%rsp),%rax
  movss  0x4(%rsp),%xmm1
  movss  %xmm0,(%rax,%rbp,1)
  add    $0x4,%rbp
  cmp    0x20(%rsp),%rbp
  jne    L19
  mov    0x2c(%rsp),%ebp
L23:
  test   %ebp,%ebp
  jle    L29
  movslq %ebp,%r12
  movss  0x28(%rsp),%xmm1
  mov    0x88(%rsp),%r15
  xor    %r13d,%r13d
  shl    $0x2,%r12
  nopl   0x0(%rax,%rax,1)
L28:
  mov    0x10(%rsp),%rax
  mov    0x70(%rsp),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  movss  0x1c(%rsp),%xmm0
  movss  %xmm1,0x4(%rsp)
  lea    (%rax,%r13,1),%r14
  add    %r13,%rcx
  mov    %r14,%rdi
  call   <mapstd_stride@plt>
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <mean_stride@plt>
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r14,%rdi
  movss  %xmm0,(%r15,%r13,1)
  call   <std_stride@plt>
  mov    0x90(%rsp),%rax
  movss  0x4(%rsp),%xmm1
  movss  %xmm0,(%rax,%r13,1)
  add    $0x4,%r13
  cmp    %r12,%r13
  jne    L28
L29:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void prestd(int size, float *p, int leninp, float *t, int lenoup, float *pn, float *tn, float ymean, float ystd, float omean, float ostd, float *dmean, float *dstd, float *tmean, float *tstd) {
  int i;
  float temp;
  for (i = 0; i < leninp; ++i) {
    mapstd_stride(p + i, size, leninp, ymean, ystd, pn + i);
    temp = mean_stride(p + i, size, leninp);
    dmean[i] = temp;
    temp = std_stride(p + i, size, leninp);
    dstd[i] = temp;
  }
  for (i = 0; i < lenoup; ++i) {
    mapstd_stride(t + i, size, lenoup, omean, ostd, tn + i);
    temp = mean_stride(t + i, size, lenoup);
    tmean[i] = temp;
    temp = std_stride(t + i, size, lenoup);
    tstd[i] = temp;
  }
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<prestd>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x38,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %rcx,0x10(%rsp)
  movss  %xmm0,0x18(%rsp)
  movss  %xmm2,0x1c(%rsp)
  movss  %xmm3,0x28(%rsp)
  test   %edx,%edx
  jle    L30
  movslq %edx,%rax
  mov    %r8d,0x2c(%rsp)
  xor    %r13d,%r13d
  mov    0x78(%rsp),%r14
  shl    $0x2,%rax
  mov    %edx,%r12d
  mov    %r9,%r15
  mov    %r13,%rbp
  mov    %rax,0x20(%rsp)
  nopl   (%rax)
L26:
  mov    0x8(%rsp),%rax
  movss  0x18(%rsp),%xmm0
  mov    %r12d,%edx
  mov    %ebx,%esi
  lea    (%r15,%rbp,1),%rcx
  movss  %xmm1,0x4(%rsp)
  lea    (%rax,%rbp,1),%r13
  mov    %r13,%rdi
  call   <mapstd_stride@plt>
  mov    %r12d,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <mean_stride@plt>
  mov    %r12d,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  movss  %xmm0,(%r14,%rbp,1)
  call   <std_stride@plt>
  mov    0x80(%rsp),%rax
  movss  0x4(%rsp),%xmm1
  movss  %xmm0,(%rax,%rbp,1)
  add    $0x4,%rbp
  cmp    0x20(%rsp),%rbp
  jne    L26
  mov    0x2c(%rsp),%ebp
L30:
  test   %ebp,%ebp
  jle    L9
  movslq %ebp,%r12
  movss  0x28(%rsp),%xmm1
  mov    0x88(%rsp),%r15
  xor    %r13d,%r13d
  shl    $0x2,%r12
  nopl   0x0(%rax,%rax,1)
L7:
  mov    0x10(%rsp),%rax
  mov    0x70(%rsp),%rcx
  mov    %ebp,%edx
  mov    %ebx,%esi
  movss  0x1c(%rsp),%xmm0
  movss  %xmm1,0x4(%rsp)
  lea    (%rax,%r13,1),%r14
  add    %r13,%rcx
  mov    %r14,%rdi
  call   <mapstd_stride@plt>
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <mean_stride@plt>
  mov    %ebp,%edx
  mov    %ebx,%esi
  mov    %r14,%rdi
  movss  %xmm0,(%r15,%r13,1)
  call   <std_stride@plt>
  mov    0x90(%rsp),%rax
  movss  0x4(%rsp),%xmm1
  movss  %xmm0,(%rax,%r13,1)
  add    $0x4,%r13
  cmp    %r12,%r13
  jne    L7
L9:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void prestd(int size, float *p, int leninp, float *t, int lenoup, float *pn, float *tn, float ymean, float ystd, float omean, float ostd, float *dmean, float *dstd, float *tmean, float *tstd) {
  int i;
  float temp;
  for (i = 0; i < leninp; ++i) {
    mapstd_stride(p + i, size, leninp, ymean, ystd, pn + i);
    temp = mean_stride(p + i, size, leninp);
    dmean[i] = temp;
    temp = std_stride(p + i, size, leninp);
    dstd[i] = temp;
  }
  for (i = 0; i < lenoup; ++i) {
    mapstd_stride(t + i, size, lenoup, omean, ostd, tn + i);
    temp = mean_stride(t + i, size, lenoup);
    tmean[i] = temp;
    temp = std_stride(t + i, size, lenoup);
    tstd[i] = temp;
  }
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<strcasecmp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
L19:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jne    L7
  cmpl   $0x0,-0x8(%rbp)
  jne    L19
L7:
  mov    -0x8(%rbp),%eax
  sub    -0x4(%rbp),%eax
  leave
  ret
```

assistant: ```c
int strcasecmp(const char *s1, const char *s2) {
  for (;;) {
    int c1 = tolower(*((unsigned char *)s1++));
    int c2 = tolower(*((unsigned char *)s2++));
    if ((c1 != c2) || (c1 == '\0')) {
      return (c1 - c2);
    }
  }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<strcasecmp>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %rsi,%rbp
L7:
  add    $0x1,%r12
  movzbl -0x1(%r12),%edi
  call   <tolower@plt>
  mov    %eax,%ebx
  add    $0x1,%rbp
  movzbl -0x1(%rbp),%edi
  call   <tolower@plt>
  cmp    %eax,%ebx
  jne    L13
  test   %ebx,%ebx
  jne    L7
L13:
  sub    %eax,%ebx
  mov    %ebx,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int strcasecmp(const char *s1, const char *s2) {
  for (;;) {
    int c1 = tolower(*((unsigned char *)s1++));
    int c2 = tolower(*((unsigned char *)s2++));
    if ((c1 != c2) || (c1 == '\0')) {
      return (c1 - c2);
    }
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<strcasecmp>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  xchg   %ax,%ax
L3:
  movzbl (%r12),%edi
  add    $0x1,%rbp
  add    $0x1,%r12
  call   <tolower@plt>
  movzbl -0x1(%rbp),%edi
  mov    %eax,%ebx
  call   <tolower@plt>
  cmp    %eax,%ebx
  jne    L19
  test   %ebx,%ebx
  jne    L3
L19:
  sub    %eax,%ebx
  mov    %ebx,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int strcasecmp(const char *s1, const char *s2) {
  for (;;) {
    int c1 = tolower(*((unsigned char *)s1++));
    int c2 = tolower(*((unsigned char *)s2++));
    if ((c1 != c2) || (c1 == '\0')) {
      return (c1 - c2);
    }
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<strcasecmp>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  xchg   %ax,%ax
L12:
  movzbl (%r12),%edi
  add    $0x1,%rbp
  add    $0x1,%r12
  call   <tolower@plt>
  movzbl -0x1(%rbp),%edi
  mov    %eax,%ebx
  call   <tolower@plt>
  cmp    %eax,%ebx
  jne    L13
  test   %ebx,%ebx
  jne    L12
L13:
  sub    %eax,%ebx
  mov    %ebx,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int strcasecmp(const char *s1, const char *s2) {
  for (;;) {
    int c1 = tolower(*((unsigned char *)s1++));
    int c2 = tolower(*((unsigned char *)s2++));
    if ((c1 != c2) || (c1 == '\0')) {
      return (c1 - c2);
    }
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<fxx>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
  movl   $0x1,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void fxx(int *pa, int *pb) {
  *pa = 0;
  *pb = 1;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<fxx>:
  endbr64
  movl   $0x0,(%rdi)
  movl   $0x1,(%rsi)
  ret
```

assistant: ```c
void fxx(int *pa, int *pb) {
  *pa = 0;
  *pb = 1;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<fxx>:
  endbr64
  movl   $0x0,(%rdi)
  movl   $0x1,(%rsi)
  ret
```

assistant: ```c
void fxx(int *pa, int *pb) {
  *pa = 0;
  *pb = 1;
}
```
user: What is the c source code of the assembly code below?

```asm
<fxx>:
  endbr64
  movl   $0x0,(%rdi)
  movl   $0x1,(%rsi)
  ret
```

assistant: ```c
void fxx(int *pa, int *pb) {
  *pa = 0;
  *pb = 1;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

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

assistant: ```c
int f() {
  __label__ l;
l:
  p();
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

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

assistant: ```c
int f() {
  __label__ l;
l:
  p();
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<f>:
  endbr64
  xor    %eax,%eax
  jmp    1050 <p@plt>
```

assistant: ```c
int f() {
  __label__ l;
l:
  p();
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<f>:
  endbr64
  xor    %eax,%eax
  jmp    1050 <p@plt>
```

assistant: ```c
int f() {
  __label__ l;
l:
  p();
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<_shiftL>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  mov    %rsi,%r8
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %edx,%r9d
  shr    $0x3,%r9b
  movzbl %r9b,%r10d
  and    $0x7,%edx
  test   %r10d,%r10d
  jle    L117
  lea    0x7(%rdi),%rax
  lea    0x6(%rdi),%rcx
  lea    -0x1(%r10),%esi
  sub    %rsi,%rcx
L102:
  movb   $0x0,(%rax)
  sub    $0x1,%rax
  cmp    %rcx,%rax
  jne    L102
L117:
  cmp    $0x7,%r10d
  jg     L10
  movzbl %r9b,%eax
  mov    $0x7,%ecx
  sub    %eax,%ecx
  not    %rcx
  mov    $0x0,%eax
  movzbl %r9b,%esi
  mov    %rdi,%r11
  sub    %rsi,%r11
L68:
  movzbl 0x7(%r8,%rax,1),%esi
  mov    %sil,0x7(%r11,%rax,1)
  sub    $0x1,%rax
  cmp    %rcx,%rax
  jne    L68
L10:
  mov    $0x0,%eax
L78:
  movzbl (%rdi,%rax,1),%esi
  mov    %sil,(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x8,%rax
  jne    L78
  test   %edx,%edx
  jle    L70
  cmp    $0x7,%r10d
  jg     L70
  movzbl %r9b,%ecx
  mov    $0x7,%eax
  sub    %ecx,%eax
  mov    $0x7,%r11d
  mov    %ecx,%r10d
  mov    $0x8,%ebx
  sub    %edx,%ebx
  jmp    L110
L91:
  movslq %eax,%r8
  movzbl (%rsp,%r8,1),%esi
  mov    %edx,%ecx
  shl    %cl,%esi
  mov    %sil,(%rdi,%r8,1)
L44:
  sub    $0x1,%eax
  cmp    $0xffffffff,%eax
  je     L70
L110:
  mov    %r11d,%ecx
  sub    %eax,%ecx
  cmp    %r10d,%ecx
  je     L91
  movslq %eax,%r9
  lea    0x1(%rax),%esi
  movslq %esi,%rsi
  movzbl (%rsp,%rsi,1),%esi
  mov    %ebx,%ecx
  sar    %cl,%esi
  movzbl (%rsp,%r9,1),%r8d
  mov    %edx,%ecx
  shl    %cl,%r8d
  or     %r8d,%esi
  mov    %sil,(%rdi,%r9,1)
  jmp    L44
L70:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L53
  add    $0x10,%rsp
  pop    %rbx
  ret
L53:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void _shiftL(unsigned char ans[8], unsigned char x[8], unsigned char r) {
  int i;
  int shiftbytes = r / 8;
  int shiftbits = r % 8;
  unsigned char temp[8];
  for (i = 0; i < shiftbytes; i++) {
    ans[7 - i] = 0;
  }
  for (i = shiftbytes; i < 8; i++) {
    ans[7 - i] = x[7 - i + shiftbytes];
  }
  for (i = 0; i < 8; i++) {
    temp[i] = ans[i];
  }
  if (shiftbits > 0) {
    for (i = shiftbytes; i < 8; i++) {
      if (i == shiftbytes) {
        ans[7 - i] = (temp[7 - i] << shiftbits);
      } else {
        ans[7 - i] = (temp[7 - i] << shiftbits) | (temp[8 - i] >> (8 - shiftbits));
      }
    }
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<maxmnr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %ecx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    %r9,-0x38(%rbp)
  movsd  D0(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  movl   $0xffffffff,(%rax)
  mov    -0x38(%rbp),%rax
  movl   $0xffffffff,(%rax)
  movl   $0x0,-0xc(%rbp)
  jmp    L57
L47:
  movl   $0x0,-0x10(%rbp)
  jmp    L21
L39:
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x5,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x2,%al
  je     L33
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x8,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm1
  movsd  -0x8(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L33
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x8,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  mov    -0x10(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x38(%rbp),%rax
  mov    -0xc(%rbp),%edx
  mov    %edx,(%rax)
L33:
  addl   $0x1,-0x10(%rbp)
L21:
  mov    -0x10(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L39
  addl   $0x1,-0xc(%rbp)
L57:
  mov    -0xc(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L47
  nop
  nop
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: tag: D0
data_type: f64

tool: D0: 999999

assistant: ```c
void maxmnr(double mnr[2][32], char used[2][32], int sblimit, int nch, int *min_sb, int *min_ch) {
  int sb, ch;
  double small;
  small = 999999.0;
  *min_sb = -1;
  *min_ch = -1;
  for (ch = 0; ch < nch; ++ch)
    for (sb = 0; sb < sblimit; sb++)
      if (used[ch][sb] != 2 && small > mnr[ch][sb]) {
        small = mnr[ch][sb];
        *min_sb = sb;
        *min_ch = ch;
      }
}
```
user: Translate the below assembly code into C programming language:

```asm
<maxmnr>:
  endbr64
  movl   $0xffffffff,(%r8)
  movl   $0xffffffff,(%r9)
  test   %ecx,%ecx
  jle    L73
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  mov    %ecx,%ebp
  mov    %r8,%r12
  mov    %rdi,%r8
  movsd  D1(%rip),%xmm1
  mov    $0x0,%r11d
  mov    %edx,%edi
  jmp    L33
L20:
  add    $0x1,%rax
  cmp    %rax,%rdi
  je     L29
L4:
  cmpb   $0x2,(%rcx,%rax,1)
  je     L20
  movsd  (%r10,%rax,8),%xmm0
  comisd %xmm0,%xmm1
  jbe    L20
  mov    %eax,(%r12)
  mov    %r11d,(%r9)
  movapd %xmm0,%xmm1
  jmp    L20
L29:
  add    $0x1,%r11d
  add    $0x100,%r8
  add    $0x20,%rsi
  cmp    %r11d,%ebp
  je     L57
L33:
  mov    %rsi,%rcx
  mov    %r8,%r10
  mov    $0x0,%eax
  test   %ebx,%ebx
  jg     L4
  jmp    L29
L57:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L73:
  ret
```

tool_calls: name: parse_data
arguments: tag: D1
data_type: f64

tool: D1: 999999

assistant: ```c
void maxmnr(double mnr[2][32], char used[2][32], int sblimit, int nch, int *min_sb, int *min_ch) {
  int sb, ch;
  double small;
  small = 999999.0;
  *min_sb = -1;
  *min_ch = -1;
  for (ch = 0; ch < nch; ++ch)
    for (sb = 0; sb < sblimit; sb++)
      if (used[ch][sb] != 2 && small > mnr[ch][sb]) {
        small = mnr[ch][sb];
        *min_sb = sb;
        *min_ch = ch;
      }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<maxmnr>:
  endbr64
  movl   $0xffffffff,(%r8)
  mov    %edx,%r10d
  mov    %ecx,%r11d
  movl   $0xffffffff,(%r9)
  test   %ecx,%ecx
  jle    L5
  movsd  D9(%rip),%xmm1
  mov    %rdi,%rcx
  movslq %edx,%rdx
  xor    %edi,%edi
  nopl   0x0(%rax)
L21:
  xor    %eax,%eax
  test   %r10d,%r10d
  jle    L0
  nopw   0x0(%rax,%rax,1)
L37:
  cmpb   $0x2,(%rsi,%rax,1)
  je     L2
  movsd  (%rcx,%rax,8),%xmm0
  comisd %xmm0,%xmm1
  jbe    L2
  mov    %eax,(%r8)
  movapd %xmm0,%xmm1
  mov    %edi,(%r9)
L2:
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L37
L0:
  add    $0x1,%edi
  add    $0x20,%rsi
  add    $0x100,%rcx
  cmp    %edi,%r11d
  jne    L21
L5:
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D9
datatype: f64

tool: D9: 999999

assistant: ```c
void maxmnr(double mnr[2][32], char used[2][32], int sblimit, int nch, int *min_sb, int *min_ch) {
  int sb, ch;
  double small;
  small = 999999.0;
  *min_sb = -1;
  *min_ch = -1;
  for (ch = 0; ch < nch; ++ch)
    for (sb = 0; sb < sblimit; sb++)
      if (used[ch][sb] != 2 && small > mnr[ch][sb]) {
        small = mnr[ch][sb];
        *min_sb = sb;
        *min_ch = ch;
      }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<maxmnr>:
  endbr64
  movl   $0xffffffff,(%r8)
  mov    %ecx,%r10d
  movl   $0xffffffff,(%r9)
  test   %ecx,%ecx
  jle    L8
  test   %edx,%edx
  jle    L8
  movsd  D6(%rip),%xmm1
  mov    %rdi,%rcx
  movslq %edx,%rdx
  xor    %edi,%edi
  nopl   (%rax)
L55:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L7:
  cmpb   $0x2,(%rsi,%rax,1)
  je     L50
  movsd  (%rcx,%rax,8),%xmm0
  comisd %xmm0,%xmm1
  jbe    L50
  mov    %eax,(%r8)
  movapd %xmm0,%xmm1
  mov    %edi,(%r9)
L50:
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L7
  add    $0x1,%edi
  add    $0x100,%rcx
  add    $0x20,%rsi
  cmp    %edi,%r10d
  jne    L55
L8:
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D6
data_type: f64

tool: D6: 999999

assistant: ```c
void maxmnr(double mnr[2][32], char used[2][32], int sblimit, int nch, int *min_sb, int *min_ch) {
  int sb, ch;
  double small;
  small = 999999.0;
  *min_sb = -1;
  *min_ch = -1;
  for (ch = 0; ch < nch; ++ch)
    for (sb = 0; sb < sblimit; sb++)
      if (used[ch][sb] != 2 && small > mnr[ch][sb]) {
        small = mnr[ch][sb];
        *min_sb = sb;
        *min_ch = ch;
      }
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0xffffffff,-0x34(%rbp)
  movl   $0xffffffff,-0x30(%rbp)
  movl   $0xffffffff,-0x2c(%rbp)
  movabs $0x3736353433323130,%rax
  mov    %rax,-0x23(%rbp)
  movb   $0x0,-0x1b(%rbp)
  movabs $0x6867666564636261,%rax
  mov    %rax,-0x1a(%rbp)
  movb   $0x0,-0x12(%rbp)
  movabs $0x7478742e656c6f68,%rax
  mov    %rax,-0x11(%rbp)
  movb   $0x0,-0x9(%rbp)
  movl   $0x8,-0x28(%rbp)
  mov    D8(%rip),%rax
  mov    (%rax),%edx
  mov    D22(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  lea    -0x11(%rbp),%rax
  mov    $0x1c0,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <open@plt>
  mov    %eax,-0x34(%rbp)
  cmpl   $0xffffffff,-0x34(%rbp)
  jne    L33
  mov    $0xffffffff,%eax
  jmp    L74
L33:
  mov    -0x28(%rbp),%edx
  lea    -0x23(%rbp),%rcx
  mov    -0x34(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  je     L1
  mov    $0xffffffff,%eax
  jmp    L74
L1:
  mov    D25(%rip),%rax
  mov    (%rax),%edx
  mov    -0x34(%rbp),%eax
  mov    $0x20,%esi
  mov    %eax,%edi
  call   <lseek@plt>
  mov    %eax,-0x2c(%rbp)
  cmpl   $0xffffffff,-0x2c(%rbp)
  jne    L15
  mov    $0xffffffff,%eax
  jmp    L74
L15:
  mov    -0x28(%rbp),%edx
  lea    -0x1a(%rbp),%rcx
  mov    -0x34(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  je     L7
  mov    $0xffffffff,%eax
  jmp    L74
L7:
  mov    -0x34(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    $0x0,%eax
L74:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L86
  call   <__stack_chk_fail@plt>
L86:
  leave
  ret
```

assistant: ```c
int main(void) {
  int fd = -1;
  ssize_t size = -1;
  off_t offset = -1;
  char buf1[] = "01234567";
  char buf2[] = "abcdefgh";
  char filename[] = "hole.txt";
  int len = 8;
  fd = open(filename, O_RDWR | O_CREAT, 00700);
  if (-1 == fd) {
    return -1;
  }
  size = write(fd, buf1, len);
  if (size != len) {
    return -1;
  }
  offset = lseek(fd, 32, SEEK_SET);
  if (-1 == offset) {
    return -1;
  }
  size = write(fd, buf2, len);
  if (size != len) {
    return -1;
  }
  close(fd);
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movabs $0x3736353433323130,%rax
  mov    %rax,0xd(%rsp)
  movb   $0x0,0x15(%rsp)
  movabs $0x6867666564636261,%rax
  mov    %rax,0x16(%rsp)
  movb   $0x0,0x1e(%rsp)
  movabs $0x7478742e656c6f68,%rax
  mov    %rax,0x1f(%rsp)
  movb   $0x0,0x27(%rsp)
  mov    D29(%rip),%rax
  mov    (%rax),%esi
  mov    D17(%rip),%rax
  or     (%rax),%esi
  lea    0x1f(%rsp),%rdi
  mov    $0x1c0,%edx
  call   <open@plt>
  mov    %eax,%ebx
  cmp    $0xffffffff,%eax
  je     L25
  lea    0xd(%rsp),%rsi
  mov    $0x8,%edx
  mov    %eax,%edi
  call   <write@plt>
  cmp    $0x8,%eax
  jne    L79
  mov    D23(%rip),%rax
  mov    (%rax),%edx
  mov    $0x20,%esi
  mov    %ebx,%edi
  call   <lseek@plt>
  cmp    $0xffffffff,%eax
  je     L33
  lea    0x16(%rsp),%rsi
  mov    $0x8,%edx
  mov    %ebx,%edi
  call   <write@plt>
  cmp    $0x8,%eax
  jne    L71
  mov    %ebx,%edi
  call   <close@plt>
  mov    $0x0,%ebx
L25:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L77
  mov    %ebx,%eax
  add    $0x30,%rsp
  pop    %rbx
  ret
L79:
  mov    $0xffffffff,%ebx
  jmp    L25
L33:
  mov    %eax,%ebx
  jmp    L25
L71:
  mov    $0xffffffff,%ebx
  jmp    L25
L77:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int main(void) {
  int fd = -1;
  ssize_t size = -1;
  off_t offset = -1;
  char buf1[] = "01234567";
  char buf2[] = "abcdefgh";
  char filename[] = "hole.txt";
  int len = 8;
  fd = open(filename, O_RDWR | O_CREAT, 00700);
  if (-1 == fd) {
    return -1;
  }
  size = write(fd, buf1, len);
  if (size != len) {
    return -1;
  }
  offset = lseek(fd, 32, SEEK_SET);
  if (-1 == offset) {
    return -1;
  }
  size = write(fd, buf2, len);
  if (size != len) {
    return -1;
  }
  close(fd);
  return 0;
}
```