ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  lea    D48(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rsi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  cmp    $0x9,%eax
  ja     L108
  test   %eax,%eax
  je     L7
L129:
  cmpl   $0x1,0x4(%rsp)
  je     L135
L20:
  cmpl   $0x2,0x4(%rsp)
  je     L67
L197:
  cmpl   $0x3,0x4(%rsp)
  je     L147
L179:
  cmpl   $0x4,0x4(%rsp)
  je     L198
L201:
  cmpl   $0x5,0x4(%rsp)
  je     L180
L48:
  cmpl   $0x6,0x4(%rsp)
  je     L219
L144:
  cmpl   $0x7,0x4(%rsp)
  je     L155
L186:
  cmpl   $0x8,0x4(%rsp)
  je     L27
L21:
  cmpl   $0x9,0x4(%rsp)
  je     L65
L108:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L46
  xor    %eax,%eax
  add    $0x18,%rsp
  ret
L7:
  lea    D7(%rip),%rdi
  call   <printf@plt>
  jmp    L129
L135:
  lea    D10(%rip),%rdi
  call   <printf@plt>
  jmp    L20
L67:
  lea    D100(%rip),%rdi
  call   <printf@plt>
  jmp    L197
L147:
  lea    D12(%rip),%rdi
  call   <printf@plt>
  jmp    L179
L198:
  lea    D21(%rip),%rdi
  call   <printf@plt>
  jmp    L201
L180:
  lea    D104(%rip),%rdi
  call   <printf@plt>
  jmp    L48
L219:
  lea    D28(%rip),%rdi
  call   <printf@plt>
  jmp    L144
L155:
  lea    D107(%rip),%rdi
  call   <printf@plt>
  jmp    L186
L27:
  lea    D20(%rip),%rdi
  call   <printf@plt>
  jmp    L21
L65:
  lea    D108(%rip),%rdi
  call   <printf@plt>
  jmp    L108
L46:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D48
type_infered: string
name: extract_symbolic_data
arguments: tag: D7
type_infered: string
name: extract_symbolic_data
arguments: tag: D10
type_infered: string
name: extract_symbolic_data
arguments: tag: D100
type_infered: string
name: extract_symbolic_data
arguments: tag: D12
type_infered: string
name: extract_symbolic_data
arguments: tag: D21
type_infered: string
name: extract_symbolic_data
arguments: tag: D104
type_infered: string
name: extract_symbolic_data
arguments: tag: D28
type_infered: string
name: extract_symbolic_data
arguments: tag: D107
type_infered: string
name: extract_symbolic_data
arguments: tag: D20
type_infered: string
name: extract_symbolic_data
arguments: tag: D108
type_infered: string

tool: D48: %d

tool: D7: 
zero

tool: D10: 
one

tool: D100: 
two

tool: D12: three

tool: D21: four

tool: D104: five

tool: D28: six

tool: D107: seven

tool: D20: eight

tool: D108: nine

assistant: ```c
int main() {
  int a;
  scanf("%d", &a);
  if (a >= 0 && a <= 9) {
    if (a == 0) {
      printf("\nzero");
    }
    if (a == 1) {
      printf("\none");
    }
    if (a == 2) {
      printf("\ntwo");
    }
    if (a == 3) {
      printf("three");
    }
    if (a == 4) {
      printf("four");
    }
    if (a == 5) {
      printf("five");
    }
    if (a == 6) {
      printf("six");
    }
    if (a == 7) {
      printf("seven");
    }
    if (a == 8) {
      printf("eight");
    }
    if (a == 9) {
      printf("nine");
    }
  }
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  lea    D75(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rsi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  cmp    $0x9,%eax
  ja     L157
  test   %eax,%eax
  je     L18
L158:
  cmpl   $0x1,0x4(%rsp)
  je     L102
L152:
  cmpl   $0x2,0x4(%rsp)
  je     L24
L160:
  cmpl   $0x3,0x4(%rsp)
  je     L14
L188:
  cmpl   $0x4,0x4(%rsp)
  je     L141
L129:
  cmpl   $0x5,0x4(%rsp)
  je     L130
L108:
  cmpl   $0x6,0x4(%rsp)
  je     L69
L217:
  cmpl   $0x7,0x4(%rsp)
  je     L214
L28:
  cmpl   $0x8,0x4(%rsp)
  je     L96
L125:
  cmpl   $0x9,0x4(%rsp)
  je     L211
L157:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  xor    %eax,%eax
  add    $0x18,%rsp
  ret
L18:
  lea    D48(%rip),%rdi
  call   <printf@plt>
  jmp    L158
L102:
  lea    D6(%rip),%rdi
  call   <printf@plt>
  jmp    L152
L24:
  lea    D20(%rip),%rdi
  call   <printf@plt>
  jmp    L160
L14:
  lea    D63(%rip),%rdi
  call   <printf@plt>
  jmp    L188
L141:
  lea    D103(%rip),%rdi
  call   <printf@plt>
  jmp    L129
L130:
  lea    D108(%rip),%rdi
  call   <printf@plt>
  jmp    L108
L69:
  lea    D24(%rip),%rdi
  call   <printf@plt>
  jmp    L217
L214:
  lea    D47(%rip),%rdi
  call   <printf@plt>
  jmp    L28
L96:
  lea    D81(%rip),%rdi
  call   <printf@plt>
  jmp    L125
L211:
  lea    D2(%rip),%rdi
  call   <printf@plt>
  jmp    L157
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D75
type_infered: string
name: read_data
arguments: tag: D48
type_infered: string
name: read_data
arguments: tag: D6
type_infered: string
name: read_data
arguments: tag: D20
type_infered: string
name: read_data
arguments: tag: D63
type_infered: string
name: read_data
arguments: tag: D103
type_infered: string
name: read_data
arguments: tag: D108
type_infered: string
name: read_data
arguments: tag: D24
type_infered: string
name: read_data
arguments: tag: D47
type_infered: string
name: read_data
arguments: tag: D81
type_infered: string
name: read_data
arguments: tag: D2
type_infered: string

tool: D75: %d

tool: D48: 
zero

tool: D6: 
one

tool: D20: 
two

tool: D63: three

tool: D103: four

tool: D108: five

tool: D24: six

tool: D47: seven

tool: D81: eight

tool: D2: nine

assistant: ```c
int main() {
  int a;
  scanf("%d", &a);
  if (a >= 0 && a <= 9) {
    if (a == 0) {
      printf("\nzero");
    }
    if (a == 1) {
      printf("\none");
    }
    if (a == 2) {
      printf("\ntwo");
    }
    if (a == 3) {
      printf("three");
    }
    if (a == 4) {
      printf("four");
    }
    if (a == 5) {
      printf("five");
    }
    if (a == 6) {
      printf("six");
    }
    if (a == 7) {
      printf("seven");
    }
    if (a == 8) {
      printf("eight");
    }
    if (a == 9) {
      printf("nine");
    }
  }
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<multiplyBy2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L1
L15:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm0,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L1:
  mov    -0x4(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L15
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void multiplyBy2(float array[], int n) {
  int i;
  for (i = 0; i < n; ++i) {
    array[i] *= 2;
  }
}
```
user: What is the c source code of the assembly code below?

```asm
<multiplyBy2>:
  endbr64
  test   %esi,%esi
  jle    L5
  mov    %rdi,%rax
  lea    -0x1(%rsi),%edx
  lea    0x4(%rdi,%rdx,4),%rdx
L9:
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm0
  movss  %xmm0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L9
L5:
  ret
```

assistant: ```c
void multiplyBy2(float array[], int n) {
  int i;
  for (i = 0; i < n; ++i) {
    array[i] *= 2;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<multiplyBy2>:
  endbr64
  test   %esi,%esi
  jle    L18
  lea    -0x1(%rsi),%eax
  lea    0x4(%rdi,%rax,4),%rax
L13:
  movss  (%rdi),%xmm0
  add    $0x4,%rdi
  addss  %xmm0,%xmm0
  movss  %xmm0,-0x4(%rdi)
  cmp    %rax,%rdi
  jne    L13
L18:
  ret
```

assistant: ```c
void multiplyBy2(float array[], int n) {
  int i;
  for (i = 0; i < n; ++i) {
    array[i] *= 2;
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<multiplyBy2>:
  endbr64
  mov    %rdi,%rdx
  test   %esi,%esi
  jle    L14
  lea    -0x1(%rsi),%eax
  cmp    $0x2,%eax
  jbe    L28
  mov    %esi,%ecx
  mov    %rdi,%rax
  shr    $0x2,%ecx
  sub    $0x1,%ecx
  shl    $0x4,%rcx
  lea    0x10(%rdi,%rcx,1),%rcx
  nopw   0x0(%rax,%rax,1)
L21:
  movups (%rax),%xmm0
  add    $0x10,%rax
  addps  %xmm0,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rcx,%rax
  jne    L21
  mov    %esi,%ecx
  and    $0xfffffffc,%ecx
  mov    %ecx,%eax
  cmp    %ecx,%esi
  je     L67
L3:
  sub    %ecx,%esi
  cmp    $0x1,%esi
  je     L15
  lea    (%rdx,%rcx,4),%rcx
  movq   (%rcx),%xmm0
  addps  %xmm0,%xmm0
  movlps %xmm0,(%rcx)
  mov    %esi,%ecx
  and    $0xfffffffe,%ecx
  add    %ecx,%eax
  cmp    %ecx,%esi
  je     L14
L15:
  cltq
  lea    (%rdx,%rax,4),%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm0
  movss  %xmm0,(%rax)
L14:
  ret
  nopl   0x0(%rax)
L67:
  ret
L28:
  xor    %ecx,%ecx
  xor    %eax,%eax
  jmp    L3
```

assistant: ```c
void multiplyBy2(float array[], int n) {
  int i;
  for (i = 0; i < n; ++i) {
    array[i] *= 2;
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movl   $0x0,-0x4(%rbp)
  jmp    L67
L61:
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L59
  movl   $0x0,-0x8(%rbp)
  jmp    L33
L63:
  mov    $0x0,%eax
  call   <t@plt>
  addl   $0x1,-0x8(%rbp)
L33:
  cmpl   $0x3e7,-0x8(%rbp)
  jle    L63
  jmp    L54
L59:
  movl   $0x0,-0x8(%rbp)
  jmp    L52
L7:
  mov    $0x0,%eax
  call   <tt@plt>
  addl   $0x1,-0x8(%rbp)
L52:
  cmpl   $0x3e7,-0x8(%rbp)
  jle    L7
L54:
  addl   $0x1,-0x4(%rbp)
L67:
  cmpl   $0x9,-0x4(%rbp)
  jle    L61
  mov    $0x1,%eax
  leave
  ret
```

assistant: ```c
int main() {
  int i, j;
  for (j = 0; j < 10; j++)
    if (j % 2 == 0)
      for (i = 0; i < 1000; i++)
        t();
    else
      for (i = 0; i < 1000; i++)
        tt();
  return 1;
}
```
user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    $0x0,%ebp
  jmp    L25
L36:
  mov    $0x3e8,%ebx
L28:
  mov    $0x0,%eax
  call   <tt@plt>
  sub    $0x1,%ebx
  jne    L28
L29:
  add    $0x1,%ebp
  cmp    $0xa,%ebp
  je     L58
L25:
  test   $0x1,%bpl
  jne    L36
  mov    $0x3e8,%ebx
L48:
  mov    $0x0,%eax
  call   <t@plt>
  sub    $0x1,%ebx
  jne    L48
  jmp    L29
L58:
  mov    $0x1,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
int main() {
  int i, j;
  for (j = 0; j < 10; j++)
    if (j % 2 == 0)
      for (i = 0; i < 1000; i++)
        t();
    else
      for (i = 0; i < 1000; i++)
        tt();
  return 1;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0x8,%rsp
  nopl   0x0(%rax)
L30:
  mov    $0x3e8,%ebx
  test   $0x1,%bpl
  jne    L15
  nopl   0x0(%rax,%rax,1)
L21:
  xor    %eax,%eax
  call   <t@plt>
  sub    $0x1,%ebx
  jne    L21
L44:
  add    $0x1,%ebp
  cmp    $0xa,%ebp
  jne    L30
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  ret
L15:
  xor    %eax,%eax
  call   <tt@plt>
  sub    $0x1,%ebx
  je     L44
  xor    %eax,%eax
  call   <tt@plt>
  sub    $0x1,%ebx
  jne    L15
  jmp    L44
```

assistant: ```c
int main() {
  int i, j;
  for (j = 0; j < 10; j++)
    if (j % 2 == 0)
      for (i = 0; i < 1000; i++)
        t();
    else
      for (i = 0; i < 1000; i++)
        tt();
  return 1;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0x8,%rsp
  nopl   0x0(%rax)
L18:
  mov    $0x3e8,%ebx
  test   $0x1,%bpl
  jne    L54
  nopl   0x0(%rax,%rax,1)
L42:
  xor    %eax,%eax
  call   <t@plt>
  sub    $0x1,%ebx
  jne    L42
L9:
  add    $0x1,%ebp
  cmp    $0xa,%ebp
  jne    L18
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  ret
L54:
  xor    %eax,%eax
  call   <tt@plt>
  sub    $0x1,%ebx
  je     L9
  xor    %eax,%eax
  call   <tt@plt>
  sub    $0x1,%ebx
  jne    L54
  jmp    L9
```

assistant: ```c
int main() {
  int i, j;
  for (j = 0; j < 10; j++)
    if (j % 2 == 0)
      for (i = 0; i < 1000; i++)
        t();
    else
      for (i = 0; i < 1000; i++)
        tt();
  return 1;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<adjust_mpz_bufsize>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    $0x4,%r8d
  mov    %rax,%rdi
  call   <adjust_bufsize@plt>
  jmp    L14
L15:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <mpz_init@plt>
L14:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  cmp    %rax,-0x8(%rbp)
  jb     L15
  nop
  nop
  leave
  ret
```

assistant: ```c
void adjust_mpz_bufsize(mpz_t **x, size_t *alloc_ptr, size_t size, size_t increment) {
  size_t old_alloc;
  old_alloc = *alloc_ptr;
  adjust_bufsize(x, alloc_ptr, size, increment, sizeof(**x));
  while (old_alloc < *alloc_ptr)
    mpz_init((*x)[old_alloc++]);
}
```
user: What is the c source code of the assembly code below?

```asm
<adjust_mpz_bufsize>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    (%rsi),%rbx
  mov    $0x4,%r8d
  call   <adjust_bufsize@plt>
  cmp    0x0(%rbp),%rbx
  jae    L11
L9:
  mov    (%r12),%rax
  mov    (%rax,%rbx,4),%edi
  call   <mpz_init@plt>
  add    $0x1,%rbx
  cmp    %rbx,0x0(%rbp)
  ja     L9
L11:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void adjust_mpz_bufsize(mpz_t **x, size_t *alloc_ptr, size_t size, size_t increment) {
  size_t old_alloc;
  old_alloc = *alloc_ptr;
  adjust_bufsize(x, alloc_ptr, size, increment, sizeof(**x));
  while (old_alloc < *alloc_ptr)
    mpz_init((*x)[old_alloc++]);
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<adjust_mpz_bufsize>:
  endbr64
  push   %r12
  mov    $0x4,%r8d
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    (%rsi),%rbx
  call   <adjust_bufsize@plt>
  cmp    0x0(%rbp),%rbx
  jae    L5
  nopw   0x0(%rax,%rax,1)
L18:
  mov    (%r12),%rax
  mov    (%rax,%rbx,4),%edi
  add    $0x1,%rbx
  call   <mpz_init@plt>
  cmp    %rbx,0x0(%rbp)
  ja     L18
L5:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void adjust_mpz_bufsize(mpz_t **x, size_t *alloc_ptr, size_t size, size_t increment) {
  size_t old_alloc;
  old_alloc = *alloc_ptr;
  adjust_bufsize(x, alloc_ptr, size, increment, sizeof(**x));
  while (old_alloc < *alloc_ptr)
    mpz_init((*x)[old_alloc++]);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<adjust_mpz_bufsize>:
  endbr64
  push   %r12
  mov    $0x4,%r8d
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    (%rsi),%rbx
  call   <adjust_bufsize@plt>
  cmp    0x0(%rbp),%rbx
  jae    L13
  nopw   0x0(%rax,%rax,1)
L10:
  mov    (%r12),%rax
  mov    (%rax,%rbx,4),%edi
  add    $0x1,%rbx
  call   <mpz_init@plt>
  cmp    %rbx,0x0(%rbp)
  ja     L10
L13:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void adjust_mpz_bufsize(mpz_t **x, size_t *alloc_ptr, size_t size, size_t increment) {
  size_t old_alloc;
  old_alloc = *alloc_ptr;
  adjust_bufsize(x, alloc_ptr, size, increment, sizeof(**x));
  while (old_alloc < *alloc_ptr)
    mpz_init((*x)[old_alloc++]);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<chdir>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    D10(%rip),%rax
  mov    (%rax),%edx
  mov    D7(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  pop    %rbp
  ret
```

assistant: ```c
int chdir(const char *path) {
  (void)path;
  errno = ENOSYS;
  return -1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<chdir>:
  endbr64
  mov    D17(%rip),%rax
  mov    (%rax),%edx
  mov    D8(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int chdir(const char *path) {
  (void)path;
  errno = ENOSYS;
  return -1;
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<chdir>:
  endbr64
  mov    D14(%rip),%rax
  mov    (%rax),%edx
  mov    D18(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int chdir(const char *path) {
  (void)path;
  errno = ENOSYS;
  return -1;
}
```
user: Translate the below assembly code into C programming language:

```asm
<chdir>:
  endbr64
  mov    D15(%rip),%rax
  mov    (%rax),%edx
  mov    D18(%rip),%rax
  mov    %edx,(%rax)
  mov    $0xffffffff,%eax
  ret
```

assistant: ```c
int chdir(const char *path) {
  (void)path;
  errno = ENOSYS;
  return -1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<longestUniqueSubsttr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x10(%rbp)
  movl   $0x1,-0x1c(%rbp)
  movl   $0x1,-0x18(%rbp)
  mov    $0x400,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L69
L87:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  addl   $0x1,-0x14(%rbp)
L69:
  cmpl   $0xff,-0x14(%rbp)
  jle    L87
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbq %al,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  movl   $0x1,-0x14(%rbp)
  jmp    L47
L26:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbq %al,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0xffffffff,-0xc(%rbp)
  je     L49
  mov    -0x14(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  cmp    %eax,-0xc(%rbp)
  jge    L73
L49:
  addl   $0x1,-0x1c(%rbp)
  jmp    L18
L73:
  mov    -0x1c(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jle    L51
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x18(%rbp)
L51:
  mov    -0x14(%rbp),%eax
  sub    -0xc(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
L18:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbq %al,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
L47:
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L26
  mov    -0x1c(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jle    L17
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x18(%rbp)
L17:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%eax
  leave
  ret
```

assistant: ```c
int longestUniqueSubsttr(char *str) {
  int n = strlen(str);
  int cur_len = 1;
  int max_len = 1;
  int prev_index;
  int i;
  int *visited = (int *)malloc(sizeof(int) * 256);
  for (i = 0; i < 256; i++)
    visited[i] = -1;
  visited[str[0]] = 0;
  for (i = 1; i < n; i++) {
    prev_index = visited[str[i]];
    if (prev_index == -1 || i - cur_len > prev_index)
      cur_len++;
    else {
      if (cur_len > max_len)
        max_len = cur_len;
      cur_len = i - prev_index;
    }
    visited[str[i]] = i;
  }
  if (cur_len > max_len)
    max_len = cur_len;
  free(visited);
  return max_len;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<longestUniqueSubsttr>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  call   <strlen@plt>
  mov    %eax,%ebp
  mov    $0x400,%edi
  call   <malloc@plt>
  mov    %rax,%r8
  lea    0x400(%rax),%rdx
L69:
  movl   $0xffffffff,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L69
  movsbq (%rbx),%rax
  movl   $0x0,(%r8,%rax,4)
  cmp    $0x1,%ebp
  jle    L37
  mov    %ebp,%r9d
  mov    $0x1,%eax
  mov    $0x1,%r10d
  mov    $0x1,%edx
  jmp    L66
L9:
  add    $0x1,%edx
L55:
  mov    %edi,(%rcx)
  add    $0x1,%rax
  cmp    %rax,%r9
  je     L15
L66:
  mov    %eax,%edi
  movsbq (%rbx,%rax,1),%rcx
  lea    (%r8,%rcx,4),%rcx
  mov    (%rcx),%esi
  cmp    $0xffffffff,%esi
  je     L9
  mov    %eax,%r11d
  sub    %edx,%r11d
  cmp    %esi,%r11d
  jg     L9
  cmp    %edx,%r10d
  cmovl  %edx,%r10d
  mov    %eax,%edx
  sub    %esi,%edx
  jmp    L55
L37:
  mov    $0x1,%r10d
  mov    $0x1,%edx
L15:
  cmp    %r10d,%edx
  mov    %r10d,%ebx
  cmovge %edx,%ebx
  mov    %r8,%rdi
  call   <free@plt>
  mov    %ebx,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
int longestUniqueSubsttr(char *str) {
  int n = strlen(str);
  int cur_len = 1;
  int max_len = 1;
  int prev_index;
  int i;
  int *visited = (int *)malloc(sizeof(int) * 256);
  for (i = 0; i < 256; i++)
    visited[i] = -1;
  visited[str[0]] = 0;
  for (i = 1; i < n; i++) {
    prev_index = visited[str[i]];
    if (prev_index == -1 || i - cur_len > prev_index)
      cur_len++;
    else {
      if (cur_len > max_len)
        max_len = cur_len;
      cur_len = i - prev_index;
    }
    visited[str[i]] = i;
  }
  if (cur_len > max_len)
    max_len = cur_len;
  free(visited);
  return max_len;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<longestUniqueSubsttr>:
  endbr64
  push   %r12
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  mov    $0x400,%edi
  mov    %eax,%r12d
  call   <malloc@plt>
  lea    0x8(%rax),%rdi
  mov    %rax,%rcx
  movq   $0xffffffffffffffff,(%rax)
  mov    %rax,%r8
  movq   $0xffffffffffffffff,0x3f8(%rax)
  and    $0xfffffffffffffff8,%rdi
  mov    $0xffffffffffffffff,%rax
  sub    %rdi,%rcx
  add    $0x400,%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
  movsbq (%rbx),%rax
  movl   $0x0,(%r8,%rax,4)
  cmp    $0x1,%r12d
  jle    L67
  movslq %r12d,%r9
  mov    $0x1,%eax
  mov    $0x1,%r11d
  mov    $0x1,%edx
  jmp    L43
  nopl   (%rax)
L56:
  mov    %eax,%r10d
  sub    %edx,%r10d
  cmp    %esi,%r10d
  jg     L8
  cmp    %edx,%r11d
  mov    %edi,(%rcx)
  cmovl  %edx,%r11d
  mov    %eax,%edx
  add    $0x1,%rax
  sub    %esi,%edx
  cmp    %rax,%r9
  je     L26
L43:
  movsbq (%rbx,%rax,1),%rcx
  mov    %eax,%edi
  lea    (%r8,%rcx,4),%rcx
  mov    (%rcx),%esi
  cmp    $0xffffffff,%esi
  jne    L56
L8:
  add    $0x1,%rax
  mov    %edi,(%rcx)
  add    $0x1,%edx
  cmp    %rax,%r9
  jne    L43
L26:
  cmp    %r11d,%edx
  cmovge %edx,%r11d
  mov    %r11d,%r12d
L4:
  mov    %r8,%rdi
  call   <free@plt>
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %r12
  ret
L67:
  mov    $0x1,%r12d
  jmp    L4
```

assistant: ```c
int longestUniqueSubsttr(char *str) {
  int n = strlen(str);
  int cur_len = 1;
  int max_len = 1;
  int prev_index;
  int i;
  int *visited = (int *)malloc(sizeof(int) * 256);
  for (i = 0; i < 256; i++)
    visited[i] = -1;
  visited[str[0]] = 0;
  for (i = 1; i < n; i++) {
    prev_index = visited[str[i]];
    if (prev_index == -1 || i - cur_len > prev_index)
      cur_len++;
    else {
      if (cur_len > max_len)
        max_len = cur_len;
      cur_len = i - prev_index;
    }
    visited[str[i]] = i;
  }
  if (cur_len > max_len)
    max_len = cur_len;
  free(visited);
  return max_len;
}
```