#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 */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ I2C_SLAVE;
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ exit(int);
scalar_t__ ioctl(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int read(int, unsigned char *, int);
int write(int, unsigned char *, int);
int main(int argc, char *argv[]) {
  int fd = 0;
  int ret = 0;
  unsigned char buf[8] = "";
  fd = open("/dev/i2c-3", O_RDWR);
  if (fd < 0) {
    printf("Error: Could not open /dev/i2c-3 interface\n");
    exit(1);
  } else {
    if (ioctl(fd, I2C_SLAVE, 0x68) < 0) {
      printf("Error: Could not i2c address\n");
      exit(1);
    } else {
      buf[0] = 0x08;
      buf[1] = 0x01;
      buf[2] = buf[1] + 0x01;
      buf[3] = buf[2] + 0x01;
      buf[4] = buf[3] + 0x01;
      buf[5] = buf[4] + 0x01;
      buf[6] = buf[5] + 0x01;
      buf[7] = buf[6] + 0x01;
      ret = write(fd, buf, sizeof(buf));
      if (ret < 0) {
        printf("Error: Write to i2c bus failed\n");
        exit(1);
      } else {
        printf("Step 1: Address pointer set to 0x08 and data written to RTC "
               "NVRAM. ");
        printf("(%x %x %x %x %x %x %x)\n", buf[1], buf[2], buf[3], buf[4],
               buf[5], buf[6], buf[7]);
      }
      memset(buf, 0, sizeof(buf));
      buf[0] = 0x08;
      ret = write(fd, buf, 1);
      if (ret < 0) {
        printf("Error: Write to i2c bus failed\n");
        exit(1);
      } else {
        printf("Step 2: Address pointer reset to 0x08\n");
      }
      memset(buf, 0, sizeof(buf));
      ret = read(fd, buf, sizeof(buf));
      if (ret < 0) {
        printf("Error: Read from i2c bus failed\n");
        exit(1);
      } else {
        printf("Step 3: Data read from RTC NVRAM. ");
        printf("(%x %x %x %x %x %x %x)\n", buf[0], buf[1], buf[2], buf[3],
               buf[4], buf[5], buf[6]);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
mov    0x2e3d(%rip),%rax
mov    (%rax),%esi
lea    0xe4c(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    11de <main+0x6e>
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x14(%rbp),%edi
mov    0x2df8(%rip),%rax
mov    (%rax),%esi
mov    $0x68,%edx
call   1060 <ioctl@plt>
cmp    $0x0,%rax
jge    1216 <main+0xa6>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
movb   $0x8,-0x20(%rbp)
movb   $0x1,-0x1f(%rbp)
movzbl -0x1f(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x1e(%rbp)
movzbl -0x1e(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x1d(%rbp)
movzbl -0x1d(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x1c(%rbp)
movzbl -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x1b(%rbp)
movzbl -0x1b(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x1a(%rbp)
movzbl -0x1a(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x19(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1290 <main+0x120>
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzbl -0x1f(%rbp),%esi
movzbl -0x1e(%rbp),%edx
movzbl -0x1d(%rbp),%ecx
movzbl -0x1c(%rbp),%r8d
movzbl -0x1b(%rbp),%r9d
movzbl -0x1a(%rbp),%r10d
movzbl -0x19(%rbp),%eax
lea    0xdf5(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
movb   $0x8,-0x20(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    131d <main+0x1ad>
lea    0xd49(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
mov    -0x14(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x8,%edx
call   1070 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1371 <main+0x201>
lea    0xd98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzbl -0x20(%rbp),%esi
movzbl -0x1f(%rbp),%edx
movzbl -0x1e(%rbp),%ecx
movzbl -0x1d(%rbp),%r8d
movzbl -0x1c(%rbp),%r9d
movzbl -0x1b(%rbp),%r10d
movzbl -0x1a(%rbp),%eax
lea    0xd14(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13b9 <main+0x249>
jmp    13be <main+0x24e>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movabs $0x706050403020108,%rax
05 06 07
mov    %rax,(%rsp)
mov    0x2e4f(%rip),%rax
mov    (%rax),%esi
lea    0xe5e(%rip),%rdi
call   1090 <open@plt>
test   %eax,%eax
js     12de <main+0x15e>
mov    %eax,%ebx
mov    0x2e28(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    $0x68,%edx
call   1070 <ioctl@plt>
test   %rax,%rax
js     12e7 <main+0x167>
mov    %rsp,%rsi
mov    %ebx,%edi
mov    $0x8,%edx
call   1040 <write@plt>
test   %eax,%eax
js     12d5 <main+0x155>
lea    0xe1e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe54(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
xor    %eax,%eax
push   $0x7
push   $0x6
call   1050 <printf@plt>
add    $0x10,%rsp
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1060 <memset@plt>
movb   $0x8,(%rsp)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
test   %eax,%eax
js     12d5 <main+0x155>
lea    0xe31(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1060 <memset@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x8,%edx
call   1080 <read@plt>
test   %eax,%eax
js     12f0 <main+0x170>
lea    0xddd(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl (%rsp),%esi
movzbl 0x1(%rsp),%edx
movzbl 0x2(%rsp),%ecx
movzbl 0x3(%rsp),%r8d
movzbl 0x4(%rsp),%r9d
movzbl 0x5(%rsp),%r10d
movzbl 0x6(%rsp),%ebx
lea    0xd92(%rip),%rdi
xor    %eax,%eax
push   %rbx
push   %r10
call   1050 <printf@plt>
add    $0x10,%rsp
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xdf4(%rip),%rdi
jmp    12f7 <main+0x177>
lea    0xe27(%rip),%rdi
jmp    12f7 <main+0x177>
lea    0xe01(%rip),%rdi
jmp    12f7 <main+0x177>
lea    0xdb9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"/dev/i2c-3\00"
@O_RDWR = global i32 0
@.str.1 = [44 x i8] c"Error: Could not open /dev/i2c-3 interface\0A\00"
@I2C_SLAVE = global i32 0
@.str.2 = [30 x i8] c"Error: Could not i2c address\0A\00"
@.str.3 = [32 x i8] c"Error: Write to i2c bus failed\0A\00"
@.str.4 = [68 x i8] c"Step 1: Address pointer set to 0x08 and data written to RTC NVRAM. \00"
@.str.5 = [24 x i8] c"(%x %x %x %x %x %x %x)\0A\00"
@.str.6 = [39 x i8] c"Step 2: Address pointer reset to 0x08\0A\00"
@.str.7 = [33 x i8] c"Error: Read from i2c bus failed\0A\00"
@.str.8 = [35 x i8] c"Step 3: Data read from RTC NVRAM. \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [8 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
%9 = bitcast [8 x i8]* %8 to i8*
%10 = load i32, i32* @O_RDWR
%11 = call i32 @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %10)
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %2
%18 = load i32, i32* %6
%19 = load i32, i32* @I2C_SLAVE
%20 = call i64 @ioctl(i32 %18, i32 %19, i32 104)
%21 = icmp slt i64 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %17
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 @exit(i32 1)
unreachable
25: ; preds = %17
%26 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
store i8 8, i8* %26
%27 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 1
store i8 1, i8* %27
%28 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 1
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = add nsw i32 %30, 1
%32 = trunc i32 %31 to i8
%33 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 2
store i8 %32, i8* %33
%34 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 2
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = add nsw i32 %36, 1
%38 = trunc i32 %37 to i8
%39 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 3
store i8 %38, i8* %39
%40 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 3
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = add nsw i32 %42, 1
%44 = trunc i32 %43 to i8
%45 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 4
store i8 %44, i8* %45
%46 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 4
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = add nsw i32 %48, 1
%50 = trunc i32 %49 to i8
%51 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 5
store i8 %50, i8* %51
%52 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 5
%53 = load i8, i8* %52
%54 = zext i8 %53 to i32
%55 = add nsw i32 %54, 1
%56 = trunc i32 %55 to i8
%57 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 6
store i8 %56, i8* %57
%58 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 6
%59 = load i8, i8* %58
%60 = zext i8 %59 to i32
%61 = add nsw i32 %60, 1
%62 = trunc i32 %61 to i8
%63 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 7
store i8 %62, i8* %63
%64 = load i32, i32* %6
%65 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%66 = call i32 @write(i32 %64, i8* %65, i32 8)
store i32 %66, i32* %7
%67 = load i32, i32* %7
%68 = icmp slt i32 %67, 0
br i1 %68, label %69, label %72
69: ; preds = %25
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%71 = call i32 @exit(i32 1)
unreachable
72: ; preds = %25
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0))
%74 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 1
%75 = load i8, i8* %74
%76 = zext i8 %75 to i32
%77 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 2
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 3
%81 = load i8, i8* %80
%82 = zext i8 %81 to i32
%83 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 4
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 5
%87 = load i8, i8* %86
%88 = zext i8 %87 to i32
%89 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 6
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 7
%93 = load i8, i8* %92
%94 = zext i8 %93 to i32
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %76, i32 %79, i32 %82, i32 %85, i32 %88, i32 %91, i32 %94)
br label %96
96: ; preds = %72
%97 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%98 = call i32 @memset(i8* %97, i32 0, i32 8)
%99 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
store i8 8, i8* %99
%100 = load i32, i32* %6
%101 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%102 = call i32 @write(i32 %100, i8* %101, i32 1)
store i32 %102, i32* %7
%103 = load i32, i32* %7
%104 = icmp slt i32 %103, 0
br i1 %104, label %105, label %108
105: ; preds = %96
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%107 = call i32 @exit(i32 1)
unreachable
108: ; preds = %96
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0))
br label %110
110: ; preds = %108
%111 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%112 = call i32 @memset(i8* %111, i32 0, i32 8)
%113 = load i32, i32* %6
%114 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%115 = call i32 @read(i32 %113, i8* %114, i32 8)
store i32 %115, i32* %7
%116 = load i32, i32* %7
%117 = icmp slt i32 %116, 0
br i1 %117, label %118, label %121
118: ; preds = %110
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%120 = call i32 @exit(i32 1)
unreachable
121: ; preds = %110
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0))
%123 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%124 = load i8, i8* %123
%125 = zext i8 %124 to i32
%126 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 1
%127 = load i8, i8* %126
%128 = zext i8 %127 to i32
%129 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 2
%130 = load i8, i8* %129
%131 = zext i8 %130 to i32
%132 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 3
%133 = load i8, i8* %132
%134 = zext i8 %133 to i32
%135 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 4
%136 = load i8, i8* %135
%137 = zext i8 %136 to i32
%138 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 5
%139 = load i8, i8* %138
%140 = zext i8 %139 to i32
%141 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 6
%142 = load i8, i8* %141
%143 = zext i8 %142 to i32
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %125, i32 %128, i32 %131, i32 %134, i32 %137, i32 %140, i32 %143)
br label %145
145: ; preds = %121
br label %146
146: ; preds = %145
br label %147
147: ; preds = %146
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"/dev/i2c-3\00"
@O_RDWR = global i32 0
@I2C_SLAVE = global i32 0
@.str.4 = [68 x i8] c"Step 1: Address pointer set to 0x08 and data written to RTC NVRAM. \00"
@.str.5 = [24 x i8] c"(%x %x %x %x %x %x %x)\0A\00"
@.str.8 = [35 x i8] c"Step 3: Data read from RTC NVRAM. \00"
@str = [38 x i8] c"Step 2: Address pointer reset to 0x08\00"
@str.9 = [32 x i8] c"Error: Read from i2c bus failed\00"
@str.11 = [31 x i8] c"Error: Write to i2c bus failed\00"
@str.12 = [29 x i8] c"Error: Could not i2c address\00"
@str.13 = [43 x i8] c"Error: Could not open /dev/i2c-3 interface\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to [8 x i8]*
%5 = bitcast i64* %3 to i8*
store i64 506097522914230536, i64* %3
%6 = load i32, i32* @O_RDWR
%7 = tail call i32 @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.13, i64 0, i64 0))
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i32, i32* @I2C_SLAVE
%14 = tail call i64 @ioctl(i32 %7, i32 %13, i32 104)
%15 = icmp slt i64 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.12, i64 0, i64 0))
%18 = tail call i32 @exit(i32 1)
unreachable
19: ; preds = %12
%20 = call i32 @write(i32 %7, i8* %5, i32 8)
%21 = icmp slt i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.11, i64 0, i64 0))
%24 = tail call i32 @exit(i32 1)
unreachable
25: ; preds = %19
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7)
%28 = call i32 @memset(i8* %5, i32 0, i32 8)
store i8 8, i8* %5
%29 = call i32 @write(i32 %7, i8* %5, i32 1)
%30 = icmp slt i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %25
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.11, i64 0, i64 0))
%33 = call i32 @exit(i32 1)
unreachable
34: ; preds = %25
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%36 = call i32 @memset(i8* %5, i32 0, i32 8)
%37 = call i32 @read(i32 %7, i8* %5, i32 8)
%38 = icmp slt i32 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %34
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.9, i64 0, i64 0))
%41 = call i32 @exit(i32 1)
unreachable
42: ; preds = %34
%43 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 6
%44 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 5
%45 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 4
%46 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 3
%47 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 2
%48 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 1
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0))
%50 = load i8, i8* %5
%51 = zext i8 %50 to i32
%52 = load i8, i8* %48
%53 = zext i8 %52 to i32
%54 = load i8, i8* %47
%55 = zext i8 %54 to i32
%56 = load i8, i8* %46
%57 = zext i8 %56 to i32
%58 = load i8, i8* %45
%59 = zext i8 %58 to i32
%60 = load i8, i8* %44
%61 = zext i8 %60 to i32
%62 = load i8, i8* %43
%63 = zext i8 %62 to i32
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %51, i32 %53, i32 %55, i32 %57, i32 %59, i32 %61, i32 %63)
ret i32 0
}