#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 */
int /*<<< orphan*/ O_WRONLY;
int close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
unsigned short rand();
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ sleep(int);
int write(int, unsigned short *, int);
int main(int argc, char *argv[]) {
  int fd = 0;
  int chan = 0;
  int count = 0;
  int i, j;
  char scelta = 'n';
  unsigned short buff;
  unsigned short ciclo = 0;
  fd = open("/dev/mpv955", O_WRONLY);
  printf("il file descriptor e' %d\n", fd);
  do {
    printf("insert channel [0-7 ; 8=all_channel]: ");
    scanf("%d", &chan);
    getchar();
  } while ((chan < 0) || (chan > 8));
  do {
    printf("number of iteration: ");
    scanf("%d", &count);
    getchar();
  } while (count < 0);
  for (i = 0; i < count; i++) {
    if (chan == 8) {
      buff = rand();
      for (j = 0; j < 8; j++) {
        if (write(fd, &buff, j) <= -1) {
          printf("Errore nella scrittura\n");
        } else {
          printf("chan %d <- %X\n", chan, buff);
        }
      }
    } else {
      buff = rand();
      if (write(fd, &buff, chan) <= -1) {
        printf("Errore nella scrittura\n");
      } else {
        printf("chan %d <- %X\n", chan, buff);
      }
    }
    sleep(1);
  }
  printf("close() ha restituito %d\n", close(fd));
  exit(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)
movl   $0x0,-0x1c(%rbp)
movb   $0x6e,-0x25(%rbp)
movw   $0x0,-0x2a(%rbp)
mov    0x2e0c(%rip),%rax
mov    (%rax),%esi
lea    0xe2b(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe4a(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1070 <scanf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    $0x1,%al
cmpl   $0x0,-0x18(%rbp)
mov    %al,-0x2b(%rbp)
jl     122c <main+0x9c>
cmpl   $0x8,-0x18(%rbp)
setg   %al
mov    %al,-0x2b(%rbp)
mov    -0x2b(%rbp),%al
test   $0x1,%al
jne    11ee <main+0x5e>
jmp    123c <main+0xac>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdfc(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1070 <scanf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
cmpl   $0x0,-0x1c(%rbp)
jl     123c <main+0xac>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1364 <main+0x1d4>
cmpl   $0x8,-0x18(%rbp)
jne    12fc <main+0x16c>
mov    $0x0,%al
call   10b0 <rand@plt>
mov    %ax,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x8,-0x24(%rbp)
jge    12f7 <main+0x167>
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%edx
lea    -0x28(%rbp),%rsi
call   1030 <write@plt>
cmp    $0xffffffff,%eax
jg     12cf <main+0x13f>
lea    0xda3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12e4 <main+0x154>
mov    -0x18(%rbp),%esi
movzwl -0x28(%rbp),%edx
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12e9 <main+0x159>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    129a <main+0x10a>
jmp    134c <main+0x1bc>
mov    $0x0,%al
call   10b0 <rand@plt>
mov    %ax,-0x28(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%edx
lea    -0x28(%rbp),%rsi
call   1030 <write@plt>
cmp    $0xffffffff,%eax
jg     1332 <main+0x1a2>
lea    0xd40(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1347 <main+0x1b7>
mov    -0x18(%rbp),%esi
movzwl -0x28(%rbp),%edx
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    134c <main+0x1bc>
mov    $0x1,%edi
call   10a0 <sleep@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1272 <main+0xe2>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
mov    %eax,%esi
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x10(%rsp)
mov    0x2e13(%rip),%rax
mov    (%rax),%esi
lea    0xe32(%rip),%rdi
call   1090 <open@plt>
mov    %eax,%r13d
lea    0xe2f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe39(%rip),%r14
lea    0xe59(%rip),%rbx
lea    0xc(%rsp),%rbp
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <scanf@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
cmpl   $0x8,0xc(%rsp)
ja     1200 <main+0x60>
lea    0xe26(%rip),%r14
lea    0xe1c(%rip),%rbx
lea    0x10(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <scanf@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
cmpl   $0x0,0x10(%rsp)
js     1240 <main+0xa0>
jne    1284 <main+0xe4>
mov    %r13d,%edi
call   1060 <close@plt>
lea    0xe01(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
lea    0x16(%rsp),%r14
lea    0xdd6(%rip),%r12
xor    %r15d,%r15d
jmp    12c1 <main+0x121>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xde8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
add    $0x1,%r15d
cmp    0x10(%rsp),%r15d
jge    1265 <main+0xc5>
mov    0xc(%rsp),%ebp
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,%ebx
mov    %ax,0x16(%rsp)
cmp    $0x8,%ebp
jne    1300 <main+0x160>
movzwl %bx,%ebp
mov    %r13d,%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1040 <write@plt>
test   %eax,%eax
js     1322 <main+0x182>
mov    0xc(%rsp),%esi
mov    %r12,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    132e <main+0x18e>
xchg   %ax,%ax
mov    0xc(%rsp),%edx
mov    %r13d,%edi
mov    %r14,%rsi
call   1040 <write@plt>
test   %eax,%eax
js     12a0 <main+0x100>
mov    0xc(%rsp),%esi
movzwl %bx,%edx
mov    %r12,%rdi
jmp    147b <main+0x2db>
lea    0xd66(%rip),%rdi
call   1030 <puts@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1040 <write@plt>
test   %eax,%eax
js     1354 <main+0x1b4>
mov    0xc(%rsp),%esi
mov    %r12,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1360 <main+0x1c0>
lea    0xd34(%rip),%rdi
call   1030 <puts@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    $0x2,%edx
call   1040 <write@plt>
test   %eax,%eax
js     1386 <main+0x1e6>
mov    0xc(%rsp),%esi
mov    %r12,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1392 <main+0x1f2>
lea    0xd02(%rip),%rdi
call   1030 <puts@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    $0x3,%edx
call   1040 <write@plt>
test   %eax,%eax
js     13b8 <main+0x218>
mov    0xc(%rsp),%esi
mov    %r12,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13c4 <main+0x224>
lea    0xcd0(%rip),%rdi
call   1030 <puts@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <write@plt>
test   %eax,%eax
js     13ea <main+0x24a>
mov    0xc(%rsp),%esi
mov    %r12,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13f6 <main+0x256>
lea    0xc9e(%rip),%rdi
call   1030 <puts@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    $0x5,%edx
call   1040 <write@plt>
test   %eax,%eax
js     141c <main+0x27c>
mov    0xc(%rsp),%esi
mov    %r12,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1428 <main+0x288>
lea    0xc6c(%rip),%rdi
call   1030 <puts@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    $0x6,%edx
call   1040 <write@plt>
test   %eax,%eax
js     144e <main+0x2ae>
mov    0xc(%rsp),%esi
mov    %r12,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    145a <main+0x2ba>
lea    0xc3a(%rip),%rdi
call   1030 <puts@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    $0x7,%edx
call   1040 <write@plt>
test   %eax,%eax
js     12a0 <main+0x100>
mov    0xc(%rsp),%esi
mov    %r12,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12ac <main+0x10c>

LLVM IR (-O0):
@.str = [12 x i8] c"/dev/mpv955\00"
@O_WRONLY = global i32 0
@.str.1 = [26 x i8] c"il file descriptor e' %d\0A\00"
@.str.2 = [39 x i8] c"insert channel [0-7 ; 8=all_channel]: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [22 x i8] c"number of iteration: \00"
@.str.5 = [24 x i8] c"Errore nella scrittura\0A\00"
@.str.6 = [15 x i8] c"chan %d <- %X\0A\00"
@.str.7 = [26 x i8] c"close() ha restituito %d\0A\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 i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8
%12 = alloca i16
%13 = alloca i16
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
store i32 0, i32* %8
store i8 110, i8* %11
store i16 0, i16* %13
%14 = load i32, i32* @O_WRONLY
%15 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %14)
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %28, %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %7)
%21 = call i32 (...) @getchar()
br label %22
22: ; preds = %18
%23 = load i32, i32* %7
%24 = icmp slt i32 %23, 0
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = load i32, i32* %7
%27 = icmp sgt i32 %26, 8
br label %28
28: ; preds = %25, %22
%29 = phi i1 [ true, %22 ], [ %27, %25 ]
br i1 %29, label %18, label %30
30: ; preds = %28
br label %31
31: ; preds = %35, %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%34 = call i32 (...) @getchar()
br label %35
35: ; preds = %31
%36 = load i32, i32* %8
%37 = icmp slt i32 %36, 0
br i1 %37, label %31, label %38
38: ; preds = %35
store i32 0, i32* %9
br label %39
39: ; preds = %84, %38
%40 = load i32, i32* %9
%41 = load i32, i32* %8
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %87
43: ; preds = %39
%44 = load i32, i32* %7
%45 = icmp eq i32 %44, 8
br i1 %45, label %46, label %68
46: ; preds = %43
%47 = call zeroext i16 (...) @rand()
store i16 %47, i16* %12
store i32 0, i32* %10
br label %48
48: ; preds = %64, %46
%49 = load i32, i32* %10
%50 = icmp slt i32 %49, 8
br i1 %50, label %51, label %67
51: ; preds = %48
%52 = load i32, i32* %6
%53 = load i32, i32* %10
%54 = call i32 @write(i32 %52, i16* %12, i32 %53)
%55 = icmp sle i32 %54, -1
br i1 %55, label %56, label %58
56: ; preds = %51
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
br label %63
58: ; preds = %51
%59 = load i32, i32* %7
%60 = load i16, i16* %12
%61 = zext i16 %60 to i32
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %59, i32 %61)
br label %63
63: ; preds = %58, %56
br label %64
64: ; preds = %63
%65 = load i32, i32* %10
%66 = add nsw i32 %65, 1
store i32 %66, i32* %10
br label %48
67: ; preds = %48
br label %82
68: ; preds = %43
%69 = call zeroext i16 (...) @rand()
store i16 %69, i16* %12
%70 = load i32, i32* %6
%71 = load i32, i32* %7
%72 = call i32 @write(i32 %70, i16* %12, i32 %71)
%73 = icmp sle i32 %72, -1
br i1 %73, label %74, label %76
74: ; preds = %68
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
br label %81
76: ; preds = %68
%77 = load i32, i32* %7
%78 = load i16, i16* %12
%79 = zext i16 %78 to i32
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %77, i32 %79)
br label %81
81: ; preds = %76, %74
br label %82
82: ; preds = %81, %67
%83 = call i32 @sleep(i32 1)
br label %84
84: ; preds = %82
%85 = load i32, i32* %9
%86 = add nsw i32 %85, 1
store i32 %86, i32* %9
br label %39
87: ; preds = %39
%88 = load i32, i32* %6
%89 = call i32 @close(i32 %88)
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 %89)
%91 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/mpv955\00"
@O_WRONLY = global i32 0
@.str.1 = [26 x i8] c"il file descriptor e' %d\0A\00"
@.str.2 = [39 x i8] c"insert channel [0-7 ; 8=all_channel]: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [22 x i8] c"number of iteration: \00"
@.str.6 = [15 x i8] c"chan %d <- %X\0A\00"
@.str.7 = [26 x i8] c"close() ha restituito %d\0A\00"
@str.8 = [23 x i8] c"Errore nella scrittura\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i16
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%8 = bitcast i16* %5 to i8*
%9 = load i32, i32* @O_WRONLY
%10 = tail call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %12, %2
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%15 = call i32 (...) @getchar()
%16 = load i32, i32* %3
%17 = icmp ugt i32 %16, 8
br i1 %17, label %12, label %18
18: ; preds = %12, %18
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%21 = call i32 (...) @getchar()
%22 = load i32, i32* %4
%23 = icmp slt i32 %22, 0
br i1 %23, label %18, label %24
24: ; preds = %18
%25 = icmp eq i32 %22, 0
br i1 %25, label %111, label %26
26: ; preds = %24, %106
%27 = phi i32 [ %108, %106 ], [ 0, %24 ]
%28 = load i32, i32* %3
%29 = icmp eq i32 %28, 8
%30 = call zeroext i16 (...) @rand()
store i16 %30, i16* %5
br i1 %29, label %31, label %96
31: ; preds = %26
%32 = zext i16 %30 to i32
%33 = call i32 @write(i32 %10, i16* %5, i32 0)
%34 = icmp slt i32 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
br label %40
37: ; preds = %31
%38 = load i32, i32* %3
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %38, i32 %32)
br label %40
40: ; preds = %35, %37
%41 = call i32 @write(i32 %10, i16* %5, i32 1)
%42 = icmp slt i32 %41, 0
br i1 %42, label %46, label %43
43: ; preds = %40
%44 = load i32, i32* %3
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %44, i32 %32)
br label %48
46: ; preds = %40
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
br label %48
48: ; preds = %46, %43
%49 = call i32 @write(i32 %10, i16* %5, i32 2)
%50 = icmp slt i32 %49, 0
br i1 %50, label %54, label %51
51: ; preds = %48
%52 = load i32, i32* %3
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %52, i32 %32)
br label %56
54: ; preds = %48
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
br label %56
56: ; preds = %54, %51
%57 = call i32 @write(i32 %10, i16* %5, i32 3)
%58 = icmp slt i32 %57, 0
br i1 %58, label %62, label %59
59: ; preds = %56
%60 = load i32, i32* %3
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %60, i32 %32)
br label %64
62: ; preds = %56
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
br label %64
64: ; preds = %62, %59
%65 = call i32 @write(i32 %10, i16* %5, i32 4)
%66 = icmp slt i32 %65, 0
br i1 %66, label %70, label %67
67: ; preds = %64
%68 = load i32, i32* %3
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %68, i32 %32)
br label %72
70: ; preds = %64
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
br label %72
72: ; preds = %70, %67
%73 = call i32 @write(i32 %10, i16* %5, i32 5)
%74 = icmp slt i32 %73, 0
br i1 %74, label %78, label %75
75: ; preds = %72
%76 = load i32, i32* %3
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %76, i32 %32)
br label %80
78: ; preds = %72
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
br label %80
80: ; preds = %78, %75
%81 = call i32 @write(i32 %10, i16* %5, i32 6)
%82 = icmp slt i32 %81, 0
br i1 %82, label %86, label %83
83: ; preds = %80
%84 = load i32, i32* %3
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %84, i32 %32)
br label %88
86: ; preds = %80
%87 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
br label %88
88: ; preds = %86, %83
%89 = call i32 @write(i32 %10, i16* %5, i32 7)
%90 = icmp slt i32 %89, 0
br i1 %90, label %94, label %91
91: ; preds = %88
%92 = load i32, i32* %3
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %92, i32 %32)
br label %106
94: ; preds = %88
%95 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
br label %106
96: ; preds = %26
%97 = load i32, i32* %3
%98 = call i32 @write(i32 %10, i16* %5, i32 %97)
%99 = icmp slt i32 %98, 0
br i1 %99, label %100, label %102
100: ; preds = %96
%101 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
br label %106
102: ; preds = %96
%103 = load i32, i32* %3
%104 = zext i16 %30 to i32
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %103, i32 %104)
br label %106
106: ; preds = %91, %94, %100, %102
%107 = call i32 @sleep(i32 1)
%108 = add nuw nsw i32 %27, 1
%109 = load i32, i32* %4
%110 = icmp slt i32 %108, %109
br i1 %110, label %26, label %111
111: ; preds = %106, %24
%112 = call i32 @close(i32 %10)
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 %112)
%114 = call i32 @exit(i32 0)
unreachable
}