ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请从给定的汇编指令推导出C源代码：

```asm
<asalbul>:
  endbr64
  mov    (%rdi),%esi
  cmp    $0x2,%esi
  jle    L56
  test   $0x1,%sil
  je     L33
  mov    $0x2,%ecx
  jmp    L32
  nopl   0x0(%rax,%rax,1)
L49:
  mov    %esi,%eax
  cltd
  idiv   %ecx
  test   %edx,%edx
  je     L20
L32:
  add    $0x1,%ecx
  cmp    %esi,%ecx
  jne    L49
L56:
  mov    $0x1,%edx
L20:
  mov    %edx,%eax
  ret
L33:
  xor    %edx,%edx
  jmp    L20
```

assistant: ```c
int asalbul(int *psayi) {
  int i;
  for (i = 2; i < *psayi; i++) {
    if ((*psayi % i) == 0) {
      return 0;
    }
  }
  return 1;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<asalbul>:
  endbr64
  mov    (%rdi),%esi
  cmp    $0x2,%esi
  jle    L15
  test   $0x1,%sil
  je     L0
  mov    $0x2,%ecx
  jmp    L23
  nopl   0x0(%rax,%rax,1)
L49:
  mov    %esi,%eax
  cltd
  idiv   %ecx
  test   %edx,%edx
  je     L17
L23:
  add    $0x1,%ecx
  cmp    %esi,%ecx
  jne    L49
L15:
  mov    $0x1,%edx
L17:
  mov    %edx,%eax
  ret
L0:
  xor    %edx,%edx
  jmp    L17
```

assistant: ```c
int asalbul(int *psayi) {
  int i;
  for (i = 2; i < *psayi; i++) {
    if ((*psayi % i) == 0) {
      return 0;
    }
  }
  return 1;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<my_putstr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <my_strlen@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x1,%edi
  call   <write@plt>
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
int my_putstr(char *str) {
  write(1, str, my_strlen(str));
  return (0);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<my_putstr>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <my_strlen@plt>
  mov    %eax,%edx
  mov    %rbx,%rsi
  mov    $0x1,%edi
  call   <write@plt>
  mov    $0x0,%eax
  pop    %rbx
  ret
```

assistant: ```c
int my_putstr(char *str) {
  write(1, str, my_strlen(str));
  return (0);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<my_putstr>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  call   <my_strlen@plt>
  mov    %rbp,%rsi
  mov    $0x1,%edi
  mov    %eax,%edx
  call   <write@plt>
  xor    %eax,%eax
  pop    %rbp
  ret
```

assistant: ```c
int my_putstr(char *str) {
  write(1, str, my_strlen(str));
  return (0);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<my_putstr>:
  endbr64
  push   %rbp
  mov    %rdi,%rbp
  call   <my_strlen@plt>
  mov    %rbp,%rsi
  mov    $0x1,%edi
  mov    %eax,%edx
  call   <write@plt>
  xor    %eax,%eax
  pop    %rbp
  ret
```

assistant: ```c
int my_putstr(char *str) {
  write(1, str, my_strlen(str));
  return (0);
}
```
user: Translate the below assembly code into C programming language:

```asm
<max_seq_sum>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    -0x2c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jle    L1
  mov    $0x0,%eax
  jmp    L68
L1:
  mov    -0x2c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jne    L18
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    $0x0,%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  jmp    L68
L18:
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L73
L69:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    %eax,-0x14(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x14(%rbp),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x1c(%rbp)
  subl   $0x1,-0x10(%rbp)
L73:
  mov    -0x10(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jge    L69
  movl   $0x0,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L76
L55:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x18(%rbp)
  addl   $0x1,-0x10(%rbp)
L76:
  mov    -0x10(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jle    L55
  mov    -0x18(%rbp),%eax
  add    %eax,-0x1c(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x2c(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <max_seq_sum>
  mov    %eax,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <max_seq_sum>
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%edx
  mov    -0x4(%rbp),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    -0x8(%rbp),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
L68:
  leave
  ret
```

assistant: ```c
int max_seq_sum(int *seq, int l, int u) {
  if (l > u)
    return (0);
  if (l == u)
    return (0 > seq[l] ? 0 : seq[l]);
  int m, lmax, rmax, sum;
  int i;
  int left, right;
  m = (l + u) / 2;
  lmax = sum = 0;
  for (i = m; i >= l; i--) {
    sum += seq[i];
    lmax = lmax > sum ? lmax : sum;
  }
  rmax = sum = 0;
  for (i = m; i <= u; i++) {
    sum += seq[i];
    rmax = rmax > sum ? rmax : sum;
  }
  lmax += rmax;
  left = max_seq_sum(seq, l, m);
  right = max_seq_sum(seq, m + 1, u);
  left = left > right ? left : right;
  return (left > lmax ? left : lmax);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<max_seq_sum>:
  endbr64
  mov    $0x0,%eax
  cmp    %edx,%esi
  jg     L13
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %esi,%r8d
  mov    %edx,%ebp
  je     L16
  lea    (%rsi,%rdx,1),%eax
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  cmp    %ebx,%esi
  jg     L3
  movslq %ebx,%rdx
  shl    $0x2,%rdx
  lea    (%rdi,%rdx,1),%rax
  lea    -0x4(%rdi,%rdx,1),%rdi
  mov    %ebx,%edx
  sub    %esi,%edx
  shl    $0x2,%rdx
  sub    %rdx,%rdi
  mov    $0x0,%ecx
  mov    $0x0,%esi
L80:
  add    (%rax),%ecx
  cmp    %ecx,%esi
  cmovl  %ecx,%esi
  sub    $0x4,%rax
  cmp    %rdi,%rax
  jne    L80
L39:
  cmp    %ebx,%ebp
  jl     L26
  movslq %ebx,%rcx
  lea    (%r12,%rcx,4),%rax
  mov    %ebp,%edx
  sub    %ebx,%edx
  add    %rcx,%rdx
  lea    0x4(%r12,%rdx,4),%r9
  mov    $0x0,%edi
  mov    $0x0,%ecx
L21:
  add    (%rax),%edi
  cmp    %edi,%ecx
  cmovl  %edi,%ecx
  add    $0x4,%rax
  cmp    %r9,%rax
  jne    L21
L53:
  lea    (%rsi,%rcx,1),%r13d
  mov    %ebx,%edx
  mov    %r8d,%esi
  mov    %r12,%rdi
  call   <max_seq_sum>
  mov    %eax,%r14d
  lea    0x1(%rbx),%esi
  mov    %ebp,%edx
  mov    %r12,%rdi
  call   <max_seq_sum>
  cmp    %eax,%r14d
  cmovge %r14d,%eax
  cmp    %r13d,%eax
  cmovl  %r13d,%eax
L24:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L16:
  movslq %esi,%r8
  mov    (%rdi,%r8,4),%eax
  test   %eax,%eax
  mov    $0x0,%edx
  cmovs  %edx,%eax
  jmp    L24
L3:
  mov    $0x0,%esi
  jmp    L39
L26:
  mov    $0x0,%ecx
  jmp    L53
L13:
  ret
```

assistant: ```c
int max_seq_sum(int *seq, int l, int u) {
  if (l > u)
    return (0);
  if (l == u)
    return (0 > seq[l] ? 0 : seq[l]);
  int m, lmax, rmax, sum;
  int i;
  int left, right;
  m = (l + u) / 2;
  lmax = sum = 0;
  for (i = m; i >= l; i--) {
    sum += seq[i];
    lmax = lmax > sum ? lmax : sum;
  }
  rmax = sum = 0;
  for (i = m; i <= u; i++) {
    sum += seq[i];
    rmax = rmax > sum ? rmax : sum;
  }
  lmax += rmax;
  left = max_seq_sum(seq, l, m);
  right = max_seq_sum(seq, m + 1, u);
  left = left > right ? left : right;
  return (left > lmax ? left : lmax);
}
```
user: Translate the below assembly code into C programming language:

```asm
<max_seq_sum>:
  endbr64
  xor    %eax,%eax
  cmp    %edx,%esi
  jg     L22
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  je     L49
  lea    (%rsi,%rdx,1),%eax
  mov    %edx,%r13d
  mov    %eax,%ebp
  shr    $0x1f,%ebp
  add    %eax,%ebp
  sar    %ebp
  cmp    %ebp,%esi
  jg     L11
  movslq %ebp,%rax
  xor    %ebx,%ebx
  shl    $0x2,%rax
  lea    -0x4(%rdi,%rax,1),%rcx
  lea    (%rdi,%rax,1),%rdx
  mov    %ebp,%eax
  sub    %esi,%eax
  shl    $0x2,%rax
  sub    %rax,%rcx
  xor    %eax,%eax
  nopl   (%rax)
L59:
  add    (%rdx),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  sub    $0x4,%rdx
  cmp    %rcx,%rdx
  jne    L59
L19:
  cmp    %ebp,%r13d
  jl     L21
  mov    %r13d,%eax
  movslq %ebp,%rcx
  sub    %ebp,%eax
  lea    (%r14,%rcx,4),%rdx
  add    %rcx,%rax
  xor    %ecx,%ecx
  lea    0x4(%r14,%rax,4),%rdi
  xor    %eax,%eax
  nopl   (%rax)
L14:
  add    (%rdx),%eax
  cmp    %eax,%ecx
  cmovl  %eax,%ecx
  add    $0x4,%rdx
  cmp    %rdx,%rdi
  jne    L14
  add    %ecx,%ebx
L21:
  mov    %ebp,%edx
  mov    %r14,%rdi
  call   <max_seq_sum>
  lea    0x1(%rbp),%esi
  mov    %r13d,%edx
  mov    %r14,%rdi
  mov    %eax,%r12d
  call   <max_seq_sum>
  cmp    %ebx,%r12d
  mov    %eax,%r8d
  mov    %ebx,%eax
  pop    %rbx
  pop    %rbp
  cmovge %r12d,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  cmp    %r8d,%eax
  cmovl  %r8d,%eax
  ret
  nopl   0x0(%rax)
L22:
  ret
  nopl   0x0(%rax)
L11:
  xor    %ebx,%ebx
  jmp    L19
  nopl   0x0(%rax)
L49:
  movslq %esi,%rsi
  xor    %edx,%edx
  pop    %rbx
  pop    %rbp
  mov    (%rdi,%rsi,4),%eax
  pop    %r12
  pop    %r13
  pop    %r14
  test   %eax,%eax
  cmovs  %edx,%eax
  ret
```

assistant: ```c
int max_seq_sum(int *seq, int l, int u) {
  if (l > u)
    return (0);
  if (l == u)
    return (0 > seq[l] ? 0 : seq[l]);
  int m, lmax, rmax, sum;
  int i;
  int left, right;
  m = (l + u) / 2;
  lmax = sum = 0;
  for (i = m; i >= l; i--) {
    sum += seq[i];
    lmax = lmax > sum ? lmax : sum;
  }
  rmax = sum = 0;
  for (i = m; i <= u; i++) {
    sum += seq[i];
    rmax = rmax > sum ? rmax : sum;
  }
  lmax += rmax;
  left = max_seq_sum(seq, l, m);
  right = max_seq_sum(seq, m + 1, u);
  left = left > right ? left : right;
  return (left > lmax ? left : lmax);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<max_seq_sum>:
  endbr64
  xor    %eax,%eax
  cmp    %edx,%esi
  jg     L57
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  je     L27
  lea    (%rsi,%rdx,1),%eax
  mov    %edx,%r13d
  mov    %eax,%ebp
  shr    $0x1f,%ebp
  add    %eax,%ebp
  sar    %ebp
  cmp    %ebp,%esi
  jg     L21
  movslq %ebp,%rax
  xor    %ebx,%ebx
  shl    $0x2,%rax
  lea    -0x4(%rdi,%rax,1),%rcx
  lea    (%rdi,%rax,1),%rdx
  mov    %ebp,%eax
  sub    %esi,%eax
  shl    $0x2,%rax
  sub    %rax,%rcx
  xor    %eax,%eax
  nopl   (%rax)
L56:
  add    (%rdx),%eax
  cmp    %eax,%ebx
  cmovl  %eax,%ebx
  sub    $0x4,%rdx
  cmp    %rcx,%rdx
  jne    L56
L9:
  cmp    %ebp,%r13d
  jl     L1
  mov    %r13d,%eax
  movslq %ebp,%rcx
  sub    %ebp,%eax
  lea    (%r14,%rcx,4),%rdx
  add    %rcx,%rax
  xor    %ecx,%ecx
  lea    0x4(%r14,%rax,4),%rdi
  xor    %eax,%eax
  nopl   (%rax)
L49:
  add    (%rdx),%eax
  cmp    %eax,%ecx
  cmovl  %eax,%ecx
  add    $0x4,%rdx
  cmp    %rdx,%rdi
  jne    L49
  add    %ecx,%ebx
L1:
  mov    %ebp,%edx
  mov    %r14,%rdi
  call   <max_seq_sum>
  lea    0x1(%rbp),%esi
  mov    %r13d,%edx
  mov    %r14,%rdi
  mov    %eax,%r12d
  call   <max_seq_sum>
  cmp    %ebx,%r12d
  mov    %eax,%r8d
  mov    %ebx,%eax
  pop    %rbx
  pop    %rbp
  cmovge %r12d,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  cmp    %r8d,%eax
  cmovl  %r8d,%eax
  ret
  nopl   0x0(%rax)
L57:
  ret
  nopl   0x0(%rax)
L21:
  xor    %ebx,%ebx
  jmp    L9
  nopl   0x0(%rax)
L27:
  movslq %esi,%rsi
  xor    %edx,%edx
  pop    %rbx
  pop    %rbp
  mov    (%rdi,%rsi,4),%eax
  pop    %r12
  pop    %r13
  pop    %r14
  test   %eax,%eax
  cmovs  %edx,%eax
  ret
```

assistant: ```c
int max_seq_sum(int *seq, int l, int u) {
  if (l > u)
    return (0);
  if (l == u)
    return (0 > seq[l] ? 0 : seq[l]);
  int m, lmax, rmax, sum;
  int i;
  int left, right;
  m = (l + u) / 2;
  lmax = sum = 0;
  for (i = m; i >= l; i--) {
    sum += seq[i];
    lmax = lmax > sum ? lmax : sum;
  }
  rmax = sum = 0;
  for (i = m; i <= u; i++) {
    sum += seq[i];
    rmax = rmax > sum ? rmax : sum;
  }
  lmax += rmax;
  left = max_seq_sum(seq, l, m);
  right = max_seq_sum(seq, m + 1, u);
  left = left > right ? left : right;
  return (left > lmax ? left : lmax);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<xdr_union>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <xdr_enum@plt>
  test   %eax,%eax
  jne    L8
  mov    D23(%rip),%rax
  mov    (%rax),%eax
  jmp    L23
L8:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rbx
  jmp    L78
L25:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  cmp    %rax,%rbx
  jne    L11
  mov    -0x30(%rbp),%rax
  mov    0x8(%rax),%r8
  mov    -0x28(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    $0xffffffff,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   *%r8
  jmp    L23
L11:
  addq   $0x10,-0x30(%rbp)
L78:
  mov    -0x30(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    D14(%rip),%rdx
  cmp    %rdx,%rax
  jne    L25
  mov    D14(%rip),%rax
  cmp    %rax,-0x38(%rbp)
  je     L3
  mov    -0x28(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    -0x38(%rbp),%r8
  mov    $0xffffffff,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   *%r8
  jmp    L23
L3:
  mov    D23(%rip),%rax
  mov    (%rax),%eax
L23:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choices, xdrproc_t dfault) {
  register enum_t dscm;
  if (!xdr_enum(xdrs, dscmp)) {
    return (FALSE);
  }
  dscm = *dscmp;
  for (; choices->proc != NULL_xdrproc_t; choices++) {
    if (choices->value == dscm)
      return ((*(choices->proc))(xdrs, unp, ((unsigned int)0 - 1)));
  }
  return ((dfault == NULL_xdrproc_t) ? FALSE : (*dfault)(xdrs, unp, ((unsigned int)0 - 1)));
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<xdr_union>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %rsi,%r14
  mov    %rdx,%r13
  mov    %rcx,%rbx
  mov    %r8,%r12
  call   <xdr_enum@plt>
  test   %eax,%eax
  je     L21
  mov    (%r14),%rdx
  mov    0x8(%rbx),%rax
  cmp    D0(%rip),%rax
  je     L65
L4:
  cmp    %rdx,(%rbx)
  je     L62
  add    $0x10,%rbx
  mov    0x8(%rbx),%rax
  cmp    D0(%rip),%rax
  jne    L4
L65:
  cmp    D0(%rip),%r12
  je     L14
  mov    $0xffffffff,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   *%r12
  jmp    L7
L21:
  mov    D17(%rip),%rax
  mov    (%rax),%eax
L7:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L62:
  mov    $0xffffffff,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   *%rax
  jmp    L7
L14:
  mov    D17(%rip),%rax
  mov    (%rax),%eax
  jmp    L7
```

assistant: ```c
bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choices, xdrproc_t dfault) {
  register enum_t dscm;
  if (!xdr_enum(xdrs, dscmp)) {
    return (FALSE);
  }
  dscm = *dscmp;
  for (; choices->proc != NULL_xdrproc_t; choices++) {
    if (choices->value == dscm)
      return ((*(choices->proc))(xdrs, unp, ((unsigned int)0 - 1)));
  }
  return ((dfault == NULL_xdrproc_t) ? FALSE : (*dfault)(xdrs, unp, ((unsigned int)0 - 1)));
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<xdr_union>:
  endbr64
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %r8,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rcx,%rbx
  call   <xdr_enum@plt>
  test   %eax,%eax
  je     L13
  mov    0x8(%rbx),%rax
  mov    D19(%rip),%rdx
  mov    0x0(%r13),%rcx
  cmp    %rdx,%rax
  jne    L44
  jmp    L36
  nopw   0x0(%rax,%rax,1)
L26:
  mov    0x18(%rbx),%rax
  add    $0x10,%rbx
  cmp    %rdx,%rax
  je     L36
L44:
  cmp    %rcx,(%rbx)
  jne    L26
  pop    %rbx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  pop    %rbp
  mov    $0xffffffff,%edx
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    *%rax
  nopw   0x0(%rax,%rax,1)
L13:
  mov    D17(%rip),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  mov    (%rax),%eax
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L36:
  cmp    %rdx,%r12
  je     L13
  pop    %rbx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  pop    %rbp
  mov    %r12,%rax
  mov    $0xffffffff,%edx
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    *%rax
```

assistant: ```c
bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choices, xdrproc_t dfault) {
  register enum_t dscm;
  if (!xdr_enum(xdrs, dscmp)) {
    return (FALSE);
  }
  dscm = *dscmp;
  for (; choices->proc != NULL_xdrproc_t; choices++) {
    if (choices->value == dscm)
      return ((*(choices->proc))(xdrs, unp, ((unsigned int)0 - 1)));
  }
  return ((dfault == NULL_xdrproc_t) ? FALSE : (*dfault)(xdrs, unp, ((unsigned int)0 - 1)));
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<xdr_union>:
  endbr64
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %r8,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rcx,%rbx
  call   <xdr_enum@plt>
  test   %eax,%eax
  je     L5
  mov    0x8(%rbx),%rax
  mov    D11(%rip),%rdx
  mov    0x0(%r13),%rcx
  cmp    %rdx,%rax
  jne    L42
  jmp    L40
  nopw   0x0(%rax,%rax,1)
L2:
  mov    0x18(%rbx),%rax
  add    $0x10,%rbx
  cmp    %rdx,%rax
  je     L40
L42:
  cmp    %rcx,(%rbx)
  jne    L2
  pop    %rbx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  pop    %rbp
  mov    $0xffffffff,%edx
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    *%rax
  nopw   0x0(%rax,%rax,1)
L5:
  mov    D8(%rip),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  mov    (%rax),%eax
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L40:
  cmp    %rdx,%r12
  je     L5
  pop    %rbx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  pop    %rbp
  mov    %r12,%rax
  mov    $0xffffffff,%edx
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    *%rax
```

assistant: ```c
bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choices, xdrproc_t dfault) {
  register enum_t dscm;
  if (!xdr_enum(xdrs, dscmp)) {
    return (FALSE);
  }
  dscm = *dscmp;
  for (; choices->proc != NULL_xdrproc_t; choices++) {
    if (choices->value == dscm)
      return ((*(choices->proc))(xdrs, unp, ((unsigned int)0 - 1)));
  }
  return ((dfault == NULL_xdrproc_t) ? FALSE : (*dfault)(xdrs, unp, ((unsigned int)0 - 1)));
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<mvnapp>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xdf0,%rsp
  mov    %rdi,%r10
  mov    %rsi,%rax
  mov    %rcx,%rsi
  mov    %r9,%r13
  mov    0xe20(%rsp),%r14
  mov    0xe28(%rsp),%r12
  mov    0xe30(%rsp),%rbp
  mov    0xe38(%rsp),%rbx
  mov    %fs:0x28,%rcx
  mov    %rcx,0xde8(%rsp)
  xor    %ecx,%ecx
  mov    (%rax),%edi
  test   %edi,%edi
  jle    L53
  lea    -0x1(%rdi),%r9d
  mov    %edi,%ecx
  mov    $0x0,%eax
L66:
  movsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,0x28(%rsp,%rax,8)
  movsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,0xc8(%rsp,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L66
  lea    0x200(%rsp),%rdx
  lea    (%r9,%r9,4),%rax
  shl    $0x5,%rax
  lea    0x2a0(%rsp,%rax,1),%r9
  mov    $0x0,%r11d
L14:
  movslq %r11d,%rax
  lea    (%r8,%rax,8),%rsi
  mov    $0x0,%eax
L13:
  movsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,0x8(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L13
  add    %edi,%r11d
  add    $0xa0,%rdx
  cmp    %r9,%rdx
  jne    L14
L53:
  cmpl   $0x1,(%r10)
  je     L57
  lea    0x160(%rsp),%rcx
  lea    0xc0(%rsp),%rdx
  lea    0x20(%rsp),%rsi
  lea    0xc(%rsp),%rax
  push   %rax
  lea    0x20(%rsp),%rax
  push   %rax
  lea    0x20(%rsp),%r9
  movsd  (%r14),%xmm0
  mov    0x0(%r13),%r8d
  call   <mvn2@plt>
  add    $0x10,%rsp
L23:
  movsd  0x10(%rsp),%xmm0
  movsd  %xmm0,(%r12)
  movsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  mov    0xc(%rsp),%eax
  mov    %eax,(%rbx)
  mov    0xde8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L34
  add    $0xdf0,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L57:
  lea    0x160(%rsp),%rcx
  lea    0xc0(%rsp),%rdx
  lea    0x20(%rsp),%rsi
  lea    0xc(%rsp),%rax
  push   %rax
  lea    0x20(%rsp),%rax
  push   %rax
  lea    0x20(%rsp),%r9
  movsd  (%r14),%xmm0
  mov    0x0(%r13),%r8d
  call   <mvn1@plt>
  add    $0x10,%rsp
  jmp    L23
L34:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void mvnapp(int *type, int *m0, double w0[], double x0[], double corr[], int *nsim, double *eps, double *pr, double *sd, int *ifail) {
  double r[20][20];
  double w[20], x[20];
  double p, perr;
  int i, m, j, k, ierr;
  void mvn1(int, double[], double[], double[][20], int, double, double *, double *, int *);
  void mvn2(int, double[], double[], double[][20], int, double, double *, double *, int *);
  m = *m0;
  for (i = 1; i <= m; i++) {
    w[i] = w0[i - 1];
    x[i] = x0[i - 1];
  }
  for (i = 1, k = 0; i <= m; i++) {
    for (j = 1; j <= m; j++) {
      r[i][j] = corr[k];
      k++;
    }
  }
  if (*type == 1)
    mvn1(m, w, x, r, *nsim, *eps, &p, &perr, &ierr);
  else
    mvn2(m, w, x, r, *nsim, *eps, &p, &perr, &ierr);
  *pr = p;
  *sd = perr;
  *ifail = ierr;
}
```