#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 */
unsigned long get_dmxflag_state(unsigned char, unsigned char);
unsigned long get_oreflag_state(unsigned char, unsigned char);
unsigned long get_rfxflag_state(unsigned char, unsigned char);
unsigned long get_secflag_state(unsigned char, unsigned char);
unsigned long get_vflag_state(unsigned char hcode, unsigned char ucode) {
  return get_secflag_state(hcode, ucode) | get_rfxflag_state(hcode, ucode) |
         get_oreflag_state(hcode, ucode) | get_dmxflag_state(hcode, ucode);
}


x86 assembly (clang, -O0):
<get_vflag_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzbl -0x2(%rbp),%esi
call   1030 <get_secflag_state@plt>
mov    %rax,-0x20(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzbl -0x2(%rbp),%esi
call   1040 <get_rfxflag_state@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzbl -0x2(%rbp),%esi
call   1060 <get_oreflag_state@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzbl -0x2(%rbp),%esi
call   1050 <get_dmxflag_state@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
or     %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_vflag_state>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <get_secflag_state@plt>
mov    %rax,%r14
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <get_rfxflag_state@plt>
mov    %rax,%r15
or     %r14,%r15
mov    %ebp,%edi
mov    %ebx,%esi
call   1060 <get_oreflag_state@plt>
mov    %rax,%r14
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <get_dmxflag_state@plt>
or     %r14,%rax
or     %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i64 @get_vflag_state(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = load i8, i8* %4
%7 = call i64 @get_secflag_state(i8 zeroext %5, i8 zeroext %6)
%8 = load i8, i8* %3
%9 = load i8, i8* %4
%10 = call i64 @get_rfxflag_state(i8 zeroext %8, i8 zeroext %9)
%11 = or i64 %7, %10
%12 = load i8, i8* %3
%13 = load i8, i8* %4
%14 = call i64 @get_oreflag_state(i8 zeroext %12, i8 zeroext %13)
%15 = or i64 %11, %14
%16 = load i8, i8* %3
%17 = load i8, i8* %4
%18 = call i64 @get_dmxflag_state(i8 zeroext %16, i8 zeroext %17)
%19 = or i64 %15, %18
ret i64 %19
}

LLVM IR (-O2):
define i64 @get_vflag_state(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i64 @get_secflag_state(i8 zeroext %0, i8 zeroext %1)
%4 = tail call i64 @get_rfxflag_state(i8 zeroext %0, i8 zeroext %1)
%5 = or i64 %4, %3
%6 = tail call i64 @get_oreflag_state(i8 zeroext %0, i8 zeroext %1)
%7 = or i64 %5, %6
%8 = tail call i64 @get_dmxflag_state(i8 zeroext %0, i8 zeroext %1)
%9 = or i64 %7, %8
ret i64 %9
}