#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 */
struct type {
  int dummy;
};
struct compile_state {
  int dummy;
};

/* Variables and functions */
unsigned int attributes_opt(struct compile_state *, int /*<<< orphan*/);
unsigned int function_specifier_opt(struct compile_state *);
unsigned int storage_class_specifier_opt(struct compile_state *);
unsigned int type_qualifiers(struct compile_state *);
struct type *type_specifier(struct compile_state *, unsigned int);
struct type *decl_specifiers(struct compile_state *state) {
  struct type *type;
  unsigned int specifiers;
  specifiers = 0;
  specifiers |= storage_class_specifier_opt(state);
  specifiers |= function_specifier_opt(state);
  specifiers |= attributes_opt(state, 0);
  specifiers |= type_qualifiers(state);
  type = type_specifier(state, specifiers);
  return type;
}


x86 assembly (clang, -O0):
<decl_specifiers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <storage_class_specifier_opt@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <function_specifier_opt@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1050 <attributes_opt@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <type_qualifiers@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1070 <type_specifier@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decl_specifiers>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <storage_class_specifier_opt@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1060 <function_specifier_opt@plt>
or     %eax,%ebp
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <attributes_opt@plt>
or     %eax,%ebp
mov    %rbx,%rdi
call   1040 <type_qualifiers@plt>
or     %eax,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1070 <type_specifier@plt>

LLVM IR (-O0):
%struct.type = type { i32 }
%struct.compile_state = type { i32 }
define %struct.type* @decl_specifiers(%struct.compile_state* %0) {
%2 = alloca %struct.compile_state*
%3 = alloca %struct.type*
%4 = alloca i32
store %struct.compile_state* %0, %struct.compile_state** %2
store i32 0, i32* %4
%5 = load %struct.compile_state*, %struct.compile_state** %2
%6 = call i32 @storage_class_specifier_opt(%struct.compile_state* %5)
%7 = load i32, i32* %4
%8 = or i32 %7, %6
store i32 %8, i32* %4
%9 = load %struct.compile_state*, %struct.compile_state** %2
%10 = call i32 @function_specifier_opt(%struct.compile_state* %9)
%11 = load i32, i32* %4
%12 = or i32 %11, %10
store i32 %12, i32* %4
%13 = load %struct.compile_state*, %struct.compile_state** %2
%14 = call i32 @attributes_opt(%struct.compile_state* %13, i32 0)
%15 = load i32, i32* %4
%16 = or i32 %15, %14
store i32 %16, i32* %4
%17 = load %struct.compile_state*, %struct.compile_state** %2
%18 = call i32 @type_qualifiers(%struct.compile_state* %17)
%19 = load i32, i32* %4
%20 = or i32 %19, %18
store i32 %20, i32* %4
%21 = load %struct.compile_state*, %struct.compile_state** %2
%22 = load i32, i32* %4
%23 = call %struct.type* @type_specifier(%struct.compile_state* %21, i32 %22)
store %struct.type* %23, %struct.type** %3
%24 = load %struct.type*, %struct.type** %3
ret %struct.type* %24
}

LLVM IR (-O2):
%struct.type = type { i32 }
%struct.compile_state = type { i32 }
define %struct.type* @decl_specifiers(%struct.compile_state* %0) {
%2 = tail call i32 @storage_class_specifier_opt(%struct.compile_state* %0)
%3 = tail call i32 @function_specifier_opt(%struct.compile_state* %0)
%4 = or i32 %3, %2
%5 = tail call i32 @attributes_opt(%struct.compile_state* %0, i32 0)
%6 = or i32 %4, %5
%7 = tail call i32 @type_qualifiers(%struct.compile_state* %0)
%8 = or i32 %6, %7
%9 = tail call %struct.type* @type_specifier(%struct.compile_state* %0, i32 %8)
ret %struct.type* %9
}