#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*/ SEEK_SET;
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int irecord[256];
  FILE *file;
  char *filename = "dump.inp";
  long filepos;
  file = fopen(filename, "rb");
  filepos = 7 * 1024;
  fseek(file, filepos, SEEK_SET);
  fread((char *)irecord, 1024, 1, file);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb0(%rip),%rax
mov    %rax,-0x420(%rbp)
mov    -0x420(%rbp),%rdi
lea    0xea4(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x418(%rbp)
movq   $0x1c00,-0x428(%rbp)
mov    -0x418(%rbp),%rdi
mov    -0x428(%rbp),%rsi
mov    0x2e4f(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
lea    -0x410(%rbp),%rdi
mov    -0x418(%rbp),%rcx
mov    $0x400,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
xor    %eax,%eax
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
lea    0xec1(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    0x2e8b(%rip),%rax
mov    (%rax),%edx
mov    $0x1c00,%esi
mov    %rbx,%rdi
call   1040 <fseek@plt>
mov    %rsp,%rdi
mov    $0x400,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"dump.inp\00"
@.str.1 = [3 x i8] c"rb\00"
@SEEK_SET = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [256 x i32]
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %8
%10 = load i8*, i8** %8
%11 = call i32* @fopen(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %11, i32** %7
store i64 7168, i64* %9
%12 = load i32*, i32** %7
%13 = load i64, i64* %9
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = getelementptr inbounds [256 x i32], [256 x i32]* %6, i64 0, i64 0
%17 = bitcast i32* %16 to i8*
%18 = load i32*, i32** %7
%19 = call i32 @fread(i8* %17, i32 1024, i32 1, i32* %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"dump.inp\00"
@.str.1 = [3 x i8] c"rb\00"
@SEEK_SET = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [256 x i32]
%4 = bitcast [256 x i32]* %3 to i8*
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %5, i64 7168, i32 %6)
%8 = call i32 @fread(i8* %4, i32 1024, i32 1, i32* %5)
ret i32 0
}