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

```asm
<CL_create_compile_string>:
  endbr64
  push   %rbx
  sub    $0x410,%rsp
  mov    %rdi,%rbx
  mov    %edx,%eax
  mov    %fs:0x28,%rdx
  mov    %rdx,0x408(%rsp)
  xor    %edx,%edx
  test   %eax,%eax
  jle    L45
  test   %r8,%r8
  lea    D26(%rip),%rdx
  lea    D66(%rip),%rdi
  cmovne %rdx,%rdi
  mov    %rdi,%r9
  test   %rcx,%rcx
  lea    D40(%rip),%r8
  lea    D66(%rip),%rdx
  cmove  %rdx,%r8
  mov    %rsp,%rdi
  sub    $0x8,%rsp
  push   %rsi
  mov    %eax,%ecx
  lea    D0(%rip),%rdx
  mov    $0x400,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  add    $0x10,%rsp
L38:
  test   %rbx,%rbx
  je     L15
  mov    %rsp,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    $0x0,%eax
L17:
  mov    0x408(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L3
  add    $0x410,%rsp
  pop    %rbx
  ret
L45:
  test   %r8,%r8
  lea    D26(%rip),%r8
  lea    D66(%rip),%rax
  cmove  %rax,%r8
  test   %rcx,%rcx
  lea    D40(%rip),%rcx
  cmove  %rax,%rcx
  mov    %rsp,%rdi
  mov    %rsi,%r9
  lea    D3(%rip),%rdx
  mov    $0x400,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  jmp    L38
L15:
  mov    %rsp,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  jmp    L17
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D26
type: string
name: read_data
arguments: data_tag: D66
type: string
name: read_data
arguments: data_tag: D40
type: string
name: read_data
arguments: data_tag: D0
type: string
name: read_data
arguments: data_tag: D3
type: string

tool: D26:  -D RND_DEBUG

tool: 

tool: D40:  -D __RND_ATOMIC

tool: D0:  -D __RND_WORKGROUP_SIZE=%d%s%s -I %s

tool: D3: %s%s -I %s

assistant: ```c
int CL_create_compile_string(char *const options, const char *const header_file_path, int local_size, cl_bool is_atomic, cl_bool debug) {
  char tmp[1024];
  if (local_size > 0)
    snprintf(tmp, 1024, " -D __RND_WORKGROUP_SIZE=%d%s%s -I %s", local_size, is_atomic ? " -D __RND_ATOMIC" : "", debug ? " -D RND_DEBUG" : "", header_file_path);
  else
    snprintf(tmp, 1024, "%s%s -I %s", is_atomic ? " -D __RND_ATOMIC" : "", debug ? " -D RND_DEBUG" : "", header_file_path);
  if (options == NULL)
    return strlen(tmp) + 1;
  strcat(options, tmp);
  return 0;
}
```
user: What is the c source code of the assembly code below?

```asm
<CL_create_compile_string>:
  endbr64
  push   %r12
  mov    %edx,%r10d
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x418,%rsp
  mov    %fs:0x28,%rdx
  mov    %rdx,0x408(%rsp)
  lea    D23(%rip),%rdx
  test   %r10d,%r10d
  jle    L4
  test   %r8,%r8
  lea    D13(%rip),%r9
  lea    D33(%rip),%r8
  mov    %rsp,%r12
  cmove  %rdx,%r9
  test   %rcx,%rcx
  mov    %r12,%rdi
  mov    %r10d,%ecx
  cmove  %rdx,%r8
  sub    $0x8,%rsp
  xor    %eax,%eax
  push   %rsi
  lea    D56(%rip),%rdx
  mov    $0x400,%esi
  call   <snprintf@plt>
  mov    %r12,%rsp
  test   %rbp,%rbp
  je     L19
L0:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  xor    %eax,%eax
L40:
  mov    0x408(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L11
  add    $0x418,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L4:
  test   %r8,%r8
  lea    D13(%rip),%r8
  mov    %rsp,%r12
  mov    %rsi,%r9
  cmove  %rdx,%r8
  test   %rcx,%rcx
  mov    $0x400,%esi
  mov    %r12,%rdi
  lea    D33(%rip),%rcx
  cmove  %rdx,%rcx
  xor    %eax,%eax
  lea    D25(%rip),%rdx
  call   <snprintf@plt>
  test   %rbp,%rbp
  jne    L0
L19:
  mov    %r12,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  jmp    L40
L11:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D23
type_infered: string
name: parse_data
arguments: data_label: D13
type_infered: string
name: parse_data
arguments: data_label: D33
type_infered: string
name: parse_data
arguments: data_label: D56
type_infered: string
name: parse_data
arguments: data_label: D25
type_infered: string

tool: 

tool: D13:  -D RND_DEBUG

tool: D33:  -D __RND_ATOMIC

tool: D56:  -D __RND_WORKGROUP_SIZE=%d%s%s -I %s

tool: D25: %s%s -I %s

assistant: ```c
int CL_create_compile_string(char *const options, const char *const header_file_path, int local_size, cl_bool is_atomic, cl_bool debug) {
  char tmp[1024];
  if (local_size > 0)
    snprintf(tmp, 1024, " -D __RND_WORKGROUP_SIZE=%d%s%s -I %s", local_size, is_atomic ? " -D __RND_ATOMIC" : "", debug ? " -D RND_DEBUG" : "", header_file_path);
  else
    snprintf(tmp, 1024, "%s%s -I %s", is_atomic ? " -D __RND_ATOMIC" : "", debug ? " -D RND_DEBUG" : "", header_file_path);
  if (options == NULL)
    return strlen(tmp) + 1;
  strcat(options, tmp);
  return 0;
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<CL_create_compile_string>:
  endbr64
  push   %r12
  mov    %edx,%r10d
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x418,%rsp
  mov    %fs:0x28,%rdx
  mov    %rdx,0x408(%rsp)
  lea    D59(%rip),%rdx
  test   %r10d,%r10d
  jle    L11
  test   %r8,%r8
  lea    D45(%rip),%r9
  lea    D12(%rip),%r8
  mov    %rsp,%r12
  cmove  %rdx,%r9
  test   %rcx,%rcx
  mov    %r12,%rdi
  mov    %r10d,%ecx
  cmove  %rdx,%r8
  sub    $0x8,%rsp
  xor    %eax,%eax
  push   %rsi
  lea    D25(%rip),%rdx
  mov    $0x400,%esi
  call   <snprintf@plt>
  mov    %r12,%rsp
  test   %rbp,%rbp
  je     L7
L32:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  xor    %eax,%eax
L27:
  mov    0x408(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L33
  add    $0x418,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L11:
  test   %r8,%r8
  lea    D45(%rip),%r8
  mov    %rsp,%r12
  mov    %rsi,%r9
  cmove  %rdx,%r8
  test   %rcx,%rcx
  mov    $0x400,%esi
  mov    %r12,%rdi
  lea    D12(%rip),%rcx
  cmove  %rdx,%rcx
  xor    %eax,%eax
  lea    D60(%rip),%rdx
  call   <snprintf@plt>
  test   %rbp,%rbp
  jne    L32
L7:
  mov    %r12,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  jmp    L27
L33:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D59
type: string
name: read_data
arguments: tag: D45
type: string
name: read_data
arguments: tag: D12
type: string
name: read_data
arguments: tag: D25
type: string
name: read_data
arguments: tag: D60
type: string

tool: 

tool: D45:  -D RND_DEBUG

tool: D12:  -D __RND_ATOMIC

tool: D25:  -D __RND_WORKGROUP_SIZE=%d%s%s -I %s

tool: D60: %s%s -I %s

assistant: ```c
int CL_create_compile_string(char *const options, const char *const header_file_path, int local_size, cl_bool is_atomic, cl_bool debug) {
  char tmp[1024];
  if (local_size > 0)
    snprintf(tmp, 1024, " -D __RND_WORKGROUP_SIZE=%d%s%s -I %s", local_size, is_atomic ? " -D __RND_ATOMIC" : "", debug ? " -D RND_DEBUG" : "", header_file_path);
  else
    snprintf(tmp, 1024, "%s%s -I %s", is_atomic ? " -D __RND_ATOMIC" : "", debug ? " -D RND_DEBUG" : "", header_file_path);
  if (options == NULL)
    return strlen(tmp) + 1;
  strcat(options, tmp);
  return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<compare_numbers>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  sub    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
long compare_numbers(const void *key, void *node) {
  long a = (long)key;
  long b = (long)node;
  return a - b;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<compare_numbers>:
  endbr64
  mov    %rdi,%rax
  sub    %rsi,%rax
  ret
```

assistant: ```c
long compare_numbers(const void *key, void *node) {
  long a = (long)key;
  long b = (long)node;
  return a - b;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<compare_numbers>:
  endbr64
  mov    %rdi,%rax
  sub    %rsi,%rax
  ret
```

assistant: ```c
long compare_numbers(const void *key, void *node) {
  long a = (long)key;
  long b = (long)node;
  return a - b;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<compare_numbers>:
  endbr64
  mov    %rdi,%rax
  sub    %rsi,%rax
  ret
```

assistant: ```c
long compare_numbers(const void *key, void *node) {
  long a = (long)key;
  long b = (long)node;
  return a - b;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<darray_erase_item>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <darray_find@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0xffffffffffffffff,-0x8(%rbp)
  je     L7
  mov    -0x8(%rbp),%rdx
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <darray_erase@plt>
L7:
  nop
  leave
  ret
```

assistant: ```c
void darray_erase_item(const size_t element_size, struct darray *dst, const void *item) {
  size_t idx = darray_find(element_size, dst, item, 0);
  if (idx != ((size_t)-1))
    darray_erase(element_size, dst, idx);
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<darray_erase_item>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    $0x0,%ecx
  call   <darray_find@plt>
  cmp    $0xffffffffffffffff,%rax
  jne    L16
L8:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L16:
  mov    %rax,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <darray_erase@plt>
  jmp    L8
```

assistant: ```c
void darray_erase_item(const size_t element_size, struct darray *dst, const void *item) {
  size_t idx = darray_find(element_size, dst, item, 0);
  if (idx != ((size_t)-1))
    darray_erase(element_size, dst, idx);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<darray_erase_item>:
  endbr64
  push   %r12
  xor    %ecx,%ecx
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  call   <darray_find@plt>
  cmp    $0xffffffffffffffff,%rax
  jne    L1
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L1:
  add    $0x8,%rsp
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    %rax,%rdx
  pop    %rbp
  pop    %r12
  jmp    1060 <darray_erase@plt>
```

assistant: ```c
void darray_erase_item(const size_t element_size, struct darray *dst, const void *item) {
  size_t idx = darray_find(element_size, dst, item, 0);
  if (idx != ((size_t)-1))
    darray_erase(element_size, dst, idx);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<darray_erase_item>:
  endbr64
  push   %r12
  xor    %ecx,%ecx
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  call   <darray_find@plt>
  cmp    $0xffffffffffffffff,%rax
  jne    L4
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L4:
  add    $0x8,%rsp
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    %rax,%rdx
  pop    %rbp
  pop    %r12
  jmp    1060 <darray_erase@plt>
```

assistant: ```c
void darray_erase_item(const size_t element_size, struct darray *dst, const void *item) {
  size_t idx = darray_find(element_size, dst, item, 0);
  if (idx != ((size_t)-1))
    darray_erase(element_size, dst, idx);
}
```
user: 这段汇编代码用C语言表示是什么样的：

```asm
<f>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  mov    $0x0,%eax
  call   <g@plt>
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  sub    %edx,%eax
  leave
  ret
```

assistant: ```c
int f(int x) {
  int i = x + 1;
  return i - g();
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<f>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  mov    $0x0,%eax
  call   <g@plt>
  mov    %eax,%edx
  lea    0x1(%rbx),%eax
  sub    %edx,%eax
  pop    %rbx
  ret
```

assistant: ```c
int f(int x) {
  int i = x + 1;
  return i - g();
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<f>:
  endbr64
  push   %rbx
  xor    %eax,%eax
  mov    %edi,%ebx
  call   <g@plt>
  mov    %eax,%r8d
  lea    0x1(%rbx),%eax
  pop    %rbx
  sub    %r8d,%eax
  ret
```

assistant: ```c
int f(int x) {
  int i = x + 1;
  return i - g();
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<f>:
  endbr64
  push   %rbx
  xor    %eax,%eax
  mov    %edi,%ebx
  call   <g@plt>
  mov    %eax,%r8d
  lea    0x1(%rbx),%eax
  pop    %rbx
  sub    %r8d,%eax
  ret
```

assistant: ```c
int f(int x) {
  int i = x + 1;
  return i - g();
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<_is_letter>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,%eax
  mov    %al,-0x4(%rbp)
  cmpb   $0x40,-0x4(%rbp)
  jle    L23
  cmpb   $0x5a,-0x4(%rbp)
  jg     L23
  movzbl -0x4(%rbp),%eax
  jmp    L14
L23:
  cmpb   $0x60,-0x4(%rbp)
  jle    L12
  cmpb   $0x7a,-0x4(%rbp)
  jg     L12
  movsbl -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <_to_upper@plt>
  jmp    L14
L12:
  mov    $0x0,%eax
L14:
  leave
  ret
```

assistant: ```c
char _is_letter(const char l) {
  if ((l >= 'A') && (l <= 'Z')) {
    return l;
  } else if ((l >= 'a') && (l <= 'z')) {
    return _to_upper(l);
  }
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<_is_letter>:
  endbr64
  lea    -0x41(%rdi),%edx
  mov    %edi,%eax
  cmp    $0x19,%dl
  jbe    L1
  lea    -0x61(%rdi),%edx
  mov    $0x0,%eax
  cmp    $0x19,%dl
  jbe    L12
L1:
  ret
L12:
  sub    $0x8,%rsp
  movsbl %dil,%edi
  call   <_to_upper@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
char _is_letter(const char l) {
  if ((l >= 'A') && (l <= 'Z')) {
    return l;
  } else if ((l >= 'a') && (l <= 'z')) {
    return _to_upper(l);
  }
  return 0;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<_is_letter>:
  endbr64
  lea    -0x41(%rdi),%eax
  cmp    $0x19,%al
  jbe    L10
  lea    -0x61(%rdi),%edx
  xor    %eax,%eax
  cmp    $0x19,%dl
  jbe    L3
  ret
  cs nopw 0x0(%rax,%rax,1)
L10:
  mov    %edi,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L3:
  movsbl %dil,%edi
  jmp    1050 <_to_upper@plt>
```

assistant: ```c
char _is_letter(const char l) {
  if ((l >= 'A') && (l <= 'Z')) {
    return l;
  } else if ((l >= 'a') && (l <= 'z')) {
    return _to_upper(l);
  }
  return 0;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<_is_letter>:
  endbr64
  lea    -0x41(%rdi),%eax
  cmp    $0x19,%al
  jbe    L12
  lea    -0x61(%rdi),%edx
  xor    %eax,%eax
  cmp    $0x19,%dl
  jbe    L3
  ret
  cs nopw 0x0(%rax,%rax,1)
L12:
  mov    %edi,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L3:
  movsbl %dil,%edi
  jmp    1050 <_to_upper@plt>
```

assistant: ```c
char _is_letter(const char l) {
  if ((l >= 'A') && (l <= 'Z')) {
    return l;
  } else if ((l >= 'a') && (l <= 'z')) {
    return _to_upper(l);
  }
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<aes_cbc_block_decrypt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %ecx,-0x5c(%rbp)
  mov    %r8d,-0x60(%rbp)
  mov    %r9,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x5c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x38(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L4:
  cmp    %rdx,%rsp
  je     L30
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L4
L30:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L37
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L37:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x5c(%rbp),%edx
  mov    -0x50(%rbp),%rcx
  mov    -0x30(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x5c(%rbp),%eax
  lea    0x0(,%rax,8),%ecx
  lea    -0x3c(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <AES_set_decrypt_key@plt>
  mov    D4(%rip),%rax
  mov    (%rax),%r8d
  mov    -0x30(%rbp),%rdi
  lea    -0x3c(%rbp),%rcx
  mov    -0x60(%rbp),%edx
  mov    -0x68(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  mov    %r8d,%r9d
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <AES_cbc_encrypt@plt>
  mov    %rbx,%rsp
  nop
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L7
  call   <__stack_chk_fail@plt>
L7:
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
void aes_cbc_block_decrypt(const unsigned char *key, const unsigned char *iv, const unsigned char *cipher, int blen, int tlen, unsigned char *plain) {
  unsigned char iv_cpy[blen];
  memcpy(iv_cpy, iv, blen);
  AES_KEY key_ctx;
  AES_set_decrypt_key(key, blen * 8, &key_ctx);
  AES_cbc_encrypt(cipher, plain, tlen, &key_ctx, iv_cpy, AES_DECRYPT);
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<aes_cbc_block_decrypt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r14
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,%ebx
  mov    %r8d,%r13d
  mov    %r9,%r12
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %ecx,%rax
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L39:
  cmp    %rdx,%rsp
  je     L5
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L39
L5:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L24
  orq    $0x0,-0x8(%rsp,%rax,1)
L24:
  mov    %ebx,%edx
  mov    %rsp,%rdi
  call   <memcpy@plt>
  lea    -0x3c(%rbp),%r15
  lea    0x0(,%rbx,8),%esi
  mov    %r15,%rdx
  mov    %r14,%rdi
  call   <AES_set_decrypt_key@plt>
  mov    D3(%rip),%rax
  mov    (%rax),%r9d
  mov    %rsp,%r8
  mov    %r15,%rcx
  mov    %r13d,%edx
  mov    %r12,%rsi
  mov    -0x48(%rbp),%rdi
  call   <AES_cbc_encrypt@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L29:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void aes_cbc_block_decrypt(const unsigned char *key, const unsigned char *iv, const unsigned char *cipher, int blen, int tlen, unsigned char *plain) {
  unsigned char iv_cpy[blen];
  memcpy(iv_cpy, iv, blen);
  AES_KEY key_ctx;
  AES_set_decrypt_key(key, blen * 8, &key_ctx);
  AES_cbc_encrypt(cipher, plain, tlen, &key_ctx, iv_cpy, AES_DECRYPT);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<aes_cbc_block_decrypt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %r8d,%r14d
  push   %r13
  mov    %r9,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %ecx,%rax
  mov    %rsp,%rcx
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L8
L9:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L9
L8:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L6
L23:
  mov    %ebx,%edx
  mov    %rsp,%rdi
  call   <memcpy@plt>
  lea    -0x3c(%rbp),%rcx
  lea    0x0(,%rbx,8),%esi
  mov    %r15,%rdi
  mov    %rcx,%rdx
  mov    %rcx,-0x48(%rbp)
  call   <AES_set_decrypt_key@plt>
  mov    -0x48(%rbp),%rcx
  mov    %rsp,%r8
  mov    %r14d,%edx
  mov    D0(%rip),%rax
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    (%rax),%r9d
  call   <AES_cbc_encrypt@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L43
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   (%rax)
L6:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L23
L43:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void aes_cbc_block_decrypt(const unsigned char *key, const unsigned char *iv, const unsigned char *cipher, int blen, int tlen, unsigned char *plain) {
  unsigned char iv_cpy[blen];
  memcpy(iv_cpy, iv, blen);
  AES_KEY key_ctx;
  AES_set_decrypt_key(key, blen * 8, &key_ctx);
  AES_cbc_encrypt(cipher, plain, tlen, &key_ctx, iv_cpy, AES_DECRYPT);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<aes_cbc_block_decrypt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %r8d,%r14d
  push   %r13
  mov    %r9,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %ecx,%rax
  mov    %rsp,%rcx
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L12
L28:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L28
L12:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L19
L1:
  mov    %ebx,%edx
  mov    %rsp,%rdi
  call   <memcpy@plt>
  lea    -0x3c(%rbp),%rcx
  lea    0x0(,%rbx,8),%esi
  mov    %r15,%rdi
  mov    %rcx,%rdx
  mov    %rcx,-0x48(%rbp)
  call   <AES_set_decrypt_key@plt>
  mov    -0x48(%rbp),%rcx
  mov    %rsp,%r8
  mov    %r14d,%edx
  mov    D3(%rip),%rax
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    (%rax),%r9d
  call   <AES_cbc_encrypt@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L33
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   (%rax)
L19:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L1
L33:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void aes_cbc_block_decrypt(const unsigned char *key, const unsigned char *iv, const unsigned char *cipher, int blen, int tlen, unsigned char *plain) {
  unsigned char iv_cpy[blen];
  memcpy(iv_cpy, iv, blen);
  AES_KEY key_ctx;
  AES_set_decrypt_key(key, blen * 8, &key_ctx);
  AES_cbc_encrypt(cipher, plain, tlen, &key_ctx, iv_cpy, AES_DECRYPT);
}
```
user: What is the c source code of the assembly code below?

```asm
<utils_full_write>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  movq   $0x0,-0x10(%rbp)
  jmp    L44
L19:
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rcx
  mov    -0x14(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <utils_safe_write@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jns    L37
  cmpq   $0x0,-0x10(%rbp)
  je     L49
  mov    -0x10(%rbp),%rax
  jmp    L40
L49:
  mov    -0x8(%rbp),%rax
  jmp    L40
L37:
  mov    -0x8(%rbp),%rax
  add    %rax,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  add    %rax,-0x20(%rbp)
  mov    -0x8(%rbp),%rax
  sub    %rax,-0x28(%rbp)
L44:
  cmpq   $0x0,-0x28(%rbp)
  jne    L19
  mov    -0x10(%rbp),%rax
L40:
  leave
  ret
```

assistant: ```c
ssize_t utils_full_write(int fd, const void *buf, size_t len) {
  ssize_t cc;
  ssize_t total;
  total = 0;
  while (len) {
    cc = utils_safe_write(fd, buf, len);
    if (cc < 0) {
      if (total) {
        return total;
      }
      return cc;
    }
    total += cc;
    buf = ((const char *)buf) + cc;
    len -= cc;
  }
  return total;
}
```