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

```asm
<RandomFunc>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    (%rdi),%eax
  sub    $0x3f60a4d,%eax
  mov    %eax,0x4(%rsp)
  mov    0x4(%rdi),%edx
  test   %edx,%edx
  je     L24
  lea    0x4(%rsp),%rax
  lea    -0x1(%rdx),%edx
  lea    0x8(%rsp,%rdx,4),%rdi
L7:
  movzwl 0x2(%rax),%edx
  movzwl (%rax),%ecx
  mov    %cx,0x2(%rax)
  mov    %dx,(%rax)
  add    $0x4,%rax
  cmp    %rdi,%rax
  jne    L7
L24:
  mov    0x4(%rsp),%eax
  sub    $0x49d17496,%eax
  mov    %eax,(%rsi)
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L21
  add    $0x18,%rsp
  ret
L21:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local1;
  unsigned short copy11;
  {
    state[0UL] = (input[0UL] + 914778474UL) - 981234615U;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      copy11 = *((unsigned short *)(&state[local1]) + 1);
      *((unsigned short *)(&state[local1]) + 1) = *((unsigned short *)(&state[local1]) + 0);
      *((unsigned short *)(&state[local1]) + 0) = copy11;
      local1++;
    }
    output[0UL] = (state[0UL] + 1047729131UL) + 2008774527U;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<RandomFunc>:
  endbr64
  mov    (%rdi),%eax
  sub    $0x4dc77ee3,%eax
  mov    %eax,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local1;
  unsigned short copy11;
  {
    state[0UL] = (input[0UL] + 914778474UL) - 981234615U;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      copy11 = *((unsigned short *)(&state[local1]) + 1);
      *((unsigned short *)(&state[local1]) + 1) = *((unsigned short *)(&state[local1]) + 0);
      *((unsigned short *)(&state[local1]) + 0) = copy11;
      local1++;
    }
    output[0UL] = (state[0UL] + 1047729131UL) + 2008774527U;
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<RandomFunc>:
  endbr64
  mov    (%rdi),%eax
  sub    $0x4dc77ee3,%eax
  mov    %eax,(%rsi)
  ret
```

assistant: ```c
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local1;
  unsigned short copy11;
  {
    state[0UL] = (input[0UL] + 914778474UL) - 981234615U;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      copy11 = *((unsigned short *)(&state[local1]) + 1);
      *((unsigned short *)(&state[local1]) + 1) = *((unsigned short *)(&state[local1]) + 0);
      *((unsigned short *)(&state[local1]) + 0) = copy11;
      local1++;
    }
    output[0UL] = (state[0UL] + 1047729131UL) + 2008774527U;
  }
}
```
user: Translate the below assembly code into C programming language:

```asm
<init>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    $0x0,%eax
  call   <gdb_init@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  leave
  ret
```

assistant: ```c
int init() {
  int rc = gdb_init();
  return rc;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<init>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x0,%eax
  call   <gdb_init@plt>
  add    $0x8,%rsp
  ret
```

assistant: ```c
int init() {
  int rc = gdb_init();
  return rc;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<init>:
  endbr64
  xor    %eax,%eax
  jmp    1050 <gdb_init@plt>
```

assistant: ```c
int init() {
  int rc = gdb_init();
  return rc;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<init>:
  endbr64
  xor    %eax,%eax
  jmp    1050 <gdb_init@plt>
```

assistant: ```c
int init() {
  int rc = gdb_init();
  return rc;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<general_field_next_none>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    %edx,-0x10(%rbp)
  mov    %ecx,-0x14(%rbp)
  mov    %r8d,-0x18(%rbp)
  jmp    L11
L15:
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <general_field_type@plt>
  cmp    %eax,-0x18(%rbp)
  jne    L50
  mov    $0x0,%eax
  jmp    L72
L50:
  addl   $0x1,-0xc(%rbp)
  subl   $0x1,-0x14(%rbp)
L11:
  mov    -0xc(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jge    L25
  cmpl   $0x0,-0x14(%rbp)
  jne    L15
L25:
  cmpl   $0x0,-0x14(%rbp)
  je     L9
  mov    -0xc(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jne    L43
L9:
  mov    $0x1,%eax
  jmp    L72
L43:
  mov    $0x0,%eax
L72:
  leave
  ret
```

assistant: ```c
int general_field_next_none(char *general_field, int i, int general_field_len, int num, int type) {
  for (; i < general_field_len && num; i++, num--) {
    if (general_field_type(general_field, i) == type) {
      return 0;
    }
  }
  return num == 0 || i == general_field_len;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<general_field_next_none>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  mov    %edx,%r12d
  mov    %ecx,%ebp
  cmp    %edx,%esi
  jge    L19
  mov    %rdi,%r13
  mov    %r8d,%r14d
  test   %ecx,%ecx
  je     L19
L25:
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <general_field_type@plt>
  cmp    %r14d,%eax
  je     L18
  add    $0x1,%ebx
  sub    $0x1,%ebp
  cmp    %ebx,%r12d
  jle    L19
  test   %ebp,%ebp
  jne    L25
L19:
  test   %ebp,%ebp
  sete   %al
  cmp    %ebx,%r12d
  sete   %dl
  or     %edx,%eax
  movzbl %al,%eax
L50:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L18:
  mov    $0x0,%eax
  jmp    L50
```

assistant: ```c
int general_field_next_none(char *general_field, int i, int general_field_len, int num, int type) {
  for (; i < general_field_len && num; i++, num--) {
    if (general_field_type(general_field, i) == type) {
      return 0;
    }
  }
  return num == 0 || i == general_field_len;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<general_field_next_none>:
  endbr64
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %esi,%ebx
  cmp    %edx,%esi
  jge    L19
  mov    %rdi,%r12
  mov    %r8d,%r14d
  jmp    L14
  nop
L32:
  add    $0x1,%ebx
  sub    $0x1,%ebp
  cmp    %ebx,%r13d
  jle    L19
L14:
  test   %ebp,%ebp
  je     L19
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <general_field_type@plt>
  cmp    %r14d,%eax
  jne    L32
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L19:
  test   %ebp,%ebp
  sete   %al
  cmp    %ebx,%r13d
  pop    %rbx
  pop    %rbp
  sete   %dl
  pop    %r12
  pop    %r13
  or     %edx,%eax
  pop    %r14
  movzbl %al,%eax
  ret
```

assistant: ```c
int general_field_next_none(char *general_field, int i, int general_field_len, int num, int type) {
  for (; i < general_field_len && num; i++, num--) {
    if (general_field_type(general_field, i) == type) {
      return 0;
    }
  }
  return num == 0 || i == general_field_len;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<general_field_next_none>:
  endbr64
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %esi,%ebx
  cmp    %edx,%esi
  jge    L32
  mov    %rdi,%r12
  mov    %r8d,%r14d
  jmp    L43
  nop
L16:
  add    $0x1,%ebx
  sub    $0x1,%ebp
  cmp    %ebx,%r13d
  jle    L32
L43:
  test   %ebp,%ebp
  je     L32
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <general_field_type@plt>
  cmp    %r14d,%eax
  jne    L16
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L32:
  test   %ebp,%ebp
  sete   %al
  cmp    %ebx,%r13d
  pop    %rbx
  pop    %rbp
  sete   %dl
  pop    %r12
  pop    %r13
  or     %edx,%eax
  pop    %r14
  movzbl %al,%eax
  ret
```

assistant: ```c
int general_field_next_none(char *general_field, int i, int general_field_len, int num, int type) {
  for (; i < general_field_len && num; i++, num--) {
    if (general_field_type(general_field, i) == type) {
      return 0;
    }
  }
  return num == 0 || i == general_field_len;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<get_array_avg>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L4
L6:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    %eax,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L4:
  mov    -0x4(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L6
  mov    -0x8(%rbp),%eax
  cltd
  idivl  -0x1c(%rbp)
  pop    %rbp
  ret
```

assistant: ```c
int get_array_avg(int *a, int len) {
  int sum = 0;
  int i;
  for (i = 0; i < len; i++) {
    sum += a[i];
  }
  return sum / len;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<get_array_avg>:
  endbr64
  test   %esi,%esi
  jle    L29
  mov    %rdi,%rdx
  lea    -0x1(%rsi),%eax
  lea    0x4(%rdi,%rax,4),%rcx
  mov    $0x0,%eax
L21:
  add    (%rdx),%eax
  add    $0x4,%rdx
  cmp    %rcx,%rdx
  jne    L21
L19:
  cltd
  idiv   %esi
  ret
L29:
  mov    $0x0,%eax
  jmp    L19
```

assistant: ```c
int get_array_avg(int *a, int len) {
  int sum = 0;
  int i;
  for (i = 0; i < len; i++) {
    sum += a[i];
  }
  return sum / len;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<get_array_avg>:
  endbr64
  test   %esi,%esi
  jle    L19
  lea    -0x1(%rsi),%eax
  lea    0x4(%rdi,%rax,4),%rdx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L9:
  add    (%rdi),%eax
  add    $0x4,%rdi
  cmp    %rdx,%rdi
  jne    L9
  cltd
  idiv   %esi
  ret
  nopw   0x0(%rax,%rax,1)
L19:
  xor    %eax,%eax
  ret
```

assistant: ```c
int get_array_avg(int *a, int len) {
  int sum = 0;
  int i;
  for (i = 0; i < len; i++) {
    sum += a[i];
  }
  return sum / len;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<get_array_avg>:
  endbr64
  mov    %esi,%ecx
  test   %esi,%esi
  jle    L2
  lea    -0x1(%rsi),%eax
  cmp    $0x2,%eax
  jbe    L7
  mov    %esi,%edx
  mov    %rdi,%rax
  pxor   %xmm0,%xmm0
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rdi,%rdx,1),%rdx
  nopw   0x0(%rax,%rax,1)
L63:
  movdqu (%rax),%xmm2
  add    $0x10,%rax
  paddd  %xmm2,%xmm0
  cmp    %rdx,%rax
  jne    L63
  movdqa %xmm0,%xmm1
  mov    %ecx,%edx
  psrldq $0x8,%xmm1
  and    $0xfffffffc,%edx
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  test   $0x3,%cl
  je     L28
L32:
  movslq %edx,%rsi
  lea    0x0(,%rsi,4),%r8
  add    (%rdi,%rsi,4),%eax
  lea    0x1(%rdx),%esi
  cmp    %esi,%ecx
  jle    L28
  add    $0x2,%edx
  add    0x4(%rdi,%r8,1),%eax
  cmp    %edx,%ecx
  jle    L28
  add    0x8(%rdi,%r8,1),%eax
L28:
  cltd
  idiv   %ecx
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  xor    %eax,%eax
  ret
L7:
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L32
```

assistant: ```c
int get_array_avg(int *a, int len) {
  int sum = 0;
  int i;
  for (i = 0; i < len; i++) {
    sum += a[i];
  }
  return sum / len;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<eq>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movss  %xmm0,-0x4(%rbp)
  movss  %xmm1,-0x8(%rbp)
  mov    -0x4(%rbp),%eax
  movd   %eax,%xmm0
  call   <isUndefined@plt>
  test   %eax,%eax
  je     L11
  mov    -0x8(%rbp),%eax
  movd   %eax,%xmm0
  call   <isUndefined@plt>
  jmp    L3
L11:
  movss  -0x4(%rbp),%xmm0
  subss  -0x8(%rbp),%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  call   <fabs@plt>
  movsd  D9(%rip),%xmm1
  comisd %xmm0,%xmm1
  seta   %al
  movzbl %al,%eax
L3:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D9
type_guessed: f64

tool: D9: 0.0001

assistant: ```c
bool eq(float a, float b) {
  if (isUndefined(a)) {
    return isUndefined(b);
  }
  return fabs(a - b) < 0.0001;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<eq>:
  endbr64
  sub    $0x18,%rsp
  movss  %xmm0,0xc(%rsp)
  movss  %xmm1,0x8(%rsp)
  call   <isUndefined@plt>
  test   %eax,%eax
  jne    L10
  movss  0xc(%rsp),%xmm0
  subss  0x8(%rsp),%xmm0
  call   <fabs@plt>
  movsd  D5(%rip),%xmm1
  comisd %xmm0,%xmm1
  seta   %al
  movzbl %al,%eax
L1:
  add    $0x18,%rsp
  ret
L10:
  movss  0x8(%rsp),%xmm0
  call   <isUndefined@plt>
  jmp    L1
```

tool_calls: name: unpack_data
arguments: tag: D5
type_guessed: f64

tool: D5: 0.0001

assistant: ```c
bool eq(float a, float b) {
  if (isUndefined(a)) {
    return isUndefined(b);
  }
  return fabs(a - b) < 0.0001;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<eq>:
  endbr64
  sub    $0x18,%rsp
  movss  %xmm1,0xc(%rsp)
  movss  %xmm0,0x8(%rsp)
  call   <isUndefined@plt>
  movss  0x8(%rsp),%xmm0
  movss  0xc(%rsp),%xmm1
  test   %eax,%eax
  jne    L2
  subss  %xmm1,%xmm0
  call   <fabs@plt>
  movsd  D6(%rip),%xmm1
  xor    %eax,%eax
  comisd %xmm0,%xmm1
  seta   %al
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  movaps %xmm1,%xmm0
  add    $0x18,%rsp
  jmp    1070 <isUndefined@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D6
data_type: f64

tool: D6: 0.0001

assistant: ```c
bool eq(float a, float b) {
  if (isUndefined(a)) {
    return isUndefined(b);
  }
  return fabs(a - b) < 0.0001;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<eq>:
  endbr64
  sub    $0x18,%rsp
  movss  %xmm1,0xc(%rsp)
  movss  %xmm0,0x8(%rsp)
  call   <isUndefined@plt>
  movss  0x8(%rsp),%xmm0
  movss  0xc(%rsp),%xmm1
  test   %eax,%eax
  jne    L3
  subss  %xmm1,%xmm0
  call   <fabs@plt>
  movsd  D8(%rip),%xmm1
  xor    %eax,%eax
  comisd %xmm0,%xmm1
  seta   %al
  add    $0x18,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L3:
  movaps %xmm1,%xmm0
  add    $0x18,%rsp
  jmp    1070 <isUndefined@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D8
datatype: f64

tool: D8: 0.0001

assistant: ```c
bool eq(float a, float b) {
  if (isUndefined(a)) {
    return isUndefined(b);
  }
  return fabs(a - b) < 0.0001;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<longitud_string>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L12
L16:
  addq   $0x1,-0x18(%rbp)
  addl   $0x1,-0x4(%rbp)
L12:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L16
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int longitud_string(char *s) {
  int i;
  i = 0;
  while (*s != '\0') {
    s = s + 1;
    i++;
  }
  return i;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<longitud_string>:
  endbr64
  cmpb   $0x0,(%rdi)
  je     L16
  mov    $0x0,%eax
L1:
  add    $0x1,%rdi
  add    $0x1,%eax
  cmpb   $0x0,(%rdi)
  jne    L1
  ret
L16:
  mov    $0x0,%eax
  ret
```

assistant: ```c
int longitud_string(char *s) {
  int i;
  i = 0;
  while (*s != '\0') {
    s = s + 1;
    i++;
  }
  return i;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<longitud_string>:
  endbr64
  xor    %eax,%eax
  cmpb   $0x0,(%rdi)
  je     L8
  nopl   0x0(%rax,%rax,1)
L15:
  add    $0x1,%rdi
  add    $0x1,%eax
  cmpb   $0x0,(%rdi)
  jne    L15
  ret
  nopl   (%rax)
L8:
  ret
```

assistant: ```c
int longitud_string(char *s) {
  int i;
  i = 0;
  while (*s != '\0') {
    s = s + 1;
    i++;
  }
  return i;
}
```
user: What is the c source code of the assembly code below?

```asm
<longitud_string>:
  endbr64
  xor    %eax,%eax
  cmpb   $0x0,(%rdi)
  je     L9
  nopl   0x0(%rax,%rax,1)
L10:
  add    $0x1,%rdi
  add    $0x1,%eax
  cmpb   $0x0,(%rdi)
  jne    L10
  ret
  nopl   (%rax)
L9:
  ret
```

assistant: ```c
int longitud_string(char *s) {
  int i;
  i = 0;
  while (*s != '\0') {
    s = s + 1;
    i++;
  }
  return i;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<fprint_dec_direct>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x8(%rbp),%rax
  lea    D2(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  nop
  leave
  ret
```

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

tool: D2: DEC   0x%02X                      

assistant: ```c
void fprint_dec_direct(FILE *stream, uint8_t direct) {
  fprintf(stream,
          "DEC   "
          "0x%02X"
          "                      ",
          direct);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<fprint_dec_direct>:
  endbr64
  sub    $0x8,%rsp
  mov    %esi,%edx
  lea    D2(%rip),%rsi
  call   <fprintf@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D2
datatype: string

tool: D2: DEC   0x%02X                      

assistant: ```c
void fprint_dec_direct(FILE *stream, uint8_t direct) {
  fprintf(stream,
          "DEC   "
          "0x%02X"
          "                      ",
          direct);
}
```
user: Translate the below assembly code into C programming language:

```asm
<fprint_dec_direct>:
  endbr64
  mov    %esi,%edx
  lea    D5(%rip),%rsi
  jmp    1050 <fprintf@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D5
type: string

tool: D5: DEC   0x%02X                      

assistant: ```c
void fprint_dec_direct(FILE *stream, uint8_t direct) {
  fprintf(stream,
          "DEC   "
          "0x%02X"
          "                      ",
          direct);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<fprint_dec_direct>:
  endbr64
  mov    %esi,%edx
  lea    D3(%rip),%rsi
  jmp    1050 <fprintf@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D3
type_guessed: string

tool: D3: DEC   0x%02X                      

assistant: ```c
void fprint_dec_direct(FILE *stream, uint8_t direct) {
  fprintf(stream,
          "DEC   "
          "0x%02X"
          "                      ",
          direct);
}
```
user: What is the c source code of the assembly code below:

```asm
<uu_decode_line>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x20,%eax
  and    $0x3f,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x2d,-0x14(%rbp)
  jle    L85
  mov    $0x0,%eax
  jmp    L22
L85:
  movl   $0x1,-0x20(%rbp)
  jmp    L37
L35:
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xd,%al
  je     L8
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L83
L8:
  mov    -0x20(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  jmp    L59
L83:
  addl   $0x1,-0x20(%rbp)
L37:
  mov    -0x14(%rbp),%eax
  shl    $0x2,%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  add    $0x7,%eax
  cmp    %eax,-0x20(%rbp)
  jle    L35
L59:
  mov    -0x34(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x20,%eax
  and    $0x3f,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  lea    -0xb(%rax),%edx
  mov    -0x14(%rbp),%eax
  shl    $0x2,%eax
  cmp    %eax,%edx
  movl   $0x1,-0x1c(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L87
L10:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <uu_decode_word24@plt>
  addl   $0x4,-0x1c(%rbp)
  addl   $0x3,-0x20(%rbp)
L87:
  mov    -0x20(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L10
  mov    -0x14(%rbp),%eax
L22:
  leave
  ret
```

assistant: ```c
char uu_decode_line(void *dest, char *src_uu, uint8_t bytes) {
  uint8_t i, j;
  char *dest_p = (char *)dest;
  char *src_p = (char *)src_uu;
  uint8_t len;
  uint8_t len_check;
  len = 0;
  len_check = (src_p[0] - ' ') & 0x3F;
  if (len_check > 45)
    return 0;
  for (i = 1; i < len_check * 4 / 3 + 8; i++) {
    if ((src_uu[i] == '\r') || (src_uu[i] == '\n')) {
      len = i - 1;
      break;
    }
  }
  memset(dest, 0, bytes);
  len_check = (src_p[0] - ' ') & 0x3F;
  if (((len_check * 4) <= (len * 3 - 12)) || (len_check * 4) > (len * 3)) {
    ;
  }
  j = 1;
  for (i = 0; i < len; i += 3) {
    uu_decode_word24(&dest_p[i], &src_p[j]);
    j += 4;
  }
  return len_check;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<uu_decode_line>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbp
  mov    %edx,%esi
  movsbl 0x0(%rbp),%edx
  sub    $0x20,%edx
  and    $0x3f,%edx
  mov    $0x0,%eax
  cmp    $0x2d,%edx
  jg     L26
  mov    %rdi,%r12
  shl    $0x2,%edx
  movslq %edx,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  lea    0x8(%rdx),%ecx
  mov    $0x1,%eax
L49:
  mov    %eax,%r13d
  movzbl 0x0(%rbp,%rax,1),%edx
  cmp    $0xd,%dl
  je     L10
  cmp    $0xa,%dl
  je     L10
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L49
  mov    %esi,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  movsbl 0x0(%rbp),%r14d
  sub    $0x20,%r14d
  and    $0x3f,%r14d
  jmp    L20
L10:
  sub    $0x1,%r13d
  mov    %esi,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  movsbl 0x0(%rbp),%r14d
  sub    $0x20,%r14d
  and    $0x3f,%r14d
  test   %r13d,%r13d
  jle    L20
  add    $0x1,%rbp
  mov    $0x0,%ebx
L62:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <uu_decode_word24@plt>
  add    $0x3,%ebx
  add    $0x3,%r12
  add    $0x4,%rbp
  cmp    %ebx,%r13d
  jg     L62
L20:
  mov    %r14d,%eax
L26:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
char uu_decode_line(void *dest, char *src_uu, uint8_t bytes) {
  uint8_t i, j;
  char *dest_p = (char *)dest;
  char *src_p = (char *)src_uu;
  uint8_t len;
  uint8_t len_check;
  len = 0;
  len_check = (src_p[0] - ' ') & 0x3F;
  if (len_check > 45)
    return 0;
  for (i = 1; i < len_check * 4 / 3 + 8; i++) {
    if ((src_uu[i] == '\r') || (src_uu[i] == '\n')) {
      len = i - 1;
      break;
    }
  }
  memset(dest, 0, bytes);
  len_check = (src_p[0] - ' ') & 0x3F;
  if (((len_check * 4) <= (len * 3 - 12)) || (len_check * 4) > (len * 3)) {
    ;
  }
  j = 1;
  for (i = 0; i < len; i += 3) {
    uu_decode_word24(&dest_p[i], &src_p[j]);
    j += 4;
  }
  return len_check;
}
```