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

```asm
<fabs_>:
  endbr64
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  ja     L6
  ret
  nop
L6:
  xorpd  D7(%rip),%xmm0
  ret
```

tool_calls: name: retrieve_data
arguments: label: D7
data_type: byte[16]

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

assistant: ```c
double fabs_(double a) {
  if (a < 0)
    return a * (-1.0);
  else
    return a;
}
```
user: Translate the below assembly code into C programming language:

```asm
<GetRruleDayname>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,%eax
  mov    %al,-0x4(%rbp)
  movb   $0x0,D10(%rip)
  movzbl -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L33
  lea    D129(%rip),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L33:
  movzbl -0x4(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L61
  lea    D64(%rip),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L61:
  movzbl -0x4(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L40
  lea    D65(%rip),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L40:
  movzbl -0x4(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  je     L72
  lea    D26(%rip),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L72:
  movzbl -0x4(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L5
  lea    D88(%rip),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L5:
  movzbl -0x4(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  je     L65
  lea    D5(%rip),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L65:
  movzbl -0x4(%rbp),%eax
  and    $0x40,%eax
  test   %eax,%eax
  je     L58
  lea    D96(%rip),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L58:
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  je     L36
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  lea    D10(%rip),%rdx
  movb   $0x0,(%rax,%rdx,1)
L36:
  lea    D10(%rip),%rax
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D129
type: string
name: read_data
arguments: data_tag: D64
type: string
name: read_data
arguments: data_tag: D65
type: string
name: read_data
arguments: data_tag: D26
type: string
name: read_data
arguments: data_tag: D88
type: string
name: read_data
arguments: data_tag: D5
type: string
name: read_data
arguments: data_tag: D96
type: string

tool: D129: SU,

tool: D64: MO,

tool: D65: TU,

tool: D26: WE,

tool: D88: TH,

tool: D5: FR,

tool: D96: SA,

assistant: ```c
char *GetRruleDayname(unsigned char a) {
  static char daystring[25];
  *daystring = 0;
  if (a & 0x01) {
    strcat(daystring, "SU,");
  }
  if (a & 0x02) {
    strcat(daystring, "MO,");
  }
  if (a & 0x04) {
    strcat(daystring, "TU,");
  }
  if (a & 0x08) {
    strcat(daystring, "WE,");
  }
  if (a & 0x10) {
    strcat(daystring, "TH,");
  }
  if (a & 0x20) {
    strcat(daystring, "FR,");
  }
  if (a & 0x40) {
    strcat(daystring, "SA,");
  }
  if (strlen(daystring)) {
    daystring[strlen(daystring) - 1] = 0;
  }
  return (daystring);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<GetRruleDayname>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  movb   $0x0,D131(%rip)
  test   $0x1,%dil
  jne    L87
L32:
  test   $0x2,%bl
  jne    L94
L96:
  test   $0x4,%bl
  jne    L54
L46:
  test   $0x8,%bl
  jne    L51
L122:
  test   $0x10,%bl
  jne    L44
L136:
  test   $0x20,%bl
  jne    L60
L101:
  test   $0x40,%bl
  jne    L109
L30:
  lea    D131(%rip),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jne    L76
L102:
  lea    D131(%rip),%rax
  pop    %rbx
  ret
L87:
  lea    D151(%rip),%rsi
  lea    D131(%rip),%rdi
  call   <strcat@plt>
  jmp    L32
L94:
  lea    D4(%rip),%rsi
  lea    D131(%rip),%rdi
  call   <strcat@plt>
  jmp    L96
L54:
  lea    D101(%rip),%rsi
  lea    D131(%rip),%rdi
  call   <strcat@plt>
  jmp    L46
L51:
  lea    D157(%rip),%rsi
  lea    D131(%rip),%rdi
  call   <strcat@plt>
  jmp    L122
L44:
  lea    D120(%rip),%rsi
  lea    D131(%rip),%rdi
  call   <strcat@plt>
  jmp    L136
L60:
  lea    D179(%rip),%rsi
  lea    D131(%rip),%rdi
  call   <strcat@plt>
  jmp    L101
L109:
  lea    D168(%rip),%rsi
  lea    D131(%rip),%rdi
  call   <strcat@plt>
  jmp    L30
L76:
  lea    D131(%rip),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  movb   $0x0,(%rbx,%rax,1)
  jmp    L102
```

tool_calls: name: parse_data
arguments: data_tag: D151
type_guessed: string
name: parse_data
arguments: data_tag: D4
type_guessed: string
name: parse_data
arguments: data_tag: D101
type_guessed: string
name: parse_data
arguments: data_tag: D157
type_guessed: string
name: parse_data
arguments: data_tag: D120
type_guessed: string
name: parse_data
arguments: data_tag: D179
type_guessed: string
name: parse_data
arguments: data_tag: D168
type_guessed: string

tool: D151: SU,

tool: D4: MO,

tool: D101: TU,

tool: D157: WE,

tool: D120: TH,

tool: D179: FR,

tool: D168: SA,

assistant: ```c
char *GetRruleDayname(unsigned char a) {
  static char daystring[25];
  *daystring = 0;
  if (a & 0x01) {
    strcat(daystring, "SU,");
  }
  if (a & 0x02) {
    strcat(daystring, "MO,");
  }
  if (a & 0x04) {
    strcat(daystring, "TU,");
  }
  if (a & 0x08) {
    strcat(daystring, "WE,");
  }
  if (a & 0x10) {
    strcat(daystring, "TH,");
  }
  if (a & 0x20) {
    strcat(daystring, "FR,");
  }
  if (a & 0x40) {
    strcat(daystring, "SA,");
  }
  if (strlen(daystring)) {
    daystring[strlen(daystring) - 1] = 0;
  }
  return (daystring);
}
```
user: What is the c source code of the assembly code below?

```asm
<GetRruleDayname>:
  endbr64
  push   %r12
  lea    D24(%rip),%r12
  push   %rbx
  mov    %edi,%ebx
  sub    $0x8,%rsp
  and    $0x1,%edi
  movb   $0x0,D24(%rip)
  jne    L5
  test   $0x2,%bl
  jne    L117
L17:
  test   $0x4,%bl
  jne    L113
L46:
  test   $0x8,%bl
  jne    L79
L87:
  test   $0x10,%bl
  jne    L47
L69:
  test   $0x20,%bl
  jne    L105
L97:
  and    $0x40,%ebx
  jne    L73
L45:
  mov    %r12,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jne    L136
L39:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
  nopl   (%rax)
L5:
  lea    D40(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  test   $0x2,%bl
  je     L17
L117:
  lea    D1(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  test   $0x4,%bl
  je     L46
L113:
  lea    D41(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  test   $0x8,%bl
  je     L87
L79:
  lea    D74(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  test   $0x10,%bl
  je     L69
L47:
  lea    D33(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  test   $0x20,%bl
  je     L97
L105:
  lea    D44(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  and    $0x40,%ebx
  je     L45
L73:
  mov    %r12,%rdi
  lea    D84(%rip),%rsi
  call   <strcat@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  je     L39
L136:
  mov    %r12,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  movb   $0x0,(%r12,%rax,1)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
```

tool_calls: name: parse_data
arguments: data_label: D40
data_type: string
name: parse_data
arguments: data_label: D1
data_type: string
name: parse_data
arguments: data_label: D41
data_type: string
name: parse_data
arguments: data_label: D74
data_type: string
name: parse_data
arguments: data_label: D33
data_type: string
name: parse_data
arguments: data_label: D44
data_type: string
name: parse_data
arguments: data_label: D84
data_type: string

tool: D40: SU,

tool: D1: MO,

tool: D41: TU,

tool: D74: WE,

tool: D33: TH,

tool: D44: FR,

tool: D84: SA,

assistant: ```c
char *GetRruleDayname(unsigned char a) {
  static char daystring[25];
  *daystring = 0;
  if (a & 0x01) {
    strcat(daystring, "SU,");
  }
  if (a & 0x02) {
    strcat(daystring, "MO,");
  }
  if (a & 0x04) {
    strcat(daystring, "TU,");
  }
  if (a & 0x08) {
    strcat(daystring, "WE,");
  }
  if (a & 0x10) {
    strcat(daystring, "TH,");
  }
  if (a & 0x20) {
    strcat(daystring, "FR,");
  }
  if (a & 0x40) {
    strcat(daystring, "SA,");
  }
  if (strlen(daystring)) {
    daystring[strlen(daystring) - 1] = 0;
  }
  return (daystring);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<GetRruleDayname>:
  endbr64
  push   %r12
  lea    D37(%rip),%r12
  push   %rbx
  mov    %edi,%ebx
  sub    $0x8,%rsp
  and    $0x1,%edi
  movb   $0x0,D37(%rip)
  jne    L5
  test   $0x2,%bl
  jne    L81
L139:
  test   $0x4,%bl
  jne    L63
L79:
  test   $0x8,%bl
  jne    L115
L91:
  test   $0x10,%bl
  jne    L2
L123:
  test   $0x20,%bl
  jne    L61
L129:
  and    $0x40,%ebx
  jne    L88
L86:
  mov    %r12,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jne    L26
L143:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
  nopl   (%rax)
L5:
  lea    D9(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  test   $0x2,%bl
  je     L139
L81:
  lea    D19(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  test   $0x4,%bl
  je     L79
L63:
  lea    D43(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  test   $0x8,%bl
  je     L91
L115:
  lea    D39(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  test   $0x10,%bl
  je     L123
L2:
  lea    D22(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  test   $0x20,%bl
  je     L129
L61:
  lea    D78(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  and    $0x40,%ebx
  je     L86
L88:
  mov    %r12,%rdi
  lea    D29(%rip),%rsi
  call   <strcat@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  je     L143
L26:
  mov    %r12,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  movb   $0x0,(%r12,%rax,1)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D9
type_infered: string
name: unpack_data
arguments: data_tag: D19
type_infered: string
name: unpack_data
arguments: data_tag: D43
type_infered: string
name: unpack_data
arguments: data_tag: D39
type_infered: string
name: unpack_data
arguments: data_tag: D22
type_infered: string
name: unpack_data
arguments: data_tag: D78
type_infered: string
name: unpack_data
arguments: data_tag: D29
type_infered: string

tool: D9: SU,

tool: D19: MO,

tool: D43: TU,

tool: D39: WE,

tool: D22: TH,

tool: D78: FR,

tool: D29: SA,

assistant: ```c
char *GetRruleDayname(unsigned char a) {
  static char daystring[25];
  *daystring = 0;
  if (a & 0x01) {
    strcat(daystring, "SU,");
  }
  if (a & 0x02) {
    strcat(daystring, "MO,");
  }
  if (a & 0x04) {
    strcat(daystring, "TU,");
  }
  if (a & 0x08) {
    strcat(daystring, "WE,");
  }
  if (a & 0x10) {
    strcat(daystring, "TH,");
  }
  if (a & 0x20) {
    strcat(daystring, "FR,");
  }
  if (a & 0x40) {
    strcat(daystring, "SA,");
  }
  if (strlen(daystring)) {
    daystring[strlen(daystring) - 1] = 0;
  }
  return (daystring);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<check_1arg>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L212
L119:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L54
  jmp    L154
L168:
  addq   $0x1,-0x30(%rbp)
L154:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L168
  jmp    L16
L260:
  addq   $0x1,-0x38(%rbp)
L16:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L260
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L100
  cmpl   $0x0,-0x24(%rbp)
  je     L52
  mov    $0xffffffff,%eax
  jmp    L34
L52:
  mov    $0x0,%eax
  jmp    L34
L100:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L212
  cmpl   $0x0,-0x24(%rbp)
  je     L70
  mov    -0x30(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <seek_arg@plt>
  jmp    L34
L70:
  mov    $0x0,%eax
  jmp    L34
L54:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %rax,%rbx
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %rax,%rbx
  jne    L91
  addq   $0x1,-0x30(%rbp)
  addq   $0x1,-0x38(%rbp)
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L212
  cmpl   $0x0,-0x24(%rbp)
  jne    L96
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L92
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L96
L92:
  mov    $0x0,%eax
  jmp    L34
L96:
  mov    $0xffffffff,%eax
  jmp    L34
L91:
  mov    $0xffffffff,%eax
  jmp    L34
L212:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L119
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L258
  cmpl   $0x0,-0x24(%rbp)
  je     L110
  mov    -0x30(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <seek_arg@plt>
  jmp    L34
L110:
  mov    $0x0,%eax
  jmp    L34
L258:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L19
  cmpl   $0x0,-0x24(%rbp)
  jne    L19
  mov    $0x0,%eax
  jmp    L34
L19:
  mov    $0xffffffff,%eax
L34:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int check_1arg(int p, const char *filename, const char *spec) {
  const char *a;
  a = filename;
  while (*spec) {
    if (*spec == '/') {
      while (*filename == '/')
        filename++;
      while (*spec == '/')
        spec++;
      if (!*filename)
        return p ? -1 : 0;
      if (!*spec)
        return p ? seek_arg(a, filename) : 0;
    } else if (tolower(((unsigned int)*spec)) == tolower(((unsigned int)*filename))) {
      filename++;
      spec++;
      if (!*filename) {
        if (!p && (*spec == '/' || *spec == '\0'))
          return 0;
        return -1;
      }
    } else {
      return -1;
    }
  }
  if (*filename == '/')
    return p ? seek_arg(a, filename) : 0;
  if (*filename == '\0' && !p)
    return 0;
  return -1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<check_1arg>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r13d
  mov    %rsi,%r12
  movzbl (%rdx),%edi
  test   %dil,%dil
  je     L134
  mov    %rdx,%rbp
  mov    %rsi,%rbx
  jmp    L169
L136:
  movzbl (%rbx),%eax
  cmp    $0x2f,%al
  jne    L227
L210:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  cmp    $0x2f,%al
  je     L210
L227:
  movzbl 0x0(%rbp),%edx
  cmp    $0x2f,%dl
  jne    L43
L76:
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%edx
  cmp    $0x2f,%dl
  je     L76
L43:
  test   %al,%al
  je     L83
  test   %dl,%dl
  je     L64
L191:
  movzbl 0x0(%rbp),%edi
  test   %dil,%dil
  je     L12
L169:
  cmp    $0x2f,%dil
  je     L136
  movsbl %dil,%edi
  call   <tolower@plt>
  mov    %rax,%r14
  movsbl (%rbx),%edi
  call   <tolower@plt>
  cmp    %rax,%r14
  jne    L72
  lea    0x1(%rbx),%rax
  lea    0x1(%rbp),%rdx
  cmpb   $0x0,0x1(%rbx)
  je     L173
  mov    %rdx,%rbp
  mov    %rax,%rbx
  jmp    L191
L83:
  neg    %r13d
  sbb    %eax,%eax
  jmp    L200
L64:
  mov    %r13d,%eax
  test   %r13d,%r13d
  je     L200
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <seek_arg@plt>
  jmp    L200
L173:
  test   %r13d,%r13d
  jne    L22
  movzbl 0x1(%rbp),%edx
  cmp    $0x2f,%dl
  sete   %al
  test   %dl,%dl
  sete   %dl
  or     %edx,%eax
  movzbl %al,%eax
  sub    $0x1,%eax
  jmp    L200
L134:
  mov    %rsi,%rbx
L12:
  movzbl (%rbx),%eax
  cmp    $0x2f,%al
  je     L133
  test   %r13d,%r13d
  sete   %dl
  test   %al,%al
  sete   %al
  movzbl %al,%eax
  and    %edx,%eax
  sub    $0x1,%eax
L200:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L133:
  mov    %r13d,%eax
  test   %r13d,%r13d
  je     L200
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <seek_arg@plt>
  jmp    L200
L72:
  mov    $0xffffffff,%eax
  jmp    L200
L22:
  mov    $0xffffffff,%eax
  jmp    L200
```

assistant: ```c
int check_1arg(int p, const char *filename, const char *spec) {
  const char *a;
  a = filename;
  while (*spec) {
    if (*spec == '/') {
      while (*filename == '/')
        filename++;
      while (*spec == '/')
        spec++;
      if (!*filename)
        return p ? -1 : 0;
      if (!*spec)
        return p ? seek_arg(a, filename) : 0;
    } else if (tolower(((unsigned int)*spec)) == tolower(((unsigned int)*filename))) {
      filename++;
      spec++;
      if (!*filename) {
        if (!p && (*spec == '/' || *spec == '\0'))
          return 0;
        return -1;
      }
    } else {
      return -1;
    }
  }
  if (*filename == '/')
    return p ? seek_arg(a, filename) : 0;
  if (*filename == '\0' && !p)
    return 0;
  return -1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<check_1arg>:
  endbr64
  push   %r14
  push   %r13
  mov    %edi,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  movsbl (%rdx),%edi
  test   %dil,%dil
  je     L131
  mov    %rdx,%rbx
  mov    %rsi,%rbp
  jmp    L101
  cs nopw 0x0(%rax,%rax,1)
L99:
  call   <tolower@plt>
  movsbl 0x0(%rbp),%edi
  mov    %rax,%r14
  call   <tolower@plt>
  cmp    %rax,%r14
  jne    L29
  cmpb   $0x0,0x1(%rbp)
  lea    0x1(%rbp),%rax
  lea    0x1(%rbx),%rdx
  je     L30
  mov    %rdx,%rbx
  mov    %rax,%rbp
L160:
  movsbl (%rbx),%edi
  test   %dil,%dil
  je     L71
L101:
  cmp    $0x2f,%dil
  jne    L99
  jmp    L83
  nopw   0x0(%rax,%rax,1)
L162:
  add    $0x1,%rbp
L83:
  movzbl 0x0(%rbp),%eax
  cmp    $0x2f,%al
  je     L162
  movzbl (%rbx),%edx
  cmp    $0x2f,%dl
  jne    L40
  nopl   0x0(%rax)
L62:
  movzbl 0x1(%rbx),%edx
  add    $0x1,%rbx
  cmp    $0x2f,%dl
  je     L62
L40:
  test   %al,%al
  je     L52
  test   %dl,%dl
  jne    L160
L86:
  test   %r13d,%r13d
  je     L148
  pop    %rbx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <seek_arg@plt>
L131:
  mov    %rsi,%rbp
L71:
  movzbl 0x0(%rbp),%eax
  cmp    $0x2f,%al
  je     L86
  test   %r13d,%r13d
  sete   %dl
  test   %al,%al
  sete   %al
  movzbl %al,%eax
  and    %edx,%eax
  sub    $0x1,%eax
L7:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L30:
  test   %r13d,%r13d
  jne    L29
  movzbl 0x1(%rbx),%eax
  cmp    $0x2f,%al
  je     L148
  test   %al,%al
  je     L148
L29:
  pop    %rbx
  mov    $0xffffffff,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L148:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L52:
  neg    %r13d
  sbb    %eax,%eax
  jmp    L7
```

assistant: ```c
int check_1arg(int p, const char *filename, const char *spec) {
  const char *a;
  a = filename;
  while (*spec) {
    if (*spec == '/') {
      while (*filename == '/')
        filename++;
      while (*spec == '/')
        spec++;
      if (!*filename)
        return p ? -1 : 0;
      if (!*spec)
        return p ? seek_arg(a, filename) : 0;
    } else if (tolower(((unsigned int)*spec)) == tolower(((unsigned int)*filename))) {
      filename++;
      spec++;
      if (!*filename) {
        if (!p && (*spec == '/' || *spec == '\0'))
          return 0;
        return -1;
      }
    } else {
      return -1;
    }
  }
  if (*filename == '/')
    return p ? seek_arg(a, filename) : 0;
  if (*filename == '\0' && !p)
    return 0;
  return -1;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<check_1arg>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edi,%ebx
  movsbl (%rdx),%edi
  test   %dil,%dil
  je     L108
  mov    %rdx,%r13
  mov    %rsi,%r12
  jmp    L124
  nopl   (%rax)
L71:
  call   <tolower@plt>
  movsbl (%r12),%edi
  mov    %rax,%r14
  call   <tolower@plt>
  cmp    %rax,%r14
  jne    L14
  movzbl 0x1(%r12),%edx
  lea    0x1(%r12),%rsi
  lea    0x1(%r13),%rax
  test   %dl,%dl
  je     L130
  movsbl 0x1(%r13),%edi
  test   %dil,%dil
  je     L121
L102:
  mov    %rax,%r13
  mov    %rsi,%r12
L124:
  cmp    $0x2f,%dil
  jne    L71
  movzbl (%r12),%edx
  mov    %r12,%rsi
  cmp    $0x2f,%dl
  jne    L30
  nopl   (%rax)
L12:
  movzbl 0x1(%rsi),%edx
  add    $0x1,%rsi
  cmp    $0x2f,%dl
  je     L12
L30:
  mov    %r13,%rax
L0:
  movsbl 0x1(%rax),%edi
  add    $0x1,%rax
  cmp    $0x2f,%dil
  je     L0
  test   %dl,%dl
  je     L19
  test   %dil,%dil
  jne    L102
L78:
  test   %ebx,%ebx
  je     L164
  pop    %rbx
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <seek_arg@plt>
L108:
  movzbl (%rsi),%edx
L121:
  cmp    $0x2f,%dl
  je     L78
  test   %ebx,%ebx
  sete   %cl
  xor    %eax,%eax
  test   %dl,%dl
  sete   %al
  and    %ecx,%eax
  sub    $0x1,%eax
L114:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L130:
  test   %ebx,%ebx
  jne    L14
  movzbl 0x1(%r13),%eax
  cmp    $0x2f,%al
  je     L164
  test   %al,%al
  je     L164
L14:
  pop    %rbx
  mov    $0xffffffff,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L164:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L19:
  neg    %ebx
  sbb    %eax,%eax
  jmp    L114
```

assistant: ```c
int check_1arg(int p, const char *filename, const char *spec) {
  const char *a;
  a = filename;
  while (*spec) {
    if (*spec == '/') {
      while (*filename == '/')
        filename++;
      while (*spec == '/')
        spec++;
      if (!*filename)
        return p ? -1 : 0;
      if (!*spec)
        return p ? seek_arg(a, filename) : 0;
    } else if (tolower(((unsigned int)*spec)) == tolower(((unsigned int)*filename))) {
      filename++;
      spec++;
      if (!*filename) {
        if (!p && (*spec == '/' || *spec == '\0'))
          return 0;
        return -1;
      }
    } else {
      return -1;
    }
  }
  if (*filename == '/')
    return p ? seek_arg(a, filename) : 0;
  if (*filename == '\0' && !p)
    return 0;
  return -1;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<send_data>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x18(%rbp)
  movl   $0x0,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L15
L13:
  mov    -0xc(%rbp),%eax
  mov    $0x400,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x4(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    $0x0,%ecx
  mov    %eax,%edi
  call   <send@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  add    %eax,-0x10(%rbp)
  mov    -0x8(%rbp),%eax
  sub    %eax,-0xc(%rbp)
L15:
  mov    -0x10(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L13
  mov    -0x8(%rbp),%eax
  shr    $0x1f,%eax
  leave
  ret
```

assistant: ```c
int send_data(int connection, char *buffer, int buffer_size) {
  int total = 0;
  int left = buffer_size;
  int n = 0;
  int send_size;
  while (total < buffer_size) {
    send_size = left > 1024 ? 1024 : left;
    n = send(connection, buffer + total, send_size, 0);
    total += n;
    left -= n;
  }
  return n < 0 ? 1 : 0;
}
```