#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 scalar_t__ uint_fast32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned int CHAR_BIT;
int getc_unlocked(int /*<<< orphan*/ *);
unsigned int readInBytes(uint_fast32_t BitsCount, FILE *InputFile) {
  int TempChar = getc_unlocked(InputFile);
  unsigned int Number = TempChar;
  for (uint_fast32_t i = CHAR_BIT; i < BitsCount; i += CHAR_BIT) {
    TempChar = getc_unlocked(InputFile);
    Number <<= CHAR_BIT;
    Number += TempChar;
  }
  return (Number);
}


x86 assembly (clang, -O0):
<readInBytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getc_unlocked@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1189 <readInBytes+0x79>
mov    -0x10(%rbp),%rdi
call   1030 <getc_unlocked@plt>
mov    %eax,-0x14(%rbp)
mov    0x2e80(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    0x2e66(%rip),%rax
mov    (%rax),%eax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    113f <readInBytes+0x2f>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readInBytes>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r12
mov    %rsi,%rdi
call   1030 <getc_unlocked@plt>
mov    %eax,%ebp
mov    0x2eb1(%rip),%r15
mov    (%r15),%ebx
cmp    %r12,%rbx
jge    1157 <readInBytes+0x47>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <getc_unlocked@plt>
mov    (%r15),%ecx
shl    %cl,%ebp
add    %eax,%ebp
add    %rcx,%rbx
cmp    %r12,%rbx
jl     1140 <readInBytes+0x30>
mov    %ebp,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define i32 @readInBytes(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
store i64 %0, i64* %3
store i32* %1, i32** %4
%8 = load i32*, i32** %4
%9 = call i32 @getc_unlocked(i32* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
store i32 %10, i32* %6
%11 = load i32, i32* @CHAR_BIT
%12 = zext i32 %11 to i64
store i64 %12, i64* %7
br label %13
13: ; preds = %26, %2
%14 = load i64, i64* %7
%15 = load i64, i64* %3
%16 = icmp slt i64 %14, %15
br i1 %16, label %17, label %31
17: ; preds = %13
%18 = load i32*, i32** %4
%19 = call i32 @getc_unlocked(i32* %18)
store i32 %19, i32* %5
%20 = load i32, i32* @CHAR_BIT
%21 = load i32, i32* %6
%22 = shl i32 %21, %20
store i32 %22, i32* %6
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = add i32 %24, %23
store i32 %25, i32* %6
br label %26
26: ; preds = %17
%27 = load i32, i32* @CHAR_BIT
%28 = zext i32 %27 to i64
%29 = load i64, i64* %7
%30 = add nsw i64 %29, %28
store i64 %30, i64* %7
br label %13
31: ; preds = %13
%32 = load i32, i32* %6
ret i32 %32
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define i32 @readInBytes(i64 %0, i32* nocapture %1) {
%3 = tail call i32 @getc_unlocked(i32* %1)
%4 = load i32, i32* @CHAR_BIT
%5 = zext i32 %4 to i64
%6 = icmp slt i64 %5, %0
br i1 %6, label %9, label %7
7: ; preds = %9, %2
%8 = phi i32 [ %3, %2 ], [ %15, %9 ]
ret i32 %8
9: ; preds = %2, %9
%10 = phi i64 [ %17, %9 ], [ %5, %2 ]
%11 = phi i32 [ %15, %9 ], [ %3, %2 ]
%12 = tail call i32 @getc_unlocked(i32* %1)
%13 = load i32, i32* @CHAR_BIT
%14 = shl i32 %11, %13
%15 = add i32 %14, %12
%16 = zext i32 %13 to i64
%17 = add nuw nsw i64 %10, %16
%18 = icmp slt i64 %17, %0
br i1 %18, label %9, label %7
}