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

```asm
<timestop>:
  endbr64
  push   %rbx
  xor    %esi,%esi
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <gettimeofday@plt>
  movslq (%rsp),%rax
  mov    %rax,%rdx
  imul   $0x10624dd3,%rax,%rax
  sar    $0x1f,%edx
  sar    $0x26,%rax
  sub    %edx,%eax
  imul   $0x3e8,0x4(%rsp),%edx
  add    %edx,%eax
  cltq
  sub    %rbx,%rax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L2
  add    $0x10,%rsp
  pop    %rbx
  ret
L2:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
unsigned long timestop(unsigned long start) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (tv.tv_usec / 1000) + (tv.tv_sec * 1000) - start;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<DumpArray>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  movl   $0x0,-0x8(%rbp)
  movb   $0x0,-0x9(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L47
L39:
  mov    -0x4(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  test   %edx,%edx
  jne    L6
  mov    $0xa,%edi
  call   <putchar@plt>
L6:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  movsbl -0x9(%rbp),%eax
  mov    %eax,%edi
  call   <isprint@plt>
  test   %rax,%rax
  je     L30
  movsbl -0x9(%rbp),%eax
  jmp    L1
L30:
  mov    $0x2e,%eax
L1:
  movsbl -0x9(%rbp),%ecx
  mov    %eax,%edx
  mov    %ecx,%esi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L47:
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L39
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D18
type: string
name: read_data
arguments: data_tag: D6
type: string

tool: D18: (0x%2x) %c

tool: D6: 


assistant: ```c
void DumpArray(char *arrayData, int len) {
  int idx = 0;
  char c = 0;
  int vals = 0;
  for (idx = 0; idx < len; ++idx, ++vals) {
    if ((vals % 10) == 0) {
      printf("\n");
    }
    c = arrayData[idx];
    printf("(0x%2x) %c", c, (isprint(c) ? c : '.'));
  }
  printf("\n\n");
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<DumpArray>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %esi,%esi
  jle    L12
  mov    %rdi,%r12
  mov    %esi,%ebp
  mov    $0x0,%ebx
  lea    D2(%rip),%r13
  jmp    L24
L11:
  movsbl (%r12,%rbx,1),%r14d
  mov    %r14d,%edi
  call   <isprint@plt>
  test   %rax,%rax
  mov    $0x2e,%edx
  cmovne %r14d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  je     L12
L24:
  movslq %ebx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %ebx,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  cmp    %ebx,%eax
  jne    L11
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L11
L12:
  lea    D19(%rip),%rdi
  call   <puts@plt>
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: parse_data
arguments: tag: D2
datatype: string
name: parse_data
arguments: tag: D19
datatype: string

tool: D2: (0x%2x) %c

tool: D19: 


assistant: ```c
void DumpArray(char *arrayData, int len) {
  int idx = 0;
  char c = 0;
  int vals = 0;
  for (idx = 0; idx < len; ++idx, ++vals) {
    if ((vals % 10) == 0) {
      printf("\n");
    }
    c = arrayData[idx];
    printf("(0x%2x) %c", c, (isprint(c) ? c : '.'));
  }
  printf("\n\n");
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<DumpArray>:
  endbr64
  test   %esi,%esi
  jle    L6
  push   %r15
  lea    D18(%rip),%r15
  push   %r14
  mov    $0x2e,%r14d
  push   %r13
  mov    %rdi,%r13
  push   %r12
  movslq %esi,%r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  jmp    L22
  nopl   0x0(%rax)
L14:
  movsbl 0x0(%r13,%rbx,1),%ebp
  mov    %ebp,%edi
  call   <isprint@plt>
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %r15,%rdi
  test   %rax,%rax
  cmovne %ebp,%edx
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %r12,%rbx
  je     L9
L22:
  imul   $0xcccccccd,%ebx,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  ja     L14
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L14
  xchg   %ax,%ax
L9:
  add    $0x8,%rsp
  lea    D26(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <puts@plt>
  nopw   0x0(%rax,%rax,1)
L6:
  lea    D26(%rip),%rdi
  jmp    1090 <puts@plt>
```

tool_calls: name: disassemble_data
arguments: label: D18
type: string
name: disassemble_data
arguments: label: D26
type: string

tool: D18: (0x%2x) %c

tool: D26: 


assistant: ```c
void DumpArray(char *arrayData, int len) {
  int idx = 0;
  char c = 0;
  int vals = 0;
  for (idx = 0; idx < len; ++idx, ++vals) {
    if ((vals % 10) == 0) {
      printf("\n");
    }
    c = arrayData[idx];
    printf("(0x%2x) %c", c, (isprint(c) ? c : '.'));
  }
  printf("\n\n");
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<DumpArray>:
  endbr64
  test   %esi,%esi
  jle    L21
  push   %r14
  push   %r13
  lea    D22(%rip),%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  movslq %esi,%rbp
  push   %rbx
  xor    %ebx,%ebx
  nopl   0x0(%rax,%rax,1)
L14:
  imul   $0xcccccccd,%ebx,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  jbe    L15
L25:
  movsbl (%r12,%rbx,1),%r14d
  mov    %r14d,%edi
  call   <isprint@plt>
  test   %rax,%rax
  jne    L67
  mov    $0x2e,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L14
L52:
  pop    %rbx
  lea    D12(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1090 <puts@plt>
  cs nopw 0x0(%rax,%rax,1)
L67:
  mov    %r14d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  je     L52
  imul   $0xcccccccd,%ebx,%eax
  ror    %eax
  cmp    $0x19999999,%eax
  ja     L25
L15:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L25
  nopl   0x0(%rax)
L21:
  lea    D12(%rip),%rdi
  jmp    1090 <puts@plt>
```

tool_calls: name: disassemble_data
arguments: label: D22
type_guessed: string
name: disassemble_data
arguments: label: D12
type_guessed: string

tool: D22: (0x%2x) %c

tool: D12: 


assistant: ```c
void DumpArray(char *arrayData, int len) {
  int idx = 0;
  char c = 0;
  int vals = 0;
  for (idx = 0; idx < len; ++idx, ++vals) {
    if ((vals % 10) == 0) {
      printf("\n");
    }
    c = arrayData[idx];
    printf("(0x%2x) %c", c, (isprint(c) ? c : '.'));
  }
  printf("\n\n");
}
```
user: What is the c source code of the assembly code below:

```asm
<func_float>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movss  %xmm0,-0x4(%rbp)
  movss  %xmm1,-0x8(%rbp)
  movss  -0x8(%rbp),%xmm0
  mov    -0x4(%rbp),%eax
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  movss  -0x4(%rbp),%xmm0
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D6
type_infered: string

tool: D6: %f %f


assistant: ```c
float func_float(float f1, float f2) {
  printf("%f %f\n", f1, f2);
  return f1;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<func_float>:
  endbr64
  sub    $0x18,%rsp
  movss  %xmm0,0xc(%rsp)
  lea    D6(%rip),%rdi
  call   <printf@plt>
  movss  0xc(%rsp),%xmm0
  add    $0x18,%rsp
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D6
type: string

tool: D6: %f %f


assistant: ```c
float func_float(float f1, float f2) {
  printf("%f %f\n", f1, f2);
  return f1;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<func_float>:
  endbr64
  sub    $0x18,%rsp
  lea    D2(%rip),%rdi
  movss  %xmm0,0xc(%rsp)
  call   <printf@plt>
  movss  0xc(%rsp),%xmm0
  add    $0x18,%rsp
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D2
data_type: string

tool: D2: %f %f


assistant: ```c
float func_float(float f1, float f2) {
  printf("%f %f\n", f1, f2);
  return f1;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<func_float>:
  endbr64
  sub    $0x18,%rsp
  lea    D5(%rip),%rdi
  movss  %xmm0,0xc(%rsp)
  call   <printf@plt>
  movss  0xc(%rsp),%xmm0
  add    $0x18,%rsp
  ret
```

tool_calls: name: read_data
arguments: tag: D5
type: string

tool: D5: %f %f


assistant: ```c
float func_float(float f1, float f2) {
  printf("%f %f\n", f1, f2);
  return f1;
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<testConfigPath>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  lea    D0(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L13
  mov    $0x0,%eax
  jmp    L2
L13:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x1,%eax
L2:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D0
datatype: string

tool: D0: rb

assistant: ```c
int testConfigPath(const char *path) {
  FILE *file;
  if ((file = fopen(path, "rb")) == NULL)
    return (0);
  fclose(file);
  return ((!0));
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<testConfigPath>:
  endbr64
  sub    $0x8,%rsp
  lea    D0(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%rdi
  mov    $0x0,%eax
  test   %rdi,%rdi
  je     L6
  call   <fclose@plt>
  mov    $0x1,%eax
L6:
  add    $0x8,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: label: D0
type_guessed: string

tool: D0: rb

assistant: ```c
int testConfigPath(const char *path) {
  FILE *file;
  if ((file = fopen(path, "rb")) == NULL)
    return (0);
  fclose(file);
  return ((!0));
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<testConfigPath>:
  endbr64
  sub    $0x8,%rsp
  lea    D6(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%rdi
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L9
  call   <fclose@plt>
  mov    $0x1,%eax
L9:
  add    $0x8,%rsp
  ret
```

tool_calls: name: read_data
arguments: label: D6
data_type: string

tool: D6: rb

assistant: ```c
int testConfigPath(const char *path) {
  FILE *file;
  if ((file = fopen(path, "rb")) == NULL)
    return (0);
  fclose(file);
  return ((!0));
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<testConfigPath>:
  endbr64
  sub    $0x8,%rsp
  lea    D9(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%rdi
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L9
  call   <fclose@plt>
  mov    $0x1,%eax
L9:
  add    $0x8,%rsp
  ret
```

tool_calls: name: parse_data
arguments: data_label: D9
type_guessed: string

tool: D9: rb

assistant: ```c
int testConfigPath(const char *path) {
  FILE *file;
  if ((file = fopen(path, "rb")) == NULL)
    return (0);
  fclose(file);
  return ((!0));
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<search>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  mov    %rdi,-0x28(%rbp)
  movl   $0x16,-0x14(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L2
L0:
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  lea    D7(%rip),%rax
  mov    (%rdx,%rax,1),%r12
  mov    -0x28(%rbp),%rbx
  jmp    L53
L9:
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L42
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  lea    D10(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  jmp    L72
L42:
  add    $0x1,%rbx
  add    $0x1,%r12
L53:
  movzbl (%rbx),%edx
  movzbl (%r12),%eax
  cmp    %al,%dl
  je     L9
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L66
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  lea    D10(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  jmp    L72
L66:
  addl   $0x1,-0x18(%rbp)
L2:
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jle    L0
  mov    $0x119,%eax
L72:
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

assistant: ```c
search(name) char *name;
{
  static struct kword {
    char *word;
    int val;
  } kwt[] = {"no", 261, "frame", 268, "draw", 262, "file", 269, "nodes", 274, "labels", 266, "component", 267, "off", 272, "format", 276, "plot", 280, "on", 271, "x", 263, "y", 264, "to", 273, "yes", 270, "auto", 278, "summary", 265, "xp", 277, "size", 275, "shift", 279, "diamonds", 258, "squares", 259, "triangles", 260};
  int i, last = sizeof(kwt) / sizeof(struct kword) - 1;
  register char *s, *t;
  for (i = 0; i <= last; i++) {
    s = kwt[i].word;
    t = name;
    for (; *t == *s; t++, s++) {
      if (*t == '\0')
        return (kwt[i].val);
    }
    if (*t == '\0')
      return (kwt[i].val);
  }
  return (281);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<search>:
  endbr64
  movzbl (%rdi),%r9d
  lea    D27(%rip),%r8
  mov    $0x0,%esi
L22:
  mov    (%r8),%rcx
  cmp    (%rcx),%r9b
  jne    L28
  mov    %r9d,%edx
  mov    $0x1,%eax
L40:
  test   %dl,%dl
  je     L33
  movzbl (%rdi,%rax,1),%edx
  add    $0x1,%rax
  cmp    -0x1(%rcx,%rax,1),%dl
  je     L40
L49:
  test   %dl,%dl
  je     L57
  add    $0x1,%esi
  add    $0x10,%r8
  cmp    $0x17,%esi
  jne    L22
  mov    $0x119,%eax
  ret
L33:
  movslq %esi,%rsi
  shl    $0x4,%rsi
  lea    D27(%rip),%rax
  mov    0x8(%rax,%rsi,1),%eax
  ret
L28:
  mov    %r9d,%edx
  jmp    L49
L57:
  movslq %esi,%rsi
  shl    $0x4,%rsi
  lea    D27(%rip),%rax
  mov    0x8(%rax,%rsi,1),%eax
  ret
```

assistant: ```c
search(name) char *name;
{
  static struct kword {
    char *word;
    int val;
  } kwt[] = {"no", 261, "frame", 268, "draw", 262, "file", 269, "nodes", 274, "labels", 266, "component", 267, "off", 272, "format", 276, "plot", 280, "on", 271, "x", 263, "y", 264, "to", 273, "yes", 270, "auto", 278, "summary", 265, "xp", 277, "size", 275, "shift", 279, "diamonds", 258, "squares", 259, "triangles", 260};
  int i, last = sizeof(kwt) / sizeof(struct kword) - 1;
  register char *s, *t;
  for (i = 0; i <= last; i++) {
    s = kwt[i].word;
    t = name;
    for (; *t == *s; t++, s++) {
      if (*t == '\0')
        return (kwt[i].val);
    }
    if (*t == '\0')
      return (kwt[i].val);
  }
  return (281);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<search>:
  endbr64
  movzbl (%rdi),%r8d
  lea    D8(%rip),%r9
  mov    $0x6e,%eax
  xor    %esi,%esi
  lea    D7(%rip),%rcx
L21:
  mov    %r8d,%edx
  cmp    %al,%r8b
  jne    L1
  mov    $0x1,%eax
  jmp    L46
  nopl   0x0(%rax)
L45:
  movzbl (%rdi,%rax,1),%edx
  add    $0x1,%rax
  cmp    -0x1(%rcx,%rax,1),%dl
  jne    L1
L46:
  test   %dl,%dl
  jne    L45
L37:
  movslq %esi,%rsi
  lea    D26(%rip),%rax
  shl    $0x4,%rsi
  mov    0x8(%rax,%rsi,1),%eax
  ret
  nopl   (%rax)
L1:
  test   %dl,%dl
  je     L37
  add    $0x1,%esi
  cmp    $0x17,%esi
  je     L53
  mov    (%r9),%rcx
  add    $0x10,%r9
  movzbl (%rcx),%eax
  jmp    L21
L53:
  mov    $0x119,%eax
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D7
type_infered: string

tool: D7: no

assistant: ```c
search(name) char *name;
{
  static struct kword {
    char *word;
    int val;
  } kwt[] = {"no", 261, "frame", 268, "draw", 262, "file", 269, "nodes", 274, "labels", 266, "component", 267, "off", 272, "format", 276, "plot", 280, "on", 271, "x", 263, "y", 264, "to", 273, "yes", 270, "auto", 278, "summary", 265, "xp", 277, "size", 275, "shift", 279, "diamonds", 258, "squares", 259, "triangles", 260};
  int i, last = sizeof(kwt) / sizeof(struct kword) - 1;
  register char *s, *t;
  for (i = 0; i <= last; i++) {
    s = kwt[i].word;
    t = name;
    for (; *t == *s; t++, s++) {
      if (*t == '\0')
        return (kwt[i].val);
    }
    if (*t == '\0')
      return (kwt[i].val);
  }
  return (281);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<search>:
  endbr64
  lea    D2(%rip),%r10
  movzbl (%rdi),%r9d
  mov    $0x6e,%eax
  xor    %esi,%esi
  mov    %r10,%r8
L15:
  mov    (%r8),%rcx
  mov    %r9d,%edx
  cmp    %al,%r9b
  jne    L8
  mov    $0x1,%eax
  jmp    L66
  nopl   0x0(%rax,%rax,1)
L11:
  movzbl (%rdi,%rax,1),%edx
  add    $0x1,%rax
  cmp    -0x1(%rcx,%rax,1),%dl
  jne    L8
L66:
  test   %dl,%dl
  jne    L11
L12:
  movslq %esi,%rsi
  shl    $0x4,%rsi
  mov    0x8(%r10,%rsi,1),%eax
  ret
  nop
L8:
  test   %dl,%dl
  je     L12
  add    $0x1,%esi
  add    $0x10,%r8
  cmp    $0x17,%esi
  je     L44
  mov    (%r8),%rax
  movzbl (%rax),%eax
  jmp    L15
L44:
  mov    $0x119,%eax
  ret
```

assistant: ```c
search(name) char *name;
{
  static struct kword {
    char *word;
    int val;
  } kwt[] = {"no", 261, "frame", 268, "draw", 262, "file", 269, "nodes", 274, "labels", 266, "component", 267, "off", 272, "format", 276, "plot", 280, "on", 271, "x", 263, "y", 264, "to", 273, "yes", 270, "auto", 278, "summary", 265, "xp", 277, "size", 275, "shift", 279, "diamonds", 258, "squares", 259, "triangles", 260};
  int i, last = sizeof(kwt) / sizeof(struct kword) - 1;
  register char *s, *t;
  for (i = 0; i <= last; i++) {
    s = kwt[i].word;
    t = name;
    for (; *t == *s; t++, s++) {
      if (*t == '\0')
        return (kwt[i].val);
    }
    if (*t == '\0')
      return (kwt[i].val);
  }
  return (281);
}
```
user: What is the c source code of the assembly code below?

```asm
<mat33_chol>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    -0x20(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x20(%rbp),%rax
  add    $0x18,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x20(%rbp),%rax
  add    $0x30,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm2
  mov    -0x20(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  mov    -0x20(%rbp),%rdx
  lea    0x20(%rdx),%rbx
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  mov    -0x18(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm2
  mov    -0x20(%rbp),%rax
  add    $0x30,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x20(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm1
  mov    -0x20(%rbp),%rax
  add    $0x38,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x40,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%rax
  add    $0x30,%rax
  movsd  (%rax),%xmm2
  mov    -0x20(%rbp),%rax
  add    $0x30,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x20(%rbp),%rax
  add    $0x38,%rax
  movsd  (%rax),%xmm2
  mov    -0x20(%rbp),%rax
  add    $0x38,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  mov    -0x20(%rbp),%rdx
  lea    0x40(%rdx),%rbx
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  mov    -0x20(%rbp),%rax
  add    $0x8,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  add    $0x10,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x20(%rbp),%rax
  add    $0x28,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void mat33_chol(const double *A, double *R) {
  R[0] = sqrt(A[0]);
  R[3] = A[1] / R[0];
  R[6] = A[2] / R[0];
  R[4] = sqrt(A[4] - R[3] * R[3]);
  R[7] = (A[5] - R[3] * R[6]) / R[4];
  R[8] = sqrt(A[8] - R[6] * R[6] - R[7] * R[7]);
  R[1] = 0;
  R[2] = 0;
  R[5] = 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<mat33_chol>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %rsi,%rbx
  movsd  (%rdi),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L7
  sqrtsd %xmm0,%xmm0
L33:
  movsd  %xmm0,(%rbx)
  movsd  0x8(%r12),%xmm1
  divsd  %xmm0,%xmm1
  movq   %xmm1,%r13
  movsd  %xmm1,0x18(%rbx)
  movsd  0x10(%r12),%xmm1
  divsd  %xmm0,%xmm1
  movq   %xmm1,%rbp
  movsd  %xmm1,0x30(%rbx)
  movq   %r13,%xmm1
  mulsd  %xmm1,%xmm1
  movsd  0x20(%r12),%xmm0
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L26
  sqrtsd %xmm0,%xmm0
L1:
  movsd  %xmm0,0x20(%rbx)
  movq   %r13,%xmm2
  movq   %rbp,%xmm4
  mulsd  %xmm4,%xmm2
  movsd  0x28(%r12),%xmm1
  subsd  %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x38(%rbx)
  movq   %rbp,%xmm2
  mulsd  %xmm4,%xmm2
  movsd  0x40(%r12),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L0
  sqrtsd %xmm0,%xmm0
L32:
  movsd  %xmm0,0x40(%rbx)
  movq   $0x0,0x8(%rbx)
  movq   $0x0,0x10(%rbx)
  movq   $0x0,0x28(%rbx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L7:
  call   <sqrt@plt>
  jmp    L33
L26:
  call   <sqrt@plt>
  jmp    L1
L0:
  call   <sqrt@plt>
  jmp    L32
```

assistant: ```c
void mat33_chol(const double *A, double *R) {
  R[0] = sqrt(A[0]);
  R[3] = A[1] / R[0];
  R[6] = A[2] / R[0];
  R[4] = sqrt(A[4] - R[3] * R[3]);
  R[7] = (A[5] - R[3] * R[6]) / R[4];
  R[8] = sqrt(A[8] - R[6] * R[6] - R[7] * R[7]);
  R[1] = 0;
  R[2] = 0;
  R[5] = 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<mat33_chol>:
  endbr64
  sub    $0x28,%rsp
  movsd  (%rdi),%xmm0
  pxor   %xmm4,%xmm4
  ucomisd %xmm0,%xmm4
  ja     L54
  sqrtsd %xmm0,%xmm0
L7:
  movsd  %xmm0,(%rsi)
  movsd  0x8(%rdi),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsi)
  movsd  0x10(%rdi),%xmm2
  movapd %xmm1,%xmm3
  mulsd  %xmm1,%xmm3
  divsd  %xmm0,%xmm2
  movsd  %xmm2,0x30(%rsi)
  movsd  0x20(%rdi),%xmm0
  subsd  %xmm3,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L3
  sqrtsd %xmm0,%xmm0
L8:
  movapd %xmm1,%xmm3
  movsd  %xmm0,0x20(%rsi)
  movsd  0x28(%rdi),%xmm1
  mulsd  %xmm2,%xmm3
  mulsd  %xmm2,%xmm2
  subsd  %xmm3,%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x38(%rsi)
  mulsd  %xmm1,%xmm1
  movsd  0x40(%rdi),%xmm0
  subsd  %xmm2,%xmm0
  subsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L33
  sqrtsd %xmm0,%xmm0
L17:
  movq   $0x0,0x8(%rsi)
  movq   $0x0,0x10(%rsi)
  movq   $0x0,0x28(%rsi)
  movsd  %xmm0,0x40(%rsi)
  add    $0x28,%rsp
  ret
L54:
  mov    %rsi,0x8(%rsp)
  mov    %rdi,(%rsp)
  call   <sqrt@plt>
  mov    0x8(%rsp),%rsi
  mov    (%rsp),%rdi
  pxor   %xmm4,%xmm4
  jmp    L7
L33:
  mov    %rsi,(%rsp)
  call   <sqrt@plt>
  mov    (%rsp),%rsi
  jmp    L17
L3:
  mov    %rsi,0x18(%rsp)
  mov    %rdi,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  call   <sqrt@plt>
  mov    0x18(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  pxor   %xmm4,%xmm4
  movsd  0x8(%rsp),%xmm2
  movsd  (%rsp),%xmm1
  jmp    L8
```

assistant: ```c
void mat33_chol(const double *A, double *R) {
  R[0] = sqrt(A[0]);
  R[3] = A[1] / R[0];
  R[6] = A[2] / R[0];
  R[4] = sqrt(A[4] - R[3] * R[3]);
  R[7] = (A[5] - R[3] * R[6]) / R[4];
  R[8] = sqrt(A[8] - R[6] * R[6] - R[7] * R[7]);
  R[1] = 0;
  R[2] = 0;
  R[5] = 0;
}
```