#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*/ __local_outb(unsigned char, unsigned long);
int /*<<< orphan*/ _bus_outb(unsigned char, unsigned long);
extern void __outb(unsigned char b, unsigned long addr) {
  if (((addr == 0x60 || addr == 0x64) || (addr == 0x170 || addr == 0x171) ||
       (addr >= 0x2f8 && addr <= 0x2ff) || (addr >= 0x3bc && addr <= 0x3be) ||
       (addr >= 0x3f8 && addr <= 0x3ff)))
    __local_outb(b, addr);
  else
    _bus_outb(b, addr);
}


x86 assembly (clang, -O0):
<__outb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x60,-0x10(%rbp)
je     11b8 <__outb+0x98>
cmpq   $0x64,-0x10(%rbp)
je     11b8 <__outb+0x98>
cmpq   $0x170,-0x10(%rbp)
je     11b8 <__outb+0x98>
cmpq   $0x171,-0x10(%rbp)
je     11b8 <__outb+0x98>
cmpq   $0x2f8,-0x10(%rbp)
jb     1180 <__outb+0x60>
cmpq   $0x2ff,-0x10(%rbp)
jbe    11b8 <__outb+0x98>
cmpq   $0x3bc,-0x10(%rbp)
jb     119c <__outb+0x7c>
cmpq   $0x3be,-0x10(%rbp)
jbe    11b8 <__outb+0x98>
cmpq   $0x3f8,-0x10(%rbp)
jb     11cc <__outb+0xac>
cmpq   $0x3ff,-0x10(%rbp)
ja     11cc <__outb+0xac>
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <__local_outb@plt>
jmp    11db <__outb+0xbb>
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1040 <_bus_outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__outb>:
lea    -0x170(%rsi),%rax
cmp    $0x2,%rax
jb     115b <__outb+0x3b>
cmp    $0x60,%rsi
je     115b <__outb+0x3b>
cmp    $0x64,%rsi
je     115b <__outb+0x3b>
lea    -0x3bc(%rsi),%rax
cmp    $0x3,%rax
jb     115b <__outb+0x3b>
mov    %rsi,%rax
or     $0x100,%rax
and    $0xfffffffffffffff8,%rax
cmp    $0x3f8,%rax
jne    1164 <__outb+0x44>
movzbl %dil,%edi
jmp    1030 <__local_outb@plt>
movzbl %dil,%edi
jmp    1040 <_bus_outb@plt>

LLVM IR (-O0):
define void @__outb(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 96
br i1 %6, label %34, label %7
7: ; preds = %2
%8 = load i64, i64* %4
%9 = icmp eq i64 %8, 100
br i1 %9, label %34, label %10
10: ; preds = %7
%11 = load i64, i64* %4
%12 = icmp eq i64 %11, 368
br i1 %12, label %34, label %13
13: ; preds = %10
%14 = load i64, i64* %4
%15 = icmp eq i64 %14, 369
br i1 %15, label %34, label %16
16: ; preds = %13
%17 = load i64, i64* %4
%18 = icmp uge i64 %17, 760
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load i64, i64* %4
%21 = icmp ule i64 %20, 767
br i1 %21, label %34, label %22
22: ; preds = %19, %16
%23 = load i64, i64* %4
%24 = icmp uge i64 %23, 956
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = load i64, i64* %4
%27 = icmp ule i64 %26, 958
br i1 %27, label %34, label %28
28: ; preds = %25, %22
%29 = load i64, i64* %4
%30 = icmp uge i64 %29, 1016
br i1 %30, label %31, label %38
31: ; preds = %28
%32 = load i64, i64* %4
%33 = icmp ule i64 %32, 1023
br i1 %33, label %34, label %38
34: ; preds = %31, %25, %19, %13, %10, %7, %2
%35 = load i8, i8* %3
%36 = load i64, i64* %4
%37 = call i32 @__local_outb(i8 zeroext %35, i64 %36)
br label %42
38: ; preds = %31, %28
%39 = load i8, i8* %3
%40 = load i64, i64* %4
%41 = call i32 @_bus_outb(i8 zeroext %39, i64 %40)
br label %42
42: ; preds = %38, %34
ret void
}

LLVM IR (-O2):
define void @__outb(i8 zeroext %0, i64 %1) {
switch i64 %1, label %3 [
i64 369, label %8
i64 368, label %8
i64 100, label %8
i64 96, label %8
]
3: ; preds = %2
%4 = add i64 %1, -956
%5 = icmp ult i64 %4, 3
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = and i64 %1, -8
switch i64 %7, label %10 [
i64 1016, label %8
i64 760, label %8
]
8: ; preds = %6, %6, %3, %2, %2, %2, %2
%9 = tail call i32 @__local_outb(i8 zeroext %0, i64 %1)
br label %12
10: ; preds = %6
%11 = tail call i32 @_bus_outb(i8 zeroext %0, i64 %1)
br label %12
12: ; preds = %10, %8
ret void
}