ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Translate the below assembly code into C programming language:

```asm
<ifwin>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  cmpl   $0x800,(%rdi)
  je     L179
  cmpl   $0x800,0x4(%rdi)
  je     L179
  cmpl   $0x800,0x8(%rdi)
  je     L179
  cmpl   $0x800,0xc(%rdi)
  je     L179
  cmpl   $0x800,0x10(%rdi)
  je     L179
  cmpl   $0x800,0x14(%rdi)
  je     L179
  cmpl   $0x800,0x18(%rdi)
  je     L179
  cmpl   $0x800,0x1c(%rdi)
  je     L179
  cmpl   $0x800,0x20(%rdi)
  je     L179
  cmpl   $0x800,0x24(%rdi)
  je     L179
  cmpl   $0x800,0x28(%rdi)
  je     L179
  cmpl   $0x800,0x2c(%rdi)
  je     L179
  cmpl   $0x800,0x30(%rdi)
  je     L179
  cmpl   $0x800,0x34(%rdi)
  je     L179
  cmpl   $0x800,0x38(%rdi)
  je     L179
  cmpl   $0x800,0x3c(%rdi)
  je     L179
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L118
  add    $0x10,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L179:
  lea    D15(%rip),%rdi
  lea    0x7(%rsp),%r12
  call   <puts@plt>
  lea    D17(%rip),%rbp
  lea    D16(%rip),%rbx
  nopl   0x0(%rax)
L123:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <scanf@plt>
L121:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L121
  mov    %rbx,%rdi
  call   <puts@plt>
  jmp    L123
L118:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D15
type: string
name: extract_symbolic_data
arguments: data_tag: D17
type: string
name: extract_symbolic_data
arguments: data_tag: D16
type: string

tool: D15: You Got 2048,Do you want to continue?

tool: D17: %c

tool: D16: Please input y or n.

assistant: ```c
int ifwin(int *f) {
  char a;
  for (int i = 0; i < 16; i++) {
    if (*(f + i) == 2048) {
      puts("You Got 2048,Do you want to continue?");
      while (1) {
        scanf("%c", &a);
        while (getchar() != '\n')
          continue;
        if (a != 'y' || a != 'n')
          puts("Please input y or n.");
        else
          break;
      }
      return (a = 'y') ? 0 : 1;
    }
  }
  return -1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<sum_boxes>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x290,%rsp
  mov    %rdi,-0x288(%rbp)
  mov    %rsi,-0x290(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x1a0(%rbp),%rax
  mov    %rax,%rdi
  call   <clean_array@plt>
  lea    -0xd0(%rbp),%rax
  mov    %rax,%rdi
  call   <clean_array@plt>
  movl   $0x0,-0x278(%rbp)
  jmp    L16
L1:
  lea    -0x270(%rbp),%rax
  mov    %rax,%rdi
  call   <clean_array@plt>
  mov    -0x278(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x288(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    -0xd0(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <convert_long@plt>
  mov    %eax,-0x274(%rbp)
  lea    -0xd0(%rbp),%rax
  lea    D10(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <print_array@plt>
  mov    -0x278(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  lea    (%rax,%rdx,1),%edi
  mov    -0x274(%rbp),%edx
  lea    -0xd0(%rbp),%rsi
  lea    -0x270(%rbp),%rax
  mov    %edx,%ecx
  mov    %edi,%edx
  mov    %rax,%rdi
  call   <copyto_array@plt>
  lea    -0x270(%rbp),%rax
  lea    D36(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <print_array@plt>
  lea    -0x270(%rbp),%rdx
  lea    -0x1a0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sum_arrays@plt>
  lea    -0x1a0(%rbp),%rax
  lea    D27(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <print_array@plt>
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  addl   $0x1,-0x278(%rbp)
L16:
  cmpl   $0x4,-0x278(%rbp)
  jle    L1
  lea    -0x1a0(%rbp),%rax
  lea    D8(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <print_array@plt>
  lea    -0x1a0(%rbp),%rcx
  mov    -0x290(%rbp),%rax
  mov    $0x32,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D10
type: string
name: parse_data
arguments: data_tag: D36
type: string
name: parse_data
arguments: data_tag: D27
type: string
name: parse_data
arguments: data_tag: D47
type: string
name: parse_data
arguments: data_tag: D8
type: string

tool: D10: converted

tool: D36: aux

tool: D27: acumulados en ciclo

tool: D47: ---------------------------------


tool: D8: acumulados totales

assistant: ```c
int sum_boxes(long *p, int *resultados) {
  int aux[50];
  int cumulated[50];
  int converted[50];
  int i, converted_size;
  clean_array(cumulated);
  clean_array(converted);
  for (i = 0; i < 5; i++) {
    clean_array(aux);
    converted_size = convert_long(p[i], converted);
    print_array(converted, "converted");
    copyto_array(aux, converted, i * 3, converted_size);
    print_array(aux, "aux");
    sum_arrays(cumulated, aux);
    print_array(cumulated, "acumulados en ciclo");
    printf("---------------------------------\n");
  }
  print_array(cumulated, "acumulados totales");
  memcpy(resultados, cumulated, 50);
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<sum_boxes>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x288,%rsp
  mov    %rdi,%r14
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x278(%rsp)
  xor    %eax,%eax
  lea    0xe0(%rsp),%rdi
  call   <clean_array@plt>
  lea    0x1b0(%rsp),%rdi
  call   <clean_array@plt>
  mov    $0x0,%ebp
  lea    D45(%rip),%r15
L7:
  lea    0x10(%rsp),%rbx
  mov    %rbx,%rdi
  call   <clean_array@plt>
  lea    0x1b0(%rsp),%r12
  mov    %r12,%rsi
  mov    (%r14),%rdi
  call   <convert_long@plt>
  mov    %eax,%r13d
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <print_array@plt>
  mov    %r13d,%ecx
  mov    %ebp,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <copyto_array@plt>
  lea    D1(%rip),%rsi
  mov    %rbx,%rdi
  call   <print_array@plt>
  lea    0xe0(%rsp),%r12
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <sum_arrays@plt>
  lea    D19(%rip),%rsi
  mov    %r12,%rdi
  call   <print_array@plt>
  lea    D12(%rip),%rdi
  call   <printf@plt>
  add    $0x8,%r14
  add    $0x3,%ebp
  cmp    $0xf,%ebp
  jne    L7
  lea    D8(%rip),%rsi
  mov    %r12,%rdi
  call   <print_array@plt>
  mov    $0x32,%edx
  mov    %r12,%rsi
  mov    0x8(%rsp),%rdi
  call   <memcpy@plt>
  mov    0x278(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  mov    $0x0,%eax
  add    $0x288,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D45
datatype: string
name: parse_data
arguments: data_tag: D1
datatype: string
name: parse_data
arguments: data_tag: D19
datatype: string
name: parse_data
arguments: data_tag: D12
datatype: string
name: parse_data
arguments: data_tag: D8
datatype: string

tool: D45: converted

tool: D1: aux

tool: D19: acumulados en ciclo

tool: D12: ---------------------------------


tool: D8: acumulados totales

assistant: ```c
int sum_boxes(long *p, int *resultados) {
  int aux[50];
  int cumulated[50];
  int converted[50];
  int i, converted_size;
  clean_array(cumulated);
  clean_array(converted);
  for (i = 0; i < 5; i++) {
    clean_array(aux);
    converted_size = convert_long(p[i], converted);
    print_array(converted, "converted");
    copyto_array(aux, converted, i * 3, converted_size);
    print_array(aux, "aux");
    sum_arrays(cumulated, aux);
    print_array(cumulated, "acumulados en ciclo");
    printf("---------------------------------\n");
  }
  print_array(cumulated, "acumulados totales");
  memcpy(resultados, cumulated, 50);
  return 0;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<sum_boxes>:
  endbr64
  push   %r15
  lea    D35(%rip),%r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x288,%rsp
  mov    %rsi,0x8(%rsp)
  lea    0xe0(%rsp),%r13
  lea    0x10(%rsp),%rbx
  mov    %r13,%rdi
  lea    0x1b0(%rsp),%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x278(%rsp)
  xor    %eax,%eax
  call   <clean_array@plt>
  mov    %r12,%rdi
  call   <clean_array@plt>
L3:
  mov    %rbx,%rdi
  add    $0x8,%rbp
  call   <clean_array@plt>
  mov    -0x8(%rbp),%rdi
  mov    %r12,%rsi
  call   <convert_long@plt>
  mov    %r15,%rsi
  mov    %r12,%rdi
  mov    %eax,0x4(%rsp)
  call   <print_array@plt>
  mov    0x4(%rsp),%ecx
  mov    %r14d,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  add    $0x3,%r14d
  call   <copyto_array@plt>
  lea    D21(%rip),%rsi
  mov    %rbx,%rdi
  call   <print_array@plt>
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <sum_arrays@plt>
  lea    D8(%rip),%rsi
  mov    %r13,%rdi
  call   <print_array@plt>
  lea    D2(%rip),%rdi
  call   <printf@plt>
  cmp    $0xf,%r14d
  jne    L3
  lea    D9(%rip),%rsi
  mov    %r13,%rdi
  call   <print_array@plt>
  mov    0x8(%rsp),%rdi
  mov    $0x32,%edx
  mov    %r13,%rsi
  call   <memcpy@plt>
  mov    0x278(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  add    $0x288,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L18:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D35
type_infered: string
name: parse_data
arguments: tag: D21
type_infered: string
name: parse_data
arguments: tag: D8
type_infered: string
name: parse_data
arguments: tag: D2
type_infered: string
name: parse_data
arguments: tag: D9
type_infered: string

tool: D35: converted

tool: D21: aux

tool: D8: acumulados en ciclo

tool: D2: ---------------------------------


tool: D9: acumulados totales

assistant: ```c
int sum_boxes(long *p, int *resultados) {
  int aux[50];
  int cumulated[50];
  int converted[50];
  int i, converted_size;
  clean_array(cumulated);
  clean_array(converted);
  for (i = 0; i < 5; i++) {
    clean_array(aux);
    converted_size = convert_long(p[i], converted);
    print_array(converted, "converted");
    copyto_array(aux, converted, i * 3, converted_size);
    print_array(aux, "aux");
    sum_arrays(cumulated, aux);
    print_array(cumulated, "acumulados en ciclo");
    printf("---------------------------------\n");
  }
  print_array(cumulated, "acumulados totales");
  memcpy(resultados, cumulated, 50);
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<sum_boxes>:
  endbr64
  push   %r15
  lea    D11(%rip),%r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x288,%rsp
  mov    %rsi,0x8(%rsp)
  lea    0xe0(%rsp),%r13
  lea    0x10(%rsp),%rbx
  mov    %r13,%rdi
  lea    0x1b0(%rsp),%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x278(%rsp)
  xor    %eax,%eax
  call   <clean_array@plt>
  mov    %r12,%rdi
  call   <clean_array@plt>
L6:
  mov    %rbx,%rdi
  add    $0x8,%rbp
  call   <clean_array@plt>
  mov    -0x8(%rbp),%rdi
  mov    %r12,%rsi
  call   <convert_long@plt>
  mov    %r15,%rsi
  mov    %r12,%rdi
  mov    %eax,0x4(%rsp)
  call   <print_array@plt>
  mov    0x4(%rsp),%ecx
  mov    %r14d,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  add    $0x3,%r14d
  call   <copyto_array@plt>
  lea    D37(%rip),%rsi
  mov    %rbx,%rdi
  call   <print_array@plt>
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <sum_arrays@plt>
  lea    D8(%rip),%rsi
  mov    %r13,%rdi
  call   <print_array@plt>
  lea    D43(%rip),%rdi
  call   <printf@plt>
  cmp    $0xf,%r14d
  jne    L6
  lea    D42(%rip),%rsi
  mov    %r13,%rdi
  call   <print_array@plt>
  mov    0x8(%rsp),%rdi
  mov    $0x32,%edx
  mov    %r13,%rsi
  call   <memcpy@plt>
  mov    0x278(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L10
  add    $0x288,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L10:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D11
data_type: string
name: read_data
arguments: data_label: D37
data_type: string
name: read_data
arguments: data_label: D8
data_type: string
name: read_data
arguments: data_label: D43
data_type: string
name: read_data
arguments: data_label: D42
data_type: string

tool: D11: converted

tool: D37: aux

tool: D8: acumulados en ciclo

tool: D43: ---------------------------------


tool: D42: acumulados totales

assistant: ```c
int sum_boxes(long *p, int *resultados) {
  int aux[50];
  int cumulated[50];
  int converted[50];
  int i, converted_size;
  clean_array(cumulated);
  clean_array(converted);
  for (i = 0; i < 5; i++) {
    clean_array(aux);
    converted_size = convert_long(p[i], converted);
    print_array(converted, "converted");
    copyto_array(aux, converted, i * 3, converted_size);
    print_array(aux, "aux");
    sum_arrays(cumulated, aux);
    print_array(cumulated, "acumulados en ciclo");
    printf("---------------------------------\n");
  }
  print_array(cumulated, "acumulados totales");
  memcpy(resultados, cumulated, 50);
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<__year_to_secs>:
  endbr64
  sub    $0x18,%rsp
  mov    %rsi,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    -0x2(%rdi),%rax
  cmp    $0x88,%rax
  jbe    L19
  lea    0x4(%rsp),%rax
  test   %rsi,%rsi
  cmove  %rax,%rcx
  sub    $0x64,%rdi
  movabs $0xa3d70a3d70a3d70b,%rdx
  mov    %rdi,%rax
  imul   %rdx
  add    %rdi,%rdx
  sar    $0x8,%rdx
  mov    %rdi,%rax
  sar    $0x3f,%rax
  sub    %rax,%rdx
  mov    %edx,%esi
  lea    (%rdx,%rdx,4),%rax
  lea    (%rax,%rax,4),%r8
  shl    $0x4,%r8
  mov    %rdi,%rax
  sub    %r8,%rax
  mov    %eax,%r8d
  test   %eax,%eax
  js     L84
  mov    %eax,%edx
  mov    $0x1,%r9d
  jne    L29
L169:
  mov    %r9d,(%rcx)
  imul   $0x61,%esi,%esi
  lea    (%r8,%r8,2),%eax
  lea    (%rsi,%rax,8),%eax
  sub    %r9d,%eax
  add    %edx,%eax
  cltq
  imul   $0x15180,%rax,%rax
  imul   $0x1e13380,%rdi,%rdi
  lea    0x386e9500(%rax,%rdi,1),%rax
L36:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L92
  add    $0x18,%rsp
  ret
L19:
  lea    -0x44(%rdi),%edx
  sar    $0x2,%edx
  test   $0x3,%dil
  jne    L94
  sub    $0x1,%edx
  test   %rsi,%rsi
  je     L44
  movl   $0x1,(%rsi)
L44:
  lea    -0x46(%rdi),%eax
  imul   $0x1e13380,%eax,%eax
  imul   $0x15180,%edx,%edx
  add    %edx,%eax
  cltq
  jmp    L36
L94:
  test   %rsi,%rsi
  je     L44
  movl   $0x0,(%rsi)
  jmp    L44
L84:
  lea    -0x1(%rdx),%esi
  lea    0x190(%rax),%edx
L29:
  cmp    $0xc7,%edx
  jle    L93
  cmp    $0x12b,%edx
  jle    L104
  sub    $0x12c,%edx
  mov    $0x3,%r8d
L52:
  mov    %edx,%r9d
  test   %edx,%edx
  je     L169
L47:
  test   $0x3,%dl
  sete   %r9b
  movzbl %r9b,%r9d
  shr    $0x2,%edx
  jmp    L169
L104:
  sub    $0xc8,%edx
  mov    $0x2,%r8d
  jmp    L52
L93:
  cmp    $0x63,%edx
  jle    L15
  sub    $0x64,%edx
  mov    $0x1,%r8d
  jmp    L52
L15:
  mov    $0x0,%r8d
  jmp    L47
L92:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
long long __year_to_secs(long long year, int *is_leap) {
  if (year - 2ULL <= 136) {
    int y = year;
    int leaps = (y - 68) >> 2;
    if (!((y - 68) & 3)) {
      leaps--;
      if (is_leap)
        *is_leap = 1;
    } else if (is_leap)
      *is_leap = 0;
    return 31536000 * (y - 70) + 86400 * leaps;
  }
  int cycles, centuries, leaps, rem;
  if (!is_leap)
    is_leap = &(int){0};
  cycles = (year - 100) / 400;
  rem = (year - 100) % 400;
  if (rem < 0) {
    cycles--;
    rem += 400;
  }
  if (!rem) {
    *is_leap = 1;
    centuries = 0;
    leaps = 0;
  } else {
    if (rem >= 200) {
      if (rem >= 300)
        centuries = 3, rem -= 300;
      else
        centuries = 2, rem -= 200;
    } else {
      if (rem >= 100)
        centuries = 1, rem -= 100;
      else
        centuries = 0;
    }
    if (!rem) {
      *is_leap = 0;
      leaps = 0;
    } else {
      leaps = rem / 4U;
      rem %= 4U;
      *is_leap = !rem;
    }
  }
  leaps += 97 * cycles + 24 * centuries - *is_leap;
  return (year - 100) * 31536000LL + leaps * 86400LL + 946684800 + 86400;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<__year_to_secs>:
  endbr64
  sub    $0x18,%rsp
  mov    %rsi,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    -0x2(%rdi),%rax
  cmp    $0x88,%rax
  jbe    L123
  test   %rsi,%rsi
  lea    0x4(%rsp),%rax
  movabs $0xa3d70a3d70a3d70b,%rdx
  cmove  %rax,%rcx
  sub    $0x64,%rdi
  mov    %rdi,%rax
  mov    %rdi,%r8
  imul   %rdx
  mov    %rdi,%rax
  sar    $0x3f,%rax
  add    %rdi,%rdx
  sar    $0x8,%rdx
  sub    %rax,%rdx
  lea    (%rdx,%rdx,4),%rsi
  mov    %edx,%eax
  lea    (%rsi,%rsi,4),%rsi
  shl    $0x4,%rsi
  sub    %rsi,%r8
  mov    %r8d,%esi
  js     L72
  jne    L18
  mov    $0x1,%edx
  xor    %r8d,%r8d
  xor    %esi,%esi
L95:
  imul   $0x61,%eax,%eax
  mov    %edx,(%rcx)
  imul   $0x1e13380,%rdi,%rdi
  add    %r8d,%eax
  sub    %edx,%eax
  add    %esi,%eax
  cltq
  imul   $0x15180,%rax,%rax
  lea    0x386e9500(%rax,%rdi,1),%rax
L80:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L115
  add    $0x18,%rsp
  ret
  xchg   %ax,%ax
L72:
  lea    -0x1(%rdx),%eax
  lea    0x190(%r8),%esi
L18:
  cmp    $0xc7,%esi
  jg     L1
  cmp    $0x63,%esi
  jle    L142
  sub    $0x64,%esi
  mov    $0x18,%r8d
L43:
  xor    %edx,%edx
  test   %esi,%esi
  je     L95
L145:
  xor    %edx,%edx
  test   $0x3,%sil
  sete   %dl
  shr    $0x2,%esi
  jmp    L95
  nopl   0x0(%rax,%rax,1)
L123:
  lea    -0x44(%rdi),%edx
  sar    $0x2,%edx
  test   $0x3,%dil
  je     L136
  test   %rsi,%rsi
  je     L134
  movl   $0x0,(%rsi)
L134:
  imul   $0x15180,%edx,%edx
  lea    -0x46(%rdi),%eax
  imul   $0x1e13380,%eax,%eax
  add    %edx,%eax
  cltq
  jmp    L80
  nop
L136:
  sub    $0x1,%edx
  test   %rsi,%rsi
  je     L134
  movl   $0x1,(%rsi)
  jmp    L134
L1:
  cmp    $0x12b,%esi
  jle    L93
  sub    $0x12c,%esi
  mov    $0x48,%r8d
  jmp    L43
  cs nopw 0x0(%rax,%rax,1)
L142:
  xor    %r8d,%r8d
  jmp    L145
  nopl   (%rax)
L93:
  sub    $0xc8,%esi
  mov    $0x30,%r8d
  jmp    L43
L115:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
long long __year_to_secs(long long year, int *is_leap) {
  if (year - 2ULL <= 136) {
    int y = year;
    int leaps = (y - 68) >> 2;
    if (!((y - 68) & 3)) {
      leaps--;
      if (is_leap)
        *is_leap = 1;
    } else if (is_leap)
      *is_leap = 0;
    return 31536000 * (y - 70) + 86400 * leaps;
  }
  int cycles, centuries, leaps, rem;
  if (!is_leap)
    is_leap = &(int){0};
  cycles = (year - 100) / 400;
  rem = (year - 100) % 400;
  if (rem < 0) {
    cycles--;
    rem += 400;
  }
  if (!rem) {
    *is_leap = 1;
    centuries = 0;
    leaps = 0;
  } else {
    if (rem >= 200) {
      if (rem >= 300)
        centuries = 3, rem -= 300;
      else
        centuries = 2, rem -= 200;
    } else {
      if (rem >= 100)
        centuries = 1, rem -= 100;
      else
        centuries = 0;
    }
    if (!rem) {
      *is_leap = 0;
      leaps = 0;
    } else {
      leaps = rem / 4U;
      rem %= 4U;
      *is_leap = !rem;
    }
  }
  leaps += 97 * cycles + 24 * centuries - *is_leap;
  return (year - 100) * 31536000LL + leaps * 86400LL + 946684800 + 86400;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<__year_to_secs>:
  endbr64
  sub    $0x18,%rsp
  mov    %rsi,%rcx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    -0x2(%rdi),%rax
  cmp    $0x88,%rax
  jbe    L12
  test   %rsi,%rsi
  lea    0x4(%rsp),%rax
  movabs $0xa3d70a3d70a3d70b,%rdx
  cmove  %rax,%rcx
  sub    $0x64,%rdi
  mov    %rdi,%rax
  mov    %rdi,%r8
  imul   %rdx
  mov    %rdi,%rax
  sar    $0x3f,%rax
  add    %rdi,%rdx
  sar    $0x8,%rdx
  sub    %rax,%rdx
  lea    (%rdx,%rdx,4),%rsi
  mov    %edx,%eax
  lea    (%rsi,%rsi,4),%rsi
  shl    $0x4,%rsi
  sub    %rsi,%r8
  mov    %r8d,%esi
  js     L72
  jne    L107
  mov    $0x1,%edx
  xor    %r8d,%r8d
  xor    %esi,%esi
L137:
  imul   $0x61,%eax,%eax
  mov    %edx,(%rcx)
  imul   $0x1e13380,%rdi,%rdi
  add    %r8d,%eax
  sub    %edx,%eax
  add    %esi,%eax
  cltq
  imul   $0x15180,%rax,%rax
  lea    0x386e9500(%rax,%rdi,1),%rax
L68:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L121
  add    $0x18,%rsp
  ret
  xchg   %ax,%ax
L72:
  lea    -0x1(%rdx),%eax
  lea    0x190(%r8),%esi
L107:
  cmp    $0xc7,%esi
  jg     L93
  cmp    $0x63,%esi
  jle    L14
  sub    $0x64,%esi
  mov    $0x18,%r8d
L86:
  xor    %edx,%edx
  test   %esi,%esi
  je     L137
L49:
  xor    %edx,%edx
  test   $0x3,%sil
  sete   %dl
  shr    $0x2,%esi
  jmp    L137
  nopl   0x0(%rax,%rax,1)
L12:
  lea    -0x44(%rdi),%edx
  sar    $0x2,%edx
  test   $0x3,%dil
  je     L150
  test   %rsi,%rsi
  je     L147
  movl   $0x0,(%rsi)
L147:
  imul   $0x15180,%edx,%edx
  lea    -0x46(%rdi),%eax
  imul   $0x1e13380,%eax,%eax
  add    %edx,%eax
  cltq
  jmp    L68
  nop
L150:
  sub    $0x1,%edx
  test   %rsi,%rsi
  je     L147
  movl   $0x1,(%rsi)
  jmp    L147
L93:
  cmp    $0x12b,%esi
  jle    L148
  sub    $0x12c,%esi
  mov    $0x48,%r8d
  jmp    L86
  cs nopw 0x0(%rax,%rax,1)
L14:
  xor    %r8d,%r8d
  jmp    L49
  nopl   (%rax)
L148:
  sub    $0xc8,%esi
  mov    $0x30,%r8d
  jmp    L86
L121:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
long long __year_to_secs(long long year, int *is_leap) {
  if (year - 2ULL <= 136) {
    int y = year;
    int leaps = (y - 68) >> 2;
    if (!((y - 68) & 3)) {
      leaps--;
      if (is_leap)
        *is_leap = 1;
    } else if (is_leap)
      *is_leap = 0;
    return 31536000 * (y - 70) + 86400 * leaps;
  }
  int cycles, centuries, leaps, rem;
  if (!is_leap)
    is_leap = &(int){0};
  cycles = (year - 100) / 400;
  rem = (year - 100) % 400;
  if (rem < 0) {
    cycles--;
    rem += 400;
  }
  if (!rem) {
    *is_leap = 1;
    centuries = 0;
    leaps = 0;
  } else {
    if (rem >= 200) {
      if (rem >= 300)
        centuries = 3, rem -= 300;
      else
        centuries = 2, rem -= 200;
    } else {
      if (rem >= 100)
        centuries = 1, rem -= 100;
      else
        centuries = 0;
    }
    if (!rem) {
      *is_leap = 0;
      leaps = 0;
    } else {
      leaps = rem / 4U;
      rem %= 4U;
      *is_leap = !rem;
    }
  }
  leaps += 97 * cycles + 24 * centuries - *is_leap;
  return (year - 100) * 31536000LL + leaps * 86400LL + 946684800 + 86400;
}
```