ylfeng/ReF-Decompile-dataset huggingface dataset:
user: What is the c source code of the assembly code below:

```asm
<strsub>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x140,%rsp
  mov    %rdi,-0x128(%rbp)
  mov    %rsi,-0x130(%rbp)
  mov    %ecx,%eax
  mov    %dx,-0x134(%rbp)
  mov    %ax,-0x138(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x11c(%rbp)
  jmp    L9
L4:
  addq   $0x1,-0x130(%rbp)
  addl   $0x1,-0x11c(%rbp)
L9:
  movswl -0x134(%rbp),%eax
  cmp    %eax,-0x11c(%rbp)
  jle    L4
  mov    -0x130(%rbp),%rax
  mov    %rax,-0x118(%rbp)
  mov    -0x118(%rbp),%rdx
  mov    -0x128(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x128(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L29
  call   <__stack_chk_fail@plt>
L29:
  leave
  ret
```

assistant: ```c
char *strsub(char *Result, char *input, short start_pos, short len) {
  char STR1[256];
  char *tmp;
  int i;
  for (i = 1; i <= start_pos; i++)
    input++;
  tmp = input;
  strcpy(Result, tmp);
  return Result;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<strsub>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  test   %dx,%dx
  jle    L7
  movswl %dx,%edx
  lea    0x1(%rdx),%ecx
  mov    $0x1,%eax
L18:
  add    $0x1,%eax
  cmp    %ecx,%eax
  jne    L18
  mov    %edx,%edx
  add    %rdx,%rsi
L7:
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    %rbx,%rax
  pop    %rbx
  ret
```

assistant: ```c
char *strsub(char *Result, char *input, short start_pos, short len) {
  char STR1[256];
  char *tmp;
  int i;
  for (i = 1; i <= start_pos; i++)
    input++;
  tmp = input;
  strcpy(Result, tmp);
  return Result;
}
```
user: Translate the below assembly code into C programming language:

```asm
<strsub>:
  endbr64
  movswq %dx,%rax
  push   %r12
  mov    %rdi,%r12
  add    %rsi,%rax
  test   %dx,%dx
  cmovg  %rax,%rsi
  call   <strcpy@plt>
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
char *strsub(char *Result, char *input, short start_pos, short len) {
  char STR1[256];
  char *tmp;
  int i;
  for (i = 1; i <= start_pos; i++)
    input++;
  tmp = input;
  strcpy(Result, tmp);
  return Result;
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<strsub>:
  endbr64
  movswq %dx,%rax
  push   %r12
  mov    %rdi,%r12
  add    %rsi,%rax
  test   %dx,%dx
  cmovg  %rax,%rsi
  call   <strcpy@plt>
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
char *strsub(char *Result, char *input, short start_pos, short len) {
  char STR1[256];
  char *tmp;
  int i;
  for (i = 1; i <= start_pos; i++)
    input++;
  tmp = input;
  strcpy(Result, tmp);
  return Result;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movl   $0x1,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  and    -0x8(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <print@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <printid@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D5
type: string

tool: D5: c 0

assistant: ```c
int main() {
  int a = 1, b = 0, c;
  c = a & b;
  print("c 0");
  printid(c);
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  lea    D2(%rip),%rdi
  call   <print@plt>
  mov    $0x0,%edi
  call   <printid@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  ret
```

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

tool: D2: c 0

assistant: ```c
int main() {
  int a = 1, b = 0, c;
  c = a & b;
  print("c 0");
  printid(c);
  return 0;
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  lea    D6(%rip),%rdi
  call   <print@plt>
  xor    %edi,%edi
  call   <printid@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

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

tool: D6: c 0

assistant: ```c
int main() {
  int a = 1, b = 0, c;
  c = a & b;
  print("c 0");
  printid(c);
  return 0;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  lea    D2(%rip),%rdi
  call   <print@plt>
  xor    %edi,%edi
  call   <printid@plt>
  xor    %eax,%eax
  add    $0x8,%rsp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D2
datatype: string

tool: D2: c 0

assistant: ```c
int main() {
  int a = 1, b = 0, c;
  c = a & b;
  print("c 0");
  printid(c);
  return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<isPrime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x8(%rbp)
  jmp    L5
L15:
  mov    -0x18(%rbp),%rax
  cqto
  idivq  -0x8(%rbp)
  mov    %rdx,%rax
  test   %rax,%rax
  jne    L36
  mov    $0x0,%eax
  jmp    L16
L36:
  subq   $0x1,-0x8(%rbp)
L5:
  cmpq   $0x1,-0x8(%rbp)
  jg     L15
  mov    $0x1,%eax
L16:
  pop    %rbp
  ret
```

assistant: ```c
int isPrime(long long num) {
  long long i = num - 1;
  while (i > 1) {
    if (num % i == 0)
      return 0;
    i--;
  }
  return 1;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<isPrime>:
  endbr64
  lea    -0x1(%rdi),%rcx
  cmp    $0x1,%rcx
  jle    L26
  mov    %rdi,%rax
  cqto
  idiv   %rcx
  test   %rdx,%rdx
  je     L30
L36:
  sub    $0x1,%rcx
  cmp    $0x1,%rcx
  je     L8
  mov    %rdi,%rax
  cqto
  idiv   %rcx
  test   %rdx,%rdx
  jne    L36
  mov    $0x0,%eax
  ret
L8:
  mov    $0x1,%eax
  ret
L26:
  mov    $0x1,%eax
  ret
L30:
  mov    $0x0,%eax
  ret
```

assistant: ```c
int isPrime(long long num) {
  long long i = num - 1;
  while (i > 1) {
    if (num % i == 0)
      return 0;
    i--;
  }
  return 1;
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<isPrime>:
  endbr64
  lea    -0x1(%rdi),%rcx
  cmp    $0x1,%rcx
  jg     L12
  jmp    L24
L39:
  sub    $0x1,%rcx
  cmp    $0x1,%rcx
  je     L24
L12:
  mov    %rdi,%rax
  cqto
  idiv   %rcx
  test   %rdx,%rdx
  jne    L39
  xor    %eax,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L24:
  mov    $0x1,%eax
  ret
```

assistant: ```c
int isPrime(long long num) {
  long long i = num - 1;
  while (i > 1) {
    if (num % i == 0)
      return 0;
    i--;
  }
  return 1;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<isPrime>:
  endbr64
  lea    -0x1(%rdi),%rcx
  cmp    $0x1,%rcx
  jg     L24
  jmp    L8
L18:
  sub    $0x1,%rcx
  cmp    $0x1,%rcx
  je     L8
L24:
  mov    %rdi,%rax
  cqto
  idiv   %rcx
  test   %rdx,%rdx
  jne    L18
  xor    %eax,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L8:
  mov    $0x1,%eax
  ret
```

assistant: ```c
int isPrime(long long num) {
  long long i = num - 1;
  while (i > 1) {
    if (num % i == 0)
      return 0;
    i--;
  }
  return 1;
}
```
user: What is the c source code of the assembly code below:

```asm
<lire_reel>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movss  -0xc(%rbp),%xmm0
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L6
  call   <__stack_chk_fail@plt>
L6:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D2
data_type: string
name: read_data
arguments: data_tag: D6
data_type: string

tool: D2: Entrez  un reel:

tool: D6: %f

assistant: ```c
float lire_reel() {
  float f;
  printf("Entrez  un reel:");
  scanf("%f", &f);
  return f;
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<lire_reel>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D2(%rip),%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D17(%rip),%rdi
  call   <scanf@plt>
  movss  0x4(%rsp),%xmm0
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x18,%rsp
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D2
type_guessed: string
name: unpack_data
arguments: data_tag: D17
type_guessed: string

tool: D2: Entrez  un reel:

tool: D17: %f

assistant: ```c
float lire_reel() {
  float f;
  printf("Entrez  un reel:");
  scanf("%f", &f);
  return f;
}
```
user: 请从给定的汇编指令推导出C源代码:

```asm
<lire_reel>:
  endbr64
  sub    $0x18,%rsp
  lea    D4(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D18(%rip),%rdi
  call   <scanf@plt>
  movss  0x4(%rsp),%xmm0
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x18,%rsp
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D4
data_type: string
name: unpack_data
arguments: label: D18
data_type: string

tool: D4: Entrez  un reel:

tool: D18: %f

assistant: ```c
float lire_reel() {
  float f;
  printf("Entrez  un reel:");
  scanf("%f", &f);
  return f;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<lire_reel>:
  endbr64
  sub    $0x18,%rsp
  lea    D14(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D15(%rip),%rdi
  call   <scanf@plt>
  movss  0x4(%rsp),%xmm0
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x18,%rsp
  ret
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D14
data_type: string
name: disassemble_data
arguments: data_label: D15
data_type: string

tool: D14: Entrez  un reel:

tool: D15: %f

assistant: ```c
float lire_reel() {
  float f;
  printf("Entrez  un reel:");
  scanf("%f", &f);
  return f;
}
```
user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<_fail>:
  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
  mov    %rax,%rsi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <print_error@plt>
  mov    $0x1,%edi
  call   <exit_test@plt>
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D0
type: string

tool: D0: ERROR: %s:%d Failure!


assistant: ```c
void _fail(const char *const file, const int line) {
  print_error("ERROR: "
              "%s:%d"
              " Failure!\n",
              file, line);
  exit_test(1);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<_fail>:
  endbr64
  sub    $0x8,%rsp
  mov    %esi,%edx
  mov    %rdi,%rsi
  lea    D5(%rip),%rdi
  call   <print_error@plt>
  mov    $0x1,%edi
  call   <exit_test@plt>
  add    $0x8,%rsp
  ret
```

tool_calls: name: retrieve_data
arguments: label: D5
type: string

tool: D5: ERROR: %s:%d Failure!


assistant: ```c
void _fail(const char *const file, const int line) {
  print_error("ERROR: "
              "%s:%d"
              " Failure!\n",
              file, line);
  exit_test(1);
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<_fail>:
  endbr64
  sub    $0x8,%rsp
  mov    %esi,%edx
  mov    %rdi,%rsi
  lea    D8(%rip),%rdi
  call   <print_error@plt>
  mov    $0x1,%edi
  add    $0x8,%rsp
  jmp    1060 <exit_test@plt>
```

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

tool: D8: ERROR: %s:%d Failure!


assistant: ```c
void _fail(const char *const file, const int line) {
  print_error("ERROR: "
              "%s:%d"
              " Failure!\n",
              file, line);
  exit_test(1);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<_fail>:
  endbr64
  sub    $0x8,%rsp
  mov    %esi,%edx
  mov    %rdi,%rsi
  lea    D9(%rip),%rdi
  call   <print_error@plt>
  mov    $0x1,%edi
  add    $0x8,%rsp
  jmp    1060 <exit_test@plt>
```

tool_calls: name: read_data
arguments: data_tag: D9
type: string

tool: D9: ERROR: %s:%d Failure!


assistant: ```c
void _fail(const char *const file, const int line) {
  print_error("ERROR: "
              "%s:%d"
              " Failure!\n",
              file, line);
  exit_test(1);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<beyond_dist>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movss  %xmm0,-0x4(%rbp)
  movss  %xmm1,-0x8(%rbp)
  movss  -0x8(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comiss %xmm1,%xmm0
  jbe    L38
  movss  -0x8(%rbp),%xmm0
  jmp    L1
L38:
  movss  -0x4(%rbp),%xmm0
  movss  D11(%rip),%xmm1
  xorps  %xmm1,%xmm0
  comiss -0x8(%rbp),%xmm0
  jbe    L37
  movss  -0x8(%rbp),%xmm0
  movss  D11(%rip),%xmm1
  xorps  %xmm1,%xmm0
  subss  -0x4(%rbp),%xmm0
  jmp    L1
L37:
  pxor   %xmm0,%xmm0
L1:
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D11
type_guessed: byte[4]

tool: {"D11": [0x00,0x00,0x00,0x80]}

assistant: ```c
float beyond_dist(float s, float p) {
  if (p > 0)
    return p;
  else if (p < -s)
    return -p - s;
  else
    return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<beyond_dist>:
  endbr64
  comiss D20(%rip),%xmm1
  ja     L4
  movaps %xmm0,%xmm2
  xorps  D9(%rip),%xmm2
  comiss %xmm1,%xmm2
  jbe    L6
  xorps  D9(%rip),%xmm1
  subss  %xmm0,%xmm1
  jmp    L4
L6:
  pxor   %xmm1,%xmm1
L4:
  movaps %xmm1,%xmm0
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D20
type: byte[4]
name: unpack_data
arguments: data_label: D9
type: byte[16]

tool: {"D20": [0x00,0x00,0x00,0x00]}

tool: {"D9": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
float beyond_dist(float s, float p) {
  if (p > 0)
    return p;
  else if (p < -s)
    return -p - s;
  else
    return 0;
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<beyond_dist>:
  endbr64
  pxor   %xmm4,%xmm4
  comiss %xmm4,%xmm1
  ja     L15
  movss  D9(%rip),%xmm2
  movaps %xmm0,%xmm3
  xorps  %xmm2,%xmm3
  comiss %xmm1,%xmm3
  jbe    L14
  xorps  %xmm2,%xmm1
  subss  %xmm0,%xmm1
L15:
  movaps %xmm1,%xmm0
  ret
  nopl   0x0(%rax,%rax,1)
L14:
  pxor   %xmm1,%xmm1
  movaps %xmm1,%xmm0
  ret
```

tool_calls: name: read_data
arguments: data_tag: D9
type: byte[4]

tool: {"D9": [0x00,0x00,0x00,0x80]}

assistant: ```c
float beyond_dist(float s, float p) {
  if (p > 0)
    return p;
  else if (p < -s)
    return -p - s;
  else
    return 0;
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<beyond_dist>:
  endbr64
  pxor   %xmm4,%xmm4
  comiss %xmm4,%xmm1
  ja     L16
  movss  D1(%rip),%xmm2
  movaps %xmm0,%xmm3
  xorps  %xmm2,%xmm3
  comiss %xmm1,%xmm3
  jbe    L7
  xorps  %xmm2,%xmm1
  subss  %xmm0,%xmm1
L16:
  movaps %xmm1,%xmm0
  ret
  nopl   0x0(%rax,%rax,1)
L7:
  pxor   %xmm1,%xmm1
  movaps %xmm1,%xmm0
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D1
data_type: byte[4]

tool: {"D1": [0x00,0x00,0x00,0x80]}

assistant: ```c
float beyond_dist(float s, float p) {
  if (p > 0)
    return p;
  else if (p < -s)
    return -p - s;
  else
    return 0;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<motion_vectors>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %rdx,%r13
  mov    %ecx,%ebx
  mov    0x50(%rsp),%r14d
  cmp    $0x1,%r8d
  jne    L34
  or     %r14d,%r9d
  je     L8
L2:
  movslq %ebx,%rbx
  lea    0x0(%rbp,%rbx,8),%rdi
  sub    $0x8,%rsp
  push   $0x0
  mov    0x68(%rsp),%r9d
  mov    %r14d,%r8d
  mov    0x58(%rsp),%ecx
  mov    0x50(%rsp),%edx
  mov    %r12,%rsi
  call   <motion_vector@plt>
  mov    0x0(%rbp,%rbx,8),%eax
  mov    %eax,0x10(%rbp,%rbx,8)
  mov    0x4(%rbp,%rbx,8),%eax
  mov    %eax,0x14(%rbp,%rbx,8)
  add    $0x10,%rsp
L25:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L8:
  mov    $0x1,%edi
  call   <Get_Bits@plt>
  movslq %ebx,%rdx
  mov    %eax,0x0(%r13,%rdx,4)
  mov    %eax,0x8(%r13,%rdx,4)
  jmp    L2
L34:
  mov    $0x1,%edi
  call   <Get_Bits@plt>
  movslq %ebx,%rbx
  mov    %eax,0x0(%r13,%rbx,4)
  lea    0x0(,%rbx,8),%r15
  lea    0x0(%rbp,%r15,1),%rdi
  sub    $0x8,%rsp
  push   $0x0
  mov    0x68(%rsp),%r9d
  mov    %r14d,%r8d
  mov    0x58(%rsp),%ecx
  mov    0x50(%rsp),%edx
  mov    %r12,%rsi
  call   <motion_vector@plt>
  mov    $0x1,%edi
  call   <Get_Bits@plt>
  mov    %eax,0x8(%r13,%rbx,4)
  lea    0x10(%rbp,%r15,1),%rdi
  movl   $0x0,(%rsp)
  mov    0x68(%rsp),%r9d
  mov    %r14d,%r8d
  mov    0x58(%rsp),%ecx
  mov    0x50(%rsp),%edx
  mov    %r12,%rsi
  call   <motion_vector@plt>
  add    $0x10,%rsp
  jmp    L25
```

assistant: ```c
void motion_vectors(int (*PMV)[2][2], int *dmvector, int (*motion_vertical_field_select)[2], int s, int motion_vector_count, int mv_format, int h_r_size, int v_r_size, int dmv, int mvscale) {
  int tmp;
  unsigned int tmp___0;
  unsigned int tmp___1;
  unsigned int tmp___2;
  {
    if (motion_vector_count == 1) {
      if (mv_format == 0) {
        if (!dmv) {
          tmp___0 = Get_Bits(1);
          tmp = (int)tmp___0;
          (*(motion_vertical_field_select + 0))[s] = tmp;
          (*(motion_vertical_field_select + 1))[s] = tmp;
        }
      }
      motion_vector((*(PMV + 0))[s], (int *)dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
      (*(PMV + 1))[s][0] = (*(PMV + 0))[s][0];
      (*(PMV + 1))[s][1] = (*(PMV + 0))[s][1];
    } else {
      tmp___1 = Get_Bits(1);
      (*(motion_vertical_field_select + 0))[s] = (int)tmp___1;
      motion_vector((*(PMV + 0))[s], (int *)dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
      tmp___2 = Get_Bits(1);
      (*(motion_vertical_field_select + 1))[s] = (int)tmp___2;
      motion_vector((*(PMV + 1))[s], (int *)dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
    }
    return;
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<motion_vectors>:
  endbr64
  push   %r15
  mov    %r9d,%eax
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movslq %ecx,%rbx
  lea    0x0(,%rbx,8),%r15
  lea    (%rdi,%r15,1),%r10
  sub    $0x28,%rsp
  mov    0x60(%rsp),%edx
  mov    0x68(%rsp),%ecx
  mov    0x70(%rsp),%r14d
  mov    0x78(%rsp),%r9d
  cmp    $0x1,%r8d
  jne    L3
  or     %r14d,%eax
  je     L5
L8:
  sub    $0x8,%rsp
  mov    %r14d,%r8d
  mov    %r12,%rsi
  mov    %r10,%rdi
  push   $0x0
  call   <motion_vector@plt>
  mov    0x0(%rbp,%rbx,8),%eax
  mov    %eax,0x10(%rbp,%rbx,8)
  mov    0x4(%rbp,%rbx,8),%eax
  mov    %eax,0x14(%rbp,%rbx,8)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L3:
  mov    $0x1,%edi
  mov    %r9d,0x14(%rsp)
  mov    %ecx,0x10(%rsp)
  mov    %edx,0x8(%rsp)
  mov    %r10,0x18(%rsp)
  call   <Get_Bits@plt>
  sub    $0x8,%rsp
  mov    %r14d,%r8d
  mov    %r12,%rsi
  push   $0x0
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%ecx
  mov    0x18(%rsp),%edx
  mov    %eax,0x0(%r13,%rbx,4)
  mov    0x28(%rsp),%rdi
  call   <motion_vector@plt>
  mov    $0x1,%edi
  call   <Get_Bits@plt>
  mov    0x24(%rsp),%r9d
  mov    %r14d,%r8d
  mov    %r12,%rsi
  mov    %eax,0x8(%r13,%rbx,4)
  mov    0x20(%rsp),%ecx
  lea    0x10(%rbp,%r15,1),%rdi
  movl   $0x0,0x70(%rsp)
  mov    0x18(%rsp),%edx
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <motion_vector@plt>
  xchg   %ax,%ax
L5:
  mov    $0x1,%edi
  mov    %r9d,0x18(%rsp)
  mov    %ecx,0x14(%rsp)
  mov    %edx,0x10(%rsp)
  mov    %r10,0x8(%rsp)
  call   <Get_Bits@plt>
  mov    0x18(%rsp),%r9d
  mov    0x14(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    0x8(%rsp),%r10
  mov    %eax,0x0(%r13,%rbx,4)
  mov    %eax,0x8(%r13,%rbx,4)
  jmp    L8
```

assistant: ```c
void motion_vectors(int (*PMV)[2][2], int *dmvector, int (*motion_vertical_field_select)[2], int s, int motion_vector_count, int mv_format, int h_r_size, int v_r_size, int dmv, int mvscale) {
  int tmp;
  unsigned int tmp___0;
  unsigned int tmp___1;
  unsigned int tmp___2;
  {
    if (motion_vector_count == 1) {
      if (mv_format == 0) {
        if (!dmv) {
          tmp___0 = Get_Bits(1);
          tmp = (int)tmp___0;
          (*(motion_vertical_field_select + 0))[s] = tmp;
          (*(motion_vertical_field_select + 1))[s] = tmp;
        }
      }
      motion_vector((*(PMV + 0))[s], (int *)dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
      (*(PMV + 1))[s][0] = (*(PMV + 0))[s][0];
      (*(PMV + 1))[s][1] = (*(PMV + 0))[s][1];
    } else {
      tmp___1 = Get_Bits(1);
      (*(motion_vertical_field_select + 0))[s] = (int)tmp___1;
      motion_vector((*(PMV + 0))[s], (int *)dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
      tmp___2 = Get_Bits(1);
      (*(motion_vertical_field_select + 1))[s] = (int)tmp___2;
      motion_vector((*(PMV + 1))[s], (int *)dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
    }
    return;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<motion_vectors>:
  endbr64
  push   %r15
  mov    %r9d,%eax
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movslq %ecx,%rbx
  lea    0x0(,%rbx,8),%r15
  lea    (%rdi,%r15,1),%r10
  sub    $0x28,%rsp
  mov    0x60(%rsp),%edx
  mov    0x68(%rsp),%ecx
  mov    0x70(%rsp),%r14d
  mov    0x78(%rsp),%r9d
  cmp    $0x1,%r8d
  jne    L16
  or     %r14d,%eax
  je     L14
L26:
  sub    $0x8,%rsp
  mov    %r14d,%r8d
  mov    %r12,%rsi
  mov    %r10,%rdi
  push   $0x0
  call   <motion_vector@plt>
  mov    0x0(%rbp,%rbx,8),%rax
  mov    %rax,0x10(%rbp,%rbx,8)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L16:
  mov    $0x1,%edi
  mov    %r9d,0x14(%rsp)
  mov    %ecx,0x10(%rsp)
  mov    %edx,0x8(%rsp)
  mov    %r10,0x18(%rsp)
  call   <Get_Bits@plt>
  sub    $0x8,%rsp
  mov    %r14d,%r8d
  mov    %r12,%rsi
  push   $0x0
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%ecx
  mov    0x18(%rsp),%edx
  mov    %eax,0x0(%r13,%rbx,4)
  mov    0x28(%rsp),%rdi
  call   <motion_vector@plt>
  mov    $0x1,%edi
  call   <Get_Bits@plt>
  mov    0x24(%rsp),%r9d
  mov    %r14d,%r8d
  mov    %r12,%rsi
  mov    %eax,0x8(%r13,%rbx,4)
  mov    0x20(%rsp),%ecx
  lea    0x10(%rbp,%r15,1),%rdi
  movl   $0x0,0x70(%rsp)
  mov    0x18(%rsp),%edx
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <motion_vector@plt>
  cs nopw 0x0(%rax,%rax,1)
L14:
  mov    $0x1,%edi
  mov    %r9d,0x18(%rsp)
  mov    %ecx,0x14(%rsp)
  mov    %edx,0x10(%rsp)
  mov    %r10,0x8(%rsp)
  call   <Get_Bits@plt>
  mov    0x18(%rsp),%r9d
  mov    0x14(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    0x8(%rsp),%r10
  mov    %eax,0x0(%r13,%rbx,4)
  mov    %eax,0x8(%r13,%rbx,4)
  jmp    L26
```

assistant: ```c
void motion_vectors(int (*PMV)[2][2], int *dmvector, int (*motion_vertical_field_select)[2], int s, int motion_vector_count, int mv_format, int h_r_size, int v_r_size, int dmv, int mvscale) {
  int tmp;
  unsigned int tmp___0;
  unsigned int tmp___1;
  unsigned int tmp___2;
  {
    if (motion_vector_count == 1) {
      if (mv_format == 0) {
        if (!dmv) {
          tmp___0 = Get_Bits(1);
          tmp = (int)tmp___0;
          (*(motion_vertical_field_select + 0))[s] = tmp;
          (*(motion_vertical_field_select + 1))[s] = tmp;
        }
      }
      motion_vector((*(PMV + 0))[s], (int *)dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
      (*(PMV + 1))[s][0] = (*(PMV + 0))[s][0];
      (*(PMV + 1))[s][1] = (*(PMV + 0))[s][1];
    } else {
      tmp___1 = Get_Bits(1);
      (*(motion_vertical_field_select + 0))[s] = (int)tmp___1;
      motion_vector((*(PMV + 0))[s], (int *)dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
      tmp___2 = Get_Bits(1);
      (*(motion_vertical_field_select + 1))[s] = (int)tmp___2;
      motion_vector((*(PMV + 1))[s], (int *)dmvector, h_r_size, v_r_size, dmv, mvscale, 0);
    }
    return;
  }
}
```