unsigned long int fread(void *restrict __ptr, unsigned long int __size,
                        unsigned long int __n,
                        struct _IO_FILE *restrict __stream) {
  unsigned long int return_value___fread_chk$1;
  unsigned long int return_value___fread_chk_warn$2;
  if ((_Bool)0) {
  __CPROVER_DUMP_L1:;
    return_value___fread_chk$1 =
        __fread_chk(__ptr, 18446744073709551615ul, __size, __n, __stream);
    return return_value___fread_chk$1;
    if (__n * __size > 18446744073709551615ul) {
      return_value___fread_chk_warn$2 = __fread_chk_warn(
          __ptr, 18446744073709551615ul, __size, __n, __stream);
      return return_value___fread_chk_warn$2;
    }
  }
  unsigned long int return_value___fread_alias$3;
  return_value___fread_alias$3 = __fread_alias(__ptr, __size, __n, __stream);
  return return_value___fread_alias$3;
}


x86 assembly (clang, -O0):
<fread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    1147 <fread+0x27>
jmp    117d <fread+0x5d>
jmp    114c <fread+0x2c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0xffffffffffffffff,%rsi
mov    $0x0,%al
call   1030 <__fread_chk@plt>
cltq
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11a2 <fread+0x82>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x0,%al
call   1040 <__fread_alias@plt>
cltq
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fread>:
push   %rax
xor    %eax,%eax
call   1030 <__fread_alias@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct._IO_FILE = type opaque
define i64 @fread(i8* noalias %0, i64 %1, i64 %2, %struct._IO_FILE* noalias %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca %struct._IO_FILE*
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store i8* %0, i8** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store %struct._IO_FILE* %3, %struct._IO_FILE** %9
br i1 false, label %13, label %22
13: ; preds = %4
br label %14
14: ; preds = %13
%15 = load i8*, i8** %6
%16 = load i64, i64* %7
%17 = load i64, i64* %8
%18 = load %struct._IO_FILE*, %struct._IO_FILE** %9
%19 = call i32 (i8*, i64, i64, i64, %struct._IO_FILE*, ...) bitcast (i32 (...)* @__fread_chk to i32 (i8*, i64, i64, i64, %struct._IO_FILE*, ...)*)(i8* %15, i64 -1, i64 %16, i64 %17, %struct._IO_FILE* %18)
%20 = sext i32 %19 to i64
store i64 %20, i64* %10
%21 = load i64, i64* %10
store i64 %21, i64* %5
br label %30
22: ; preds = %4
%23 = load i8*, i8** %6
%24 = load i64, i64* %7
%25 = load i64, i64* %8
%26 = load %struct._IO_FILE*, %struct._IO_FILE** %9
%27 = call i32 (i8*, i64, i64, %struct._IO_FILE*, ...) bitcast (i32 (...)* @__fread_alias to i32 (i8*, i64, i64, %struct._IO_FILE*, ...)*)(i8* %23, i64 %24, i64 %25, %struct._IO_FILE* %26)
%28 = sext i32 %27 to i64
store i64 %28, i64* %12
%29 = load i64, i64* %12
store i64 %29, i64* %5
br label %30
30: ; preds = %22, %14
%31 = load i64, i64* %5
ret i64 %31
}

LLVM IR (-O2):
%struct._IO_FILE = type opaque
define i64 @fread(i8* noalias %0, i64 %1, i64 %2, %struct._IO_FILE* noalias %3) {
%5 = tail call i32 (i8*, i64, i64, %struct._IO_FILE*, ...) bitcast (i32 (...)* @__fread_alias to i32 (i8*, i64, i64, %struct._IO_FILE*, ...)*)(i8* %0, i64 %1, i64 %2, %struct._IO_FILE* %3)
%6 = sext i32 %5 to i64
ret i64 %6
}