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

/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int extract_from_line_to_line(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc != 4) {
    fprintf(stderr, "Usage: extract_from_line_to_line <file> <from> <to>\n");
    return -1;
  }
  return extract_from_line_to_line(argv[1], atoi(argv[2]), atoi(argv[3]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     1171 <main+0x41>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11ab <main+0x7b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
call   1040 <extract_from_line_to_line@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x4,%edi
jne    1164 <main+0x34>
mov    %rsi,%rbx
mov    0x8(%rsi),%r14
mov    0x10(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    0x18(%rbx),%rdi
call   1050 <atoi@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <extract_from_line_to_line@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
lea    0xe8c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"Usage: extract_from_line_to_line <file> <from> <to>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 4
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %24
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 2
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 3
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
%23 = call i32 @extract_from_line_to_line(i8* %14, i32 %18, i32 %22)
store i32 %23, i32* %3
br label %24
24: ; preds = %11, %8
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"Usage: extract_from_line_to_line <file> <from> <to>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 4
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
br label %17
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = getelementptr inbounds i8*, i8** %1, i64 3
%14 = load i8*, i8** %13
%15 = tail call i32 @atoi(i8* %14)
%16 = tail call i32 @extract_from_line_to_line(i8* %9, i32 %12, i32 %15)
br label %17
17: ; preds = %7, %4
%18 = phi i32 [ -1, %4 ], [ %16, %7 ]
ret i32 %18
}