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

```asm
<main>:
  endbr64
  push   %r13
  mov    $0x32,%ecx
  push   %r12
  lea    D16(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x348,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x338(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbx
  lea    0xc(%rsp),%rsi
  mov    %rbx,%rdi
  rep stos %rax,%es:(%rdi)
  movl   $0x0,(%rdi)
  mov    %r12,%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L7
  xor    %ebp,%ebp
  lea    0x8(%rsp),%r13
  nopl   (%rax)
L49:
  mov    %r13,%rsi
  mov    %r12,%rdi
  add    $0x1,%ebp
  call   <scanf@plt>
  movslq 0x8(%rsp),%rax
  addl   $0x1,0x10(%rsp,%rax,4)
  cmp    %ebp,0xc(%rsp)
  jg     L49
L7:
  xor    %eax,%eax
  xor    %esi,%esi
  xor    %ecx,%ecx
  nopl   0x0(%rax)
L11:
  mov    (%rbx,%rax,4),%edx
  cmp    %ecx,%edx
  jl     L0
  cmp    %eax,%esi
  setl   %dil
  test   %dil,%dil
  cmovne %eax,%esi
  cmovne %edx,%ecx
L0:
  add    $0x1,%rax
  cmp    $0x65,%rax
  jne    L11
  lea    D18(%rip),%rdi
  call   <printf@plt>
  mov    0x338(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L39
  add    $0x348,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L39:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D16
data_type: string
name: read_data
arguments: label: D18
data_type: string

tool: D16:  %d

tool: D18: %d

assistant: ```c
int main() {
  int var[200], i = 0, maior = 0, X, N, maior_v = 0;
  while (i < 101) {
    var[i] = 0;
    i++;
  }
  scanf(" %d", &N);
  i = 0;
  while (i < N) {
    scanf(" %d", &X);
    var[X]++;
    i++;
  }
  i = 0;
  while (i < 101) {
    if (var[i] >= maior) {
      if (i > maior_v) {
        maior = var[i];
        maior_v = i;
      }
    }
    i++;
  }
  printf("%d", maior_v);
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<randDouble>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movsd  %xmm0,-0x18(%rbp)
  movsd  %xmm1,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  D0(%rip),%xmm0
  divsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    $0x0,%eax
  call   <xor128@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  divsd  -0x8(%rbp),%xmm0
  addsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D0
type_infered: f64

tool: D0: 4294967296

assistant: ```c
double randDouble(double low, double high) {
  double range = (high - low);
  double div = 4294967296.0 / range;
  return low + (xor128() / div);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<randDouble>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  movsd  %xmm0,0x8(%rsp)
  movq   %xmm1,%rbx
  mov    $0x0,%eax
  call   <xor128@plt>
  movq   %rbx,%xmm1
  movsd  0x8(%rsp),%xmm3
  subsd  %xmm3,%xmm1
  movsd  D2(%rip),%xmm2
  divsd  %xmm1,%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm3,%xmm0
  add    $0x10,%rsp
  pop    %rbx
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D2
type_infered: f64

tool: D2: 4294967296

assistant: ```c
double randDouble(double low, double high) {
  double range = (high - low);
  double div = 4294967296.0 / range;
  return low + (xor128() / div);
}
```
user: What is the c source code of the assembly code below?

```asm
<randDouble>:
  endbr64
  sub    $0x18,%rsp
  xor    %eax,%eax
  movsd  %xmm1,(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <xor128@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  (%rsp),%xmm1
  movsd  D7(%rip),%xmm3
  add    $0x18,%rsp
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm3
  divsd  %xmm3,%xmm0
  addsd  %xmm2,%xmm0
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D7
datatype: f64

tool: D7: 4294967296

assistant: ```c
double randDouble(double low, double high) {
  double range = (high - low);
  double div = 4294967296.0 / range;
  return low + (xor128() / div);
}
```
user: What is the c source code of the assembly code below:

```asm
<randDouble>:
  endbr64
  sub    $0x18,%rsp
  xor    %eax,%eax
  movsd  %xmm1,(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <xor128@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  (%rsp),%xmm1
  movsd  D5(%rip),%xmm3
  add    $0x18,%rsp
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm3
  divsd  %xmm3,%xmm0
  addsd  %xmm2,%xmm0
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D5
datatype: f64

tool: D5: 4294967296

assistant: ```c
double randDouble(double low, double high) {
  double range = (high - low);
  double div = 4294967296.0 / range;
  return low + (xor128() / div);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<qgetenv>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L15
  mov    -0x8(%rbp),%rax
  jmp    L3
L15:
  mov    -0x20(%rbp),%rax
L3:
  leave
  ret
```

assistant: ```c
const char *qgetenv(const char *envname, const char *nullstr) {
  const char *envstr = getenv(envname);
  if (envstr != NULL)
    return envstr;
  return nullstr;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<qgetenv>:
  endbr64
  push   %rbx
  mov    %rsi,%rbx
  call   <getenv@plt>
  test   %rax,%rax
  cmove  %rbx,%rax
  pop    %rbx
  ret
```

assistant: ```c
const char *qgetenv(const char *envname, const char *nullstr) {
  const char *envstr = getenv(envname);
  if (envstr != NULL)
    return envstr;
  return nullstr;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<qgetenv>:
  endbr64
  push   %rbx
  mov    %rsi,%rbx
  call   <getenv@plt>
  test   %rax,%rax
  cmove  %rbx,%rax
  pop    %rbx
  ret
```

assistant: ```c
const char *qgetenv(const char *envname, const char *nullstr) {
  const char *envstr = getenv(envname);
  if (envstr != NULL)
    return envstr;
  return nullstr;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<qgetenv>:
  endbr64
  push   %rbx
  mov    %rsi,%rbx
  call   <getenv@plt>
  test   %rax,%rax
  cmove  %rbx,%rax
  pop    %rbx
  ret
```

assistant: ```c
const char *qgetenv(const char *envname, const char *nullstr) {
  const char *envstr = getenv(envname);
  if (envstr != NULL)
    return envstr;
  return nullstr;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<cmd_vw_scanw>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x130,%rsp
  mov    %edi,-0x124(%rbp)
  mov    %rsi,-0x130(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x124(%rbp),%eax
  mov    $0x2,%esi
  mov    %eax,%edi
  call   <check_arg_count@plt>
  cmp    $0x1,%eax
  je     L33
  mov    -0x130(%rbp),%rax
  mov    (%rax),%rax
  lea    -0x118(%rbp),%rdx
  lea    D10(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  test   %rax,%rax
  jne    L36
  mov    $0x1,%edi
  call   <report_count@plt>
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <report_error@plt>
  jmp    L12
L36:
  mov    $0x2,%edi
  call   <report_count@plt>
  mov    -0x130(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rcx
  mov    -0x118(%rbp),%rax
  lea    -0x110(%rbp),%rdx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <internal_vw_scanw@plt>
  mov    %eax,%edi
  call   <report_int@plt>
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <report_status@plt>
  jmp    L12
L33:
  nop
L12:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D10
datatype: string
name: unpack_data
arguments: label: D2
datatype: string

tool: D10: %p

tool: D2: BAD ARGUMENT

assistant: ```c
void cmd_vw_scanw(int nargs, char **args) {
  WINDOW *win;
  char string[256];
  if (check_arg_count(nargs, 2) == 1)
    return;
  if (sscanf(args[0], "%p", &win) == 0) {
    report_count(1);
    report_error("BAD ARGUMENT");
    return;
  }
  report_count(2);
  report_int(internal_vw_scanw(win, args[1], string));
  report_status(string);
}
```
user: What is the c source code of the assembly code below:

```asm
<cmd_vw_scanw>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x128,%rsp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  mov    $0x2,%esi
  call   <check_arg_count@plt>
  cmp    $0x1,%eax
  je     L8
  lea    0x8(%rsp),%rdx
  lea    D0(%rip),%rsi
  mov    (%rbx),%rdi
  call   <sscanf@plt>
  test   %rax,%rax
  je     L26
  mov    $0x2,%edi
  call   <report_count@plt>
  lea    0x10(%rsp),%rbp
  mov    0x8(%rbx),%rsi
  mov    %rbp,%rdx
  mov    0x8(%rsp),%rdi
  call   <internal_vw_scanw@plt>
  mov    %eax,%edi
  call   <report_int@plt>
  mov    %rbp,%rdi
  call   <report_status@plt>
L8:
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L30
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  ret
L26:
  mov    $0x1,%edi
  call   <report_count@plt>
  lea    D7(%rip),%rdi
  call   <report_error@plt>
  jmp    L8
L30:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D0
data_type: string
name: extract_symbolic_data
arguments: data_tag: D7
data_type: string

tool: D0: %p

tool: D7: BAD ARGUMENT

assistant: ```c
void cmd_vw_scanw(int nargs, char **args) {
  WINDOW *win;
  char string[256];
  if (check_arg_count(nargs, 2) == 1)
    return;
  if (sscanf(args[0], "%p", &win) == 0) {
    report_count(1);
    report_error("BAD ARGUMENT");
    return;
  }
  report_count(2);
  report_int(internal_vw_scanw(win, args[1], string));
  report_status(string);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<cmd_vw_scanw>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    $0x2,%esi
  sub    $0x128,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  call   <check_arg_count@plt>
  cmp    $0x1,%eax
  je     L27
  mov    (%rbx),%rdi
  lea    0x8(%rsp),%rdx
  lea    D14(%rip),%rsi
  call   <sscanf@plt>
  test   %rax,%rax
  je     L8
  mov    $0x2,%edi
  lea    0x10(%rsp),%rbp
  call   <report_count@plt>
  mov    0x8(%rbx),%rsi
  mov    0x8(%rsp),%rdi
  mov    %rbp,%rdx
  call   <internal_vw_scanw@plt>
  mov    %eax,%edi
  call   <report_int@plt>
  mov    %rbp,%rdi
  call   <report_status@plt>
L27:
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L8:
  mov    $0x1,%edi
  call   <report_count@plt>
  lea    D1(%rip),%rdi
  call   <report_error@plt>
  jmp    L27
L5:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D14
datatype: string
name: read_data
arguments: data_label: D1
datatype: string

tool: D14: %p

tool: D1: BAD ARGUMENT

assistant: ```c
void cmd_vw_scanw(int nargs, char **args) {
  WINDOW *win;
  char string[256];
  if (check_arg_count(nargs, 2) == 1)
    return;
  if (sscanf(args[0], "%p", &win) == 0) {
    report_count(1);
    report_error("BAD ARGUMENT");
    return;
  }
  report_count(2);
  report_int(internal_vw_scanw(win, args[1], string));
  report_status(string);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<cmd_vw_scanw>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    $0x2,%esi
  sub    $0x128,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  call   <check_arg_count@plt>
  cmp    $0x1,%eax
  je     L0
  mov    (%rbx),%rdi
  lea    0x8(%rsp),%rdx
  lea    D4(%rip),%rsi
  call   <sscanf@plt>
  test   %rax,%rax
  je     L25
  mov    $0x2,%edi
  lea    0x10(%rsp),%rbp
  call   <report_count@plt>
  mov    0x8(%rbx),%rsi
  mov    0x8(%rsp),%rdi
  mov    %rbp,%rdx
  call   <internal_vw_scanw@plt>
  mov    %eax,%edi
  call   <report_int@plt>
  mov    %rbp,%rdi
  call   <report_status@plt>
L0:
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L39
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L25:
  mov    $0x1,%edi
  call   <report_count@plt>
  lea    D11(%rip),%rdi
  call   <report_error@plt>
  jmp    L0
L39:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D4
type_infered: string
name: unpack_data
arguments: label: D11
type_infered: string

tool: D4: %p

tool: D11: BAD ARGUMENT

assistant: ```c
void cmd_vw_scanw(int nargs, char **args) {
  WINDOW *win;
  char string[256];
  if (check_arg_count(nargs, 2) == 1)
    return;
  if (sscanf(args[0], "%p", &win) == 0) {
    report_count(1);
    report_error("BAD ARGUMENT");
    return;
  }
  report_count(2);
  report_int(internal_vw_scanw(win, args[1], string));
  report_status(string);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<is_toll_free_date>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x20(%rbp),%rdx
  lea    -0x34(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <localtime_r@plt>
  mov    -0x20(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  cmpl   $0x4,-0x24(%rbp)
  jle    L245
  mov    $0x1,%eax
  jmp    L267
L245:
  mov    -0x14(%rbp),%eax
  cmp    $0x7e2,%eax
  jne    L166
  cmpl   $0x1,-0x2c(%rbp)
  jne    L266
  cmpl   $0x1,-0x28(%rbp)
  je     L156
  cmpl   $0x5,-0x28(%rbp)
  je     L156
  cmpl   $0x6,-0x28(%rbp)
  je     L156
L266:
  cmpl   $0x3,-0x2c(%rbp)
  jne    L229
  cmpl   $0x1d,-0x28(%rbp)
  je     L156
  cmpl   $0x1e,-0x28(%rbp)
  je     L156
L229:
  cmpl   $0x4,-0x2c(%rbp)
  jne    L138
  cmpl   $0x2,-0x28(%rbp)
  je     L156
  cmpl   $0x1e,-0x28(%rbp)
  je     L156
L138:
  cmpl   $0x5,-0x2c(%rbp)
  jne    L273
  cmpl   $0x1,-0x28(%rbp)
  je     L156
  cmpl   $0x9,-0x28(%rbp)
  je     L156
  cmpl   $0xa,-0x28(%rbp)
  je     L156
L273:
  cmpl   $0x6,-0x2c(%rbp)
  jne    L76
  cmpl   $0x5,-0x28(%rbp)
  je     L156
  cmpl   $0x6,-0x28(%rbp)
  je     L156
  cmpl   $0x16,-0x28(%rbp)
  je     L156
L76:
  cmpl   $0x7,-0x2c(%rbp)
  je     L156
  cmpl   $0xb,-0x2c(%rbp)
  jne    L175
  cmpl   $0x2,-0x28(%rbp)
  je     L156
L175:
  cmpl   $0xc,-0x2c(%rbp)
  jne    L166
  cmpl   $0x18,-0x28(%rbp)
  je     L156
  cmpl   $0x19,-0x28(%rbp)
  je     L156
  cmpl   $0x1a,-0x28(%rbp)
  je     L156
  cmpl   $0x1f,-0x28(%rbp)
  jne    L166
L156:
  mov    $0x1,%eax
  jmp    L267
L166:
  mov    $0x0,%eax
L267:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L193
  call   <__stack_chk_fail@plt>
L193:
  leave
  ret
```

assistant: ```c
int is_toll_free_date(time_t time) {
  int month, day, day_of_week;
  struct tm date;
  localtime_r(&time, &date);
  month = date.tm_mon + 1;
  day = date.tm_mday;
  day_of_week = date.tm_wday;
  if (day_of_week >= 5)
    return 1;
  if (date.tm_year == 2018) {
    if (month == 1 && (day == 1 || day == 5 || day == 6) || month == 3 && (day == 29 || day == 30) || month == 4 && (day == 2 || day == 30) || month == 5 && (day == 1 || day == 9 || day == 10) || month == 6 && (day == 5 || day == 6 || day == 22) || month == 7 || month == 11 && day == 2 || month == 12 && (day == 24 || day == 25 || day == 26 || day == 31)) {
      return 1;
    }
  }
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<is_toll_free_date>:
  endbr64
  sub    $0x38,%rsp
  mov    %edi,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rsi
  lea    0xc(%rsp),%rdi
  call   <localtime_r@plt>
  mov    0x10(%rsp),%ecx
  mov    0x14(%rsp),%edx
  mov    $0x1,%eax
  cmpl   $0x4,0x18(%rsp)
  jg     L259
  mov    $0x0,%eax
  cmpl   $0x7e2,0x1c(%rsp)
  je     L92
L259:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L296
  add    $0x38,%rsp
  ret
L92:
  lea    0x1(%rcx),%eax
  test   %ecx,%ecx
  je     L54
  cmp    $0x3,%eax
  je     L235
  cmp    $0x4,%eax
  je     L173
  cmp    $0x5,%eax
  je     L299
  cmp    $0x6,%eax
  jne    L233
  lea    -0x5(%rdx),%eax
  cmp    $0x1,%eax
  jbe    L159
  cmp    $0x16,%edx
  je     L159
  mov    $0x0,%eax
  jmp    L259
L54:
  lea    -0x5(%rdx),%ecx
  cmp    $0x1,%ecx
  jbe    L259
  cmp    $0x1,%edx
  mov    $0x0,%edx
  cmovne %edx,%eax
  jmp    L259
L235:
  sub    $0x1d,%edx
  cmp    $0x2,%edx
  setb   %al
  movzbl %al,%eax
  jmp    L259
L173:
  cmp    $0x2,%edx
  je     L108
  cmp    $0x1e,%edx
  je     L108
  mov    $0x0,%eax
  jmp    L259
L299:
  lea    -0x9(%rdx),%eax
  cmp    $0x1,%eax
  jbe    L31
  mov    $0x0,%eax
  cmp    $0x1,%edx
  jne    L259
L31:
  mov    $0x1,%eax
  jmp    L259
L233:
  cmp    $0x7,%eax
  jne    L278
  mov    $0x1,%eax
  jmp    L259
L278:
  cmp    $0xb,%eax
  jne    L24
  cmp    $0x2,%edx
  jne    L24
  mov    $0x1,%eax
  jmp    L259
L24:
  cmp    $0xc,%eax
  jne    L133
  lea    -0x18(%rdx),%eax
  cmp    $0x2,%eax
  setbe  %al
  cmp    $0x1f,%edx
  sete   %dl
  or     %edx,%eax
  movzbl %al,%eax
  jmp    L259
L108:
  mov    $0x1,%eax
  jmp    L259
L159:
  mov    $0x1,%eax
  jmp    L259
L133:
  mov    $0x0,%eax
  jmp    L259
L296:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int is_toll_free_date(time_t time) {
  int month, day, day_of_week;
  struct tm date;
  localtime_r(&time, &date);
  month = date.tm_mon + 1;
  day = date.tm_mday;
  day_of_week = date.tm_wday;
  if (day_of_week >= 5)
    return 1;
  if (date.tm_year == 2018) {
    if (month == 1 && (day == 1 || day == 5 || day == 6) || month == 3 && (day == 29 || day == 30) || month == 4 && (day == 2 || day == 30) || month == 5 && (day == 1 || day == 9 || day == 10) || month == 6 && (day == 5 || day == 6 || day == 22) || month == 7 || month == 11 && day == 2 || month == 12 && (day == 24 || day == 25 || day == 26 || day == 31)) {
      return 1;
    }
  }
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<is_toll_free_date>:
  endbr64
  sub    $0x38,%rsp
  mov    %edi,0xc(%rsp)
  lea    0x10(%rsp),%rsi
  lea    0xc(%rsp),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <localtime_r@plt>
  cmpl   $0x4,0x18(%rsp)
  mov    0x10(%rsp),%ecx
  mov    $0x1,%eax
  mov    0x14(%rsp),%edx
  jg     L58
  xor    %eax,%eax
  cmpl   $0x7e2,0x1c(%rsp)
  je     L143
L58:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L81
  add    $0x38,%rsp
  ret
  nopl   0x0(%rax)
L143:
  lea    0x1(%rcx),%eax
  test   %ecx,%ecx
  je     L11
  cmp    $0x3,%eax
  je     L18
  cmp    $0x4,%eax
  je     L25
  cmp    $0x5,%eax
  je     L35
  cmp    $0x6,%eax
  jne    L205
  lea    -0x5(%rdx),%eax
  cmp    $0x1,%eax
  setbe  %al
  cmp    $0x16,%edx
  sete   %dl
  or     %edx,%eax
  movzbl %al,%eax
  jmp    L58
  nopl   0x0(%rax)
L11:
  lea    -0x5(%rdx),%ecx
  cmp    $0x1,%ecx
  jbe    L58
  xor    %eax,%eax
  cmp    $0x1,%edx
  sete   %al
  jmp    L58
  nopw   0x0(%rax,%rax,1)
L18:
  sub    $0x1d,%edx
  xor    %eax,%eax
  cmp    $0x2,%edx
  setb   %al
  jmp    L58
  nopl   (%rax)
L25:
  cmp    $0x2,%edx
  je     L74
  cmp    $0x1e,%edx
  je     L74
L129:
  xor    %eax,%eax
  jmp    L58
  nopl   0x0(%rax)
L35:
  lea    -0x9(%rdx),%eax
  cmp    $0x1,%eax
  jbe    L74
  cmp    $0x1,%edx
  jne    L129
  nopl   (%rax)
L74:
  mov    $0x1,%eax
  jmp    L58
  nopw   0x0(%rax,%rax,1)
L205:
  cmp    $0x7,%eax
  je     L74
  cmp    $0x2,%edx
  jne    L7
  cmp    $0xb,%eax
  je     L74
L7:
  cmp    $0xc,%eax
  jne    L129
  lea    -0x18(%rdx),%eax
  cmp    $0x2,%eax
  setbe  %al
  cmp    $0x1f,%edx
  sete   %dl
  or     %edx,%eax
  movzbl %al,%eax
  jmp    L58
L81:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int is_toll_free_date(time_t time) {
  int month, day, day_of_week;
  struct tm date;
  localtime_r(&time, &date);
  month = date.tm_mon + 1;
  day = date.tm_mday;
  day_of_week = date.tm_wday;
  if (day_of_week >= 5)
    return 1;
  if (date.tm_year == 2018) {
    if (month == 1 && (day == 1 || day == 5 || day == 6) || month == 3 && (day == 29 || day == 30) || month == 4 && (day == 2 || day == 30) || month == 5 && (day == 1 || day == 9 || day == 10) || month == 6 && (day == 5 || day == 6 || day == 22) || month == 7 || month == 11 && day == 2 || month == 12 && (day == 24 || day == 25 || day == 26 || day == 31)) {
      return 1;
    }
  }
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<is_toll_free_date>:
  endbr64
  sub    $0x38,%rsp
  mov    %edi,0xc(%rsp)
  lea    0x10(%rsp),%rsi
  lea    0xc(%rsp),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <localtime_r@plt>
  cmpl   $0x4,0x18(%rsp)
  mov    0x10(%rsp),%ecx
  mov    $0x1,%eax
  mov    0x14(%rsp),%edx
  jg     L34
  xor    %eax,%eax
  cmpl   $0x7e2,0x1c(%rsp)
  je     L212
L34:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L109
  add    $0x38,%rsp
  ret
  nopl   0x0(%rax)
L212:
  lea    0x1(%rcx),%eax
  test   %ecx,%ecx
  je     L178
  cmp    $0x3,%eax
  je     L21
  cmp    $0x4,%eax
  je     L226
  cmp    $0x5,%eax
  je     L220
  cmp    $0x6,%eax
  jne    L130
  lea    -0x5(%rdx),%eax
  cmp    $0x1,%eax
  setbe  %al
  cmp    $0x16,%edx
  sete   %dl
  or     %edx,%eax
  movzbl %al,%eax
  jmp    L34
  nopl   0x0(%rax)
L178:
  lea    -0x5(%rdx),%ecx
  cmp    $0x1,%ecx
  jbe    L34
  xor    %eax,%eax
  cmp    $0x1,%edx
  sete   %al
  jmp    L34
  nopw   0x0(%rax,%rax,1)
L21:
  sub    $0x1d,%edx
  xor    %eax,%eax
  cmp    $0x2,%edx
  setb   %al
  jmp    L34
  nopl   (%rax)
L226:
  cmp    $0x2,%edx
  je     L126
  cmp    $0x1e,%edx
  je     L126
L176:
  xor    %eax,%eax
  jmp    L34
  nopl   0x0(%rax)
L220:
  lea    -0x9(%rdx),%eax
  cmp    $0x1,%eax
  jbe    L126
  cmp    $0x1,%edx
  jne    L176
  nopl   (%rax)
L126:
  mov    $0x1,%eax
  jmp    L34
  nopw   0x0(%rax,%rax,1)
L130:
  cmp    $0x7,%eax
  je     L126
  cmp    $0x2,%edx
  jne    L147
  cmp    $0xb,%eax
  je     L126
L147:
  cmp    $0xc,%eax
  jne    L176
  lea    -0x18(%rdx),%eax
  cmp    $0x2,%eax
  setbe  %al
  cmp    $0x1f,%edx
  sete   %dl
  or     %edx,%eax
  movzbl %al,%eax
  jmp    L34
L109:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int is_toll_free_date(time_t time) {
  int month, day, day_of_week;
  struct tm date;
  localtime_r(&time, &date);
  month = date.tm_mon + 1;
  day = date.tm_mday;
  day_of_week = date.tm_wday;
  if (day_of_week >= 5)
    return 1;
  if (date.tm_year == 2018) {
    if (month == 1 && (day == 1 || day == 5 || day == 6) || month == 3 && (day == 29 || day == 30) || month == 4 && (day == 2 || day == 30) || month == 5 && (day == 1 || day == 9 || day == 10) || month == 6 && (day == 5 || day == 6 || day == 22) || month == 7 || month == 11 && day == 2 || month == 12 && (day == 24 || day == 25 || day == 26 || day == 31)) {
      return 1;
    }
  }
  return 0;
}
```