#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 */

/* Variables and functions */
int /*<<< orphan*/ _read_nbits(int);
int /*<<< orphan*/ byte_align();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
int _read_uint_lit(int n) {
  byte_align();
  do {
    if (!(_read_nbits(n * 8))) {
      fprintf(stderr, "'%s' check failed at line %d\n", "_read_nbits(n * 8)",
              426);
      return 0;
    }
  } while (0);
  return 1;
}


x86 assembly (clang, -O0):
<_read_uint_lit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <byte_align@plt>
mov    -0x8(%rbp),%edi
shl    $0x3,%edi
call   1050 <_read_nbits@plt>
cmp    $0x0,%eax
jne    1183 <_read_uint_lit+0x53>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    0xe9a(%rip),%rsi
lea    0xeb1(%rip),%rdx
mov    $0x1aa,%ecx
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    118f <_read_uint_lit+0x5f>
jmp    1188 <_read_uint_lit+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_read_uint_lit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <byte_align@plt>
shl    $0x3,%ebx
mov    %ebx,%edi
call   1050 <_read_nbits@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
je     1151 <_read_uint_lit+0x21>
pop    %rbx
ret
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    0xe9f(%rip),%rsi
lea    0xeb6(%rip),%rdx
mov    $0x1aa,%ecx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"'%s' check failed at line %d\0A\00"
@.str.1 = [19 x i8] c"_read_nbits(n * 8)\00"
define i32 @_read_uint_lit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (...) @byte_align()
br label %5
5: ; preds = %1
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 8
%8 = call i32 @_read_nbits(i32 %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %5
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 426)
store i32 0, i32* %2
br label %15
13: ; preds = %5
br label %14
14: ; preds = %13
store i32 1, i32* %2
br label %15
15: ; preds = %14, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"'%s' check failed at line %d\0A\00"
@.str.1 = [19 x i8] c"_read_nbits(n * 8)\00"
define i32 @_read_uint_lit(i32 %0) {
%2 = tail call i32 (...) @byte_align()
%3 = shl nsw i32 %0, 3
%4 = tail call i32 @_read_nbits(i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 426)
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ 0, %6 ], [ 1, %1 ]
ret i32 %10
}