#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*/ FILE;

/* Variables and functions */
scalar_t__ EEXIST;
scalar_t__ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, float *, float *,
                          int *);
scalar_t__ mkfifo(char *, int);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ *popen(char *, char *);
int /*<<< orphan*/ printf(char *, int, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ unlink(char *);
int main(int argc, char *argv[]) {
  FILE *gp, *gpin;
  float mx = 0.0, my = 0.0;
  int mb = 0;
  int n;
  char buf[80];
  if (mkfifo("./gpio", 0600)) {
    if (errno != EEXIST) {
      perror("./gpio");
      unlink("./gpio");
      return 1;
    }
  }
  if (NULL == (gp = popen("gnuplot", "w"))) {
    perror("gnuplot");
    pclose(gp);
    return 1;
  }
  puts("Connected to gnuplot.\n");
  fprintf(gp, "set mouse; set print \"%s\"\n", "./gpio");
  fflush(gp);
  if (NULL == (gpin = fopen("./gpio", "r"))) {
    perror("./gpio");
    pclose(gp);
    return 1;
  }
  puts("FIFO open for reading.\n");
  fprintf(gp, "plot sin(x)\n");
  fflush(gp);
  for (n = 0; n < 5; n++) {
    printf("\n%i/5. -- Click anywhere in the graph by mouse button 1.\n",
           n + 1);
    fprintf(gp, "pause mouse 'Click mouse!'\n");
    fflush(gp);
    fprintf(stdout, "I'M HERE: %i\n", 87);
    fprintf(gp, "print MOUSE_X, MOUSE_Y, MOUSE_BUTTON\n");
    fflush(gp);
    fprintf(stdout, "I'M HERE: %i\n", 92);
    fscanf(gpin, "%f %f %d", &mx, &my, &mb);
    fprintf(stdout, "I'M HERE: %i\n", 95);
    printf("You pressed mouse button %d at x=%f y=%f\n", mb, mx, my);
  }
  fclose(gpin);
  pclose(gp);
  unlink("./gpio");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
lea    0xe09(%rip),%rdi
mov    $0x180,%esi
call   10a0 <mkfifo@plt>
cmp    $0x0,%rax
je     124e <main+0x8e>
mov    0x2dc6(%rip),%rax
mov    (%rax),%rax
mov    0x2dc4(%rip),%rcx
cmp    (%rcx),%rax
je     1249 <main+0x89>
lea    0xdd4(%rip),%rdi
call   10e0 <perror@plt>
lea    0xdc8(%rip),%rdi
call   1030 <unlink@plt>
movl   $0x1,-0x4(%rbp)
jmp    1458 <main+0x298>
jmp    124e <main+0x8e>
lea    0xdb2(%rip),%rdi
lea    0xdb3(%rip),%rsi
call   10c0 <popen@plt>
mov    %rax,%rcx
mov    %rcx,-0x18(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    1294 <main+0xd4>
lea    0xd8d(%rip),%rdi
call   10e0 <perror@plt>
mov    -0x18(%rbp),%rdi
call   1070 <pclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1458 <main+0x298>
lea    0xd76(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%rax
mov    %eax,%edi
lea    0xd7b(%rip),%rsi
lea    0xd4c(%rip),%rdx
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   10b0 <fflush@plt>
lea    0xd35(%rip),%rdi
lea    0xd71(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%rcx
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    130a <main+0x14a>
lea    0xd10(%rip),%rdi
call   10e0 <perror@plt>
mov    -0x18(%rbp),%rdi
call   1070 <pclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1458 <main+0x298>
lea    0xd34(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%rax
mov    %eax,%edi
lea    0xd3a(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   10b0 <fflush@plt>
movl   $0x0,-0x30(%rbp)
cmpl   $0x5,-0x30(%rbp)
jge    1433 <main+0x273>
mov    -0x30(%rbp),%esi
add    $0x1,%esi
lea    0xd19(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %eax,%edi
lea    0xd3f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   10b0 <fflush@plt>
mov    0x2c54(%rip),%rax
mov    (%rax),%edi
lea    0xd3b(%rip),%rsi
mov    $0x57,%edx
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x18(%rbp),%rax
mov    %eax,%edi
lea    0xd30(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   10b0 <fflush@plt>
mov    0x2c1b(%rip),%rax
mov    (%rax),%edi
lea    0xd02(%rip),%rsi
mov    $0x5c,%edx
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd1f(%rip),%rsi
lea    -0x24(%rbp),%rdx
lea    -0x28(%rbp),%rcx
lea    -0x2c(%rbp),%r8
call   1080 <fscanf@plt>
mov    0x2be3(%rip),%rax
mov    (%rax),%edi
lea    0xcca(%rip),%rsi
mov    $0x5f,%edx
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x2c(%rbp),%esi
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x28(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xcdf(%rip),%rdi
mov    $0x2,%al
call   1060 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    133a <main+0x17a>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1070 <pclose@plt>
lea    0xbb4(%rip),%rdi
call   1030 <unlink@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xe13(%rip),%rdi
mov    $0x180,%esi
call   10a0 <mkfifo@plt>
test   %rax,%rax
je     1216 <main+0x56>
mov    0x2dd5(%rip),%rax
mov    (%rax),%rax
mov    0x2dd3(%rip),%rcx
cmp    (%rcx),%rax
jne    13da <main+0x21a>
lea    0xdea(%rip),%rdi
lea    0xdeb(%rip),%rsi
call   10c0 <popen@plt>
test   %rax,%rax
je     13af <main+0x1ef>
mov    %rax,%rbx
lea    0xdd5(%rip),%rdi
call   1040 <puts@plt>
lea    0xde0(%rip),%rsi
lea    0xdb1(%rip),%rbp
mov    %ebx,%edi
mov    %rbp,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rdi
call   10b0 <fflush@plt>
lea    0xdd9(%rip),%rsi
mov    %rbp,%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
je     13bf <main+0x1ff>
mov    %rax,%r14
lea    0xdc0(%rip),%rdi
call   1040 <puts@plt>
lea    0xdcc(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rdi
call   10b0 <fflush@plt>
mov    $0x1,%ebp
mov    0x2d22(%rip),%r15
lea    0xe0b(%rip),%r13
lea    0xe41(%rip),%r12
nopl   0x0(%rax)
lea    0xda3(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,%edi
lea    0xdcb(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rdi
call   10b0 <fflush@plt>
mov    (%r15),%edi
mov    %r13,%rsi
mov    $0x57,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %ebx,%edi
lea    0xdcb(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %rbx,%rdi
call   10b0 <fflush@plt>
mov    (%r15),%edi
mov    %r13,%rsi
mov    $0x5c,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r14,%rdi
lea    0xdc6(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
call   1080 <fscanf@plt>
mov    (%r15),%edi
mov    %r13,%rsi
mov    $0x5f,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0xc(%rsp),%esi
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x10(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %r12,%rdi
mov    $0x2,%al
call   1060 <printf@plt>
add    $0x1,%ebp
cmp    $0x6,%ebp
jne    12c0 <main+0x100>
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
call   1070 <pclose@plt>
lea    0xc67(%rip),%rdi
call   1030 <unlink@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc51(%rip),%rdi
call   10e0 <perror@plt>
xor    %edi,%edi
jmp    13ce <main+0x20e>
lea    0xc3a(%rip),%rdi
call   10e0 <perror@plt>
mov    %rbx,%rdi
call   1070 <pclose@plt>
mov    $0x1,%eax
jmp    13a0 <main+0x1e0>
lea    0xc1f(%rip),%rbx
mov    %rbx,%rdi
call   10e0 <perror@plt>
mov    %rbx,%rdi
call   1030 <unlink@plt>
mov    $0x1,%eax
jmp    13a0 <main+0x1e0>

LLVM IR (-O0):
@.str = [7 x i8] c"./gpio\00"
@errno = global i64 0
@EEXIST = global i64 0
@.str.1 = [8 x i8] c"gnuplot\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [23 x i8] c"Connected to gnuplot.\0A\00"
@.str.4 = [27 x i8] c"set mouse; set print \22%s\22\0A\00"
@.str.5 = [2 x i8] c"r\00"
@.str.6 = [24 x i8] c"FIFO open for reading.\0A\00"
@.str.7 = [13 x i8] c"plot sin(x)\0A\00"
@.str.8 = [58 x i8] c"\0A%i/5. -- Click anywhere in the graph by mouse button 1.\0A\00"
@.str.9 = [28 x i8] c"pause mouse 'Click mouse!'\0A\00"
@stdout = global i32 0
@.str.10 = [14 x i8] c"I'M HERE: %i\0A\00"
@.str.11 = [38 x i8] c"print MOUSE_X, MOUSE_Y, MOUSE_BUTTON\0A\00"
@.str.12 = [9 x i8] c"%f %f %d\00"
@.str.13 = [42 x i8] c"You pressed mouse button %d at x=%f y=%f\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 float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca [80 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0.000000e+00, float* %8
store float 0.000000e+00, float* %9
store i32 0, i32* %10
%13 = call i64 @mkfifo(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 384)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %23
15: ; preds = %2
%16 = load i64, i64* @errno
%17 = load i64, i64* @EEXIST
%18 = icmp ne i64 %16, %17
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @unlink(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %90
22: ; preds = %15
br label %23
23: ; preds = %22, %2
%24 = call i32* @popen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %24, i32** %6
%25 = icmp eq i32* null, %24
br i1 %25, label %26, label %30
26: ; preds = %23
%27 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%28 = load i32*, i32** %6
%29 = call i32 @pclose(i32* %28)
store i32 1, i32* %3
br label %90
30: ; preds = %23
%31 = call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%32 = load i32*, i32** %6
%33 = ptrtoint i32* %32 to i32
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%35 = load i32*, i32** %6
%36 = call i32 @fflush(i32* %35)
%37 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %37, i32** %7
%38 = icmp eq i32* null, %37
br i1 %38, label %39, label %43
39: ; preds = %30
%40 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%41 = load i32*, i32** %6
%42 = call i32 @pclose(i32* %41)
store i32 1, i32* %3
br label %90
43: ; preds = %30
%44 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%45 = load i32*, i32** %6
%46 = ptrtoint i32* %45 to i32
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%48 = load i32*, i32** %6
%49 = call i32 @fflush(i32* %48)
store i32 0, i32* %11
br label %50
50: ; preds = %81, %43
%51 = load i32, i32* %11
%52 = icmp slt i32 %51, 5
br i1 %52, label %53, label %84
53: ; preds = %50
%54 = load i32, i32* %11
%55 = add nsw i32 %54, 1
%56 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0), i32 %55)
%57 = load i32*, i32** %6
%58 = ptrtoint i32* %57 to i32
%59 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
%60 = load i32*, i32** %6
%61 = call i32 @fflush(i32* %60)
%62 = load i32, i32* @stdout
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 87)
%64 = load i32*, i32** %6
%65 = ptrtoint i32* %64 to i32
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0))
%67 = load i32*, i32** %6
%68 = call i32 @fflush(i32* %67)
%69 = load i32, i32* @stdout
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 92)
%71 = load i32*, i32** %7
%72 = call i32 @fscanf(i32* %71, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), float* %8, float* %9, i32* %10)
%73 = load i32, i32* @stdout
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 95)
%75 = load i32, i32* %10
%76 = load float, float* %8
%77 = fpext float %76 to double
%78 = load float, float* %9
%79 = fpext float %78 to double
%80 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i64 0, i64 0), i32 %75, double %77, double %79)
br label %81
81: ; preds = %53
%82 = load i32, i32* %11
%83 = add nsw i32 %82, 1
store i32 %83, i32* %11
br label %50
84: ; preds = %50
%85 = load i32*, i32** %7
%86 = call i32 @fclose(i32* %85)
%87 = load i32*, i32** %6
%88 = call i32 @pclose(i32* %87)
%89 = call i32 @unlink(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %90
90: ; preds = %84, %39, %26, %19
%91 = load i32, i32* %3
ret i32 %91
}

LLVM IR (-O2):
@.str = [7 x i8] c"./gpio\00"
@errno = global i64 0
@EEXIST = global i64 0
@.str.1 = [8 x i8] c"gnuplot\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [23 x i8] c"Connected to gnuplot.\0A\00"
@.str.4 = [27 x i8] c"set mouse; set print \22%s\22\0A\00"
@.str.5 = [2 x i8] c"r\00"
@.str.6 = [24 x i8] c"FIFO open for reading.\0A\00"
@.str.7 = [13 x i8] c"plot sin(x)\0A\00"
@.str.8 = [58 x i8] c"\0A%i/5. -- Click anywhere in the graph by mouse button 1.\0A\00"
@.str.9 = [28 x i8] c"pause mouse 'Click mouse!'\0A\00"
@stdout = global i32 0
@.str.10 = [14 x i8] c"I'M HERE: %i\0A\00"
@.str.11 = [38 x i8] c"print MOUSE_X, MOUSE_Y, MOUSE_BUTTON\0A\00"
@.str.12 = [9 x i8] c"%f %f %d\00"
@.str.13 = [42 x i8] c"You pressed mouse button %d at x=%f y=%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%7 = bitcast float* %4 to i8*
store float 0.000000e+00, float* %4
%8 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%9 = tail call i64 @mkfifo(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 384)
%10 = icmp eq i64 %9, 0
br i1 %10, label %18, label %11
11: ; preds = %2
%12 = load i64, i64* @errno
%13 = load i64, i64* @EEXIST
%14 = icmp eq i64 %12, %13
br i1 %14, label %18, label %15
15: ; preds = %11
%16 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%17 = tail call i32 @unlink(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %65
18: ; preds = %11, %2
%19 = tail call i32* @popen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%23 = tail call i32 @pclose(i32* null)
br label %65
24: ; preds = %18
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%26 = ptrtoint i32* %19 to i64
%27 = trunc i64 %26 to i32
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%29 = tail call i32 @fflush(i32* %19)
%30 = tail call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %35
32: ; preds = %24
%33 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%34 = tail call i32 @pclose(i32* %19)
br label %65
35: ; preds = %24
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%37 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%38 = tail call i32 @fflush(i32* %19)
br label %39
39: ; preds = %35, %39
%40 = phi i32 [ 0, %35 ], [ %41, %39 ]
%41 = add nuw nsw i32 %40, 1
%42 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0), i32 %41)
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
%44 = call i32 @fflush(i32* %19)
%45 = load i32, i32* @stdout
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 87)
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0))
%48 = call i32 @fflush(i32* %19)
%49 = load i32, i32* @stdout
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 92)
%51 = call i32 @fscanf(i32* %30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), float* %3, float* %4, i32* %5)
%52 = load i32, i32* @stdout
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i32 95)
%54 = load i32, i32* %5
%55 = load float, float* %3
%56 = fpext float %55 to double
%57 = load float, float* %4
%58 = fpext float %57 to double
%59 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i64 0, i64 0), i32 %54, double %56, double %58)
%60 = icmp eq i32 %41, 5
br i1 %60, label %61, label %39
61: ; preds = %39
%62 = call i32 @fclose(i32* %30)
%63 = call i32 @pclose(i32* %19)
%64 = call i32 @unlink(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %65
65: ; preds = %61, %32, %21, %15
%66 = phi i32 [ 1, %15 ], [ 1, %21 ], [ 1, %32 ], [ 0, %61 ]
ret i32 %66
}