#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 */
struct timeval {
  int dummy;
};
struct termios {
  int c_iflag;
  int c_oflag;
  int c_cflag;
  int c_lflag;
};
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ B0;
int BRKINT;
int CLOCAL;
int CREAD;
int CRTSCTS;
int CS8;
int CSIZE;
int CSTOPB;
int ECHO;
int FLUSHO;
int HUPCL;
int ICANON;
int ICRNL;
int IEXTEN;
int IGNBRK;
int IGNCR;
int IGNPAR;
int IMAXBEL;
int INLCR;
int INPCK;
int ISIG;
int ISTRIP;
int IXANY;
int IXOFF;
int IXON;
int NOFLSH;
int OCRNL;
int ONLCR;
int ONLRET;
int ONOCR;
int OPOST;
int /*<<< orphan*/ O_RDWR;
int PARENB;
int PARMRK;
int PARODD;
int PENDIN;
int /*<<< orphan*/ TCSADRAIN;
scalar_t__ cfsetispeed(struct termios *, int /*<<< orphan*/);
scalar_t__ cfsetospeed(struct termios *, int);
int /*<<< orphan*/ close(int);
int int_to_baud(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
scalar_t__ tcgetattr(int, struct termios *);
scalar_t__ tcsetattr(int, int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ usleep(int);
int /*<<< orphan*/ write(int, ...);
int main(void) {
  char out_file_name[80] = "/dev/ttyUSB0";
  fd_set read_fd_set;
  int max_fd;
  struct termios orig_termios, cur_termios;
  struct timeval select_tv;
  unsigned char data[256];
  unsigned char data_temp;
  int serial_fd;
  int count, i;
  int br;
  int baud;
  if ((br = int_to_baud(57600)) < 0) {
    printf("invalid baudrate %d\n", 57600);
    return (-1);
  }
  if ((serial_fd = open(out_file_name, O_RDWR)) == 0) {
    perror("could not open serial port");
    return (-1);
  }
  if (tcgetattr(serial_fd, &orig_termios)) {
    perror("getting modem serial device attr");
    return (-1);
  }
  cur_termios = orig_termios;
  cur_termios.c_iflag &=
      ~(IGNBRK | BRKINT | IGNPAR | PARMRK | INPCK | ISTRIP | INLCR | IGNCR |
        ICRNL | IXON | IXANY | IXOFF | IMAXBEL);
  cur_termios.c_iflag |= BRKINT;
  cur_termios.c_oflag &= ~(OPOST | ONLCR | OCRNL | ONOCR | ONLRET);
  cur_termios.c_cflag &=
      ~(CSIZE | CSTOPB | CREAD | PARENB | PARODD | HUPCL | CLOCAL | CRTSCTS);
  cur_termios.c_cflag |= CREAD | CS8 | CLOCAL;
  cur_termios.c_lflag &= ~(ISIG | ICANON | IEXTEN | ECHO | FLUSHO | PENDIN);
  cur_termios.c_lflag |= NOFLSH;
  if (cfsetispeed(&cur_termios, B0)) {
    perror("setting input modem serial device speed");
    return (-1);
  }
  if (cfsetospeed(&cur_termios, br)) {
    perror("setting modem serial device speed");
    return (-1);
  }
  if (tcsetattr(serial_fd, TCSADRAIN, &cur_termios)) {
    perror("setting modem serial device attr");
    return (-1);
  }
  {
    unsigned char data[] = {0x7E, 0x00, 0x11, 0x01, 0x37, 0xFF, 0xFF,
                            0x00, 0x00, 0x32, 0x2A, 0x01, 0x39, 0x30,
                            0x00, 0x00, 0x32, 0x09, 0x01, 0x00, 0xC7};
    unsigned char ac_id = 23;
    unsigned char tb_id = 1;
    unsigned int sync_itow;
    unsigned int cycle_time;
    unsigned char frame_id = 0;
    unsigned char checksum = 0;
    write(serial_fd, "+++", 3);
    usleep(1250000);
    write(serial_fd, "ATMY0101\r", 9);
    write(serial_fd, "ATAP1\r", 6);
    write(serial_fd, "ATCN\r", 5);
    while (1) {
      frame_id++;
      sync_itow = 12345678;
      cycle_time = 87654321;
      data[4] = frame_id;
      data[10] = ac_id;
      data[11] = tb_id;
      data[12] = sync_itow & 0xFF;
      data[13] = (sync_itow >> 8) & 0xFF;
      data[14] = (sync_itow >> 16) & 0xFF;
      data[15] = (sync_itow >> 24) & 0xFF;
      data[16] = cycle_time & 0xFF;
      data[17] = (cycle_time >> 8) & 0xFF;
      data[18] = (cycle_time >> 16) & 0xFF;
      data[19] = (cycle_time >> 24) & 0xFF;
      checksum = 0;
      for (i = 3; i < 20; i++)
        checksum += data[i];
      checksum = 0xFF - checksum;
      data[20] = checksum;
      write(serial_fd, data, 21);
      sleep(1);
    }
  }
  close(serial_fd);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xe23(%rip),%rsi
mov    $0x50,%edx
call   2060 <memcpy@plt>
mov    $0xe100,%edi
call   20c0 <int_to_baud@plt>
mov    %eax,-0x1a4(%rbp)
cmp    $0x0,%eax
jge    221d <main+0x5d>
lea    0xe5e(%rip),%rdi
mov    $0xe100,%esi
call   2050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    270d <main+0x54d>
lea    -0x60(%rbp),%rdi
mov    0x2da8(%rip),%rax
mov    (%rax),%esi
call   2090 <open@plt>
mov    %eax,-0x198(%rbp)
cmp    $0x0,%eax
jne    2256 <main+0x96>
lea    0xe35(%rip),%rdi
call   20b0 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    270d <main+0x54d>
mov    -0x198(%rbp),%edi
lea    -0x78(%rbp),%rsi
call   2070 <tcgetattr@plt>
cmp    $0x0,%rax
je     2287 <main+0xc7>
lea    0xe1f(%rip),%rdi
call   20b0 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    270d <main+0x54d>
mov    -0x78(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    0x2c6f(%rip),%rax
mov    (%rax),%eax
mov    0x2cc6(%rip),%rcx
or     (%rcx),%eax
mov    0x2c45(%rip),%rcx
or     (%rcx),%eax
mov    0x2d24(%rip),%rcx
or     (%rcx),%eax
mov    0x2c63(%rip),%rcx
or     (%rcx),%eax
mov    0x2c4a(%rip),%rcx
or     (%rcx),%eax
mov    0x2ce9(%rip),%rcx
or     (%rcx),%eax
mov    0x2cc8(%rip),%rcx
or     (%rcx),%eax
mov    0x2cdf(%rip),%rcx
or     (%rcx),%eax
mov    0x2ca6(%rip),%rcx
or     (%rcx),%eax
mov    0x2c35(%rip),%rcx
or     (%rcx),%eax
mov    0x2cb4(%rip),%rcx
or     (%rcx),%eax
mov    0x2bd3(%rip),%rcx
or     (%rcx),%eax
xor    $0xffffffff,%eax
and    -0x88(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    0x2c4b(%rip),%rax
mov    (%rax),%eax
or     -0x88(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    0x2c66(%rip),%rax
mov    (%rax),%eax
mov    0x2bc5(%rip),%rcx
or     (%rcx),%eax
mov    0x2ca4(%rip),%rcx
or     (%rcx),%eax
mov    0x2c5b(%rip),%rcx
or     (%rcx),%eax
mov    0x2b92(%rip),%rcx
or     (%rcx),%eax
xor    $0xffffffff,%eax
and    -0x84(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    0x2be2(%rip),%rax
mov    (%rax),%eax
mov    0x2b41(%rip),%rcx
or     (%rcx),%eax
mov    0x2be0(%rip),%rcx
or     (%rcx),%eax
mov    0x2bff(%rip),%rcx
or     (%rcx),%eax
mov    0x2be6(%rip),%rcx
or     (%rcx),%eax
mov    0x2b5d(%rip),%rcx
or     (%rcx),%eax
mov    0x2b0c(%rip),%rcx
or     (%rcx),%eax
mov    0x2b1b(%rip),%rcx
or     (%rcx),%eax
xor    $0xffffffff,%eax
and    -0x80(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    0x2ba1(%rip),%rax
mov    (%rax),%eax
mov    0x2b90(%rip),%rcx
or     (%rcx),%eax
mov    0x2adf(%rip),%rcx
or     (%rcx),%eax
or     -0x80(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    0x2b90(%rip),%rax
mov    (%rax),%eax
mov    0x2af7(%rip),%rcx
or     (%rcx),%eax
mov    0x2b4e(%rip),%rcx
or     (%rcx),%eax
mov    0x2b85(%rip),%rcx
or     (%rcx),%eax
mov    0x2bdc(%rip),%rcx
or     (%rcx),%eax
mov    0x2ab3(%rip),%rcx
or     (%rcx),%eax
xor    $0xffffffff,%eax
and    -0x7c(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    0x2b29(%rip),%rax
mov    (%rax),%eax
or     -0x7c(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    0x2b02(%rip),%rax
mov    (%rax),%esi
lea    -0x88(%rbp),%rdi
call   20a0 <cfsetispeed@plt>
cmp    $0x0,%rax
je     2466 <main+0x2a6>
lea    0xc61(%rip),%rdi
call   20b0 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    270d <main+0x54d>
mov    -0x1a4(%rbp),%esi
lea    -0x88(%rbp),%rdi
call   2040 <cfsetospeed@plt>
cmp    $0x0,%rax
je     249a <main+0x2da>
lea    0xc55(%rip),%rdi
call   20b0 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    270d <main+0x54d>
mov    -0x198(%rbp),%edi
mov    0x2a79(%rip),%rax
mov    (%rax),%esi
lea    -0x88(%rbp),%rdx
call   2080 <tcsetattr@plt>
cmp    $0x0,%rax
je     24d7 <main+0x317>
lea    0xc3a(%rip),%rdi
call   20b0 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    270d <main+0x54d>
mov    0xb72(%rip),%rax
mov    %rax,-0x1c0(%rbp)
mov    0xb6c(%rip),%rax
mov    %rax,-0x1b8(%rbp)
mov    0xb67(%rip),%eax
mov    %eax,-0x1b0(%rbp)
mov    0xb5f(%rip),%al
mov    %al,-0x1ac(%rbp)
movb   $0x17,-0x1c1(%rbp)
movb   $0x1,-0x1c2(%rbp)
movb   $0x0,-0x1cd(%rbp)
movb   $0x0,-0x1ce(%rbp)
mov    -0x198(%rbp),%edi
lea    0xbed(%rip),%rsi
mov    $0x3,%edx
mov    $0x0,%al
call   2030 <write@plt>
mov    $0x1312d0,%edi
call   20e0 <usleep@plt>
mov    -0x198(%rbp),%edi
lea    0xbce(%rip),%rsi
mov    $0x9,%edx
mov    $0x0,%al
call   2030 <write@plt>
mov    -0x198(%rbp),%edi
lea    0xbbf(%rip),%rsi
mov    $0x6,%edx
mov    $0x0,%al
call   2030 <write@plt>
mov    -0x198(%rbp),%edi
lea    0xbad(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   2030 <write@plt>
mov    -0x1cd(%rbp),%al
add    $0x1,%al
mov    %al,-0x1cd(%rbp)
movl   $0xbc614e,-0x1c8(%rbp)
movl   $0x5397fb1,-0x1cc(%rbp)
7f 39 05
mov    -0x1cd(%rbp),%al
mov    %al,-0x1bc(%rbp)
mov    -0x1c1(%rbp),%al
mov    %al,-0x1b6(%rbp)
mov    -0x1c2(%rbp),%al
mov    %al,-0x1b5(%rbp)
mov    -0x1c8(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x1b4(%rbp)
mov    -0x1c8(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x1b3(%rbp)
mov    -0x1c8(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,-0x1b2(%rbp)
mov    -0x1c8(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,-0x1b1(%rbp)
mov    -0x1cc(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x1b0(%rbp)
mov    -0x1cc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x1af(%rbp)
mov    -0x1cc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,-0x1ae(%rbp)
mov    -0x1cc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,-0x1ad(%rbp)
movb   $0x0,-0x1ce(%rbp)
movl   $0x3,-0x1a0(%rbp)
cmpl   $0x14,-0x1a0(%rbp)
jge    26c5 <main+0x505>
movslq -0x1a0(%rbp),%rax
movzbl -0x1c0(%rbp,%rax,1),%ecx
ff
movzbl -0x1ce(%rbp),%eax
add    %ecx,%eax
mov    %al,-0x1ce(%rbp)
mov    -0x1a0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a0(%rbp)
jmp    2686 <main+0x4c6>
movzbl -0x1ce(%rbp),%ecx
mov    $0xff,%eax
sub    %ecx,%eax
mov    %al,-0x1ce(%rbp)
mov    -0x1ce(%rbp),%al
mov    %al,-0x1ac(%rbp)
mov    -0x198(%rbp),%edi
lea    -0x1c0(%rbp),%rsi
mov    $0x15,%edx
mov    $0x0,%al
call   2030 <write@plt>
mov    $0x1,%edi
call   20d0 <sleep@plt>
jmp    2595 <main+0x3d5>
mov    -0x4(%rbp),%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x90,%rsp
movaps 0xe7a(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xe5b(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xe3f(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xe23(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe07(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
mov    $0xe100,%edi
call   20b0 <int_to_baud@plt>
test   %eax,%eax
js     24e7 <main+0x337>
mov    %eax,%r15d
mov    0x2db6(%rip),%rax
mov    (%rax),%esi
lea    0x40(%rsp),%rdi
call   2080 <open@plt>
test   %eax,%eax
je     24fa <main+0x34a>
mov    %eax,%r14d
lea    0x30(%rsp),%rsi
mov    %eax,%edi
call   2060 <tcgetattr@plt>
test   %rax,%rax
jne    2503 <main+0x353>
mov    0x2cc3(%rip),%rax
mov    0x2d1c(%rip),%rcx
mov    (%rcx),%ecx
mov    (%rax),%eax
or     %ecx,%eax
mov    0x2c97(%rip),%rdx
or     (%rdx),%eax
mov    0x2d76(%rip),%rdx
or     (%rdx),%eax
mov    0x2cb5(%rip),%rdx
or     (%rdx),%eax
mov    0x2c9c(%rip),%rdx
or     (%rdx),%eax
mov    0x2d3b(%rip),%rdx
or     (%rdx),%eax
mov    0x2d1a(%rip),%rdx
or     (%rdx),%eax
mov    0x2d31(%rip),%rdx
or     (%rdx),%eax
mov    0x2cf8(%rip),%rdx
or     (%rdx),%eax
mov    0x2c87(%rip),%rdx
or     (%rdx),%eax
movups 0x30(%rsp),%xmm0
mov    0x2d01(%rip),%rdx
or     (%rdx),%eax
movaps %xmm0,(%rsp)
mov    0x2c1c(%rip),%rdx
or     (%rdx),%eax
not    %eax
and    (%rsp),%eax
mov    0x2cce(%rip),%rdx
mov    0x2c2f(%rip),%rsi
mov    (%rsi),%esi
or     (%rdx),%esi
mov    0x2d0c(%rip),%rdx
or     (%rdx),%esi
or     %ecx,%eax
mov    0x2cc1(%rip),%rcx
or     (%rcx),%esi
mov    %eax,(%rsp)
mov    0x2bf5(%rip),%rax
or     (%rax),%esi
not    %esi
and    %esi,0x4(%rsp)
mov    0x2c4e(%rip),%rax
mov    0x2baf(%rip),%rcx
mov    0x2c50(%rip),%rdx
mov    0x2c71(%rip),%rsi
mov    0x2c5a(%rip),%rdi
mov    0x2bd3(%rip),%r8
mov    0x2b84(%rip),%rbp
mov    0x0(%rbp),%ebp
mov    0x2b92(%rip),%rbx
or     (%rdx),%ebp
mov    (%rax),%eax
or     %ebp,%eax
or     (%rcx),%eax
or     (%rsi),%eax
or     (%rdi),%eax
or     (%r8),%eax
or     (%rbx),%eax
not    %eax
and    0x8(%rsp),%eax
mov    0x2c04(%rip),%rcx
or     %ebp,%eax
or     (%rcx),%eax
mov    0x2c11(%rip),%rcx
mov    0x2b7a(%rip),%rdx
mov    (%rdx),%edx
or     (%rcx),%edx
mov    0x2bcf(%rip),%rcx
or     (%rcx),%edx
mov    0x2c06(%rip),%rcx
or     (%rcx),%edx
mov    0x2c5d(%rip),%rcx
or     (%rcx),%edx
mov    0x2b34(%rip),%rcx
or     (%rcx),%edx
mov    %eax,0x8(%rsp)
not    %edx
and    0xc(%rsp),%edx
mov    0x2ba9(%rip),%rax
or     (%rax),%edx
mov    %edx,0xc(%rsp)
mov    0x2b84(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdi
call   2090 <cfsetispeed@plt>
test   %rax,%rax
jne    250c <main+0x35c>
mov    %rsp,%rdi
mov    %r15d,%esi
call   2040 <cfsetospeed@plt>
test   %rax,%rax
jne    2515 <main+0x365>
mov    0x2b3e(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
mov    %r14d,%edi
call   2070 <tcsetattr@plt>
test   %rax,%rax
jne    251e <main+0x36e>
movaps 0xc51(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0xc700010932000030,%rax
mov    %rax,0x1d(%rsp)
lea    0xd07(%rip),%rsi
mov    %r14d,%edi
mov    $0x3,%edx
xor    %eax,%eax
call   2030 <write@plt>
mov    $0x1312d0,%edi
call   20d0 <usleep@plt>
lea    0xceb(%rip),%rsi
mov    %r14d,%edi
mov    $0x9,%edx
xor    %eax,%eax
call   2030 <write@plt>
lea    0xcdf(%rip),%rsi
mov    %r14d,%edi
mov    $0x6,%edx
xor    %eax,%eax
call   2030 <write@plt>
lea    0xcd0(%rip),%rsi
mov    %r14d,%edi
mov    $0x5,%edx
xor    %eax,%eax
call   2030 <write@plt>
mov    $0xd,%r15b
mov    $0x1,%bl
movabs $0x7fb100bc614e0117,%r12
lea    0x10(%rsp),%rbp
nopl   0x0(%rax)
mov    %bl,0x14(%rsp)
mov    %r12,0x1a(%rsp)
movw   $0x539,0x22(%rsp)
movzbl 0x13(%rsp),%eax
add    0x15(%rsp),%al
add    0x16(%rsp),%al
add    0x17(%rsp),%al
add    0x18(%rsp),%al
add    0x19(%rsp),%al
mov    %r15d,%ecx
sub    %al,%cl
mov    %cl,0x24(%rsp)
mov    %r14d,%edi
mov    %rbp,%rsi
mov    $0x15,%edx
xor    %eax,%eax
call   2030 <write@plt>
mov    $0x1,%edi
call   20c0 <sleep@plt>
add    $0xff,%r15b
add    $0x1,%bl
jmp    2490 <main+0x2e0>
lea    0xb77(%rip),%rdi
mov    $0xe100,%esi
call   2050 <printf@plt>
jmp    252a <main+0x37a>
lea    0xb79(%rip),%rdi
jmp    2525 <main+0x375>
lea    0xb8b(%rip),%rdi
jmp    2525 <main+0x375>
lea    0xba3(%rip),%rdi
jmp    2525 <main+0x375>
lea    0xbc2(%rip),%rdi
jmp    2525 <main+0x375>
lea    0xbdb(%rip),%rdi
call   20a0 <perror@plt>
mov    $0xffffffff,%eax
add    $0x90,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.termios = type { i32, i32, i32, i32 }
%struct.timeval = type { i32 }
@__const.main.out_file_name = [80 x i8] c"/dev/ttyUSB0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [21 x i8] c"invalid baudrate %d\0A\00"
@O_RDWR = global i32 0
@.str.1 = [27 x i8] c"could not open serial port\00"
@.str.2 = [33 x i8] c"getting modem serial device attr\00"
@IGNBRK = global i32 0
@BRKINT = global i32 0
@IGNPAR = global i32 0
@PARMRK = global i32 0
@INPCK = global i32 0
@ISTRIP = global i32 0
@INLCR = global i32 0
@IGNCR = global i32 0
@ICRNL = global i32 0
@IXON = global i32 0
@IXANY = global i32 0
@IXOFF = global i32 0
@IMAXBEL = global i32 0
@OPOST = global i32 0
@ONLCR = global i32 0
@OCRNL = global i32 0
@ONOCR = global i32 0
@ONLRET = global i32 0
@CSIZE = global i32 0
@CSTOPB = global i32 0
@CREAD = global i32 0
@PARENB = global i32 0
@PARODD = global i32 0
@HUPCL = global i32 0
@CLOCAL = global i32 0
@CRTSCTS = global i32 0
@CS8 = global i32 0
@ISIG = global i32 0
@ICANON = global i32 0
@IEXTEN = global i32 0
@ECHO = global i32 0
@FLUSHO = global i32 0
@PENDIN = global i32 0
@NOFLSH = global i32 0
@B0 = global i32 0
@.str.3 = [40 x i8] c"setting input modem serial device speed\00"
@.str.4 = [34 x i8] c"setting modem serial device speed\00"
@TCSADRAIN = global i32 0
@.str.5 = [33 x i8] c"setting modem serial device attr\00"
@__const.main.data = [21 x i8] c"~\00\11\017\FF\FF\00\002*\0190\00\002\09\01\00\C7"
@.str.6 = [4 x i8] c"+++\00"
@.str.7 = [10 x i8] c"ATMY0101\0D\00"
@.str.8 = [7 x i8] c"ATAP1\0D\00"
@.str.9 = [6 x i8] c"ATCN\0D\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.termios
%6 = alloca %struct.termios
%7 = alloca %struct.timeval
%8 = alloca [256 x i8]
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca [21 x i8]
%16 = alloca i8
%17 = alloca i8
%18 = alloca i32
%19 = alloca i32
%20 = alloca i8
%21 = alloca i8
store i32 0, i32* %1
%22 = bitcast [80 x i8]* %2 to i8*
%23 = call i32 @int_to_baud(i32 57600)
store i32 %23, i32* %13
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %0
%26 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 57600)
store i32 -1, i32* %1
br label %238
27: ; preds = %0
%28 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%29 = load i32, i32* @O_RDWR
%30 = call i32 @open(i8* %28, i32 %29)
store i32 %30, i32* %10
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %27
%33 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %238
34: ; preds = %27
%35 = load i32, i32* %10
%36 = call i64 @tcgetattr(i32 %35, %struct.termios* %5)
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %34
%39 = call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %1
br label %238
40: ; preds = %34
%41 = bitcast %struct.termios* %6 to i8*
%42 = bitcast %struct.termios* %5 to i8*
%43 = load i32, i32* @IGNBRK
%44 = load i32, i32* @BRKINT
%45 = or i32 %43, %44
%46 = load i32, i32* @IGNPAR
%47 = or i32 %45, %46
%48 = load i32, i32* @PARMRK
%49 = or i32 %47, %48
%50 = load i32, i32* @INPCK
%51 = or i32 %49, %50
%52 = load i32, i32* @ISTRIP
%53 = or i32 %51, %52
%54 = load i32, i32* @INLCR
%55 = or i32 %53, %54
%56 = load i32, i32* @IGNCR
%57 = or i32 %55, %56
%58 = load i32, i32* @ICRNL
%59 = or i32 %57, %58
%60 = load i32, i32* @IXON
%61 = or i32 %59, %60
%62 = load i32, i32* @IXANY
%63 = or i32 %61, %62
%64 = load i32, i32* @IXOFF
%65 = or i32 %63, %64
%66 = load i32, i32* @IMAXBEL
%67 = or i32 %65, %66
%68 = xor i32 %67, -1
%69 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 0
%70 = load i32, i32* %69
%71 = and i32 %70, %68
store i32 %71, i32* %69
%72 = load i32, i32* @BRKINT
%73 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 0
%74 = load i32, i32* %73
%75 = or i32 %74, %72
store i32 %75, i32* %73
%76 = load i32, i32* @OPOST
%77 = load i32, i32* @ONLCR
%78 = or i32 %76, %77
%79 = load i32, i32* @OCRNL
%80 = or i32 %78, %79
%81 = load i32, i32* @ONOCR
%82 = or i32 %80, %81
%83 = load i32, i32* @ONLRET
%84 = or i32 %82, %83
%85 = xor i32 %84, -1
%86 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
%87 = load i32, i32* %86
%88 = and i32 %87, %85
store i32 %88, i32* %86
%89 = load i32, i32* @CSIZE
%90 = load i32, i32* @CSTOPB
%91 = or i32 %89, %90
%92 = load i32, i32* @CREAD
%93 = or i32 %91, %92
%94 = load i32, i32* @PARENB
%95 = or i32 %93, %94
%96 = load i32, i32* @PARODD
%97 = or i32 %95, %96
%98 = load i32, i32* @HUPCL
%99 = or i32 %97, %98
%100 = load i32, i32* @CLOCAL
%101 = or i32 %99, %100
%102 = load i32, i32* @CRTSCTS
%103 = or i32 %101, %102
%104 = xor i32 %103, -1
%105 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 2
%106 = load i32, i32* %105
%107 = and i32 %106, %104
store i32 %107, i32* %105
%108 = load i32, i32* @CREAD
%109 = load i32, i32* @CS8
%110 = or i32 %108, %109
%111 = load i32, i32* @CLOCAL
%112 = or i32 %110, %111
%113 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 2
%114 = load i32, i32* %113
%115 = or i32 %114, %112
store i32 %115, i32* %113
%116 = load i32, i32* @ISIG
%117 = load i32, i32* @ICANON
%118 = or i32 %116, %117
%119 = load i32, i32* @IEXTEN
%120 = or i32 %118, %119
%121 = load i32, i32* @ECHO
%122 = or i32 %120, %121
%123 = load i32, i32* @FLUSHO
%124 = or i32 %122, %123
%125 = load i32, i32* @PENDIN
%126 = or i32 %124, %125
%127 = xor i32 %126, -1
%128 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 3
%129 = load i32, i32* %128
%130 = and i32 %129, %127
store i32 %130, i32* %128
%131 = load i32, i32* @NOFLSH
%132 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 3
%133 = load i32, i32* %132
%134 = or i32 %133, %131
store i32 %134, i32* %132
%135 = load i32, i32* @B0
%136 = call i64 @cfsetispeed(%struct.termios* %6, i32 %135)
%137 = icmp ne i64 %136, 0
br i1 %137, label %138, label %140
138: ; preds = %40
%139 = call i32 @perror(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
store i32 -1, i32* %1
br label %238
140: ; preds = %40
%141 = load i32, i32* %13
%142 = call i64 @cfsetospeed(%struct.termios* %6, i32 %141)
%143 = icmp ne i64 %142, 0
br i1 %143, label %144, label %146
144: ; preds = %140
%145 = call i32 @perror(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
store i32 -1, i32* %1
br label %238
146: ; preds = %140
%147 = load i32, i32* %10
%148 = load i32, i32* @TCSADRAIN
%149 = call i64 @tcsetattr(i32 %147, i32 %148, %struct.termios* %6)
%150 = icmp ne i64 %149, 0
br i1 %150, label %151, label %153
151: ; preds = %146
%152 = call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
store i32 -1, i32* %1
br label %238
153: ; preds = %146
%154 = bitcast [21 x i8]* %15 to i8*
store i8 23, i8* %16
store i8 1, i8* %17
store i8 0, i8* %20
store i8 0, i8* %21
%155 = load i32, i32* %10
%156 = call i32 (i32, ...) @write(i32 %155, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%157 = call i32 @usleep(i32 1250000)
%158 = load i32, i32* %10
%159 = call i32 (i32, ...) @write(i32 %158, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 9)
%160 = load i32, i32* %10
%161 = call i32 (i32, ...) @write(i32 %160, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 6)
%162 = load i32, i32* %10
%163 = call i32 (i32, ...) @write(i32 %162, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 5)
br label %164
164: ; preds = %153, %227
%165 = load i8, i8* %20
%166 = add i8 %165, 1
store i8 %166, i8* %20
store i32 12345678, i32* %18
store i32 87654321, i32* %19
%167 = load i8, i8* %20
%168 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 4
store i8 %167, i8* %168
%169 = load i8, i8* %16
%170 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 10
store i8 %169, i8* %170
%171 = load i8, i8* %17
%172 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 11
store i8 %171, i8* %172
%173 = load i32, i32* %18
%174 = and i32 %173, 255
%175 = trunc i32 %174 to i8
%176 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 12
store i8 %175, i8* %176
%177 = load i32, i32* %18
%178 = lshr i32 %177, 8
%179 = and i32 %178, 255
%180 = trunc i32 %179 to i8
%181 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 13
store i8 %180, i8* %181
%182 = load i32, i32* %18
%183 = lshr i32 %182, 16
%184 = and i32 %183, 255
%185 = trunc i32 %184 to i8
%186 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 14
store i8 %185, i8* %186
%187 = load i32, i32* %18
%188 = lshr i32 %187, 24
%189 = and i32 %188, 255
%190 = trunc i32 %189 to i8
%191 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 15
store i8 %190, i8* %191
%192 = load i32, i32* %19
%193 = and i32 %192, 255
%194 = trunc i32 %193 to i8
%195 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 16
store i8 %194, i8* %195
%196 = load i32, i32* %19
%197 = lshr i32 %196, 8
%198 = and i32 %197, 255
%199 = trunc i32 %198 to i8
%200 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 17
store i8 %199, i8* %200
%201 = load i32, i32* %19
%202 = lshr i32 %201, 16
%203 = and i32 %202, 255
%204 = trunc i32 %203 to i8
%205 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 18
store i8 %204, i8* %205
%206 = load i32, i32* %19
%207 = lshr i32 %206, 24
%208 = and i32 %207, 255
%209 = trunc i32 %208 to i8
%210 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 19
store i8 %209, i8* %210
store i8 0, i8* %21
store i32 3, i32* %12
br label %211
211: ; preds = %224, %164
%212 = load i32, i32* %12
%213 = icmp slt i32 %212, 20
br i1 %213, label %214, label %227
214: ; preds = %211
%215 = load i32, i32* %12
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 %216
%218 = load i8, i8* %217
%219 = zext i8 %218 to i32
%220 = load i8, i8* %21
%221 = zext i8 %220 to i32
%222 = add nsw i32 %221, %219
%223 = trunc i32 %222 to i8
store i8 %223, i8* %21
br label %224
224: ; preds = %214
%225 = load i32, i32* %12
%226 = add nsw i32 %225, 1
store i32 %226, i32* %12
br label %211
227: ; preds = %211
%228 = load i8, i8* %21
%229 = zext i8 %228 to i32
%230 = sub nsw i32 255, %229
%231 = trunc i32 %230 to i8
store i8 %231, i8* %21
%232 = load i8, i8* %21
%233 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 20
store i8 %232, i8* %233
%234 = load i32, i32* %10
%235 = getelementptr inbounds [21 x i8], [21 x i8]* %15, i64 0, i64 0
%236 = call i32 (i32, ...) @write(i32 %234, i8* %235, i32 21)
%237 = call i32 @sleep(i32 1)
br label %164
238: ; preds = %151, %144, %138, %38, %32, %25
%239 = load i32, i32* %1
ret i32 %239
}

LLVM IR (-O2):
%struct.termios = type { i32, i32, i32, i32 }
@__const.main.out_file_name = [80 x i8] c"/dev/ttyUSB0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [21 x i8] c"invalid baudrate %d\0A\00"
@O_RDWR = global i32 0
@.str.1 = [27 x i8] c"could not open serial port\00"
@.str.2 = [33 x i8] c"getting modem serial device attr\00"
@IGNBRK = global i32 0
@BRKINT = global i32 0
@IGNPAR = global i32 0
@PARMRK = global i32 0
@INPCK = global i32 0
@ISTRIP = global i32 0
@INLCR = global i32 0
@IGNCR = global i32 0
@ICRNL = global i32 0
@IXON = global i32 0
@IXANY = global i32 0
@IXOFF = global i32 0
@IMAXBEL = global i32 0
@OPOST = global i32 0
@ONLCR = global i32 0
@OCRNL = global i32 0
@ONOCR = global i32 0
@ONLRET = global i32 0
@CSIZE = global i32 0
@CSTOPB = global i32 0
@CREAD = global i32 0
@PARENB = global i32 0
@PARODD = global i32 0
@HUPCL = global i32 0
@CLOCAL = global i32 0
@CRTSCTS = global i32 0
@CS8 = global i32 0
@ISIG = global i32 0
@ICANON = global i32 0
@IEXTEN = global i32 0
@ECHO = global i32 0
@FLUSHO = global i32 0
@PENDIN = global i32 0
@NOFLSH = global i32 0
@B0 = global i32 0
@.str.3 = [40 x i8] c"setting input modem serial device speed\00"
@.str.4 = [34 x i8] c"setting modem serial device speed\00"
@TCSADRAIN = global i32 0
@.str.5 = [33 x i8] c"setting modem serial device attr\00"
@__const.main.data = [21 x i8] c"~\00\11\017\FF\FF\00\002*\0190\00\002\09\01\00\C7"
@.str.6 = [4 x i8] c"+++\00"
@.str.7 = [10 x i8] c"ATMY0101\0D\00"
@.str.8 = [7 x i8] c"ATAP1\0D\00"
@.str.9 = [6 x i8] c"ATCN\0D\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca %struct.termios
%3 = alloca %struct.termios
%4 = alloca [21 x i8]
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%6 = bitcast %struct.termios* %2 to i8*
%7 = bitcast %struct.termios* %3 to i8*
%8 = tail call i32 @int_to_baud(i32 57600)
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 57600)
br label %165
12: ; preds = %0
%13 = load i32, i32* @O_RDWR
%14 = call i32 @open(i8* %5, i32 %13)
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = tail call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %165
18: ; preds = %12
%19 = call i64 @tcgetattr(i32 %14, %struct.termios* %2)
%20 = icmp eq i64 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %18
%22 = call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %165
23: ; preds = %18
%24 = load i32, i32* @IGNBRK
%25 = load i32, i32* @BRKINT
%26 = or i32 %25, %24
%27 = load i32, i32* @IGNPAR
%28 = or i32 %26, %27
%29 = load i32, i32* @PARMRK
%30 = or i32 %28, %29
%31 = load i32, i32* @INPCK
%32 = or i32 %30, %31
%33 = load i32, i32* @ISTRIP
%34 = or i32 %32, %33
%35 = load i32, i32* @INLCR
%36 = or i32 %34, %35
%37 = load i32, i32* @IGNCR
%38 = or i32 %36, %37
%39 = load i32, i32* @ICRNL
%40 = or i32 %38, %39
%41 = load i32, i32* @IXON
%42 = or i32 %40, %41
%43 = load i32, i32* @IXANY
%44 = or i32 %42, %43
%45 = load i32, i32* @IXOFF
%46 = or i32 %44, %45
%47 = load i32, i32* @IMAXBEL
%48 = or i32 %46, %47
%49 = xor i32 %48, -1
%50 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 0
%51 = load i32, i32* %50
%52 = and i32 %51, %49
%53 = or i32 %52, %25
store i32 %53, i32* %50
%54 = load i32, i32* @OPOST
%55 = load i32, i32* @ONLCR
%56 = or i32 %55, %54
%57 = load i32, i32* @OCRNL
%58 = or i32 %56, %57
%59 = load i32, i32* @ONOCR
%60 = or i32 %58, %59
%61 = load i32, i32* @ONLRET
%62 = or i32 %60, %61
%63 = xor i32 %62, -1
%64 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 1
%65 = load i32, i32* %64
%66 = and i32 %65, %63
store i32 %66, i32* %64
%67 = load i32, i32* @CSIZE
%68 = load i32, i32* @CSTOPB
%69 = load i32, i32* @CREAD
%70 = load i32, i32* @PARENB
%71 = load i32, i32* @PARODD
%72 = load i32, i32* @HUPCL
%73 = load i32, i32* @CLOCAL
%74 = load i32, i32* @CRTSCTS
%75 = or i32 %73, %69
%76 = or i32 %75, %67
%77 = or i32 %76, %68
%78 = or i32 %77, %70
%79 = or i32 %78, %71
%80 = or i32 %79, %72
%81 = or i32 %80, %74
%82 = xor i32 %81, -1
%83 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 2
%84 = load i32, i32* %83
%85 = and i32 %84, %82
%86 = load i32, i32* @CS8
%87 = or i32 %75, %85
%88 = or i32 %87, %86
store i32 %88, i32* %83
%89 = load i32, i32* @ISIG
%90 = load i32, i32* @ICANON
%91 = or i32 %90, %89
%92 = load i32, i32* @IEXTEN
%93 = or i32 %91, %92
%94 = load i32, i32* @ECHO
%95 = or i32 %93, %94
%96 = load i32, i32* @FLUSHO
%97 = or i32 %95, %96
%98 = load i32, i32* @PENDIN
%99 = or i32 %97, %98
%100 = xor i32 %99, -1
%101 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 3
%102 = load i32, i32* %101
%103 = and i32 %102, %100
%104 = load i32, i32* @NOFLSH
%105 = or i32 %104, %103
store i32 %105, i32* %101
%106 = load i32, i32* @B0
%107 = call i64 @cfsetispeed(%struct.termios* %3, i32 %106)
%108 = icmp eq i64 %107, 0
br i1 %108, label %111, label %109
109: ; preds = %23
%110 = call i32 @perror(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
br label %165
111: ; preds = %23
%112 = call i64 @cfsetospeed(%struct.termios* %3, i32 %8)
%113 = icmp eq i64 %112, 0
br i1 %113, label %116, label %114
114: ; preds = %111
%115 = call i32 @perror(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
br label %165
116: ; preds = %111
%117 = load i32, i32* @TCSADRAIN
%118 = call i64 @tcsetattr(i32 %14, i32 %117, %struct.termios* %3)
%119 = icmp eq i64 %118, 0
br i1 %119, label %122, label %120
120: ; preds = %116
%121 = call i32 @perror(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
br label %165
122: ; preds = %116
%123 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 0
%124 = call i32 (i32, ...) @write(i32 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%125 = call i32 @usleep(i32 1250000)
%126 = call i32 (i32, ...) @write(i32 %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 9)
%127 = call i32 (i32, ...) @write(i32 %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 6)
%128 = call i32 (i32, ...) @write(i32 %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 5)
%129 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 4
%130 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 10
%131 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 11
%132 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 12
%133 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 13
%134 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 14
%135 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 15
%136 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 16
%137 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 17
%138 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 18
%139 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 19
%140 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 20
%141 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 3
%142 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 5
%143 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 6
%144 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 7
%145 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 8
%146 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 9
br label %147
147: ; preds = %147, %122
%148 = phi i8 [ 0, %122 ], [ %149, %147 ]
%149 = add i8 %148, 1
store i8 %149, i8* %129
store i8 23, i8* %130
store i8 1, i8* %131
store i8 78, i8* %132
store i8 97, i8* %133
store i8 -68, i8* %134
store i8 0, i8* %135
store i8 -79, i8* %136
store i8 127, i8* %137
store i8 57, i8* %138
store i8 5, i8* %139
%150 = load i8, i8* %141
%151 = add i8 %149, %150
%152 = load i8, i8* %142
%153 = add i8 %152, %151
%154 = load i8, i8* %143
%155 = add i8 %154, %153
%156 = load i8, i8* %144
%157 = add i8 %156, %155
%158 = load i8, i8* %145
%159 = add i8 %158, %157
%160 = load i8, i8* %146
%161 = add i8 %160, %159
%162 = sub i8 14, %161
store i8 %162, i8* %140
%163 = call i32 (i32, ...) @write(i32 %14, i8* %123, i32 21)
%164 = call i32 @sleep(i32 1)
br label %147
165: ; preds = %120, %114, %109, %21, %16, %10
ret i32 -1
}