#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*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ sscanf(char *, char *, int *, int *, int *, int *);
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *strstr(char *, char *);
main(int argc, char **argv) {
  char line[128], target[128];
  float f;
  int cmin, cmax, col, done = (!(0 == 0)), rmin, rmax, row;
  FILE *in = stdin;
  while (!done) {
    fgets(line, 128, in);
    if (strstr(line, "COLUMNS") != NULL) {
      (void)sscanf(line, "%*s %d %d %*s %d %d", &cmin, &cmax, &rmin, &rmax);
      done = (0 == 0);
    }
  }
  (void)sprintf(target, " %d", cmax);
  fgets(line, 128, in);
  while (strstr(line, target) == NULL)
    fgets(line, 128, in);
  for (row = rmax; row >= rmin; row--) {
    (void)fscanf(in, "%*s %*d");
    (void)fscanf(in, "%e", &f);
    (void)printf("%.2f", f);
    for (col = cmin; col < cmax; col++) {
      (void)fscanf(in, "%e", &f);
      (void)printf("\t%.2f", f);
    }
    (void)putchar('\n');
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x124(%rbp)
mov    0x2e4e(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x138(%rbp)
cmpl   $0x0,-0x124(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11bd <main+0x4d>
jmp    1230 <main+0xc0>
lea    -0x90(%rbp),%rdi
mov    -0x138(%rbp),%rdx
mov    $0x80,%esi
call   1060 <fgets@plt>
lea    -0x90(%rbp),%rdi
lea    0xe1d(%rip),%rsi
call   1090 <strstr@plt>
cmp    $0x0,%rax
je     122b <main+0xbb>
lea    -0x90(%rbp),%rdi
lea    0xe08(%rip),%rsi
lea    -0x118(%rbp),%rdx
lea    -0x11c(%rbp),%rcx
lea    -0x128(%rbp),%r8
lea    -0x12c(%rbp),%r9
call   1070 <sscanf@plt>
movl   $0x1,-0x124(%rbp)
jmp    11a4 <main+0x34>
lea    -0x110(%rbp),%rdi
mov    -0x11c(%rbp),%edx
lea    0xdd4(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x90(%rbp),%rdi
mov    -0x138(%rbp),%rdx
mov    $0x80,%esi
call   1060 <fgets@plt>
lea    -0x90(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1090 <strstr@plt>
cmp    $0x0,%rax
jne    129b <main+0x12b>
lea    -0x90(%rbp),%rdi
mov    -0x138(%rbp),%rdx
mov    $0x80,%esi
call   1060 <fgets@plt>
jmp    1261 <main+0xf1>
mov    -0x12c(%rbp),%eax
mov    %eax,-0x130(%rbp)
mov    -0x130(%rbp),%eax
cmp    -0x128(%rbp),%eax
jl     137e <main+0x20e>
mov    -0x138(%rbp),%rdi
lea    0xd55(%rip),%rsi
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    -0x138(%rbp),%rdi
lea    0xd48(%rip),%rsi
lea    -0x114(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
movss  -0x114(%rbp),%xmm0
ff
lea    0xd2f(%rip),%rdi
call   1040 <printf@plt>
mov    -0x118(%rbp),%eax
mov    %eax,-0x120(%rbp)
mov    -0x120(%rbp),%eax
cmp    -0x11c(%rbp),%eax
jge    1360 <main+0x1f0>
mov    -0x138(%rbp),%rdi
lea    0xcfa(%rip),%rsi
lea    -0x114(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
movss  -0x114(%rbp),%xmm0
ff
lea    0xce0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x120(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x120(%rbp)
jmp    130a <main+0x19a>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x130(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x130(%rbp)
jmp    12a7 <main+0x137>
mov    -0x4(%rbp),%eax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    0x2e60(%rip),%rax
mov    (%rax),%rbx
lea    0x20(%rsp),%rbp
lea    0xe69(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    $0x80,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1090 <strstr@plt>
test   %rax,%rax
je     11a0 <main+0x30>
lea    0xe41(%rip),%rsi
lea    0x20(%rsp),%r14
lea    0x1c(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0x18(%rsp),%r9
mov    %r14,%rdi
call   1070 <sscanf@plt>
mov    0xc(%rsp),%edx
lea    0xe25(%rip),%rsi
lea    0xa0(%rsp),%rbp
mov    %rbp,%rdi
call   1080 <sprintf@plt>
mov    %r14,%rdi
mov    $0x80,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1090 <strstr@plt>
test   %rax,%rax
jne    1250 <main+0xe0>
lea    0x20(%rsp),%rbp
lea    0xa0(%rsp),%r14
mov    %rbp,%rdi
mov    $0x80,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1090 <strstr@plt>
test   %rax,%rax
je     1230 <main+0xc0>
mov    0x18(%rsp),%r14d
cmp    0x10(%rsp),%r14d
jge    1270 <main+0x100>
xor    %eax,%eax
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdad(%rip),%r15
lea    0x14(%rsp),%r12
lea    0xda4(%rip),%rbp
jmp    12a8 <main+0x138>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    -0x1(%r14),%eax
cmp    0x10(%rsp),%r14d
mov    %eax,%r14d
jle    125c <main+0xec>
mov    %rbx,%rdi
lea    0xd6a(%rip),%rsi
xor    %eax,%eax
call   1050 <fscanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
movss  0x14(%rsp),%xmm0
lea    0xd52(%rip),%rdi
call   1040 <printf@plt>
mov    0x1c(%rsp),%r13d
cmp    0xc(%rsp),%r13d
jge    1290 <main+0x120>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
movss  0x14(%rsp),%xmm0
mov    %rbp,%rdi
call   1040 <printf@plt>
add    $0x1,%r13d
cmp    0xc(%rsp),%r13d
jl     12f0 <main+0x180>
jmp    1290 <main+0x120>

LLVM IR (-O0):
@stdin = global i32* null
@.str = [8 x i8] c"COLUMNS\00"
@.str.1 = [20 x i8] c"%*s %d %d %*s %d %d\00"
@.str.2 = [4 x i8] c" %d\00"
@.str.3 = [8 x i8] c"%*s %*d\00"
@.str.4 = [3 x i8] c"%e\00"
@.str.5 = [5 x i8] c"%.2f\00"
@.str.6 = [6 x i8] c"\09%.2f\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [128 x i8]
%7 = alloca [128 x i8]
%8 = alloca float
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %12
%17 = load i32*, i32** @stdin
store i32* %17, i32** %16
br label %18
18: ; preds = %32, %2
%19 = load i32, i32* %12
%20 = icmp ne i32 %19, 0
%21 = xor i1 %20, true
br i1 %21, label %22, label %33
22: ; preds = %18
%23 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%24 = load i32*, i32** %16
%25 = call i32 @fgets(i8* %23, i32 128, i32* %24)
%26 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%27 = call i32* @strstr(i8* %26, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%28 = icmp ne i32* %27, null
br i1 %28, label %29, label %32
29: ; preds = %22
%30 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%31 = call i32 @sscanf(i8* %30, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32* %9, i32* %10, i32* %13, i32* %14)
store i32 1, i32* %12
br label %32
32: ; preds = %29, %22
br label %18
33: ; preds = %18
%34 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%35 = load i32, i32* %10
%36 = call i32 @sprintf(i8* %34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %35)
%37 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%38 = load i32*, i32** %16
%39 = call i32 @fgets(i8* %37, i32 128, i32* %38)
br label %40
40: ; preds = %45, %33
%41 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%42 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%43 = call i32* @strstr(i8* %41, i8* %42)
%44 = icmp eq i32* %43, null
br i1 %44, label %45, label %49
45: ; preds = %40
%46 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%47 = load i32*, i32** %16
%48 = call i32 @fgets(i8* %46, i32 128, i32* %47)
br label %40
49: ; preds = %40
%50 = load i32, i32* %14
store i32 %50, i32* %15
br label %51
51: ; preds = %77, %49
%52 = load i32, i32* %15
%53 = load i32, i32* %13
%54 = icmp sge i32 %52, %53
br i1 %54, label %55, label %80
55: ; preds = %51
%56 = load i32*, i32** %16
%57 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%58 = load i32*, i32** %16
%59 = call i32 (i32*, i8*, ...) @fscanf(i32* %58, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %8)
%60 = load float, float* %8
%61 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), float %60)
%62 = load i32, i32* %9
store i32 %62, i32* %11
br label %63
63: ; preds = %72, %55
%64 = load i32, i32* %11
%65 = load i32, i32* %10
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %75
67: ; preds = %63
%68 = load i32*, i32** %16
%69 = call i32 (i32*, i8*, ...) @fscanf(i32* %68, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %8)
%70 = load float, float* %8
%71 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), float %70)
br label %72
72: ; preds = %67
%73 = load i32, i32* %11
%74 = add nsw i32 %73, 1
store i32 %74, i32* %11
br label %63
75: ; preds = %63
%76 = call i32 @putchar(i8 signext 10)
br label %77
77: ; preds = %75
%78 = load i32, i32* %15
%79 = add nsw i32 %78, -1
store i32 %79, i32* %15
br label %51
80: ; preds = %51
%81 = load i32, i32* %3
ret i32 %81
}

LLVM IR (-O2):
@stdin = global i32* null
@.str = [8 x i8] c"COLUMNS\00"
@.str.1 = [20 x i8] c"%*s %d %d %*s %d %d\00"
@.str.2 = [4 x i8] c" %d\00"
@.str.3 = [8 x i8] c"%*s %*d\00"
@.str.4 = [3 x i8] c"%e\00"
@.str.5 = [5 x i8] c"%.2f\00"
@.str.6 = [6 x i8] c"\09%.2f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [128 x i8]
%4 = alloca [128 x i8]
%5 = alloca float
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%12 = bitcast float* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = bitcast i32* %8 to i8*
%16 = bitcast i32* %9 to i8*
%17 = load i32*, i32** @stdin
br label %18
18: ; preds = %18, %2
%19 = call i32 @fgets(i8* %10, i32 128, i32* %17)
%20 = call i32* @strstr(i8* %10, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%21 = icmp eq i32* %20, null
br i1 %21, label %18, label %22
22: ; preds = %18
%23 = call i32 @sscanf(i8* %10, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32* %6, i32* %7, i32* %8, i32* %9)
%24 = load i32, i32* %7
%25 = call i32 @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %24)
%26 = call i32 @fgets(i8* %10, i32 128, i32* %17)
%27 = call i32* @strstr(i8* %10, i8* %11)
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %33
29: ; preds = %22, %29
%30 = call i32 @fgets(i8* %10, i32 128, i32* %17)
%31 = call i32* @strstr(i8* %10, i8* %11)
%32 = icmp eq i32* %31, null
br i1 %32, label %29, label %33
33: ; preds = %29, %22
%34 = load i32, i32* %9
%35 = load i32, i32* %8
%36 = icmp slt i32 %34, %35
br i1 %36, label %59, label %37
37: ; preds = %33, %54
%38 = phi i32 [ %56, %54 ], [ %34, %33 ]
%39 = call i32 (i32*, i8*, ...) @fscanf(i32* %17, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%40 = call i32 (i32*, i8*, ...) @fscanf(i32* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %5)
%41 = load float, float* %5
%42 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), float %41)
%43 = load i32, i32* %6
%44 = load i32, i32* %7
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %54
46: ; preds = %37, %46
%47 = phi i32 [ %51, %46 ], [ %43, %37 ]
%48 = call i32 (i32*, i8*, ...) @fscanf(i32* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %5)
%49 = load float, float* %5
%50 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), float %49)
%51 = add nsw i32 %47, 1
%52 = load i32, i32* %7
%53 = icmp slt i32 %51, %52
br i1 %53, label %46, label %54
54: ; preds = %46, %37
%55 = call i32 @putchar(i8 signext 10)
%56 = add nsw i32 %38, -1
%57 = load i32, i32* %8
%58 = icmp sgt i32 %38, %57
br i1 %58, label %37, label %59
59: ; preds = %54, %33
ret i32 0
}