#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_END;
short compareSection(int /*<<< orphan*/ *, long, int, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
short producerStringWithXrefEntries(FILE *file, int xrefEntries) {
  int newOffset = 1748 + 20 * (xrefEntries - 75);
  fseek(file, -(newOffset), SEEK_END);
  long offset = ftell(file);
  return compareSection(file, offset, 43,
                        "/Producer (Antenna House PDF Output Library");
}


x86 assembly (clang, -O0):
<producerStringWithXrefEntries>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x4b,%eax
imul   $0x14,%eax,%eax
add    $0x6d4,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
sub    -0x10(%rbp),%esi
mov    0x2e88(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x2b,%edx
lea    0xe78(%rip),%rcx
call   1050 <compareSection@plt>
cwtl
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<producerStringWithXrefEntries>:
push   %rbx
mov    %rdi,%rbx
shl    $0x2,%esi
lea    (%rsi,%rsi,4),%eax
mov    $0xffffff08,%esi
sub    %eax,%esi
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
lea    0xea2(%rip),%rcx
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0x2b,%edx
pop    %rbx
jmp    1050 <compareSection@plt>

LLVM IR (-O0):
@SEEK_END = global i32 0
@.str = [44 x i8] c"/Producer (Antenna House PDF Output Library\00"
define signext i16 @producerStringWithXrefEntries(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 75
%9 = mul nsw i32 20, %8
%10 = add nsw i32 1748, %9
store i32 %10, i32* %5
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sub nsw i32 0, %12
%14 = load i32, i32* @SEEK_END
%15 = call i32 @fseek(i32* %11, i32 %13, i32 %14)
%16 = load i32*, i32** %3
%17 = call i64 @ftell(i32* %16)
store i64 %17, i64* %6
%18 = load i32*, i32** %3
%19 = load i64, i64* %6
%20 = call signext i16 @compareSection(i32* %18, i64 %19, i32 43, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i16 %20
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@.str = [44 x i8] c"/Producer (Antenna House PDF Output Library\00"
define signext i16 @producerStringWithXrefEntries(i32* %0, i32 %1) {
%3 = mul i32 %1, -20
%4 = add i32 %3, -248
%5 = load i32, i32* @SEEK_END
%6 = tail call i32 @fseek(i32* %0, i32 %4, i32 %5)
%7 = tail call i64 @ftell(i32* %0)
%8 = tail call signext i16 @compareSection(i32* %0, i64 %7, i32 43, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i16 %8
}