user: Translate the below assembly code into C programming language:

```asm
<BUSView>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    $0x3,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x10(%rsp)
  mov    $0x3,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x11(%rsp)
  mov    $0x3,%esi
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x12(%rsp)
  mov    $0x3,%esi
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x13(%rsp)
  mov    $0x2,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x14(%rsp)
  mov    $0x2,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x15(%rsp)
  mov    $0x2,%esi
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x16(%rsp)
  mov    $0x2,%esi
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x17(%rsp)
  mov    $0x1,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x18(%rsp)
  mov    $0x1,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x19(%rsp)
  mov    $0x1,%esi
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x1a(%rsp)
  mov    $0x1,%esi
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <iGetPortConfig@plt>
  mov    %al,0x1b(%rsp)
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <bReadPort@plt>
  mov    %al,0x1c(%rsp)
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <bReadPort@plt>
  mov    %al,0x1d(%rsp)
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <bReadPort@plt>
  mov    %al,0x1e(%rsp)
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <bReadPort@plt>
  mov    %al,0x1f(%rsp)
  lea    D106(%rip),%rdi
  mov    $0x0,%eax
  call   <system@plt>
  lea    D131(%rip),%rbx
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D138(%rip),%rdi
  call   <puts@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  mov    $0x21,%edx
  mov    $0x20,%esi
  lea    D271(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D339(%rip),%rdi
  call   <puts@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  mov    $0x0,%r12d
  lea    D146(%rip),%r15
  lea    D253(%rip),%r13
  lea    D176(%rip),%r14
L10:
  mov    %r12d,%ebx
  add    $0x1,%r12d
  mov    %r12d,0x8(%rsp)
  cmp    $0x1f,%ebx
  ja     L30
  mov    %ebx,%ecx
  and    $0x7,%ecx
  mov    $0x1,%ebp
  shl    %cl,%ebp
L24:
  test   %bpl,0x10(%rsp)
  lea    D276(%rip),%rsi
  lea    D121(%rip),%rax
  cmovne %rax,%rsi
  lea    D223(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bpl,0x14(%rsp)
  lea    D229(%rip),%rsi
  cmove  %r15,%rsi
  lea    D111(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bpl,0x18(%rsp)
  mov    %r14,%rsi
  cmovne %r13,%rsi
  lea    D21(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bpl,0x1c(%rsp)
  setne  %sil
  movzbl %sil,%esi
  lea    D302(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x9(%rbx),%eax
  mov    %eax,0xc(%rsp)
  mov    %eax,%edx
  mov    0x8(%rsp),%esi
  lea    D128(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x8(%rbx),%ecx
  cmp    $0x1f,%ecx
  ja     L85
  and    $0x7,%ecx
  mov    $0x1,%ebp
  shl    %cl,%ebp
L83:
  test   %bpl,0x1d(%rsp)
  setne  %sil
  movzbl %sil,%esi
  lea    D302(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bpl,0x19(%rsp)
  mov    %r14,%rsi
  cmovne %r13,%rsi
  lea    D21(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bpl,0x15(%rsp)
  lea    D229(%rip),%rsi
  cmove  %r15,%rsi
  lea    D111(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bpl,0x11(%rsp)
  lea    D276(%rip),%rsi
  lea    D121(%rip),%rax
  cmovne %rax,%rsi
  lea    D223(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D264(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x10(%rbx),%eax
  cmp    $0x1f,%eax
  jbe    L59
  mov    $0xfffffff6,%ebp
L52:
  test   %bpl,0x12(%rsp)
  lea    D276(%rip),%rsi
  lea    D121(%rip),%rax
  cmovne %rax,%rsi
  lea    D223(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bpl,0x16(%rsp)
  lea    D229(%rip),%rsi
  cmove  %r15,%rsi
  lea    D111(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bpl,0x1a(%rsp)
  mov    %r14,%rsi
  cmovne %r13,%rsi
  lea    D21(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bpl,0x1e(%rsp)
  setne  %sil
  movzbl %sil,%esi
  lea    D302(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  lea    D128(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x18,%ebx
  cmp    $0x1f,%ebx
  jbe    L46
  mov    $0xfffffff6,%ebx
L8:
  test   %bl,0x1f(%rsp)
  setne  %sil
  movzbl %sil,%esi
  lea    D302(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bl,0x1b(%rsp)
  mov    %r14,%rsi
  cmovne %r13,%rsi
  lea    D21(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bl,0x17(%rsp)
  lea    D229(%rip),%rsi
  cmove  %r15,%rsi
  lea    D111(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %bl,0x13(%rsp)
  lea    D276(%rip),%rsi
  lea    D121(%rip),%rax
  cmovne %rax,%rsi
  lea    D267(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmp    $0x8,%r12d
  jne    L10
  lea    D131(%rip),%rdi
  call   <puts@plt>
  lea    D263(%rip),%rdi
  call   <puts@plt>
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L30:
  mov    $0xfffffff6,%ebp
  jmp    L24
L85:
  mov    $0xfffffff6,%ebp
  jmp    L83
L59:
  and    $0x7,%eax
  mov    $0x1,%ebp
  mov    %eax,%ecx
  shl    %cl,%ebp
  jmp    L52
L46:
  mov    %ebx,%ecx
  and    $0x7,%ecx
  mov    $0x1,%ebx
  shl    %cl,%ebx
  jmp    L8
```

tool_calls: name: unpack_data
arguments: tag: D106
data_type: string
name: unpack_data
arguments: tag: D131
data_type: string
name: unpack_data
arguments: tag: D138
data_type: string
name: unpack_data
arguments: tag: D271
data_type: string
name: unpack_data
arguments: tag: D339
data_type: string
name: unpack_data
arguments: tag: D146
data_type: string
name: unpack_data
arguments: tag: D253
data_type: string
name: unpack_data
arguments: tag: D176
data_type: string
name: unpack_data
arguments: tag: D276
data_type: string
name: unpack_data
arguments: tag: D121
data_type: string
name: unpack_data
arguments: tag: D223
data_type: string
name: unpack_data
arguments: tag: D229
data_type: string
name: unpack_data
arguments: tag: D111
data_type: string
name: unpack_data
arguments: tag: D21
data_type: string
name: unpack_data
arguments: tag: D302
data_type: string
name: unpack_data
arguments: tag: D128
data_type: string
name: unpack_data
arguments: tag: D264
data_type: string
name: unpack_data
arguments: tag: D267
data_type: string
name: unpack_data
arguments: tag: D263
data_type: string

tool: D106: clear

tool: D131:  +------+------+-----+-----+-----+-----+-----+-----+------+------+-------+------+------+-----+-----+-----+-----+-----+-----+------+------+

tool: D138:  |                                                             BUS Information                                                           |

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


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

tool: D146: DOWN

tool: D253: IN

tool: D176: OUT

tool: D276: NOR

tool: D121: INV

tool: D223:  | %4s 

tool: D229: UP

tool: D111: | %4s 

tool: D21: | %3s

tool: D302:  |  %d  

tool: D128: |  %d  - %2d 

tool: D264: |      

tool: D267:  | %4s |


tool: D263: 
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");
}
```