#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*/ mdelay(int);
int readl(int);
int /*<<< orphan*/ udelay(int);
int /*<<< orphan*/ writel(int, int);
void hiusb_ohci_enable_clk(void) {
  int reg;
  reg = readl((0x12040000 + 0x19c));
  reg |= ((1 << 12) | (1 << 13) | (1 << 14) | (1 << 16) | (1 << 17));
  writel(reg, (0x12040000 + 0x19c));
  udelay(200);
  reg = readl((0x12040000 + 0x1a0));
  reg |= ((1 << 8) | (1 << 9) | (1 << 11));
  writel(reg, (0x12040000 + 0x1a0));
  udelay(200);
  reg = readl((0x12120000 + 0x7c));
  reg |= (1 << 3);
  reg &= ~((1 << 0));
  reg &= ~((1 << 9));
  writel(reg, (0x12120000 + 0x7c));
  udelay(100);
  mdelay(10);
  reg = readl((0x12040000 + 0x1a0));
  reg |= ((1 << 0));
  writel(reg, (0x12040000 + 0x1a0));
  udelay(100);
  reg = readl((0x12040000 + 0x1a0));
  reg &= ~((1 << 8));
  writel(reg, (0x12040000 + 0x1a0));
  udelay(300);
  reg = readl((0x12120000 + 0x80));
  reg |= ((0x1 << 5) | (0x3 << 1) | (0xc << 8));
  writel(reg, (0x12120000 + 0x80));
  udelay(100);
  writel(0x0, (0x12120000 + 0x80));
  mdelay(2);
  reg = readl((0x12040000 + 0x1a0));
  reg &= ~((1 << 9) | (1 << 11));
  writel(reg, (0x12040000 + 0x1a0));
  udelay(300);
  reg = readl((0x12040000 + 0x19c));
  reg &= ~((1 << 12) | (1 << 13) | (1 << 14) | (1 << 16) | (1 << 17));
  reg |= ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 4) | (1 << 5) | (1 << 6));
  writel(reg, (0x12040000 + 0x19c));
  udelay(200);
}


x86 assembly (clang, -O0):
<hiusb_ohci_enable_clk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1204019c,%edi
call   1040 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x37000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1204019c,%esi
call   1060 <writel@plt>
mov    $0xc8,%edi
call   1050 <udelay@plt>
mov    $0x120401a0,%edi
call   1040 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0xb00,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x120401a0,%esi
call   1060 <writel@plt>
mov    $0xc8,%edi
call   1050 <udelay@plt>
mov    $0x1212007c,%edi
call   1040 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffffe,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffdff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1212007c,%esi
call   1060 <writel@plt>
mov    $0x64,%edi
call   1050 <udelay@plt>
mov    $0xa,%edi
call   1030 <mdelay@plt>
mov    $0x120401a0,%edi
call   1040 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x120401a0,%esi
call   1060 <writel@plt>
mov    $0x64,%edi
call   1050 <udelay@plt>
mov    $0x120401a0,%edi
call   1040 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffeff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x120401a0,%esi
call   1060 <writel@plt>
mov    $0x12c,%edi
call   1050 <udelay@plt>
mov    $0x12120080,%edi
call   1040 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0xc26,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x12120080,%esi
call   1060 <writel@plt>
mov    $0x64,%edi
call   1050 <udelay@plt>
xor    %edi,%edi
mov    $0x12120080,%esi
call   1060 <writel@plt>
mov    $0x2,%edi
call   1030 <mdelay@plt>
mov    $0x120401a0,%edi
call   1040 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffff5ff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x120401a0,%esi
call   1060 <writel@plt>
mov    $0x12c,%edi
call   1050 <udelay@plt>
mov    $0x1204019c,%edi
call   1040 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffc8fff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x77,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1204019c,%esi
call   1060 <writel@plt>
mov    $0xc8,%edi
call   1050 <udelay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hiusb_ohci_enable_clk>:
push   %rax
mov    $0x1204019c,%edi
call   1040 <readl@plt>
or     $0x37000,%eax
mov    %eax,%edi
mov    $0x1204019c,%esi
call   1060 <writel@plt>
mov    $0xc8,%edi
call   1050 <udelay@plt>
mov    $0x120401a0,%edi
call   1040 <readl@plt>
or     $0xb00,%eax
mov    %eax,%edi
mov    $0x120401a0,%esi
call   1060 <writel@plt>
mov    $0xc8,%edi
call   1050 <udelay@plt>
mov    $0x1212007c,%edi
call   1040 <readl@plt>
and    $0xfffffdf6,%eax
lea    0x8(%rax),%edi
mov    $0x1212007c,%esi
call   1060 <writel@plt>
mov    $0x64,%edi
call   1050 <udelay@plt>
mov    $0xa,%edi
call   1030 <mdelay@plt>
mov    $0x120401a0,%edi
call   1040 <readl@plt>
or     $0x1,%eax
mov    %eax,%edi
mov    $0x120401a0,%esi
call   1060 <writel@plt>
mov    $0x64,%edi
call   1050 <udelay@plt>
mov    $0x120401a0,%edi
call   1040 <readl@plt>
and    $0xfffffeff,%eax
mov    %eax,%edi
mov    $0x120401a0,%esi
call   1060 <writel@plt>
mov    $0x12c,%edi
call   1050 <udelay@plt>
mov    $0x12120080,%edi
call   1040 <readl@plt>
or     $0xc26,%eax
mov    %eax,%edi
mov    $0x12120080,%esi
call   1060 <writel@plt>
mov    $0x64,%edi
call   1050 <udelay@plt>
xor    %edi,%edi
mov    $0x12120080,%esi
call   1060 <writel@plt>
mov    $0x2,%edi
call   1030 <mdelay@plt>
mov    $0x120401a0,%edi
call   1040 <readl@plt>
and    $0xfffff5ff,%eax
mov    %eax,%edi
mov    $0x120401a0,%esi
call   1060 <writel@plt>
mov    $0x12c,%edi
call   1050 <udelay@plt>
mov    $0x1204019c,%edi
call   1040 <readl@plt>
and    $0xfffc8f88,%eax
lea    0x77(%rax),%edi
mov    $0x1204019c,%esi
call   1060 <writel@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1050 <udelay@plt>

LLVM IR (-O0):
define void @hiusb_ohci_enable_clk() {
%1 = alloca i32
%2 = call i32 @readl(i32 302252444)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = or i32 %3, 225280
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @writel(i32 %5, i32 302252444)
%7 = call i32 @udelay(i32 200)
%8 = call i32 @readl(i32 302252448)
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = or i32 %9, 2816
store i32 %10, i32* %1
%11 = load i32, i32* %1
%12 = call i32 @writel(i32 %11, i32 302252448)
%13 = call i32 @udelay(i32 200)
%14 = call i32 @readl(i32 303169660)
store i32 %14, i32* %1
%15 = load i32, i32* %1
%16 = or i32 %15, 8
store i32 %16, i32* %1
%17 = load i32, i32* %1
%18 = and i32 %17, -2
store i32 %18, i32* %1
%19 = load i32, i32* %1
%20 = and i32 %19, -513
store i32 %20, i32* %1
%21 = load i32, i32* %1
%22 = call i32 @writel(i32 %21, i32 303169660)
%23 = call i32 @udelay(i32 100)
%24 = call i32 @mdelay(i32 10)
%25 = call i32 @readl(i32 302252448)
store i32 %25, i32* %1
%26 = load i32, i32* %1
%27 = or i32 %26, 1
store i32 %27, i32* %1
%28 = load i32, i32* %1
%29 = call i32 @writel(i32 %28, i32 302252448)
%30 = call i32 @udelay(i32 100)
%31 = call i32 @readl(i32 302252448)
store i32 %31, i32* %1
%32 = load i32, i32* %1
%33 = and i32 %32, -257
store i32 %33, i32* %1
%34 = load i32, i32* %1
%35 = call i32 @writel(i32 %34, i32 302252448)
%36 = call i32 @udelay(i32 300)
%37 = call i32 @readl(i32 303169664)
store i32 %37, i32* %1
%38 = load i32, i32* %1
%39 = or i32 %38, 3110
store i32 %39, i32* %1
%40 = load i32, i32* %1
%41 = call i32 @writel(i32 %40, i32 303169664)
%42 = call i32 @udelay(i32 100)
%43 = call i32 @writel(i32 0, i32 303169664)
%44 = call i32 @mdelay(i32 2)
%45 = call i32 @readl(i32 302252448)
store i32 %45, i32* %1
%46 = load i32, i32* %1
%47 = and i32 %46, -2561
store i32 %47, i32* %1
%48 = load i32, i32* %1
%49 = call i32 @writel(i32 %48, i32 302252448)
%50 = call i32 @udelay(i32 300)
%51 = call i32 @readl(i32 302252444)
store i32 %51, i32* %1
%52 = load i32, i32* %1
%53 = and i32 %52, -225281
store i32 %53, i32* %1
%54 = load i32, i32* %1
%55 = or i32 %54, 119
store i32 %55, i32* %1
%56 = load i32, i32* %1
%57 = call i32 @writel(i32 %56, i32 302252444)
%58 = call i32 @udelay(i32 200)
ret void
}

LLVM IR (-O2):
define void @hiusb_ohci_enable_clk() {
%1 = tail call i32 @readl(i32 302252444)
%2 = or i32 %1, 225280
%3 = tail call i32 @writel(i32 %2, i32 302252444)
%4 = tail call i32 @udelay(i32 200)
%5 = tail call i32 @readl(i32 302252448)
%6 = or i32 %5, 2816
%7 = tail call i32 @writel(i32 %6, i32 302252448)
%8 = tail call i32 @udelay(i32 200)
%9 = tail call i32 @readl(i32 303169660)
%10 = and i32 %9, -522
%11 = or i32 %10, 8
%12 = tail call i32 @writel(i32 %11, i32 303169660)
%13 = tail call i32 @udelay(i32 100)
%14 = tail call i32 @mdelay(i32 10)
%15 = tail call i32 @readl(i32 302252448)
%16 = or i32 %15, 1
%17 = tail call i32 @writel(i32 %16, i32 302252448)
%18 = tail call i32 @udelay(i32 100)
%19 = tail call i32 @readl(i32 302252448)
%20 = and i32 %19, -257
%21 = tail call i32 @writel(i32 %20, i32 302252448)
%22 = tail call i32 @udelay(i32 300)
%23 = tail call i32 @readl(i32 303169664)
%24 = or i32 %23, 3110
%25 = tail call i32 @writel(i32 %24, i32 303169664)
%26 = tail call i32 @udelay(i32 100)
%27 = tail call i32 @writel(i32 0, i32 303169664)
%28 = tail call i32 @mdelay(i32 2)
%29 = tail call i32 @readl(i32 302252448)
%30 = and i32 %29, -2561
%31 = tail call i32 @writel(i32 %30, i32 302252448)
%32 = tail call i32 @udelay(i32 300)
%33 = tail call i32 @readl(i32 302252444)
%34 = and i32 %33, -225400
%35 = or i32 %34, 119
%36 = tail call i32 @writel(i32 %35, i32 302252444)
%37 = tail call i32 @udelay(i32 200)
ret void
}