#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*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  FILE *inputFile;
  char lineBuf[160];
  char outputString[160];
  int m, n;
  if ((inputFile = fopen("input", "r")) == NULL) {
    printf("Couldn't open input file.\n");
    exit(1);
  }
  printf("Enter m and n: ");
  scanf("%d %d", &m, &n);
  while (fgets(lineBuf, 160, inputFile) != NULL) {
    for (int i = 0; i + m <= n; i++)
      outputString[i] = lineBuf[i + m - 1];
    outputString[n] = '\0';
    printf("%s\n", outputString);
  }
  fclose(inputFile);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe87(%rip),%rdi
lea    0xe86(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    11ab <main+0x4b>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe73(%rip),%rdi
lea    -0x154(%rbp),%rsi
lea    -0x158(%rbp),%rdx
call   1060 <scanf@plt>
lea    -0xb0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0xa0,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1277 <main+0x117>
movl   $0x0,-0x15c(%rbp)
mov    -0x15c(%rbp),%eax
add    -0x154(%rbp),%eax
cmp    -0x158(%rbp),%eax
jg     124e <main+0xee>
mov    -0x15c(%rbp),%eax
add    -0x154(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xb0(%rbp,%rax,1),%cl
movslq -0x15c(%rbp),%rax
mov    %cl,-0x150(%rbp,%rax,1)
mov    -0x15c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x15c(%rbp)
jmp    11fc <main+0x9c>
movslq -0x158(%rbp),%rax
movb   $0x0,-0x150(%rbp,%rax,1)
lea    -0x150(%rbp),%rsi
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11d3 <main+0x73>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
lea    0xe78(%rip),%rdi
lea    0xe77(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     13fd <main+0x28d>
mov    %rax,%r14
lea    0xe61(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe63(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1070 <scanf@plt>
lea    0xb0(%rsp),%r13
mov    %r13,%rdi
mov    $0xa0,%esi
mov    %r14,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     13e1 <main+0x271>
lea    0x10(%rsp),%r15
jmp    1216 <main+0xa6>
nopl   0x0(%rax)
movb   $0x0,0x10(%rsp,%rax,1)
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
mov    $0xa0,%esi
mov    %r14,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     13e1 <main+0x271>
mov    0xc(%rsp),%r12d
movslq 0x8(%rsp),%rax
cmp    %eax,%r12d
jg     11f0 <main+0x80>
movslq %r12d,%rcx
mov    %rcx,%rdx
neg    %rdx
lea    (%rax,%rdx,1),%r10
add    $0x1,%r10
cmp    $0x8,%r10
jb     1280 <main+0x110>
mov    %rax,%r9
sub    %rcx,%r9
lea    -0x1(%r12),%r8d
lea    (%r12,%r9,1),%edx
add    $0xffffffff,%edx
cmp    %r8d,%edx
jl     1280 <main+0x110>
mov    %r9,%rdx
shr    $0x20,%rdx
mov    $0x0,%esi
mov    %r12d,%edi
jne    1285 <main+0x115>
cmp    $0x20,%r10
jae    12c4 <main+0x154>
xor    %esi,%esi
jmp    137c <main+0x20c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %esi,%esi
mov    %r12d,%edi
lea    (%rsp,%rsi,1),%rdx
add    $0x10,%rdx
lea    (%r12,%rsi,1),%ebx
add    $0x1,%ebx
add    %rsi,%rcx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%esi
movslq %edi,%rdi
movzbl -0x1(%rdi,%r13,1),%ebx
mov    %bl,(%rdx)
add    $0x1,%rdx
mov    %esi,%edi
lea    0x1(%rsi),%ebx
add    $0x1,%rcx
cmp    %rax,%rcx
jle    12a0 <main+0x130>
jmp    11f0 <main+0x80>
mov    %r10,%rsi
and    $0xffffffffffffffe0,%rsi
lea    -0x20(%rsi),%rdx
mov    %rdx,%r11
shr    $0x5,%r11
add    $0x1,%r11
test   %rdx,%rdx
je     13ca <main+0x25a>
mov    %r11,%rdx
and    $0xfffffffffffffffe,%rdx
lea    0x1f(%r12),%ebx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x20(%rbx),%ebp
movslq %ebp,%rbp
movups 0xb0(%rsp,%rbp,1),%xmm0
movups 0xc0(%rsp,%rbp,1),%xmm1
movaps %xmm0,0x10(%rsp,%rdi,1)
movaps %xmm1,0x20(%rsp,%rdi,1)
movslq %ebx,%rbx
movups 0xb0(%rsp,%rbx,1),%xmm0
movups 0xc0(%rsp,%rbx,1),%xmm1
movaps %xmm0,0x30(%rsp,%rdi,1)
movaps %xmm1,0x40(%rsp,%rdi,1)
add    $0x40,%rdi
add    $0x40,%ebx
add    $0xfffffffffffffffe,%rdx
jne    1300 <main+0x190>
test   $0x1,%r11b
je     136d <main+0x1fd>
lea    (%r12,%rdi,1),%edx
movslq %edx,%rdx
movups -0x1(%rdx,%r13,1),%xmm0
movups 0xf(%rdx,%r13,1),%xmm1
movaps %xmm0,0x10(%rsp,%rdi,1)
movaps %xmm1,0x20(%rsp,%rdi,1)
cmp    %rsi,%r10
je     11f0 <main+0x80>
test   $0x18,%r10b
je     13d8 <main+0x268>
mov    %rsi,%rdx
add    $0x1,%r9
mov    %r9,%rsi
and    $0xfffffffffffffff8,%rsi
lea    (%r12,%rsi,1),%edi
mov    %r8d,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%rbx,%rdx,1),%ebp
movslq %ebp,%rbp
mov    0xb0(%rsp,%rbp,1),%rbp
mov    %rbp,0x10(%rsp,%rdx,1)
add    $0x8,%rdx
cmp    %rdx,%rsi
jne    13a0 <main+0x230>
cmp    %rsi,%r9
je     11f0 <main+0x80>
jmp    1285 <main+0x115>
xor    %edi,%edi
test   $0x1,%r11b
jne    1350 <main+0x1e0>
jmp    136d <main+0x1fd>
lea    (%r12,%rsi,1),%edi
jmp    1285 <main+0x115>
mov    %r14,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc1a(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"input\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [27 x i8] c"Couldn't open input file.\0A\00"
@.str.3 = [16 x i8] c"Enter m and n: \00"
@.str.4 = [6 x i8] c"%d %d\00"
@.str.5 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [160 x i8]
%4 = alloca [160 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %8, i32** %2
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32* %5, i32* %6)
br label %16
16: ; preds = %42, %13
%17 = getelementptr inbounds [160 x i8], [160 x i8]* %3, i64 0, i64 0
%18 = load i32*, i32** %2
%19 = call i32* @fgets(i8* %17, i32 160, i32* %18)
%20 = icmp ne i32* %19, null
br i1 %20, label %21, label %48
21: ; preds = %16
store i32 0, i32* %7
br label %22
22: ; preds = %39, %21
%23 = load i32, i32* %7
%24 = load i32, i32* %5
%25 = add nsw i32 %23, %24
%26 = load i32, i32* %6
%27 = icmp sle i32 %25, %26
br i1 %27, label %28, label %42
28: ; preds = %22
%29 = load i32, i32* %7
%30 = load i32, i32* %5
%31 = add nsw i32 %29, %30
%32 = sub nsw i32 %31, 1
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [160 x i8], [160 x i8]* %3, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = load i32, i32* %7
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [160 x i8], [160 x i8]* %4, i64 0, i64 %37
store i8 %35, i8* %38
br label %39
39: ; preds = %28
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %22
42: ; preds = %22
%43 = load i32, i32* %6
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [160 x i8], [160 x i8]* %4, i64 0, i64 %44
store i8 0, i8* %45
%46 = getelementptr inbounds [160 x i8], [160 x i8]* %4, i64 0, i64 0
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %46)
br label %16
48: ; preds = %16
%49 = load i32*, i32** %2
%50 = call i32 @fclose(i32* %49)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"input\00"
@.str.1 = [2 x i8] c"r\00"
@.str.3 = [16 x i8] c"Enter m and n: \00"
@.str.4 = [6 x i8] c"%d %d\00"
@str = [26 x i8] c"Couldn't open input file.\00"
define i32 @main() {
%1 = alloca [160 x i8]
%2 = alloca [160 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %0
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32* %3, i32* %4)
%17 = call i32* @fgets(i8* %5, i32 160, i32* %9)
%18 = icmp eq i32* %17, null
br i1 %18, label %153, label %19
19: ; preds = %14, %135
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = icmp sgt i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = sext i32 %21 to i64
br label %135
25: ; preds = %19
%26 = sext i32 %20 to i64
%27 = sext i32 %21 to i64
%28 = add nsw i64 %27, 1
%29 = sub nsw i64 %28, %26
%30 = icmp ult i64 %29, 8
br i1 %30, label %132, label %31
31: ; preds = %25
%32 = sub nsw i64 %27, %26
%33 = add i32 %20, -1
%34 = trunc i64 %32 to i32
%35 = add i32 %33, %34
%36 = icmp slt i32 %35, %33
%37 = icmp ugt i64 %32, 4294967295
%38 = or i1 %36, %37
br i1 %38, label %132, label %39
39: ; preds = %31
%40 = icmp ult i64 %29, 32
br i1 %40, label %110, label %41
41: ; preds = %39
%42 = and i64 %29, -32
%43 = add nsw i64 %42, -32
%44 = lshr exact i64 %43, 5
%45 = add nuw nsw i64 %44, 1
%46 = and i64 %45, 1
%47 = icmp eq i64 %43, 0
br i1 %47, label %85, label %48
48: ; preds = %41
%49 = and i64 %45, 1152921504606846974
br label %50
50: ; preds = %50, %48
%51 = phi i64 [ 0, %48 ], [ %82, %50 ]
%52 = phi i64 [ 0, %48 ], [ %83, %50 ]
%53 = trunc i64 %51 to i32
%54 = add i32 %20, %53
%55 = add nsw i32 %54, -1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 %56
%58 = bitcast i8* %57 to <16 x i8>*
%59 = load <16 x i8>, <16 x i8>* %58
%60 = getelementptr inbounds i8, i8* %57, i64 16
%61 = bitcast i8* %60 to <16 x i8>*
%62 = load <16 x i8>, <16 x i8>* %61
%63 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 %51
%64 = bitcast i8* %63 to <16 x i8>*
store <16 x i8> %59, <16 x i8>* %64
%65 = getelementptr inbounds i8, i8* %63, i64 16
%66 = bitcast i8* %65 to <16 x i8>*
store <16 x i8> %62, <16 x i8>* %66
%67 = or i64 %51, 32
%68 = trunc i64 %67 to i32
%69 = add i32 %20, %68
%70 = add nsw i32 %69, -1
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 %71
%73 = bitcast i8* %72 to <16 x i8>*
%74 = load <16 x i8>, <16 x i8>* %73
%75 = getelementptr inbounds i8, i8* %72, i64 16
%76 = bitcast i8* %75 to <16 x i8>*
%77 = load <16 x i8>, <16 x i8>* %76
%78 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 %67
%79 = bitcast i8* %78 to <16 x i8>*
store <16 x i8> %74, <16 x i8>* %79
%80 = getelementptr inbounds i8, i8* %78, i64 16
%81 = bitcast i8* %80 to <16 x i8>*
store <16 x i8> %77, <16 x i8>* %81
%82 = add nuw i64 %51, 64
%83 = add i64 %52, 2
%84 = icmp eq i64 %83, %49
br i1 %84, label %85, label %50
85: ; preds = %50, %41
%86 = phi i64 [ 0, %41 ], [ %82, %50 ]
%87 = icmp eq i64 %46, 0
br i1 %87, label %103, label %88
88: ; preds = %85
%89 = trunc i64 %86 to i32
%90 = add i32 %20, %89
%91 = add nsw i32 %90, -1
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 %92
%94 = bitcast i8* %93 to <16 x i8>*
%95 = load <16 x i8>, <16 x i8>* %94
%96 = getelementptr inbounds i8, i8* %93, i64 16
%97 = bitcast i8* %96 to <16 x i8>*
%98 = load <16 x i8>, <16 x i8>* %97
%99 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 %86
%100 = bitcast i8* %99 to <16 x i8>*
store <16 x i8> %95, <16 x i8>* %100
%101 = getelementptr inbounds i8, i8* %99, i64 16
%102 = bitcast i8* %101 to <16 x i8>*
store <16 x i8> %98, <16 x i8>* %102
br label %103
103: ; preds = %85, %88
%104 = icmp eq i64 %29, %42
br i1 %104, label %135, label %105
105: ; preds = %103
%106 = trunc i64 %42 to i32
%107 = add i32 %20, %106
%108 = and i64 %29, 24
%109 = icmp eq i64 %108, 0
br i1 %109, label %132, label %110
110: ; preds = %39, %105
%111 = phi i64 [ %42, %105 ], [ 0, %39 ]
%112 = add nsw i64 %27, 1
%113 = sub nsw i64 %112, %26
%114 = and i64 %113, -8
%115 = trunc i64 %114 to i32
%116 = add i32 %20, %115
br label %117
117: ; preds = %117, %110
%118 = phi i64 [ %111, %110 ], [ %128, %117 ]
%119 = trunc i64 %118 to i32
%120 = add i32 %20, %119
%121 = add nsw i32 %120, -1
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 %122
%124 = bitcast i8* %123 to <8 x i8>*
%125 = load <8 x i8>, <8 x i8>* %124
%126 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 %118
%127 = bitcast i8* %126 to <8 x i8>*
store <8 x i8> %125, <8 x i8>* %127
%128 = add nuw i64 %118, 8
%129 = icmp eq i64 %128, %114
br i1 %129, label %130, label %117
130: ; preds = %117
%131 = icmp eq i64 %113, %114
br i1 %131, label %135, label %132
132: ; preds = %31, %25, %105, %130
%133 = phi i64 [ 0, %25 ], [ 0, %31 ], [ %42, %105 ], [ %114, %130 ]
%134 = phi i32 [ %20, %25 ], [ %20, %31 ], [ %107, %105 ], [ %116, %130 ]
br label %141
135: ; preds = %141, %103, %130, %23
%136 = phi i64 [ %24, %23 ], [ %27, %130 ], [ %27, %103 ], [ %27, %141 ]
%137 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 %136
store i8 0, i8* %137
%138 = call i32 @puts(i8* %6)
%139 = call i32* @fgets(i8* %5, i32 160, i32* %9)
%140 = icmp eq i32* %139, null
br i1 %140, label %153, label %19
141: ; preds = %132, %141
%142 = phi i64 [ %149, %141 ], [ %133, %132 ]
%143 = phi i32 [ %152, %141 ], [ %134, %132 ]
%144 = add nsw i32 %143, -1
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 %145
%147 = load i8, i8* %146
%148 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 %142
store i8 %147, i8* %148
%149 = add nuw nsw i64 %142, 1
%150 = add nsw i64 %149, %26
%151 = icmp sgt i64 %150, %27
%152 = trunc i64 %150 to i32
br i1 %151, label %135, label %141
153: ; preds = %135, %14
%154 = call i32 @fclose(i32* %9)
ret i32 0
}