#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 scalar_t__ pid_t;
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ STDOUT_FILENO;
int atoi(char *);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup2(int, int /*<<< orphan*/);
int /*<<< orphan*/ execlp(char *, char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
scalar_t__ fork();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ pipe(int *);
int /*<<< orphan*/ printf(char *, ...);
int read(int, ...);
int main(int argc, char *argv[]) {
  int inicio;
  int fin;
  int mitad;
  int numBytes;
  char buffer[80];
  char params[2];
  if (argc != 3) {
    printf("Modo de uso: %s <inicio> <fin>\n\n", argv[0]);
    exit(1);
  }
  inicio = atoi(argv[1]);
  fin = atoi(argv[2]);
  mitad = inicio + ((fin - inicio) / 2);
  int fd1[2];
  int fd2[2];
  pid_t PID;
  pipe(fd1);
  pipe(fd2);
  if ((PID = fork()) < 0) {
    perror("Error al hacer fork");
    exit(1);
  }
  if (PID == 0) {
    close(fd1[0]);
    params[0] = inicio;
    params[1] = mitad;
    printf("paso 1\n");
    dup2(fd1[1], STDOUT_FILENO);
    execlp("esclavo", "esclavo", params, NULL);
  } else {
    if ((PID = fork()) < 0) {
      perror("Error al hacer fork");
      exit(1);
    }
    if (PID == 0) {
      close(fd2[0]);
      params[0] = mitad + 1;
      params[1] = fin;
      printf("paso 2\n");
      dup2(fd2[1], STDOUT_FILENO);
      execlp("esclavo", "esclavo", params, NULL);
      exit(0);
    } else {
      close(fd1[1]);
      numBytes = read(fd1[0], buffer, sizeof(buffer));
      dup2(fd1[0], STDIN_FILENO);
      printf("paso 3\n");
      while ((numBytes = read(fd1[0], &buffer, 4)) > 0) {
        printf("Valor: %d", 1);
      }
    }
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11e2 <main+0x42>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x94(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
lea    -0x7c(%rbp),%rdi
call   1060 <pipe@plt>
lea    -0x84(%rbp),%rdi
call   1060 <pipe@plt>
mov    $0x0,%al
call   10c0 <fork@plt>
mov    %rax,-0x90(%rbp)
cmp    $0x0,%rax
jge    1269 <main+0xc9>
lea    0xdc7(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
cmpq   $0x0,-0x90(%rbp)
jne    12c6 <main+0x126>
mov    -0x7c(%rbp),%edi
call   1050 <close@plt>
mov    -0x14(%rbp),%eax
mov    %al,-0x72(%rbp)
mov    -0x1c(%rbp),%eax
mov    %al,-0x71(%rbp)
lea    0xda3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x78(%rbp),%edi
mov    0x2d4d(%rip),%rax
mov    (%rax),%esi
call   1030 <dup2@plt>
lea    -0x72(%rbp),%rdx
lea    0xd88(%rip),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rsi,%rdi
call   10b0 <execlp@plt>
jmp    13d7 <main+0x237>
mov    $0x0,%al
call   10c0 <fork@plt>
mov    %rax,-0x90(%rbp)
cmp    $0x0,%rax
jge    12f4 <main+0x154>
lea    0xd3c(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
cmpq   $0x0,-0x90(%rbp)
jne    1359 <main+0x1b9>
mov    -0x84(%rbp),%edi
call   1050 <close@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x72(%rbp)
mov    -0x18(%rbp),%eax
mov    %al,-0x71(%rbp)
lea    0xd22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x80(%rbp),%edi
mov    0x2cbc(%rip),%rax
mov    (%rax),%esi
call   1030 <dup2@plt>
lea    -0x72(%rbp),%rdx
lea    0xcf7(%rip),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rsi,%rdi
call   10b0 <execlp@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    -0x78(%rbp),%edi
call   1050 <close@plt>
mov    -0x7c(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    $0x50,%edx
mov    $0x0,%al
call   1070 <read@plt>
mov    %eax,-0x20(%rbp)
mov    -0x7c(%rbp),%edi
mov    0x2c57(%rip),%rax
mov    (%rax),%esi
call   1030 <dup2@plt>
lea    0xcbe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x7c(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1070 <read@plt>
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
jle    13cd <main+0x22d>
lea    0xc99(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1396 <main+0x1f6>
jmp    13d2 <main+0x232>
jmp    13d7 <main+0x237>
xor    %edi,%edi
call   10a0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x60,%rsp
mov    %rsi,%rbx
cmp    $0x3,%edi
jne    1218 <main+0x68>
mov    0x8(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r14d
sub    %ebp,%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
add    %ebp,%ebx
mov    %rsp,%rdi
call   1070 <pipe@plt>
lea    0x8(%rsp),%rdi
call   1070 <pipe@plt>
xor    %eax,%eax
call   10d0 <fork@plt>
test   %rax,%rax
jns    1233 <main+0x83>
lea    0xe18(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    (%rbx),%rsi
lea    0xdde(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
jne    1281 <main+0xd1>
mov    (%rsp),%edi
call   1060 <close@plt>
mov    %bpl,0x10(%rsp)
mov    %bl,0x11(%rsp)
lea    0xe08(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%edi
mov    0x2d93(%rip),%rax
mov    (%rax),%esi
call   1040 <dup2@plt>
lea    0xdca(%rip),%rdi
lea    0x10(%rsp),%rdx
mov    %rdi,%rsi
xor    %ecx,%ecx
call   10c0 <execlp@plt>
xor    %edi,%edi
call   10b0 <exit@plt>
xor    %eax,%eax
call   10d0 <fork@plt>
test   %rax,%rax
js     1202 <main+0x52>
jne    12ba <main+0x10a>
mov    0x8(%rsp),%edi
call   1060 <close@plt>
add    $0x1,%bl
mov    %bl,0x10(%rsp)
mov    %r14b,0x11(%rsp)
lea    0xd9f(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%edi
jmp    1256 <main+0xa6>
mov    0x4(%rsp),%edi
call   1060 <close@plt>
mov    (%rsp),%edi
lea    0x10(%rsp),%rbx
mov    $0x50,%edx
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <read@plt>
mov    (%rsp),%edi
mov    0x2cf4(%rip),%rax
mov    (%rax),%esi
call   1040 <dup2@plt>
lea    0xd55(%rip),%rdi
call   1030 <puts@plt>
mov    (%rsp),%edi
mov    %rbx,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1080 <read@plt>
test   %eax,%eax
jle    1345 <main+0x195>
lea    0xd29(%rip),%rbx
lea    0x10(%rsp),%rbp
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%edi
mov    %rbp,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1080 <read@plt>
test   %eax,%eax
jg     1320 <main+0x170>
xor    %edi,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Modo de uso: %s <inicio> <fin>\0A\0A\00"
@.str.1 = [20 x i8] c"Error al hacer fork\00"
@.str.2 = [8 x i8] c"paso 1\0A\00"
@STDOUT_FILENO = global i32 0
@.str.3 = [8 x i8] c"esclavo\00"
@.str.4 = [8 x i8] c"paso 2\0A\00"
@STDIN_FILENO = global i32 0
@.str.5 = [8 x i8] c"paso 3\0A\00"
@.str.6 = [10 x i8] c"Valor: %d\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 [80 x i8]
%11 = alloca [2 x i8]
%12 = alloca [2 x i32]
%13 = alloca [2 x i32]
%14 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 3
br i1 %16, label %17, label %23
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = call i32 @exit(i32 1)
unreachable
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @atoi(i8* %26)
store i32 %27, i32* %6
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 2
%30 = load i8*, i8** %29
%31 = call i32 @atoi(i8* %30)
store i32 %31, i32* %7
%32 = load i32, i32* %6
%33 = load i32, i32* %7
%34 = load i32, i32* %6
%35 = sub nsw i32 %33, %34
%36 = sdiv i32 %35, 2
%37 = add nsw i32 %32, %36
store i32 %37, i32* %8
%38 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 0
%39 = call i32 @pipe(i32* %38)
%40 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 0
%41 = call i32 @pipe(i32* %40)
%42 = call i64 (...) @fork()
store i64 %42, i64* %14
%43 = icmp slt i64 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %23
%45 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%46 = call i32 @exit(i32 1)
unreachable
47: ; preds = %23
%48 = load i64, i64* %14
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %67
50: ; preds = %47
%51 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 0
%52 = load i32, i32* %51
%53 = call i32 @close(i32 %52)
%54 = load i32, i32* %6
%55 = trunc i32 %54 to i8
%56 = getelementptr inbounds [2 x i8], [2 x i8]* %11, i64 0, i64 0
store i8 %55, i8* %56
%57 = load i32, i32* %8
%58 = trunc i32 %57 to i8
%59 = getelementptr inbounds [2 x i8], [2 x i8]* %11, i64 0, i64 1
store i8 %58, i8* %59
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%61 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 1
%62 = load i32, i32* %61
%63 = load i32, i32* @STDOUT_FILENO
%64 = call i32 @dup2(i32 %62, i32 %63)
%65 = getelementptr inbounds [2 x i8], [2 x i8]* %11, i64 0, i64 0
%66 = call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %65, i32* null)
br label %117
67: ; preds = %47
%68 = call i64 (...) @fork()
store i64 %68, i64* %14
%69 = icmp slt i64 %68, 0
br i1 %69, label %70, label %73
70: ; preds = %67
%71 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%72 = call i32 @exit(i32 1)
unreachable
73: ; preds = %67
%74 = load i64, i64* %14
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %95
76: ; preds = %73
%77 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 0
%78 = load i32, i32* %77
%79 = call i32 @close(i32 %78)
%80 = load i32, i32* %8
%81 = add nsw i32 %80, 1
%82 = trunc i32 %81 to i8
%83 = getelementptr inbounds [2 x i8], [2 x i8]* %11, i64 0, i64 0
store i8 %82, i8* %83
%84 = load i32, i32* %7
%85 = trunc i32 %84 to i8
%86 = getelementptr inbounds [2 x i8], [2 x i8]* %11, i64 0, i64 1
store i8 %85, i8* %86
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%88 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 1
%89 = load i32, i32* %88
%90 = load i32, i32* @STDOUT_FILENO
%91 = call i32 @dup2(i32 %89, i32 %90)
%92 = getelementptr inbounds [2 x i8], [2 x i8]* %11, i64 0, i64 0
%93 = call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %92, i32* null)
%94 = call i32 @exit(i32 0)
unreachable
95: ; preds = %73
%96 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 1
%97 = load i32, i32* %96
%98 = call i32 @close(i32 %97)
%99 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 0
%100 = load i32, i32* %99
%101 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%102 = call i32 (i32, ...) @read(i32 %100, i8* %101, i64 80)
store i32 %102, i32* %9
%103 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 0
%104 = load i32, i32* %103
%105 = load i32, i32* @STDIN_FILENO
%106 = call i32 @dup2(i32 %104, i32 %105)
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %108
108: ; preds = %113, %95
%109 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 0
%110 = load i32, i32* %109
%111 = call i32 (i32, ...) @read(i32 %110, [80 x i8]* %10, i32 4)
store i32 %111, i32* %9
%112 = icmp sgt i32 %111, 0
br i1 %112, label %113, label %115
113: ; preds = %108
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 1)
br label %108
115: ; preds = %108
br label %116
116: ; preds = %115
br label %117
117: ; preds = %116, %50
%118 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [33 x i8] c"Modo de uso: %s <inicio> <fin>\0A\0A\00"
@.str.1 = [20 x i8] c"Error al hacer fork\00"
@STDOUT_FILENO = global i32 0
@.str.3 = [8 x i8] c"esclavo\00"
@STDIN_FILENO = global i32 0
@.str.6 = [10 x i8] c"Valor: %d\00"
@str = [7 x i8] c"paso 3\00"
@str.7 = [7 x i8] c"paso 2\00"
@str.8 = [7 x i8] c"paso 1\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [80 x i8]
%4 = alloca [2 x i8]
%5 = alloca [2 x i32]
%6 = alloca [2 x i32]
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%9 = icmp eq i32 %0, 3
br i1 %9, label %14, label %10
10: ; preds = %2
%11 = load i8*, i8** %1
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i32 @atoi(i8* %16)
%18 = getelementptr inbounds i8*, i8** %1, i64 2
%19 = load i8*, i8** %18
%20 = tail call i32 @atoi(i8* %19)
%21 = sub nsw i32 %20, %17
%22 = sdiv i32 %21, 2
%23 = add nsw i32 %22, %17
%24 = bitcast [2 x i32]* %5 to i8*
%25 = bitcast [2 x i32]* %6 to i8*
%26 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%27 = call i32 @pipe(i32* %26)
%28 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%29 = call i32 @pipe(i32* %28)
%30 = call i64 (...) @fork()
%31 = icmp slt i64 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %14
%33 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%34 = call i32 @exit(i32 1)
unreachable
35: ; preds = %14
%36 = icmp eq i64 %30, 0
br i1 %36, label %37, label %49
37: ; preds = %35
%38 = load i32, i32* %26
%39 = call i32 @close(i32 %38)
%40 = trunc i32 %17 to i8
store i8 %40, i8* %8
%41 = trunc i32 %23 to i8
%42 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
store i8 %41, i8* %42
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.8, i64 0, i64 0))
%44 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%45 = load i32, i32* %44
%46 = load i32, i32* @STDOUT_FILENO
%47 = call i32 @dup2(i32 %45, i32 %46)
%48 = call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %8, i32* null)
br label %89
49: ; preds = %35
%50 = call i64 (...) @fork()
%51 = icmp slt i64 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %49
%53 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%54 = call i32 @exit(i32 1)
unreachable
55: ; preds = %49
%56 = icmp eq i64 %50, 0
br i1 %56, label %57, label %71
57: ; preds = %55
%58 = load i32, i32* %28
%59 = call i32 @close(i32 %58)
%60 = trunc i32 %23 to i8
%61 = add i8 %60, 1
store i8 %61, i8* %8
%62 = trunc i32 %20 to i8
%63 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
store i8 %62, i8* %63
%64 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
%65 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%66 = load i32, i32* %65
%67 = load i32, i32* @STDOUT_FILENO
%68 = call i32 @dup2(i32 %66, i32 %67)
%69 = call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %8, i32* null)
%70 = call i32 @exit(i32 0)
unreachable
71: ; preds = %55
%72 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%73 = load i32, i32* %72
%74 = call i32 @close(i32 %73)
%75 = load i32, i32* %26
%76 = call i32 (i32, ...) @read(i32 %75, i8* %7, i64 80)
%77 = load i32, i32* %26
%78 = load i32, i32* @STDIN_FILENO
%79 = call i32 @dup2(i32 %77, i32 %78)
%80 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%81 = load i32, i32* %26
%82 = call i32 (i32, ...) @read(i32 %81, [80 x i8]* %3, i32 4)
%83 = icmp sgt i32 %82, 0
br i1 %83, label %84, label %89
84: ; preds = %71, %84
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 1)
%86 = load i32, i32* %26
%87 = call i32 (i32, ...) @read(i32 %86, [80 x i8]* %3, i32 4)
%88 = icmp sgt i32 %87, 0
br i1 %88, label %84, label %89
89: ; preds = %84, %71, %37
%90 = call i32 @exit(i32 0)
unreachable
}