#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*/ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseeko(int /*<<< orphan*/ *, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int memcmp(char *, char *, int);
int FileIsNotMVE(FILE *Movie) {
  char Control[20];
  fseeko(Movie, 0, SEEK_SET);
  fread(Control, 20, 1, Movie);
  fseeko(Movie, 0, SEEK_SET);
  return memcmp(Control, "Interplay MVE File\x1A\0", 20);
}


x86 assembly (clang, -O0):
<FileIsNotMVE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseeko@plt>
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x14,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e6e(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseeko@plt>
lea    -0x20(%rbp),%rdi
lea    0xe7a(%rip),%rsi
mov    $0x14,%edx
call   1040 <memcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileIsNotMVE>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
mov    0x2e9d(%rip),%r15
mov    (%r15),%edx
xor    %esi,%esi
call   1050 <fseeko@plt>
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
mov    (%r15),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <fseeko@plt>
lea    0xe87(%rip),%rsi
mov    %r14,%rdi
mov    $0x14,%edx
call   1040 <memcmp@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
@.str = [21 x i8] c"Interplay MVE File\1A\00\00"
define i32 @FileIsNotMVE(i32* %0) {
%2 = alloca i32*
%3 = alloca [20 x i8]
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_SET
%6 = call i32 @fseeko(i32* %4, i32 0, i32 %5)
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%8 = load i32*, i32** %2
%9 = call i32 @fread(i8* %7, i32 20, i32 1, i32* %8)
%10 = load i32*, i32** %2
%11 = load i32, i32* @SEEK_SET
%12 = call i32 @fseeko(i32* %10, i32 0, i32 %11)
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%14 = call i32 @memcmp(i8* %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 20)
ret i32 %14
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
@.str = [21 x i8] c"Interplay MVE File\1A\00\00"
define i32 @FileIsNotMVE(i32* nocapture %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @fseeko(i32* %0, i32 0, i32 %4)
%6 = call i32 @fread(i8* %3, i32 20, i32 1, i32* %0)
%7 = load i32, i32* @SEEK_SET
%8 = tail call i32 @fseeko(i32* %0, i32 0, i32 %7)
%9 = call i32 @memcmp(i8* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 20)
ret i32 %9
}