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

```asm
<strings_replace_imp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %rcx,%r12
  mov    %sil,0xf(%rsp)
  mov    %edx,%r15d
  call   <assert@plt>
  mov    %r13,%rdi
  call   <strings_length@plt>
  mov    %eax,%ebx
  mov    %eax,0x8(%rsp)
  lea    0x1(%rax),%edi
  call   <strings_alloc@plt>
  mov    %rax,(%rsp)
  test   %ebx,%ebx
  je     L41
  mov    %ebx,%edx
  mov    %r13,%rbx
  mov    %rax,%rbp
  lea    -0x1(%rdx),%eax
  lea    0x1(%r13,%rax,1),%r14
  movsbl 0xf(%rsp),%r13d
  jmp    L10
L39:
  movzbl (%rbx),%eax
  mov    %al,0x0(%rbp)
L20:
  add    $0x1,%rbx
  add    $0x1,%rbp
  cmp    %r14,%rbx
  je     L41
L10:
  movsbl (%rbx),%edi
  mov    %r13d,%esi
  call   *%r12
  test   %eax,%eax
  je     L39
  mov    %r15b,0x0(%rbp)
  jmp    L20
L41:
  mov    0x8(%rsp),%eax
  mov    (%rsp),%rcx
  movb   $0x0,(%rcx,%rax,1)
  mov    %rcx,%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
char *strings_replace_imp(char *string, char old_char, char new_char, bool (*equals_function)(char, char)) {
  assert(string);
  unsigned int string_length = strings_length(string);
  char *ret = strings_alloc(string_length + 1);
  for (unsigned int k = 0; k < string_length; k++) {
    if (equals_function(string[k], old_char))
      ret[k] = new_char;
    else
      ret[k] = string[k];
  }
  ret[string_length] = '\0';
  return ret;
}
```
user: What is the c source code of the assembly code below?

```asm
<strings_replace_imp>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x18,%rsp
  call   <assert@plt>
  mov    %r15,%rdi
  call   <strings_length@plt>
  lea    0x1(%rax),%edi
  mov    %eax,0xc(%rsp)
  mov    %eax,%r14d
  call   <strings_alloc@plt>
  mov    %rax,(%rsp)
  test   %r14d,%r14d
  je     L6
  mov    %rax,%r14
  mov    0xc(%rsp),%eax
  movsbl %bl,%ebx
  sub    $0x1,%eax
  lea    0x1(%r15,%rax,1),%r13
  nopl   0x0(%rax,%rax,1)
L13:
  movsbl (%r15),%edi
  mov    %ebx,%esi
  call   *%r12
  mov    %eax,%r8d
  mov    %ebp,%eax
  test   %r8d,%r8d
  jne    L5
  movzbl (%r15),%eax
L5:
  add    $0x1,%r15
  mov    %al,(%r14)
  add    $0x1,%r14
  cmp    %r13,%r15
  jne    L13
L6:
  mov    0xc(%rsp),%r14d
  mov    (%rsp),%rax
  movb   $0x0,(%rax,%r14,1)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
char *strings_replace_imp(char *string, char old_char, char new_char, bool (*equals_function)(char, char)) {
  assert(string);
  unsigned int string_length = strings_length(string);
  char *ret = strings_alloc(string_length + 1);
  for (unsigned int k = 0; k < string_length; k++) {
    if (equals_function(string[k], old_char))
      ret[k] = new_char;
    else
      ret[k] = string[k];
  }
  ret[string_length] = '\0';
  return ret;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<strings_replace_imp>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %edx,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x18,%rsp
  call   <assert@plt>
  mov    %r15,%rdi
  call   <strings_length@plt>
  lea    0x1(%rax),%edi
  mov    %eax,0xc(%rsp)
  mov    %eax,%r12d
  call   <strings_alloc@plt>
  mov    %rax,(%rsp)
  test   %r12d,%r12d
  je     L34
  mov    %rax,%r13
  mov    0xc(%rsp),%eax
  movsbl %bl,%ebx
  sub    $0x1,%eax
  lea    0x1(%r15,%rax,1),%r12
  nopl   0x0(%rax)
L7:
  movsbl (%r15),%edi
  mov    %ebx,%esi
  call   *%rbp
  test   %eax,%eax
  jne    L41
  movzbl (%r15),%eax
  add    $0x1,%r15
  add    $0x1,%r13
  mov    %al,-0x1(%r13)
  cmp    %r12,%r15
  jne    L7
L34:
  mov    0xc(%rsp),%r13d
  mov    (%rsp),%rax
  movb   $0x0,(%rax,%r13,1)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L41:
  add    $0x1,%r15
  mov    %r14b,0x0(%r13)
  add    $0x1,%r13
  cmp    %r12,%r15
  jne    L7
  jmp    L34
```

assistant: ```c
char *strings_replace_imp(char *string, char old_char, char new_char, bool (*equals_function)(char, char)) {
  assert(string);
  unsigned int string_length = strings_length(string);
  char *ret = strings_alloc(string_length + 1);
  for (unsigned int k = 0; k < string_length; k++) {
    if (equals_function(string[k], old_char))
      ret[k] = new_char;
    else
      ret[k] = string[k];
  }
  ret[string_length] = '\0';
  return ret;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<copyBuffer>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L1
  mov    -0x18(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
L1:
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
char *copyBuffer(const char *buffer) {
  const int bufferLen = strlen(buffer) + 1;
  char *output = malloc(bufferLen * sizeof(char));
  if (output) {
    strcpy(output, buffer);
  }
  return output;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<copyBuffer>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L7
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
L7:
  mov    %rbx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
char *copyBuffer(const char *buffer) {
  const int bufferLen = strlen(buffer) + 1;
  char *output = malloc(bufferLen * sizeof(char));
  if (output) {
    strcpy(output, buffer);
  }
  return output;
}
```
user: What is the c source code of the assembly code below?

```asm
<copyBuffer>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L0
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
L0:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
char *copyBuffer(const char *buffer) {
  const int bufferLen = strlen(buffer) + 1;
  char *output = malloc(bufferLen * sizeof(char));
  if (output) {
    strcpy(output, buffer);
  }
  return output;
}
```
user: What is the c source code of the assembly code below?

```asm
<copyBuffer>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L4
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
L4:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
char *copyBuffer(const char *buffer) {
  const int bufferLen = strlen(buffer) + 1;
  char *output = malloc(bufferLen * sizeof(char));
  if (output) {
    strcpy(output, buffer);
  }
  return output;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<__ashldi3>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  and    $0x1f,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    $0x20,%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%ecx
  sar    %cl,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  je     L4
  mov    -0x4(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L6
L4:
  mov    -0x4(%rbp),%eax
  mov    -0x8(%rbp),%edx
  mov    %edx,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    $0x20,%eax
  sub    -0x4(%rbp),%eax
  mov    -0xc(%rbp),%edx
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  add    %esi,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,%ecx
  shll   %cl,-0xc(%rbp)
L6:
  mov    $0x20,%edx
  mov    -0x8(%rbp),%eax
  mov    %edx,%ecx
  shl    %cl,%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  pop    %rbp
  ret
```

assistant: ```c
uint64_t __ashldi3(uint64_t v, int cnt) {
  int c = cnt & 31;
  uint32_t vl = (uint32_t)v;
  uint32_t vh = (uint32_t)(v >> 32);
  if (cnt & 32) {
    vh = (vl << c);
    vl = 0;
  } else {
    vh = (vh << c) + (vl >> (32 - c));
    vl = (vl << c);
  }
  return ((uint64_t)vh << 32) + vl;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<__ashldi3>:
  endbr64
  mov    %esi,%ecx
  shl    %cl,%edi
  test   $0x20,%sil
  mov    $0x0,%eax
  cmove  %edi,%eax
  ret
```

assistant: ```c
uint64_t __ashldi3(uint64_t v, int cnt) {
  int c = cnt & 31;
  uint32_t vl = (uint32_t)v;
  uint32_t vh = (uint32_t)(v >> 32);
  if (cnt & 32) {
    vh = (vl << c);
    vl = 0;
  } else {
    vh = (vh << c) + (vl >> (32 - c));
    vl = (vl << c);
  }
  return ((uint64_t)vh << 32) + vl;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<__ashldi3>:
  endbr64
  mov    %esi,%ecx
  xor    %eax,%eax
  shl    %cl,%edi
  and    $0x20,%ecx
  cmove  %edi,%eax
  ret
```

assistant: ```c
uint64_t __ashldi3(uint64_t v, int cnt) {
  int c = cnt & 31;
  uint32_t vl = (uint32_t)v;
  uint32_t vh = (uint32_t)(v >> 32);
  if (cnt & 32) {
    vh = (vl << c);
    vl = 0;
  } else {
    vh = (vh << c) + (vl >> (32 - c));
    vl = (vl << c);
  }
  return ((uint64_t)vh << 32) + vl;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<__ashldi3>:
  endbr64
  mov    %esi,%ecx
  xor    %eax,%eax
  shl    %cl,%edi
  and    $0x20,%ecx
  cmove  %edi,%eax
  ret
```

assistant: ```c
uint64_t __ashldi3(uint64_t v, int cnt) {
  int c = cnt & 31;
  uint32_t vl = (uint32_t)v;
  uint32_t vh = (uint32_t)(v >> 32);
  if (cnt & 32) {
    vh = (vl << c);
    vl = 0;
  } else {
    vh = (vh << c) + (vl >> (32 - c));
    vl = (vl << c);
  }
  return ((uint64_t)vh << 32) + vl;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<close_spi>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jns    L1
  mov    -0x18(%rbp),%ecx
  mov    -0x20(%rbp),%rax
  lea    D3(%rip),%rdx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <set_error_string@plt>
  mov    $0xffffffff,%eax
  jmp    L2
L1:
  mov    -0x4(%rbp),%eax
L2:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D3
type: string

tool: D3: can't close device

assistant: ```c
int close_spi(int fd, char *error_string_buffer, int error_string_maxlen) {
  int ret;
  ret = close(fd);
  if (ret < 0) {
    set_error_string(error_string_buffer, error_string_maxlen, "can't close device");
    return -1;
  };
  ;
  return ret;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<close_spi>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rsi,%rbp
  mov    %edx,%ebx
  call   <close@plt>
  test   %eax,%eax
  js     L13
L8:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L13:
  lea    D8(%rip),%rdx
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <set_error_string@plt>
  mov    $0xffffffff,%eax
  jmp    L8
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D8
type_infered: string

tool: D8: can't close device

assistant: ```c
int close_spi(int fd, char *error_string_buffer, int error_string_maxlen) {
  int ret;
  ret = close(fd);
  if (ret < 0) {
    set_error_string(error_string_buffer, error_string_maxlen, "can't close device");
    return -1;
  };
  ;
  return ret;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<close_spi>:
  endbr64
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %edx,%ebp
  sub    $0x8,%rsp
  call   <close@plt>
  test   %eax,%eax
  js     L12
L11:
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  ret
L12:
  lea    D6(%rip),%rdx
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <set_error_string@plt>
  mov    $0xffffffff,%eax
  jmp    L11
```

tool_calls: name: disassemble_data
arguments: label: D6
type_infered: string

tool: D6: can't close device

assistant: ```c
int close_spi(int fd, char *error_string_buffer, int error_string_maxlen) {
  int ret;
  ret = close(fd);
  if (ret < 0) {
    set_error_string(error_string_buffer, error_string_maxlen, "can't close device");
    return -1;
  };
  ;
  return ret;
}
```
user: What is the c source code of the assembly code below:

```asm
<close_spi>:
  endbr64
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %edx,%ebp
  sub    $0x8,%rsp
  call   <close@plt>
  test   %eax,%eax
  js     L10
L5:
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  ret
L10:
  lea    D4(%rip),%rdx
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <set_error_string@plt>
  mov    $0xffffffff,%eax
  jmp    L5
```

tool_calls: name: unpack_data
arguments: data_label: D4
type_infered: string

tool: D4: can't close device

assistant: ```c
int close_spi(int fd, char *error_string_buffer, int error_string_maxlen) {
  int ret;
  ret = close(fd);
  if (ret < 0) {
    set_error_string(error_string_buffer, error_string_maxlen, "can't close device");
    return -1;
  };
  ;
  return ret;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<e_mk_info_pt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %rdi,-0xa8(%rbp)
  mov    %rsi,-0xb0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
L122:
  mov    -0xb0(%rbp),%rdx
  mov    -0xa8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x98(%rbp)
  cmpq   $0x0,-0x98(%rbp)
  jne    L168
  mov    $0x0,%eax
  jmp    L28
L163:
  addq   $0x1,-0x98(%rbp)
L168:
  mov    -0x98(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L130
  mov    -0x98(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L130
  mov    -0x98(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L163
L130:
  mov    -0x98(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L155
  mov    $0x0,%eax
  jmp    L28
L155:
  mov    -0x98(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L122
  addq   $0x1,-0x98(%rbp)
  jmp    L150
L35:
  addq   $0x1,-0x98(%rbp)
L150:
  mov    -0x98(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L35
  movl   $0x0,-0x9c(%rbp)
  jmp    L65
L57:
  addl   $0x1,-0x9c(%rbp)
L65:
  mov    -0x9c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x9c(%rbp),%eax
  cltq
  mov    %dl,-0x90(%rbp,%rax,1)
  mov    -0x9c(%rbp),%eax
  cltq
  movzbl -0x90(%rbp,%rax,1),%eax
  test   %al,%al
  je     L90
  mov    -0x9c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L90
  mov    -0x9c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L57
L90:
  mov    -0x9c(%rbp),%eax
  cltq
  movb   $0x0,-0x90(%rbp,%rax,1)
  cmpl   $0x0,-0x9c(%rbp)
  jne    L160
  mov    $0x0,%eax
  jmp    L28
L160:
  lea    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x98(%rbp)
  lea    -0x90(%rbp),%rdx
  mov    -0x98(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x98(%rbp),%rax
L28:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

assistant: ```c
char *e_mk_info_pt(char *str, char *node) {
  int i;
  char *ptmp, tmp[128];
  do {
    if (!(ptmp = strstr(str, node)))
      return (NULL);
    while (*ptmp && *ptmp != ',' && *ptmp != ':')
      ptmp++;
    if (!*ptmp)
      return (NULL);
  } while (*ptmp == ',');
  for (ptmp++; isspace(*ptmp); ptmp++)
    ;
  for (i = 0; (tmp[i] = ptmp[i]) && ptmp[i] != ',' && ptmp[i] != '\n'; i++)
    ;
  tmp[i] = '\0';
  if (i == 0)
    return (NULL);
  ptmp = malloc((strlen(tmp) + 1) * sizeof(char));
  strcpy(ptmp, tmp);
  return (ptmp);
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<e_mk_info_pt>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  call   <strstr@plt>
  mov    %rax,%rbp
  movabs $0x400100000000001,%rcx
  jmp    L22
L196:
  mov    %rbp,%rax
L55:
  add    $0x1,%rax
  movzbl (%rax),%edx
  cmp    $0x3a,%dl
  ja     L55
  bt     %rdx,%rcx
  jae    L55
L120:
  test   %dl,%dl
  je     L139
  cmp    $0x2c,%dl
  jne    L30
L22:
  test   %rbp,%rbp
  je     L35
  movzbl 0x0(%rbp),%edx
  cmp    $0x3a,%dl
  ja     L196
  mov    %rbp,%rax
  bt     %rdx,%rcx
  jae    L55
  jmp    L120
L30:
  lea    0x1(%rax),%rbx
  jmp    L105
L101:
  add    $0x1,%rbx
L105:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L101
  movzbl (%rbx),%eax
  mov    %al,(%rsp)
  cmp    $0x2c,%al
  ja     L144
  mov    $0x0,%ebp
  movabs $0x100000000401,%rdx
  bt     %rax,%rdx
  jb     L35
  mov    $0x1,%eax
  jmp    L43
L144:
  mov    $0x1,%eax
L43:
  movabs $0x100000000401,%rsi
  jmp    L59
L139:
  mov    $0x0,%ebp
L35:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  mov    %rbp,%rax
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  ret
L45:
  add    $0x1,%rax
L59:
  mov    %eax,%ecx
  movzbl (%rbx,%rax,1),%edx
  mov    %dl,(%rsp,%rax,1)
  cmp    $0x2c,%dl
  ja     L45
  add    $0x1,%rax
  bt     %rdx,%rsi
  jae    L59
  movslq %ecx,%rax
  movb   $0x0,(%rsp,%rax,1)
  mov    $0x0,%ebp
  test   %ecx,%ecx
  je     L35
  mov    %rsp,%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %rbx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L35
L5:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *e_mk_info_pt(char *str, char *node) {
  int i;
  char *ptmp, tmp[128];
  do {
    if (!(ptmp = strstr(str, node)))
      return (NULL);
    while (*ptmp && *ptmp != ',' && *ptmp != ':')
      ptmp++;
    if (!*ptmp)
      return (NULL);
  } while (*ptmp == ',');
  for (ptmp++; isspace(*ptmp); ptmp++)
    ;
  for (i = 0; (tmp[i] = ptmp[i]) && ptmp[i] != ',' && ptmp[i] != '\n'; i++)
    ;
  tmp[i] = '\0';
  if (i == 0)
    return (NULL);
  ptmp = malloc((strlen(tmp) + 1) * sizeof(char));
  strcpy(ptmp, tmp);
  return (ptmp);
}
```
user: Translate the below assembly code into C programming language:

```asm
<e_mk_info_pt>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x90,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  call   <strstr@plt>
  nopw   0x0(%rax,%rax,1)
L15:
  test   %rax,%rax
  je     L110
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L44
  mov    %rax,%rcx
  cmp    $0x2c,%dl
  jne    L104
  jmp    L44
  nopl   0x0(%rax)
L175:
  test   %dl,%dl
  je     L110
  cmp    $0x2c,%dl
  je     L39
L104:
  mov    %edx,%esi
  mov    %rcx,%rdi
  movzbl 0x1(%rcx),%edx
  add    $0x1,%rcx
  cmp    $0x3a,%sil
  jne    L175
L8:
  lea    0x1(%rdi),%rbx
  jmp    L176
  nopw   0x0(%rax,%rax,1)
L169:
  add    $0x1,%rbx
L176:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L169
  movzbl (%rbx),%eax
  mov    %al,(%rsp)
  cmp    $0x2c,%al
  jbe    L160
L170:
  mov    $0x1,%eax
  mov    %rsp,%rbp
  movabs $0xffffeffffffffbfe,%rsi
  nopl   (%rax)
L162:
  movzbl (%rbx,%rax,1),%edx
  movslq %eax,%rcx
  mov    %dl,0x0(%rbp,%rax,1)
  add    $0x1,%rax
  cmp    $0x2c,%dl
  ja     L162
  bt     %rdx,%rsi
  jb     L162
  mov    %rbp,%rdi
  movb   $0x0,(%rsp,%rcx,1)
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rbp,%rsi
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strcpy@plt>
  jmp    L103
L44:
  mov    %rax,%rcx
  nopl   0x0(%rax)
L39:
  test   %dl,%dl
  je     L110
  cmp    $0x2c,%dl
  je     L15
  mov    %rcx,%rdi
  jmp    L8
  nopl   (%rax)
L160:
  movabs $0xffffeffffffffbfe,%rdx
  bt     %rax,%rdx
  jb     L170
  nopl   0x0(%rax)
L110:
  xor    %r12d,%r12d
L103:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L143
  add    $0x90,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L143:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *e_mk_info_pt(char *str, char *node) {
  int i;
  char *ptmp, tmp[128];
  do {
    if (!(ptmp = strstr(str, node)))
      return (NULL);
    while (*ptmp && *ptmp != ',' && *ptmp != ':')
      ptmp++;
    if (!*ptmp)
      return (NULL);
  } while (*ptmp == ',');
  for (ptmp++; isspace(*ptmp); ptmp++)
    ;
  for (i = 0; (tmp[i] = ptmp[i]) && ptmp[i] != ',' && ptmp[i] != '\n'; i++)
    ;
  tmp[i] = '\0';
  if (i == 0)
    return (NULL);
  ptmp = malloc((strlen(tmp) + 1) * sizeof(char));
  strcpy(ptmp, tmp);
  return (ptmp);
}
```
user: Translate the below assembly code into C programming language:

```asm
<e_mk_info_pt>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x90,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  call   <strstr@plt>
  nopw   0x0(%rax,%rax,1)
L50:
  test   %rax,%rax
  je     L7
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L157
  mov    %rax,%rcx
  cmp    $0x2c,%dl
  jne    L96
  jmp    L157
  nopl   0x0(%rax)
L21:
  test   %dl,%dl
  je     L7
  cmp    $0x2c,%dl
  je     L154
L96:
  mov    %edx,%esi
  mov    %rcx,%rdi
  movzbl 0x1(%rcx),%edx
  add    $0x1,%rcx
  cmp    $0x3a,%sil
  jne    L21
L67:
  lea    0x1(%rdi),%rbx
  jmp    L92
  nopw   0x0(%rax,%rax,1)
L126:
  add    $0x1,%rbx
L92:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L126
  movzbl (%rbx),%eax
  mov    %al,(%rsp)
  cmp    $0x2c,%al
  jbe    L167
L78:
  mov    $0x1,%eax
  mov    %rsp,%rbp
  movabs $0xffffeffffffffbfe,%rsi
  nopl   (%rax)
L156:
  movzbl (%rbx,%rax,1),%edx
  movslq %eax,%rcx
  mov    %dl,0x0(%rbp,%rax,1)
  add    $0x1,%rax
  cmp    $0x2c,%dl
  ja     L156
  bt     %rdx,%rsi
  jb     L156
  mov    %rbp,%rdi
  movb   $0x0,(%rsp,%rcx,1)
  call   <strlen@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rbp,%rsi
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strcpy@plt>
  jmp    L54
L157:
  mov    %rax,%rcx
  nopl   0x0(%rax)
L154:
  test   %dl,%dl
  je     L7
  cmp    $0x2c,%dl
  je     L50
  mov    %rcx,%rdi
  jmp    L67
  nopl   (%rax)
L167:
  movabs $0xffffeffffffffbfe,%rdx
  bt     %rax,%rdx
  jb     L78
  nopl   0x0(%rax)
L7:
  xor    %r12d,%r12d
L54:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L130
  add    $0x90,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L130:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *e_mk_info_pt(char *str, char *node) {
  int i;
  char *ptmp, tmp[128];
  do {
    if (!(ptmp = strstr(str, node)))
      return (NULL);
    while (*ptmp && *ptmp != ',' && *ptmp != ':')
      ptmp++;
    if (!*ptmp)
      return (NULL);
  } while (*ptmp == ',');
  for (ptmp++; isspace(*ptmp); ptmp++)
    ;
  for (i = 0; (tmp[i] = ptmp[i]) && ptmp[i] != ',' && ptmp[i] != '\n'; i++)
    ;
  tmp[i] = '\0';
  if (i == 0)
    return (NULL);
  ptmp = malloc((strlen(tmp) + 1) * sizeof(char));
  strcpy(ptmp, tmp);
  return (ptmp);
}
```