user: 请从给定的汇编指令推导出C源代码:

```asm
<BUSView>:
  endbr64
  push   %r15
  xor    %edi,%edi
  mov    $0x3,%esi
  xor    %eax,%eax
  push   %r14
  lea    D343(%rip),%r15
  lea    D196(%rip),%r14
  push   %r13
  lea    D379(%rip),%r13
  push   %r12
  lea    D201(%rip),%r12
  push   %rbp
  push   %rbx
  mov    $0x1,%ebx
  sub    $0x28,%rsp
  call   <iGetPortConfig@plt>
  mov    $0x3,%esi
  mov    $0x1,%edi
  mov    %al,0x10(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  mov    $0x3,%esi
  mov    $0x2,%edi
  mov    %al,0x11(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  mov    $0x3,%esi
  mov    $0x3,%edi
  mov    %al,0x12(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  xor    %edi,%edi
  mov    $0x2,%esi
  mov    %al,0x13(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  mov    $0x2,%esi
  mov    $0x1,%edi
  mov    %al,0x14(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  mov    $0x2,%esi
  mov    $0x2,%edi
  mov    %al,0x15(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  mov    $0x2,%esi
  mov    $0x3,%edi
  mov    %al,0x16(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  xor    %edi,%edi
  mov    $0x1,%esi
  mov    %al,0x17(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  mov    %al,0x18(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  mov    $0x1,%esi
  mov    $0x2,%edi
  mov    %al,0x19(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  mov    $0x1,%esi
  mov    $0x3,%edi
  mov    %al,0x1a(%rsp)
  xor    %eax,%eax
  call   <iGetPortConfig@plt>
  xor    %edi,%edi
  mov    %al,0x1b(%rsp)
  xor    %eax,%eax
  call   <bReadPort@plt>
  mov    $0x1,%edi
  mov    %al,0x1c(%rsp)
  xor    %eax,%eax
  call   <bReadPort@plt>
  mov    $0x2,%edi
  mov    %al,0x1d(%rsp)
  xor    %eax,%eax
  call   <bReadPort@plt>
  mov    $0x3,%edi
  mov    %al,0x1e(%rsp)
  xor    %eax,%eax
  call   <bReadPort@plt>
  lea    D126(%rip),%rdi
  mov    %al,0x1f(%rsp)
  xor    %eax,%eax
  call   <system@plt>
  lea    D394(%rip),%rdi
  call   <puts@plt>
  lea    D295(%rip),%rdi
  call   <puts@plt>
  lea    D394(%rip),%rdi
  call   <puts@plt>
  mov    $0x21,%edx
  mov    $0x20,%esi
  xor    %eax,%eax
  lea    D167(%rip),%rdi
  call   <printf@plt>
  lea    D394(%rip),%rdi
  call   <puts@plt>
  lea    D45(%rip),%rdi
  call   <puts@plt>
  lea    D394(%rip),%rdi
  call   <puts@plt>
  nopl   0x0(%rax)
L8:
  lea    -0x1(%rbx),%ecx
  mov    $0x1,%ebp
  mov    %r15,%rdi
  shl    %cl,%ebp
  lea    D174(%rip),%rax
  test   %bpl,0x10(%rsp)
  lea    D230(%rip),%rsi
  cmovne %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  test   %bpl,0x14(%rsp)
  lea    D352(%rip),%rdx
  mov    %r14,%rdi
  lea    D281(%rip),%rsi
  cmovne %rdx,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  test   %bpl,0x18(%rsp)
  lea    D363(%rip),%rcx
  mov    %r13,%rdi
  lea    D233(%rip),%rsi
  cmovne %rcx,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %esi,%esi
  test   %bpl,0x1c(%rsp)
  mov    %r12,%rdi
  setne  %sil
  xor    %eax,%eax
  mov    $0x1,%ebp
  call   <printf@plt>
  lea    0x8(%rbx),%edx
  mov    %ebx,%esi
  xor    %eax,%eax
  lea    D221(%rip),%rdi
  mov    %edx,0xc(%rsp)
  call   <printf@plt>
  lea    0x7(%rbx),%ecx
  xor    %esi,%esi
  mov    %r12,%rdi
  and    $0x7,%ecx
  shl    %cl,%ebp
  test   %bpl,0x1d(%rsp)
  setne  %sil
  xor    %eax,%eax
  call   <printf@plt>
  lea    D363(%rip),%rcx
  test   %bpl,0x19(%rsp)
  mov    %r13,%rdi
  lea    D233(%rip),%rsi
  cmovne %rcx,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D352(%rip),%rdx
  test   %bpl,0x15(%rsp)
  mov    %r14,%rdi
  lea    D281(%rip),%rsi
  cmovne %rdx,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  test   %bpl,0x11(%rsp)
  mov    %r15,%rdi
  mov    $0x1,%ebp
  lea    D174(%rip),%rax
  lea    D230(%rip),%rsi
  cmovne %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D315(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xf(%rbx),%ecx
  lea    D174(%rip),%rax
  mov    %r15,%rdi
  and    $0x7,%ecx
  lea    D230(%rip),%rsi
  shl    %cl,%ebp
  test   %bpl,0x12(%rsp)
  cmovne %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  test   %bpl,0x16(%rsp)
  lea    D352(%rip),%rdx
  mov    %r14,%rdi
  lea    D281(%rip),%rsi
  cmovne %rdx,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  test   %bpl,0x1a(%rsp)
  lea    D363(%rip),%rcx
  mov    %r13,%rdi
  lea    D233(%rip),%rsi
  cmovne %rcx,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %esi,%esi
  test   %bpl,0x1e(%rsp)
  mov    %r12,%rdi
  setne  %sil
  xor    %eax,%eax
  mov    $0x1,%ebp
  call   <printf@plt>
  mov    0xc(%rsp),%edx
  mov    %ebx,%esi
  xor    %eax,%eax
  lea    D221(%rip),%rdi
  call   <printf@plt>
  lea    0x17(%rbx),%ecx
  xor    %esi,%esi
  mov    %r12,%rdi
  and    $0x7,%ecx
  shl    %cl,%ebp
  test   %bpl,0x1f(%rsp)
  setne  %sil
  xor    %eax,%eax
  call   <printf@plt>
  test   %bpl,0x1b(%rsp)
  lea    D363(%rip),%rcx
  mov    %r13,%rdi
  lea    D233(%rip),%rsi
  cmovne %rcx,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  test   %bpl,0x17(%rsp)
  lea    D352(%rip),%rdx
  mov    %r14,%rdi
  lea    D281(%rip),%rsi
  cmovne %rdx,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  test   %bpl,0x13(%rsp)
  lea    D174(%rip),%rax
  lea    D230(%rip),%rsi
  cmovne %rax,%rsi
  lea    D22(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <printf@plt>
  cmp    $0x9,%ebx
  jne    L8
  lea    D394(%rip),%rdi
  call   <puts@plt>
  add    $0x28,%rsp
  lea    D154(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <puts@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D343
type: string
name: retrieve_data
arguments: tag: D196
type: string
name: retrieve_data
arguments: tag: D379
type: string
name: retrieve_data
arguments: tag: D201
type: string
name: retrieve_data
arguments: tag: D126
type: string
name: retrieve_data
arguments: tag: D394
type: string
name: retrieve_data
arguments: tag: D295
type: string
name: retrieve_data
arguments: tag: D167
type: string
name: retrieve_data
arguments: tag: D45
type: string
name: retrieve_data
arguments: tag: D174
type: string
name: retrieve_data
arguments: tag: D230
type: string
name: retrieve_data
arguments: tag: D352
type: string
name: retrieve_data
arguments: tag: D281
type: string
name: retrieve_data
arguments: tag: D363
type: string
name: retrieve_data
arguments: tag: D233
type: string
name: retrieve_data
arguments: tag: D221
type: string
name: retrieve_data
arguments: tag: D315
type: string
name: retrieve_data
arguments: tag: D22
type: string
name: retrieve_data
arguments: tag: D154
type: string

tool: D343:  | %4s 

tool: D196: | %4s 

tool: D379: | %3s

tool: D201:  |  %d  

tool: D126: clear

tool: D394:  +------+------+-----+-----+-----+-----+-----+-----+------+------+-------+------+------+-----+-----+-----+-----+-----+-----+------+------+

tool: D295:  |                                                             BUS Information                                                           |

tool: D167:  |                          BUS 1 [0x%02x]                         |       |                         BUS 2 [0x%02x]                          |


tool: D45:  |  POL |  PUL | DIR | VAL |    PIN    | VAL | DIR |  PUL |  POL |       |  POL |  PUL | DIR | VAL |    PIN    | VAL | DIR |  PUL |  POL |

tool: D174: INV

tool: D230: NOR

tool: D352: UP

tool: D281: DOWN

tool: D363: IN

tool: D233: OUT

tool: D221: |  %d  - %2d 

tool: D315: |      

tool: D22:  | %4s |


tool: D154: 
Press 'ctrl+c' to escape...

assistant: ```c
void BUSView() {
  unsigned char p0_pol = iGetPortConfig(0, 3);
  unsigned char p1_pol = iGetPortConfig(1, 3);
  unsigned char p2_pol = iGetPortConfig(2, 3);
  unsigned char p3_pol = iGetPortConfig(3, 3);
  unsigned char p0_pul = iGetPortConfig(0, 2);
  unsigned char p1_pul = iGetPortConfig(1, 2);
  unsigned char p2_pul = iGetPortConfig(2, 2);
  unsigned char p3_pul = iGetPortConfig(3, 2);
  unsigned char p0_dir = iGetPortConfig(0, 1);
  unsigned char p1_dir = iGetPortConfig(1, 1);
  unsigned char p2_dir = iGetPortConfig(2, 1);
  unsigned char p3_dir = iGetPortConfig(3, 1);
  unsigned char p0_data = bReadPort(0);
  unsigned char p1_data = bReadPort(1);
  unsigned char p2_data = bReadPort(2);
  unsigned char p3_data = bReadPort(3);
  system("clear");
  printf(" +------+------+-----+-----+-----+-----+-----+-----+------+------+-------+------+------+-----+-----+-----+-----+-----+-----+------+------+\n");
  printf(" |                                                             BUS Information                                                           |\n");
  printf(" +------+------+-----+-----+-----+-----+-----+-----+------+------+-------+------+------+-----+-----+-----+-----+-----+-----+------+------+\n");
  printf(" |                          BUS 1 [0x%02x]                         |       |                         BUS 2 [0x%02x]                          |\n", 0x20, 0x21);
  printf(" +------+------+-----+-----+-----+-----+-----+-----+------+------+-------+------+------+-----+-----+-----+-----+-----+-----+------+------+\n");
  printf(" |  POL |  PUL | DIR | VAL |    PIN    | VAL | DIR |  PUL |  POL |       |  POL |  PUL | DIR | VAL |    PIN    | VAL | DIR |  PUL |  POL |\n");
  printf(" +------+------+-----+-----+-----+-----+-----+-----+------+------+-------+------+------+-----+-----+-----+-----+-----+-----+------+------+\n");
  int pin = 1;
  for (pin; pin <= 8; pin++) {
    printf(" | %4s ", ((((p0_pol) & (({
                           unsigned char r;
                           unsigned char x = 0x00;
                           if (pin >= 1 && pin <= 32) {
                             r = (x |= 1 << ((pin - 1) % 8));
                           } else {
                             r = -10;
                           }
                           r;
                         }))) != 0))
                          ? "INV"
                          : "NOR");
    ;
    printf("| %4s ", ((((p0_pul) & (({
                          unsigned char r;
                          unsigned char x = 0x00;
                          if (pin >= 1 && pin <= 32) {
                            r = (x |= 1 << ((pin - 1) % 8));
                          } else {
                            r = -10;
                          }
                          r;
                        }))) != 0))
                         ? "UP"
                         : "DOWN");
    ;
    printf("| %3s", ((((p0_dir) & (({
                         unsigned char r;
                         unsigned char x = 0x00;
                         if (pin >= 1 && pin <= 32) {
                           r = (x |= 1 << ((pin - 1) % 8));
                         } else {
                           r = -10;
                         }
                         r;
                       }))) != 0))
                        ? "IN"
                        : "OUT");
    ;
    printf(" |  %d  ", ((((p0_data) & (({
                            unsigned char r;
                            unsigned char x = 0x00;
                            if (pin >= 1 && pin <= 32) {
                              r = (x |= 1 << ((pin - 1) % 8));
                            } else {
                              r = -10;
                            }
                            r;
                          }))) != 0))
                           ? 1
                           : 0);
    ;
    printf("|  %d  - %2d ", pin, (pin + 8));
    ;
    printf(" |  %d  ", ((((p1_data) & (({
                            unsigned char r;
                            unsigned char x = 0x00;
                            if ((pin + (8 * 1)) >= 1 && (pin + (8 * 1)) <= 32) {
                              r = (x |= 1 << (((pin + (8 * 1)) - 1) % 8));
                            } else {
                              r = -10;
                            }
                            r;
                          }))) != 0))
                           ? 1
                           : 0);
    ;
    printf("| %3s", ((((p1_dir) & (({
                         unsigned char r;
                         unsigned char x = 0x00;
                         if ((pin + (8 * 1)) >= 1 && (pin + (8 * 1)) <= 32) {
                           r = (x |= 1 << (((pin + (8 * 1)) - 1) % 8));
                         } else {
                           r = -10;
                         }
                         r;
                       }))) != 0))
                        ? "IN"
                        : "OUT");
    ;
    printf("| %4s ", ((((p1_pul) & (({
                          unsigned char r;
                          unsigned char x = 0x00;
                          if ((pin + (8 * 1)) >= 1 && (pin + (8 * 1)) <= 32) {
                            r = (x |= 1 << (((pin + (8 * 1)) - 1) % 8));
                          } else {
                            r = -10;
                          }
                          r;
                        }))) != 0))
                         ? "UP"
                         : "DOWN");
    ;
    printf(" | %4s ", ((((p1_pol) & (({
                           unsigned char r;
                           unsigned char x = 0x00;
                           if ((pin + (8 * 1)) >= 1 && (pin + (8 * 1)) <= 32) {
                             r = (x |= 1 << (((pin + (8 * 1)) - 1) % 8));
                           } else {
                             r = -10;
                           }
                           r;
                         }))) != 0))
                          ? "INV"
                          : "NOR");
    ;
    printf("|      ");
    ;
    printf(" | %4s ", ((((p2_pol) & (({
                           unsigned char r;
                           unsigned char x = 0x00;
                           if ((pin + (8 * 2)) >= 1 && (pin + (8 * 2)) <= 32) {
                             r = (x |= 1 << (((pin + (8 * 2)) - 1) % 8));
                           } else {
                             r = -10;
                           }
                           r;
                         }))) != 0))
                          ? "INV"
                          : "NOR");
    ;
    printf("| %4s ", ((((p2_pul) & (({
                          unsigned char r;
                          unsigned char x = 0x00;
                          if ((pin + (8 * 2)) >= 1 && (pin + (8 * 2)) <= 32) {
                            r = (x |= 1 << (((pin + (8 * 2)) - 1) % 8));
                          } else {
                            r = -10;
                          }
                          r;
                        }))) != 0))
                         ? "UP"
                         : "DOWN");
    ;
    printf("| %3s", ((((p2_dir) & (({
                         unsigned char r;
                         unsigned char x = 0x00;
                         if ((pin + (8 * 2)) >= 1 && (pin + (8 * 2)) <= 32) {
                           r = (x |= 1 << (((pin + (8 * 2)) - 1) % 8));
                         } else {
                           r = -10;
                         }
                         r;
                       }))) != 0))
                        ? "IN"
                        : "OUT");
    ;
    printf(" |  %d  ", ((((p2_data) & (({
                            unsigned char r;
                            unsigned char x = 0x00;
                            if ((pin + (8 * 2)) >= 1 && (pin + (8 * 2)) <= 32) {
                              r = (x |= 1 << (((pin + (8 * 2)) - 1) % 8));
                            } else {
                              r = -10;
                            }
                            r;
                          }))) != 0))
                           ? 1
                           : 0);
    ;
    printf("|  %d  - %2d ", pin, (pin + 8));
    ;
    printf(" |  %d  ", ((((p3_data) & (({
                            unsigned char r;
                            unsigned char x = 0x00;
                            if ((pin + (8 * 3)) >= 1 && (pin + (8 * 3)) <= 32) {
                              r = (x |= 1 << (((pin + (8 * 3)) - 1) % 8));
                            } else {
                              r = -10;
                            }
                            r;
                          }))) != 0))
                           ? 1
                           : 0);
    ;
    printf("| %3s", ((((p3_dir) & (({
                         unsigned char r;
                         unsigned char x = 0x00;
                         if ((pin + (8 * 3)) >= 1 && (pin + (8 * 3)) <= 32) {
                           r = (x |= 1 << (((pin + (8 * 3)) - 1) % 8));
                         } else {
                           r = -10;
                         }
                         r;
                       }))) != 0))
                        ? "IN"
                        : "OUT");
    ;
    printf("| %4s ", ((((p3_pul) & (({
                          unsigned char r;
                          unsigned char x = 0x00;
                          if ((pin + (8 * 3)) >= 1 && (pin + (8 * 3)) <= 32) {
                            r = (x |= 1 << (((pin + (8 * 3)) - 1) % 8));
                          } else {
                            r = -10;
                          }
                          r;
                        }))) != 0))
                         ? "UP"
                         : "DOWN");
    ;
    printf(" | %4s |\n", ((((p3_pol) & (({
                              unsigned char r;
                              unsigned char x = 0x00;
                              if (pin + (8 * 3) >= 1 && pin + (8 * 3) <= 32) {
                                r = (x |= 1 << ((pin + (8 * 3) - 1) % 8));
                              } else {
                                r = -10;
                              }
                              r;
                            }))) != 0))
                             ? "INV"
                             : "NOR");
    ;
  }
  printf(" +------+------+-----+-----+-----+-----+-----+-----+------+------+-------+------+------+-----+-----+-----+-----+-----+-----+------+------+\n");
  printf("\nPress 'ctrl+c' to escape...\n");
}
```