ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<generate>:
  endbr64
  cmp    $0x5,%rdi
  seta   %r11b
  cmp    $0x3,%rdi
  jbe    L24
  push   %rbx
  xor    %r10d,%r10d
  xor    %r9d,%r9d
  mov    $0x5,%edx
  mov    $0x3,%eax
  xor    %r8d,%r8d
  mov    $0x1,%ebx
  jmp    L23
  nopl   0x0(%rax)
L34:
  lea    0x3(%rax),%rcx
  mov    %rdx,%rsi
L49:
  cmp    %rcx,%rdi
  mov    %rax,%r9
  mov    %rsi,%rax
  mov    %rdx,%r10
  seta   %bl
  cmp    %rsi,%rdi
  seta   %r11b
  cmp    %rsi,%rcx
  cmovbe %rcx,%rax
  cmp    %rax,%rdi
  jbe    L53
  mov    %rsi,%rdx
  mov    %rcx,%rax
L23:
  cmp    %rdx,%rax
  setne  %cl
  cmp    %r9,%rax
  setne  %sil
  test   %cl,%sil
  je     L66
  lea    (%r8,%rax,1),%rsi
  test   %bl,%bl
  cmovne %rsi,%r8
L66:
  cmp    %r10,%rdx
  setne  %sil
  test   %cl,%sil
  je     L64
  lea    (%r8,%rdx,1),%rcx
  test   %r11b,%r11b
  cmovne %rcx,%r8
L64:
  cmp    %rdx,%rax
  jb     L34
  lea    0x3(%rax),%rcx
  lea    0x5(%rdx),%rsi
  cmova  %rax,%rcx
  jmp    L49
  nopl   (%rax)
L53:
  mov    %r8,%rax
  pop    %rbx
  ret
  nopl   (%rax)
L24:
  xor    %eax,%eax
  ret
```

assistant: ```c
unsigned long long generate(unsigned long long max) {
  unsigned long long sum = 0;
  unsigned long long three = 3;
  unsigned long long five = 5;
  unsigned long long prev_three = 0;
  unsigned long long prev_five = 0;
  while (three < max || five < max) {
    if (three < max && three != five && three != prev_three) {
      sum += three;
    }
    if (five < max && three != five && five != prev_five) {
      sum += five;
    }
    prev_three = three;
    prev_five = five;
    if (three < five) {
      three += 3;
    } else if (five < three) {
      five += 5;
    } else {
      three += 3;
      five += 5;
    }
  }
  return sum;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<reverse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L16
L10:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  mov    %dl,(%rax)
  subl   $0x1,-0x8(%rbp)
  addl   $0x1,-0xc(%rbp)
L16:
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L10
  nop
  nop
  leave
  ret
```

assistant: ```c
void reverse(char s[]) {
  int i, j;
  i = 0;
  j = strlen(s) - 1;
  while (i < j) {
    int temp = s[j];
    s[j] = s[i];
    s[i] = temp;
    j--;
    i++;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<reverse>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  sub    $0x1,%eax
  test   %eax,%eax
  jle    L1
  cltq
  mov    $0x0,%edx
L0:
  movzbl (%rbx,%rax,1),%ecx
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,(%rbx,%rax,1)
  mov    %cl,(%rbx,%rdx,1)
  add    $0x1,%rdx
  sub    $0x1,%rax
  cmp    %edx,%eax
  jg     L0
L1:
  pop    %rbx
  ret
```

assistant: ```c
void reverse(char s[]) {
  int i, j;
  i = 0;
  j = strlen(s) - 1;
  while (i < j) {
    int temp = s[j];
    s[j] = s[i];
    s[i] = temp;
    j--;
    i++;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<reverse>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  sub    $0x1,%eax
  test   %eax,%eax
  jle    L7
  cltq
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L4:
  movzbl (%rbx,%rax,1),%ecx
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,(%rbx,%rax,1)
  sub    $0x1,%rax
  mov    %cl,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %edx,%eax
  jg     L4
L7:
  pop    %rbx
  ret
```

assistant: ```c
void reverse(char s[]) {
  int i, j;
  i = 0;
  j = strlen(s) - 1;
  while (i < j) {
    int temp = s[j];
    s[j] = s[i];
    s[i] = temp;
    j--;
    i++;
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<reverse>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  sub    $0x1,%eax
  test   %eax,%eax
  jle    L7
  cltq
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L5:
  movzbl (%rbx,%rax,1),%ecx
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,(%rbx,%rax,1)
  sub    $0x1,%rax
  mov    %cl,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %eax,%edx
  jl     L5
L7:
  pop    %rbx
  ret
```

assistant: ```c
void reverse(char s[]) {
  int i, j;
  i = 0;
  j = strlen(s) - 1;
  while (i < j) {
    int temp = s[j];
    s[j] = s[i];
    s[i] = temp;
    j--;
    i++;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<msn_urlencode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbp
  call   <strlen@plt>
  lea    0x1(%rax,%rax,2),%edi
  mov    $0x1,%esi
  call   <calloc@plt>
  mov    %rax,%rdx
  mov    %rax,0x8(%rsp)
  lea    D6(%rip),%rax
  test   %rdx,%rdx
  je     L21
  mov    $0x0,%r12d
  mov    $0x0,%r13d
  cmpb   $0x0,0x0(%rbp)
  jne    L54
L37:
  movslq %r12d,%r12
  mov    0x8(%rsp),%rbx
  movb   $0x0,(%rbx,%r12,1)
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%esi
  mov    %rbx,%rdi
  call   <realloc@plt>
L21:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L62:
  movzbl 0x0(%rbp,%rbx,1),%eax
  mov    %al,(%r15,%rbx,1)
  add    $0x1,%rbx
L26:
  lea    (%r14,%rbx,1),%r12d
  mov    %ebx,%r13d
  movsbl 0x0(%rbp,%rbx,1),%edi
  call   <isalnum@plt>
  test   %rax,%rax
  jne    L62
  movzbl 0x0(%rbp,%rbx,1),%ecx
  cmp    $0x5f,%cl
  je     L62
  cmp    $0x2d,%cl
  je     L62
  test   %cl,%cl
  je     L37
  movsbl %cl,%ecx
  movslq %r12d,%rdi
  add    0x8(%rsp),%rdi
  lea    D9(%rip),%rdx
  mov    $0x4,%esi
  call   <snprintf@plt>
  add    $0x3,%r12d
  add    $0x1,%r13d
  movslq %r13d,%rax
  cmpb   $0x0,0x0(%rbp,%rax,1)
  je     L37
L54:
  movslq %r13d,%rax
  mov    %rax,%rbx
  mov    %r12d,%r14d
  sub    %r13d,%r14d
  movslq %r12d,%r12
  add    0x8(%rsp),%r12
  mov    %r12,%r15
  sub    %rax,%r15
  jmp    L26
```

tool_calls: name: read_data
arguments: tag: D6
type_guessed: string
name: read_data
arguments: tag: D9
type_guessed: string

tool: 

tool: D9: %%%.2x

assistant: ```c
char *msn_urlencode(const char *in) {
  int ipos = 0, bpos = 0;
  char *str = NULL;
  int len = strlen(in);
  if (!(str = ((char *)calloc(3 * len + 1, sizeof(char)))))
    return "";
  while (in[ipos]) {
    while (isalnum(in[ipos]) || in[ipos] == '-' || in[ipos] == '_')
      str[bpos++] = in[ipos++];
    if (!in[ipos])
      break;
    snprintf(&str[bpos], 4, "%%%.2x", in[ipos]);
    bpos += 3;
    ipos++;
  }
  str[bpos] = '\0';
  len = strlen(str);
  str = ((char *)realloc(str, sizeof(char) * len + 1));
  return (str);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<msn_urlencode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  call   <strlen@plt>
  mov    $0x1,%esi
  lea    0x1(%rax,%rax,2),%edi
  call   <calloc@plt>
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L55
  movsbl (%rbx),%edi
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %edx,%edx
  test   %dil,%dil
  je     L74
  nopl   0x0(%rax)
L14:
  mov    %ebp,%r13d
  movslq %ebp,%rbp
  add    0x8(%rsp),%rbp
  mov    %rdx,%r15
  mov    %rbp,%r14
  sub    %r12d,%r13d
  sub    %rdx,%r14
  jmp    L80
  nopl   0x0(%rax)
L30:
  movsbl (%rbx,%r15,1),%ecx
  cmp    $0x5f,%cl
  je     L75
  cmp    $0x2d,%cl
  jne    L97
L75:
  mov    %cl,(%r14,%r15,1)
  movsbl 0x1(%rbx,%r15,1),%edi
  add    $0x1,%r15
L80:
  lea    0x0(%r13,%r15,1),%ebp
  mov    %r15d,%r12d
  call   <isalnum@plt>
  test   %rax,%rax
  je     L30
  movzbl (%rbx,%r15,1),%ecx
  jmp    L75
  cs nopw 0x0(%rax,%rax,1)
L97:
  movslq %ebp,%rdi
  add    0x8(%rsp),%rdi
  test   %cl,%cl
  je     L8
  lea    D13(%rip),%rdx
  mov    $0x4,%esi
  add    $0x1,%r12d
  add    $0x3,%ebp
  call   <snprintf@plt>
  movslq %r12d,%rdx
  movsbl (%rbx,%rdx,1),%edi
  test   %dil,%dil
  jne    L14
  mov    0x8(%rsp),%rax
  movslq %ebp,%rbp
  lea    (%rax,%rbp,1),%rdi
L8:
  mov    0x8(%rsp),%rbx
  movb   $0x0,(%rdi)
  mov    %rbx,%rdi
  call   <strlen@plt>
  add    $0x18,%rsp
  mov    %rbx,%rdi
  lea    0x1(%rax),%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <realloc@plt>
L55:
  add    $0x18,%rsp
  lea    D7(%rip),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L74:
  mov    %rax,%rdi
  jmp    L8
```

tool_calls: name: parse_data
arguments: data_tag: D13
type_guessed: string
name: parse_data
arguments: data_tag: D7
type_guessed: string

tool: D13: %%%.2x

tool: 

assistant: ```c
char *msn_urlencode(const char *in) {
  int ipos = 0, bpos = 0;
  char *str = NULL;
  int len = strlen(in);
  if (!(str = ((char *)calloc(3 * len + 1, sizeof(char)))))
    return "";
  while (in[ipos]) {
    while (isalnum(in[ipos]) || in[ipos] == '-' || in[ipos] == '_')
      str[bpos++] = in[ipos++];
    if (!in[ipos])
      break;
    snprintf(&str[bpos], 4, "%%%.2x", in[ipos]);
    bpos += 3;
    ipos++;
  }
  str[bpos] = '\0';
  len = strlen(str);
  str = ((char *)realloc(str, sizeof(char) * len + 1));
  return (str);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<msn_urlencode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  call   <strlen@plt>
  mov    $0x1,%esi
  lea    0x1(%rax,%rax,2),%edi
  call   <calloc@plt>
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L5
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %edx,%edx
  cmpb   $0x0,(%rbx)
  mov    %rax,%rdi
  je     L19
  nopl   0x0(%rax)
L36:
  mov    %ebp,%r13d
  movslq %ebp,%rbp
  add    0x8(%rsp),%rbp
  mov    %rdx,%r15
  mov    %rbp,%r14
  sub    %r12d,%r13d
  sub    %rdx,%r14
  jmp    L62
  nopl   0x0(%rax)
L0:
  movsbl (%rbx,%r15,1),%ecx
  cmp    $0x5f,%cl
  je     L71
  cmp    $0x2d,%cl
  jne    L82
L71:
  mov    %cl,(%r14,%r15,1)
  add    $0x1,%r15
L62:
  movsbl (%rbx,%r15,1),%edi
  lea    0x0(%r13,%r15,1),%ebp
  mov    %r15d,%r12d
  call   <isalnum@plt>
  test   %rax,%rax
  je     L0
  movzbl (%rbx,%r15,1),%ecx
  jmp    L71
  nopl   (%rax)
L82:
  movslq %ebp,%rdi
  add    0x8(%rsp),%rdi
  test   %cl,%cl
  je     L19
  lea    D13(%rip),%rdx
  add    $0x1,%r12d
  mov    $0x4,%esi
  add    $0x3,%ebp
  call   <snprintf@plt>
  movslq %r12d,%rdx
  cmpb   $0x0,(%rbx,%rdx,1)
  jne    L36
  mov    0x8(%rsp),%rax
  movslq %ebp,%rbp
  lea    (%rax,%rbp,1),%rdi
L19:
  mov    0x8(%rsp),%rbx
  movb   $0x0,(%rdi)
  mov    %rbx,%rdi
  call   <strlen@plt>
  add    $0x18,%rsp
  mov    %rbx,%rdi
  lea    0x1(%rax),%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <realloc@plt>
L5:
  add    $0x18,%rsp
  lea    D6(%rip),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D13
type_infered: string
name: disassemble_data
arguments: data_tag: D6
type_infered: string

tool: D13: %%%.2x

tool: 

assistant: ```c
char *msn_urlencode(const char *in) {
  int ipos = 0, bpos = 0;
  char *str = NULL;
  int len = strlen(in);
  if (!(str = ((char *)calloc(3 * len + 1, sizeof(char)))))
    return "";
  while (in[ipos]) {
    while (isalnum(in[ipos]) || in[ipos] == '-' || in[ipos] == '_')
      str[bpos++] = in[ipos++];
    if (!in[ipos])
      break;
    snprintf(&str[bpos], 4, "%%%.2x", in[ipos]);
    bpos += 3;
    ipos++;
  }
  str[bpos] = '\0';
  len = strlen(str);
  str = ((char *)realloc(str, sizeof(char) * len + 1));
  return (str);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<connector_global_cleanup>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  lea    D16(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L17
  mov    $0x0,%eax
  call   <connector_webdav_global_cleanup@plt>
  jmp    L18
L17:
  mov    -0x8(%rbp),%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L18
  mov    $0x0,%eax
  call   <connector_ftp_global_cleanup@plt>
L18:
  nop
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D16
data_type: string
name: retrieve_data
arguments: data_tag: D5
data_type: string

tool: D16: webdav

tool: D5: ftp

assistant: ```c
void connector_global_cleanup(const unsigned char *type) {
  if (strcmp(type, "webdav") == 0)
    connector_webdav_global_cleanup();
  else if (strcmp(type, "ftp") == 0)
    connector_ftp_global_cleanup();
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<connector_global_cleanup>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  lea    D15(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L24
  call   <connector_webdav_global_cleanup@plt>
L4:
  pop    %rbx
  ret
L24:
  lea    D10(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L4
  call   <connector_ftp_global_cleanup@plt>
  jmp    L4
```

tool_calls: name: retrieve_data
arguments: tag: D15
data_type: string
name: retrieve_data
arguments: tag: D10
data_type: string

tool: D15: webdav

tool: D10: ftp

assistant: ```c
void connector_global_cleanup(const unsigned char *type) {
  if (strcmp(type, "webdav") == 0)
    connector_webdav_global_cleanup();
  else if (strcmp(type, "ftp") == 0)
    connector_ftp_global_cleanup();
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<connector_global_cleanup>:
  endbr64
  push   %rbp
  lea    D0(%rip),%rsi
  mov    %rdi,%rbp
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L9
  pop    %rbp
  jmp    1070 <connector_webdav_global_cleanup@plt>
  nop
L9:
  lea    D16(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L2
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L2:
  pop    %rbp
  jmp    1080 <connector_ftp_global_cleanup@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D0
datatype: string
name: retrieve_data
arguments: data_label: D16
datatype: string

tool: D0: webdav

tool: D16: ftp

assistant: ```c
void connector_global_cleanup(const unsigned char *type) {
  if (strcmp(type, "webdav") == 0)
    connector_webdav_global_cleanup();
  else if (strcmp(type, "ftp") == 0)
    connector_ftp_global_cleanup();
}
```
user: What is the c source code of the assembly code below:

```asm
<connector_global_cleanup>:
  endbr64
  push   %rbp
  lea    D13(%rip),%rsi
  mov    %rdi,%rbp
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L1
  pop    %rbp
  jmp    1070 <connector_webdav_global_cleanup@plt>
  nop
L1:
  lea    D12(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L16
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L16:
  pop    %rbp
  jmp    1080 <connector_ftp_global_cleanup@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D13
type_infered: string
name: disassemble_data
arguments: tag: D12
type_infered: string

tool: D13: webdav

tool: D12: ftp

assistant: ```c
void connector_global_cleanup(const unsigned char *type) {
  if (strcmp(type, "webdav") == 0)
    connector_webdav_global_cleanup();
  else if (strcmp(type, "ftp") == 0)
    connector_ftp_global_cleanup();
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<delay>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    $0x0,%eax
  call   <millis@plt>
  mov    -0x18(%rbp),%rdx
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  nop
L4:
  mov    $0x0,%eax
  call   <millis@plt>
  cmp    %rax,-0x8(%rbp)
  jg     L4
  nop
  nop
  leave
  ret
```

assistant: ```c
void delay(long ms) {
  long t = millis() + ms;
  while (millis() < t) {
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<delay>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x0,%eax
  call   <millis@plt>
  add    %rax,%rbx
L0:
  mov    $0x0,%eax
  call   <millis@plt>
  cmp    %rbx,%rax
  jl     L0
  pop    %rbx
  ret
```

assistant: ```c
void delay(long ms) {
  long t = millis() + ms;
  while (millis() < t) {
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<delay>:
  endbr64
  push   %rbx
  xor    %eax,%eax
  mov    %rdi,%rbx
  call   <millis@plt>
  add    %rax,%rbx
  nopw   0x0(%rax,%rax,1)
L1:
  xor    %eax,%eax
  call   <millis@plt>
  cmp    %rbx,%rax
  jl     L1
  pop    %rbx
  ret
```

assistant: ```c
void delay(long ms) {
  long t = millis() + ms;
  while (millis() < t) {
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<delay>:
  endbr64
  push   %rbx
  xor    %eax,%eax
  mov    %rdi,%rbx
  call   <millis@plt>
  add    %rax,%rbx
  nopw   0x0(%rax,%rax,1)
L3:
  xor    %eax,%eax
  call   <millis@plt>
  cmp    %rbx,%rax
  jl     L3
  pop    %rbx
  ret
```

assistant: ```c
void delay(long ms) {
  long t = millis() + ms;
  while (millis() < t) {
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<rdp_sec_hash_48>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,%r13
  mov    %rsi,(%rsp)
  mov    %rdx,0x8(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %r8d,0x1c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  call   <ssl_sha1_info_create@plt>
  mov    %rax,%rbx
  mov    $0x0,%eax
  call   <ssl_md5_info_create@plt>
  mov    %rax,%rbp
  mov    $0x0,%r12d
  lea    0x2c(%rsp),%r15
L6:
  mov    0x1c(%rsp),%eax
  lea    (%rax,%r12,1),%esi
  mov    $0x4,%edx
  mov    %r15,%rdi
  call   <g_memset@plt>
  mov    %rbx,%rdi
  call   <ssl_sha1_clear@plt>
  add    $0x1,%r12d
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <ssl_sha1_transform@plt>
  mov    $0x30,%edx
  mov    (%rsp),%rsi
  mov    %rbx,%rdi
  call   <ssl_sha1_transform@plt>
  mov    $0x20,%edx
  mov    0x8(%rsp),%rsi
  mov    %rbx,%rdi
  call   <ssl_sha1_transform@plt>
  mov    $0x20,%edx
  mov    0x10(%rsp),%rsi
  mov    %rbx,%rdi
  call   <ssl_sha1_transform@plt>
  lea    0x40(%rsp),%r14
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <ssl_sha1_complete@plt>
  mov    %rbp,%rdi
  call   <ssl_md5_clear@plt>
  mov    $0x30,%edx
  mov    (%rsp),%rsi
  mov    %rbp,%rdi
  call   <ssl_md5_transform@plt>
  mov    $0x14,%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <ssl_md5_transform@plt>
  lea    0x30(%rsp),%r14
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <ssl_md5_complete@plt>
  mov    $0x10,%edx
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <g_memcpy@plt>
  add    $0x10,%r13
  cmp    $0x3,%r12d
  jne    L6
  mov    %rbx,%rdi
  call   <ssl_sha1_info_delete@plt>
  mov    %rbp,%rdi
  call   <ssl_md5_info_delete@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L16
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L16:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void rdp_sec_hash_48(char *out, char *in, char *salt1, char *salt2, int salt) {
  int i;
  void *sha1_info;
  void *md5_info;
  char pad[4];
  char sha1_sig[20];
  char md5_sig[16];
  sha1_info = ssl_sha1_info_create();
  md5_info = ssl_md5_info_create();
  for (i = 0; i < 3; i++) {
    g_memset(pad, salt + i, 4);
    ssl_sha1_clear(sha1_info);
    ssl_sha1_transform(sha1_info, pad, i + 1);
    ssl_sha1_transform(sha1_info, in, 48);
    ssl_sha1_transform(sha1_info, salt1, 32);
    ssl_sha1_transform(sha1_info, salt2, 32);
    ssl_sha1_complete(sha1_info, sha1_sig);
    ssl_md5_clear(md5_info);
    ssl_md5_transform(md5_info, in, 48);
    ssl_md5_transform(md5_info, sha1_sig, 20);
    ssl_md5_complete(md5_info, md5_sig);
    g_memcpy(out + i * 16, md5_sig, 16);
  }
  ssl_sha1_info_delete(sha1_info);
  ssl_md5_info_delete(md5_info);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<rdp_sec_hash_48>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x78,%rsp
  mov    %rsi,0x8(%rsp)
  lea    0x3c(%rsp),%r15
  lea    0x50(%rsp),%r14
  mov    %rdx,0x18(%rsp)
  mov    %rcx,0x20(%rsp)
  mov    %r8d,0x2c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  call   <ssl_sha1_info_create@plt>
  mov    %rax,%rbp
  xor    %eax,%eax
  call   <ssl_md5_info_create@plt>
  mov    %rax,%r12
  lea    0x40(%rsp),%rax
  mov    %rax,0x10(%rsp)
L13:
  mov    0x2c(%rsp),%eax
  mov    $0x4,%edx
  mov    %r15,%rdi
  lea    (%rax,%r13,1),%esi
  add    $0x1,%r13d
  call   <g_memset@plt>
  mov    %rbp,%rdi
  call   <ssl_sha1_clear@plt>
  mov    %r13d,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <ssl_sha1_transform@plt>
  mov    0x8(%rsp),%rsi
  mov    $0x30,%edx
  mov    %rbp,%rdi
  call   <ssl_sha1_transform@plt>
  mov    0x18(%rsp),%rsi
  mov    $0x20,%edx
  mov    %rbp,%rdi
  call   <ssl_sha1_transform@plt>
  mov    0x20(%rsp),%rsi
  mov    $0x20,%edx
  mov    %rbp,%rdi
  call   <ssl_sha1_transform@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <ssl_sha1_complete@plt>
  mov    %r12,%rdi
  call   <ssl_md5_clear@plt>
  mov    0x8(%rsp),%rsi
  mov    $0x30,%edx
  mov    %r12,%rdi
  call   <ssl_md5_transform@plt>
  mov    $0x14,%edx
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <ssl_md5_transform@plt>
  mov    0x10(%rsp),%rsi
  mov    %r12,%rdi
  call   <ssl_md5_complete@plt>
  mov    0x10(%rsp),%rsi
  mov    %rbx,%rdi
  mov    $0x10,%edx
  add    $0x10,%rbx
  call   <g_memcpy@plt>
  cmp    $0x3,%r13d
  jne    L13
  mov    %rbp,%rdi
  call   <ssl_sha1_info_delete@plt>
  mov    %r12,%rdi
  call   <ssl_md5_info_delete@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L16
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L16:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void rdp_sec_hash_48(char *out, char *in, char *salt1, char *salt2, int salt) {
  int i;
  void *sha1_info;
  void *md5_info;
  char pad[4];
  char sha1_sig[20];
  char md5_sig[16];
  sha1_info = ssl_sha1_info_create();
  md5_info = ssl_md5_info_create();
  for (i = 0; i < 3; i++) {
    g_memset(pad, salt + i, 4);
    ssl_sha1_clear(sha1_info);
    ssl_sha1_transform(sha1_info, pad, i + 1);
    ssl_sha1_transform(sha1_info, in, 48);
    ssl_sha1_transform(sha1_info, salt1, 32);
    ssl_sha1_transform(sha1_info, salt2, 32);
    ssl_sha1_complete(sha1_info, sha1_sig);
    ssl_md5_clear(md5_info);
    ssl_md5_transform(md5_info, in, 48);
    ssl_md5_transform(md5_info, sha1_sig, 20);
    ssl_md5_complete(md5_info, md5_sig);
    g_memcpy(out + i * 16, md5_sig, 16);
  }
  ssl_sha1_info_delete(sha1_info);
  ssl_md5_info_delete(md5_info);
}
```