#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 getcNofail(int /*<<< orphan*/ *const);
int pm_readlittlelong(FILE *const ifP, long *const lP) {
  unsigned long l;
  l = getcNofail(ifP) << 0;
  l |= getcNofail(ifP) << 8;
  l |= getcNofail(ifP) << 16;
  l |= getcNofail(ifP) << 24;
  *lP = l;
  return 0;
}


x86 assembly (clang, -O0):
<pm_readlittlelong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getcNofail@plt>
shl    $0x0,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getcNofail@plt>
shl    $0x8,%eax
cltq
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getcNofail@plt>
shl    $0x10,%eax
cltq
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getcNofail@plt>
shl    $0x18,%eax
cltq
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm_readlittlelong>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r12
call   1030 <getcNofail@plt>
mov    %eax,%r15d
mov    %r12,%rdi
call   1030 <getcNofail@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
or     %r15d,%ebp
mov    %r12,%rdi
call   1030 <getcNofail@plt>
mov    %eax,%ebx
shl    $0x10,%ebx
mov    %r12,%rdi
call   1030 <getcNofail@plt>
shl    $0x18,%eax
or     %ebx,%eax
or     %ebp,%eax
cltq
mov    %rax,(%r14)
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pm_readlittlelong(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
%5 = alloca i64
store i32* %0, i32** %3
store i64* %1, i64** %4
%6 = load i32*, i32** %3
%7 = call i32 @getcNofail(i32* %6)
%8 = shl i32 %7, 0
%9 = sext i32 %8 to i64
store i64 %9, i64* %5
%10 = load i32*, i32** %3
%11 = call i32 @getcNofail(i32* %10)
%12 = shl i32 %11, 8
%13 = sext i32 %12 to i64
%14 = load i64, i64* %5
%15 = or i64 %14, %13
store i64 %15, i64* %5
%16 = load i32*, i32** %3
%17 = call i32 @getcNofail(i32* %16)
%18 = shl i32 %17, 16
%19 = sext i32 %18 to i64
%20 = load i64, i64* %5
%21 = or i64 %20, %19
store i64 %21, i64* %5
%22 = load i32*, i32** %3
%23 = call i32 @getcNofail(i32* %22)
%24 = shl i32 %23, 24
%25 = sext i32 %24 to i64
%26 = load i64, i64* %5
%27 = or i64 %26, %25
store i64 %27, i64* %5
%28 = load i64, i64* %5
%29 = load i64*, i64** %4
store i64 %28, i64* %29
ret i32 0
}

LLVM IR (-O2):
define i32 @pm_readlittlelong(i32* %0, i64* nocapture writeonly %1) {
%3 = tail call i32 @getcNofail(i32* %0)
%4 = tail call i32 @getcNofail(i32* %0)
%5 = shl i32 %4, 8
%6 = or i32 %5, %3
%7 = tail call i32 @getcNofail(i32* %0)
%8 = shl i32 %7, 16
%9 = or i32 %6, %8
%10 = tail call i32 @getcNofail(i32* %0)
%11 = shl i32 %10, 24
%12 = or i32 %9, %11
%13 = sext i32 %12 to i64
store i64 %13, i64* %1
ret i32 0
}