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

```asm
<columnesGuanyadores>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,%eax
  mov    %al,-0x2c(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x3,-0x20(%rbp)
  jmp    L48
L17:
  movl   $0x0,-0x1c(%rbp)
  jmp    L34
L45:
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  sub    %rdx,%rax
  mov    %rax,%rcx
  mov    -0x28(%rbp),%rax
  lea    (%rcx,%rax,1),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,-0x2c(%rbp)
  jne    L20
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  sub    %rdx,%rax
  lea    -0x7(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%ebx
  movsbl -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <jugadorRival@plt>
  cmp    %al,%bl
  je     L20
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  sub    %rdx,%rax
  lea    -0xe(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%ebx
  movsbl -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <jugadorRival@plt>
  cmp    %al,%bl
  je     L20
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  sub    %rdx,%rax
  lea    -0x15(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%ebx
  movsbl -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <jugadorRival@plt>
  cmp    %al,%bl
  je     L20
  movsd  -0x18(%rbp),%xmm1
  movsd  D3(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L20:
  addl   $0x1,-0x1c(%rbp)
L34:
  cmpl   $0x6,-0x1c(%rbp)
  jle    L45
  addl   $0x1,-0x20(%rbp)
L48:
  cmpl   $0x5,-0x20(%rbp)
  jle    L17
  movsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D3
type_guessed: f32[2]

tool: {"D3": [0.0,1.875]}

assistant: ```c
double columnesGuanyadores(char tauler[6][7], char jugador) {
  int i, j;
  double cols = 0;
  for (i = 3; i < 6; i++) {
    for (j = 0; j < 7; j++) {
      if (tauler[i][j] == jugador && tauler[i - 1][j] != jugadorRival(jugador) && tauler[i - 2][j] != jugadorRival(jugador) && tauler[i - 3][j] != jugadorRival(jugador))
        cols++;
    }
  }
  return cols;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<columnesGuanyadores>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %esi,%ebp
  mov    %rdi,%r13
  lea    0x15(%rdi),%rax
  mov    %rax,0x20(%rsp)
  pxor   %xmm1,%xmm1
  movsd  %xmm1,0x28(%rsp)
  jmp    L54
L19:
  add    $0x1,%rbx
  cmp    $0x7,%rbx
  je     L63
L79:
  cmp    %bpl,(%r12,%rbx,1)
  jne    L19
  mov    0x8(%rsp),%rax
  movzbl (%rax,%rbx,1),%r15d
  movsbl %bpl,%r14d
  mov    %r14d,%edi
  call   <jugadorRival@plt>
  cmp    %al,%r15b
  je     L19
  mov    0x10(%rsp),%rax
  movzbl (%rax,%rbx,1),%r15d
  mov    %r14d,%edi
  call   <jugadorRival@plt>
  cmp    %al,%r15b
  je     L19
  mov    0x18(%rsp),%rax
  movzbl (%rax,%rbx,1),%r15d
  mov    %r14d,%edi
  call   <jugadorRival@plt>
  cmp    %al,%r15b
  je     L19
  movsd  0x28(%rsp),%xmm2
  addsd  D3(%rip),%xmm2
  movsd  %xmm2,0x28(%rsp)
  jmp    L19
L63:
  cmp    %r13,0x20(%rsp)
  je     L1
L54:
  lea    0x15(%r13),%r12
  lea    0xe(%r13),%rax
  mov    %rax,0x8(%rsp)
  mov    %r13,0x18(%rsp)
  add    $0x7,%r13
  mov    %r13,0x10(%rsp)
  mov    $0x0,%ebx
  jmp    L79
L1:
  movsd  0x28(%rsp),%xmm0
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D3
data_type: f32[2]

tool: {"D3": [0.0,1.875]}

assistant: ```c
double columnesGuanyadores(char tauler[6][7], char jugador) {
  int i, j;
  double cols = 0;
  for (i = 3; i < 6; i++) {
    for (j = 0; j < 7; j++) {
      if (tauler[i][j] == jugador && tauler[i - 1][j] != jugadorRival(jugador) && tauler[i - 2][j] != jugadorRival(jugador) && tauler[i - 3][j] != jugadorRival(jugador))
        cols++;
    }
  }
  return cols;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<columnesGuanyadores>:
  endbr64
  push   %r15
  lea    0x15(%rdi),%rax
  pxor   %xmm1,%xmm1
  mov    %esi,%r15d
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rax,0x10(%rsp)
  movsd  %xmm1,0x18(%rsp)
L46:
  lea    0xe(%r14),%rax
  mov    %r14,0x8(%rsp)
  lea    0x15(%r14),%r13
  xor    %ebx,%ebx
  mov    %rax,(%rsp)
  add    $0x7,%r14
  jmp    L71
  nopl   0x0(%rax)
L47:
  add    $0x1,%rbx
  cmp    $0x7,%rbx
  je     L45
L71:
  cmp    %r15b,0x0(%r13,%rbx,1)
  jne    L47
  mov    (%rsp),%rax
  movsbl %r15b,%r12d
  mov    %r12d,%edi
  movzbl (%rax,%rbx,1),%ebp
  call   <jugadorRival@plt>
  cmp    %al,%bpl
  je     L47
  movzbl (%r14,%rbx,1),%ebp
  mov    %r12d,%edi
  call   <jugadorRival@plt>
  cmp    %al,%bpl
  je     L47
  mov    0x8(%rsp),%rax
  mov    %r12d,%edi
  movzbl (%rax,%rbx,1),%ebp
  call   <jugadorRival@plt>
  cmp    %al,%bpl
  je     L47
  movsd  D5(%rip),%xmm2
  addsd  0x18(%rsp),%xmm2
  add    $0x1,%rbx
  movsd  %xmm2,0x18(%rsp)
  cmp    $0x7,%rbx
  jne    L71
  nopl   0x0(%rax,%rax,1)
L45:
  cmp    0x10(%rsp),%r14
  jne    L46
  movsd  0x18(%rsp),%xmm0
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D5
type: f32[2]

tool: {"D5": [0.0,1.875]}

assistant: ```c
double columnesGuanyadores(char tauler[6][7], char jugador) {
  int i, j;
  double cols = 0;
  for (i = 3; i < 6; i++) {
    for (j = 0; j < 7; j++) {
      if (tauler[i][j] == jugador && tauler[i - 1][j] != jugadorRival(jugador) && tauler[i - 2][j] != jugadorRival(jugador) && tauler[i - 3][j] != jugadorRival(jugador))
        cols++;
    }
  }
  return cols;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<nthUglyNumber>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x24(%rbp)
  cmpl   $0x1,-0x24(%rbp)
  jg     L21
  mov    -0x24(%rbp),%eax
  jmp    L19
L21:
  movl   $0x1,-0x20(%rbp)
  movl   $0x1,-0x1c(%rbp)
  movl   $0x1,-0x18(%rbp)
  movl   $0x1,-0x14(%rbp)
  movl   $0x2,-0x10(%rbp)
  jmp    L16
L35:
  mov    -0x20(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jge    L93
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jge    L93
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L80
L93:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jge    L28
  mov    -0x8(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jge    L28
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L80
L28:
  mov    -0x4(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jge    L80
  mov    -0x4(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jge    L80
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x14(%rbp)
L80:
  addl   $0x1,-0x10(%rbp)
L16:
  mov    -0x10(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jle    L35
  mov    -0x14(%rbp),%eax
L19:
  pop    %rbp
  ret
```

assistant: ```c
int nthUglyNumber(int n) {
  if (n <= 1)
    return n;
  int two = 1, three = 1, five = 1, nth = 1;
  for (int i = 2; i <= n; i++) {
    int two_next = two * 2;
    int three_next = three * 3;
    int five_next = five * 5;
    if (two_next < three_next && two_next < five_next) {
      nth = two = two_next;
    } else if (three_next < five_next && three_next < two_next) {
      nth = three = three_next;
    } else if (five_next < two_next && five_next < three_next) {
      nth = five = five_next;
    }
  }
  return nth;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<nthUglyNumber>:
  endbr64
  cmp    $0x1,%edi
  jle    L5
  push   %rbx
  add    $0x1,%edi
  mov    $0x2,%esi
  mov    $0x2,%r11d
  mov    $0x1,%r8d
  mov    $0x1,%r9d
  mov    $0x2,%ebx
  jmp    L8
L5:
  mov    %edi,%eax
  ret
L7:
  mov    %eax,%r11d
  mov    %eax,%ebx
L8:
  add    $0x1,%esi
  cmp    %edi,%esi
  je     L47
  lea    (%rbx,%rbx,1),%eax
  lea    (%r9,%r9,2),%ecx
  lea    (%r8,%r8,4),%edx
  cmp    %edx,%ecx
  mov    %edx,%r10d
  cmovle %ecx,%r10d
  cmp    %eax,%r10d
  jg     L7
  cmp    %edx,%eax
  mov    %edx,%r10d
  cmovle %eax,%r10d
  cmp    %ecx,%r10d
  jg     L38
  cmp    %ecx,%eax
  cmovg  %ecx,%eax
  cmp    %edx,%eax
  cmovg  %edx,%r11d
  cmovg  %edx,%r8d
  jmp    L8
L38:
  mov    %ecx,%r11d
  mov    %ecx,%r9d
  jmp    L8
L47:
  mov    %r11d,%eax
  pop    %rbx
  ret
```

assistant: ```c
int nthUglyNumber(int n) {
  if (n <= 1)
    return n;
  int two = 1, three = 1, five = 1, nth = 1;
  for (int i = 2; i <= n; i++) {
    int two_next = two * 2;
    int three_next = three * 3;
    int five_next = five * 5;
    if (two_next < three_next && two_next < five_next) {
      nth = two = two_next;
    } else if (three_next < five_next && three_next < two_next) {
      nth = three = three_next;
    } else if (five_next < two_next && five_next < three_next) {
      nth = five = five_next;
    }
  }
  return nth;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<nthUglyNumber>:
  endbr64
  mov    %edi,%eax
  cmp    $0x1,%edi
  jle    L44
  push   %rbx
  mov    $0x2,%r8d
  lea    0x1(%rdi),%ebx
  mov    $0x2,%eax
  mov    $0x1,%edi
  mov    $0x1,%r9d
  mov    $0x2,%r11d
  nop
L51:
  add    $0x1,%r8d
  cmp    %r8d,%ebx
  je     L35
L57:
  lea    (%r9,%r9,2),%esi
  lea    (%rdi,%rdi,4),%edx
  cmp    %edx,%esi
  mov    %edx,%r10d
  lea    (%r11,%r11,1),%ecx
  cmovle %esi,%r10d
  cmp    %ecx,%r10d
  jg     L40
  cmp    %edx,%ecx
  mov    %edx,%r10d
  cmovle %ecx,%r10d
  cmp    %esi,%r10d
  jg     L21
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  cmp    %edx,%ecx
  cmovg  %edx,%eax
  cmovg  %edx,%edi
  add    $0x1,%r8d
  cmp    %r8d,%ebx
  jne    L57
L35:
  pop    %rbx
  ret
  nopl   0x0(%rax,%rax,1)
L40:
  mov    %ecx,%eax
  mov    %ecx,%r11d
  jmp    L51
  nopw   0x0(%rax,%rax,1)
L21:
  mov    %esi,%eax
  mov    %esi,%r9d
  jmp    L51
  nopw   0x0(%rax,%rax,1)
L44:
  ret
```

assistant: ```c
int nthUglyNumber(int n) {
  if (n <= 1)
    return n;
  int two = 1, three = 1, five = 1, nth = 1;
  for (int i = 2; i <= n; i++) {
    int two_next = two * 2;
    int three_next = three * 3;
    int five_next = five * 5;
    if (two_next < three_next && two_next < five_next) {
      nth = two = two_next;
    } else if (three_next < five_next && three_next < two_next) {
      nth = three = three_next;
    } else if (five_next < two_next && five_next < three_next) {
      nth = five = five_next;
    }
  }
  return nth;
}
```
user: What is the c source code of the assembly code below:

```asm
<nthUglyNumber>:
  endbr64
  mov    %edi,%eax
  cmp    $0x1,%edi
  jle    L16
  cmp    $0x2,%edi
  je     L41
  push   %rbx
  mov    $0x3,%edi
  lea    0x1(%rax),%ebx
  mov    $0x1,%r8d
  mov    $0x2,%eax
  mov    $0x1,%r9d
  mov    $0x2,%r11d
  jmp    L72
  nopw   0x0(%rax,%rax,1)
L71:
  cmp    %edx,%ecx
  mov    %edx,%r10d
  cmovle %ecx,%r10d
  cmp    %r10d,%esi
  jl     L22
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  cmp    %ecx,%edx
  cmovl  %edx,%eax
  cmovl  %edx,%r8d
L15:
  add    $0x1,%edi
  cmp    %edi,%ebx
  je     L5
L72:
  lea    (%r9,%r9,2),%esi
  lea    (%r8,%r8,4),%edx
  cmp    %edx,%esi
  mov    %edx,%r10d
  lea    (%r11,%r11,1),%ecx
  cmovle %esi,%r10d
  cmp    %r10d,%ecx
  jge    L71
  add    $0x1,%edi
  mov    %ecx,%eax
  mov    %ecx,%r11d
  cmp    %edi,%ebx
  jne    L72
L5:
  pop    %rbx
  ret
  nopl   0x0(%rax,%rax,1)
L22:
  mov    %esi,%eax
  mov    %esi,%r9d
  jmp    L15
  nopw   0x0(%rax,%rax,1)
L16:
  ret
  nopl   0x0(%rax)
L41:
  ret
```

assistant: ```c
int nthUglyNumber(int n) {
  if (n <= 1)
    return n;
  int two = 1, three = 1, five = 1, nth = 1;
  for (int i = 2; i <= n; i++) {
    int two_next = two * 2;
    int three_next = three * 3;
    int five_next = five * 5;
    if (two_next < three_next && two_next < five_next) {
      nth = two = two_next;
    } else if (three_next < five_next && three_next < two_next) {
      nth = three = three_next;
    } else if (five_next < two_next && five_next < three_next) {
      nth = five = five_next;
    }
  }
  return nth;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<aeWait>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %rdx,-0x30(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x1c(%rbp)
  lea    -0x14(%rbp),%rax
  mov    $0xc,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x28(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L85
  mov    -0x10(%rbp),%edx
  mov    D25(%rip),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  mov    %eax,-0x10(%rbp)
L85:
  mov    -0x28(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L38
  mov    -0x10(%rbp),%edx
  mov    D51(%rip),%rax
  mov    (%rax),%eax
  or     %edx,%eax
  mov    %eax,-0x10(%rbp)
L38:
  mov    -0x30(%rbp),%rdx
  lea    -0x14(%rbp),%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <poll@plt>
  mov    %eax,-0x18(%rbp)
  cmpl   $0x1,-0x18(%rbp)
  jne    L30
  mov    -0xc(%rbp),%edx
  mov    D25(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  je     L24
  orl    $0x1,-0x1c(%rbp)
L24:
  mov    -0xc(%rbp),%edx
  mov    D51(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  je     L19
  orl    $0x2,-0x1c(%rbp)
L19:
  mov    -0xc(%rbp),%edx
  mov    D11(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  je     L7
  orl    $0x2,-0x1c(%rbp)
L7:
  mov    -0xc(%rbp),%edx
  mov    D47(%rip),%rax
  mov    (%rax),%eax
  and    %edx,%eax
  test   %eax,%eax
  je     L83
  orl    $0x2,-0x1c(%rbp)
L83:
  mov    -0x1c(%rbp),%eax
  jmp    L41
L30:
  mov    -0x18(%rbp),%eax
L41:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L86
  call   <__stack_chk_fail@plt>
L86:
  leave
  ret
```

assistant: ```c
int aeWait(int fd, int mask, long long milliseconds) {
  struct pollfd pfd;
  int retmask = 0, retval;
  memset(&pfd, 0, sizeof(pfd));
  pfd.fd = fd;
  if (mask & (1))
    pfd.events |= POLLIN;
  if (mask & (2))
    pfd.events |= POLLOUT;
  if ((retval = poll(&pfd, 1, milliseconds)) == 1) {
    if (pfd.revents & POLLIN)
      retmask |= (1);
    if (pfd.revents & POLLOUT)
      retmask |= (2);
    if (pfd.revents & POLLERR)
      retmask |= (2);
    if (pfd.revents & POLLHUP)
      retmask |= (2);
    return retmask;
  } else {
    return retval;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<aeWait>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %edi,%ebp
  mov    %esi,%ebx
  mov    %rdx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rdi
  mov    $0xc,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  mov    %ebp,0xc(%rsp)
  test   $0x1,%bl
  je     L38
  mov    D24(%rip),%rax
  mov    (%rax),%eax
  or     %eax,0x10(%rsp)
L38:
  test   $0x2,%bl
  je     L21
  mov    D51(%rip),%rax
  mov    (%rax),%eax
  or     %eax,0x10(%rsp)
L21:
  lea    0xc(%rsp),%rdi
  mov    %r12,%rdx
  mov    $0x1,%esi
  call   <poll@plt>
  cmp    $0x1,%eax
  je     L42
L32:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L43
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L42:
  mov    0x14(%rsp),%edx
  mov    D24(%rip),%rax
  mov    %edx,%ebx
  and    (%rax),%ebx
  setne  %al
  movzbl %al,%eax
  mov    D51(%rip),%rcx
  mov    %edx,%esi
  and    (%rcx),%esi
  mov    %eax,%ecx
  or     $0x2,%ecx
  test   %esi,%esi
  cmovne %ecx,%eax
  mov    D58(%rip),%rcx
  mov    %edx,%esi
  and    (%rcx),%esi
  mov    %eax,%ecx
  or     $0x2,%ecx
  test   %esi,%esi
  cmovne %ecx,%eax
  mov    D7(%rip),%rcx
  and    (%rcx),%edx
  mov    %eax,%ecx
  or     $0x2,%ecx
  test   %edx,%edx
  cmovne %ecx,%eax
  jmp    L32
L43:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int aeWait(int fd, int mask, long long milliseconds) {
  struct pollfd pfd;
  int retmask = 0, retval;
  memset(&pfd, 0, sizeof(pfd));
  pfd.fd = fd;
  if (mask & (1))
    pfd.events |= POLLIN;
  if (mask & (2))
    pfd.events |= POLLOUT;
  if ((retval = poll(&pfd, 1, milliseconds)) == 1) {
    if (pfd.revents & POLLIN)
      retmask |= (1);
    if (pfd.revents & POLLOUT)
      retmask |= (2);
    if (pfd.revents & POLLERR)
      retmask |= (2);
    if (pfd.revents & POLLHUP)
      retmask |= (2);
    return retmask;
  } else {
    return retval;
  }
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<aeWait>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdx,%r12
  mov    $0xc,%edx
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %esi,%ebx
  xor    %esi,%esi
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r13
  mov    %r13,%rdi
  call   <memset@plt>
  mov    %ebp,0xc(%rsp)
  test   $0x1,%bl
  je     L7
  mov    D44(%rip),%rax
  mov    (%rax),%eax
  or     %eax,0x10(%rsp)
L7:
  and    $0x2,%ebx
  je     L9
  mov    D25(%rip),%rax
  mov    (%rax),%eax
  or     %eax,0x10(%rsp)
L9:
  mov    %r12,%rdx
  mov    $0x1,%esi
  mov    %r13,%rdi
  call   <poll@plt>
  cmp    $0x1,%eax
  jne    L33
  mov    0x14(%rsp),%edx
  mov    D44(%rip),%rax
  mov    D25(%rip),%rcx
  mov    %edx,%ebx
  and    (%rax),%ebx
  setne  %al
  mov    (%rcx),%esi
  movzbl %al,%eax
  and    %edx,%esi
  mov    %eax,%ecx
  or     $0x2,%ecx
  test   %esi,%esi
  cmovne %ecx,%eax
  mov    D31(%rip),%rcx
  mov    (%rcx),%esi
  mov    %eax,%ecx
  or     $0x2,%ecx
  and    %edx,%esi
  test   %esi,%esi
  cmovne %ecx,%eax
  mov    D52(%rip),%rcx
  and    (%rcx),%edx
  mov    %eax,%ecx
  or     $0x2,%ecx
  test   %edx,%edx
  cmovne %ecx,%eax
L33:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L13
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L13:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int aeWait(int fd, int mask, long long milliseconds) {
  struct pollfd pfd;
  int retmask = 0, retval;
  memset(&pfd, 0, sizeof(pfd));
  pfd.fd = fd;
  if (mask & (1))
    pfd.events |= POLLIN;
  if (mask & (2))
    pfd.events |= POLLOUT;
  if ((retval = poll(&pfd, 1, milliseconds)) == 1) {
    if (pfd.revents & POLLIN)
      retmask |= (1);
    if (pfd.revents & POLLOUT)
      retmask |= (2);
    if (pfd.revents & POLLERR)
      retmask |= (2);
    if (pfd.revents & POLLHUP)
      retmask |= (2);
    return retmask;
  } else {
    return retval;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<aeWait>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdx,%r12
  mov    $0xc,%edx
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %esi,%ebx
  xor    %esi,%esi
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%r13
  mov    %r13,%rdi
  call   <memset@plt>
  mov    %ebp,0xc(%rsp)
  test   $0x1,%bl
  je     L37
  mov    D3(%rip),%rax
  mov    (%rax),%eax
  or     %eax,0x10(%rsp)
L37:
  and    $0x2,%ebx
  je     L39
  mov    D50(%rip),%rax
  mov    (%rax),%eax
  or     %eax,0x10(%rsp)
L39:
  mov    %r12,%rdx
  mov    $0x1,%esi
  mov    %r13,%rdi
  call   <poll@plt>
  cmp    $0x1,%eax
  jne    L32
  mov    0x14(%rsp),%edx
  mov    D3(%rip),%rax
  mov    D50(%rip),%rcx
  mov    %edx,%ebx
  and    (%rax),%ebx
  setne  %al
  mov    (%rcx),%esi
  movzbl %al,%eax
  and    %edx,%esi
  mov    %eax,%ecx
  or     $0x2,%ecx
  test   %esi,%esi
  cmovne %ecx,%eax
  mov    D57(%rip),%rcx
  mov    (%rcx),%esi
  mov    %eax,%ecx
  or     $0x2,%ecx
  and    %edx,%esi
  test   %esi,%esi
  cmovne %ecx,%eax
  mov    D43(%rip),%rcx
  and    (%rcx),%edx
  mov    %eax,%ecx
  or     $0x2,%ecx
  test   %edx,%edx
  cmovne %ecx,%eax
L32:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L22
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L22:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int aeWait(int fd, int mask, long long milliseconds) {
  struct pollfd pfd;
  int retmask = 0, retval;
  memset(&pfd, 0, sizeof(pfd));
  pfd.fd = fd;
  if (mask & (1))
    pfd.events |= POLLIN;
  if (mask & (2))
    pfd.events |= POLLOUT;
  if ((retval = poll(&pfd, 1, milliseconds)) == 1) {
    if (pfd.revents & POLLIN)
      retmask |= (1);
    if (pfd.revents & POLLOUT)
      retmask |= (2);
    if (pfd.revents & POLLERR)
      retmask |= (2);
    if (pfd.revents & POLLHUP)
      retmask |= (2);
    return retmask;
  } else {
    return retval;
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<floats_mat33_sym_solve>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,%r13
  mov    %edx,%r12d
  mov    %rcx,%rbp
  mov    %r8d,%r15d
  mov    %r9d,%r14d
  mov    0xa0(%rsp),%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  cmp    %edx,%esi
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  cmp    $0x3,%r12d
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  cmp    $0x3,%r15d
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  cmp    $0x1,%r14d
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  cmpl   $0x3,0xa8(%rsp)
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  cmpl   $0x1,0xb0(%rsp)
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rsp,%r12
  mov    $0x3,%r9d
  mov    $0x3,%r8d
  mov    %r12,%rcx
  mov    $0x3,%edx
  mov    $0x3,%esi
  mov    %r13,%rdi
  call   <floats_mat33_chol@plt>
  lea    0x30(%rsp),%rcx
  mov    $0x3,%r9d
  mov    $0x3,%r8d
  mov    $0x3,%edx
  mov    $0x3,%esi
  mov    %r12,%rdi
  call   <floats_mat33_lower_tri_inv@plt>
  movss  0x30(%rsp),%xmm9
  movss  0x0(%rbp),%xmm0
  movss  0x3c(%rsp),%xmm8
  movss  0x40(%rsp),%xmm1
  movss  0x4(%rbp),%xmm6
  movaps %xmm0,%xmm5
  mulss  %xmm8,%xmm5
  movaps %xmm1,%xmm2
  mulss  %xmm6,%xmm2
  addss  %xmm2,%xmm5
  cvtss2sd %xmm5,%xmm5
  movss  0x48(%rsp),%xmm7
  movss  0x4c(%rsp),%xmm3
  movss  0x50(%rsp),%xmm4
  movaps %xmm0,%xmm2
  mulss  %xmm7,%xmm2
  mulss  %xmm3,%xmm6
  addss  %xmm6,%xmm2
  movaps %xmm4,%xmm6
  mulss  0x8(%rbp),%xmm6
  addss  %xmm6,%xmm2
  pxor   %xmm6,%xmm6
  cvtss2sd %xmm2,%xmm6
  mulss  %xmm9,%xmm0
  cvtss2sd %xmm0,%xmm0
  cvtss2sd %xmm9,%xmm9
  mulsd  %xmm9,%xmm0
  cvtss2sd %xmm8,%xmm8
  mulsd  %xmm5,%xmm8
  addsd  %xmm8,%xmm0
  cvtss2sd %xmm7,%xmm7
  mulsd  %xmm6,%xmm7
  addsd  %xmm7,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rbx)
  cvtss2sd %xmm1,%xmm1
  mulsd  %xmm5,%xmm1
  cvtss2sd %xmm3,%xmm3
  mulsd  %xmm6,%xmm3
  addsd  %xmm3,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movss  %xmm1,0x4(%rbx)
  mulss  %xmm2,%xmm4
  movss  %xmm4,0x8(%rbx)
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L2:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void floats_mat33_sym_solve(const float *A, int Arows, int Acols, const float *B, int Brows, int Bcols, float *R, int Rrows, int Rcols) {
  assert(Arows == Acols);
  assert(Acols == 3);
  assert(Brows == 3);
  assert(Bcols == 1);
  assert(Rrows == 3);
  assert(Rcols == 1);
  float L[9];
  floats_mat33_chol(A, 3, 3, L, 3, 3);
  float M[9];
  floats_mat33_lower_tri_inv(L, 3, 3, M, 3, 3);
  double tmp[3];
  tmp[0] = M[0] * B[0];
  tmp[1] = M[3] * B[0] + M[4] * B[1];
  tmp[2] = M[6] * B[0] + M[7] * B[1] + M[8] * B[2];
  R[0] = (float)(M[0] * tmp[0] + M[3] * tmp[1] + M[6] * tmp[2]);
  R[1] = (float)(M[4] * tmp[1] + M[7] * tmp[2]);
  R[2] = (float)(M[8] * tmp[2]);
}
```