#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 sockaddr_un {
  int /*<<< orphan*/ sun_path;
  int /*<<< orphan*/ sun_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ addr;

/* Variables and functions */
int /*<<< orphan*/ AF_UNIX;
int /*<<< orphan*/ SOCK_STREAM;
int STDIN_FILENO;
int /*<<< orphan*/ close(int);
int connect(int, struct sockaddr *, int);
int /*<<< orphan*/ exit(int);
int floor(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ memset(struct sockaddr_un *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int read(int, ...);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strncpy(int /*<<< orphan*/, char *, int);
int write(int, char *, int);
int main(int argc, char *argv[]) {
  struct sockaddr_un addr;
  char buf[(8192)];
  int fd, rc;
  if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
    perror("socket error");
    exit(-1);
  }
  memset(&addr, 0, sizeof(addr));
  addr.sun_family = AF_UNIX;
  strncpy(addr.sun_path, ".mglDigIO", sizeof(addr.sun_path) - 1);
  if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
    perror("connect error");
    exit(-1);
  }
  if ((rc = read(STDIN_FILENO, buf, sizeof(buf))) > 0) {
    if (write(fd, buf, rc) != rc) {
      if (rc > 0)
        fprintf(stderr, "partial write");
      else {
        perror("write error");
        exit(-1);
      }
    }
  }
  unsigned char readbuf[(8192)];
  int numEvents, eventCount, numThisEvents, readCount;
  printf("Waiting for ack\n");
  readCount = read(fd, readbuf, (8192));
  numEvents = *(unsigned int *)(readbuf),
  printf("received: %i bytes numEvents: %i\n", readCount, numEvents);
  while (numEvents) {
    readCount = read(fd, readbuf, floor((8192) / 6) * 6);
    numThisEvents = readCount / 6;
    printf("received: %i bytes numThisEvents: %i of %i\n", readCount,
           numThisEvents, numEvents);
    numEvents = numEvents - numThisEvents;
    for (eventCount = 0; eventCount < numThisEvents; eventCount++) {
      printf("%i: Digin: %i line: %i time: %f (sizeof: %i)\n", eventCount + 1,
             (int)(readbuf[0 + 6 * eventCount]),
             (int)(readbuf[1 + 6 * eventCount]),
             *(float *)(readbuf + 2 + 6 * eventCount), (int)sizeof(float));
    }
  }
  write(fd, "close", 5);
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4050,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
mov    0x2de7(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10e0 <socket@plt>
mov    %eax,-0x2024(%rbp)
cmp    $0xffffffff,%eax
jne    1217 <main+0x57>
lea    0xdf8(%rip),%rdi
call   10a0 <perror@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1060 <memset@plt>
mov    0x2dba(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
lea    0xdd0(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
mov    -0x2024(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   10c0 <connect@plt>
cmp    $0xffffffff,%eax
jne    127a <main+0xba>
lea    0xdac(%rip),%rdi
call   10a0 <perror@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    0x2d47(%rip),%rax
mov    (%rax),%edi
lea    -0x2020(%rbp),%rsi
mov    $0x2000,%edx
mov    $0x0,%al
call   1080 <read@plt>
mov    %eax,-0x2028(%rbp)
cmp    $0x0,%eax
jle    1310 <main+0x150>
mov    -0x2024(%rbp),%edi
lea    -0x2020(%rbp),%rsi
mov    -0x2028(%rbp),%edx
call   1040 <write@plt>
cmp    -0x2028(%rbp),%eax
je     130b <main+0x14b>
cmpl   $0x0,-0x2028(%rbp)
jle    12f0 <main+0x130>
mov    0x2cfb(%rip),%rax
mov    (%rax),%edi
lea    0xd3f(%rip),%rsi
call   1090 <fprintf@plt>
jmp    1306 <main+0x146>
lea    0xd3c(%rip),%rdi
call   10a0 <perror@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
jmp    130b <main+0x14b>
jmp    1310 <main+0x150>
lea    0xd28(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x2024(%rbp),%edi
lea    -0x4030(%rbp),%rsi
mov    $0x2000,%edx
mov    $0x0,%al
call   1080 <read@plt>
mov    %eax,-0x4040(%rbp)
mov    -0x4030(%rbp),%eax
mov    %eax,-0x4034(%rbp)
mov    -0x4040(%rbp),%esi
mov    -0x4034(%rbp),%edx
lea    0xcf4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x4034(%rbp)
je     1487 <main+0x2c7>
mov    -0x2024(%rbp),%eax
mov    %eax,-0x404c(%rbp)
lea    -0x4030(%rbp),%rax
mov    %rax,-0x4048(%rbp)
mov    $0x555,%edi
call   10d0 <floor@plt>
mov    -0x404c(%rbp),%edi
mov    -0x4048(%rbp),%rsi
imul   $0x6,%eax,%edx
mov    $0x0,%al
call   1080 <read@plt>
mov    %eax,-0x4040(%rbp)
mov    -0x4040(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0x403c(%rbp)
mov    -0x4040(%rbp),%esi
mov    -0x403c(%rbp),%edx
mov    -0x4034(%rbp),%ecx
lea    0xc94(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4034(%rbp),%eax
sub    -0x403c(%rbp),%eax
mov    %eax,-0x4034(%rbp)
movl   $0x0,-0x4038(%rbp)
mov    -0x4038(%rbp),%eax
cmp    -0x403c(%rbp),%eax
jge    1482 <main+0x2c2>
mov    -0x4038(%rbp),%esi
add    $0x1,%esi
imul   $0x6,-0x4038(%rbp),%eax
add    $0x0,%eax
cltq
movzbl -0x4030(%rbp,%rax,1),%edx
ff
imul   $0x6,-0x4038(%rbp),%eax
add    $0x1,%eax
cltq
movzbl -0x4030(%rbp,%rax,1),%ecx
ff
imul   $0x6,-0x4038(%rbp),%eax
cltq
movss  -0x402e(%rbp,%rax,1),%xmm0
ff ff
cvtss2sd %xmm0,%xmm0
lea    0xc3d(%rip),%rdi
mov    $0x4,%r8d
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x4038(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4038(%rbp)
jmp    1401 <main+0x241>
jmp    1363 <main+0x1a3>
mov    -0x2024(%rbp),%edi
lea    0xc38(%rip),%rsi
mov    $0x5,%edx
call   1040 <write@plt>
mov    -0x2024(%rbp),%edi
call   1070 <close@plt>
xor    %eax,%eax
add    $0x4050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4018,%rsp
mov    0x2e00(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2dde(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
cmp    $0xffffffff,%eax
je     13c4 <main+0x1f4>
mov    %eax,%r12d
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1070 <memset@plt>
mov    0x0(%rbp),%eax
mov    %eax,0xc(%rsp)
mov    0x8(%rsp),%edi
lea    0xde0(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
mov    %r12d,%edi
mov    %rbx,%rsi
mov    $0x8,%edx
call   10d0 <connect@plt>
cmp    $0xffffffff,%eax
je     13cd <main+0x1fd>
mov    0x2d71(%rip),%rax
mov    (%rax),%edi
lea    0x2010(%rsp),%rsi
mov    $0x2000,%edx
xor    %eax,%eax
call   1090 <read@plt>
test   %eax,%eax
jle    129e <main+0xce>
mov    %eax,%ebx
lea    0x2010(%rsp),%rsi
mov    %r12d,%edi
mov    %eax,%edx
call   1050 <write@plt>
cmp    %ebx,%eax
je     129e <main+0xce>
mov    0x2d48(%rip),%rax
mov    (%rax),%edi
lea    0xd8c(%rip),%rsi
call   10a0 <fprintf@plt>
lea    0xe10(%rip),%rdi
call   1040 <puts@plt>
lea    0x10(%rsp),%rsi
mov    %r12d,%edi
mov    $0x2000,%edx
xor    %eax,%eax
call   1090 <read@plt>
mov    0x10(%rsp),%r13d
lea    0xd69(%rip),%rdi
mov    %eax,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   1060 <printf@plt>
test   %r13d,%r13d
je     1394 <main+0x1c4>
lea    0xd9b(%rip),%r15
jmp    12f9 <main+0x129>
nopl   0x0(%rax,%rax,1)
test   %r13d,%r13d
je     1394 <main+0x1c4>
mov    $0x555,%edi
call   10e0 <floor@plt>
add    %eax,%eax
lea    (%rax,%rax,2),%edx
mov    %r12d,%edi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1090 <read@plt>
movslq %eax,%r14
imul   $0x2aaaaaab,%r14,%rbp
mov    %rbp,%rax
shr    $0x3f,%rax
shr    $0x20,%rbp
add    %eax,%ebp
lea    0xd20(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
sub    %ebp,%r13d
cmp    $0x6,%r14d
jl     12f0 <main+0x120>
mov    %ebp,%r14d
lea    0x12(%rsp),%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
movzbl -0x2(%rbx),%edx
movzbl -0x1(%rbx),%ecx
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    %ebp,%esi
mov    $0x4,%r8d
mov    $0x1,%al
call   1060 <printf@plt>
add    $0x6,%rbx
cmp    %rbp,%r14
jne    1360 <main+0x190>
jmp    12f0 <main+0x120>
lea    0xd14(%rip),%rsi
mov    %r12d,%edi
mov    $0x5,%edx
call   1050 <write@plt>
mov    %r12d,%edi
call   1080 <close@plt>
xor    %eax,%eax
add    $0x4018,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc35(%rip),%rdi
jmp    13d4 <main+0x204>
lea    0xc43(%rip),%rdi
call   10b0 <perror@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_un = type { i32, i32 }
%struct.sockaddr = type { i32 }
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str = [13 x i8] c"socket error\00"
@.str.1 = [10 x i8] c".mglDigIO\00"
@.str.2 = [14 x i8] c"connect error\00"
@STDIN_FILENO = global i32 0
@stderr = global i32 0
@.str.3 = [14 x i8] c"partial write\00"
@.str.4 = [12 x i8] c"write error\00"
@.str.5 = [17 x i8] c"Waiting for ack\0A\00"
@.str.6 = [34 x i8] c"received: %i bytes numEvents: %i\0A\00"
@.str.7 = [44 x i8] c"received: %i bytes numThisEvents: %i of %i\0A\00"
@.str.8 = [46 x i8] c"%i: Digin: %i line: %i time: %f (sizeof: %i)\0A\00"
@.str.9 = [6 x i8] c"close\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.sockaddr_un
%7 = alloca [8192 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = alloca [8192 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* @AF_UNIX
%16 = load i32, i32* @SOCK_STREAM
%17 = call i32 @socket(i32 %15, i32 %16, i32 0)
store i32 %17, i32* %8
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @exit(i32 -1)
unreachable
22: ; preds = %2
%23 = call i32 @memset(%struct.sockaddr_un* %6, i32 0, i32 8)
%24 = load i32, i32* @AF_UNIX
%25 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %6, i32 0, i32 1
store i32 %24, i32* %25
%26 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %6, i32 0, i32 0
%27 = load i32, i32* %26
%28 = call i32 @strncpy(i32 %27, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 3)
%29 = load i32, i32* %8
%30 = bitcast %struct.sockaddr_un* %6 to %struct.sockaddr*
%31 = call i32 @connect(i32 %29, %struct.sockaddr* %30, i32 8)
%32 = icmp eq i32 %31, -1
br i1 %32, label %33, label %36
33: ; preds = %22
%34 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%35 = call i32 @exit(i32 -1)
unreachable
36: ; preds = %22
%37 = load i32, i32* @STDIN_FILENO
%38 = getelementptr inbounds [8192 x i8], [8192 x i8]* %7, i64 0, i64 0
%39 = call i32 (i32, ...) @read(i32 %37, i8* %38, i64 8192)
store i32 %39, i32* %9
%40 = icmp sgt i32 %39, 0
br i1 %40, label %41, label %59
41: ; preds = %36
%42 = load i32, i32* %8
%43 = getelementptr inbounds [8192 x i8], [8192 x i8]* %7, i64 0, i64 0
%44 = load i32, i32* %9
%45 = call i32 @write(i32 %42, i8* %43, i32 %44)
%46 = load i32, i32* %9
%47 = icmp ne i32 %45, %46
br i1 %47, label %48, label %58
48: ; preds = %41
%49 = load i32, i32* %9
%50 = icmp sgt i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %48
%52 = load i32, i32* @stderr
%53 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %57
54: ; preds = %48
%55 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%56 = call i32 @exit(i32 -1)
unreachable
57: ; preds = %51
br label %58
58: ; preds = %57, %41
br label %59
59: ; preds = %58, %36
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%61 = load i32, i32* %8
%62 = getelementptr inbounds [8192 x i8], [8192 x i8]* %10, i64 0, i64 0
%63 = call i32 (i32, ...) @read(i32 %61, i8* %62, i32 8192)
store i32 %63, i32* %14
%64 = getelementptr inbounds [8192 x i8], [8192 x i8]* %10, i64 0, i64 0
%65 = bitcast i8* %64 to i32*
%66 = load i32, i32* %65
store i32 %66, i32* %11
%67 = load i32, i32* %14
%68 = load i32, i32* %11
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %67, i32 %68)
br label %70
70: ; preds = %122, %59
%71 = load i32, i32* %11
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %123
73: ; preds = %70
%74 = load i32, i32* %8
%75 = getelementptr inbounds [8192 x i8], [8192 x i8]* %10, i64 0, i64 0
%76 = call i32 @floor(i32 1365)
%77 = mul nsw i32 %76, 6
%78 = call i32 (i32, ...) @read(i32 %74, i8* %75, i32 %77)
store i32 %78, i32* %14
%79 = load i32, i32* %14
%80 = sdiv i32 %79, 6
store i32 %80, i32* %13
%81 = load i32, i32* %14
%82 = load i32, i32* %13
%83 = load i32, i32* %11
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0), i32 %81, i32 %82, i32 %83)
%85 = load i32, i32* %11
%86 = load i32, i32* %13
%87 = sub nsw i32 %85, %86
store i32 %87, i32* %11
store i32 0, i32* %12
br label %88
88: ; preds = %119, %73
%89 = load i32, i32* %12
%90 = load i32, i32* %13
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %122
92: ; preds = %88
%93 = load i32, i32* %12
%94 = add nsw i32 %93, 1
%95 = load i32, i32* %12
%96 = mul nsw i32 6, %95
%97 = add nsw i32 0, %96
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [8192 x i8], [8192 x i8]* %10, i64 0, i64 %98
%100 = load i8, i8* %99
%101 = zext i8 %100 to i32
%102 = load i32, i32* %12
%103 = mul nsw i32 6, %102
%104 = add nsw i32 1, %103
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [8192 x i8], [8192 x i8]* %10, i64 0, i64 %105
%107 = load i8, i8* %106
%108 = zext i8 %107 to i32
%109 = getelementptr inbounds [8192 x i8], [8192 x i8]* %10, i64 0, i64 0
%110 = getelementptr inbounds i8, i8* %109, i64 2
%111 = load i32, i32* %12
%112 = mul nsw i32 6, %111
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i8, i8* %110, i64 %113
%115 = bitcast i8* %114 to float*
%116 = load float, float* %115
%117 = fpext float %116 to double
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.8, i64 0, i64 0), i32 %94, i32 %101, i32 %108, double %117, i32 4)
br label %119
119: ; preds = %92
%120 = load i32, i32* %12
%121 = add nsw i32 %120, 1
store i32 %121, i32* %12
br label %88
122: ; preds = %88
br label %70
123: ; preds = %70
%124 = load i32, i32* %8
%125 = call i32 @write(i32 %124, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 5)
%126 = load i32, i32* %8
%127 = call i32 @close(i32 %126)
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32, i32 }
%struct.sockaddr = type { i32 }
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str = [13 x i8] c"socket error\00"
@.str.1 = [10 x i8] c".mglDigIO\00"
@.str.2 = [14 x i8] c"connect error\00"
@STDIN_FILENO = global i32 0
@stderr = global i32 0
@.str.3 = [14 x i8] c"partial write\00"
@.str.6 = [34 x i8] c"received: %i bytes numEvents: %i\0A\00"
@.str.7 = [44 x i8] c"received: %i bytes numThisEvents: %i of %i\0A\00"
@.str.8 = [46 x i8] c"%i: Digin: %i line: %i time: %f (sizeof: %i)\0A\00"
@.str.9 = [6 x i8] c"close\00"
@str = [16 x i8] c"Waiting for ack\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.sockaddr_un
%4 = alloca [8192 x i8]
%5 = alloca [8192 x i8]
%6 = bitcast %struct.sockaddr_un* %3 to i8*
%7 = getelementptr inbounds [8192 x i8], [8192 x i8]* %4, i64 0, i64 0
%8 = load i32, i32* @AF_UNIX
%9 = load i32, i32* @SOCK_STREAM
%10 = tail call i32 @socket(i32 %8, i32 %9, i32 0)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%14 = tail call i32 @exit(i32 -1)
unreachable
15: ; preds = %2
%16 = call i32 @memset(%struct.sockaddr_un* %3, i32 0, i32 8)
%17 = load i32, i32* @AF_UNIX
%18 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %3, i64 0, i32 1
store i32 %17, i32* %18
%19 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %3, i64 0, i32 0
%20 = load i32, i32* %19
%21 = call i32 @strncpy(i32 %20, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 3)
%22 = bitcast %struct.sockaddr_un* %3 to %struct.sockaddr*
%23 = call i32 @connect(i32 %10, %struct.sockaddr* %22, i32 8)
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %28
25: ; preds = %15
%26 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 @exit(i32 -1)
unreachable
28: ; preds = %15
%29 = load i32, i32* @STDIN_FILENO
%30 = call i32 (i32, ...) @read(i32 %29, i8* %7, i64 8192)
%31 = icmp sgt i32 %30, 0
br i1 %31, label %32, label %38
32: ; preds = %28
%33 = call i32 @write(i32 %10, i8* %7, i32 %30)
%34 = icmp eq i32 %33, %30
br i1 %34, label %38, label %35
35: ; preds = %32
%36 = load i32, i32* @stderr
%37 = call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %38
38: ; preds = %32, %35, %28
%39 = getelementptr inbounds [8192 x i8], [8192 x i8]* %5, i64 0, i64 0
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%41 = call i32 (i32, ...) @read(i32 %10, i8* %39, i32 8192)
%42 = bitcast [8192 x i8]* %5 to i32*
%43 = load i32, i32* %42
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %41, i32 %43)
%45 = icmp eq i32 %43, 0
br i1 %45, label %79, label %46
46: ; preds = %38
%47 = getelementptr inbounds [8192 x i8], [8192 x i8]* %5, i64 0, i64 2
br label %50
48: ; preds = %61, %50
%49 = icmp eq i32 %57, 0
br i1 %49, label %79, label %50
50: ; preds = %46, %48
%51 = phi i32 [ %43, %46 ], [ %57, %48 ]
%52 = call i32 @floor(i32 1365)
%53 = mul nsw i32 %52, 6
%54 = call i32 (i32, ...) @read(i32 %10, i8* %39, i32 %53)
%55 = sdiv i32 %54, 6
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0), i32 %54, i32 %55, i32 %51)
%57 = sub nsw i32 %51, %55
%58 = icmp sgt i32 %54, 5
br i1 %58, label %59, label %48
59: ; preds = %50
%60 = zext i32 %55 to i64
br label %61
61: ; preds = %59, %61
%62 = phi i64 [ 0, %59 ], [ %63, %61 ]
%63 = add nuw nsw i64 %62, 1
%64 = mul nuw nsw i64 %62, 6
%65 = getelementptr inbounds [8192 x i8], [8192 x i8]* %5, i64 0, i64 %64
%66 = load i8, i8* %65
%67 = zext i8 %66 to i32
%68 = or i64 %64, 1
%69 = getelementptr inbounds [8192 x i8], [8192 x i8]* %5, i64 0, i64 %68
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = getelementptr inbounds i8, i8* %47, i64 %64
%73 = bitcast i8* %72 to float*
%74 = load float, float* %73
%75 = fpext float %74 to double
%76 = trunc i64 %63 to i32
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.8, i64 0, i64 0), i32 %76, i32 %67, i32 %71, double %75, i32 4)
%78 = icmp eq i64 %63, %60
br i1 %78, label %48, label %61
79: ; preds = %48, %38
%80 = call i32 @write(i32 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 5)
%81 = call i32 @close(i32 %10)
ret i32 0
}