ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 下面的汇编指令对应的C源代码是什么：

```asm
<strcpy>:
  endbr64
  movzbl (%rsi),%edx
  mov    %rdi,%rax
  test   %dl,%dl
  je     L8
  xchg   %ax,%ax
L11:
  add    $0x1,%rsi
  mov    %dl,(%rax)
  add    $0x1,%rax
  movzbl (%rsi),%edx
  test   %dl,%dl
  jne    L11
L8:
  movb   $0x0,(%rax)
  ret
```

assistant: ```c
char *strcpy(char *dest, char *source) {
  while (1) {
    if (*source == '\0') {
      *dest = '\0';
      break;
    }
    *dest = *source;
    dest++;
    source++;
  }
  return dest;
}
```
user: Translate the below assembly code into C programming language:

```asm
<strcpy>:
  endbr64
  movzbl (%rsi),%edx
  mov    %rdi,%rax
  test   %dl,%dl
  je     L17
  xchg   %ax,%ax
L15:
  add    $0x1,%rsi
  mov    %dl,(%rax)
  add    $0x1,%rax
  movzbl (%rsi),%edx
  test   %dl,%dl
  jne    L15
L17:
  movb   $0x0,(%rax)
  ret
```

assistant: ```c
char *strcpy(char *dest, char *source) {
  while (1) {
    if (*source == '\0') {
      *dest = '\0';
      break;
    }
    *dest = *source;
    dest++;
    source++;
  }
  return dest;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<factorange>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  movq   $0x0,-0x8(%rbp)
  jmp    L37
L32:
  mov    -0x30(%rbp),%rax
  mov    $0x0,%edx
  divq   -0x20(%rbp)
  mov    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  add    %rax,-0x8(%rbp)
L37:
  cmpq   $0x0,-0x30(%rbp)
  jne    L32
  subq   $0x1,-0x28(%rbp)
  jmp    L26
L16:
  mov    -0x28(%rbp),%rax
  mov    $0x0,%edx
  divq   -0x20(%rbp)
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  sub    %rax,-0x8(%rbp)
L26:
  cmpq   $0x0,-0x28(%rbp)
  jne    L16
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x8(%rbp),%rdx
  add    %rdx,%rdx
  add    $0x1,%rdx
  imul   %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rcx
  movabs $0x268192ca7ede5f1,%rdx
  mov    %rcx,%rax
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x14,%rax
  imul   $0x6a5f64a,%rax,%rdx
  mov    %rcx,%rax
  sub    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  mov    %rax,(%rdx)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void factorange(unsigned long *d, unsigned long prime, unsigned long start, unsigned long stop) {
  unsigned long i = 0;
  for (; stop; i += stop /= prime)
    ;
  for (start -= 1; start; i -= start /= prime)
    ;
  *d *= i * 2 + 1;
  *d %= 111539786;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<factorange>:
  endbr64
  mov    %rdi,%r9
  mov    %rdx,%rdi
  test   %rcx,%rcx
  je     L35
  mov    $0x0,%r8d
L2:
  mov    %rcx,%r10
  mov    %rcx,%rax
  mov    $0x0,%edx
  div    %rsi
  mov    %rax,%rcx
  add    %rax,%r8
  cmp    %r10,%rsi
  jbe    L2
L41:
  sub    $0x1,%rdi
  je     L13
L12:
  mov    %rdi,%rcx
  mov    %rdi,%rax
  mov    $0x0,%edx
  div    %rsi
  mov    %rax,%rdi
  sub    %rax,%r8
  cmp    %rcx,%rsi
  jbe    L12
L13:
  lea    0x1(%r8,%r8,1),%rcx
  imul   (%r9),%rcx
  movabs $0x268192ca7ede5f1,%rdx
  mov    %rcx,%rax
  mul    %rdx
  shr    $0x14,%rdx
  imul   $0x6a5f64a,%rdx,%rdx
  sub    %rdx,%rcx
  mov    %rcx,(%r9)
  ret
L35:
  mov    %rcx,%r8
  jmp    L41
```

assistant: ```c
void factorange(unsigned long *d, unsigned long prime, unsigned long start, unsigned long stop) {
  unsigned long i = 0;
  for (; stop; i += stop /= prime)
    ;
  for (start -= 1; start; i -= start /= prime)
    ;
  *d *= i * 2 + 1;
  *d %= 111539786;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<factorange>:
  endbr64
  mov    %rcx,%rax
  mov    %rdi,%r9
  xor    %ecx,%ecx
  mov    %rdx,%rdi
  test   %rax,%rax
  je     L15
  nopl   0x0(%rax)
L14:
  xor    %edx,%edx
  mov    %rax,%r8
  div    %rsi
  add    %rax,%rcx
  cmp    %r8,%rsi
  jbe    L14
L15:
  mov    %rdi,%rax
  sub    $0x1,%rax
  je     L38
  nopl   0x0(%rax)
L8:
  xor    %edx,%edx
  mov    %rax,%rdi
  div    %rsi
  sub    %rax,%rcx
  cmp    %rdi,%rsi
  jbe    L8
L38:
  movabs $0x268192ca7ede5f1,%rdx
  lea    0x1(%rcx,%rcx,1),%rcx
  imul   (%r9),%rcx
  mov    %rcx,%rax
  mul    %rdx
  shr    $0x14,%rdx
  imul   $0x6a5f64a,%rdx,%rdx
  sub    %rdx,%rcx
  mov    %rcx,(%r9)
  ret
```

assistant: ```c
void factorange(unsigned long *d, unsigned long prime, unsigned long start, unsigned long stop) {
  unsigned long i = 0;
  for (; stop; i += stop /= prime)
    ;
  for (start -= 1; start; i -= start /= prime)
    ;
  *d *= i * 2 + 1;
  *d %= 111539786;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<factorange>:
  endbr64
  mov    %rcx,%rax
  mov    %rdi,%r9
  xor    %ecx,%ecx
  mov    %rdx,%rdi
  test   %rax,%rax
  je     L21
  nopl   0x0(%rax)
L0:
  xor    %edx,%edx
  mov    %rax,%r8
  div    %rsi
  add    %rax,%rcx
  cmp    %r8,%rsi
  jbe    L0
L21:
  mov    %rdi,%rax
  sub    $0x1,%rax
  je     L33
  nopl   0x0(%rax)
L2:
  xor    %edx,%edx
  mov    %rax,%rdi
  div    %rsi
  sub    %rax,%rcx
  cmp    %rdi,%rsi
  jbe    L2
L33:
  movabs $0x268192ca7ede5f1,%rdx
  lea    0x1(%rcx,%rcx,1),%rcx
  imul   (%r9),%rcx
  mov    %rcx,%rax
  mul    %rdx
  shr    $0x14,%rdx
  imul   $0x6a5f64a,%rdx,%rdx
  sub    %rdx,%rcx
  mov    %rcx,(%r9)
  ret
```

assistant: ```c
void factorange(unsigned long *d, unsigned long prime, unsigned long start, unsigned long stop) {
  unsigned long i = 0;
  for (; stop; i += stop /= prime)
    ;
  for (start -= 1; start; i -= start /= prime)
    ;
  *d *= i * 2 + 1;
  *d %= 111539786;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<mtxRotateY>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movss  %xmm0,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  movd   %eax,%xmm0
  call   <sinf@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x1c(%rbp),%eax
  movd   %eax,%xmm0
  call   <cosf@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  mov    $0x40,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x18(%rbp),%rax
  movss  -0x4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  movss  -0x8(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x14,%rax
  movss  D21(%rip),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x20,%rax
  movss  -0x8(%rbp),%xmm0
  movss  D13(%rip),%xmm1
  xorps  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x28,%rax
  movss  -0x4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x3c,%rax
  movss  D21(%rip),%xmm0
  movss  %xmm0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D21
type_infered: byte[4]
name: unpack_data
arguments: label: D13
type_infered: byte[4]

tool: {"D21": [0x00,0x00,0x80,0x3f]}

tool: {"D13": [0x00,0x00,0x00,0x80]}

assistant: ```c
void mtxRotateY(float *_result, float _ay) {
  float sy = sinf(_ay);
  float cy = cosf(_ay);
  memset(_result, 0, sizeof(float) * 16);
  _result[0] = cy;
  _result[2] = sy;
  _result[5] = 1.0f;
  _result[8] = -sy;
  _result[10] = cy;
  _result[15] = 1.0f;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<mtxRotateY>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbx
  lea    0xc(%rsp),%rdi
  lea    0x8(%rsp),%rsi
  call   <sincosf@plt>
  mov    0x8(%rsp),%r12d
  mov    0xc(%rsp),%ebp
  mov    $0x40,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    %r12d,(%rbx)
  mov    %ebp,0x8(%rbx)
  movss  D10(%rip),%xmm0
  movss  %xmm0,0x14(%rbx)
  movd   %ebp,%xmm1
  xorps  D13(%rip),%xmm1
  movss  %xmm1,0x20(%rbx)
  mov    %r12d,0x28(%rbx)
  movss  %xmm0,0x3c(%rbx)
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D10
type_infered: byte[4]
name: parse_data
arguments: data_tag: D13
type_infered: byte[16]

tool: {"D10": [0x00,0x00,0x80,0x3f]}

tool: {"D13": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void mtxRotateY(float *_result, float _ay) {
  float sy = sinf(_ay);
  float cy = cosf(_ay);
  memset(_result, 0, sizeof(float) * 16);
  _result[0] = cy;
  _result[2] = sy;
  _result[5] = 1.0f;
  _result[8] = -sy;
  _result[10] = cy;
  _result[15] = 1.0f;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<mtxRotateY>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  lea    0xc(%rsp),%rdi
  lea    0x8(%rsp),%rsi
  call   <sincosf@plt>
  movss  0x8(%rsp),%xmm2
  mov    %rbx,%rdi
  xor    %esi,%esi
  movss  0xc(%rsp),%xmm0
  mov    $0x40,%edx
  movss  %xmm2,0x4(%rsp)
  movss  %xmm0,(%rsp)
  call   <memset@plt>
  movss  (%rsp),%xmm0
  movss  0x4(%rsp),%xmm2
  movss  D18(%rip),%xmm1
  movss  %xmm0,0x8(%rbx)
  xorps  D9(%rip),%xmm0
  movss  %xmm2,(%rbx)
  movss  %xmm1,0x14(%rbx)
  movss  %xmm0,0x20(%rbx)
  movss  %xmm2,0x28(%rbx)
  movss  %xmm1,0x3c(%rbx)
  add    $0x10,%rsp
  pop    %rbx
  ret
```

tool_calls: name: parse_data
arguments: label: D18
type_guessed: byte[4]
name: parse_data
arguments: label: D9
type_guessed: byte[16]

tool: {"D18": [0x00,0x00,0x80,0x3f]}

tool: {"D9": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void mtxRotateY(float *_result, float _ay) {
  float sy = sinf(_ay);
  float cy = cosf(_ay);
  memset(_result, 0, sizeof(float) * 16);
  _result[0] = cy;
  _result[2] = sy;
  _result[5] = 1.0f;
  _result[8] = -sy;
  _result[10] = cy;
  _result[15] = 1.0f;
}
```
user: What is the c source code of the assembly code below:

```asm
<mtxRotateY>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  lea    0xc(%rsp),%rdi
  lea    0x8(%rsp),%rsi
  call   <sincosf@plt>
  movss  0x8(%rsp),%xmm2
  mov    %rbx,%rdi
  xor    %esi,%esi
  movss  0xc(%rsp),%xmm0
  mov    $0x40,%edx
  movss  %xmm2,0x4(%rsp)
  movss  %xmm0,(%rsp)
  call   <memset@plt>
  movss  (%rsp),%xmm0
  movss  0x4(%rsp),%xmm2
  movss  D16(%rip),%xmm1
  movss  %xmm0,0x8(%rbx)
  xorps  D19(%rip),%xmm0
  movss  %xmm2,(%rbx)
  movss  %xmm1,0x14(%rbx)
  movss  %xmm0,0x20(%rbx)
  movss  %xmm2,0x28(%rbx)
  movss  %xmm1,0x3c(%rbx)
  add    $0x10,%rsp
  pop    %rbx
  ret
```

tool_calls: name: read_data
arguments: data_tag: D16
type: byte[4]
name: read_data
arguments: data_tag: D19
type: byte[16]

tool: {"D16": [0x00,0x00,0x80,0x3f]}

tool: {"D19": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void mtxRotateY(float *_result, float _ay) {
  float sy = sinf(_ay);
  float cy = cosf(_ay);
  memset(_result, 0, sizeof(float) * 16);
  _result[0] = cy;
  _result[2] = sy;
  _result[5] = 1.0f;
  _result[8] = -sy;
  _result[10] = cy;
  _result[15] = 1.0f;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<getElapsedSecondsSince>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x10(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  mov    -0x10(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    0x4(%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x14(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x18(%rbp),%xmm1
  movsd  D9(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x14(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L9
  call   <__stack_chk_fail@plt>
L9:
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D9
datatype: byte[8]

tool: {"D9": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

assistant: ```c
double getElapsedSecondsSince(struct timeval *start) {
  struct timeval now;
  gettimeofday(&now, 0);
  int usec = now.tv_usec - start->tv_usec;
  int sec = now.tv_sec - start->tv_sec;
  return usec * 1e-6 + sec;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<getElapsedSecondsSince>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  mov    (%rsp),%eax
  sub    (%rbx),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  D4(%rip),%xmm0
  mov    0x4(%rsp),%eax
  sub    0x4(%rbx),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  addsd  %xmm1,%xmm0
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x10,%rsp
  pop    %rbx
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D4
type_infered: byte[8]

tool: {"D4": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

assistant: ```c
double getElapsedSecondsSince(struct timeval *start) {
  struct timeval now;
  gettimeofday(&now, 0);
  int usec = now.tv_usec - start->tv_usec;
  int sec = now.tv_sec - start->tv_sec;
  return usec * 1e-6 + sec;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<getElapsedSecondsSince>:
  endbr64
  push   %rbx
  xor    %esi,%esi
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <gettimeofday@plt>
  mov    (%rsp),%eax
  pxor   %xmm0,%xmm0
  sub    (%rbx),%eax
  cvtsi2sd %eax,%xmm0
  pxor   %xmm1,%xmm1
  mov    0x4(%rsp),%eax
  sub    0x4(%rbx),%eax
  mulsd  D7(%rip),%xmm0
  cvtsi2sd %eax,%xmm1
  addsd  %xmm1,%xmm0
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x10,%rsp
  pop    %rbx
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D7
datatype: byte[8]

tool: {"D7": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

assistant: ```c
double getElapsedSecondsSince(struct timeval *start) {
  struct timeval now;
  gettimeofday(&now, 0);
  int usec = now.tv_usec - start->tv_usec;
  int sec = now.tv_sec - start->tv_sec;
  return usec * 1e-6 + sec;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<getElapsedSecondsSince>:
  endbr64
  push   %rbx
  xor    %esi,%esi
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <gettimeofday@plt>
  mov    (%rsp),%eax
  pxor   %xmm0,%xmm0
  sub    (%rbx),%eax
  cvtsi2sd %eax,%xmm0
  pxor   %xmm1,%xmm1
  mov    0x4(%rsp),%eax
  sub    0x4(%rbx),%eax
  mulsd  D0(%rip),%xmm0
  cvtsi2sd %eax,%xmm1
  addsd  %xmm1,%xmm0
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x10,%rsp
  pop    %rbx
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D0
type_infered: byte[8]

tool: {"D0": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

assistant: ```c
double getElapsedSecondsSince(struct timeval *start) {
  struct timeval now;
  gettimeofday(&now, 0);
  int usec = now.tv_usec - start->tv_usec;
  int sec = now.tv_sec - start->tv_sec;
  return usec * 1e-6 + sec;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<game>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%r14d
  mov    %esi,%ebx
  mov    %edx,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %edi,%rdx
  lea    0x0(,%rdx,4),%r10
  movslq %esi,%rax
  imul   %rdx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L47:
  cmp    %rdx,%rsp
  je     L118
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L47
L118:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L58
  orq    $0x0,-0x8(%rsp,%rax,1)
L58:
  mov    %rsp,%r12
  test   %r14d,%r14d
  jle    L72
  shr    $0x2,%r10
  mov    $0x0,%r15d
  mov    $0x0,%r11d
  mov    $0x0,%edi
  jmp    L74
L111:
  mov    %r8d,%eax
  cltd
  idiv   %esi
  add    %edx,%edi
  movslq %ecx,%rax
  imul   %r10,%rax
  add    %r9,%rax
  mov    %edi,%edx
  and    $0x1,%edx
  mov    %edx,(%r12,%rax,4)
  add    $0x1,%ecx
  add    $0x3,%esi
  cmp    %ecx,%ebx
  jne    L111
L55:
  add    $0x1,%r11d
  add    $0x11,%r15d
  cmp    %r11d,%r14d
  je     L72
L74:
  mov    %r15d,%r8d
  mov    $0x1,%esi
  mov    $0x0,%ecx
  movslq %r11d,%r9
  test   %ebx,%ebx
  jg     L111
  jmp    L55
L72:
  test   %r13d,%r13d
  jne    L45
L128:
  mov    %ebx,%edx
  mov    %r14d,%esi
  mov    %r12,%rdi
  call   <show@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L48
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L42:
  mov    $0x4e20,%edi
  call   <usleep@plt>
  mov    %ebx,%edx
  mov    %r14d,%esi
  mov    %r12,%rdi
  call   <show@plt>
L19:
  test   %r13d,%r13d
  je     L128
L45:
  mov    %ebx,%edx
  mov    %r14d,%esi
  mov    %r12,%rdi
  call   <evolve@plt>
  test   %r13d,%r13d
  jle    L42
  sub    $0x1,%r13d
  mov    %ebx,%edx
  mov    %r14d,%esi
  mov    %r12,%rdi
  call   <nudge@plt>
  jmp    L19
L48:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void game(int w, int h, int i) {
  unsigned univ[h][w];
  int acc = 0;
  for (int x = 0; x < w; x++)
    for (int y = 0; y < h; y++) {
      acc += (x * 17) % (y * 3 + 1);
      univ[y][x] = acc & 1;
    }
  while (i != 0) {
    evolve(univ, w, h);
    if (i > 0) {
      i--;
      nudge(univ, w, h);
    } else {
      usleep(20000);
      show(univ, w, h);
    }
  }
  show(univ, w, h);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<game>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  mov    %edi,%r14d
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbx
  mov    %edx,%ebx
  movslq %edi,%rdx
  lea    0x0(,%rdx,4),%r10
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  movslq %esi,%rax
  mov    %rsp,%rcx
  imul   %rdx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L125
L73:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L73
L125:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L13
L109:
  mov    %rsp,%r13
  test   %r14d,%r14d
  jle    L29
  shr    $0x2,%r10
  xor    %r8d,%r8d
  xor    %r11d,%r11d
  xor    %edi,%edi
  nopw   0x0(%rax,%rax,1)
L14:
  mov    $0x1,%esi
  xor    %ecx,%ecx
  movslq %r11d,%r9
  test   %r12d,%r12d
  jle    L16
  nop
L19:
  mov    %r8d,%eax
  cltd
  idiv   %esi
  movslq %ecx,%rax
  add    $0x1,%ecx
  add    $0x3,%esi
  imul   %r10,%rax
  add    %r9,%rax
  add    %edx,%edi
  mov    %edi,%edx
  and    $0x1,%edx
  mov    %edx,0x0(%r13,%rax,4)
  cmp    %ecx,%r12d
  jne    L19
L16:
  add    $0x1,%r11d
  add    $0x11,%r8d
  cmp    %r11d,%r14d
  jne    L14
L29:
  test   %ebx,%ebx
  je     L61
  nopl   0x0(%rax,%rax,1)
L1:
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <evolve@plt>
  test   %ebx,%ebx
  jle    L4
  sub    $0x1,%ebx
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <nudge@plt>
  test   %ebx,%ebx
  jne    L1
L61:
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <show@plt>
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L108
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
  nopl   0x0(%rax)
L4:
  mov    $0x4e20,%edi
  call   <usleep@plt>
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <show@plt>
  jmp    L1
L13:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L109
L108:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void game(int w, int h, int i) {
  unsigned univ[h][w];
  int acc = 0;
  for (int x = 0; x < w; x++)
    for (int y = 0; y < h; y++) {
      acc += (x * 17) % (y * 3 + 1);
      univ[y][x] = acc & 1;
    }
  while (i != 0) {
    evolve(univ, w, h);
    if (i > 0) {
      i--;
      nudge(univ, w, h);
    } else {
      usleep(20000);
      show(univ, w, h);
    }
  }
  show(univ, w, h);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<game>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  mov    %edi,%r14d
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbx
  mov    %edx,%ebx
  movslq %edi,%rdx
  lea    0x0(,%rdx,4),%r10
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  movslq %esi,%rax
  mov    %rsp,%rcx
  imul   %rdx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L25
L118:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L118
L25:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L106
L114:
  mov    %rsp,%r13
  test   %r14d,%r14d
  jle    L123
  shr    $0x2,%r10
  xor    %r8d,%r8d
  xor    %r11d,%r11d
  xor    %edi,%edi
  test   %r12d,%r12d
  jle    L123
  nopl   0x0(%rax)
L97:
  mov    $0x1,%esi
  xor    %ecx,%ecx
  movslq %r11d,%r9
  nopw   0x0(%rax,%rax,1)
L13:
  mov    %r8d,%eax
  cltd
  idiv   %esi
  movslq %ecx,%rax
  add    $0x1,%ecx
  add    $0x3,%esi
  imul   %r10,%rax
  add    %r9,%rax
  add    %edx,%edi
  mov    %edi,%edx
  and    $0x1,%edx
  mov    %edx,0x0(%r13,%rax,4)
  cmp    %ecx,%r12d
  jne    L13
  add    $0x1,%r11d
  add    $0x11,%r8d
  cmp    %r11d,%r14d
  jne    L97
L123:
  test   %ebx,%ebx
  je     L112
  nopl   0x0(%rax,%rax,1)
L60:
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <evolve@plt>
  test   %ebx,%ebx
  jle    L48
  sub    $0x1,%ebx
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <nudge@plt>
  test   %ebx,%ebx
  jne    L60
L112:
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <show@plt>
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L108
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
  nopl   0x0(%rax)
L48:
  mov    $0x4e20,%edi
  call   <usleep@plt>
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <show@plt>
  mov    %r12d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <evolve@plt>
  jmp    L48
L106:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L114
L108:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void game(int w, int h, int i) {
  unsigned univ[h][w];
  int acc = 0;
  for (int x = 0; x < w; x++)
    for (int y = 0; y < h; y++) {
      acc += (x * 17) % (y * 3 + 1);
      univ[y][x] = acc & 1;
    }
  while (i != 0) {
    evolve(univ, w, h);
    if (i > 0) {
      i--;
      nudge(univ, w, h);
    } else {
      usleep(20000);
      show(univ, w, h);
    }
  }
  show(univ, w, h);
}
```