ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What is the c source code of the assembly code below:

```asm
<ini_getint_id_def>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x18(%rbp),%rdx
  lea    -0xc(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <ini_getint_id@plt>
  test   %eax,%eax
  jne    L12
  mov    -0x1c(%rbp),%eax
  jmp    L27
L12:
  mov    -0xc(%rbp),%eax
L27:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L14
  call   <__stack_chk_fail@plt>
L14:
  leave
  ret
```

assistant: ```c
int ini_getint_id_def(char *param, int def) {
  int value;
  if (!ini_getint_id(&value, param))
    return def;
  return value;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<ini_getint_id_def>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  mov    %esi,%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rax
  mov    %rdi,%rsi
  mov    %rax,%rdi
  call   <ini_getint_id@plt>
  test   %eax,%eax
  mov    %ebx,%eax
  cmovne 0x4(%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L9
  add    $0x10,%rsp
  pop    %rbx
  ret
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int ini_getint_id_def(char *param, int def) {
  int value;
  if (!ini_getint_id(&value, param))
    return def;
  return value;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<ini_getint_id_def>:
  endbr64
  push   %rbx
  mov    %rdi,%r8
  mov    %esi,%ebx
  mov    %r8,%rsi
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rdi
  call   <ini_getint_id@plt>
  test   %eax,%eax
  mov    %ebx,%eax
  cmovne 0x4(%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L9
  add    $0x10,%rsp
  pop    %rbx
  ret
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int ini_getint_id_def(char *param, int def) {
  int value;
  if (!ini_getint_id(&value, param))
    return def;
  return value;
}
```
user: Translate the below assembly code into C programming language:

```asm
<ini_getint_id_def>:
  endbr64
  push   %rbx
  mov    %rdi,%r8
  mov    %esi,%ebx
  mov    %r8,%rsi
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rdi
  call   <ini_getint_id@plt>
  test   %eax,%eax
  mov    %ebx,%eax
  cmovne 0x4(%rsp),%eax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L5
  add    $0x10,%rsp
  pop    %rbx
  ret
L5:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int ini_getint_id_def(char *param, int def) {
  int value;
  if (!ini_getint_id(&value, param))
    return def;
  return value;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<go_to_other_window>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    $0x0,%eax
  call   <try_switch_into_view_mode@plt>
  test   %eax,%eax
  jne    L9
  mov    $0x0,%eax
  call   <go_to_other_pane@plt>
L9:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void go_to_other_window(void) {
  if (!try_switch_into_view_mode()) {
    go_to_other_pane();
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<go_to_other_window>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <try_switch_into_view_mode@plt>
  test   %eax,%eax
  je     L19
L12:
  add    $0x8,%rsp
  ret
L19:
  call   <go_to_other_pane@plt>
  jmp    L12
```

assistant: ```c
void go_to_other_window(void) {
  if (!try_switch_into_view_mode()) {
    go_to_other_pane();
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<go_to_other_window>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <try_switch_into_view_mode@plt>
  test   %eax,%eax
  je     L4
  add    $0x8,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L4:
  add    $0x8,%rsp
  jmp    1060 <go_to_other_pane@plt>
```

assistant: ```c
void go_to_other_window(void) {
  if (!try_switch_into_view_mode()) {
    go_to_other_pane();
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<go_to_other_window>:
  endbr64
  sub    $0x8,%rsp
  xor    %eax,%eax
  call   <try_switch_into_view_mode@plt>
  test   %eax,%eax
  je     L8
  add    $0x8,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L8:
  add    $0x8,%rsp
  jmp    1060 <go_to_other_pane@plt>
```

assistant: ```c
void go_to_other_window(void) {
  if (!try_switch_into_view_mode()) {
    go_to_other_pane();
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<ADI8BitsClear>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,%eax
  mov    %al,-0x1c(%rbp)
  movl   $0x20,-0x4(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  cltq
  mov    %rax,%rdx
  movzbl -0x1c(%rbp),%eax
  mov    %al,(%rdx)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void ADI8BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) {
  uint32_t ui32RegOffset;
  ;
  ;
  ui32RegOffset = 0x00000020;
  (*((volatile unsigned char *)(ui32Base + ui32RegOffset + ui32Reg))) = ui8Val;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<ADI8BitsClear>:
  endbr64
  lea    0x20(%rdi,%rsi,1),%eax
  cltq
  mov    %dl,(%rax)
  ret
```

assistant: ```c
void ADI8BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) {
  uint32_t ui32RegOffset;
  ;
  ;
  ui32RegOffset = 0x00000020;
  (*((volatile unsigned char *)(ui32Base + ui32RegOffset + ui32Reg))) = ui8Val;
}
```
user: Translate the below assembly code into C programming language:

```asm
<ADI8BitsClear>:
  endbr64
  lea    0x20(%rdi,%rsi,1),%eax
  cltq
  mov    %dl,(%rax)
  ret
```

assistant: ```c
void ADI8BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) {
  uint32_t ui32RegOffset;
  ;
  ;
  ui32RegOffset = 0x00000020;
  (*((volatile unsigned char *)(ui32Base + ui32RegOffset + ui32Reg))) = ui8Val;
}
```
user: What is the c source code of the assembly code below:

```asm
<ADI8BitsClear>:
  endbr64
  lea    0x20(%rdi,%rsi,1),%eax
  cltq
  mov    %dl,(%rax)
  ret
```

assistant: ```c
void ADI8BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) {
  uint32_t ui32RegOffset;
  ;
  ;
  ui32RegOffset = 0x00000020;
  (*((volatile unsigned char *)(ui32Base + ui32RegOffset + ui32Reg))) = ui8Val;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<conf_parse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x1,-0x1c(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L23
L67:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L21
  mov    -0x18(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jbe    L58
  mov    -0x18(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L58
  mov    -0x18(%rbp),%rax
  movb   $0x20,(%rax)
  mov    -0x18(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  jmp    L25
L58:
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  sub    -0x10(%rbp),%rax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%edx
  mov    -0x10(%rbp),%rsi
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <conf_parse_line@plt>
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x10(%rbp)
L25:
  addl   $0x1,-0x1c(%rbp)
L21:
  addq   $0x1,-0x18(%rbp)
L23:
  mov    -0x18(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jb     L67
  mov    -0x18(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  je     L1
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <log_print@plt>
L1:
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D3
type_infered: string

tool: D3: conf_parse: last line unterminated, ignored.

assistant: ```c
void conf_parse(int trans, char *buf, size_t sz) {
  char *cp = buf;
  char *bufend = buf + sz;
  char *line;
  int ln = 1;
  line = cp;
  while (cp < bufend) {
    if (*cp == '\n') {
      if (cp > buf && *(cp - 1) == '\\')
        *(cp - 1) = *cp = ' ';
      else {
        *cp = '\0';
        conf_parse_line(trans, line, ln, cp - line);
        line = cp + 1;
      }
      ln++;
    }
    cp++;
  }
  if (cp != line)
    log_print("conf_parse: last line unterminated, ignored.");
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<conf_parse>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    (%rsi,%rdx,1),%rbp
  cmp    %rbp,%rsi
  jae    L54
  mov    %edi,%r14d
  mov    %rsi,%r12
  mov    %rsi,%rbx
  mov    $0x1,%r13d
  jmp    L55
L12:
  movb   $0x0,(%rbx)
  mov    %ebx,%ecx
  sub    %esi,%ecx
  mov    %r13d,%edx
  mov    %r14d,%edi
  call   <conf_parse_line@plt>
  lea    0x1(%rbx),%rsi
L46:
  add    $0x1,%r13d
L17:
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  je     L20
L55:
  cmpb   $0xa,(%rbx)
  jne    L17
  cmp    %rbx,%r12
  jae    L12
  cmpb   $0x5c,-0x1(%rbx)
  jne    L12
  movb   $0x20,(%rbx)
  movb   $0x20,-0x1(%rbx)
  jmp    L46
L20:
  cmp    %rbp,%rsi
  je     L54
  lea    D2(%rip),%rdi
  call   <log_print@plt>
L54:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: read_data
arguments: tag: D2
datatype: string

tool: D2: conf_parse: last line unterminated, ignored.

assistant: ```c
void conf_parse(int trans, char *buf, size_t sz) {
  char *cp = buf;
  char *bufend = buf + sz;
  char *line;
  int ln = 1;
  line = cp;
  while (cp < bufend) {
    if (*cp == '\n') {
      if (cp > buf && *(cp - 1) == '\\')
        *(cp - 1) = *cp = ' ';
      else {
        *cp = '\0';
        conf_parse_line(trans, line, ln, cp - line);
        line = cp + 1;
      }
      ln++;
    }
    cp++;
  }
  if (cp != line)
    log_print("conf_parse: last line unterminated, ignored.");
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<conf_parse>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    (%rsi,%rdx,1),%rbp
  push   %rbx
  cmp    %rbp,%rsi
  jae    L0
  mov    %edi,%r14d
  mov    %rsi,%r12
  mov    %rsi,%rbx
  mov    $0x1,%r13d
  jmp    L59
  nopw   0x0(%rax,%rax,1)
L22:
  cmp    %rbp,%rbx
  je     L41
L59:
  movzbl (%rbx),%eax
  mov    %rbx,%rcx
  add    $0x1,%rbx
  cmp    $0xa,%al
  jne    L22
  lea    -0x1(%rbx),%rax
  cmp    %rax,%r12
  jae    L64
  cmpb   $0x5c,-0x2(%rbx)
  je     L48
L64:
  movb   $0x0,-0x1(%rbx)
  sub    %esi,%ecx
  mov    %r13d,%edx
  mov    %r14d,%edi
  call   <conf_parse_line@plt>
  mov    %rbx,%rsi
L54:
  add    $0x1,%r13d
  cmp    %rbp,%rbx
  jne    L59
L41:
  cmp    %rbx,%rsi
  je     L0
  pop    %rbx
  lea    D8(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <log_print@plt>
  nopl   0x0(%rax,%rax,1)
L48:
  movb   $0x20,-0x1(%rbx)
  movb   $0x20,-0x2(%rbx)
  jmp    L54
  nopw   0x0(%rax,%rax,1)
L0:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D8
data_type: string

tool: D8: conf_parse: last line unterminated, ignored.

assistant: ```c
void conf_parse(int trans, char *buf, size_t sz) {
  char *cp = buf;
  char *bufend = buf + sz;
  char *line;
  int ln = 1;
  line = cp;
  while (cp < bufend) {
    if (*cp == '\n') {
      if (cp > buf && *(cp - 1) == '\\')
        *(cp - 1) = *cp = ' ';
      else {
        *cp = '\0';
        conf_parse_line(trans, line, ln, cp - line);
        line = cp + 1;
      }
      ln++;
    }
    cp++;
  }
  if (cp != line)
    log_print("conf_parse: last line unterminated, ignored.");
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<conf_parse>:
  endbr64
  push   %r14
  push   %r13
  lea    (%rsi,%rdx,1),%r13
  push   %r12
  push   %rbp
  push   %rbx
  cmp    %r13,%rsi
  jae    L102
  lea    -0x1(%r13),%r14
  mov    %edi,%r12d
  mov    %rsi,%rbx
  mov    $0x1,%ebp
  cmp    %r14,%rsi
  cmovbe %rsi,%r14
  nop
L90:
  movzbl (%rbx),%eax
  mov    %rbx,%rcx
  add    $0x1,%rbx
  cmp    $0xa,%al
  jne    L29
  movb   $0x0,-0x1(%rbx)
  sub    %esi,%ecx
  mov    %ebp,%edx
  mov    %r12d,%edi
  add    $0x1,%ebp
  call   <conf_parse_line@plt>
  mov    %rbx,%rsi
L29:
  cmp    %r14,%rbx
  jbe    L90
  cmp    %rbx,%r13
  ja     L94
  jmp    L108
L63:
  cmp    %rbx,%r13
  je     L108
L94:
  movzbl (%rbx),%eax
  mov    %rbx,%rcx
  add    $0x1,%rbx
  cmp    $0xa,%al
  jne    L63
  cmpb   $0x5c,-0x2(%rbx)
  je     L76
  movb   $0x0,-0x1(%rbx)
  sub    %esi,%ecx
  mov    %ebp,%edx
  mov    %r12d,%edi
  call   <conf_parse_line@plt>
  mov    %rbx,%rsi
L99:
  add    $0x1,%ebp
  cmp    %rbx,%r13
  jne    L94
L108:
  cmp    %r13,%rsi
  je     L102
  pop    %rbx
  lea    D1(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <log_print@plt>
  nopl   (%rax)
L76:
  movb   $0x20,-0x1(%rbx)
  movb   $0x20,-0x2(%rbx)
  jmp    L99
  nopw   0x0(%rax,%rax,1)
L102:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: parse_data
arguments: data_label: D1
data_type: string

tool: D1: conf_parse: last line unterminated, ignored.

assistant: ```c
void conf_parse(int trans, char *buf, size_t sz) {
  char *cp = buf;
  char *bufend = buf + sz;
  char *line;
  int ln = 1;
  line = cp;
  while (cp < bufend) {
    if (*cp == '\n') {
      if (cp > buf && *(cp - 1) == '\\')
        *(cp - 1) = *cp = ' ';
      else {
        *cp = '\0';
        conf_parse_line(trans, line, ln, cp - line);
        line = cp + 1;
      }
      ln++;
    }
    cp++;
  }
  if (cp != line)
    log_print("conf_parse: last line unterminated, ignored.");
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<make_int>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L11
L4:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L11:
  mov    -0x4(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L4
  mov    -0x8(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int make_int(char *str, int str_length) {
  int value = 0;
  int i = 0;
  for (i = 0; i < str_length; i++) {
    value += (int)str[i];
  }
  return value;
}
```
user: Translate the below assembly code into C programming language:

```asm
<make_int>:
  endbr64
  test   %esi,%esi
  jle    L19
  mov    %rdi,%rax
  lea    -0x1(%rsi),%edx
  lea    0x1(%rdi,%rdx,1),%rsi
  mov    $0x0,%edx
L28:
  movsbl (%rax),%ecx
  add    %ecx,%edx
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L28
L7:
  mov    %edx,%eax
  ret
L19:
  mov    $0x0,%edx
  jmp    L7
```

assistant: ```c
int make_int(char *str, int str_length) {
  int value = 0;
  int i = 0;
  for (i = 0; i < str_length; i++) {
    value += (int)str[i];
  }
  return value;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<make_int>:
  endbr64
  test   %esi,%esi
  jle    L6
  lea    -0x1(%rsi),%eax
  lea    0x1(%rdi,%rax,1),%rcx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L7:
  movsbl (%rdi),%edx
  add    $0x1,%rdi
  add    %edx,%eax
  cmp    %rcx,%rdi
  jne    L7
  ret
  nopw   0x0(%rax,%rax,1)
L6:
  xor    %eax,%eax
  ret
```

assistant: ```c
int make_int(char *str, int str_length) {
  int value = 0;
  int i = 0;
  for (i = 0; i < str_length; i++) {
    value += (int)str[i];
  }
  return value;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<make_int>:
  endbr64
  mov    %rdi,%rcx
  mov    %esi,%edx
  test   %esi,%esi
  jle    L146
  lea    -0x1(%rsi),%eax
  cmp    $0xe,%eax
  jbe    L182
  shr    $0x4,%esi
  pxor   %xmm1,%xmm1
  pxor   %xmm6,%xmm6
  mov    %rdi,%rax
  sub    $0x1,%esi
  pxor   %xmm4,%xmm4
  shl    $0x4,%rsi
  lea    0x10(%rdi,%rsi,1),%rsi
  nopl   0x0(%rax,%rax,1)
L149:
  movdqu (%rax),%xmm0
  movdqa %xmm6,%xmm3
  add    $0x10,%rax
  pcmpgtb %xmm0,%xmm3
  movdqa %xmm0,%xmm2
  punpcklbw %xmm3,%xmm2
  punpckhbw %xmm3,%xmm0
  movdqa %xmm4,%xmm3
  pcmpgtw %xmm2,%xmm3
  movdqa %xmm2,%xmm5
  punpcklwd %xmm3,%xmm5
  punpckhwd %xmm3,%xmm2
  movdqa %xmm0,%xmm3
  paddd  %xmm5,%xmm1
  paddd  %xmm2,%xmm1
  movdqa %xmm4,%xmm2
  pcmpgtw %xmm0,%xmm2
  punpcklwd %xmm2,%xmm3
  punpckhwd %xmm2,%xmm0
  paddd  %xmm3,%xmm1
  paddd  %xmm0,%xmm1
  cmp    %rsi,%rax
  jne    L149
  movdqa %xmm1,%xmm0
  mov    %edx,%esi
  psrldq $0x8,%xmm0
  and    $0xfffffff0,%esi
  paddd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm1
  movd   %xmm1,%eax
  test   $0xf,%dl
  je     L44
L167:
  movslq %esi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x1(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x2(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x3(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x4(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x5(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x6(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x7(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x8(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0x9(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0xa(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0xb(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0xc(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  lea    0xd(%rsi),%edi
  cmp    %edi,%edx
  jle    L13
  movslq %edi,%rdi
  add    $0xe,%esi
  movsbl (%rcx,%rdi,1),%edi
  add    %edi,%eax
  cmp    %esi,%edx
  jle    L13
  movslq %esi,%rsi
  movsbl (%rcx,%rsi,1),%edx
  add    %edx,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L146:
  xor    %eax,%eax
L13:
  ret
L182:
  xor    %esi,%esi
  xor    %eax,%eax
  jmp    L167
L44:
  ret
```

assistant: ```c
int make_int(char *str, int str_length) {
  int value = 0;
  int i = 0;
  for (i = 0; i < str_length; i++) {
    value += (int)str[i];
  }
  return value;
}
```
user: What is the c source code of the assembly code below?

```asm
<escapeStr>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rsi,%rbx
  movb   $0x22,(%rsi)
  movzbl (%rdi),%edx
  test   %dl,%dl
  je     L85
  mov    %rdi,%rax
  mov    $0x1,%edi
  jmp    L107
L47:
  lea    0x1(%rdi),%edx
  movslq %edi,%rcx
  movb   $0x5c,(%rbx,%rcx,1)
  add    $0x2,%edi
  movslq %edx,%rdx
  movb   $0x6e,(%rbx,%rdx,1)
  jmp    L15
L30:
  lea    0x1(%rdi),%edx
  movslq %edi,%rcx
  movb   $0x5c,(%rbx,%rcx,1)
  add    $0x2,%edi
  movslq %edx,%rdx
  movb   $0x74,(%rbx,%rdx,1)
  jmp    L15
L70:
  cmpb   $0x5c,(%rax)
  je     L76
L105:
  movzbl (%rax),%ecx
  movslq %edi,%rdx
  mov    %cl,(%rbx,%rdx,1)
  lea    0x1(%rdi),%edi
L15:
  add    $0x1,%rax
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L14
L107:
  cmp    $0xa,%dl
  je     L47
  cmp    $0x9,%dl
  je     L30
  cmp    $0x22,%dl
  jne    L70
  movslq %edi,%rdx
  movb   $0x5c,(%rbx,%rdx,1)
  lea    0x1(%rdi),%edi
  jmp    L70
L76:
  movslq %edi,%rdx
  movb   $0x5c,(%rbx,%rdx,1)
  lea    0x1(%rdi),%edi
  jmp    L105
L85:
  mov    $0x1,%edi
L14:
  movslq %edi,%rax
  movb   $0x22,(%rbx,%rax,1)
  lea    0x1(%rdi),%eax
  cltq
  movb   $0x0,(%rbx,%rax,1)
  add    $0x3,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %rbx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %rbp,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
char *escapeStr(char *str, char *buff) {
  int spos = 0;
  int tpos = 0;
  buff[tpos++] = '"';
  while (str[spos] != 0) {
    if (str[spos] == '\n') {
      buff[tpos++] = '\\';
      buff[tpos++] = 'n';
    } else if (str[spos] == '\t') {
      buff[tpos++] = '\\';
      buff[tpos++] = 't';
    } else {
      if (str[spos] == '"')
        buff[tpos++] = '\\';
      if (str[spos] == '\\')
        buff[tpos++] = '\\';
      buff[tpos++] = str[spos];
    }
    spos++;
  }
  buff[tpos++] = '"';
  buff[tpos++] = 0;
  char *out = malloc(sizeof(char) * (tpos + 1));
  strcpy(out, buff);
  return out;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<escapeStr>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  sub    $0x8,%rsp
  movb   $0x22,(%rsi)
  movzbl (%rdi),%edx
  test   %dl,%dl
  je     L27
  mov    $0x1,%eax
  jmp    L52
  nopl   0x0(%rax,%rax,1)
L45:
  cmp    $0x9,%dl
  je     L71
  cmp    $0x22,%dl
  jne    L93
  movb   $0x5c,(%r9)
  lea    0x2(%rax),%ecx
  movslq %r10d,%r8
L93:
  movzbl (%rdi),%eax
  cmp    $0x5c,%al
  jne    L19
  movb   $0x5c,0x0(%rbp,%r8,1)
  movzbl (%rdi),%eax
  movslq %ecx,%r8
  add    $0x1,%ecx
L19:
  mov    %al,0x0(%rbp,%r8,1)
  mov    %ecx,%eax
L43:
  movzbl 0x1(%rdi),%edx
  add    $0x1,%rdi
  test   %dl,%dl
  je     L3
L52:
  lea    0x1(%rax),%ecx
  movslq %eax,%r8
  movslq %ecx,%rsi
  mov    %ecx,%r10d
  lea    0x0(%rbp,%r8,1),%r9
  add    %rbp,%rsi
  cmp    $0xa,%dl
  jne    L45
  add    $0x1,%rdi
  movb   $0x5c,(%r9)
  add    $0x2,%eax
  movb   $0x6e,(%rsi)
  movzbl (%rdi),%edx
  test   %dl,%dl
  jne    L52
L3:
  lea    0x1(%rax),%edx
  movslq %eax,%rcx
  lea    0x3(%rax),%edi
  movslq %edx,%rdx
L97:
  movb   $0x22,0x0(%rbp,%rcx,1)
  movb   $0x0,0x0(%rbp,%rdx,1)
  call   <malloc@plt>
  mov    %rbp,%rsi
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strcpy@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L71:
  movb   $0x5c,(%r9)
  add    $0x2,%eax
  movb   $0x74,(%rsi)
  jmp    L43
  nopl   0x0(%rax)
L27:
  mov    $0x4,%edi
  mov    $0x2,%edx
  mov    $0x1,%ecx
  jmp    L97
```

assistant: ```c
char *escapeStr(char *str, char *buff) {
  int spos = 0;
  int tpos = 0;
  buff[tpos++] = '"';
  while (str[spos] != 0) {
    if (str[spos] == '\n') {
      buff[tpos++] = '\\';
      buff[tpos++] = 'n';
    } else if (str[spos] == '\t') {
      buff[tpos++] = '\\';
      buff[tpos++] = 't';
    } else {
      if (str[spos] == '"')
        buff[tpos++] = '\\';
      if (str[spos] == '\\')
        buff[tpos++] = '\\';
      buff[tpos++] = str[spos];
    }
    spos++;
  }
  buff[tpos++] = '"';
  buff[tpos++] = 0;
  char *out = malloc(sizeof(char) * (tpos + 1));
  strcpy(out, buff);
  return out;
}
```