#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_bits(int *, int, char *, int *, int *);
void node_from_arb(char *arr, int *pos, int *bitpos, int bits_for_index,
                   int *letter, int *index, int *word_flag, int *end_flag) {
  read_bits(word_flag, (0x00000001), arr, pos, bitpos);
  read_bits(end_flag, (0x00000001), arr, pos, bitpos);
  read_bits(letter, (0x00000008), arr, pos, bitpos);
  read_bits(index, bits_for_index, arr, pos, bitpos);
}


x86 assembly (clang, -O0):
<node_from_arb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x1,%esi
call   1030 <read_bits@plt>
mov    0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x1,%esi
call   1030 <read_bits@plt>
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x8,%esi
call   1030 <read_bits@plt>
mov    -0x30(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1030 <read_bits@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<node_from_arb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,(%rsp)
mov    %r8,%r13
mov    %ecx,%r12d
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    0x48(%rsp),%r14
mov    0x40(%rsp),%rdi
mov    $0x1,%esi
mov    %rbp,%rdx
mov    %rbx,%rcx
mov    %r15,%r8
call   1030 <read_bits@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %rbp,%rdx
mov    %rbx,%rcx
mov    %r15,%r8
call   1030 <read_bits@plt>
mov    %r13,%rdi
mov    $0x8,%esi
mov    %rbp,%rdx
mov    %rbx,%rcx
mov    %r15,%r8
call   1030 <read_bits@plt>
mov    (%rsp),%rdi
mov    %r12d,%esi
mov    %rbp,%rdx
mov    %rbx,%rcx
mov    %r15,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <read_bits@plt>

LLVM IR (-O0):
define void @node_from_arb(i8* %0, i32* %1, i32* %2, i32 %3, i32* %4, i32* %5, i32* %6, i32* %7) {
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
store i8* %0, i8** %9
store i32* %1, i32** %10
store i32* %2, i32** %11
store i32 %3, i32* %12
store i32* %4, i32** %13
store i32* %5, i32** %14
store i32* %6, i32** %15
store i32* %7, i32** %16
%17 = load i32*, i32** %15
%18 = load i8*, i8** %9
%19 = load i32*, i32** %10
%20 = load i32*, i32** %11
%21 = call i32 @read_bits(i32* %17, i32 1, i8* %18, i32* %19, i32* %20)
%22 = load i32*, i32** %16
%23 = load i8*, i8** %9
%24 = load i32*, i32** %10
%25 = load i32*, i32** %11
%26 = call i32 @read_bits(i32* %22, i32 1, i8* %23, i32* %24, i32* %25)
%27 = load i32*, i32** %13
%28 = load i8*, i8** %9
%29 = load i32*, i32** %10
%30 = load i32*, i32** %11
%31 = call i32 @read_bits(i32* %27, i32 8, i8* %28, i32* %29, i32* %30)
%32 = load i32*, i32** %14
%33 = load i32, i32* %12
%34 = load i8*, i8** %9
%35 = load i32*, i32** %10
%36 = load i32*, i32** %11
%37 = call i32 @read_bits(i32* %32, i32 %33, i8* %34, i32* %35, i32* %36)
ret void
}

LLVM IR (-O2):
define void @node_from_arb(i8* %0, i32* %1, i32* %2, i32 %3, i32* %4, i32* %5, i32* %6, i32* %7) {
%9 = tail call i32 @read_bits(i32* %6, i32 1, i8* %0, i32* %1, i32* %2)
%10 = tail call i32 @read_bits(i32* %7, i32 1, i8* %0, i32* %1, i32* %2)
%11 = tail call i32 @read_bits(i32* %4, i32 8, i8* %0, i32* %1, i32* %2)
%12 = tail call i32 @read_bits(i32* %5, i32 %3, i8* %0, i32* %1, i32* %2)
ret void
}