#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 transport {
  int dummy;
};

/* Variables and functions */
int message_process(struct transport *, char *, int, int, int, int);
int process_message(struct transport *tp, char *username, int max_size,
                    int in_fd, int out_fd, const int my_check_only,
                    const int my_safe_fallback) {
  int flags;
  flags = 0;
  if (my_check_only)
    flags |= (1 << 29);
  if (my_safe_fallback)
    flags |= (1 << 28);
  return message_process(tp, username, max_size, in_fd, out_fd, flags);
}


x86 assembly (clang, -O0):
<process_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     114d <process_message+0x3d>
mov    -0x24(%rbp),%eax
or     $0x20000000,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,0x10(%rbp)
je     1162 <process_message+0x52>
mov    -0x24(%rbp),%eax
or     $0x10000000,%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1030 <message_process@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_message>:
xor    %eax,%eax
test   %r9d,%r9d
setne  %al
shl    $0x1d,%eax
lea    0x10000000(%rax),%r9d
cmpl   $0x0,0x8(%rsp)
cmove  %eax,%r9d
jmp    1030 <message_process@plt>

LLVM IR (-O0):
%struct.transport = type { i32 }
define i32 @process_message(%struct.transport* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca %struct.transport*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store %struct.transport* %0, %struct.transport** %8
store i8* %1, i8** %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
store i32 0, i32* %15
%16 = load i32, i32* %13
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %7
%19 = load i32, i32* %15
%20 = or i32 %19, 536870912
store i32 %20, i32* %15
br label %21
21: ; preds = %18, %7
%22 = load i32, i32* %14
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* %15
%26 = or i32 %25, 268435456
store i32 %26, i32* %15
br label %27
27: ; preds = %24, %21
%28 = load %struct.transport*, %struct.transport** %8
%29 = load i8*, i8** %9
%30 = load i32, i32* %10
%31 = load i32, i32* %11
%32 = load i32, i32* %12
%33 = load i32, i32* %15
%34 = call i32 @message_process(%struct.transport* %28, i8* %29, i32 %30, i32 %31, i32 %32, i32 %33)
ret i32 %34
}

LLVM IR (-O2):
%struct.transport = type { i32 }
define i32 @process_message(%struct.transport* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = icmp eq i32 %5, 0
%9 = select i1 %8, i32 0, i32 536870912
%10 = icmp eq i32 %6, 0
%11 = or i32 %9, 268435456
%12 = select i1 %10, i32 %9, i32 %11
%13 = tail call i32 @message_process(%struct.transport* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %12)
ret i32 %13
}