ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<parse_param>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  mov    %r8,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0x8,%rsp
  test   %rdi,%rdi
  je     L40
  test   %rdx,%rdx
  je     L40
  test   %rcx,%rcx
  setne  %al
  test   %r8,%r8
  setne  %dl
  xor    %edi,%edi
  and    %edx,%eax
  test   %r9,%r9
  setne  %dil
  and    %eax,%edi
L125:
  call   <assert@plt>
  movb   $0x0,(%r14)
  movb   $0x0,(%r12)
  test   %r13,%r13
  je     L53
  xor    %esi,%esi
  cmpb   $0x2f,0x0(%rbp)
  sete   %dl
  sete   %sil
  movzbl %dl,%edx
  cmp    %rdx,%r13
  jbe    L62
  xor    %edi,%edi
  xor    %ecx,%ecx
  test   %r15,%r15
  jne    L127
  jmp    L76
  cs nopw 0x0(%rax,%rax,1)
L73:
  test   %al,%al
  je     L48
  lea    0x1(%rsi),%edx
  add    $0x1,%edi
  mov    %al,(%r12,%rcx,1)
  mov    %rdx,%rsi
  mov    %edi,%ecx
  cmp    %r13,%rdx
  jae    L27
  cmp    %rcx,%r15
  jbe    L76
L127:
  movzbl 0x0(%rbp,%rdx,1),%eax
  cmp    $0x2f,%al
  jne    L73
L48:
  mov    %edi,%ecx
L27:
  cmp    %rcx,%r15
  jbe    L76
  xor    %eax,%eax
  movb   $0x0,(%r12,%rcx,1)
  cmpb   $0x2f,0x0(%rbp,%rdx,1)
  sete   %al
  add    %esi,%eax
  mov    %eax,%eax
  cmp    %r13,%rax
  jb     L134
L53:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L40:
  xor    %edi,%edi
  jmp    L125
  nopw   0x0(%rax,%rax,1)
L76:
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L134:
  lea    0x0(%rbp,%rax,1),%rsi
  mov    %rbx,%rdx
  mov    %r14,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x1(%r14,%rbx,1)
  jmp    L53
L62:
  xor    %ecx,%ecx
  mov    $0x1,%edx
  jmp    L27
```

assistant: ```c
int parse_param(const char *s, size_t slen, char *cmd, size_t clen, char *opt, size_t optlen) {
  const char DLM = '/';
  unsigned i, j;
  assert(s && cmd && (clen > (size_t)0) && opt && (optlen > (size_t)0));
  *cmd = *opt = '\0';
  if ((size_t)0 == slen)
    return 0;
  i = (DLM == s[0]) ? 1 : 0;
  for (j = 0; (i < slen) && (j < clen) && s[i] && (s[i] != DLM);) {
    cmd[j++] = s[i++];
  }
  if (j >= clen)
    return 1;
  cmd[j] = '\0';
  if (DLM == s[i])
    ++i;
  if (i < slen) {
    (void)strncpy(opt, s + i, optlen);
    opt[optlen - 1] = '\0';
  }
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<u_lock>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %esi,-0x5c(%rbp)
  mov    %edx,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    D25(%rip),%rax
  mov    (%rax),%edx
  mov    D9(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    -0x58(%rbp),%rax
  mov    $0x1b6,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <open@plt>
  mov    %eax,-0x48(%rbp)
  cmpl   $0x0,-0x48(%rbp)
  jns    L92
  mov    -0x48(%rbp),%eax
  jmp    L101
L92:
  mov    D48(%rip),%rax
  mov    (%rax),%rdx
  mov    D40(%rip),%rax
  mov    (%rax),%ecx
  mov    -0x48(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <fcntl@plt>
L143:
  movq   $0x0,-0x40(%rbp)
  movq   $0x0,-0x38(%rbp)
  cmpl   $0x0,-0x5c(%rbp)
  je     L90
  mov    D59(%rip),%rax
  mov    (%rax),%eax
  jmp    L94
L90:
  mov    D74(%rip),%rax
  mov    (%rax),%eax
L94:
  mov    %eax,-0x38(%rbp)
  mov    D55(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x3c(%rbp)
  movl   $0x1,-0x40(%rbp)
  cmpl   $0x0,-0x60(%rbp)
  je     L60
  mov    D60(%rip),%rax
  mov    (%rax),%eax
  jmp    L108
L60:
  mov    D84(%rip),%rax
  mov    (%rax),%eax
L108:
  lea    -0x40(%rbp),%rdx
  mov    -0x48(%rbp),%ecx
  mov    %eax,%esi
  mov    %ecx,%edi
  call   <fcntl@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x44(%rbp)
  cmpl   $0x0,-0x44(%rbp)
  je     L47
  lea    -0x30(%rbp),%rdx
  mov    -0x48(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fstat@plt>
  test   %rax,%rax
  jne    L57
  lea    -0x20(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <stat@plt>
  test   %rax,%rax
  jne    L57
  mov    -0x30(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  cmp    %rax,%rdx
  jne    L8
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  cmp    %rax,%rdx
  jne    L8
  mov    $0x1,%eax
  jmp    L42
L8:
  mov    $0x0,%eax
L42:
  mov    %eax,-0x44(%rbp)
  cmpl   $0x0,-0x44(%rbp)
  je     L85
  mov    -0x48(%rbp),%eax
  jmp    L101
L85:
  mov    -0x48(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  jmp    L143
L47:
  nop
L57:
  mov    -0x48(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    $0xffffffff,%eax
L101:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L71
  call   <__stack_chk_fail@plt>
L71:
  leave
  ret
```

assistant: ```c
int u_lock(const char *path, int excl, int dowait) {
  int h;
  h = open(path, O_RDWR | O_CREAT, 0666);
  if (!((h) >= 0))
    return h;
  fcntl(h, F_SETFD, FD_CLOEXEC);
  for (;;) {
    int success;
    struct flock lck = {0};
    lck.l_type = excl ? F_WRLCK : F_RDLCK;
    lck.l_whence = SEEK_SET;
    lck.l_len = 1;
    success = !fcntl(h, dowait ? F_SETLKW : F_SETLK, &lck);
    if (!success)
      break;
    struct stat s1, s2;
    if (fstat(h, &s1) || stat(path, &s2))
      break;
    success = s1.st_dev == s2.st_dev && s1.st_ino == s2.st_ino;
    if (success)
      return h;
    close(h);
  }
  close(h);
  return -1;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<u_lock>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x40,%rsp
  mov    %rdi,%rbp
  mov    %esi,%r12d
  mov    %edx,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    D20(%rip),%rax
  mov    (%rax),%esi
  mov    D14(%rip),%rax
  or     (%rax),%esi
  mov    $0x1b6,%edx
  call   <open@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  js     L1
  mov    D74(%rip),%rax
  mov    (%rax),%rdx
  mov    D0(%rip),%rax
  mov    (%rax),%esi
  mov    %ebx,%edi
  call   <fcntl@plt>
  mov    D85(%rip),%r14
  jmp    L103
L19:
  mov    D47(%rip),%rax
  mov    (%rax),%eax
  jmp    L123
L39:
  mov    D79(%rip),%rax
  mov    (%rax),%esi
  jmp    L66
L83:
  mov    %ebx,%edi
  call   <close@plt>
L103:
  movl   $0x0,0xc(%rsp)
  test   %r12d,%r12d
  je     L19
  mov    D46(%rip),%rax
  mov    (%rax),%eax
L123:
  mov    %eax,0x8(%rsp)
  mov    (%r14),%eax
  mov    %eax,0x4(%rsp)
  movl   $0x1,(%rsp)
  test   %r13d,%r13d
  je     L39
  mov    D63(%rip),%rax
  mov    (%rax),%esi
L66:
  mov    %rsp,%rdx
  mov    %ebx,%edi
  call   <fcntl@plt>
  test   %eax,%eax
  jne    L111
  lea    0x10(%rsp),%rsi
  mov    %ebx,%edi
  call   <fstat@plt>
  test   %rax,%rax
  jne    L111
  lea    0x20(%rsp),%rsi
  mov    %rbp,%rdi
  call   <stat@plt>
  test   %rax,%rax
  jne    L111
  mov    0x20(%rsp),%rax
  cmp    %rax,0x10(%rsp)
  jne    L83
  mov    0x28(%rsp),%rax
  cmp    %rax,0x18(%rsp)
  jne    L83
  jmp    L1
L111:
  mov    %ebx,%edi
  call   <close@plt>
  mov    $0xffffffff,%ebx
L1:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L23
  mov    %ebx,%eax
  add    $0x40,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L23:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int u_lock(const char *path, int excl, int dowait) {
  int h;
  h = open(path, O_RDWR | O_CREAT, 0666);
  if (!((h) >= 0))
    return h;
  fcntl(h, F_SETFD, FD_CLOEXEC);
  for (;;) {
    int success;
    struct flock lck = {0};
    lck.l_type = excl ? F_WRLCK : F_RDLCK;
    lck.l_whence = SEEK_SET;
    lck.l_len = 1;
    success = !fcntl(h, dowait ? F_SETLKW : F_SETLK, &lck);
    if (!success)
      break;
    struct stat s1, s2;
    if (fstat(h, &s1) || stat(path, &s2))
      break;
    success = s1.st_dev == s2.st_dev && s1.st_ino == s2.st_ino;
    if (success)
      return h;
    close(h);
  }
  close(h);
  return -1;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<u_lock>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  mov    $0x1b6,%edx
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x58,%rsp
  mov    %esi,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  mov    D89(%rip),%rax
  mov    (%rax),%esi
  mov    D49(%rip),%rax
  or     (%rax),%esi
  call   <open@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  js     L59
  mov    D79(%rip),%rax
  mov    %r12d,%edi
  lea    0x10(%rsp),%r13
  lea    0x20(%rsp),%r15
  mov    (%rax),%rdx
  mov    D6(%rip),%rax
  mov    (%rax),%esi
  call   <fcntl@plt>
  mov    D81(%rip),%r14
  jmp    L119
  nopl   0x0(%rax)
L63:
  mov    D36(%rip),%rax
  mov    (%rax),%eax
L64:
  mov    %eax,0x18(%rsp)
  mov    (%r14),%eax
  movl   $0x1,0x10(%rsp)
  mov    %eax,0x14(%rsp)
  test   %ebp,%ebp
  je     L82
  mov    D55(%rip),%rax
  mov    %r13,%rdx
  mov    %r12d,%edi
  mov    (%rax),%esi
  call   <fcntl@plt>
  test   %eax,%eax
  jne    L60
L110:
  mov    %r15,%rsi
  mov    %r12d,%edi
  call   <fstat@plt>
  test   %rax,%rax
  jne    L60
  lea    0x30(%rsp),%rsi
  mov    %rbx,%rdi
  call   <stat@plt>
  test   %rax,%rax
  jne    L60
  mov    0x30(%rsp),%rax
  cmp    %rax,0x20(%rsp)
  jne    L45
  mov    0x38(%rsp),%rax
  cmp    %rax,0x28(%rsp)
  je     L59
L45:
  mov    %r12d,%edi
  call   <close@plt>
L119:
  mov    0xc(%rsp),%eax
  movl   $0x0,0x1c(%rsp)
  test   %eax,%eax
  jne    L63
  mov    D50(%rip),%rax
  mov    (%rax),%eax
  jmp    L64
  nopl   0x0(%rax)
L82:
  mov    D7(%rip),%rax
  mov    %r13,%rdx
  mov    %r12d,%edi
  mov    (%rax),%esi
  call   <fcntl@plt>
  test   %eax,%eax
  je     L110
  nopl   0x0(%rax,%rax,1)
L60:
  mov    %r12d,%edi
  mov    $0xffffffff,%r12d
  call   <close@plt>
L59:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L108
  add    $0x58,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L108:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int u_lock(const char *path, int excl, int dowait) {
  int h;
  h = open(path, O_RDWR | O_CREAT, 0666);
  if (!((h) >= 0))
    return h;
  fcntl(h, F_SETFD, FD_CLOEXEC);
  for (;;) {
    int success;
    struct flock lck = {0};
    lck.l_type = excl ? F_WRLCK : F_RDLCK;
    lck.l_whence = SEEK_SET;
    lck.l_len = 1;
    success = !fcntl(h, dowait ? F_SETLKW : F_SETLK, &lck);
    if (!success)
      break;
    struct stat s1, s2;
    if (fstat(h, &s1) || stat(path, &s2))
      break;
    success = s1.st_dev == s2.st_dev && s1.st_ino == s2.st_ino;
    if (success)
      return h;
    close(h);
  }
  close(h);
  return -1;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<utf8_strsw>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  movq   $0x0,-0x18(%rbp)
  jmp    L1
L6:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <utf8_chrw@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <chrsw@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  add    %rax,-0x28(%rbp)
  mov    -0x8(%rbp),%rax
  add    %rax,-0x18(%rbp)
L1:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L6
  mov    -0x18(%rbp),%rax
  leave
  ret
```

assistant: ```c
size_t utf8_strsw(const char str[]) {
  size_t length = 0;
  while (*str != '\0') {
    const size_t char_width = utf8_chrw(str);
    const size_t char_screen_width = chrsw(str, char_width);
    str += char_width;
    length += char_screen_width;
  }
  return length;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<utf8_strsw>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  cmpb   $0x0,(%rdi)
  je     L8
  mov    %rdi,%rbx
  mov    $0x0,%r12d
L17:
  mov    %rbx,%rdi
  call   <utf8_chrw@plt>
  mov    %rax,%rbp
  mov    %rax,%rsi
  mov    %rbx,%rdi
  call   <chrsw@plt>
  add    %rbp,%rbx
  add    %rax,%r12
  cmpb   $0x0,(%rbx)
  jne    L17
L16:
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L8:
  mov    $0x0,%r12d
  jmp    L16
```

assistant: ```c
size_t utf8_strsw(const char str[]) {
  size_t length = 0;
  while (*str != '\0') {
    const size_t char_width = utf8_chrw(str);
    const size_t char_screen_width = chrsw(str, char_width);
    str += char_width;
    length += char_screen_width;
  }
  return length;
}
```
user: What is the c source code of the assembly code below?

```asm
<utf8_strsw>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  cmpb   $0x0,(%rdi)
  je     L8
  mov    %rdi,%rbx
  xor    %r12d,%r12d
  nopl   0x0(%rax,%rax,1)
L0:
  mov    %rbx,%rdi
  call   <utf8_chrw@plt>
  mov    %rbx,%rdi
  mov    %rax,%rbp
  mov    %rax,%rsi
  call   <chrsw@plt>
  add    %rbp,%rbx
  add    %rax,%r12
  cmpb   $0x0,(%rbx)
  jne    L0
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L8:
  xor    %r12d,%r12d
  pop    %rbx
  pop    %rbp
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
size_t utf8_strsw(const char str[]) {
  size_t length = 0;
  while (*str != '\0') {
    const size_t char_width = utf8_chrw(str);
    const size_t char_screen_width = chrsw(str, char_width);
    str += char_width;
    length += char_screen_width;
  }
  return length;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<utf8_strsw>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  cmpb   $0x0,(%rdi)
  je     L2
  mov    %rdi,%rbx
  xor    %r12d,%r12d
  nopl   0x0(%rax,%rax,1)
L18:
  mov    %rbx,%rdi
  call   <utf8_chrw@plt>
  mov    %rbx,%rdi
  mov    %rax,%rbp
  mov    %rax,%rsi
  call   <chrsw@plt>
  add    %rbp,%rbx
  add    %rax,%r12
  cmpb   $0x0,(%rbx)
  jne    L18
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L2:
  xor    %r12d,%r12d
  pop    %rbx
  pop    %rbp
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
size_t utf8_strsw(const char str[]) {
  size_t length = 0;
  while (*str != '\0') {
    const size_t char_width = utf8_chrw(str);
    const size_t char_screen_width = chrsw(str, char_width);
    str += char_width;
    length += char_screen_width;
  }
  return length;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<sigterm_handler>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D10
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D2
type_infered: string

tool: D10: Entering SIGTERM handler ...


tool: D2: Exiting SIGTERM handler ...


assistant: ```c
void sigterm_handler(int signo) {
  printf("Entering SIGTERM handler ...\n");
  printf("Exiting SIGTERM handler ...\n");
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<sigterm_handler>:
  endbr64
  sub    $0x8,%rsp
  lea    D0(%rip),%rdi
  call   <printf@plt>
  lea    D15(%rip),%rdi
  call   <printf@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: read_data
arguments: label: D0
type_infered: string
name: read_data
arguments: label: D15
type_infered: string

tool: D0: Entering SIGTERM handler ...


tool: D15: Exiting SIGTERM handler ...


assistant: ```c
void sigterm_handler(int signo) {
  printf("Entering SIGTERM handler ...\n");
  printf("Exiting SIGTERM handler ...\n");
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<sigterm_handler>:
  endbr64
  sub    $0x8,%rsp
  lea    D6(%rip),%rdi
  call   <printf@plt>
  lea    D11(%rip),%rdi
  add    $0x8,%rsp
  jmp    1050 <printf@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D6
data_type: string
name: extract_symbolic_data
arguments: label: D11
data_type: string

tool: D6: Entering SIGTERM handler ...


tool: D11: Exiting SIGTERM handler ...


assistant: ```c
void sigterm_handler(int signo) {
  printf("Entering SIGTERM handler ...\n");
  printf("Exiting SIGTERM handler ...\n");
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<sigterm_handler>:
  endbr64
  sub    $0x8,%rsp
  lea    D18(%rip),%rdi
  call   <printf@plt>
  lea    D7(%rip),%rdi
  add    $0x8,%rsp
  jmp    1050 <printf@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D18
data_type: string
name: extract_symbolic_data
arguments: data_label: D7
data_type: string

tool: D18: Entering SIGTERM handler ...


tool: D7: Exiting SIGTERM handler ...


assistant: ```c
void sigterm_handler(int signo) {
  printf("Entering SIGTERM handler ...\n");
  printf("Exiting SIGTERM handler ...\n");
}
```
user: What is the c source code of the assembly code below:

```asm
<priorityScheduler>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L35
L31:
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x10(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L20
L13:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L3
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x8(%rbp)
L3:
  addl   $0x1,-0xc(%rbp)
L20:
  cmpl   $0x4,-0xc(%rbp)
  jle    L13
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x10(%rbp)
L35:
  cmpl   $0x4,-0x10(%rbp)
  jle    L31
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void priorityScheduler(int process[], int burstTime[], int priority[]) {
  int i, j, temp, pos;
  for (i = 0; i < 5; i++) {
    pos = i;
    for (j = i + 1; j < 5; j++) {
      if (priority[j] < priority[pos])
        pos = j;
    }
    temp = priority[i];
    priority[i] = priority[pos];
    priority[pos] = temp;
    temp = burstTime[i];
    burstTime[i] = burstTime[pos];
    burstTime[pos] = temp;
    temp = process[i];
    process[i] = process[pos];
    process[pos] = temp;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<priorityScheduler>:
  endbr64
  mov    %rdi,%r9
  mov    %rsi,%r8
  mov    %rdx,%rcx
  mov    $0x1,%edi
L14:
  lea    -0x1(%rdi),%edx
  cmp    $0x4,%edi
  jg     L7
  mov    %rdi,%rax
L29:
  movslq %edx,%rsi
  mov    (%rcx,%rsi,4),%esi
  cmp    %esi,(%rcx,%rax,4)
  cmovl  %eax,%edx
  add    $0x1,%rax
  cmp    $0x4,%eax
  jle    L29
L7:
  mov    -0x4(%rcx,%rdi,4),%esi
  movslq %edx,%rdx
  shl    $0x2,%rdx
  lea    (%rcx,%rdx,1),%rax
  mov    (%rax),%r10d
  mov    %r10d,-0x4(%rcx,%rdi,4)
  mov    %esi,(%rax)
  mov    -0x4(%r8,%rdi,4),%esi
  lea    (%r8,%rdx,1),%rax
  mov    (%rax),%r10d
  mov    %r10d,-0x4(%r8,%rdi,4)
  mov    %esi,(%rax)
  mov    -0x4(%r9,%rdi,4),%eax
  add    %r9,%rdx
  mov    (%rdx),%esi
  mov    %esi,-0x4(%r9,%rdi,4)
  mov    %eax,(%rdx)
  add    $0x1,%rdi
  cmp    $0x6,%rdi
  jne    L14
  ret
```

assistant: ```c
void priorityScheduler(int process[], int burstTime[], int priority[]) {
  int i, j, temp, pos;
  for (i = 0; i < 5; i++) {
    pos = i;
    for (j = i + 1; j < 5; j++) {
      if (priority[j] < priority[pos])
        pos = j;
    }
    temp = priority[i];
    priority[i] = priority[pos];
    priority[pos] = temp;
    temp = burstTime[i];
    burstTime[i] = burstTime[pos];
    burstTime[pos] = temp;
    temp = process[i];
    process[i] = process[pos];
    process[pos] = temp;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<priorityScheduler>:
  endbr64
  push   %r14
  lea    0x4(%rdx),%r11
  mov    $0x1,%r10d
  push   %r13
  lea    0x10(%rdx),%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
L11:
  mov    -0x4(%r11),%r14d
  lea    -0x1(%r10),%r9d
  cmp    $0x5,%r10
  je     L14
  mov    %r11,%rcx
  mov    %r10,%rax
  mov    %r14d,%edi
L53:
  mov    (%rcx),%esi
  lea    0x0(,%rax,4),%rdx
  mov    %rcx,%r8
  cmp    %edi,%esi
  jl     L16
  movslq %r9d,%rdx
  shl    $0x2,%rdx
  lea    (%r12,%rdx,1),%r8
L58:
  add    $0x1,%rax
  add    $0x4,%rcx
  cmp    $0x5,%eax
  jne    L53
L5:
  lea    (%rbx,%rdx,1),%rax
  mov    %edi,-0x4(%r11)
  add    %rbp,%rdx
  add    $0x4,%r11
  mov    %r14d,(%r8)
  mov    -0x4(%rbx,%r10,4),%ecx
  mov    (%rax),%esi
  mov    %esi,-0x4(%rbx,%r10,4)
  mov    %ecx,(%rax)
  mov    (%rdx),%ecx
  mov    -0x4(%rbp,%r10,4),%eax
  mov    %ecx,-0x4(%rbp,%r10,4)
  add    $0x1,%r10
  mov    %eax,(%rdx)
  cmp    $0x6,%r10
  jne    L11
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L16:
  mov    %esi,%edi
  mov    %eax,%r9d
  jmp    L58
  nop
L14:
  mov    0x10(%r12),%edi
  mov    %r13,%r8
  mov    $0x10,%edx
  jmp    L5
```

assistant: ```c
void priorityScheduler(int process[], int burstTime[], int priority[]) {
  int i, j, temp, pos;
  for (i = 0; i < 5; i++) {
    pos = i;
    for (j = i + 1; j < 5; j++) {
      if (priority[j] < priority[pos])
        pos = j;
    }
    temp = priority[i];
    priority[i] = priority[pos];
    priority[pos] = temp;
    temp = burstTime[i];
    burstTime[i] = burstTime[pos];
    burstTime[pos] = temp;
    temp = process[i];
    process[i] = process[pos];
    process[pos] = temp;
  }
}
```