#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*/ forward_std(unsigned char, unsigned char, unsigned char);
int rf_disposition(unsigned char, unsigned char, unsigned char);
int /*<<< orphan*/ transceive_std(unsigned char, unsigned char, unsigned char);
int proc_type_std(unsigned char hcode, unsigned char ucode,
                  unsigned char fcode) {
  int dispo;
  dispo = rf_disposition(hcode, ucode, fcode);
  if (dispo == 2)
    transceive_std(hcode, ucode, fcode);
  else if (dispo == 1)
    forward_std(hcode, ucode, fcode);
  return 0;
}


x86 assembly (clang, -O0):
<proc_type_std>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x2(%rbp),%al
movzbl %cl,%edi
movzbl %al,%esi
movzbl -0x3(%rbp),%edx
call   1050 <rf_disposition@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1185 <proc_type_std+0x55>
mov    -0x1(%rbp),%cl
mov    -0x2(%rbp),%al
movzbl %cl,%edi
movzbl %al,%esi
movzbl -0x3(%rbp),%edx
call   1030 <transceive_std@plt>
jmp    11a9 <proc_type_std+0x79>
cmpl   $0x1,-0x8(%rbp)
jne    11a4 <proc_type_std+0x74>
mov    -0x1(%rbp),%cl
mov    -0x2(%rbp),%al
movzbl %cl,%edi
movzbl %al,%esi
movzbl -0x3(%rbp),%edx
call   1040 <forward_std@plt>
jmp    11a9 <proc_type_std+0x79>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_type_std>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
call   1050 <rf_disposition@plt>
cmp    $0x1,%eax
je     115c <proc_type_std+0x2c>
cmp    $0x2,%eax
jne    116c <proc_type_std+0x3c>
movzbl %bl,%edi
movzbl %bpl,%esi
movzbl %r14b,%edx
call   1030 <transceive_std@plt>
jmp    116c <proc_type_std+0x3c>
movzbl %bl,%edi
movzbl %bpl,%esi
movzbl %r14b,%edx
call   1040 <forward_std@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @proc_type_std(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %4
%9 = load i8, i8* %5
%10 = load i8, i8* %6
%11 = call i32 @rf_disposition(i8 zeroext %8, i8 zeroext %9, i8 zeroext %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %19
14: ; preds = %3
%15 = load i8, i8* %4
%16 = load i8, i8* %5
%17 = load i8, i8* %6
%18 = call i32 @transceive_std(i8 zeroext %15, i8 zeroext %16, i8 zeroext %17)
br label %28
19: ; preds = %3
%20 = load i32, i32* %7
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %27
22: ; preds = %19
%23 = load i8, i8* %4
%24 = load i8, i8* %5
%25 = load i8, i8* %6
%26 = call i32 @forward_std(i8 zeroext %23, i8 zeroext %24, i8 zeroext %25)
br label %27
27: ; preds = %22, %19
br label %28
28: ; preds = %27, %14
ret i32 0
}

LLVM IR (-O2):
define i32 @proc_type_std(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i32 @rf_disposition(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2)
switch i32 %4, label %9 [
i32 2, label %5
i32 1, label %7
]
5: ; preds = %3
%6 = tail call i32 @transceive_std(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2)
br label %9
7: ; preds = %3
%8 = tail call i32 @forward_std(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2)
br label %9
9: ; preds = %3, %7, %5
ret i32 0
}