#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 */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int sscanf(char *, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
main() {
  FILE *strm;
  char filen[80], buf[512];
  char marks[100][10], wantmark[100][10];
  int markno, nplot;
  int i, j;
  double xval, yval;
  fprintf(stderr, "Enter filename\n");
  scanf("%s", filen);
  strm = fopen(filen, "r");
  markno = 0;
  while (fgets(buf, 512, strm) != NULL) {
    if (sscanf(buf, " marker %s", marks[markno]) == 1) {
      fprintf(stderr, "Marker: %s\n", marks[markno]);
      markno++;
    }
  }
  fclose(strm);
  strm = fopen(filen, "r");
  fprintf(stderr, "How many of these do you want plotted?\n");
  scanf("%d", &nplot);
  fprintf(stderr, "Enter them, in order of appearance in file\n");
  j = 0;
  for (i = 0; i < nplot; i++) {
    scanf("%s", wantmark[i]);
    printf("#\n");
    for (; j < markno; j++) {
      if (!strcmp(marks[j], wantmark[i])) {
        while (fgets(buf, 512, strm) != NULL) {
          if (sscanf(buf, "%lf %lf", &xval, &yval) == 2) {
            printf("%g %g\n", xval, yval);
          } else {
            j++;
            break;
          }
        }
        break;
      } else {
        while (fgets(buf, 512, strm) != NULL) {
          if (sscanf(buf, "%lf %lf", &xval, &yval) != 2)
            break;
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
lea    0xe5e(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
lea    -0x60(%rbp),%rsi
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    -0x60(%rbp),%rdi
lea    0xe4a(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0xa44(%rbp)
lea    -0x260(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x200,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     126b <main+0xeb>
lea    -0x260(%rbp),%rdi
movslq -0xa44(%rbp),%rax
lea    -0x650(%rbp),%rdx
imul   $0xa,%rax,%rax
add    %rax,%rdx
lea    0xdf7(%rip),%rsi
mov    $0x0,%al
call   1080 <sscanf@plt>
cmp    $0x1,%eax
jne    1266 <main+0xe6>
mov    0x2dae(%rip),%rax
mov    (%rax),%edi
movslq -0xa44(%rbp),%rax
lea    -0x650(%rbp),%rdx
imul   $0xa,%rax,%rax
add    %rax,%rdx
lea    0xdcd(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xa44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa44(%rbp)
jmp    11d9 <main+0x59>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    -0x60(%rbp),%rdi
lea    0xd91(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    0x2d51(%rip),%rax
mov    (%rax),%edi
lea    0xd91(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
lea    0xdab(%rip),%rdi
lea    -0xa48(%rbp),%rsi
mov    $0x0,%al
call   1090 <scanf@plt>
mov    0x2d25(%rip),%rax
mov    (%rax),%edi
lea    0xd90(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0xa50(%rbp)
movl   $0x0,-0xa4c(%rbp)
mov    -0xa4c(%rbp),%eax
cmp    -0xa48(%rbp),%eax
jge    148e <main+0x30e>
movslq -0xa4c(%rbp),%rax
lea    -0xa40(%rbp),%rsi
imul   $0xa,%rax,%rax
add    %rax,%rsi
lea    0xd0d(%rip),%rdi
mov    $0x0,%al
call   1090 <scanf@plt>
lea    0xd65(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa50(%rbp),%eax
cmp    -0xa44(%rbp),%eax
jge    1475 <main+0x2f5>
movslq -0xa50(%rbp),%rax
lea    -0x650(%rbp),%rdi
imul   $0xa,%rax,%rax
add    %rax,%rdi
movslq -0xa4c(%rbp),%rax
lea    -0xa40(%rbp),%rsi
imul   $0xa,%rax,%rax
add    %rax,%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    13fd <main+0x27d>
jmp    1371 <main+0x1f1>
lea    -0x260(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x200,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     13f8 <main+0x278>
lea    -0x260(%rbp),%rdi
lea    0xce5(%rip),%rsi
lea    -0xa58(%rbp),%rdx
lea    -0xa60(%rbp),%rcx
mov    $0x0,%al
call   1080 <sscanf@plt>
cmp    $0x2,%eax
jne    13df <main+0x25f>
movsd  -0xa58(%rbp),%xmm0
ff
movsd  -0xa60(%rbp),%xmm1
ff
lea    0xcb8(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
jmp    13f3 <main+0x273>
mov    -0xa50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa50(%rbp)
jmp    13f8 <main+0x278>
jmp    1371 <main+0x1f1>
jmp    1475 <main+0x2f5>
jmp    1402 <main+0x282>
lea    -0x260(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x200,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1457 <main+0x2d7>
lea    -0x260(%rbp),%rdi
lea    0xc54(%rip),%rsi
lea    -0xa58(%rbp),%rdx
lea    -0xa60(%rbp),%rcx
mov    $0x0,%al
call   1080 <sscanf@plt>
cmp    $0x2,%eax
je     1452 <main+0x2d2>
jmp    1457 <main+0x2d7>
jmp    1402 <main+0x282>
jmp    145c <main+0x2dc>
jmp    1461 <main+0x2e1>
mov    -0xa50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa50(%rbp)
jmp    1322 <main+0x1a2>
jmp    147a <main+0x2fa>
mov    -0xa4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4c(%rbp)
jmp    12df <main+0x15f>
mov    -0x4(%rbp),%eax
add    $0xa60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa58,%rsp
mov    0x2e38(%rip),%rax
mov    (%rax),%edi
lea    0xe4f(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
lea    0xe5b(%rip),%rdi
lea    0x30(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
lea    0xe3b(%rip),%rsi
mov    %rbx,%rdi
xor    %r13d,%r13d
call   10b0 <fopen@plt>
mov    %rax,%r12
lea    0x80(%rsp),%rdi
mov    $0x200,%esi
mov    %rax,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1278 <main+0xe8>
lea    0xe0e(%rip),%r14
lea    0x80(%rsp),%rbp
lea    0xe0a(%rip),%r15
xor    %r13d,%r13d
jmp    1235 <main+0xa5>
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    $0x200,%esi
mov    %r12,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1278 <main+0xe8>
movslq %r13d,%rax
lea    (%rax,%rax,4),%rax
lea    (%rsp,%rax,2),%rbx
add    $0x280,%rbx
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <sscanf@plt>
cmp    $0x1,%eax
jne    1220 <main+0x90>
mov    0x2d7d(%rip),%rax
mov    (%rax),%edi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
add    $0x1,%r13d
jmp    1220 <main+0x90>
mov    %r13d,0x4(%rsp)
mov    %r12,%rdi
call   1040 <fclose@plt>
lea    0xd84(%rip),%rsi
lea    0x30(%rsp),%rdi
call   10b0 <fopen@plt>
mov    %rax,%r12
mov    0x2d40(%rip),%rbx
mov    (%rbx),%edi
lea    0xd80(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
lea    0xd9a(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
mov    (%rbx),%edi
lea    0xd88(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
cmpl   $0x0,0x14(%rsp)
jle    1414 <main+0x284>
lea    0x80(%rsp),%rbx
lea    0xd93(%rip),%r13
lea    0x28(%rsp),%rbp
lea    0x20(%rsp),%r14
xor    %ecx,%ecx
xor    %r15d,%r15d
jmp    131e <main+0x18e>
xchg   %ax,%ax
mov    0x4(%rsp),%eax
mov    %eax,%r15d
mov    0x8(%rsp),%rcx
add    $0x1,%rcx
movslq 0x14(%rsp),%rax
cmp    %rax,%rcx
jge    1414 <main+0x284>
mov    %rcx,0x8(%rsp)
lea    (%rcx,%rcx,4),%rax
lea    (%rsp,%rax,2),%rsi
add    $0x670,%rsi
lea    0xce1(%rip),%rdi
mov    %rsi,0x18(%rsp)
xor    %eax,%eax
call   10a0 <scanf@plt>
lea    0xd43(%rip),%rdi
call   1030 <puts@plt>
cmp    0x4(%rsp),%r15d
jge    1307 <main+0x177>
movslq %r15d,%r15
jmp    136b <main+0x1db>
nopl   (%rax)
add    $0x1,%r15
cmp    %r15d,0x4(%rsp)
je     1300 <main+0x170>
lea    (%r15,%r15,4),%rax
lea    (%rsp,%rax,2),%rdi
add    $0x280,%rdi
mov    0x18(%rsp),%rsi
call   1070 <strcmp@plt>
test   %eax,%eax
je     13da <main+0x24a>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x200,%esi
mov    %r12,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1360 <main+0x1d0>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1090 <sscanf@plt>
cmp    $0x2,%eax
je     1390 <main+0x200>
jmp    1360 <main+0x1d0>
nop
movsd  0x28(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
lea    0xcb5(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x200,%esi
mov    %r12,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1307 <main+0x177>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1090 <sscanf@plt>
cmp    $0x2,%eax
je     13c0 <main+0x230>
add    $0x1,%r15d
jmp    1307 <main+0x177>
xor    %eax,%eax
add    $0xa58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"Enter filename\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [11 x i8] c" marker %s\00"
@.str.4 = [12 x i8] c"Marker: %s\0A\00"
@.str.5 = [40 x i8] c"How many of these do you want plotted?\0A\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [44 x i8] c"Enter them, in order of appearance in file\0A\00"
@.str.8 = [3 x i8] c"#\0A\00"
@.str.9 = [8 x i8] c"%lf %lf\00"
@.str.10 = [7 x i8] c"%g %g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [80 x i8]
%4 = alloca [512 x i8]
%5 = alloca [100 x [10 x i8]]
%6 = alloca [100 x [10 x i8]]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
store i32 0, i32* %1
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%15 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%18 = call i32* @fopen(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %18, i32** %2
store i32 0, i32* %7
br label %19
19: ; preds = %41, %0
%20 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%21 = load i32*, i32** %2
%22 = call i32* @fgets(i8* %20, i32 512, i32* %21)
%23 = icmp ne i32* %22, null
br i1 %23, label %24, label %42
24: ; preds = %19
%25 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %5, i64 0, i64 %27
%29 = getelementptr inbounds [10 x i8], [10 x i8]* %28, i64 0, i64 0
%30 = call i32 (i8*, i8*, ...) @sscanf(i8* %25, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* %29)
%31 = icmp eq i32 %30, 1
br i1 %31, label %32, label %41
32: ; preds = %24
%33 = load i32, i32* @stderr
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %5, i64 0, i64 %35
%37 = getelementptr inbounds [10 x i8], [10 x i8]* %36, i64 0, i64 0
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %37)
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
store i32 %40, i32* %7
br label %41
41: ; preds = %32, %24
br label %19
42: ; preds = %19
%43 = load i32*, i32** %2
%44 = call i32 @fclose(i32* %43)
%45 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%46 = call i32* @fopen(i8* %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %46, i32** %2
%47 = load i32, i32* @stderr
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0))
%49 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %8)
%50 = load i32, i32* @stderr
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %10
store i32 0, i32* %9
br label %52
52: ; preds = %115, %42
%53 = load i32, i32* %9
%54 = load i32, i32* %8
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %118
56: ; preds = %52
%57 = load i32, i32* %9
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %6, i64 0, i64 %58
%60 = getelementptr inbounds [10 x i8], [10 x i8]* %59, i64 0, i64 0
%61 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %60)
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
br label %63
63: ; preds = %111, %56
%64 = load i32, i32* %10
%65 = load i32, i32* %7
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %114
67: ; preds = %63
%68 = load i32, i32* %10
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %5, i64 0, i64 %69
%71 = getelementptr inbounds [10 x i8], [10 x i8]* %70, i64 0, i64 0
%72 = load i32, i32* %9
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %6, i64 0, i64 %73
%75 = getelementptr inbounds [10 x i8], [10 x i8]* %74, i64 0, i64 0
%76 = call i32 @strcmp(i8* %71, i8* %75)
%77 = icmp ne i32 %76, 0
br i1 %77, label %97, label %78
78: ; preds = %67
br label %79
79: ; preds = %95, %78
%80 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%81 = load i32*, i32** %2
%82 = call i32* @fgets(i8* %80, i32 512, i32* %81)
%83 = icmp ne i32* %82, null
br i1 %83, label %84, label %96
84: ; preds = %79
%85 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%86 = call i32 (i8*, i8*, ...) @sscanf(i8* %85, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), double* %11, double* %12)
%87 = icmp eq i32 %86, 2
br i1 %87, label %88, label %92
88: ; preds = %84
%89 = load double, double* %11
%90 = load double, double* %12
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %89, double %90)
br label %95
92: ; preds = %84
%93 = load i32, i32* %10
%94 = add nsw i32 %93, 1
store i32 %94, i32* %10
br label %96
95: ; preds = %88
br label %79
96: ; preds = %92, %79
br label %114
97: ; preds = %67
br label %98
98: ; preds = %108, %97
%99 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%100 = load i32*, i32** %2
%101 = call i32* @fgets(i8* %99, i32 512, i32* %100)
%102 = icmp ne i32* %101, null
br i1 %102, label %103, label %109
103: ; preds = %98
%104 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%105 = call i32 (i8*, i8*, ...) @sscanf(i8* %104, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), double* %11, double* %12)
%106 = icmp ne i32 %105, 2
br i1 %106, label %107, label %108
107: ; preds = %103
br label %109
108: ; preds = %103
br label %98
109: ; preds = %107, %98
br label %110
110: ; preds = %109
br label %111
111: ; preds = %110
%112 = load i32, i32* %10
%113 = add nsw i32 %112, 1
store i32 %113, i32* %10
br label %63
114: ; preds = %96, %63
br label %115
115: ; preds = %114
%116 = load i32, i32* %9
%117 = add nsw i32 %116, 1
store i32 %117, i32* %9
br label %52
118: ; preds = %52
%119 = load i32, i32* %1
ret i32 %119
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"Enter filename\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [11 x i8] c" marker %s\00"
@.str.4 = [12 x i8] c"Marker: %s\0A\00"
@.str.5 = [40 x i8] c"How many of these do you want plotted?\0A\00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [44 x i8] c"Enter them, in order of appearance in file\0A\00"
@.str.9 = [8 x i8] c"%lf %lf\00"
@.str.10 = [7 x i8] c"%g %g\0A\00"
@str = [2 x i8] c"#\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca [512 x i8]
%3 = alloca [100 x [10 x i8]]
%4 = alloca [100 x [10 x i8]]
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%10 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %3, i64 0, i64 0, i64 0
%11 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %4, i64 0, i64 0, i64 0
%12 = bitcast i32* %5 to i8*
%13 = bitcast double* %6 to i8*
%14 = bitcast double* %7 to i8*
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%18 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32* @fgets(i8* %9, i32 512, i32* %18)
%20 = icmp eq i32* %19, null
br i1 %20, label %35, label %21
21: ; preds = %0, %31
%22 = phi i32 [ %32, %31 ], [ 0, %0 ]
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %3, i64 0, i64 %23, i64 0
%25 = call i32 (i8*, i8*, ...) @sscanf(i8* %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* %24)
%26 = icmp eq i32 %25, 1
br i1 %26, label %27, label %31
27: ; preds = %21
%28 = load i32, i32* @stderr
%29 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %24)
%30 = add nsw i32 %22, 1
br label %31
31: ; preds = %27, %21
%32 = phi i32 [ %30, %27 ], [ %22, %21 ]
%33 = call i32* @fgets(i8* %9, i32 512, i32* %18)
%34 = icmp eq i32* %33, null
br i1 %34, label %35, label %21
35: ; preds = %31, %0
%36 = phi i32 [ 0, %0 ], [ %32, %31 ]
%37 = call i32 @fclose(i32* %18)
%38 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%39 = load i32, i32* @stderr
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0))
%41 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %5)
%42 = load i32, i32* @stderr
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0))
%44 = load i32, i32* %5
%45 = icmp sgt i32 %44, 0
br i1 %45, label %46, label %91
46: ; preds = %35, %85
%47 = phi i64 [ %87, %85 ], [ 0, %35 ]
%48 = phi i32 [ %86, %85 ], [ 0, %35 ]
%49 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %4, i64 0, i64 %47, i64 0
%50 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %49)
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%52 = icmp slt i32 %48, %36
br i1 %52, label %53, label %85
53: ; preds = %46
%54 = sext i32 %48 to i64
br label %55
55: ; preds = %53, %81
%56 = phi i64 [ %54, %53 ], [ %82, %81 ]
%57 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %3, i64 0, i64 %56, i64 0
%58 = call i32 @strcmp(i8* %57, i8* %49)
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %75
60: ; preds = %55
%61 = trunc i64 %56 to i32
%62 = call i32* @fgets(i8* %9, i32 512, i32* %38)
%63 = icmp eq i32* %62, null
br i1 %63, label %85, label %64
64: ; preds = %60, %67
%65 = call i32 (i8*, i8*, ...) @sscanf(i8* %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), double* %6, double* %7)
%66 = icmp eq i32 %65, 2
br i1 %66, label %67, label %73
67: ; preds = %64
%68 = load double, double* %6
%69 = load double, double* %7
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %68, double %69)
%71 = call i32* @fgets(i8* %9, i32 512, i32* %38)
%72 = icmp eq i32* %71, null
br i1 %72, label %85, label %64
73: ; preds = %64
%74 = add nsw i32 %61, 1
br label %85
75: ; preds = %55, %78
%76 = call i32* @fgets(i8* %9, i32 512, i32* %38)
%77 = icmp eq i32* %76, null
br i1 %77, label %81, label %78
78: ; preds = %75
%79 = call i32 (i8*, i8*, ...) @sscanf(i8* %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), double* %6, double* %7)
%80 = icmp eq i32 %79, 2
br i1 %80, label %75, label %81
81: ; preds = %78, %75
%82 = add nsw i64 %56, 1
%83 = trunc i64 %82 to i32
%84 = icmp eq i32 %36, %83
br i1 %84, label %85, label %55
85: ; preds = %81, %67, %46, %60, %73
%86 = phi i32 [ %74, %73 ], [ %61, %60 ], [ %48, %46 ], [ %61, %67 ], [ %36, %81 ]
%87 = add nuw nsw i64 %47, 1
%88 = load i32, i32* %5
%89 = sext i32 %88 to i64
%90 = icmp slt i64 %87, %89
br i1 %90, label %46, label %91
91: ; preds = %85, %35
ret i32 0
}