ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What would the C source look like for the assembly code provided here:

```asm
<GetRealTime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x20(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  test   %rax,%rax
  je     L18
  mov    $0x0,%edi
  call   <assert@plt>
L18:
  movsd  -0x20(%rbp),%xmm1
  movsd  -0x18(%rbp),%xmm2
  movsd  D0(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L11
  call   <__stack_chk_fail@plt>
L11:
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D0
type_infered: byte[8]

tool: {"D0": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

assistant: ```c
double GetRealTime(void) {
  struct timeval t;
  if (0 != gettimeofday(&t, NULL))
    assert(0);
  return t.tv_sec + 1.e-6 * t.tv_usec;
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<GetRealTime>:
  endbr64
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  test   %rax,%rax
  jne    L17
L28:
  movsd  D8(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  addsd  (%rsp),%xmm0
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  add    $0x28,%rsp
  ret
L17:
  mov    $0x0,%edi
  call   <assert@plt>
  jmp    L28
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D8
type: byte[8]

tool: {"D8": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

assistant: ```c
double GetRealTime(void) {
  struct timeval t;
  if (0 != gettimeofday(&t, NULL))
    assert(0);
  return t.tv_sec + 1.e-6 * t.tv_usec;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<GetRealTime>:
  endbr64
  sub    $0x28,%rsp
  xor    %esi,%esi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <gettimeofday@plt>
  test   %rax,%rax
  jne    L17
L12:
  movsd  D7(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  addsd  (%rsp),%xmm0
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  add    $0x28,%rsp
  ret
  nop
L17:
  xor    %edi,%edi
  call   <assert@plt>
  jmp    L12
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D7
type_guessed: byte[8]

tool: {"D7": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

assistant: ```c
double GetRealTime(void) {
  struct timeval t;
  if (0 != gettimeofday(&t, NULL))
    assert(0);
  return t.tv_sec + 1.e-6 * t.tv_usec;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<GetRealTime>:
  endbr64
  sub    $0x28,%rsp
  xor    %esi,%esi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  call   <gettimeofday@plt>
  test   %rax,%rax
  jne    L9
L0:
  movsd  D3(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  addsd  (%rsp),%xmm0
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L27
  add    $0x28,%rsp
  ret
  nop
L9:
  xor    %edi,%edi
  call   <assert@plt>
  jmp    L0
L27:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D3
data_type: byte[8]

tool: {"D3": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

assistant: ```c
double GetRealTime(void) {
  struct timeval t;
  if (0 != gettimeofday(&t, NULL))
    assert(0);
  return t.tv_sec + 1.e-6 * t.tv_usec;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<cleanup>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <chdir@plt>
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <system@plt>
  mov    $0x0,%eax
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: tag: D11
type_guessed: string
name: unpack_data
arguments: tag: D12
type_guessed: string

tool: D11: ../

tool: D12: rm -rf sandbox

assistant: ```c
int cleanup() {
  chdir("../");
  system("rm -rf sandbox");
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<cleanup>:
  endbr64
  sub    $0x8,%rsp
  lea    D9(%rip),%rdi
  call   <chdir@plt>
  lea    D11(%rip),%rdi
  call   <system@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: read_data
arguments: data_label: D9
datatype: string
name: read_data
arguments: data_label: D11
datatype: string

tool: D9: ../

tool: D11: rm -rf sandbox

assistant: ```c
int cleanup() {
  chdir("../");
  system("rm -rf sandbox");
  return 0;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<cleanup>:
  endbr64
  sub    $0x8,%rsp
  lea    D1(%rip),%rdi
  call   <chdir@plt>
  lea    D10(%rip),%rdi
  call   <system@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: disassemble_data
arguments: label: D1
data_type: string
name: disassemble_data
arguments: label: D10
data_type: string

tool: D1: ../

tool: D10: rm -rf sandbox

assistant: ```c
int cleanup() {
  chdir("../");
  system("rm -rf sandbox");
  return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<cleanup>:
  endbr64
  sub    $0x8,%rsp
  lea    D18(%rip),%rdi
  call   <chdir@plt>
  lea    D5(%rip),%rdi
  call   <system@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: read_data
arguments: data_label: D18
type_guessed: string
name: read_data
arguments: data_label: D5
type_guessed: string

tool: D18: ../

tool: D5: rm -rf sandbox

assistant: ```c
int cleanup() {
  chdir("../");
  system("rm -rf sandbox");
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<find_CA_descriptor_by_pid>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  jmp    L17
L6:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    %eax,-0x14(%rbp)
  addq   $0x8,-0x28(%rbp)
  subl   $0x2,-0x2c(%rbp)
  cmpl   $0x9,-0x18(%rbp)
  jne    L23
  cmpl   $0x3,-0x14(%rbp)
  jle    L23
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  or     %edx,%eax
  cltq
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  shl    $0x8,%eax
  and    $0x1f00,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  or     %edx,%eax
  cltq
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jne    L23
  mov    -0x38(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    $0x1,%eax
  jmp    L52
L23:
  mov    -0x14(%rbp),%eax
  sub    %eax,-0x2c(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x28(%rbp)
L17:
  cmpl   $0x1,-0x2c(%rbp)
  jg     L6
  mov    $0x0,%eax
L52:
  pop    %rbp
  ret
```

assistant: ```c
int find_CA_descriptor_by_pid(uint8_t *data, int data_len, uint16_t *caid, uint16_t pid) {
  while (data_len >= 2) {
    uint8_t tag = data[0];
    uint8_t this_length = data[1];
    data += 2;
    data_len -= 2;
    if (tag == 9 && this_length >= 4) {
      uint16_t CA_ID = (data[0] << 8) | data[1];
      uint16_t CA_PID = ((data[2] & 0x1F) << 8) | data[3];
      if (CA_PID == pid) {
        *caid = CA_ID;
        return 1;
      }
    }
    data_len -= this_length;
    data += this_length;
  }
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<find_CA_descriptor_by_pid>:
  endbr64
  mov    %rdx,%r8
  cmp    $0x1,%esi
  jg     L13
  mov    $0x0,%eax
  ret
L9:
  sub    %eax,%esi
  cltq
  lea    0x8(%rdi,%rax,4),%rdi
  cmp    $0x1,%esi
  jle    L5
L13:
  mov    0x4(%rdi),%eax
  sub    $0x2,%esi
  cmpl   $0x9,(%rdi)
  jne    L9
  cmp    $0x3,%eax
  jle    L9
  mov    0x10(%rdi),%edx
  shl    $0x8,%edx
  and    $0x1f00,%edx
  or     0x14(%rdi),%edx
  movslq %edx,%rdx
  cmp    %rcx,%rdx
  jne    L9
  mov    0x8(%rdi),%eax
  shl    $0x8,%eax
  or     0xc(%rdi),%eax
  cltq
  mov    %rax,(%r8)
  mov    $0x1,%eax
  ret
L5:
  mov    $0x0,%eax
  ret
```

assistant: ```c
int find_CA_descriptor_by_pid(uint8_t *data, int data_len, uint16_t *caid, uint16_t pid) {
  while (data_len >= 2) {
    uint8_t tag = data[0];
    uint8_t this_length = data[1];
    data += 2;
    data_len -= 2;
    if (tag == 9 && this_length >= 4) {
      uint16_t CA_ID = (data[0] << 8) | data[1];
      uint16_t CA_PID = ((data[2] & 0x1F) << 8) | data[3];
      if (CA_PID == pid) {
        *caid = CA_ID;
        return 1;
      }
    }
    data_len -= this_length;
    data += this_length;
  }
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<find_CA_descriptor_by_pid>:
  endbr64
  mov    %rdx,%r8
  cmp    $0x1,%esi
  jle    L37
  nopl   0x0(%rax)
L24:
  sub    $0x2,%esi
  cmpl   $0x9,(%rdi)
  movslq 0x4(%rdi),%rax
  jne    L32
  cmp    $0x3,%eax
  jle    L32
  mov    0x10(%rdi),%edx
  shl    $0x8,%edx
  and    $0x1f00,%edx
  or     0x14(%rdi),%edx
  movslq %edx,%rdx
  cmp    %rcx,%rdx
  je     L39
L32:
  sub    %eax,%esi
  lea    0x8(%rdi,%rax,4),%rdi
  cmp    $0x1,%esi
  jg     L24
L37:
  xor    %eax,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L39:
  mov    0x8(%rdi),%eax
  shl    $0x8,%eax
  or     0xc(%rdi),%eax
  cltq
  mov    %rax,(%r8)
  mov    $0x1,%eax
  ret
```

assistant: ```c
int find_CA_descriptor_by_pid(uint8_t *data, int data_len, uint16_t *caid, uint16_t pid) {
  while (data_len >= 2) {
    uint8_t tag = data[0];
    uint8_t this_length = data[1];
    data += 2;
    data_len -= 2;
    if (tag == 9 && this_length >= 4) {
      uint16_t CA_ID = (data[0] << 8) | data[1];
      uint16_t CA_PID = ((data[2] & 0x1F) << 8) | data[3];
      if (CA_PID == pid) {
        *caid = CA_ID;
        return 1;
      }
    }
    data_len -= this_length;
    data += this_length;
  }
  return 0;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<find_CA_descriptor_by_pid>:
  endbr64
  mov    %rdx,%r8
  cmp    $0x1,%esi
  jle    L32
  nopl   0x0(%rax)
L47:
  sub    $0x2,%esi
  cmpl   $0x9,(%rdi)
  movslq 0x4(%rdi),%rax
  jne    L7
  cmp    $0x3,%eax
  jle    L7
  mov    0x10(%rdi),%edx
  shl    $0x8,%edx
  and    $0x1f00,%edx
  or     0x14(%rdi),%edx
  movslq %edx,%rdx
  cmp    %rcx,%rdx
  je     L19
L7:
  sub    %eax,%esi
  lea    0x8(%rdi,%rax,4),%rdi
  cmp    $0x1,%esi
  jg     L47
L32:
  xor    %eax,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L19:
  mov    0x8(%rdi),%eax
  shl    $0x8,%eax
  or     0xc(%rdi),%eax
  cltq
  mov    %rax,(%r8)
  mov    $0x1,%eax
  ret
```

assistant: ```c
int find_CA_descriptor_by_pid(uint8_t *data, int data_len, uint16_t *caid, uint16_t pid) {
  while (data_len >= 2) {
    uint8_t tag = data[0];
    uint8_t this_length = data[1];
    data += 2;
    data_len -= 2;
    if (tag == 9 && this_length >= 4) {
      uint16_t CA_ID = (data[0] << 8) | data[1];
      uint16_t CA_PID = ((data[2] & 0x1F) << 8) | data[3];
      if (CA_PID == pid) {
        *caid = CA_ID;
        return 1;
      }
    }
    data_len -= this_length;
    data += this_length;
  }
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<floating_hash>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L8
L33:
  mov    -0x2c(%rbp),%eax
  add    $0x3,%eax
  cmp    %eax,-0x3c(%rbp)
  jg     L7
  movq   $0x0,-0x10(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L52
L62:
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%edx
  mov    -0x24(%rbp),%eax
  cltq
  mov    %dl,-0x10(%rbp,%rax,1)
  addl   $0x1,-0x24(%rbp)
L52:
  mov    -0x3c(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  cmp    %eax,-0x24(%rbp)
  jl     L62
  mov    -0x10(%rbp),%rax
  test   %rax,%rax
  je     L30
  movss  -0x10(%rbp),%xmm0
  movss  -0x28(%rbp),%xmm1
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x28(%rbp)
  jmp    L30
L7:
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  movss  -0x18(%rbp),%xmm0
  movss  -0x28(%rbp),%xmm1
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x28(%rbp)
  addq   $0x4,-0x38(%rbp)
L30:
  addl   $0x4,-0x2c(%rbp)
L8:
  mov    -0x2c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L33
  movss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

assistant: ```c
unsigned long floating_hash(unsigned char *s, int len) {
  int i;
  float h = 1 / 19;
  float *p = (float *)s;
  union ucast {
    unsigned char s[4];
    unsigned long i;
    float f;
  };
  union ucast t;
  for (i = 0; i < len; i += 4) {
    if (i + 4 > len) {
      union ucast ui;
      int j;
      ui.i = 0;
      for (j = 0; j < (len - i); j++) {
        ui.s[j] = *s++;
      }
      if (ui.i)
        h *= (ui.f);
    } else {
      t.i = *(unsigned long *)s;
      h *= t.f;
      s += 4;
    }
  }
  t.f = h;
  return t.i;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<floating_hash>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rcx
  mov    %rcx,0x8(%rsp)
  xor    %ecx,%ecx
  test   %esi,%esi
  jle    L19
  mov    %rdi,%rdx
  mov    %esi,%edi
  lea    -0x4(%rsi),%r9d
  lea    -0x1(%rsi),%ecx
  and    $0xfffffffc,%ecx
  sub    %ecx,%r9d
  mov    %esi,%ecx
  pxor   %xmm0,%xmm0
  lea    0x3(%rsi),%r10d
  jmp    L74
L56:
  movq   $0x0,(%rsp)
  mov    %ecx,%r11d
  test   %ecx,%ecx
  jle    L3
  mov    $0x0,%esi
L10:
  movzbl (%rdx,%rsi,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  add    $0x1,%rsi
  cmp    %esi,%r11d
  jg     L10
  mov    %ecx,%esi
  add    %rsi,%rdx
  cmpq   $0x0,(%rsp)
  je     L3
  mulss  (%rsp),%xmm0
L3:
  sub    $0x4,%ecx
  cmp    %r9d,%ecx
  je     L11
L74:
  mov    %r10d,%esi
  sub    %ecx,%esi
  cmp    %esi,%edi
  jle    L56
  mov    (%rdx),%rax
  mulss  (%rdx),%xmm0
  add    $0x4,%rdx
  jmp    L3
L19:
  pxor   %xmm0,%xmm0
L11:
  movd   %xmm0,%edx
  movabs $0xffffffff00000000,%rcx
  and    %rcx,%rax
  or     %rdx,%rax
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L48
  add    $0x18,%rsp
  ret
L48:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
unsigned long floating_hash(unsigned char *s, int len) {
  int i;
  float h = 1 / 19;
  float *p = (float *)s;
  union ucast {
    unsigned char s[4];
    unsigned long i;
    float f;
  };
  union ucast t;
  for (i = 0; i < len; i += 4) {
    if (i + 4 > len) {
      union ucast ui;
      int j;
      ui.i = 0;
      for (j = 0; j < (len - i); j++) {
        ui.s[j] = *s++;
      }
      if (ui.i)
        h *= (ui.f);
    } else {
      t.i = *(unsigned long *)s;
      h *= t.f;
      s += 4;
    }
  }
  t.f = h;
  return t.i;
}
```
user: 这段汇编代码用C语言表示是什么样的:

```asm
<floating_hash>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  jle    L14
  lea    -0x1(%rsi),%ebx
  lea    -0x5(%rsi),%r8d
  mov    %rdi,%rbp
  mov    %esi,%r12d
  pxor   %xmm0,%xmm0
  lea    0x2(%rsi),%r14d
  lea    0x10(%rsp),%rcx
  mov    %ebx,%eax
  and    $0xfffffffc,%eax
  sub    %eax,%r8d
  jmp    L6
  xchg   %ax,%ax
L75:
  mulss  0x0(%rbp),%xmm0
  mov    0x0(%rbp),%r13
  add    $0x4,%rbp
L9:
  sub    $0x4,%ebx
  cmp    %r8d,%ebx
  je     L71
L6:
  mov    %r14d,%edx
  sub    %ebx,%edx
  cmp    %edx,%r12d
  jg     L75
  mov    %ebx,%r15d
  mov    %rbp,%rsi
  mov    %rcx,%rdi
  mov    %r8d,0xc(%rsp)
  add    $0x1,%r15
  movss  %xmm0,0x8(%rsp)
  movq   $0x0,0x10(%rsp)
  mov    %r15,%rdx
  add    %r15,%rbp
  call   <memcpy@plt>
  cmpq   $0x0,0x10(%rsp)
  movss  0x8(%rsp),%xmm0
  mov    0xc(%rsp),%r8d
  mov    %rax,%rcx
  je     L9
  mulss  0x10(%rsp),%xmm0
  sub    $0x4,%ebx
  cmp    %r8d,%ebx
  jne    L6
  nop
L71:
  movabs $0xffffffff00000000,%rax
  movd   %xmm0,%edx
  and    %r13,%rax
  or     %rdx,%rax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L72
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L14:
  pxor   %xmm0,%xmm0
  jmp    L71
L72:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
unsigned long floating_hash(unsigned char *s, int len) {
  int i;
  float h = 1 / 19;
  float *p = (float *)s;
  union ucast {
    unsigned char s[4];
    unsigned long i;
    float f;
  };
  union ucast t;
  for (i = 0; i < len; i += 4) {
    if (i + 4 > len) {
      union ucast ui;
      int j;
      ui.i = 0;
      for (j = 0; j < (len - i); j++) {
        ui.s[j] = *s++;
      }
      if (ui.i)
        h *= (ui.f);
    } else {
      t.i = *(unsigned long *)s;
      h *= t.f;
      s += 4;
    }
  }
  t.f = h;
  return t.i;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<floating_hash>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  jle    L60
  lea    -0x1(%rsi),%ebx
  lea    -0x5(%rsi),%r8d
  mov    %rdi,%rbp
  mov    %esi,%r12d
  pxor   %xmm0,%xmm0
  lea    0x2(%rsi),%r14d
  lea    0x10(%rsp),%rcx
  mov    %ebx,%eax
  and    $0xfffffffc,%eax
  sub    %eax,%r8d
  jmp    L57
  xchg   %ax,%ax
L47:
  mulss  0x0(%rbp),%xmm0
  mov    0x0(%rbp),%r13
  add    $0x4,%rbp
L49:
  sub    $0x4,%ebx
  cmp    %r8d,%ebx
  je     L16
L57:
  mov    %r14d,%edx
  sub    %ebx,%edx
  cmp    %edx,%r12d
  jg     L47
  mov    %ebx,%r15d
  mov    %rbp,%rsi
  mov    %rcx,%rdi
  mov    %r8d,0xc(%rsp)
  add    $0x1,%r15
  movss  %xmm0,0x8(%rsp)
  movq   $0x0,0x10(%rsp)
  mov    %r15,%rdx
  add    %r15,%rbp
  call   <memcpy@plt>
  cmpq   $0x0,0x10(%rsp)
  movss  0x8(%rsp),%xmm0
  mov    0xc(%rsp),%r8d
  mov    %rax,%rcx
  je     L49
  mulss  0x10(%rsp),%xmm0
  sub    $0x4,%ebx
  cmp    %r8d,%ebx
  jne    L57
  nop
L16:
  movabs $0xffffffff00000000,%rax
  movd   %xmm0,%edx
  and    %r13,%rax
  or     %rdx,%rax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L40
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L60:
  pxor   %xmm0,%xmm0
  jmp    L16
L40:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
unsigned long floating_hash(unsigned char *s, int len) {
  int i;
  float h = 1 / 19;
  float *p = (float *)s;
  union ucast {
    unsigned char s[4];
    unsigned long i;
    float f;
  };
  union ucast t;
  for (i = 0; i < len; i += 4) {
    if (i + 4 > len) {
      union ucast ui;
      int j;
      ui.i = 0;
      for (j = 0; j < (len - i); j++) {
        ui.s[j] = *s++;
      }
      if (ui.i)
        h *= (ui.f);
    } else {
      t.i = *(unsigned long *)s;
      h *= t.f;
      s += 4;
    }
  }
  t.f = h;
  return t.i;
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<modificar_bien_fecha_final>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x2b0,%rsp
  mov    %rdi,-0x2a8(%rbp)
  mov    %rsi,-0x2b0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D43(%rip),%rax
  mov    %rax,-0x298(%rbp)
  lea    D29(%rip),%rax
  mov    %rax,-0x290(%rbp)
  lea    D10(%rip),%rax
  mov    %rax,-0x288(%rbp)
  lea    D22(%rip),%rax
  mov    %rax,-0x280(%rbp)
  mov    $0x0,%edi
  call   <mysql_init@plt>
  mov    %rax,-0x278(%rbp)
  mov    -0x280(%rbp),%rdi
  mov    -0x288(%rbp),%rcx
  mov    -0x290(%rbp),%rdx
  mov    -0x298(%rbp),%rsi
  mov    -0x278(%rbp),%rax
  push   $0x0
  push   $0x0
  mov    $0x0,%r9d
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <mysql_real_connect@plt>
  add    $0x10,%rsp
  lea    D21(%rip),%rax
  mov    %rax,-0x270(%rbp)
  lea    D8(%rip),%rax
  mov    %rax,-0x268(%rbp)
  mov    -0x2a8(%rbp),%rdi
  mov    -0x268(%rbp),%rsi
  mov    -0x2b0(%rbp),%rcx
  mov    -0x270(%rbp),%rdx
  lea    -0x260(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D49(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x260(%rbp),%rdx
  mov    -0x278(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mysql_query@plt>
  mov    -0x278(%rbp),%rax
  mov    %rax,%rdi
  call   <mysql_close@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D43
data_type: string
name: retrieve_data
arguments: data_label: D29
data_type: string
name: retrieve_data
arguments: data_label: D10
data_type: string
name: retrieve_data
arguments: data_label: D22
data_type: string
name: retrieve_data
arguments: data_label: D21
data_type: string
name: retrieve_data
arguments: data_label: D8
data_type: string
name: retrieve_data
arguments: data_label: D49
data_type: string

tool: D43: localhost

tool: D29: root

tool: D10: 1234

tool: D22: casaempenio

tool: D21: update bienes set fecha_final=

tool: D8: where fecha_final=

tool: D49: %s '%s' %s '%s';

assistant: ```c
void modificar_bien_fecha_final(char *fecha_final, char *nvo_fecha_final) {
  MYSQL *conexion;
  MYSQL_RES *R;
  MYSQL_ROW COL;
  char *servidor = "localhost";
  char *usuario = "root";
  char *pass = "1234";
  char *base = "casaempenio";
  conexion = mysql_init(NULL);
  mysql_real_connect(conexion, servidor, usuario, pass, base, 0, NULL, 0);
  char *sentencia = "update bienes set fecha_final=";
  char *sentencia2 = "where fecha_final=";
  char buffer[600];
  sprintf(buffer, "%s '%s' %s '%s';", sentencia, nvo_fecha_final, sentencia2, fecha_final);
  mysql_query(conexion, buffer);
  mysql_close(conexion);
}
```
user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<modificar_bien_fecha_final>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x268,%rsp
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x258(%rsp)
  xor    %eax,%eax
  mov    $0x0,%edi
  call   <mysql_init@plt>
  mov    %rax,%rbx
  push   $0x0
  push   $0x0
  mov    $0x0,%r9d
  lea    D37(%rip),%r8
  lea    D62(%rip),%rcx
  lea    D0(%rip),%rdx
  lea    D49(%rip),%rsi
  mov    %rax,%rdi
  call   <mysql_real_connect@plt>
  lea    0x10(%rsp),%r13
  mov    %r12,%r9
  lea    D24(%rip),%r8
  mov    %rbp,%rcx
  lea    D30(%rip),%rdx
  lea    D32(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <mysql_query@plt>
  mov    %rbx,%rdi
  call   <mysql_close@plt>
  mov    %r13,%rsp
  mov    0x258(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  add    $0x268,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D37
type_infered: string
name: disassemble_data
arguments: tag: D62
type_infered: string
name: disassemble_data
arguments: tag: D0
type_infered: string
name: disassemble_data
arguments: tag: D49
type_infered: string
name: disassemble_data
arguments: tag: D24
type_infered: string
name: disassemble_data
arguments: tag: D30
type_infered: string
name: disassemble_data
arguments: tag: D32
type_infered: string

tool: D37: casaempenio

tool: D62: 1234

tool: D0: root

tool: D49: localhost

tool: D24: where fecha_final=

tool: D30: update bienes set fecha_final=

tool: D32: %s '%s' %s '%s';

assistant: ```c
void modificar_bien_fecha_final(char *fecha_final, char *nvo_fecha_final) {
  MYSQL *conexion;
  MYSQL_RES *R;
  MYSQL_ROW COL;
  char *servidor = "localhost";
  char *usuario = "root";
  char *pass = "1234";
  char *base = "casaempenio";
  conexion = mysql_init(NULL);
  mysql_real_connect(conexion, servidor, usuario, pass, base, 0, NULL, 0);
  char *sentencia = "update bienes set fecha_final=";
  char *sentencia2 = "where fecha_final=";
  char buffer[600];
  sprintf(buffer, "%s '%s' %s '%s';", sentencia, nvo_fecha_final, sentencia2, fecha_final);
  mysql_query(conexion, buffer);
  mysql_close(conexion);
}
```