ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将以下的汇编代码转换成C语言代码：

```asm
<dfs_1>:
  endbr64
  push   %r15
  movslq %edx,%r15
  movslq %esi,%rdx
  push   %r14
  lea    (%rdi,%rdx,8),%r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %r15,%r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x8,%rsp
  mov    (%r14),%rax
  cmpb   $0x2e,(%rax,%r15,1)
  je     L143
  cmp    $0x7,%esi
  jle    L25
  cmp    $0x7,%r15d
  jg     L27
L25:
  cmp    $0x8,%r12d
  jne    L109
  add    $0x1,%ebp
  movslq %ebp,%rdx
  lea    0x0(%r13,%rdx,8),%r14
  mov    (%r14),%rax
  cmpb   $0x2e,(%rax)
  je     L112
  cmpb   $0x2e,0x1(%rax)
  je     L56
  cmpb   $0x2e,0x2(%rax)
  mov    $0x2,%r12d
  je     L5
L109:
  lea    0x0(%r13,%rdx,8),%r14
  add    $0x1,%r12d
  mov    (%r14),%rax
  movslq %r12d,%r15
  cmpb   $0x2e,(%rax,%r15,1)
  je     L143
  cmp    $0x7,%ebp
  jle    L25
  cmp    $0x7,%r12d
  jle    L25
L27:
  cmp    $0x8,%ebp
  jne    L143
  cmp    $0x8,%r12d
  jne    L143
L101:
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L5:
  mov    $0x2,%r15d
L143:
  mov    $0x31,%ebx
  jmp    L8
  nopl   (%rax)
L188:
  add    $0x1,%ebx
  cmp    $0x3a,%ebx
  je     L144
L8:
  mov    %ebx,%ecx
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <judge@plt>
  test   %rax,%rax
  je     L188
  mov    (%r14),%rax
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  mov    %bl,(%rax,%r15,1)
  call   <dfs_1>
  test   %eax,%eax
  jne    L101
  mov    (%r14),%rax
  add    $0x1,%ebx
  movb   $0x2e,(%rax,%r15,1)
  cmp    $0x3a,%ebx
  jne    L8
L144:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L112:
  xor    %r12d,%r12d
  xor    %r15d,%r15d
  jmp    L143
L56:
  mov    $0x1,%r12d
  mov    $0x1,%r15d
  jmp    L143
```

assistant: ```c
int dfs_1(char **board, int x, int y) {
  int i;
  while (board[x][y] != '.' && (x < 8 || y < 8)) {
    if (y == 8)
      y = 0, x++;
    else
      y++;
  }
  if (x == 8 && y == 8 && board[x][y] != '.')
    return 1;
  for (i = 1; i <= 9; i++) {
    if (judge(board, x, y, i + '0')) {
      board[x][y] = i + '0';
      if (dfs_1(board, x, y))
        return 1;
      board[x][y] = '.';
    }
  }
  return 0;
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  movl   $0x0,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L23
L152:
  cmpl   $0x0,-0x8(%rbp)
  jne    L41
  cmpl   $0xa,-0x4(%rbp)
  je     L41
  cmpl   $0x20,-0x4(%rbp)
  je     L41
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <putchar@plt>
  addl   $0x1,-0xc(%rbp)
L41:
  cmpl   $0x20,-0x4(%rbp)
  jne    L169
  addl   $0x1,-0x8(%rbp)
L169:
  cmpl   $0x7,-0x8(%rbp)
  jle    L74
  cmpl   $0x20,-0x4(%rbp)
  je     L74
  jmp    L1
L179:
  mov    $0x9,%edi
  call   <putchar@plt>
  subl   $0x8,-0x8(%rbp)
L1:
  cmpl   $0x7,-0x8(%rbp)
  jg     L179
  jmp    L65
L156:
  mov    $0x20,%edi
  call   <putchar@plt>
  subl   $0x1,-0xc(%rbp)
L65:
  cmpl   $0x0,-0xc(%rbp)
  jg     L156
  cmpl   $0x0,-0x8(%rbp)
  jne    L74
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <putchar@plt>
L74:
  cmpl   $0x0,-0x8(%rbp)
  jle    L173
  cmpl   $0x7,-0x8(%rbp)
  jg     L173
  cmpl   $0x20,-0x4(%rbp)
  je     L173
  jmp    L29
L79:
  mov    $0x20,%edi
  call   <putchar@plt>
  subl   $0x1,-0x8(%rbp)
L29:
  cmpl   $0x0,-0x8(%rbp)
  jg     L79
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <putchar@plt>
L173:
  cmpl   $0xa,-0x4(%rbp)
  je     L123
  cmpl   $0x9,-0x4(%rbp)
  je     L123
  cmpl   $0x7,-0xc(%rbp)
  jle    L23
L123:
  movl   $0x0,-0xc(%rbp)
L23:
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    %eax,-0x4(%rbp)
  mov    D7(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4(%rbp)
  jne    L152
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
int main(void) {
  int c, column, blanks;
  column = blanks = 0;
  while (c = getchar(), c != EOF) {
    if (blanks == 0 && c != '\n' && c != ' ') {
      putchar(c);
      column++;
    }
    if (c == ' ')
      blanks++;
    if (blanks >= 8 && c != ' ') {
      while (blanks >= 8) {
        putchar('\t');
        blanks -= 8;
      }
      while (column > 0) {
        putchar(' ');
        column--;
      }
      if (blanks == 0)
        putchar(c);
    }
    if (blanks > 0 && blanks < 8 && c != ' ') {
      while (blanks > 0) {
        putchar(' ');
        blanks--;
      }
      putchar(c);
    }
    if (c == '\n' || c == '\t' || column >= 8)
      column = 0;
  }
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    $0x0,%r13d
  mov    $0x0,%ebp
  jmp    L65
L40:
  mov    %ebx,%edi
  call   <putchar@plt>
  add    $0x1,%ebp
L13:
  lea    -0x1(%r13),%eax
  cmp    $0x6,%eax
  ja     L51
  test   %r14b,%r14b
  je     L51
  mov    %r13d,%r12d
L134:
  mov    $0x20,%edi
  call   <putchar@plt>
  sub    $0x1,%r12d
  test   %r12d,%r12d
  jg     L134
  test   %r13d,%r13d
  mov    $0x1,%eax
  cmovg  %r13d,%eax
  sub    %eax,%r13d
  mov    %ebx,%edi
  call   <putchar@plt>
  jmp    L51
L34:
  add    $0x1,%r13d
L51:
  sub    $0x9,%ebx
  cmp    $0x1,%ebx
  jbe    L110
  cmp    $0x7,%ebp
  jle    L65
L110:
  mov    $0x0,%ebp
L65:
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    %eax,%ebx
  mov    D1(%rip),%rax
  cmp    %ebx,(%rax)
  je     L22
  cmp    $0x20,%ebx
  setne  %r14b
  test   %r13d,%r13d
  sete   %dl
  cmp    $0xa,%ebx
  setne  %al
  test   %al,%dl
  je     L60
  test   %r14b,%r14b
  jne    L40
L60:
  cmp    $0x20,%ebx
  je     L34
  cmp    $0x7,%r13d
  jle    L13
  test   %r14b,%r14b
  je     L13
  mov    %r13d,%r12d
L177:
  mov    $0x9,%edi
  call   <putchar@plt>
  sub    $0x8,%r12d
  cmp    $0x7,%r12d
  jg     L177
  lea    -0x8(%r13),%edx
  mov    %edx,%eax
  and    $0xfffffff8,%eax
  neg    %eax
  cmp    $0x7,%r13d
  mov    $0x0,%ecx
  cmovle %ecx,%eax
  lea    (%rdx,%rax,1),%r13d
  test   %ebp,%ebp
  jle    L79
L16:
  mov    $0x20,%edi
  call   <putchar@plt>
  sub    $0x1,%ebp
  jne    L16
L79:
  test   %r13d,%r13d
  jne    L13
  mov    %ebx,%edi
  call   <putchar@plt>
  jmp    L51
L22:
  mov    $0x0,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
int main(void) {
  int c, column, blanks;
  column = blanks = 0;
  while (c = getchar(), c != EOF) {
    if (blanks == 0 && c != '\n' && c != ' ') {
      putchar(c);
      column++;
    }
    if (c == ' ')
      blanks++;
    if (blanks >= 8 && c != ' ') {
      while (blanks >= 8) {
        putchar('\t');
        blanks -= 8;
      }
      while (column > 0) {
        putchar(' ');
        column--;
      }
      if (blanks == 0)
        putchar(c);
    }
    if (blanks > 0 && blanks < 8 && c != ' ') {
      while (blanks > 0) {
        putchar(' ');
        blanks--;
      }
      putchar(c);
    }
    if (c == '\n' || c == '\t' || column >= 8)
      column = 0;
  }
  return 0;
}
```
user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0x8,%rsp
  mov    D5(%rip),%r15
L39:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    %eax,%ebx
  cmp    %eax,(%r15)
  je     L188
L63:
  cmp    $0x20,%ebx
  setne  %al
  test   %r12d,%r12d
  sete   %r13b
  cmp    $0xa,%ebx
  setne  %dl
  and    %edx,%r13d
  and    %al,%r13b
  jne    L62
  cmp    $0x20,%ebx
  je     L52
  cmp    $0x7,%r12d
  jle    L93
  test   %al,%al
  je     L93
  mov    %r12d,%r14d
  nopl   (%rax)
L157:
  mov    $0x9,%edi
  sub    $0x8,%r14d
  call   <putchar@plt>
  cmp    $0x7,%r14d
  jg     L157
  lea    -0x8(%r12),%r14d
  xor    %ecx,%ecx
  mov    %r14d,%eax
  and    $0xfffffff8,%eax
  neg    %eax
  cmp    $0x7,%r12d
  cmovle %ecx,%eax
  lea    (%r14,%rax,1),%esi
  add    %eax,%r12d
  mov    %esi,%r14d
  test   %ebp,%ebp
  je     L104
  nopl   0x0(%rax,%rax,1)
L31:
  mov    $0x20,%edi
  call   <putchar@plt>
  sub    $0x1,%ebp
  jne    L31
L104:
  mov    %r14d,%eax
  test   %r14d,%r14d
  je     L33
  sub    $0x9,%r12d
  xor    %ebp,%ebp
  lea    -0x1(%r14),%r14d
  cmp    $0x6,%r12d
  jbe    L187
  jmp    L137
L108:
  sub    $0x1,%r14d
L187:
  mov    $0x20,%edi
  mov    %r14d,%r12d
  call   <putchar@plt>
  test   %r14d,%r14d
  jne    L108
  mov    %ebx,%edi
  call   <putchar@plt>
L24:
  sub    $0x9,%ebx
  cmp    $0x1,%ebx
  jbe    L134
  test   %r13b,%r13b
  je     L39
L134:
  xor    %eax,%eax
  xor    %ebp,%ebp
  call   <getchar@plt>
  mov    %eax,%ebx
  cmp    %eax,(%r15)
  jne    L63
L188:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L62:
  mov    %ebx,%edi
  add    $0x1,%ebp
  call   <putchar@plt>
L93:
  cmp    $0x8,%ebp
  lea    -0x1(%r12),%r14d
  sete   %r13b
  cmp    $0x6,%r14d
  ja     L24
  jmp    L187
  cs nopw 0x0(%rax,%rax,1)
L52:
  add    $0x1,%r12d
  cmp    $0x8,%ebp
  sete   %r13b
  jmp    L24
  nopl   (%rax)
L33:
  mov    %ebx,%edi
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  call   <putchar@plt>
  jmp    L24
L137:
  mov    %eax,%r12d
  jmp    L24
```

assistant: ```c
int main(void) {
  int c, column, blanks;
  column = blanks = 0;
  while (c = getchar(), c != EOF) {
    if (blanks == 0 && c != '\n' && c != ' ') {
      putchar(c);
      column++;
    }
    if (c == ' ')
      blanks++;
    if (blanks >= 8 && c != ' ') {
      while (blanks >= 8) {
        putchar('\t');
        blanks -= 8;
      }
      while (column > 0) {
        putchar(' ');
        column--;
      }
      if (blanks == 0)
        putchar(c);
    }
    if (blanks > 0 && blanks < 8 && c != ' ') {
      while (blanks > 0) {
        putchar(' ');
        blanks--;
      }
      putchar(c);
    }
    if (c == '\n' || c == '\t' || column >= 8)
      column = 0;
  }
  return 0;
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  sub    $0x8,%rsp
  mov    D1(%rip),%r15
L168:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    %eax,%ebx
  cmp    %eax,(%r15)
  je     L76
L53:
  cmp    $0x20,%ebx
  setne  %al
  test   %r13d,%r13d
  sete   %r12b
  cmp    $0xa,%ebx
  setne  %dl
  and    %edx,%r12d
  and    %al,%r12b
  jne    L48
  cmp    $0x20,%ebx
  je     L81
  cmp    $0x7,%r13d
  jle    L79
  test   %al,%al
  je     L79
  mov    %r13d,%r14d
  nopl   (%rax)
L160:
  mov    $0x9,%edi
  sub    $0x8,%r14d
  call   <putchar@plt>
  cmp    $0x7,%r14d
  jg     L160
  lea    -0x8(%r13),%r14d
  xor    %ecx,%ecx
  mov    %r14d,%eax
  and    $0xfffffff8,%eax
  neg    %eax
  cmp    $0x7,%r13d
  cmovle %ecx,%eax
  lea    (%rax,%r14,1),%esi
  add    %eax,%r13d
  mov    %esi,%r14d
  test   %ebp,%ebp
  je     L155
  nopw   0x0(%rax,%rax,1)
L86:
  mov    $0x20,%edi
  call   <putchar@plt>
  sub    $0x1,%ebp
  jne    L86
L155:
  mov    %r14d,%eax
  test   %r14d,%r14d
  je     L156
  sub    $0x9,%r13d
  xor    %ebp,%ebp
  lea    -0x1(%r14),%r14d
  cmp    $0x6,%r13d
  jbe    L150
  jmp    L18
L115:
  sub    $0x1,%r14d
L150:
  mov    $0x20,%edi
  mov    %r14d,%r13d
  call   <putchar@plt>
  test   %r14d,%r14d
  jne    L115
  mov    %ebx,%edi
  call   <putchar@plt>
L47:
  sub    $0x9,%ebx
  cmp    $0x1,%ebx
  jbe    L22
  test   %r12b,%r12b
  je     L168
L22:
  xor    %eax,%eax
  xor    %ebp,%ebp
  call   <getchar@plt>
  mov    %eax,%ebx
  cmp    %eax,(%r15)
  jne    L53
L76:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L48:
  mov    %ebx,%edi
  add    $0x1,%ebp
  call   <putchar@plt>
L79:
  cmp    $0x8,%ebp
  lea    -0x1(%r13),%r14d
  sete   %r12b
  cmp    $0x6,%r14d
  ja     L47
  jmp    L150
  nopl   (%rax)
L81:
  add    $0x1,%r13d
  cmp    $0x8,%ebp
  sete   %r12b
  jmp    L47
  nopl   (%rax)
L156:
  mov    %ebx,%edi
  xor    %ebp,%ebp
  xor    %r13d,%r13d
  call   <putchar@plt>
  jmp    L47
L18:
  mov    %eax,%r13d
  jmp    L47
```

assistant: ```c
int main(void) {
  int c, column, blanks;
  column = blanks = 0;
  while (c = getchar(), c != EOF) {
    if (blanks == 0 && c != '\n' && c != ' ') {
      putchar(c);
      column++;
    }
    if (c == ' ')
      blanks++;
    if (blanks >= 8 && c != ' ') {
      while (blanks >= 8) {
        putchar('\t');
        blanks -= 8;
      }
      while (column > 0) {
        putchar(' ');
        column--;
      }
      if (blanks == 0)
        putchar(c);
    }
    if (blanks > 0 && blanks < 8 && c != ' ') {
      while (blanks > 0) {
        putchar(' ');
        blanks--;
      }
      putchar(c);
    }
    if (c == '\n' || c == '\t' || column >= 8)
      column = 0;
  }
  return 0;
}
```
user: Translate the below assembly code into C programming language:

```asm
<display_slot>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  mov    $0x0,%eax
  call   <led_clear@plt>
  mov    $0x1,%edi
  call   <led_set_dp@plt>
  mov    $0x2,%edi
  call   <led_set_dp@plt>
  mov    $0x3,%edi
  call   <led_set_dp@plt>
  mov    $0x4,%edi
  call   <led_set_dp@plt>
  movzbl %bl,%ebx
  mov    %ebx,%edi
  call   <timer_get_min@plt>
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x22,%rdx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  mov    $0x5,%edi
  call   <led_set_code@plt>
  mov    %ebx,%edi
  call   <timer_get_min@plt>
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x22,%rdx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  mov    $0x4,%edi
  call   <led_set_code@plt>
  mov    %ebx,%edi
  call   <timer_get_sec@plt>
  movslq %eax,%rsi
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  sar    $0x1f,%eax
  sub    %eax,%esi
  add    $0x30,%esi
  mov    $0x3,%edi
  call   <led_set_code@plt>
  mov    %ebx,%edi
  call   <timer_get_sec@plt>
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x22,%rdx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  mov    $0x2,%edi
  call   <led_set_code@plt>
  mov    %ebx,%edi
  call   <timer_get_ms10@plt>
  movslq %eax,%rsi
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  sar    $0x1f,%eax
  sub    %eax,%esi
  add    $0x30,%esi
  mov    $0x1,%edi
  call   <led_set_code@plt>
  mov    %ebx,%edi
  call   <timer_get_ms10@plt>
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x22,%rdx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  mov    $0x0,%edi
  call   <led_set_code@plt>
  pop    %rbx
  ret
```

assistant: ```c
void display_slot(unsigned char slot) {
  led_clear();
  led_set_dp(1);
  led_set_dp(2);
  led_set_dp(3);
  led_set_dp(4);
  led_set_code(5, (timer_get_min(slot) % 10) + 0x30);
  led_set_code(4, (timer_get_min(slot) % 10) + 0x30);
  led_set_code(3, (timer_get_sec(slot) / 10) + 0x30);
  led_set_code(2, (timer_get_sec(slot) % 10) + 0x30);
  led_set_code(1, (timer_get_ms10(slot) / 10) + 0x30);
  led_set_code(0, (timer_get_ms10(slot) % 10) + 0x30);
}
```
user: What would the C source look like for the assembly code provided here:

```asm
<display_slot>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  mov    %edi,%ebp
  movzbl %bpl,%ebp
  call   <led_clear@plt>
  mov    $0x1,%edi
  call   <led_set_dp@plt>
  mov    $0x2,%edi
  call   <led_set_dp@plt>
  mov    $0x3,%edi
  call   <led_set_dp@plt>
  mov    $0x4,%edi
  call   <led_set_dp@plt>
  mov    %ebp,%edi
  call   <timer_get_min@plt>
  mov    $0x5,%edi
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  call   <led_set_code@plt>
  mov    %ebp,%edi
  call   <timer_get_min@plt>
  mov    $0x4,%edi
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  call   <led_set_code@plt>
  mov    %ebp,%edi
  call   <timer_get_sec@plt>
  mov    $0x3,%edi
  movslq %eax,%rsi
  sar    $0x1f,%eax
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  sub    %eax,%esi
  add    $0x30,%esi
  call   <led_set_code@plt>
  mov    %ebp,%edi
  call   <timer_get_sec@plt>
  mov    $0x2,%edi
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x22,%rdx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  call   <led_set_code@plt>
  mov    %ebp,%edi
  call   <timer_get_ms10@plt>
  mov    $0x1,%edi
  movslq %eax,%rsi
  sar    $0x1f,%eax
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  sub    %eax,%esi
  add    $0x30,%esi
  call   <led_set_code@plt>
  mov    %ebp,%edi
  call   <timer_get_ms10@plt>
  xor    %edi,%edi
  pop    %rbp
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  jmp    10a0 <led_set_code@plt>
```

assistant: ```c
void display_slot(unsigned char slot) {
  led_clear();
  led_set_dp(1);
  led_set_dp(2);
  led_set_dp(3);
  led_set_dp(4);
  led_set_code(5, (timer_get_min(slot) % 10) + 0x30);
  led_set_code(4, (timer_get_min(slot) % 10) + 0x30);
  led_set_code(3, (timer_get_sec(slot) / 10) + 0x30);
  led_set_code(2, (timer_get_sec(slot) % 10) + 0x30);
  led_set_code(1, (timer_get_ms10(slot) / 10) + 0x30);
  led_set_code(0, (timer_get_ms10(slot) % 10) + 0x30);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<display_slot>:
  endbr64
  push   %rbp
  xor    %eax,%eax
  mov    %edi,%ebp
  movzbl %bpl,%ebp
  call   <led_clear@plt>
  mov    $0x1,%edi
  call   <led_set_dp@plt>
  mov    $0x2,%edi
  call   <led_set_dp@plt>
  mov    $0x3,%edi
  call   <led_set_dp@plt>
  mov    $0x4,%edi
  call   <led_set_dp@plt>
  mov    %ebp,%edi
  call   <timer_get_min@plt>
  mov    $0x5,%edi
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  call   <led_set_code@plt>
  mov    %ebp,%edi
  call   <timer_get_min@plt>
  mov    $0x4,%edi
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  call   <led_set_code@plt>
  mov    %ebp,%edi
  call   <timer_get_sec@plt>
  mov    $0x3,%edi
  movslq %eax,%rsi
  sar    $0x1f,%eax
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  sub    %eax,%esi
  add    $0x30,%esi
  call   <led_set_code@plt>
  mov    %ebp,%edi
  call   <timer_get_sec@plt>
  mov    $0x2,%edi
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x22,%rdx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  call   <led_set_code@plt>
  mov    %ebp,%edi
  call   <timer_get_ms10@plt>
  mov    $0x1,%edi
  movslq %eax,%rsi
  sar    $0x1f,%eax
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  sub    %eax,%esi
  add    $0x30,%esi
  call   <led_set_code@plt>
  mov    %ebp,%edi
  call   <timer_get_ms10@plt>
  xor    %edi,%edi
  pop    %rbp
  movslq %eax,%rdx
  mov    %eax,%ecx
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%ecx
  sar    $0x22,%rdx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%edx
  add    %edx,%edx
  sub    %edx,%eax
  lea    0x30(%rax),%esi
  jmp    10a0 <led_set_code@plt>
```

assistant: ```c
void display_slot(unsigned char slot) {
  led_clear();
  led_set_dp(1);
  led_set_dp(2);
  led_set_dp(3);
  led_set_dp(4);
  led_set_code(5, (timer_get_min(slot) % 10) + 0x30);
  led_set_code(4, (timer_get_min(slot) % 10) + 0x30);
  led_set_code(3, (timer_get_sec(slot) / 10) + 0x30);
  led_set_code(2, (timer_get_sec(slot) % 10) + 0x30);
  led_set_code(1, (timer_get_ms10(slot) / 10) + 0x30);
  led_set_code(0, (timer_get_ms10(slot) % 10) + 0x30);
}
```
user: What is the c source code of the assembly code below?

```asm
<b64estr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  movb   $0x0,-0xf(%rbp)
  movb   $0x0,-0xc(%rbp)
  jmp    L124
L98:
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L61
L44:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x28(%rbp),%eax
  cltq
  mov    %dl,-0xf(%rbp,%rax,1)
  addq   $0x1,-0x38(%rbp)
  cmpl   $0x0,-0x3c(%rbp)
  jle    L3
  addl   $0x1,-0x24(%rbp)
  jmp    L87
L3:
  mov    -0x28(%rbp),%eax
  cltq
  movb   $0x0,-0xf(%rbp,%rax,1)
L87:
  subl   $0x1,-0x3c(%rbp)
  addl   $0x1,-0x28(%rbp)
L61:
  cmpl   $0x2,-0x28(%rbp)
  jle    L44
  cmpl   $0x0,-0x24(%rbp)
  jle    L118
  mov    -0x24(%rbp),%edx
  lea    -0xc(%rbp),%rcx
  lea    -0xf(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <encodeblock@plt>
  movl   $0x0,-0x28(%rbp)
  jmp    L0
L8:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L54
  mov    -0x18(%rbp),%rax
  movb   $0x7b,(%rax)
  addq   $0x1,-0x18(%rbp)
  movl   $0x1,-0x1c(%rbp)
L54:
  mov    -0x28(%rbp),%eax
  cltq
  movzbl -0xc(%rbp,%rax,1),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  addq   $0x1,-0x18(%rbp)
  addl   $0x1,-0x28(%rbp)
L0:
  cmpl   $0x3,-0x28(%rbp)
  jle    L8
  addl   $0x1,-0x20(%rbp)
L118:
  cmpl   $0x0,-0x1c(%rbp)
  je     L124
  cmpl   $0x0,-0x3c(%rbp)
  jg     L124
  mov    -0x18(%rbp),%rax
  movb   $0x7d,(%rax)
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
L124:
  cmpl   $0x0,-0x3c(%rbp)
  jg     L98
  mov    -0x18(%rbp),%rax
  sub    -0x48(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L51
  call   <__stack_chk_fail@plt>
L51:
  leave
  ret
```

assistant: ```c
int b64estr(const unsigned char *data, int bytes, char *strout) {
  unsigned char in[3];
  unsigned char out[4];
  int i, len, blocksout = 0;
  int p = 0;
  char *str = strout;
  str[0] = 0;
  *in = (unsigned char)0;
  *out = (unsigned char)0;
  while (bytes > 0) {
    len = 0;
    for (i = 0; i < 3; i++) {
      in[i] = data[0];
      data++;
      if (bytes > 0) {
        len++;
      } else {
        in[i] = (unsigned char)0;
      }
      bytes--;
    }
    if (len > 0) {
      encodeblock(in, out, len);
      for (i = 0; i < 4; i++) {
        if (!p) {
          str[0] = '{';
          str++;
          p = 1;
        }
        str[0] = out[i];
        str++;
      }
      blocksout++;
    }
    if ((p) && (bytes <= 0)) {
      str[0] = '}';
      str++;
      str[0] = 0;
    }
  }
  return ((int)(str - strout));
}
```