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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x3c,%ecx
  pxor   %xmm0,%xmm0
  xor    %edx,%edx
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x348,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x338(%rsp)
  xor    %eax,%eax
  lea    0x150(%rsp),%rdi
  movaps %xmm0,0x60(%rsp)
  lea    0x60(%rsp),%r12
  movaps %xmm0,0x70(%rsp)
  movaps %xmm0,0x80(%rsp)
  movaps %xmm0,0x90(%rsp)
  movaps %xmm0,0xa0(%rsp)
  movaps %xmm0,0xb0(%rsp)
  rep stos %rax,%es:(%rdi)
  movaps %xmm0,0x140(%rsp)
  movaps %xmm0,0xd0(%rsp)
  movaps %xmm0,0xe0(%rsp)
  movaps %xmm0,0xf0(%rsp)
  movaps %xmm0,0x100(%rsp)
  movaps %xmm0,0x110(%rsp)
  movaps %xmm0,0x120(%rsp)
  movaps %xmm0,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  movaps %xmm0,0x40(%rsp)
  mov    %dx,0x50(%rsp)
  movl   $0x0,(%rdi)
  movl   $0x0,0xc0(%rsp)
  movl   $0x0,0x130(%rsp)
  call   <SettingCape@plt>
  mov    $0x17,%edi
  xor    %eax,%eax
  call   <LEDOn@plt>
  mov    $0x2f,%edi
  xor    %eax,%eax
  call   <LEDOn@plt>
  mov    $0x1b,%edi
  xor    %eax,%eax
  call   <InitPin@plt>
  lea    D25(%rip),%rsi
  mov    $0x1b,%edi
  xor    %eax,%eax
  call   <SetPinDirt@plt>
  lea    D36(%rip),%rdi
  call   <puts@plt>
  mov    $0x54,%esi
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <UART_init@plt>
  lea    D50(%rip),%rdi
  mov    %eax,%ebx
  mov    %eax,%esi
  mov    %eax,0x18(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x52,%esi
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <UART_init@plt>
  lea    D63(%rip),%rdi
  mov    %eax,%esi
  mov    %eax,%r13d
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x1,%ecx
  xor    %edx,%edx
  mov    %ebx,%edi
  mov    $0x1c200,%esi
  xor    %eax,%eax
  call   <UART_Baudrate_NonC@plt>
  lea    D92(%rip),%rdi
  call   <puts@plt>
  mov    $0x8,%edx
  mov    %ebx,%edi
  xor    %eax,%eax
  lea    D35(%rip),%rsi
  call   <write@plt>
  movl   $0x0,0x8(%rsp)
  jmp    L138
  nopl   0x0(%rax,%rax,1)
L37:
  mov    $0x64,%edx
  mov    %r12,%rsi
  mov    %r13d,%edi
  xor    %eax,%eax
  call   <read@plt>
  lea    0x140(%rsp),%r15
  mov    %r12,%rsi
  mov    %eax,%ebp
  mov    %r15,%rdi
  call   <strcat@plt>
  xor    %eax,%eax
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <Nullize@plt>
  cmp    $0xffffffff,%ebp
  jne    L16
L138:
  mov    $0x1b,%edi
  xor    %eax,%eax
  call   <GetPinValue@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  je     L37
  mov    0x18(%rsp),%edi
  mov    $0x5,%edx
  lea    D1(%rip),%rsi
  xor    %eax,%eax
  call   <write@plt>
  lea    D111(%rip),%rdi
  call   <puts@plt>
  mov    $0x1b,%edi
  xor    %eax,%eax
  call   <CloseGPin@plt>
  mov    $0x17,%edi
  xor    %eax,%eax
  call   <LEDOff@plt>
  xor    %eax,%eax
  mov    $0x2f,%edi
  call   <LEDOff@plt>
  mov    0x338(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L207
  add    $0x348,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L16:
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    0x18(%rsp),%edi
  mov    %r15,%rsi
  lea    0x1(%rax),%rdx
  xor    %eax,%eax
  call   <write@plt>
  mov    0x8(%rsp),%eax
  cmp    $0x1f3,%eax
  jg     L21
  mov    %eax,%ecx
  xor    %r11d,%r11d
  mov    %eax,%ebp
L79:
  movslq %ebp,%rax
  lea    0x1(%rbp),%r8d
  cmpb   $0x24,0x140(%rsp,%rax,1)
  je     L42
  cmp    $0x1,%r11d
  je     L209
L137:
  add    $0x1,%ebp
  cmp    $0x1f3,%ebp
  jle    L79
  jmp    L102
L209:
  mov    %ebp,%r8d
  mov    %ecx,%ebp
L42:
  lea    -0x3(%r8),%eax
  cltq
  cmpb   $0x2a,0x140(%rsp,%rax,1)
  jne    L4
  add    %ebp,%r14d
  lea    0x20(%rsp),%r10
  xor    %r9d,%r9d
  mov    %ebp,%ecx
  cmp    %r8d,%r14d
  mov    %r10,%rdi
  mov    $0x2,%edx
  mov    %r8d,0x1c(%rsp)
  setl   %r9b
  lea    D44(%rip),%rsi
  xor    %eax,%eax
  mov    %r10,0x10(%rsp)
  call   <sprintf@plt>
  mov    0x10(%rsp),%rdi
  call   <strlen@plt>
  mov    0x10(%rsp),%rsi
  mov    0x18(%rsp),%edi
  lea    0x1(%rax),%rdx
  xor    %eax,%eax
  call   <write@plt>
  mov    0x1c(%rsp),%r8d
  mov    0x10(%rsp),%r10
  cmp    %r8d,%ebp
  jge    L36
  movslq %ebp,%rdx
  mov    %r8d,%esi
  lea    0xce(%rsp),%rax
  xor    %ebx,%ebx
  add    %r15,%rdx
  sub    %ebp,%esi
  jmp    L85
  nopl   0x0(%rax)
L10:
  add    $0x1,%rdx
  add    $0x1,%rax
  cmp    %esi,%ebx
  je     L36
L85:
  movzbl (%rdx),%ecx
  cmpb   $0x2a,(%rax)
  mov    %ebx,%r14d
  lea    0x1(%rbx),%ebx
  mov    %cl,0x2(%rax)
  jne    L10
  mov    %r10,%rdi
  mov    %r8d,%ecx
  mov    $0x3,%edx
  xor    %eax,%eax
  lea    D98(%rip),%rsi
  movslq %ebx,%rbx
  mov    %r8d,0x10(%rsp)
  lea    0xd0(%rsp),%rbp
  mov    %r10,0x8(%rsp)
  movb   $0x0,0xd0(%rsp,%rbx,1)
  call   <sprintf@plt>
  mov    0x8(%rsp),%rdi
  call   <strlen@plt>
  mov    0x8(%rsp),%rsi
  mov    0x18(%rsp),%edi
  lea    0x1(%rax),%rdx
  xor    %eax,%eax
  call   <write@plt>
  mov    0x8(%rsp),%rdi
  mov    %rbp,%rdx
  xor    %eax,%eax
  lea    D103(%rip),%rsi
  call   <sprintf@plt>
  mov    0x8(%rsp),%rsi
  lea    D118(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    $0x64,%esi
  call   <Nullize@plt>
  mov    %r15,%rdi
  call   <strlen@plt>
  cmp    $0x12c,%rax
  ja     L107
  mov    0x10(%rsp),%r8d
  mov    %r8d,0x8(%rsp)
  jmp    L138
L4:
  movslq %r8d,%rax
  cmpb   $0x0,0x140(%rsp,%rax,1)
  je     L203
  mov    %ebp,%ecx
  mov    $0x1,%r11d
  mov    %r8d,%ebp
  jmp    L137
L36:
  mov    $0x2,%r11d
L63:
  mov    0x8(%rsp),%ecx
  mov    %r11d,%edx
  mov    %r10,%rdi
  xor    %eax,%eax
  lea    D98(%rip),%rsi
  mov    %r10,0x10(%rsp)
  mov    %ebx,%r14d
  call   <sprintf@plt>
  mov    0x10(%rsp),%rdi
  call   <strlen@plt>
  mov    0x10(%rsp),%rsi
  mov    0x18(%rsp),%edi
  lea    0x1(%rax),%rdx
  xor    %eax,%eax
  call   <write@plt>
  jmp    L138
L203:
  mov    0x8(%rsp),%ecx
  mov    $0x1,%r11d
L102:
  mov    0x8(%rsp),%eax
  lea    0x20(%rsp),%r10
  mov    %r11d,%edx
  xor    %r9d,%r9d
  mov    %r10,%rdi
  lea    D44(%rip),%rsi
  mov    %r11d,0x1c(%rsp)
  lea    0x1(%rax),%r8d
  xor    %eax,%eax
  mov    %r10,0x10(%rsp)
  call   <sprintf@plt>
  mov    0x10(%rsp),%rdi
  call   <strlen@plt>
  mov    0x10(%rsp),%rsi
  mov    0x18(%rsp),%edi
  lea    0x1(%rax),%rdx
  xor    %eax,%eax
  call   <write@plt>
  mov    0x10(%rsp),%r10
  mov    0x1c(%rsp),%r11d
  jmp    L63
L107:
  mov    %rax,%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <Nullize@plt>
  movl   $0x0,0x8(%rsp)
  jmp    L138
L21:
  mov    0x8(%rsp),%ecx
  xor    %r11d,%r11d
  jmp    L102
L207:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D25
type: string
name: extract_symbolic_data
arguments: label: D36
type: string
name: extract_symbolic_data
arguments: label: D50
type: string
name: extract_symbolic_data
arguments: label: D63
type: string
name: extract_symbolic_data
arguments: label: D92
type: string
name: extract_symbolic_data
arguments: label: D35
type: string
name: extract_symbolic_data
arguments: label: D1
type: string
name: extract_symbolic_data
arguments: label: D111
type: string
name: extract_symbolic_data
arguments: label: D44
type: string
name: extract_symbolic_data
arguments: label: D98
type: string
name: extract_symbolic_data
arguments: label: D103
type: string
name: extract_symbolic_data
arguments: label: D118
type: string

tool: D25: in

tool: D36: Start

tool: D50: UART1T : %d


tool: D63: UART1R : %d


tool: D92: START!

tool: D35: START!


tool: D1: End


tool: D111: End

tool: D44: 
Copy! flag : %d, 0-%i, 1-%i, %i


tool: D98: Copy for parse %i - posi2 %i


tool: D103: 1%s


tool: D118: %s

assistant: ```c
int main() {
  int i1, j1, k1, l1;
  int i2, j2, k2, l2;
  int cnt;
  int UART1_News = 1;
  int UART2_News = 1;
  int UART3_News = 1;
  int readfromUART1 = 0;
  int readfromUART2 = 0;
  int readfromUART3 = 0;
  int UART1T = 0;
  int UART1R = 0;
  int UART2T = 0;
  int UART2R = 0;
  int UART3T = 0;
  int UART3R = 0;
  char UART1_buf[100] = {
      '\0',
  };
  char UART2_buf[100] = {
      '\0',
  };
  char UART3_buf[100] = {
      '\0',
  };
  char UART1_data[500] = {
      '\0',
  };
  char UART2_data[500] = {
      '\0',
  };
  char UART3_data[500] = {
      '\0',
  };
  char UART1_forParse[100] = {
      '\0',
  };
  char UART2_forParse[100] = {
      '\0',
  };
  char UART3_forParse[100] = {
      '\0',
  };
  int UART1_position[3] = {0, 0, 0};
  int UART2_position[3] = {0, 0, 0};
  int UART1_cpy_flag = 0;
  int UART2_cpy_flag = 0;
  int UART3_cpy_flag = 0;
  char test1[50] = {
      '\0',
  };
  char test2[50] = {
      '\0',
  };
  SettingCape();
  LEDOn(23);
  LEDOn(47);
  InitPin(27);
  SetPinDirt(27, "in");
  printf("Start\n");
  UART1T = UART_init(1, 'T');
  printf("UART1T : %d\n", UART1T);
  UART1R = UART_init(1, 'R');
  printf("UART1R : %d\n", UART1R);
  UART_Baudrate_NonC(UART1T, 115200, 0, 1);
  printf("START!\n");
  write(UART1T, "START!\n", 8);
  while (!GetPinValue(27)) {
    readfromUART1 = read(UART1R, UART1_buf, 100);
    strcat(UART1_data, UART1_buf);
    Nullize(UART1_buf, readfromUART1);
    if (readfromUART1 != -1) {
      write(UART1T, UART1_data, strlen(UART1_data) + 1);
      for (i1 = UART1_position[2], UART1_position[0] = UART1_position[2], UART1_position[1] = UART1_position[2] + 1, UART1_cpy_flag = 0; i1 < sizeof(UART1_data); i1++) {
        if (UART1_data[i1] == '$') {
          UART1_position[0] = i1;
          UART1_cpy_flag = 1;
          i1++;
        }
        if ((UART1_cpy_flag == 1) && (UART1_data[i1 - 3] == '*')) {
          UART1_position[1] = i1;
          UART1_cpy_flag = 2;
          break;
        }
        if ((UART1_data[i1] == '\0') && (UART1_cpy_flag == 1)) {
          UART1_position[0] = UART1_position[2];
          UART1_position[1] = UART1_position[2] + 1;
          break;
        }
      }
      sprintf(test1, "\nCopy! flag : %d, 0-%i, 1-%i, %i\n", UART1_cpy_flag, UART1_position[0], UART1_position[1], (UART1_cpy_flag == 2) && (j1 + UART1_position[0] < UART1_position[1]));
      write(UART1T, test1, strlen(test1) + 1);
      for (j1 = 0; (UART1_cpy_flag == 2) && (j1 + UART1_position[0] < UART1_position[1]); j1++) {
        UART1_forParse[j1] = UART1_data[UART1_position[0] + j1];
        if (UART1_forParse[j1 - 2] == '*') {
          UART1_forParse[j1 + 1] = '\0';
          UART1_cpy_flag = 3;
          UART1_position[2] = UART1_position[1];
          break;
        }
      }
      sprintf(test1, "Copy for parse %i - posi2 %i\n", UART1_cpy_flag, UART1_position[2]);
      write(UART1T, test1, strlen(test1) + 1);
      if (UART1_cpy_flag == 3) {
        sprintf(test1, "1%s\n", UART1_forParse);
        printf("%s", test1);
        Nullize(UART1_forParse, sizeof(UART1_forParse));
        if (strlen(UART1_data) > 300) {
          Nullize(UART1_data, strlen(UART1_data));
          UART1_position[0] = 0;
          UART1_position[1] = 0;
          UART1_position[2] = 0;
        }
      }
    }
  }
  write(UART1T, "End\n", 5);
  printf("End\n");
  CloseGPin(27);
  LEDOff(23);
  LEDOff(47);
  return 0;
}
```