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;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9e0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x1,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
lea    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   10b0 <memset@plt>
lea    -0x130(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   10b0 <memset@plt>
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   10b0 <memset@plt>
lea    -0x3a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x1f4,%edx
call   10b0 <memset@plt>
lea    -0x5a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x1f4,%edx
call   10b0 <memset@plt>
lea    -0x7a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x1f4,%edx
call   10b0 <memset@plt>
lea    -0x810(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   10b0 <memset@plt>
lea    -0x880(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   10b0 <memset@plt>
lea    -0x8f0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   10b0 <memset@plt>
lea    -0x8fc(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   10b0 <memset@plt>
lea    -0x908(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   10b0 <memset@plt>
movl   $0x0,-0x90c(%rbp)
movl   $0x0,-0x910(%rbp)
movl   $0x0,-0x914(%rbp)
lea    -0x950(%rbp),%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   10b0 <memset@plt>
lea    -0x990(%rbp),%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   10b0 <memset@plt>
mov    $0x0,%al
call   10f0 <SettingCape@plt>
mov    $0x17,%edi
mov    $0x0,%al
call   1120 <LEDOn@plt>
mov    $0x2f,%edi
mov    $0x0,%al
call   1120 <LEDOn@plt>
mov    $0x1b,%edi
mov    $0x0,%al
call   1030 <InitPin@plt>
mov    $0x1b,%edi
lea    0xc3e(%rip),%rsi
mov    $0x0,%al
call   10e0 <SetPinDirt@plt>
lea    0xc33(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
mov    $0x54,%esi
mov    $0x0,%al
call   1090 <UART_init@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%esi
lea    0xc15(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1,%edi
mov    $0x52,%esi
mov    $0x0,%al
call   1090 <UART_init@plt>
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%esi
lea    0xbfd(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x44(%rbp),%edi
mov    $0x1c200,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0x0,%al
call   1050 <UART_Baudrate_NonC@plt>
lea    0xbe6(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x44(%rbp),%edi
lea    0xbd5(%rip),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1040 <write@plt>
mov    $0x1b,%edi
mov    $0x0,%al
call   10d0 <GetPinValue@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    147c <main+0x26c>
jmp    18af <main+0x69f>
mov    -0x48(%rbp),%edi
lea    -0xc0(%rbp),%rsi
mov    $0x64,%edx
mov    $0x0,%al
call   10c0 <read@plt>
mov    %eax,-0x38(%rbp)
lea    -0x3a0(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
call   1110 <strcat@plt>
lea    -0xc0(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    $0x0,%al
call   1060 <Nullize@plt>
cmpl   $0xffffffff,-0x38(%rbp)
je     18aa <main+0x69a>
mov    -0x44(%rbp),%eax
mov    %eax,-0x99c(%rbp)
lea    -0x3a0(%rbp),%rax
mov    %rax,-0x998(%rbp)
lea    -0x3a0(%rbp),%rdi
call   1070 <strlen@plt>
mov    -0x99c(%rbp),%edi
mov    -0x998(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
mov    $0x0,%al
call   1040 <write@plt>
mov    -0x8f4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8f4(%rbp),%eax
mov    %eax,-0x8fc(%rbp)
mov    -0x8f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8f8(%rbp)
movl   $0x0,-0x90c(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0x1f4,%rax
jae    1603 <main+0x3f3>
movslq -0x8(%rbp),%rax
movsbl -0x3a0(%rbp,%rax,1),%eax
ff
cmp    $0x24,%eax
jne    1570 <main+0x360>
mov    -0x8(%rbp),%eax
mov    %eax,-0x8fc(%rbp)
movl   $0x1,-0x90c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x90c(%rbp)
jne    15ae <main+0x39e>
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
cltq
movsbl -0x3a0(%rbp,%rax,1),%eax
ff
cmp    $0x2a,%eax
jne    15ae <main+0x39e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x8f8(%rbp)
movl   $0x2,-0x90c(%rbp)
jmp    1603 <main+0x3f3>
movslq -0x8(%rbp),%rax
movsbl -0x3a0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
jne    15f0 <main+0x3e0>
cmpl   $0x1,-0x90c(%rbp)
jne    15f0 <main+0x3e0>
mov    -0x8f4(%rbp),%eax
mov    %eax,-0x8fc(%rbp)
mov    -0x8f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8f8(%rbp)
jmp    1603 <main+0x3f3>
jmp    15f5 <main+0x3e5>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    152f <main+0x31f>
lea    -0x950(%rbp),%rax
mov    %rax,-0x9b8(%rbp)
mov    -0x90c(%rbp),%eax
mov    %eax,-0x9ac(%rbp)
mov    -0x8fc(%rbp),%eax
mov    %eax,-0x9a8(%rbp)
mov    -0x8f8(%rbp),%eax
mov    %eax,-0x9a4(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x90c(%rbp)
mov    %al,-0x99d(%rbp)
jne    1662 <main+0x452>
mov    -0xc(%rbp),%eax
add    -0x8fc(%rbp),%eax
cmp    -0x8f8(%rbp),%eax
setl   %al
mov    %al,-0x99d(%rbp)
mov    -0x9a4(%rbp),%r8d
mov    -0x9a8(%rbp),%ecx
mov    -0x9ac(%rbp),%edx
mov    -0x9b8(%rbp),%rdi
mov    -0x99d(%rbp),%al
and    $0x1,%al
movzbl %al,%r9d
lea    0x99d(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x9c4(%rbp)
lea    -0x950(%rbp),%rax
mov    %rax,-0x9c0(%rbp)
lea    -0x950(%rbp),%rdi
call   1070 <strlen@plt>
mov    -0x9c4(%rbp),%edi
mov    -0x9c0(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
mov    $0x0,%al
call   1040 <write@plt>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x90c(%rbp)
mov    %al,-0x9c5(%rbp)
jne    1708 <main+0x4f8>
mov    -0xc(%rbp),%eax
add    -0x8fc(%rbp),%eax
cmp    -0x8f8(%rbp),%eax
setl   %al
mov    %al,-0x9c5(%rbp)
mov    -0x9c5(%rbp),%al
test   $0x1,%al
jne    171b <main+0x50b>
jmp    178f <main+0x57f>
mov    -0x8fc(%rbp),%eax
add    -0xc(%rbp),%eax
cltq
mov    -0x3a0(%rbp,%rax,1),%cl
movslq -0xc(%rbp),%rax
mov    %cl,-0x810(%rbp,%rax,1)
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
cltq
movsbl -0x810(%rbp,%rax,1),%eax
ff
cmp    $0x2a,%eax
jne    177c <main+0x56c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0x810(%rbp,%rax,1)
movl   $0x3,-0x90c(%rbp)
mov    -0x8f8(%rbp),%eax
mov    %eax,-0x8f4(%rbp)
jmp    178f <main+0x57f>
jmp    1781 <main+0x571>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    16db <main+0x4cb>
lea    -0x950(%rbp),%rdi
mov    -0x90c(%rbp),%edx
mov    -0x8f4(%rbp),%ecx
lea    0x8a5(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x9d4(%rbp)
lea    -0x950(%rbp),%rax
mov    %rax,-0x9d0(%rbp)
lea    -0x950(%rbp),%rdi
call   1070 <strlen@plt>
mov    -0x9d4(%rbp),%edi
mov    -0x9d0(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
mov    $0x0,%al
call   1040 <write@plt>
cmpl   $0x3,-0x90c(%rbp)
jne    18a5 <main+0x695>
lea    -0x950(%rbp),%rdi
lea    -0x810(%rbp),%rdx
lea    0x85c(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
lea    -0x950(%rbp),%rsi
lea    0x84c(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x810(%rbp),%rdi
mov    $0x64,%esi
mov    $0x0,%al
call   1060 <Nullize@plt>
lea    -0x3a0(%rbp),%rdi
call   1070 <strlen@plt>
cmp    $0x12c,%rax
jbe    18a0 <main+0x690>
lea    -0x3a0(%rbp),%rax
mov    %rax,-0x9e0(%rbp)
lea    -0x3a0(%rbp),%rdi
call   1070 <strlen@plt>
mov    -0x9e0(%rbp),%rdi
mov    %rax,%rsi
mov    $0x0,%al
call   1060 <Nullize@plt>
movl   $0x0,-0x8fc(%rbp)
movl   $0x0,-0x8f8(%rbp)
movl   $0x0,-0x8f4(%rbp)
jmp    18a5 <main+0x695>
jmp    18aa <main+0x69a>
jmp    145b <main+0x24b>
mov    -0x44(%rbp),%edi
lea    0x7bb(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1040 <write@plt>
lea    0x7a8(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    $0x1b,%edi
mov    $0x0,%al
call   1100 <CloseGPin@plt>
mov    $0x17,%edi
mov    $0x0,%al
call   1080 <LEDOff@plt>
mov    $0x2f,%edi
mov    $0x0,%al
call   1080 <LEDOff@plt>
xor    %eax,%eax
add    $0x9e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x338,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movl   $0x0,0x130(%rsp)
lea    0x140(%rsp),%rdi
mov    $0x1f4,%edx
xor    %esi,%esi
call   10c0 <memset@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movl   $0x0,0x80(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movw   $0x0,0xc0(%rsp)
xor    %eax,%eax
call   1100 <SettingCape@plt>
mov    $0x17,%edi
xor    %eax,%eax
call   1130 <LEDOn@plt>
mov    $0x2f,%edi
xor    %eax,%eax
call   1130 <LEDOn@plt>
mov    $0x1b,%edi
xor    %eax,%eax
call   1030 <InitPin@plt>
lea    0xcfd(%rip),%rsi
mov    $0x1b,%edi
xor    %eax,%eax
call   10f0 <SetPinDirt@plt>
lea    0xd5c(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
mov    $0x54,%esi
xor    %eax,%eax
call   10a0 <UART_init@plt>
mov    %eax,%ebx
lea    0xcce(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10b0 <printf@plt>
mov    $0x1,%edi
mov    $0x52,%esi
xor    %eax,%eax
call   10a0 <UART_init@plt>
lea    0xcba(%rip),%rdi
mov    %eax,0x1c(%rsp)
mov    %eax,%esi
xor    %eax,%eax
call   10b0 <printf@plt>
mov    %ebx,%edi
mov    $0x1c200,%esi
xor    %edx,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1060 <UART_Baudrate_NonC@plt>
lea    0xcf9(%rip),%rdi
call   1040 <puts@plt>
lea    0xc92(%rip),%rsi
mov    %ebx,0xc(%rsp)
mov    %ebx,%edi
mov    $0x8,%edx
xor    %eax,%eax
call   1050 <write@plt>
mov    $0x1b,%edi
xor    %eax,%eax
call   10e0 <GetPinValue@plt>
test   %eax,%eax
je     1408 <main+0x1e8>
lea    0xcb9(%rip),%rsi
mov    0xc(%rsp),%edi
mov    $0x5,%edx
xor    %eax,%eax
call   1050 <write@plt>
lea    0xcb4(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1b,%edi
xor    %eax,%eax
call   1110 <CloseGPin@plt>
mov    $0x17,%edi
xor    %eax,%eax
call   1090 <LEDOff@plt>
mov    $0x2f,%edi
xor    %eax,%eax
call   1090 <LEDOff@plt>
xor    %eax,%eax
add    $0x338,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r12d,%r12d
jmp    1420 <main+0x200>
nopl   (%rax)
mov    $0x1b,%edi
xor    %eax,%eax
call   10e0 <GetPinValue@plt>
test   %eax,%eax
jne    13ad <main+0x18d>
mov    0x1c(%rsp),%edi
lea    0xd0(%rsp),%rbp
mov    %rbp,%rsi
mov    $0x64,%edx
xor    %eax,%eax
call   10d0 <read@plt>
mov    %eax,%ebx
lea    0x140(%rsp),%r14
mov    %r14,%rdi
mov    %rbp,%rsi
call   1120 <strcat@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <Nullize@plt>
cmp    $0xffffffff,%ebx
je     1410 <main+0x1f0>
mov    %r14,%rdi
call   1080 <strlen@plt>
lea    0x1(%rax),%rdx
mov    0xc(%rsp),%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <write@plt>
lea    0x1(%r12),%eax
cmp    $0x1f3,%r12d
mov    %r14,%rbx
mov    %r12,0x10(%rsp)
ja     1510 <main+0x2f0>
xor    %r14d,%r14d
mov    %r12d,%ecx
mov    %r12d,%r15d
mov    $0x1,%esi
jmp    14be <main+0x29e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x1(%r12),%ecx
cmp    $0x1f3,%r12d
jae    1503 <main+0x2e3>
mov    %ecx,%edx
xor    %r12d,%r12d
cmpb   $0x24,0x140(%rsp,%rdx,1)
24
sete   %r12b
cmove  %ecx,%r15d
cmove  %esi,%r14d
add    %rdx,%r12
cmp    $0x1,%r14d
jne    14b0 <main+0x290>
movslq %r12d,%rcx
cmpb   $0x2a,-0x3(%rcx,%rbx,1)
je     151b <main+0x2fb>
cmpb   $0x0,0x140(%rsp,%r12,1)
jne    14b0 <main+0x290>
mov    $0x1,%r14d
mov    0x10(%rsp),%rcx
mov    %ecx,%r15d
mov    %eax,%r12d
jmp    1530 <main+0x310>
nopl   0x0(%rax,%rax,1)
mov    %r12d,%r15d
mov    %eax,%r12d
xor    %r14d,%r14d
jmp    1530 <main+0x310>
mov    $0x2,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0x2,%r14d
sete   %al
add    %r15d,%r13d
cmp    %r12d,%r13d
setl   %cl
and    %al,%cl
movzbl %cl,%r9d
lea    0x90(%rsp),%rbp
mov    %rbp,%rdi
lea    0xacd(%rip),%rsi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbp,%rdi
call   1080 <strlen@plt>
lea    0x1(%rax),%rdx
mov    0xc(%rsp),%edi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <write@plt>
cmp    $0x2,%r14d
jne    15f0 <main+0x3d0>
cmp    %r12d,%r15d
mov    %r12d,%r13d
cmovg  %r15d,%r13d
sub    %r15d,%r13d
mov    $0x2,%r14d
cmp    %r12d,%r15d
jge    15fa <main+0x3da>
movslq %r15d,%rcx
movslq %r12d,%rdx
lea    (%rsp,%rcx,1),%rsi
add    $0x140,%rsi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rsi,%rax,1),%ebx
mov    %bl,0x20(%rsp,%rax,1)
cmpb   $0x2a,0x1e(%rsp,%rax,1)
je     1601 <main+0x3e1>
lea    (%rcx,%rax,1),%rdi
add    $0x1,%rdi
add    $0x1,%rax
cmp    %rdx,%rdi
jl     15c0 <main+0x3a0>
mov    0x10(%rsp),%r12
jmp    160f <main+0x3ef>
nopw   0x0(%rax,%rax,1)
mov    0x10(%rsp),%r12
xor    %r13d,%r13d
jmp    1617 <main+0x3f7>
mov    0x10(%rsp),%r12
jmp    1617 <main+0x3f7>
movb   $0x0,0x21(%rsp,%rax,1)
mov    $0x3,%r14d
mov    %eax,%r13d
lea    0x140(%rsp),%rbx
mov    %rbp,%rdi
lea    0xa26(%rip),%rsi
mov    %r14d,%edx
mov    %r12d,%ecx
xor    %eax,%eax
call   1140 <sprintf@plt>
mov    %rbp,%rdi
call   1080 <strlen@plt>
lea    0x1(%rax),%rdx
mov    0xc(%rsp),%edi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <write@plt>
cmp    $0x3,%r14d
jne    1410 <main+0x1f0>
mov    %rbp,%rdi
lea    0xa09(%rip),%rsi
lea    0x20(%rsp),%r14
mov    %r14,%rdx
xor    %eax,%eax
call   1140 <sprintf@plt>
lea    0x9f8(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10b0 <printf@plt>
mov    $0x64,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <Nullize@plt>
mov    %rbx,%rdi
call   1080 <strlen@plt>
cmp    $0x12d,%rax
jb     1410 <main+0x1f0>
xor    %r12d,%r12d
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <Nullize@plt>
jmp    1410 <main+0x1f0>

LLVM IR (-O0):
@.str = [3 x i8] c"in\00"
@.str.1 = [7 x i8] c"Start\0A\00"
@.str.2 = [13 x i8] c"UART1T : %d\0A\00"
@.str.3 = [13 x i8] c"UART1R : %d\0A\00"
@.str.4 = [8 x i8] c"START!\0A\00"
@.str.5 = [34 x i8] c"\0ACopy! flag : %d, 0-%i, 1-%i, %i\0A\00"
@.str.6 = [30 x i8] c"Copy for parse %i - posi2 %i\0A\00"
@.str.7 = [5 x i8] c"1%s\0A\00"
@.str.8 = [3 x i8] c"%s\00"
@.str.9 = [5 x i8] c"End\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca [100 x i8]
%24 = alloca [100 x i8]
%25 = alloca [100 x i8]
%26 = alloca [500 x i8]
%27 = alloca [500 x i8]
%28 = alloca [500 x i8]
%29 = alloca [100 x i8]
%30 = alloca [100 x i8]
%31 = alloca [100 x i8]
%32 = alloca [3 x i32]
%33 = alloca [3 x i32]
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca [50 x i8]
%38 = alloca [50 x i8]
store i32 0, i32* %1
store i32 1, i32* %11
store i32 1, i32* %12
store i32 1, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
store i32 0, i32* %21
store i32 0, i32* %22
%39 = bitcast [100 x i8]* %23 to i8*
%40 = bitcast [100 x i8]* %24 to i8*
%41 = bitcast [100 x i8]* %25 to i8*
%42 = bitcast [500 x i8]* %26 to i8*
%43 = bitcast [500 x i8]* %27 to i8*
%44 = bitcast [500 x i8]* %28 to i8*
%45 = bitcast [100 x i8]* %29 to i8*
%46 = bitcast [100 x i8]* %30 to i8*
%47 = bitcast [100 x i8]* %31 to i8*
%48 = bitcast [3 x i32]* %32 to i8*
%49 = bitcast [3 x i32]* %33 to i8*
store i32 0, i32* %34
store i32 0, i32* %35
store i32 0, i32* %36
%50 = bitcast [50 x i8]* %37 to i8*
%51 = bitcast [50 x i8]* %38 to i8*
%52 = call i32 (...) @SettingCape()
%53 = call i32 (i32, ...) bitcast (i32 (...)* @LEDOn to i32 (i32, ...)*)(i32 23)
%54 = call i32 (i32, ...) bitcast (i32 (...)* @LEDOn to i32 (i32, ...)*)(i32 47)
%55 = call i32 (i32, ...) bitcast (i32 (...)* @InitPin to i32 (i32, ...)*)(i32 27)
%56 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @SetPinDirt to i32 (i32, i8*, ...)*)(i32 27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%58 = call i32 (i32, i32, ...) bitcast (i32 (...)* @UART_init to i32 (i32, i32, ...)*)(i32 1, i32 84)
store i32 %58, i32* %17
%59 = load i32, i32* %17
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %59)
%61 = call i32 (i32, i32, ...) bitcast (i32 (...)* @UART_init to i32 (i32, i32, ...)*)(i32 1, i32 82)
store i32 %61, i32* %18
%62 = load i32, i32* %18
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %62)
%64 = load i32, i32* %17
%65 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @UART_Baudrate_NonC to i32 (i32, i32, i32, i32, ...)*)(i32 %64, i32 115200, i32 0, i32 1)
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%67 = load i32, i32* %17
%68 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %67, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 8)
br label %69
69: ; preds = %258, %0
%70 = call i32 (i32, ...) bitcast (i32 (...)* @GetPinValue to i32 (i32, ...)*)(i32 27)
%71 = icmp ne i32 %70, 0
%72 = xor i1 %71, true
br i1 %72, label %73, label %259
73: ; preds = %69
%74 = load i32, i32* %18
%75 = getelementptr inbounds [100 x i8], [100 x i8]* %23, i64 0, i64 0
%76 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %74, i8* %75, i32 100)
store i32 %76, i32* %14
%77 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0, i64 0
%78 = getelementptr inbounds [100 x i8], [100 x i8]* %23, i64 0, i64 0
%79 = call i8* @strcat(i8* %77, i8* %78)
%80 = getelementptr inbounds [100 x i8], [100 x i8]* %23, i64 0, i64 0
%81 = load i32, i32* %14
%82 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @Nullize to i32 (i8*, i32, ...)*)(i8* %80, i32 %81)
%83 = load i32, i32* %14
%84 = icmp ne i32 %83, -1
br i1 %84, label %85, label %258
85: ; preds = %73
%86 = load i32, i32* %17
%87 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0, i64 0
%88 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0, i64 0
%89 = call i64 @strlen(i8* %88)
%90 = add i64 %89, 1
%91 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 %86, i8* %87, i64 %90)
%92 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 2
%93 = load i32, i32* %92
store i32 %93, i32* %2
%94 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 2
%95 = load i32, i32* %94
%96 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 0
store i32 %95, i32* %96
%97 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 2
%98 = load i32, i32* %97
%99 = add nsw i32 %98, 1
%100 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 1
store i32 %99, i32* %100
store i32 0, i32* %34
br label %101
101: ; preds = %150, %85
%102 = load i32, i32* %2
%103 = sext i32 %102 to i64
%104 = icmp ult i64 %103, 500
br i1 %104, label %105, label %153
105: ; preds = %101
%106 = load i32, i32* %2
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0, i64 %107
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = icmp eq i32 %110, 36
br i1 %111, label %112, label %117
112: ; preds = %105
%113 = load i32, i32* %2
%114 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 0
store i32 %113, i32* %114
store i32 1, i32* %34
%115 = load i32, i32* %2
%116 = add nsw i32 %115, 1
store i32 %116, i32* %2
br label %117
117: ; preds = %112, %105
%118 = load i32, i32* %34
%119 = icmp eq i32 %118, 1
br i1 %119, label %120, label %131
120: ; preds = %117
%121 = load i32, i32* %2
%122 = sub nsw i32 %121, 3
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0, i64 %123
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = icmp eq i32 %126, 42
br i1 %127, label %128, label %131
128: ; preds = %120
%129 = load i32, i32* %2
%130 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 1
store i32 %129, i32* %130
store i32 2, i32* %34
br label %153
131: ; preds = %120, %117
%132 = load i32, i32* %2
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0, i64 %133
%135 = load i8, i8* %134
%136 = sext i8 %135 to i32
%137 = icmp eq i32 %136, 0
br i1 %137, label %138, label %149
138: ; preds = %131
%139 = load i32, i32* %34
%140 = icmp eq i32 %139, 1
br i1 %140, label %141, label %149
141: ; preds = %138
%142 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 2
%143 = load i32, i32* %142
%144 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 0
store i32 %143, i32* %144
%145 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 2
%146 = load i32, i32* %145
%147 = add nsw i32 %146, 1
%148 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 1
store i32 %147, i32* %148
br label %153
149: ; preds = %138, %131
br label %150
150: ; preds = %149
%151 = load i32, i32* %2
%152 = add nsw i32 %151, 1
store i32 %152, i32* %2
br label %101
153: ; preds = %141, %128, %101
%154 = getelementptr inbounds [50 x i8], [50 x i8]* %37, i64 0, i64 0
%155 = load i32, i32* %34
%156 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 0
%157 = load i32, i32* %156
%158 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 1
%159 = load i32, i32* %158
%160 = load i32, i32* %34
%161 = icmp eq i32 %160, 2
br i1 %161, label %162, label %170
162: ; preds = %153
%163 = load i32, i32* %3
%164 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 0
%165 = load i32, i32* %164
%166 = add nsw i32 %163, %165
%167 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 1
%168 = load i32, i32* %167
%169 = icmp slt i32 %166, %168
br label %170
170: ; preds = %162, %153
%171 = phi i1 [ false, %153 ], [ %169, %162 ]
%172 = zext i1 %171 to i32
%173 = call i32 (i8*, i8*, ...) @sprintf(i8* %154, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i32 %155, i32 %157, i32 %159, i32 %172)
%174 = load i32, i32* %17
%175 = getelementptr inbounds [50 x i8], [50 x i8]* %37, i64 0, i64 0
%176 = getelementptr inbounds [50 x i8], [50 x i8]* %37, i64 0, i64 0
%177 = call i64 @strlen(i8* %176)
%178 = add i64 %177, 1
%179 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 %174, i8* %175, i64 %178)
store i32 0, i32* %3
br label %180
180: ; preds = %220, %170
%181 = load i32, i32* %34
%182 = icmp eq i32 %181, 2
br i1 %182, label %183, label %191
183: ; preds = %180
%184 = load i32, i32* %3
%185 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 0
%186 = load i32, i32* %185
%187 = add nsw i32 %184, %186
%188 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 1
%189 = load i32, i32* %188
%190 = icmp slt i32 %187, %189
br label %191
191: ; preds = %183, %180
%192 = phi i1 [ false, %180 ], [ %190, %183 ]
br i1 %192, label %193, label %223
193: ; preds = %191
%194 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 0
%195 = load i32, i32* %194
%196 = load i32, i32* %3
%197 = add nsw i32 %195, %196
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0, i64 %198
%200 = load i8, i8* %199
%201 = load i32, i32* %3
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds [100 x i8], [100 x i8]* %29, i64 0, i64 %202
store i8 %200, i8* %203
%204 = load i32, i32* %3
%205 = sub nsw i32 %204, 2
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds [100 x i8], [100 x i8]* %29, i64 0, i64 %206
%208 = load i8, i8* %207
%209 = sext i8 %208 to i32
%210 = icmp eq i32 %209, 42
br i1 %210, label %211, label %219
211: ; preds = %193
%212 = load i32, i32* %3
%213 = add nsw i32 %212, 1
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds [100 x i8], [100 x i8]* %29, i64 0, i64 %214
store i8 0, i8* %215
store i32 3, i32* %34
%216 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 1
%217 = load i32, i32* %216
%218 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 2
store i32 %217, i32* %218
br label %223
219: ; preds = %193
br label %220
220: ; preds = %219
%221 = load i32, i32* %3
%222 = add nsw i32 %221, 1
store i32 %222, i32* %3
br label %180
223: ; preds = %211, %191
%224 = getelementptr inbounds [50 x i8], [50 x i8]* %37, i64 0, i64 0
%225 = load i32, i32* %34
%226 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 2
%227 = load i32, i32* %226
%228 = call i32 (i8*, i8*, ...) @sprintf(i8* %224, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i32 %225, i32 %227)
%229 = load i32, i32* %17
%230 = getelementptr inbounds [50 x i8], [50 x i8]* %37, i64 0, i64 0
%231 = getelementptr inbounds [50 x i8], [50 x i8]* %37, i64 0, i64 0
%232 = call i64 @strlen(i8* %231)
%233 = add i64 %232, 1
%234 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 %229, i8* %230, i64 %233)
%235 = load i32, i32* %34
%236 = icmp eq i32 %235, 3
br i1 %236, label %237, label %257
237: ; preds = %223
%238 = getelementptr inbounds [50 x i8], [50 x i8]* %37, i64 0, i64 0
%239 = getelementptr inbounds [100 x i8], [100 x i8]* %29, i64 0, i64 0
%240 = call i32 (i8*, i8*, ...) @sprintf(i8* %238, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %239)
%241 = getelementptr inbounds [50 x i8], [50 x i8]* %37, i64 0, i64 0
%242 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %241)
%243 = getelementptr inbounds [100 x i8], [100 x i8]* %29, i64 0, i64 0
%244 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @Nullize to i32 (i8*, i64, ...)*)(i8* %243, i64 100)
%245 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0, i64 0
%246 = call i64 @strlen(i8* %245)
%247 = icmp ugt i64 %246, 300
br i1 %247, label %248, label %256
248: ; preds = %237
%249 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0, i64 0
%250 = getelementptr inbounds [500 x i8], [500 x i8]* %26, i64 0, i64 0
%251 = call i64 @strlen(i8* %250)
%252 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @Nullize to i32 (i8*, i64, ...)*)(i8* %249, i64 %251)
%253 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 0
store i32 0, i32* %253
%254 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 1
store i32 0, i32* %254
%255 = getelementptr inbounds [3 x i32], [3 x i32]* %32, i64 0, i64 2
store i32 0, i32* %255
br label %256
256: ; preds = %248, %237
br label %257
257: ; preds = %256, %223
br label %258
258: ; preds = %257, %73
br label %69
259: ; preds = %69
%260 = load i32, i32* %17
%261 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %260, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 5)
%262 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%263 = call i32 (i32, ...) bitcast (i32 (...)* @CloseGPin to i32 (i32, ...)*)(i32 27)
%264 = call i32 (i32, ...) bitcast (i32 (...)* @LEDOff to i32 (i32, ...)*)(i32 23)
%265 = call i32 (i32, ...) bitcast (i32 (...)* @LEDOff to i32 (i32, ...)*)(i32 47)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"in\00"
@.str.2 = [13 x i8] c"UART1T : %d\0A\00"
@.str.3 = [13 x i8] c"UART1R : %d\0A\00"
@.str.4 = [8 x i8] c"START!\0A\00"
@.str.5 = [34 x i8] c"\0ACopy! flag : %d, 0-%i, 1-%i, %i\0A\00"
@.str.6 = [30 x i8] c"Copy for parse %i - posi2 %i\0A\00"
@.str.7 = [5 x i8] c"1%s\0A\00"
@.str.8 = [3 x i8] c"%s\00"
@.str.9 = [5 x i8] c"End\0A\00"
@str = [6 x i8] c"Start\00"
@str.10 = [7 x i8] c"START!\00"
@str.11 = [4 x i8] c"End\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [500 x i8]
%3 = alloca [100 x i8]
%4 = alloca [50 x i8]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%9 = tail call i32 (...) @SettingCape()
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @LEDOn to i32 (i32, ...)*)(i32 23)
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @LEDOn to i32 (i32, ...)*)(i32 47)
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @InitPin to i32 (i32, ...)*)(i32 27)
%13 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @SetPinDirt to i32 (i32, i8*, ...)*)(i32 27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%15 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @UART_init to i32 (i32, i32, ...)*)(i32 1, i32 84)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %15)
%17 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @UART_init to i32 (i32, i32, ...)*)(i32 1, i32 82)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @UART_Baudrate_NonC to i32 (i32, i32, i32, i32, ...)*)(i32 %15, i32 115200, i32 0, i32 1)
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.10, i64 0, i64 0))
%21 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 8)
%22 = call i32 (i32, ...) bitcast (i32 (...)* @GetPinValue to i32 (i32, ...)*)(i32 27)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %124
24: ; preds = %0, %119
%25 = phi i32 [ %121, %119 ], [ undef, %0 ]
%26 = phi i32 [ %120, %119 ], [ 0, %0 ]
%27 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %17, i8* %5, i32 100)
%28 = call i8* @strcat(i8* %6, i8* %5)
%29 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @Nullize to i32 (i8*, i32, ...)*)(i8* %5, i32 %27)
%30 = icmp eq i32 %27, -1
br i1 %30, label %119, label %31
31: ; preds = %24
%32 = call i64 @strlen(i8* %6)
%33 = add i64 %32, 1
%34 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 %15, i8* %6, i64 %33)
%35 = add nsw i32 %26, 1
%36 = icmp ult i32 %26, 500
br i1 %36, label %37, label %64
37: ; preds = %31, %61
%38 = phi i32 [ %62, %61 ], [ %26, %31 ]
%39 = phi i32 [ %46, %61 ], [ 0, %31 ]
%40 = phi i32 [ %45, %61 ], [ %26, %31 ]
%41 = zext i32 %38 to i64
%42 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 %41
%43 = load i8, i8* %42
%44 = icmp eq i8 %43, 36
%45 = select i1 %44, i32 %38, i32 %40
%46 = select i1 %44, i32 1, i32 %39
%47 = zext i1 %44 to i32
%48 = add nuw nsw i32 %38, %47
%49 = icmp eq i32 %46, 1
br i1 %49, label %50, label %61
50: ; preds = %37
%51 = add nsw i32 %48, -3
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 %52
%54 = load i8, i8* %53
%55 = icmp eq i8 %54, 42
br i1 %55, label %64, label %56
56: ; preds = %50
%57 = zext i32 %48 to i64
%58 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 %57
%59 = load i8, i8* %58
%60 = icmp eq i8 %59, 0
br i1 %60, label %64, label %61
61: ; preds = %37, %56
%62 = add nuw nsw i32 %48, 1
%63 = icmp ult i32 %48, 499
br i1 %63, label %37, label %64
64: ; preds = %61, %50, %56, %31
%65 = phi i32 [ %26, %31 ], [ %26, %56 ], [ %45, %50 ], [ %45, %61 ]
%66 = phi i32 [ %35, %31 ], [ %35, %56 ], [ %48, %50 ], [ %35, %61 ]
%67 = phi i32 [ 0, %31 ], [ 1, %56 ], [ 2, %50 ], [ %46, %61 ]
%68 = icmp eq i32 %67, 2
%69 = add nsw i32 %65, %25
%70 = icmp slt i32 %69, %66
%71 = select i1 %68, i1 %70, i1 false
%72 = zext i1 %71 to i32
%73 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i32 %67, i32 %65, i32 %66, i32 %72)
%74 = call i64 @strlen(i8* %8)
%75 = add i64 %74, 1
%76 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 %15, i8* %8, i64 %75)
br i1 %68, label %77, label %102
77: ; preds = %64
%78 = sext i32 %65 to i64
%79 = sext i32 %66 to i64
%80 = call i32 @llvm.smax.i32(i32 %65, i32 %66)
%81 = sub i32 %80, %65
%82 = icmp slt i32 %65, %66
br i1 %82, label %83, label %102
83: ; preds = %77, %98
%84 = phi i64 [ %100, %98 ], [ %78, %77 ]
%85 = phi i64 [ %99, %98 ], [ 0, %77 ]
%86 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 %84
%87 = load i8, i8* %86
%88 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %85
store i8 %87, i8* %88
%89 = add nsw i64 %85, -2
%90 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %89
%91 = load i8, i8* %90
%92 = icmp eq i8 %91, 42
br i1 %92, label %93, label %98
93: ; preds = %83
%94 = trunc i64 %85 to i32
%95 = add nuw i64 %85, 1
%96 = and i64 %95, 4294967295
%97 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %96
store i8 0, i8* %97
br label %102
98: ; preds = %83
%99 = add nuw nsw i64 %85, 1
%100 = add nsw i64 %99, %78
%101 = icmp slt i64 %100, %79
br i1 %101, label %83, label %102
102: ; preds = %98, %77, %64, %93
%103 = phi i32 [ %94, %93 ], [ 0, %64 ], [ %81, %77 ], [ %81, %98 ]
%104 = phi i32 [ %66, %93 ], [ %26, %64 ], [ %26, %77 ], [ %26, %98 ]
%105 = phi i32 [ 3, %93 ], [ %67, %64 ], [ 2, %77 ], [ 2, %98 ]
%106 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i32 %105, i32 %104)
%107 = call i64 @strlen(i8* %8)
%108 = add i64 %107, 1
%109 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 %15, i8* %8, i64 %108)
%110 = icmp eq i32 %105, 3
br i1 %110, label %111, label %119
111: ; preds = %102
%112 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %7)
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %8)
%114 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @Nullize to i32 (i8*, i64, ...)*)(i8* %7, i64 100)
%115 = call i64 @strlen(i8* %6)
%116 = icmp ugt i64 %115, 300
br i1 %116, label %117, label %119
117: ; preds = %111
%118 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @Nullize to i32 (i8*, i64, ...)*)(i8* %6, i64 %115)
br label %119
119: ; preds = %102, %117, %111, %24
%120 = phi i32 [ 0, %117 ], [ %104, %111 ], [ %104, %102 ], [ %26, %24 ]
%121 = phi i32 [ %103, %117 ], [ %103, %111 ], [ %103, %102 ], [ %25, %24 ]
%122 = call i32 (i32, ...) bitcast (i32 (...)* @GetPinValue to i32 (i32, ...)*)(i32 27)
%123 = icmp eq i32 %122, 0
br i1 %123, label %24, label %124
124: ; preds = %119, %0
%125 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 5)
%126 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.11, i64 0, i64 0))
%127 = call i32 (i32, ...) bitcast (i32 (...)* @CloseGPin to i32 (i32, ...)*)(i32 27)
%128 = call i32 (i32, ...) bitcast (i32 (...)* @LEDOff to i32 (i32, ...)*)(i32 23)
%129 = call i32 (i32, ...) bitcast (i32 (...)* @LEDOff to i32 (i32, ...)*)(i32 47)
ret i32 0
}