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

```asm
<bcompare>:
  endbr64
  mov    %esi,%r8d
  sub    $0x8,%rsp
  mov    %rdx,%rsi
  cmp    %ecx,%r8d
  je     L29
  jl     L39
  mov    %ecx,%edx
  call   <memcmp@plt>
  mov    $0x1,%edx
  test   %eax,%eax
  cmove  %edx,%eax
L19:
  add    $0x8,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L39:
  mov    %r8d,%edx
  call   <memcmp@plt>
  test   %eax,%eax
  jne    L19
  mov    $0xffffffff,%eax
  jmp    L19
  nopl   0x0(%rax,%rax,1)
L29:
  mov    %r8d,%edx
  add    $0x8,%rsp
  jmp    1050 <memcmp@plt>
```

assistant: ```c
int bcompare(unsigned char *a, int alen, unsigned char *b, int blen) {
  int stat;
  if (alen == blen) {
    return memcmp(a, b, alen);
  } else if (alen < blen) {
    if ((stat = memcmp(a, b, alen)) != 0)
      return stat;
    return -1;
  } else {
    if ((stat = memcmp(a, b, blen)) != 0)
      return stat;
    return +1;
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<print_usage>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  nop
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D8
type: string
name: unpack_data
arguments: data_label: D13
type: string

tool: D8: Arcus - memcached monitoring process version 1.0
USAGE : memc_mon [Options] <pid file directory>
      : memc_mon -z 127.0.0.1:2181 -p memcached -t 1000 -X -L LOG_NOTI memc_pid_list

<pid_file_directory>         directory path to read pid file

Options:
  -z ip:port list   Zookeeper ensemble cluster servers (default : 127.0.0.1:2181)
  -p <prefix>       pretfix to read pid file in pid directory path (default : memcached)
  -t <msec>         memc_mon monitroing period time. msec (default : 1000 msec)
  -X                print log to syslog (default : stderr)
  -L <log level>    log level option. in order of decreasing importance. (default : LOG_ERR)
                    LOG_ERR  : error
                    LOG_NOTI : normal, but significant
                    LOG_INFO : information
  -h                help usage


tool: D13: 


assistant: ```c
void print_usage() {
  printf("Arcus - memcached monitoring process version 1.0\n"
         "USAGE : memc_mon [Options] <pid file directory>\n"
         "      : memc_mon -z 127.0.0.1:2181 -p memcached -t 1000 -X -L LOG_NOTI memc_pid_list\n"
         "\n"
         "<pid_file_directory>         directory path to read pid file\n"
         "\n"
         "Options:\n"
         "  -z ip:port list   Zookeeper ensemble cluster servers (default : 127.0.0.1:2181)\n"
         "  -p <prefix>       pretfix to read pid file in pid directory path (default : memcached)\n"
         "  -t <msec>         memc_mon monitroing period time. msec (default : 1000 msec)\n"
         "  -X                print log to syslog (default : stderr)\n"
         "  -L <log level>    log level option. in order of decreasing importance. (default : LOG_ERR)\n"
         "                    LOG_ERR  : error\n"
         "                    LOG_NOTI : normal, but significant\n"
         "                    LOG_INFO : information\n"
         "  -h                help usage\n");
  printf("\n");
}
```
user: 请将以下的汇编代码转换成C语言代码:

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

tool_calls: name: unpack_data
arguments: label: D19
type_infered: string
name: unpack_data
arguments: label: D7
type_infered: string

tool: D19: Arcus - memcached monitoring process version 1.0
USAGE : memc_mon [Options] <pid file directory>
      : memc_mon -z 127.0.0.1:2181 -p memcached -t 1000 -X -L LOG_NOTI memc_pid_list

<pid_file_directory>         directory path to read pid file

Options:
  -z ip:port list   Zookeeper ensemble cluster servers (default : 127.0.0.1:2181)
  -p <prefix>       pretfix to read pid file in pid directory path (default : memcached)
  -t <msec>         memc_mon monitroing period time. msec (default : 1000 msec)
  -X                print log to syslog (default : stderr)
  -L <log level>    log level option. in order of decreasing importance. (default : LOG_ERR)
                    LOG_ERR  : error
                    LOG_NOTI : normal, but significant
                    LOG_INFO : information
  -h                help usage


tool: D7: 


assistant: ```c
void print_usage() {
  printf("Arcus - memcached monitoring process version 1.0\n"
         "USAGE : memc_mon [Options] <pid file directory>\n"
         "      : memc_mon -z 127.0.0.1:2181 -p memcached -t 1000 -X -L LOG_NOTI memc_pid_list\n"
         "\n"
         "<pid_file_directory>         directory path to read pid file\n"
         "\n"
         "Options:\n"
         "  -z ip:port list   Zookeeper ensemble cluster servers (default : 127.0.0.1:2181)\n"
         "  -p <prefix>       pretfix to read pid file in pid directory path (default : memcached)\n"
         "  -t <msec>         memc_mon monitroing period time. msec (default : 1000 msec)\n"
         "  -X                print log to syslog (default : stderr)\n"
         "  -L <log level>    log level option. in order of decreasing importance. (default : LOG_ERR)\n"
         "                    LOG_ERR  : error\n"
         "                    LOG_NOTI : normal, but significant\n"
         "                    LOG_INFO : information\n"
         "  -h                help usage\n");
  printf("\n");
}
```
user: What is the c source code of the assembly code below:

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

tool_calls: name: extract_symbolic_data
arguments: label: D15
data_type: string
name: extract_symbolic_data
arguments: label: D16
data_type: string

tool: D15: Arcus - memcached monitoring process version 1.0
USAGE : memc_mon [Options] <pid file directory>
      : memc_mon -z 127.0.0.1:2181 -p memcached -t 1000 -X -L LOG_NOTI memc_pid_list

<pid_file_directory>         directory path to read pid file

Options:
  -z ip:port list   Zookeeper ensemble cluster servers (default : 127.0.0.1:2181)
  -p <prefix>       pretfix to read pid file in pid directory path (default : memcached)
  -t <msec>         memc_mon monitroing period time. msec (default : 1000 msec)
  -X                print log to syslog (default : stderr)
  -L <log level>    log level option. in order of decreasing importance. (default : LOG_ERR)
                    LOG_ERR  : error
                    LOG_NOTI : normal, but significant
                    LOG_INFO : information
  -h                help usage


tool: D16: 


assistant: ```c
void print_usage() {
  printf("Arcus - memcached monitoring process version 1.0\n"
         "USAGE : memc_mon [Options] <pid file directory>\n"
         "      : memc_mon -z 127.0.0.1:2181 -p memcached -t 1000 -X -L LOG_NOTI memc_pid_list\n"
         "\n"
         "<pid_file_directory>         directory path to read pid file\n"
         "\n"
         "Options:\n"
         "  -z ip:port list   Zookeeper ensemble cluster servers (default : 127.0.0.1:2181)\n"
         "  -p <prefix>       pretfix to read pid file in pid directory path (default : memcached)\n"
         "  -t <msec>         memc_mon monitroing period time. msec (default : 1000 msec)\n"
         "  -X                print log to syslog (default : stderr)\n"
         "  -L <log level>    log level option. in order of decreasing importance. (default : LOG_ERR)\n"
         "                    LOG_ERR  : error\n"
         "                    LOG_NOTI : normal, but significant\n"
         "                    LOG_INFO : information\n"
         "  -h                help usage\n");
  printf("\n");
}
```
user: What is the c source code of the assembly code below?

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

tool_calls: name: parse_data
arguments: label: D0
type_guessed: string
name: parse_data
arguments: label: D10
type_guessed: string

tool: D0: Arcus - memcached monitoring process version 1.0
USAGE : memc_mon [Options] <pid file directory>
      : memc_mon -z 127.0.0.1:2181 -p memcached -t 1000 -X -L LOG_NOTI memc_pid_list

<pid_file_directory>         directory path to read pid file

Options:
  -z ip:port list   Zookeeper ensemble cluster servers (default : 127.0.0.1:2181)
  -p <prefix>       pretfix to read pid file in pid directory path (default : memcached)
  -t <msec>         memc_mon monitroing period time. msec (default : 1000 msec)
  -X                print log to syslog (default : stderr)
  -L <log level>    log level option. in order of decreasing importance. (default : LOG_ERR)
                    LOG_ERR  : error
                    LOG_NOTI : normal, but significant
                    LOG_INFO : information
  -h                help usage


tool: D10: 


assistant: ```c
void print_usage() {
  printf("Arcus - memcached monitoring process version 1.0\n"
         "USAGE : memc_mon [Options] <pid file directory>\n"
         "      : memc_mon -z 127.0.0.1:2181 -p memcached -t 1000 -X -L LOG_NOTI memc_pid_list\n"
         "\n"
         "<pid_file_directory>         directory path to read pid file\n"
         "\n"
         "Options:\n"
         "  -z ip:port list   Zookeeper ensemble cluster servers (default : 127.0.0.1:2181)\n"
         "  -p <prefix>       pretfix to read pid file in pid directory path (default : memcached)\n"
         "  -t <msec>         memc_mon monitroing period time. msec (default : 1000 msec)\n"
         "  -X                print log to syslog (default : stderr)\n"
         "  -L <log level>    log level option. in order of decreasing importance. (default : LOG_ERR)\n"
         "                    LOG_ERR  : error\n"
         "                    LOG_NOTI : normal, but significant\n"
         "                    LOG_INFO : information\n"
         "  -h                help usage\n");
  printf("\n");
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<setbit>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  shr    $0x5,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x1c(%rbp),%eax
  and    $0x1f,%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  shr    $0x5,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  or     -0x8(%rbp),%eax
  mov    %eax,(%rdx)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void setbit(unsigned int *map, int bit) {
  unsigned int v = map[bit / (sizeof(unsigned int) * 8)];
  int m = 1 << (bit % (sizeof(unsigned int) * 8));
  map[bit / (sizeof(unsigned int) * 8)] = v | m;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<setbit>:
  endbr64
  mov    %esi,%ecx
  movslq %esi,%rax
  shr    $0x5,%rax
  mov    $0x1,%edx
  shl    %cl,%edx
  or     %edx,(%rdi,%rax,4)
  ret
```

assistant: ```c
void setbit(unsigned int *map, int bit) {
  unsigned int v = map[bit / (sizeof(unsigned int) * 8)];
  int m = 1 << (bit % (sizeof(unsigned int) * 8));
  map[bit / (sizeof(unsigned int) * 8)] = v | m;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<setbit>:
  endbr64
  movslq %esi,%rax
  mov    $0x1,%edx
  mov    %rax,%rcx
  shr    $0x5,%rax
  shl    %cl,%edx
  or     %edx,(%rdi,%rax,4)
  ret
```

assistant: ```c
void setbit(unsigned int *map, int bit) {
  unsigned int v = map[bit / (sizeof(unsigned int) * 8)];
  int m = 1 << (bit % (sizeof(unsigned int) * 8));
  map[bit / (sizeof(unsigned int) * 8)] = v | m;
}
```
user: Translate the below assembly code into C programming language:

```asm
<setbit>:
  endbr64
  movslq %esi,%rax
  mov    $0x1,%edx
  mov    %rax,%rcx
  shr    $0x5,%rax
  shl    %cl,%edx
  or     %edx,(%rdi,%rax,4)
  ret
```

assistant: ```c
void setbit(unsigned int *map, int bit) {
  unsigned int v = map[bit / (sizeof(unsigned int) * 8)];
  int m = 1 << (bit % (sizeof(unsigned int) * 8));
  map[bit / (sizeof(unsigned int) * 8)] = v | m;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<mkdirs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  mov    %eax,%edi
  call   <alloca@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L106:
  jmp    L82
L112:
  addq   $0x1,-0x20(%rbp)
L82:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L112
  mov    -0x20(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L53
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  mov    D4(%rip),%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <access@plt>
  test   %rax,%rax
  je     L69
  mov    -0x18(%rbp),%rax
  mov    $0x1ed,%esi
  mov    %rax,%rdi
  call   <mkdir@plt>
  test   %rax,%rax
  jne    L60
L69:
  mov    -0x10(%rbp),%rax
  movb   $0x2f,(%rax)
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x20(%rbp)
  jmp    L106
L53:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L117
  mov    D4(%rip),%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <access@plt>
  test   %rax,%rax
  je     L117
  mov    -0x18(%rbp),%rax
  mov    $0x1ed,%esi
  mov    %rax,%rdi
  call   <mkdir@plt>
  test   %rax,%rax
  jne    L90
L117:
  mov    $0x0,%eax
  jmp    L20
L60:
  nop
  jmp    L54
L90:
  nop
L54:
  mov    $0xffffffff,%eax
L20:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L70
  call   <__stack_chk_fail@plt>
L70:
  leave
  ret
```

assistant: ```c
int mkdirs(const char *dir) {
  char *p;
  char *q;
  char *dir_edited;
  p = alloca((strlen(dir) + 1) * sizeof(char));
  strcpy(p, dir);
  dir_edited = p;
next:
  while (*p == '/')
    p++;
  q = strchr(p, '/');
  if (q != NULL) {
    *q = '\0';
    do {
      if (access(dir_edited, F_OK) && mkdir(dir_edited, 0755))
        goto fail;
    } while (0);
    *q = '/';
    p = q + 1;
    goto next;
  } else if (*p)
    do {
      if (access(dir_edited, F_OK) && mkdir(dir_edited, 0755))
        goto fail;
    } while (0);
  return 0;
fail:
  return -1;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<mkdirs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <alloca@plt>
  mov    %rax,%r13
  mov    %rbx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %r13,%r12
  jmp    L7
L72:
  add    $0x1,%r12
  jmp    L7
L100:
  movb   $0x2f,(%rbx)
  lea    0x1(%rbx),%r12
L7:
  cmpb   $0x2f,(%r12)
  je     L72
  mov    $0x2f,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L18
  movb   $0x0,(%rax)
  mov    D12(%rip),%rax
  mov    (%rax),%esi
  mov    %r13,%rdi
  call   <access@plt>
  test   %rax,%rax
  je     L100
  mov    $0x1ed,%esi
  mov    %r13,%rdi
  call   <mkdir@plt>
  test   %rax,%rax
  je     L100
  mov    $0xffffffff,%eax
  jmp    L39
L18:
  mov    $0x0,%eax
  cmpb   $0x0,(%r12)
  jne    L108
L39:
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L63
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
L108:
  mov    D12(%rip),%rax
  mov    (%rax),%esi
  mov    %r13,%rdi
  call   <access@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L39
  mov    $0x1ed,%esi
  mov    %r13,%rdi
  call   <mkdir@plt>
  neg    %rax
  sbb    %eax,%eax
  jmp    L39
L63:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int mkdirs(const char *dir) {
  char *p;
  char *q;
  char *dir_edited;
  p = alloca((strlen(dir) + 1) * sizeof(char));
  strcpy(p, dir);
  dir_edited = p;
next:
  while (*p == '/')
    p++;
  q = strchr(p, '/');
  if (q != NULL) {
    *q = '\0';
    do {
      if (access(dir_edited, F_OK) && mkdir(dir_edited, 0755))
        goto fail;
    } while (0);
    *q = '/';
    p = q + 1;
    goto next;
  } else if (*p)
    do {
      if (access(dir_edited, F_OK) && mkdir(dir_edited, 0755))
        goto fail;
    } while (0);
  return 0;
fail:
  return -1;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<mkdirs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <alloca@plt>
  mov    %r12,%rsi
  mov    %rax,%r13
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %r13,%r12
  nopl   0x0(%rax)
L86:
  cmpb   $0x2f,(%r12)
  je     L80
L101:
  mov    $0x2f,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L38
  movb   $0x0,(%rax)
  mov    D1(%rip),%rax
  mov    %r13,%rdi
  mov    (%rax),%esi
  call   <access@plt>
  test   %rax,%rax
  je     L10
  mov    $0x1ed,%esi
  mov    %r13,%rdi
  call   <mkdir@plt>
  test   %rax,%rax
  jne    L13
L10:
  lea    0x1(%rbx),%r12
  movb   $0x2f,(%rbx)
  cmpb   $0x2f,(%r12)
  jne    L101
L80:
  add    $0x1,%r12
  jmp    L86
  nopl   0x0(%rax,%rax,1)
L38:
  cmpb   $0x0,(%r12)
  jne    L11
L16:
  xor    %eax,%eax
L29:
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L83
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L11:
  mov    D1(%rip),%rax
  mov    %r13,%rdi
  mov    (%rax),%esi
  call   <access@plt>
  test   %rax,%rax
  je     L16
  mov    $0x1ed,%esi
  mov    %r13,%rdi
  call   <mkdir@plt>
  neg    %rax
  sbb    %eax,%eax
  jmp    L29
  nopw   0x0(%rax,%rax,1)
L13:
  mov    $0xffffffff,%eax
  jmp    L29
L83:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int mkdirs(const char *dir) {
  char *p;
  char *q;
  char *dir_edited;
  p = alloca((strlen(dir) + 1) * sizeof(char));
  strcpy(p, dir);
  dir_edited = p;
next:
  while (*p == '/')
    p++;
  q = strchr(p, '/');
  if (q != NULL) {
    *q = '\0';
    do {
      if (access(dir_edited, F_OK) && mkdir(dir_edited, 0755))
        goto fail;
    } while (0);
    *q = '/';
    p = q + 1;
    goto next;
  } else if (*p)
    do {
      if (access(dir_edited, F_OK) && mkdir(dir_edited, 0755))
        goto fail;
    } while (0);
  return 0;
fail:
  return -1;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<mkdirs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <alloca@plt>
  mov    %r12,%rsi
  mov    %rax,%r13
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %r13,%r12
  nopl   0x0(%rax)
L13:
  cmpb   $0x2f,(%r12)
  je     L78
L38:
  mov    $0x2f,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L41
  movb   $0x0,(%rax)
  mov    D11(%rip),%rax
  mov    %r13,%rdi
  mov    (%rax),%esi
  call   <access@plt>
  test   %rax,%rax
  je     L8
  mov    $0x1ed,%esi
  mov    %r13,%rdi
  call   <mkdir@plt>
  test   %rax,%rax
  jne    L43
L8:
  lea    0x1(%rbx),%r12
  movb   $0x2f,(%rbx)
  cmpb   $0x2f,(%r12)
  jne    L38
L78:
  add    $0x1,%r12
  jmp    L13
  nopl   0x0(%rax,%rax,1)
L41:
  cmpb   $0x0,(%r12)
  jne    L0
L77:
  xor    %eax,%eax
L108:
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L107
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L0:
  mov    D11(%rip),%rax
  mov    %r13,%rdi
  mov    (%rax),%esi
  call   <access@plt>
  test   %rax,%rax
  je     L77
  mov    $0x1ed,%esi
  mov    %r13,%rdi
  call   <mkdir@plt>
  neg    %rax
  sbb    %eax,%eax
  jmp    L108
  nopw   0x0(%rax,%rax,1)
L43:
  mov    $0xffffffff,%eax
  jmp    L108
L107:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int mkdirs(const char *dir) {
  char *p;
  char *q;
  char *dir_edited;
  p = alloca((strlen(dir) + 1) * sizeof(char));
  strcpy(p, dir);
  dir_edited = p;
next:
  while (*p == '/')
    p++;
  q = strchr(p, '/');
  if (q != NULL) {
    *q = '\0';
    do {
      if (access(dir_edited, F_OK) && mkdir(dir_edited, 0755))
        goto fail;
    } while (0);
    *q = '/';
    p = q + 1;
    goto next;
  } else if (*p)
    do {
      if (access(dir_edited, F_OK) && mkdir(dir_edited, 0755))
        goto fail;
    } while (0);
  return 0;
fail:
  return -1;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<dct_const_round_shift_sse2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    $0x2000,%edi
  call   <_mm_set1_epi32@plt>
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <_mm_add_epi32@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  mov    $0xe,%esi
  mov    %eax,%edi
  call   <_mm_srai_epi32@plt>
  leave
  ret
```

assistant: ```c
__m128i dct_const_round_shift_sse2(const __m128i in) {
  const __m128i t = _mm_add_epi32(in, _mm_set1_epi32((1 << (14 - 1))));
  return _mm_srai_epi32(t, 14);
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<dct_const_round_shift_sse2>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  mov    $0x2000,%edi
  call   <_mm_set1_epi32@plt>
  mov    %eax,%esi
  mov    %ebx,%edi
  call   <_mm_add_epi32@plt>
  mov    %eax,%edi
  mov    $0xe,%esi
  call   <_mm_srai_epi32@plt>
  pop    %rbx
  ret
```

assistant: ```c
__m128i dct_const_round_shift_sse2(const __m128i in) {
  const __m128i t = _mm_add_epi32(in, _mm_set1_epi32((1 << (14 - 1))));
  return _mm_srai_epi32(t, 14);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<dct_const_round_shift_sse2>:
  endbr64
  push   %rbp
  mov    %edi,%ebp
  mov    $0x2000,%edi
  call   <_mm_set1_epi32@plt>
  mov    %ebp,%edi
  mov    %eax,%esi
  call   <_mm_add_epi32@plt>
  mov    $0xe,%esi
  pop    %rbp
  mov    %eax,%edi
  jmp    1080 <_mm_srai_epi32@plt>
```

assistant: ```c
__m128i dct_const_round_shift_sse2(const __m128i in) {
  const __m128i t = _mm_add_epi32(in, _mm_set1_epi32((1 << (14 - 1))));
  return _mm_srai_epi32(t, 14);
}
```
user: Translate the below assembly code into C programming language:

```asm
<dct_const_round_shift_sse2>:
  endbr64
  push   %rbp
  mov    %edi,%ebp
  mov    $0x2000,%edi
  call   <_mm_set1_epi32@plt>
  mov    %ebp,%edi
  mov    %eax,%esi
  call   <_mm_add_epi32@plt>
  mov    $0xe,%esi
  pop    %rbp
  mov    %eax,%edi
  jmp    1080 <_mm_srai_epi32@plt>
```

assistant: ```c
__m128i dct_const_round_shift_sse2(const __m128i in) {
  const __m128i t = _mm_add_epi32(in, _mm_set1_epi32((1 << (14 - 1))));
  return _mm_srai_epi32(t, 14);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<make_key>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L7
L11:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    D9(%rip),%rax
  mov    (%rdx,%rax,1),%edx
  mov    -0x1c(%rbp),%eax
  sar    $0x6,%eax
  xor    -0x20(%rbp),%eax
  xor    %edx,%eax
  mov    $0x45d9f3b,%esi
  mov    %eax,%edi
  call   <odirure@plt>
  xor    $0x87b562f4,%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  addl   $0x1,-0x4(%rbp)
L7:
  cmpl   $0x3,-0x4(%rbp)
  jle    L11
  nop
  nop
  leave
  ret
```

assistant: ```c
void make_key(uint32_t key[4], uint32_t timestamp, uint32_t address) {
  static const uint32_t table[4] = {0xe43276df, 0xdca83759, 0x9802b8ac, 0x4675a56b};
  int8_t i;
  for (i = 0; i < 4; i++)
    key[i] = odirure(table[i] ^ ((timestamp >> 6) ^ address), 0x045d9f3b) ^ 0x87b562f4;
}
```