ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<delete_file>:
  endbr64
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L60
  mov    %rdi,%rsi
  lea    0x9(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    %rbx,%rdi
L35:
  mov    $0x1,%esi
  call   <remove_app@plt>
  mov    %eax,%ebx
  cmp    $0x2,%eax
  je     L16
  cmp    $0x1,%eax
  je     L11
  mov    $0x3,%edi
  call   <textattr@plt>
  mov    %ebx,%esi
  lea    D23(%rip),%rdi
  mov    $0x0,%eax
  call   <cprintf@plt>
  mov    $0x7,%edi
  call   <textattr@plt>
L28:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L42
  mov    %ebx,%eax
  add    $0x20,%rsp
  pop    %rbx
  ret
L60:
  lea    D34(%rip),%rdi
  call   <cprintf@plt>
  movb   $0xc,0x9(%rsp)
  lea    0x9(%rsp),%rdi
  call   <cgets@plt>
  lea    0xb(%rsp),%rdi
  jmp    L35
L16:
  mov    $0xc,%edi
  call   <textattr@plt>
  mov    $0x2,%esi
  lea    D2(%rip),%rdi
  mov    $0x0,%eax
  call   <cprintf@plt>
  mov    $0x7,%edi
  call   <textattr@plt>
  jmp    L28
L11:
  mov    $0xc,%edi
  call   <textattr@plt>
  mov    $0x1,%esi
  lea    D1(%rip),%rdi
  mov    $0x0,%eax
  call   <cprintf@plt>
  mov    $0x7,%edi
  call   <textattr@plt>
  jmp    L28
L42:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D23
datatype: string
name: disassemble_data
arguments: data_tag: D34
datatype: string
name: disassemble_data
arguments: data_tag: D2
datatype: string
name: disassemble_data
arguments: data_tag: D1
datatype: string

tool: D23: 
File removed successfully. STATUS: %d

tool: D34: 
Enter (existing) file name: 

tool: D2: 
Error: file NOT removed. Data error. STATUS: %d

tool: D1: 
Error: file NOT removed. Failed. STATUS: %d

assistant: ```c
int delete_file(char *s) {
  char cfname[15];
  char *fname;
  int status;
  if (s == NULL) {
    cprintf("\n\rEnter (existing) file name: ");
    cfname[0] = 12;
    cgets(cfname);
    fname = cfname + 2;
  } else {
    strcpy(cfname, s);
    fname = cfname;
  }
  status = remove_app(fname, 1);
  if (status == 2) {
    textattr(0x0C);
    cprintf("\n\rError: file NOT removed. Data error. STATUS: %d", status);
    textattr(0x07);
  } else if (status == 1) {
    textattr(0x0C);
    cprintf("\n\rError: file NOT removed. Failed. STATUS: %d", status);
    textattr(0x07);
  } else {
    textattr(0x03);
    cprintf("\n\rFile removed successfully. STATUS: %d", status);
    textattr(0x07);
  }
  return status;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<delete_file>:
  endbr64
  push   %r12
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L1
  lea    0x9(%rsp),%r12
  mov    %rdi,%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  mov    %r12,%rdi
L21:
  mov    $0x1,%esi
  call   <remove_app@plt>
  mov    %eax,%r12d
  cmp    $0x2,%eax
  je     L19
  cmp    $0x1,%eax
  je     L17
  mov    $0x3,%edi
  call   <textattr@plt>
  lea    D10(%rip),%rdi
  mov    %r12d,%esi
  xor    %eax,%eax
  call   <cprintf@plt>
  mov    $0x7,%edi
  call   <textattr@plt>
L67:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L58
  add    $0x20,%rsp
  mov    %r12d,%eax
  pop    %r12
  ret
L1:
  lea    D36(%rip),%rdi
  call   <cprintf@plt>
  lea    0x9(%rsp),%rdi
  movb   $0xc,0x9(%rsp)
  call   <cgets@plt>
  lea    0xb(%rsp),%rdi
  jmp    L21
  nopw   0x0(%rax,%rax,1)
L17:
  mov    $0xc,%edi
  call   <textattr@plt>
  mov    $0x1,%esi
  lea    D31(%rip),%rdi
  xor    %eax,%eax
  call   <cprintf@plt>
  mov    $0x7,%edi
  call   <textattr@plt>
  jmp    L67
  nopl   0x0(%rax)
L19:
  mov    $0xc,%edi
  call   <textattr@plt>
  mov    $0x2,%esi
  lea    D24(%rip),%rdi
  xor    %eax,%eax
  call   <cprintf@plt>
  mov    $0x7,%edi
  call   <textattr@plt>
  jmp    L67
L58:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D10
type_guessed: string
name: unpack_data
arguments: tag: D36
type_guessed: string
name: unpack_data
arguments: tag: D31
type_guessed: string
name: unpack_data
arguments: tag: D24
type_guessed: string

tool: D10: 
File removed successfully. STATUS: %d

tool: D36: 
Enter (existing) file name: 

tool: D31: 
Error: file NOT removed. Failed. STATUS: %d

tool: D24: 
Error: file NOT removed. Data error. STATUS: %d

assistant: ```c
int delete_file(char *s) {
  char cfname[15];
  char *fname;
  int status;
  if (s == NULL) {
    cprintf("\n\rEnter (existing) file name: ");
    cfname[0] = 12;
    cgets(cfname);
    fname = cfname + 2;
  } else {
    strcpy(cfname, s);
    fname = cfname;
  }
  status = remove_app(fname, 1);
  if (status == 2) {
    textattr(0x0C);
    cprintf("\n\rError: file NOT removed. Data error. STATUS: %d", status);
    textattr(0x07);
  } else if (status == 1) {
    textattr(0x0C);
    cprintf("\n\rError: file NOT removed. Failed. STATUS: %d", status);
    textattr(0x07);
  } else {
    textattr(0x03);
    cprintf("\n\rFile removed successfully. STATUS: %d", status);
    textattr(0x07);
  }
  return status;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<delete_file>:
  endbr64
  push   %r12
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L38
  lea    0x9(%rsp),%r12
  mov    %rdi,%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  mov    %r12,%rdi
L65:
  mov    $0x1,%esi
  call   <remove_app@plt>
  mov    %eax,%r12d
  cmp    $0x2,%eax
  je     L0
  cmp    $0x1,%eax
  je     L18
  mov    $0x3,%edi
  call   <textattr@plt>
  lea    D7(%rip),%rdi
  mov    %r12d,%esi
  xor    %eax,%eax
  call   <cprintf@plt>
  mov    $0x7,%edi
  call   <textattr@plt>
L59:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L26
  add    $0x20,%rsp
  mov    %r12d,%eax
  pop    %r12
  ret
L38:
  lea    D25(%rip),%rdi
  call   <cprintf@plt>
  lea    0x9(%rsp),%rdi
  movb   $0xc,0x9(%rsp)
  call   <cgets@plt>
  lea    0xb(%rsp),%rdi
  jmp    L65
  nopw   0x0(%rax,%rax,1)
L18:
  mov    $0xc,%edi
  call   <textattr@plt>
  mov    $0x1,%esi
  lea    D1(%rip),%rdi
  xor    %eax,%eax
  call   <cprintf@plt>
  mov    $0x7,%edi
  call   <textattr@plt>
  jmp    L59
  nopl   0x0(%rax)
L0:
  mov    $0xc,%edi
  call   <textattr@plt>
  mov    $0x2,%esi
  lea    D3(%rip),%rdi
  xor    %eax,%eax
  call   <cprintf@plt>
  mov    $0x7,%edi
  call   <textattr@plt>
  jmp    L59
L26:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D7
type: string
name: unpack_data
arguments: tag: D25
type: string
name: unpack_data
arguments: tag: D1
type: string
name: unpack_data
arguments: tag: D3
type: string

tool: D7: 
File removed successfully. STATUS: %d

tool: D25: 
Enter (existing) file name: 

tool: D1: 
Error: file NOT removed. Failed. STATUS: %d

tool: D3: 
Error: file NOT removed. Data error. STATUS: %d

assistant: ```c
int delete_file(char *s) {
  char cfname[15];
  char *fname;
  int status;
  if (s == NULL) {
    cprintf("\n\rEnter (existing) file name: ");
    cfname[0] = 12;
    cgets(cfname);
    fname = cfname + 2;
  } else {
    strcpy(cfname, s);
    fname = cfname;
  }
  status = remove_app(fname, 1);
  if (status == 2) {
    textattr(0x0C);
    cprintf("\n\rError: file NOT removed. Data error. STATUS: %d", status);
    textattr(0x07);
  } else if (status == 1) {
    textattr(0x0C);
    cprintf("\n\rError: file NOT removed. Failed. STATUS: %d", status);
    textattr(0x07);
  } else {
    textattr(0x03);
    cprintf("\n\rFile removed successfully. STATUS: %d", status);
    textattr(0x07);
  }
  return status;
}
```
user: What is the c source code of the assembly code below?

```asm
<Si702x_readHumidity>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    $0xe5,%edi
  call   <Si702x_I2C_write8@plt>
  mov    $0x2710,%edi
  call   <usleep@plt>
  mov    $0xe5,%edi
  call   <Si702x_I2C_read16@plt>
  mov    %eax,-0x8(%rbp)
  mov    $0x2710,%edi
  call   <usleep@plt>
  mov    -0x8(%rbp),%eax
  test   %rax,%rax
  js     L19
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L13
L19:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L13:
  movsd  D25(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  D21(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  D6(%rip),%xmm1
  subsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x4(%rbp)
  movss  -0x4(%rbp),%xmm0
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D25
datatype: f64
name: disassemble_data
arguments: data_tag: D21
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D6
datatype: byte[8]

tool: D25: 125

tool: {"D21": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x40]}

tool: {"D6": [0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x40]}

assistant: ```c
float Si702x_readHumidity(void) {
  float humi;
  unsigned int rawHumi;
  Si702x_I2C_write8(0xE5);
  usleep(10000);
  rawHumi = Si702x_I2C_read16(0xE5);
  usleep(10000);
  humi = (rawHumi * 125.0 / 65536) - 6;
  return humi;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<Si702x_readHumidity>:
  endbr64
  push   %rbx
  mov    $0xe5,%edi
  call   <Si702x_I2C_write8@plt>
  mov    $0x2710,%edi
  call   <usleep@plt>
  mov    $0xe5,%edi
  call   <Si702x_I2C_read16@plt>
  mov    %eax,%ebx
  mov    $0x2710,%edi
  call   <usleep@plt>
  mov    %ebx,%ebx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rbx,%xmm0
  mulsd  D3(%rip),%xmm0
  mulsd  D23(%rip),%xmm0
  subsd  D27(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  pop    %rbx
  ret
```

tool_calls: name: parse_data
arguments: tag: D3
type_guessed: f64
name: parse_data
arguments: tag: D23
type_guessed: byte[8]
name: parse_data
arguments: tag: D27
type_guessed: byte[8]

tool: D3: 125

tool: {"D23": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3e]}

tool: {"D27": [0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x40]}

assistant: ```c
float Si702x_readHumidity(void) {
  float humi;
  unsigned int rawHumi;
  Si702x_I2C_write8(0xE5);
  usleep(10000);
  rawHumi = Si702x_I2C_read16(0xE5);
  usleep(10000);
  humi = (rawHumi * 125.0 / 65536) - 6;
  return humi;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<Si702x_readHumidity>:
  endbr64
  push   %rbx
  mov    $0xe5,%edi
  call   <Si702x_I2C_write8@plt>
  mov    $0x2710,%edi
  call   <usleep@plt>
  mov    $0xe5,%edi
  call   <Si702x_I2C_read16@plt>
  mov    $0x2710,%edi
  mov    %eax,%ebx
  call   <usleep@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rbx,%xmm0
  mulsd  D12(%rip),%xmm0
  pop    %rbx
  mulsd  D0(%rip),%xmm0
  subsd  D4(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  ret
```

tool_calls: name: parse_data
arguments: label: D12
data_type: f64
name: parse_data
arguments: label: D0
data_type: byte[8]
name: parse_data
arguments: label: D4
data_type: byte[8]

tool: D12: 125

tool: {"D0": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3e]}

tool: {"D4": [0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x40]}

assistant: ```c
float Si702x_readHumidity(void) {
  float humi;
  unsigned int rawHumi;
  Si702x_I2C_write8(0xE5);
  usleep(10000);
  rawHumi = Si702x_I2C_read16(0xE5);
  usleep(10000);
  humi = (rawHumi * 125.0 / 65536) - 6;
  return humi;
}
```
user: What is the c source code of the assembly code below?

```asm
<Si702x_readHumidity>:
  endbr64
  push   %rbx
  mov    $0xe5,%edi
  call   <Si702x_I2C_write8@plt>
  mov    $0x2710,%edi
  call   <usleep@plt>
  mov    $0xe5,%edi
  call   <Si702x_I2C_read16@plt>
  mov    $0x2710,%edi
  mov    %eax,%ebx
  call   <usleep@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rbx,%xmm0
  mulsd  D22(%rip),%xmm0
  pop    %rbx
  mulsd  D20(%rip),%xmm0
  subsd  D1(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  ret
```

tool_calls: name: read_data
arguments: tag: D22
data_type: f64
name: read_data
arguments: tag: D20
data_type: byte[8]
name: read_data
arguments: tag: D1
data_type: byte[8]

tool: D22: 125

tool: {"D20": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3e]}

tool: {"D1": [0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x40]}

assistant: ```c
float Si702x_readHumidity(void) {
  float humi;
  unsigned int rawHumi;
  Si702x_I2C_write8(0xE5);
  usleep(10000);
  rawHumi = Si702x_I2C_read16(0xE5);
  usleep(10000);
  humi = (rawHumi * 125.0 / 65536) - 6;
  return humi;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<isNotBlank>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,%eax
  mov    %al,-0x14(%rbp)
  movsbl -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <isblank@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  sete   %al
  movzbl %al,%eax
  leave
  ret
```

assistant: ```c
bool isNotBlank(char ch) {
  bool value = isblank(ch);
  return !value;
}
```
user: Translate the below assembly code into C programming language:

```asm
<isNotBlank>:
  endbr64
  sub    $0x8,%rsp
  movsbl %dil,%edi
  call   <isblank@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  add    $0x8,%rsp
  ret
```

assistant: ```c
bool isNotBlank(char ch) {
  bool value = isblank(ch);
  return !value;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<isNotBlank>:
  endbr64
  sub    $0x8,%rsp
  movsbl %dil,%edi
  call   <isblank@plt>
  test   %eax,%eax
  sete   %al
  add    $0x8,%rsp
  movzbl %al,%eax
  ret
```

assistant: ```c
bool isNotBlank(char ch) {
  bool value = isblank(ch);
  return !value;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<isNotBlank>:
  endbr64
  sub    $0x8,%rsp
  movsbl %dil,%edi
  call   <isblank@plt>
  test   %eax,%eax
  sete   %al
  add    $0x8,%rsp
  movzbl %al,%eax
  ret
```

assistant: ```c
bool isNotBlank(char ch) {
  bool value = isblank(ch);
  return !value;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<sort_name>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x130,%rsp
  mov    %rdi,-0x128(%rbp)
  mov    %esi,-0x12c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x110(%rbp),%rax
  mov    $0x100,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  movl   $0x1,-0x114(%rbp)
  movl   $0x0,-0x11c(%rbp)
  jmp    L18
L32:
  movl   $0x0,-0x114(%rbp)
  mov    -0x12c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x118(%rbp)
  jmp    L6
L8:
  mov    -0x118(%rbp),%eax
  cltq
  shl    $0x8,%rax
  lea    -0x100(%rax),%rdx
  mov    -0x128(%rbp),%rax
  add    %rax,%rdx
  mov    -0x118(%rbp),%eax
  cltq
  shl    $0x8,%rax
  mov    %rax,%rcx
  mov    -0x128(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L12
  mov    -0x118(%rbp),%eax
  cltq
  shl    $0x8,%rax
  mov    %rax,%rdx
  mov    -0x128(%rbp),%rax
  add    %rax,%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x118(%rbp),%eax
  cltq
  shl    $0x8,%rax
  lea    -0x100(%rax),%rdx
  mov    -0x128(%rbp),%rax
  add    %rax,%rdx
  mov    -0x118(%rbp),%eax
  cltq
  shl    $0x8,%rax
  mov    %rax,%rcx
  mov    -0x128(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x118(%rbp),%eax
  cltq
  shl    $0x8,%rax
  lea    -0x100(%rax),%rdx
  mov    -0x128(%rbp),%rax
  add    %rax,%rdx
  lea    -0x110(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcpy@plt>
  movl   $0x1,-0x114(%rbp)
L12:
  subl   $0x1,-0x118(%rbp)
L6:
  mov    -0x118(%rbp),%eax
  cmp    -0x11c(%rbp),%eax
  jg     L8
  addl   $0x1,-0x11c(%rbp)
L18:
  mov    -0x11c(%rbp),%eax
  cmp    -0x12c(%rbp),%eax
  jge    L2
  cmpl   $0x0,-0x114(%rbp)
  jne    L32
L2:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

assistant: ```c
void sort_name(char name[256][256], int len) {
  char str[256];
  int i, j;
  int flag;
  memset(str, '\0', 256 * sizeof(char));
  flag = 1;
  for (i = 0; i < len && flag; ++i) {
    flag = 0;
    for (j = len - 1; j > i; --j) {
      if (0 < strcmp(name[j], name[j - 1])) {
        strcpy(str, name[j]);
        strcpy(name[j], name[j - 1]);
        strcpy(name[j - 1], str);
        flag = 1;
      }
    }
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<sort_name>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x138,%rsp
  mov    %rdi,%rbx
  mov    %esi,%r15d
  mov    %esi,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rdi
  mov    $0x100,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  test   %r15d,%r15d
  jle    L89
  mov    %r15d,%ecx
  lea    -0x1(%r15),%eax
  mov    %eax,0x4(%rsp)
  cltq
  shl    $0x8,%rax
  add    %rbx,%rax
  mov    %rax,0x8(%rsp)
  movslq %r15d,%rax
  shl    $0x8,%rax
  mov    $0x0,%r15d
  lea    -0x200(%rbx,%rax,1),%rax
  mov    %rax,0x10(%rsp)
  lea    -0x2(%rcx),%eax
  mov    %eax,0x1c(%rsp)
  lea    0x20(%rsp),%r13
  jmp    L15
L20:
  sub    $0x100,%rbx
  cmp    %r12,%rbx
  je     L10
L72:
  lea    -0x100(%rbx),%rbp
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L20
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <strcpy@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x1,%r14d
  jmp    L20
L10:
  add    $0x1,%r15d
  cmp    %r15d,0x18(%rsp)
  jle    L89
  test   %r14d,%r14d
  je     L89
L15:
  cmp    0x4(%rsp),%r15d
  je     L89
  mov    0x1c(%rsp),%eax
  sub    %r15d,%eax
  shl    $0x8,%rax
  mov    0x10(%rsp),%r12
  sub    %rax,%r12
  mov    0x8(%rsp),%rbx
  mov    $0x0,%r14d
  jmp    L72
L89:
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L91
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L91:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void sort_name(char name[256][256], int len) {
  char str[256];
  int i, j;
  int flag;
  memset(str, '\0', 256 * sizeof(char));
  flag = 1;
  for (i = 0; i < len && flag; ++i) {
    flag = 0;
    for (j = len - 1; j > i; --j) {
      if (0 < strcmp(name[j], name[j - 1])) {
        strcpy(str, name[j]);
        strcpy(name[j], name[j - 1]);
        strcpy(name[j - 1], str);
        flag = 1;
      }
    }
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<sort_name>:
  endbr64
  push   %r15
  mov    $0x100,%edx
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x138,%rsp
  mov    %esi,0x18(%rsp)
  lea    0x20(%rsp),%rbp
  xor    %esi,%esi
  mov    %rbp,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  test   %r14d,%r14d
  jle    L54
  lea    -0x1(%r14),%eax
  xor    %r13d,%r13d
  mov    %eax,0x4(%rsp)
  cltq
  shl    $0x8,%rax
  add    %rbx,%rax
  mov    %rax,0x8(%rsp)
  movslq %r14d,%rax
  shl    $0x8,%rax
  lea    -0x200(%rbx,%rax,1),%rax
  mov    %rax,0x10(%rsp)
  lea    -0x2(%r14),%eax
  mov    %eax,0x1c(%rsp)
  nopl   0x0(%rax)
L49:
  cmp    %r13d,0x4(%rsp)
  je     L54
  mov    0x1c(%rsp),%eax
  mov    0x10(%rsp),%rbx
  xor    %r12d,%r12d
  mov    0x8(%rsp),%r15
  sub    %r13d,%eax
  shl    $0x8,%rax
  sub    %rax,%rbx
  xchg   %ax,%ax
L48:
  mov    %r15,%r14
  sub    $0x100,%r15
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L66
  mov    %r14,%rsi
  mov    %rbp,%rdi
  mov    $0x1,%r12d
  call   <strcpy@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <strcpy@plt>
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <strcpy@plt>
L66:
  cmp    %rbx,%r15
  jne    L48
  add    $0x1,%r13d
  cmp    %r13d,0x18(%rsp)
  jle    L54
  test   %r12d,%r12d
  jne    L49
  cs nopw 0x0(%rax,%rax,1)
L54:
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L5:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void sort_name(char name[256][256], int len) {
  char str[256];
  int i, j;
  int flag;
  memset(str, '\0', 256 * sizeof(char));
  flag = 1;
  for (i = 0; i < len && flag; ++i) {
    flag = 0;
    for (j = len - 1; j > i; --j) {
      if (0 < strcmp(name[j], name[j - 1])) {
        strcpy(str, name[j]);
        strcpy(name[j], name[j - 1]);
        strcpy(name[j - 1], str);
        flag = 1;
      }
    }
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<sort_name>:
  endbr64
  push   %r15
  mov    $0x100,%edx
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x138,%rsp
  mov    %esi,0x18(%rsp)
  lea    0x20(%rsp),%rbp
  xor    %esi,%esi
  mov    %rbp,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  test   %r14d,%r14d
  jle    L6
  lea    -0x1(%r14),%eax
  xor    %r13d,%r13d
  mov    %eax,0x4(%rsp)
  cltq
  shl    $0x8,%rax
  add    %rbx,%rax
  mov    %rax,0x8(%rsp)
  movslq %r14d,%rax
  shl    $0x8,%rax
  lea    -0x200(%rbx,%rax,1),%rax
  mov    %rax,0x10(%rsp)
  lea    -0x2(%r14),%eax
  mov    %eax,0x1c(%rsp)
  nopl   0x0(%rax)
L58:
  cmp    %r13d,0x4(%rsp)
  je     L6
  mov    0x1c(%rsp),%eax
  mov    0x10(%rsp),%rbx
  xor    %r12d,%r12d
  mov    0x8(%rsp),%r15
  sub    %r13d,%eax
  shl    $0x8,%rax
  sub    %rax,%rbx
  xchg   %ax,%ax
L11:
  mov    %r15,%r14
  sub    $0x100,%r15
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L30
  mov    %r14,%rsi
  mov    %rbp,%rdi
  mov    $0x1,%r12d
  call   <strcpy@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <strcpy@plt>
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <strcpy@plt>
L30:
  cmp    %rbx,%r15
  jne    L11
  add    $0x1,%r13d
  cmp    %r13d,0x18(%rsp)
  jle    L6
  test   %r12d,%r12d
  jne    L58
  cs nopw 0x0(%rax,%rax,1)
L6:
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L62
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L62:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void sort_name(char name[256][256], int len) {
  char str[256];
  int i, j;
  int flag;
  memset(str, '\0', 256 * sizeof(char));
  flag = 1;
  for (i = 0; i < len && flag; ++i) {
    flag = 0;
    for (j = len - 1; j > i; --j) {
      if (0 < strcmp(name[j], name[j - 1])) {
        strcpy(str, name[j]);
        strcpy(name[j], name[j - 1]);
        strcpy(name[j - 1], str);
        flag = 1;
      }
    }
  }
}
```