ylfeng/ReF-Decompile-dataset huggingface dataset:
user: Demonstrate the C code that generates the assembly output below:

```asm
<copy_imatrix>:
  endbr64
  push   %r15
  mov    %rcx,%rax
  mov    %rdi,%r11
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x48(%rsp),%rcx
  mov    0x38(%rsp),%edi
  mov    %ecx,%edx
  sub    %esi,%edi
  movslq %esi,%rsi
  sub    %eax,%edx
  cmp    %rsi,%r15
  jl     L50
  movslq %eax,%r10
  mov    %r10,-0x18(%rsp)
  cmp    %r10,%r8
  jl     L50
  mov    %r8,%r14
  movslq %edi,%rdi
  lea    0x4(,%r10,4),%rbp
  sub    %r10,%r14
  lea    (%r9,%rdi,8),%r12
  movslq %edx,%rdi
  mov    %r14,-0x68(%rsp)
  add    $0x1,%r14
  lea    (%rdi,%r10,1),%rbx
  lea    0x0(,%r10,4),%r9
  mov    %r14,-0x60(%rsp)
  mov    %r14,%r10
  and    $0xfffffffffffffffc,%r14
  shl    $0x2,%rbx
  add    %r14d,%ecx
  add    %r14d,%eax
  mov    %r14,-0x58(%rsp)
  shr    $0x2,%r10
  movslq %ecx,%rcx
  movslq %eax,%r13
  mov    %r9,-0x50(%rsp)
  shl    $0x4,%r10
  shl    $0x2,%rcx
  shl    $0x2,%r13
  mov    %rcx,-0x48(%rsp)
  lea    0x1(%rax),%ecx
  add    $0x2,%eax
  movslq %ecx,%r14
  add    %edx,%ecx
  movslq %ecx,%rcx
  mov    %r14,-0x40(%rsp)
  shl    $0x2,%r14
  shl    $0x2,%rcx
  mov    %rcx,-0x38(%rsp)
  movslq %eax,%rcx
  add    %edx,%eax
  cltq
  mov    %rcx,-0x30(%rsp)
  shl    $0x2,%rcx
  shl    $0x2,%rax
  mov    %rcx,-0x28(%rsp)
  mov    %rax,-0x20(%rsp)
  lea    0x0(,%rdi,4),%rax
  mov    %rax,-0x10(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L97:
  mov    (%r12,%rsi,8),%rdi
  mov    (%r11,%rsi,8),%rcx
  lea    (%rdi,%rbx,1),%rdx
  lea    (%rcx,%rbp,1),%r9
  mov    %rdx,%rax
  sub    %r9,%rax
  cmp    $0x8,%rax
  jbe    L81
  cmpq   $0x2,-0x68(%rsp)
  jbe    L81
  mov    -0x50(%rsp),%rax
  lea    (%rcx,%rax,1),%r9
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L116:
  movdqu (%r9,%rax,1),%xmm0
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %r10,%rax
  jne    L116
  mov    -0x58(%rsp),%rdx
  cmp    %rdx,-0x60(%rsp)
  je     L51
  mov    (%rcx,%r13,1),%eax
  mov    -0x48(%rsp),%rdx
  mov    %eax,(%rdi,%rdx,1)
  cmp    -0x40(%rsp),%r8
  jl     L51
  mov    (%rcx,%r14,1),%eax
  mov    -0x38(%rsp),%rdx
  mov    %eax,(%rdi,%rdx,1)
  cmp    -0x30(%rsp),%r8
  jl     L51
  mov    -0x28(%rsp),%rax
  mov    (%rcx,%rax,1),%eax
  mov    -0x20(%rsp),%rcx
  mov    %eax,(%rdi,%rcx,1)
L51:
  lea    0x1(%rsi),%rax
  cmp    %r15,%rsi
  je     L50
L32:
  mov    %rax,%rsi
  jmp    L97
  xchg   %ax,%ax
L81:
  mov    -0x18(%rsp),%rax
  add    -0x10(%rsp),%rdi
  nopw   0x0(%rax,%rax,1)
L37:
  mov    (%rcx,%rax,4),%edx
  mov    %edx,(%rdi,%rax,4)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %r8,%rdx
  jne    L37
  lea    0x1(%rsi),%rax
  cmp    %r15,%rsi
  jne    L32
L50:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void copy_imatrix(int **m1, long nrl1, long nrh1, long ncl1, long nch1, int **m2, long nrl2, long nrh2, long ncl2, long nch2) {
  int i, j, ro, co;
  ro = nrl2 - nrl1;
  co = ncl2 - ncl1;
  for (i = nrl1; i <= nrh1; i++) {
    for (j = ncl1; j <= nch1; j++) {
      m2[i + ro][j + co] = m1[i][j];
    }
  }
}
```
user: What is the c source code of the assembly code below:

```asm
<label_fifofile_set>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
int label_fifofile_set(const char *path) {
  int r = 0;
  return r;
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<label_fifofile_set>:
  endbr64
  mov    $0x0,%eax
  ret
```

assistant: ```c
int label_fifofile_set(const char *path) {
  int r = 0;
  return r;
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<label_fifofile_set>:
  endbr64
  xor    %eax,%eax
  ret
```

assistant: ```c
int label_fifofile_set(const char *path) {
  int r = 0;
  return r;
}
```
user: What is the c source code of the assembly code below:

```asm
<label_fifofile_set>:
  endbr64
  xor    %eax,%eax
  ret
```

assistant: ```c
int label_fifofile_set(const char *path) {
  int r = 0;
  return r;
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<LCD_init>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,%eax
  mov    %ax,-0x1c(%rbp)
  mov    $0x0,%eax
  call   <gpio_setup@plt>
  mov    $0x0,%eax
  call   <LCD_setup@plt>
  movswl -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <LCD_FontSelect@plt>
  cmpw   $0x0,-0x1c(%rbp)
  je     L9
  mov    $0x1e,%eax
  jmp    L10
L9:
  mov    $0x28,%eax
L10:
  mov    %eax,-0x4(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  mov    $0x40,%edi
  call   <LCD_command_2D@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  mov    $0x41,%edi
  call   <LCD_command_2D@plt>
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  mov    $0x42,%edi
  call   <LCD_command_2D@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  mov    $0x43,%edi
  call   <LCD_command_2D@plt>
  nop
  leave
  ret
```

assistant: ```c
void LCD_init(int textStart, int graphicStart, short fontSize) {
  gpio_setup();
  LCD_setup();
  LCD_FontSelect(fontSize);
  int lineGap = fontSize ? 0x1E : 0x28;
  LCD_command_2D(0x40, textStart);
  LCD_command_2D(0x41, lineGap);
  LCD_command_2D(0x42, graphicStart);
  LCD_command_2D(0x43, lineGap);
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<LCD_init>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r12d
  mov    %esi,%ebp
  mov    %edx,%ebx
  mov    $0x0,%eax
  call   <gpio_setup@plt>
  mov    $0x0,%eax
  call   <LCD_setup@plt>
  movswl %bx,%edi
  call   <LCD_FontSelect@plt>
  cmp    $0x1,%bx
  sbb    %ebx,%ebx
  and    $0xa,%ebx
  add    $0x1e,%ebx
  mov    %r12d,%esi
  mov    $0x40,%edi
  call   <LCD_command_2D@plt>
  mov    %ebx,%esi
  mov    $0x41,%edi
  call   <LCD_command_2D@plt>
  mov    %ebp,%esi
  mov    $0x42,%edi
  call   <LCD_command_2D@plt>
  mov    %ebx,%esi
  mov    $0x43,%edi
  call   <LCD_command_2D@plt>
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void LCD_init(int textStart, int graphicStart, short fontSize) {
  gpio_setup();
  LCD_setup();
  LCD_FontSelect(fontSize);
  int lineGap = fontSize ? 0x1E : 0x28;
  LCD_command_2D(0x40, textStart);
  LCD_command_2D(0x41, lineGap);
  LCD_command_2D(0x42, graphicStart);
  LCD_command_2D(0x43, lineGap);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<LCD_init>:
  endbr64
  push   %r13
  xor    %eax,%eax
  mov    %edi,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %edx,%ebp
  call   <gpio_setup@plt>
  xor    %eax,%eax
  call   <LCD_setup@plt>
  movswl %bp,%edi
  call   <LCD_FontSelect@plt>
  cmp    $0x1,%bp
  mov    %r13d,%esi
  mov    $0x40,%edi
  sbb    %ebp,%ebp
  call   <LCD_command_2D@plt>
  and    $0xa,%ebp
  mov    $0x41,%edi
  add    $0x1e,%ebp
  mov    %ebp,%esi
  call   <LCD_command_2D@plt>
  mov    %r12d,%esi
  mov    $0x42,%edi
  call   <LCD_command_2D@plt>
  mov    %ebp,%esi
  mov    $0x43,%edi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1080 <LCD_command_2D@plt>
```

assistant: ```c
void LCD_init(int textStart, int graphicStart, short fontSize) {
  gpio_setup();
  LCD_setup();
  LCD_FontSelect(fontSize);
  int lineGap = fontSize ? 0x1E : 0x28;
  LCD_command_2D(0x40, textStart);
  LCD_command_2D(0x41, lineGap);
  LCD_command_2D(0x42, graphicStart);
  LCD_command_2D(0x43, lineGap);
}
```
user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<LCD_init>:
  endbr64
  push   %r13
  xor    %eax,%eax
  mov    %edi,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %edx,%ebp
  call   <gpio_setup@plt>
  xor    %eax,%eax
  call   <LCD_setup@plt>
  movswl %bp,%edi
  call   <LCD_FontSelect@plt>
  cmp    $0x1,%bp
  mov    %r13d,%esi
  mov    $0x40,%edi
  sbb    %ebp,%ebp
  call   <LCD_command_2D@plt>
  and    $0xa,%ebp
  mov    $0x41,%edi
  add    $0x1e,%ebp
  mov    %ebp,%esi
  call   <LCD_command_2D@plt>
  mov    %r12d,%esi
  mov    $0x42,%edi
  call   <LCD_command_2D@plt>
  mov    %ebp,%esi
  mov    $0x43,%edi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1080 <LCD_command_2D@plt>
```

assistant: ```c
void LCD_init(int textStart, int graphicStart, short fontSize) {
  gpio_setup();
  LCD_setup();
  LCD_FontSelect(fontSize);
  int lineGap = fontSize ? 0x1E : 0x28;
  LCD_command_2D(0x40, textStart);
  LCD_command_2D(0x41, lineGap);
  LCD_command_2D(0x42, graphicStart);
  LCD_command_2D(0x43, lineGap);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<f>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  mov    $0x0,%eax
  call   <one@plt>
  cmpl   $0x0,-0x4(%rbp)
  je     L6
  mov    $0x0,%eax
  call   <two@plt>
L6:
  nop
  leave
  ret
```

assistant: ```c
int f(int x) {
  one();
  if (x) {
    two();
  }
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<f>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  mov    $0x0,%eax
  call   <one@plt>
  test   %ebx,%ebx
  jne    L1
L9:
  pop    %rbx
  ret
L1:
  mov    $0x0,%eax
  call   <two@plt>
  jmp    L9
```

assistant: ```c
int f(int x) {
  one();
  if (x) {
    two();
  }
}
```
user: 请将以下的汇编代码转换成C语言代码：

```asm
<f>:
  endbr64
  push   %rbx
  xor    %eax,%eax
  mov    %edi,%ebx
  call   <one@plt>
  test   %ebx,%ebx
  jne    L3
  pop    %rbx
  ret
  nopl   0x0(%rax)
L3:
  xor    %eax,%eax
  pop    %rbx
  jmp    1060 <two@plt>
```

assistant: ```c
int f(int x) {
  one();
  if (x) {
    two();
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<f>:
  endbr64
  push   %rbx
  xor    %eax,%eax
  mov    %edi,%ebx
  call   <one@plt>
  test   %ebx,%ebx
  jne    L1
  pop    %rbx
  ret
  nopl   0x0(%rax)
L1:
  xor    %eax,%eax
  pop    %rbx
  jmp    1060 <two@plt>
```

assistant: ```c
int f(int x) {
  one();
  if (x) {
    two();
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<fastExpo>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  cmpq   $0x1,-0x20(%rbp)
  jne    L19
  mov    -0x18(%rbp),%rax
  jmp    L44
L19:
  cmpq   $0x0,-0x20(%rbp)
  jne    L21
  mov    $0x1,%eax
  jmp    L44
L21:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdx
  shr    $0x3f,%rdx
  add    %rdx,%rax
  sar    %rax
  mov    %rax,%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fastExpo>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  imul   %rax,%rax
  cqto
  idivq  -0x28(%rbp)
  mov    %rdx,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  and    $0x1,%eax
  test   %rax,%rax
  je     L14
  mov    -0x8(%rbp),%rax
  imul   -0x18(%rbp),%rax
  cqto
  idivq  -0x28(%rbp)
  mov    %rdx,-0x8(%rbp)
L14:
  mov    -0x8(%rbp),%rax
L44:
  leave
  ret
```

assistant: ```c
long long int fastExpo(long long int a, long long int b, long long int m) {
  long long int c;
  if (b == 1)
    return a;
  if (b == 0)
    return 1;
  else {
    c = fastExpo(a, b / 2, m);
    c = (c * c) % m;
    if (b % 2)
      c = (c * a) % m;
    return c;
  }
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<fastExpo>:
  endbr64
  cmp    $0x1,%rsi
  je     L15
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %rsi,%rbx
  mov    %rdx,%rbp
  mov    $0x1,%ecx
  test   %rsi,%rsi
  jne    L16
L31:
  mov    %rcx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L16:
  shr    $0x3f,%rsi
  add    %rbx,%rsi
  sar    %rsi
  call   <fastExpo>
  imul   %rax,%rax
  cqto
  idiv   %rbp
  mov    %rdx,%rcx
  test   $0x1,%bl
  je     L31
  mov    %r12,%rax
  imul   %rdx,%rax
  cqto
  idiv   %rbp
  mov    %rdx,%rcx
  jmp    L31
L15:
  mov    %rdi,%rax
  ret
```

assistant: ```c
long long int fastExpo(long long int a, long long int b, long long int m) {
  long long int c;
  if (b == 1)
    return a;
  if (b == 0)
    return 1;
  else {
    c = fastExpo(a, b / 2, m);
    c = (c * c) % m;
    if (b % 2)
      c = (c * a) % m;
    return c;
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<fastExpo>:
  endbr64
  cmp    $0x1,%rsi
  je     L7
  push   %r13
  mov    $0x1,%r8d
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x10,%rsp
  test   %rsi,%rsi
  jne    L10
L60:
  add    $0x10,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  pop    %r13
  ret
  nopl   0x0(%rax)
L10:
  mov    %rsi,%r13
  mov    %rdx,%rbp
  shr    $0x3f,%r13
  add    %rsi,%r13
  sar    %r13
  cmp    $0x1,%r13
  je     L19
  mov    $0x1,%eax
  test   %r13,%r13
  jne    L30
L53:
  cqto
  idiv   %rbp
  and    $0x1,%ebx
  mov    %rdx,%r8
  je     L60
  mov    %rdi,%rax
  add    $0x10,%rsp
  imul   %rdx,%rax
  pop    %rbx
  cqto
  idiv   %rbp
  pop    %rbp
  pop    %r13
  mov    %rdx,%r8
  mov    %r8,%rax
  ret
  nopl   0x0(%rax)
L7:
  mov    %rdi,%rax
  ret
  nopl   0x0(%rax)
L30:
  test   %rbx,%rbx
  lea    0x3(%rsi),%rsi
  mov    %rdi,0x8(%rsp)
  cmovns %rbx,%rsi
  sar    $0x2,%rsi
  call   <fastExpo>
  mov    0x8(%rsp),%rdi
  imul   %rax,%rax
  cqto
  idiv   %rbp
  and    $0x1,%r13d
  mov    %rdx,%rax
  je     L8
  imul   %rdi,%rax
  cqto
  idiv   %rbp
  mov    %rdx,%rax
L8:
  imul   %rdx,%rax
  jmp    L53
  nopw   0x0(%rax,%rax,1)
L19:
  mov    %rdi,%rax
  imul   %rdi,%rax
  jmp    L53
```

assistant: ```c
long long int fastExpo(long long int a, long long int b, long long int m) {
  long long int c;
  if (b == 1)
    return a;
  if (b == 0)
    return 1;
  else {
    c = fastExpo(a, b / 2, m);
    c = (c * c) % m;
    if (b % 2)
      c = (c * a) % m;
    return c;
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<fastExpo>:
  endbr64
  cmp    $0x1,%rsi
  je     L73
  push   %r13
  mov    $0x1,%r8d
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x10,%rsp
  test   %rsi,%rsi
  jne    L62
L13:
  add    $0x10,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  pop    %r13
  ret
  nopl   0x0(%rax)
L62:
  mov    %rsi,%r13
  mov    %rdx,%rbp
  shr    $0x3f,%r13
  add    %rsi,%r13
  sar    %r13
  cmp    $0x1,%r13
  je     L6
  mov    $0x1,%eax
  test   %r13,%r13
  jne    L15
L47:
  cqto
  idiv   %rbp
  and    $0x1,%ebx
  mov    %rdx,%r8
  je     L13
  mov    %rdi,%rax
  add    $0x10,%rsp
  imul   %rdx,%rax
  pop    %rbx
  cqto
  idiv   %rbp
  pop    %rbp
  pop    %r13
  mov    %rdx,%r8
  mov    %r8,%rax
  ret
  nopl   0x0(%rax)
L73:
  mov    %rdi,%rax
  ret
  nopl   0x0(%rax)
L15:
  test   %rbx,%rbx
  lea    0x3(%rsi),%rsi
  mov    %rdi,0x8(%rsp)
  cmovns %rbx,%rsi
  sar    $0x2,%rsi
  call   <fastExpo>
  mov    0x8(%rsp),%rdi
  imul   %rax,%rax
  cqto
  idiv   %rbp
  and    $0x1,%r13d
  mov    %rdx,%rax
  je     L52
  imul   %rdi,%rax
  cqto
  idiv   %rbp
  mov    %rdx,%rax
L52:
  imul   %rdx,%rax
  jmp    L47
  nopw   0x0(%rax,%rax,1)
L6:
  mov    %rdi,%rax
  imul   %rdi,%rax
  jmp    L47
```

assistant: ```c
long long int fastExpo(long long int a, long long int b, long long int m) {
  long long int c;
  if (b == 1)
    return a;
  if (b == 0)
    return 1;
  else {
    c = fastExpo(a, b / 2, m);
    c = (c * c) % m;
    if (b % 2)
      c = (c * a) % m;
    return c;
  }
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_cmc1x_ra_dec>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L23
  mov    -0x28(%rbp),%rax
  add    $0x10,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  imul   $0xe10,%rax,%rbx
  mov    -0x28(%rbp),%rax
  add    $0x13,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  add    %rax,%rbx
  mov    -0x28(%rbp),%rax
  add    $0x16,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  lea    (%rbx,%rax,1),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  imul   $0x2710,%rax,%rbx
  mov    -0x28(%rbp),%rax
  add    $0x19,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  lea    (%rbx,%rax,1),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
L23:
  cmpq   $0x0,-0x20(%rbp)
  je     L2
  mov    -0x28(%rbp),%rax
  add    $0x1f,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  imul   $0xe10,%rax,%rbx
  mov    -0x28(%rbp),%rax
  add    $0x22,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  add    %rax,%rbx
  mov    -0x28(%rbp),%rax
  add    $0x25,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  lea    (%rbx,%rax,1),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  imul   $0x3e8,%rax,%rbx
  mov    -0x28(%rbp),%rax
  add    $0x28,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  lea    (%rbx,%rax,1),%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x28(%rbp),%rax
  add    $0x1e,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L2
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  neg    %rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,(%rax)
L2:
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void get_cmc1x_ra_dec(long *ra, long *dec, const char *buff) {
  if (ra) {
    *ra = atoi(buff + 16) * 3600 + atoi(buff + 19) * 60 + atoi(buff + 22);
    *ra = *ra * 10000 + atoi(buff + 25);
  }
  if (dec) {
    *dec = atoi(buff + 31) * 3600 + atoi(buff + 34) * 60 + atoi(buff + 37);
    *dec = *dec * 1000 + atoi(buff + 40);
    if (buff[30] == '-')
      *dec = -(*dec);
  }
}
```
user: 这段汇编代码用C语言表示是什么样的?

```asm
<get_cmc1x_ra_dec>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rsi,%r12
  mov    %rdx,%rbx
  test   %rdi,%rdi
  je     L11
  mov    %rdi,%rbp
  lea    0x10(%rdx),%rdi
  call   <atoi@plt>
  mov    %rax,%r13
  lea    0x13(%rbx),%rdi
  call   <atoi@plt>
  mov    %rax,%rdx
  imul   $0xe10,%r13,%r13
  shl    $0x4,%rax
  sub    %rdx,%rax
  lea    0x0(%r13,%rax,4),%r13
  lea    0x16(%rbx),%rdi
  call   <atoi@plt>
  add    %rax,%r13
  mov    %r13,0x0(%rbp)
  lea    0x19(%rbx),%rdi
  call   <atoi@plt>
  imul   $0x2710,%r13,%r13
  add    %rax,%r13
  mov    %r13,0x0(%rbp)
L11:
  test   %r12,%r12
  je     L7
  lea    0x1f(%rbx),%rdi
  call   <atoi@plt>
  mov    %rax,%rbp
  lea    0x22(%rbx),%rdi
  call   <atoi@plt>
  mov    %rax,%rdx
  imul   $0xe10,%rbp,%rbp
  shl    $0x4,%rax
  sub    %rdx,%rax
  lea    0x0(%rbp,%rax,4),%rbp
  lea    0x25(%rbx),%rdi
  call   <atoi@plt>
  add    %rax,%rbp
  mov    %rbp,(%r12)
  lea    0x28(%rbx),%rdi
  call   <atoi@plt>
  imul   $0x3e8,%rbp,%rbp
  add    %rax,%rbp
  mov    %rbp,(%r12)
  cmpb   $0x2d,0x1e(%rbx)
  je     L8
L7:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L8:
  neg    %rbp
  mov    %rbp,(%r12)
  jmp    L7
```

assistant: ```c
void get_cmc1x_ra_dec(long *ra, long *dec, const char *buff) {
  if (ra) {
    *ra = atoi(buff + 16) * 3600 + atoi(buff + 19) * 60 + atoi(buff + 22);
    *ra = *ra * 10000 + atoi(buff + 25);
  }
  if (dec) {
    *dec = atoi(buff + 31) * 3600 + atoi(buff + 34) * 60 + atoi(buff + 37);
    *dec = *dec * 1000 + atoi(buff + 40);
    if (buff[30] == '-')
      *dec = -(*dec);
  }
}
```
user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<get_cmc1x_ra_dec>:
  endbr64
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x8,%rsp
  test   %rdi,%rdi
  je     L22
  mov    %rdi,%rbp
  lea    0x10(%rdx),%rdi
  call   <atoi@plt>
  lea    0x13(%rbx),%rdi
  mov    %rax,%r13
  call   <atoi@plt>
  imul   $0xe10,%r13,%r13
  lea    0x16(%rbx),%rdi
  mov    %rax,%r8
  shl    $0x4,%rax
  sub    %r8,%rax
  lea    0x0(%r13,%rax,4),%r13
  call   <atoi@plt>
  lea    0x19(%rbx),%rdi
  add    %rax,%r13
  mov    %r13,0x0(%rbp)
  imul   $0x2710,%r13,%r13
  call   <atoi@plt>
  add    %rax,%r13
  mov    %r13,0x0(%rbp)
L22:
  test   %r12,%r12
  je     L10
  lea    0x1f(%rbx),%rdi
  call   <atoi@plt>
  lea    0x22(%rbx),%rdi
  mov    %rax,%rbp
  call   <atoi@plt>
  imul   $0xe10,%rbp,%rbp
  lea    0x25(%rbx),%rdi
  mov    %rax,%r8
  shl    $0x4,%rax
  sub    %r8,%rax
  lea    0x0(%rbp,%rax,4),%rbp
  call   <atoi@plt>
  lea    0x28(%rbx),%rdi
  add    %rax,%rbp
  mov    %rbp,(%r12)
  imul   $0x3e8,%rbp,%rbp
  call   <atoi@plt>
  add    %rax,%rbp
  mov    %rbp,(%r12)
  cmpb   $0x2d,0x1e(%rbx)
  je     L6
L10:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L6:
  neg    %rbp
  mov    %rbp,(%r12)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
void get_cmc1x_ra_dec(long *ra, long *dec, const char *buff) {
  if (ra) {
    *ra = atoi(buff + 16) * 3600 + atoi(buff + 19) * 60 + atoi(buff + 22);
    *ra = *ra * 10000 + atoi(buff + 25);
  }
  if (dec) {
    *dec = atoi(buff + 31) * 3600 + atoi(buff + 34) * 60 + atoi(buff + 37);
    *dec = *dec * 1000 + atoi(buff + 40);
    if (buff[30] == '-')
      *dec = -(*dec);
  }
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<get_cmc1x_ra_dec>:
  endbr64
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x8,%rsp
  test   %rdi,%rdi
  je     L5
  mov    %rdi,%rbp
  lea    0x10(%rdx),%rdi
  call   <atoi@plt>
  lea    0x13(%rbx),%rdi
  mov    %rax,%r13
  call   <atoi@plt>
  imul   $0xe10,%r13,%r13
  lea    0x16(%rbx),%rdi
  mov    %rax,%r8
  shl    $0x4,%rax
  sub    %r8,%rax
  lea    0x0(%r13,%rax,4),%r13
  call   <atoi@plt>
  lea    0x19(%rbx),%rdi
  add    %rax,%r13
  mov    %r13,0x0(%rbp)
  imul   $0x2710,%r13,%r13
  call   <atoi@plt>
  add    %rax,%r13
  mov    %r13,0x0(%rbp)
L5:
  test   %r12,%r12
  je     L4
  lea    0x1f(%rbx),%rdi
  call   <atoi@plt>
  lea    0x22(%rbx),%rdi
  mov    %rax,%rbp
  call   <atoi@plt>
  imul   $0xe10,%rbp,%rbp
  lea    0x25(%rbx),%rdi
  mov    %rax,%r8
  shl    $0x4,%rax
  sub    %r8,%rax
  lea    0x0(%rbp,%rax,4),%rbp
  call   <atoi@plt>
  lea    0x28(%rbx),%rdi
  add    %rax,%rbp
  mov    %rbp,(%r12)
  imul   $0x3e8,%rbp,%rbp
  call   <atoi@plt>
  add    %rax,%rbp
  mov    %rbp,(%r12)
  cmpb   $0x2d,0x1e(%rbx)
  je     L7
L4:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L7:
  neg    %rbp
  mov    %rbp,(%r12)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
void get_cmc1x_ra_dec(long *ra, long *dec, const char *buff) {
  if (ra) {
    *ra = atoi(buff + 16) * 3600 + atoi(buff + 19) * 60 + atoi(buff + 22);
    *ra = *ra * 10000 + atoi(buff + 25);
  }
  if (dec) {
    *dec = atoi(buff + 31) * 3600 + atoi(buff + 34) * 60 + atoi(buff + 37);
    *dec = *dec * 1000 + atoi(buff + 40);
    if (buff[30] == '-')
      *dec = -(*dec);
  }
}
```