#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 readl(int);
int /*<<< orphan*/ udelay(int);
int /*<<< orphan*/ writel(int, int);
void hiusb_ohci_disable_clk(void) {
  int reg;
  reg = readl((0x12040000 + 0x1a0));
  reg |= ((1 << 8) | (1 << 9) | (1 << 11));
  writel(reg, (0x12040000 + 0x1a0));
  udelay(100);
  reg = readl((0x12040000 + 0x1a0));
  reg &= ~((1 << 16) | (1 << 0));
  writel(reg, (0x12040000 + 0x1a0));
  udelay(300);
  reg = readl((0x12040000 + 0x19c));
  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_disable_clk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x120401a0,%edi
call   1030 <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   1050 <writel@plt>
mov    $0x64,%edi
call   1040 <udelay@plt>
mov    $0x120401a0,%edi
call   1030 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffefffe,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x120401a0,%esi
call   1050 <writel@plt>
mov    $0x12c,%edi
call   1040 <udelay@plt>
mov    $0x1204019c,%edi
call   1030 <readl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffff88,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1204019c,%esi
call   1050 <writel@plt>
mov    $0xc8,%edi
call   1040 <udelay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hiusb_ohci_disable_clk>:
push   %rax
mov    $0x120401a0,%edi
call   1030 <readl@plt>
or     $0xb00,%eax
mov    %eax,%edi
mov    $0x120401a0,%esi
call   1050 <writel@plt>
mov    $0x64,%edi
call   1040 <udelay@plt>
mov    $0x120401a0,%edi
call   1030 <readl@plt>
and    $0xfffefffe,%eax
mov    %eax,%edi
mov    $0x120401a0,%esi
call   1050 <writel@plt>
mov    $0x12c,%edi
call   1040 <udelay@plt>
mov    $0x1204019c,%edi
call   1030 <readl@plt>
and    $0xffffff88,%eax
mov    %eax,%edi
mov    $0x1204019c,%esi
call   1050 <writel@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1040 <udelay@plt>

LLVM IR (-O0):
define void @hiusb_ohci_disable_clk() {
%1 = alloca i32
%2 = call i32 @readl(i32 302252448)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = or i32 %3, 2816
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @writel(i32 %5, i32 302252448)
%7 = call i32 @udelay(i32 100)
%8 = call i32 @readl(i32 302252448)
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = and i32 %9, -65538
store i32 %10, i32* %1
%11 = load i32, i32* %1
%12 = call i32 @writel(i32 %11, i32 302252448)
%13 = call i32 @udelay(i32 300)
%14 = call i32 @readl(i32 302252444)
store i32 %14, i32* %1
%15 = load i32, i32* %1
%16 = and i32 %15, -120
store i32 %16, i32* %1
%17 = load i32, i32* %1
%18 = call i32 @writel(i32 %17, i32 302252444)
%19 = call i32 @udelay(i32 200)
ret void
}

LLVM IR (-O2):
define void @hiusb_ohci_disable_clk() {
%1 = tail call i32 @readl(i32 302252448)
%2 = or i32 %1, 2816
%3 = tail call i32 @writel(i32 %2, i32 302252448)
%4 = tail call i32 @udelay(i32 100)
%5 = tail call i32 @readl(i32 302252448)
%6 = and i32 %5, -65538
%7 = tail call i32 @writel(i32 %6, i32 302252448)
%8 = tail call i32 @udelay(i32 300)
%9 = tail call i32 @readl(i32 302252444)
%10 = and i32 %9, -120
%11 = tail call i32 @writel(i32 %10, i32 302252444)
%12 = tail call i32 @udelay(i32 200)
ret void
}