#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
char UART0_GetChar();
int /*<<< orphan*/ UART0_Port_Init();
int /*<<< orphan*/ UART0_PutChar(char);
int /*<<< orphan*/ UART0_SendData32(char);
int /*<<< orphan*/ UART0_SendString(char *);
int /*<<< orphan*/ UART0_Set_BaudRate();
int /*<<< orphan*/ UART0_Set_Format();
int /*<<< orphan*/ nand_readID(char *);
int /*<<< orphan*/ nand_read_page(char *, int, int);
int /*<<< orphan*/ nand_write_page(char *, int, int);
int main() {
  char data;
  UART0_Port_Init();
  UART0_Set_BaudRate();
  UART0_Set_Format();
  UART0_SendString("\n\r-----------------------------------------\n\r");
  {
    int i = 0;
    char id[6] = {0, 0, 0, 0, 0, 0};
    nand_readID(id);
    UART0_SendString("Read Nand Flash ID:\n\r");
    for (i = 0; i < 6; i++) {
      UART0_SendData32(id[i]);
      UART0_SendString("\t");
    }
    UART0_SendString("\n\r");
  }
  {
    char buffer[4096];
    int i = 0;
    nand_read_page(buffer, 0x00000000, 4096);
    UART0_SendString("\n\rBlock 0 - Page 0:\n\r");
    for (i = 2041; i < 2048; i++) {
      UART0_SendData32(buffer[i]);
      UART0_SendString("\t");
    }
    UART0_SendString("\n\rBlock 0 - Page 1:\n\r");
    for (i = 2048; i < 2058; i++) {
      UART0_SendData32(buffer[i]);
      UART0_SendString("\t");
    }
    nand_read_page(buffer, 0x00000800, 2048);
    UART0_SendString("\n\rBlock 0 - Page 1:\n\r");
    for (i = 0; i < 10; i++) {
      UART0_SendData32(buffer[i]);
      UART0_SendString("\t");
    }
    UART0_SendString("\n\r");
    nand_read_page(buffer, 0x10000000, 2048);
    UART0_SendString("\n\rBlock 2048 - Page 0:\n\r");
    for (i = 0; i < 10; i++) {
      UART0_SendData32(buffer[i]);
      UART0_SendString("\t");
    }
    UART0_SendString("\n\r");
    for (i = 0; i < 5; i++)
      buffer[i] = i;
    nand_write_page(buffer, 2048, 0x10000000);
    nand_read_page(buffer, 0x10000000, 2048);
    UART0_SendString("\n\rBlock 2048 - Page 0:\n\r");
    for (i = 0; i < 10; i++) {
      UART0_SendData32(buffer[i]);
      UART0_SendString("\t");
    }
    UART0_SendString("\n\r");
  }
  while (1) {
    data = UART0_GetChar();
    UART0_PutChar(data + 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1030,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <UART0_Port_Init@plt>
mov    $0x0,%al
call   10a0 <UART0_Set_BaudRate@plt>
mov    $0x0,%al
call   10b0 <UART0_Set_Format@plt>
lea    0xe22(%rip),%rdi
call   1090 <UART0_SendString@plt>
movl   $0x0,-0xc(%rbp)
lea    -0x12(%rbp),%rdi
xor    %esi,%esi
mov    $0x6,%edx
call   1050 <memset@plt>
lea    -0x12(%rbp),%rdi
call   1060 <nand_readID@plt>
lea    0xe24(%rip),%rdi
call   1090 <UART0_SendString@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    1248 <main+0x98>
movslq -0xc(%rbp),%rax
movsbl -0x12(%rbp,%rax,1),%edi
call   1070 <UART0_SendData32@plt>
lea    0xe0f(%rip),%rdi
call   1090 <UART0_SendString@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1216 <main+0x66>
lea    0xddc(%rip),%rdi
call   1090 <UART0_SendString@plt>
movl   $0x0,-0x1024(%rbp)
lea    -0x1020(%rbp),%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1080 <nand_read_page@plt>
lea    0xdce(%rip),%rdi
call   1090 <UART0_SendString@plt>
movl   $0x7f9,-0x1024(%rbp)
cmpl   $0x800,-0x1024(%rbp)
jge    12cb <main+0x11b>
movslq -0x1024(%rbp),%rax
movsbl -0x1020(%rbp,%rax,1),%edi
ff
call   1070 <UART0_SendData32@plt>
lea    0xd92(%rip),%rdi
call   1090 <UART0_SendString@plt>
mov    -0x1024(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1024(%rbp)
jmp    1287 <main+0xd7>
lea    0xd8a(%rip),%rdi
call   1090 <UART0_SendString@plt>
movl   $0x800,-0x1024(%rbp)
cmpl   $0x80a,-0x1024(%rbp)
jge    1325 <main+0x175>
movslq -0x1024(%rbp),%rax
movsbl -0x1020(%rbp,%rax,1),%edi
ff
call   1070 <UART0_SendData32@plt>
lea    0xd38(%rip),%rdi
call   1090 <UART0_SendString@plt>
mov    -0x1024(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1024(%rbp)
jmp    12e1 <main+0x131>
lea    -0x1020(%rbp),%rdi
mov    $0x800,%edx
mov    %edx,%esi
call   1080 <nand_read_page@plt>
lea    0xd1d(%rip),%rdi
call   1090 <UART0_SendString@plt>
movl   $0x0,-0x1024(%rbp)
cmpl   $0xa,-0x1024(%rbp)
jge    138f <main+0x1df>
movslq -0x1024(%rbp),%rax
movsbl -0x1020(%rbp,%rax,1),%edi
ff
call   1070 <UART0_SendData32@plt>
lea    0xcce(%rip),%rdi
call   1090 <UART0_SendString@plt>
mov    -0x1024(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1024(%rbp)
jmp    134e <main+0x19e>
lea    0xc95(%rip),%rdi
call   1090 <UART0_SendString@plt>
lea    -0x1020(%rbp),%rdi
mov    $0x10000000,%esi
mov    $0x800,%edx
call   1080 <nand_read_page@plt>
lea    0xcba(%rip),%rdi
call   1090 <UART0_SendString@plt>
movl   $0x0,-0x1024(%rbp)
cmpl   $0xa,-0x1024(%rbp)
jge    1408 <main+0x258>
movslq -0x1024(%rbp),%rax
movsbl -0x1020(%rbp,%rax,1),%edi
ff
call   1070 <UART0_SendData32@plt>
lea    0xc55(%rip),%rdi
call   1090 <UART0_SendString@plt>
mov    -0x1024(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1024(%rbp)
jmp    13c7 <main+0x217>
lea    0xc1c(%rip),%rdi
call   1090 <UART0_SendString@plt>
movl   $0x0,-0x1024(%rbp)
cmpl   $0x5,-0x1024(%rbp)
jge    1455 <main+0x2a5>
mov    -0x1024(%rbp),%eax
mov    %al,%cl
movslq -0x1024(%rbp),%rax
mov    %cl,-0x1020(%rbp,%rax,1)
mov    -0x1024(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1024(%rbp)
jmp    141e <main+0x26e>
lea    -0x1020(%rbp),%rdi
mov    $0x800,%esi
mov    $0x10000000,%edx
call   10c0 <nand_write_page@plt>
lea    -0x1020(%rbp),%rdi
mov    $0x10000000,%esi
mov    $0x800,%edx
call   1080 <nand_read_page@plt>
lea    0xbea(%rip),%rdi
call   1090 <UART0_SendString@plt>
movl   $0x0,-0x1024(%rbp)
cmpl   $0xa,-0x1024(%rbp)
jge    14d8 <main+0x328>
movslq -0x1024(%rbp),%rax
movsbl -0x1020(%rbp,%rax,1),%edi
ff
call   1070 <UART0_SendData32@plt>
lea    0xb85(%rip),%rdi
call   1090 <UART0_SendString@plt>
mov    -0x1024(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1024(%rbp)
jmp    1497 <main+0x2e7>
lea    0xb4c(%rip),%rdi
call   1090 <UART0_SendString@plt>
mov    $0x0,%al
call   10d0 <UART0_GetChar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1028(%rbp)
movsbl %al,%edi
call   1030 <UART0_PutChar@plt>
jmp    14e4 <main+0x334>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1008,%rsp
xor    %eax,%eax
call   1040 <UART0_Port_Init@plt>
xor    %eax,%eax
call   1090 <UART0_Set_BaudRate@plt>
xor    %eax,%eax
call   10a0 <UART0_Set_Format@plt>
lea    0xe36(%rip),%rdi
call   1080 <UART0_SendString@plt>
movw   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
mov    %rsp,%rdi
call   1050 <nand_readID@plt>
lea    0xe42(%rip),%rdi
call   1080 <UART0_SendString@plt>
movsbl (%rsp),%edi
call   1060 <UART0_SendData32@plt>
lea    0xe43(%rip),%rbx
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x1(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x2(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x3(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x4(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x5(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
lea    0xdc1(%rip),%r14
mov    %r14,%rdi
call   1080 <UART0_SendString@plt>
mov    %rsp,%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1070 <nand_read_page@plt>
lea    0xdbb(%rip),%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x7f9(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x7fa(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x7fb(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x7fc(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x7fd(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x7fe(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x7ff(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
lea    0xd32(%rip),%r12
mov    %r12,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x800(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x801(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x802(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x803(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x804(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x805(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x806(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x807(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x808(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x809(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
mov    %r15,%rdi
mov    $0x800,%esi
mov    $0x800,%edx
call   1070 <nand_read_page@plt>
mov    %r12,%rdi
call   1080 <UART0_SendString@plt>
movsbl (%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x1(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x2(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x3(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x4(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x5(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x6(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x7(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x8(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x9(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
mov    %r14,%rdi
call   1080 <UART0_SendString@plt>
mov    %r15,%rdi
mov    $0x10000000,%esi
mov    $0x800,%edx
call   1070 <nand_read_page@plt>
lea    0xb80(%rip),%r12
mov    %r12,%rdi
call   1080 <UART0_SendString@plt>
movsbl (%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x1(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x2(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x3(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x4(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x5(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x6(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x7(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x8(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x9(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
mov    %r14,%rdi
call   1080 <UART0_SendString@plt>
movl   $0x3020100,(%rsp)
movb   $0x4,0x4(%rsp)
mov    %r15,%rdi
mov    $0x800,%esi
mov    $0x10000000,%edx
call   10b0 <nand_write_page@plt>
mov    %r15,%rdi
mov    $0x10000000,%esi
mov    $0x800,%edx
call   1070 <nand_read_page@plt>
mov    %r12,%rdi
call   1080 <UART0_SendString@plt>
movsbl (%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x1(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x2(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x3(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x4(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x5(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x6(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x7(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x8(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
movsbl 0x9(%rsp),%edi
call   1060 <UART0_SendData32@plt>
mov    %rbx,%rdi
call   1080 <UART0_SendString@plt>
mov    %r14,%rdi
call   1080 <UART0_SendString@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10c0 <UART0_GetChar@plt>
add    $0x1,%al
movsbl %al,%edi
call   1030 <UART0_PutChar@plt>
jmp    16b0 <main+0x510>

LLVM IR (-O0):
@.str = [46 x i8] c"\0A\0D-----------------------------------------\0A\0D\00"
@.str.1 = [22 x i8] c"Read Nand Flash ID:\0A\0D\00"
@.str.2 = [2 x i8] c"\09\00"
@.str.3 = [3 x i8] c"\0A\0D\00"
@.str.4 = [22 x i8] c"\0A\0DBlock 0 - Page 0:\0A\0D\00"
@.str.5 = [22 x i8] c"\0A\0DBlock 0 - Page 1:\0A\0D\00"
@.str.6 = [25 x i8] c"\0A\0DBlock 2048 - Page 0:\0A\0D\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca [6 x i8]
%5 = alloca [4096 x i8]
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (...) @UART0_Port_Init()
%8 = call i32 (...) @UART0_Set_BaudRate()
%9 = call i32 (...) @UART0_Set_Format()
%10 = call i32 @UART0_SendString(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
%11 = bitcast [6 x i8]* %4 to i8*
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%13 = call i32 @nand_readID(i8* %12)
%14 = call i32 @UART0_SendString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %15
15: ; preds = %25, %0
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 6
br i1 %17, label %18, label %28
18: ; preds = %15
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = call i32 @UART0_SendData32(i8 signext %22)
%24 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %18
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %15
28: ; preds = %15
%29 = call i32 @UART0_SendString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
%30 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 0
%31 = call i32 @nand_read_page(i8* %30, i32 0, i32 4096)
%32 = call i32 @UART0_SendString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
store i32 2041, i32* %6
br label %33
33: ; preds = %43, %28
%34 = load i32, i32* %6
%35 = icmp slt i32 %34, 2048
br i1 %35, label %36, label %46
36: ; preds = %33
%37 = load i32, i32* %6
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 %38
%40 = load i8, i8* %39
%41 = call i32 @UART0_SendData32(i8 signext %40)
%42 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %43
43: ; preds = %36
%44 = load i32, i32* %6
%45 = add nsw i32 %44, 1
store i32 %45, i32* %6
br label %33
46: ; preds = %33
%47 = call i32 @UART0_SendString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
store i32 2048, i32* %6
br label %48
48: ; preds = %58, %46
%49 = load i32, i32* %6
%50 = icmp slt i32 %49, 2058
br i1 %50, label %51, label %61
51: ; preds = %48
%52 = load i32, i32* %6
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = call i32 @UART0_SendData32(i8 signext %55)
%57 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %58
58: ; preds = %51
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
store i32 %60, i32* %6
br label %48
61: ; preds = %48
%62 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 0
%63 = call i32 @nand_read_page(i8* %62, i32 2048, i32 2048)
%64 = call i32 @UART0_SendString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %6
br label %65
65: ; preds = %75, %61
%66 = load i32, i32* %6
%67 = icmp slt i32 %66, 10
br i1 %67, label %68, label %78
68: ; preds = %65
%69 = load i32, i32* %6
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = call i32 @UART0_SendData32(i8 signext %72)
%74 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %75
75: ; preds = %68
%76 = load i32, i32* %6
%77 = add nsw i32 %76, 1
store i32 %77, i32* %6
br label %65
78: ; preds = %65
%79 = call i32 @UART0_SendString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%80 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 0
%81 = call i32 @nand_read_page(i8* %80, i32 268435456, i32 2048)
%82 = call i32 @UART0_SendString(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %6
br label %83
83: ; preds = %93, %78
%84 = load i32, i32* %6
%85 = icmp slt i32 %84, 10
br i1 %85, label %86, label %96
86: ; preds = %83
%87 = load i32, i32* %6
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 %88
%90 = load i8, i8* %89
%91 = call i32 @UART0_SendData32(i8 signext %90)
%92 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %93
93: ; preds = %86
%94 = load i32, i32* %6
%95 = add nsw i32 %94, 1
store i32 %95, i32* %6
br label %83
96: ; preds = %83
%97 = call i32 @UART0_SendString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %98
98: ; preds = %107, %96
%99 = load i32, i32* %6
%100 = icmp slt i32 %99, 5
br i1 %100, label %101, label %110
101: ; preds = %98
%102 = load i32, i32* %6
%103 = trunc i32 %102 to i8
%104 = load i32, i32* %6
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 %105
store i8 %103, i8* %106
br label %107
107: ; preds = %101
%108 = load i32, i32* %6
%109 = add nsw i32 %108, 1
store i32 %109, i32* %6
br label %98
110: ; preds = %98
%111 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 0
%112 = call i32 @nand_write_page(i8* %111, i32 2048, i32 268435456)
%113 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 0
%114 = call i32 @nand_read_page(i8* %113, i32 268435456, i32 2048)
%115 = call i32 @UART0_SendString(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %6
br label %116
116: ; preds = %126, %110
%117 = load i32, i32* %6
%118 = icmp slt i32 %117, 10
br i1 %118, label %119, label %129
119: ; preds = %116
%120 = load i32, i32* %6
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 %121
%123 = load i8, i8* %122
%124 = call i32 @UART0_SendData32(i8 signext %123)
%125 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %126
126: ; preds = %119
%127 = load i32, i32* %6
%128 = add nsw i32 %127, 1
store i32 %128, i32* %6
br label %116
129: ; preds = %116
%130 = call i32 @UART0_SendString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %131
131: ; preds = %129, %131
%132 = call signext i8 (...) @UART0_GetChar()
store i8 %132, i8* %2
%133 = load i8, i8* %2
%134 = sext i8 %133 to i32
%135 = add nsw i32 %134, 1
%136 = trunc i32 %135 to i8
%137 = call i32 @UART0_PutChar(i8 signext %136)
br label %131
}

LLVM IR (-O2):
@.str = [46 x i8] c"\0A\0D-----------------------------------------\0A\0D\00"
@.str.1 = [22 x i8] c"Read Nand Flash ID:\0A\0D\00"
@.str.2 = [2 x i8] c"\09\00"
@.str.3 = [3 x i8] c"\0A\0D\00"
@.str.4 = [22 x i8] c"\0A\0DBlock 0 - Page 0:\0A\0D\00"
@.str.5 = [22 x i8] c"\0A\0DBlock 0 - Page 1:\0A\0D\00"
@.str.6 = [25 x i8] c"\0A\0DBlock 2048 - Page 0:\0A\0D\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca [4096 x i8]
%3 = tail call i32 (...) @UART0_Port_Init()
%4 = tail call i32 (...) @UART0_Set_BaudRate()
%5 = tail call i32 (...) @UART0_Set_Format()
%6 = tail call i32 @UART0_SendString(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%8 = call i32 @nand_readID(i8* %7)
%9 = call i32 @UART0_SendString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%10 = load i8, i8* %7
%11 = call i32 @UART0_SendData32(i8 signext %10)
%12 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 1
%14 = load i8, i8* %13
%15 = call i32 @UART0_SendData32(i8 signext %14)
%16 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%17 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 2
%18 = load i8, i8* %17
%19 = call i32 @UART0_SendData32(i8 signext %18)
%20 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%21 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 3
%22 = load i8, i8* %21
%23 = call i32 @UART0_SendData32(i8 signext %22)
%24 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%25 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 4
%26 = load i8, i8* %25
%27 = call i32 @UART0_SendData32(i8 signext %26)
%28 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%29 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 5
%30 = load i8, i8* %29
%31 = call i32 @UART0_SendData32(i8 signext %30)
%32 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%33 = call i32 @UART0_SendString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%34 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%35 = call i32 @nand_read_page(i8* %34, i32 0, i32 4096)
%36 = call i32 @UART0_SendString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%37 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2041
%38 = load i8, i8* %37
%39 = call i32 @UART0_SendData32(i8 signext %38)
%40 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%41 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2042
%42 = load i8, i8* %41
%43 = call i32 @UART0_SendData32(i8 signext %42)
%44 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%45 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2043
%46 = load i8, i8* %45
%47 = call i32 @UART0_SendData32(i8 signext %46)
%48 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%49 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2044
%50 = load i8, i8* %49
%51 = call i32 @UART0_SendData32(i8 signext %50)
%52 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%53 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2045
%54 = load i8, i8* %53
%55 = call i32 @UART0_SendData32(i8 signext %54)
%56 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%57 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2046
%58 = load i8, i8* %57
%59 = call i32 @UART0_SendData32(i8 signext %58)
%60 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%61 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2047
%62 = load i8, i8* %61
%63 = call i32 @UART0_SendData32(i8 signext %62)
%64 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%65 = call i32 @UART0_SendString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
%66 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2048
%67 = load i8, i8* %66
%68 = call i32 @UART0_SendData32(i8 signext %67)
%69 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%70 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2049
%71 = load i8, i8* %70
%72 = call i32 @UART0_SendData32(i8 signext %71)
%73 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%74 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2050
%75 = load i8, i8* %74
%76 = call i32 @UART0_SendData32(i8 signext %75)
%77 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%78 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2051
%79 = load i8, i8* %78
%80 = call i32 @UART0_SendData32(i8 signext %79)
%81 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%82 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2052
%83 = load i8, i8* %82
%84 = call i32 @UART0_SendData32(i8 signext %83)
%85 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%86 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2053
%87 = load i8, i8* %86
%88 = call i32 @UART0_SendData32(i8 signext %87)
%89 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%90 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2054
%91 = load i8, i8* %90
%92 = call i32 @UART0_SendData32(i8 signext %91)
%93 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%94 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2055
%95 = load i8, i8* %94
%96 = call i32 @UART0_SendData32(i8 signext %95)
%97 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%98 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2056
%99 = load i8, i8* %98
%100 = call i32 @UART0_SendData32(i8 signext %99)
%101 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%102 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2057
%103 = load i8, i8* %102
%104 = call i32 @UART0_SendData32(i8 signext %103)
%105 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%106 = call i32 @nand_read_page(i8* %34, i32 2048, i32 2048)
%107 = call i32 @UART0_SendString(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
%108 = load i8, i8* %34
%109 = call i32 @UART0_SendData32(i8 signext %108)
%110 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%111 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 1
%112 = load i8, i8* %111
%113 = call i32 @UART0_SendData32(i8 signext %112)
%114 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%115 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 2
%116 = load i8, i8* %115
%117 = call i32 @UART0_SendData32(i8 signext %116)
%118 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%119 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 3
%120 = load i8, i8* %119
%121 = call i32 @UART0_SendData32(i8 signext %120)
%122 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%123 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 4
%124 = load i8, i8* %123
%125 = call i32 @UART0_SendData32(i8 signext %124)
%126 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%127 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 5
%128 = load i8, i8* %127
%129 = call i32 @UART0_SendData32(i8 signext %128)
%130 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%131 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 6
%132 = load i8, i8* %131
%133 = call i32 @UART0_SendData32(i8 signext %132)
%134 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%135 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 7
%136 = load i8, i8* %135
%137 = call i32 @UART0_SendData32(i8 signext %136)
%138 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%139 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 8
%140 = load i8, i8* %139
%141 = call i32 @UART0_SendData32(i8 signext %140)
%142 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%143 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 9
%144 = load i8, i8* %143
%145 = call i32 @UART0_SendData32(i8 signext %144)
%146 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%147 = call i32 @UART0_SendString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%148 = call i32 @nand_read_page(i8* %34, i32 268435456, i32 2048)
%149 = call i32 @UART0_SendString(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%150 = load i8, i8* %34
%151 = call i32 @UART0_SendData32(i8 signext %150)
%152 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%153 = load i8, i8* %111
%154 = call i32 @UART0_SendData32(i8 signext %153)
%155 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%156 = load i8, i8* %115
%157 = call i32 @UART0_SendData32(i8 signext %156)
%158 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%159 = load i8, i8* %119
%160 = call i32 @UART0_SendData32(i8 signext %159)
%161 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%162 = load i8, i8* %123
%163 = call i32 @UART0_SendData32(i8 signext %162)
%164 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%165 = load i8, i8* %127
%166 = call i32 @UART0_SendData32(i8 signext %165)
%167 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%168 = load i8, i8* %131
%169 = call i32 @UART0_SendData32(i8 signext %168)
%170 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%171 = load i8, i8* %135
%172 = call i32 @UART0_SendData32(i8 signext %171)
%173 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%174 = load i8, i8* %139
%175 = call i32 @UART0_SendData32(i8 signext %174)
%176 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%177 = load i8, i8* %143
%178 = call i32 @UART0_SendData32(i8 signext %177)
%179 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%180 = call i32 @UART0_SendString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i8 0, i8* %34
store i8 1, i8* %111
store i8 2, i8* %115
store i8 3, i8* %119
store i8 4, i8* %123
%181 = call i32 @nand_write_page(i8* %34, i32 2048, i32 268435456)
%182 = call i32 @nand_read_page(i8* %34, i32 268435456, i32 2048)
%183 = call i32 @UART0_SendString(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%184 = load i8, i8* %34
%185 = call i32 @UART0_SendData32(i8 signext %184)
%186 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%187 = load i8, i8* %111
%188 = call i32 @UART0_SendData32(i8 signext %187)
%189 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%190 = load i8, i8* %115
%191 = call i32 @UART0_SendData32(i8 signext %190)
%192 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%193 = load i8, i8* %119
%194 = call i32 @UART0_SendData32(i8 signext %193)
%195 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%196 = load i8, i8* %123
%197 = call i32 @UART0_SendData32(i8 signext %196)
%198 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%199 = load i8, i8* %127
%200 = call i32 @UART0_SendData32(i8 signext %199)
%201 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%202 = load i8, i8* %131
%203 = call i32 @UART0_SendData32(i8 signext %202)
%204 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%205 = load i8, i8* %135
%206 = call i32 @UART0_SendData32(i8 signext %205)
%207 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%208 = load i8, i8* %139
%209 = call i32 @UART0_SendData32(i8 signext %208)
%210 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%211 = load i8, i8* %143
%212 = call i32 @UART0_SendData32(i8 signext %211)
%213 = call i32 @UART0_SendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%214 = call i32 @UART0_SendString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %215
215: ; preds = %215, %0
%216 = call signext i8 (...) @UART0_GetChar()
%217 = add i8 %216, 1
%218 = call i32 @UART0_PutChar(i8 signext %217)
br label %215
}