#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 */
typedef int uint32_t;

/* Variables and functions */
void SHAMD5IntDisable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;

  ;
  (*((volatile unsigned long *)(0x44030000 + 0x00000810))) |=
      ((ui32IntFlags & 0x00070000) >> 16);
  (*((volatile unsigned long *)(ui32Base + 0x0000011C))) &=
      ~(ui32IntFlags & 0x0000ffff);
  if ((*((volatile unsigned long *)(ui32Base + 0x0000011C))) == 0x0) {
    (*((volatile unsigned long *)(ui32Base + 0x00000110))) &= ~0x00000004;
  }
}


x86 assembly (clang, -O0):
<SHAMD5IntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x70000,%eax
sar    $0x10,%eax
cltq
mov    $0x44030810,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x44030810,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
xor    $0xffffffff,%eax
movslq %eax,%rdx
mov    -0x4(%rbp),%eax
add    $0x11c,%eax
cltq
mov    (%rax),%rcx
and    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x11c,%eax
cltq
mov    (%rax),%rax
cmp    $0x0,%rax
jne    1176 <SHAMD5IntDisable+0x76>
mov    -0x4(%rbp),%eax
add    $0x110,%eax
cltq
mov    (%rax),%rcx
and    $0xfffffffffffffffb,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAMD5IntDisable>:
mov    %esi,%eax
shr    $0x10,%esi
and    $0x7,%esi
or     %rsi,0x44030810
44
not    %eax
or     $0xffff0000,%eax
movslq %eax,%rcx
movslq %edi,%rax
and    %rcx,0x11c(%rax)
cmpq   $0x0,0x11c(%rax)
je     112f <SHAMD5IntDisable+0x2f>
ret
andq   $0xfffffffffffffffb,0x110(%rax)
fb
ret

LLVM IR (-O0):
define void @SHAMD5IntDisable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 458752
%7 = ashr i32 %6, 16
%8 = sext i32 %7 to i64
%9 = load volatile i64, i64* inttoptr (i64 1141049360 to i64*)
%10 = or i64 %9, %8
store volatile i64 %10, i64* inttoptr (i64 1141049360 to i64*)
%11 = load i32, i32* %4
%12 = and i32 %11, 65535
%13 = xor i32 %12, -1
%14 = sext i32 %13 to i64
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 284
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i64*
%19 = load volatile i64, i64* %18
%20 = and i64 %19, %14
store volatile i64 %20, i64* %18
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 284
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to i64*
%25 = load volatile i64, i64* %24
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %34
27: ; preds = %2
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 272
%30 = sext i32 %29 to i64
%31 = inttoptr i64 %30 to i64*
%32 = load volatile i64, i64* %31
%33 = and i64 %32, -5
store volatile i64 %33, i64* %31
br label %34
34: ; preds = %27, %2
ret void
}

LLVM IR (-O2):
define void @SHAMD5IntDisable(i32 %0, i32 %1) {
%3 = lshr i32 %1, 16
%4 = and i32 %3, 7
%5 = zext i32 %4 to i64
%6 = load volatile i64, i64* inttoptr (i64 1141049360 to i64*)
%7 = or i64 %6, %5
store volatile i64 %7, i64* inttoptr (i64 1141049360 to i64*)
%8 = and i32 %1, 65535
%9 = xor i32 %8, -1
%10 = sext i32 %9 to i64
%11 = add nsw i32 %0, 284
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
%15 = and i64 %14, %10
store volatile i64 %15, i64* %13
%16 = load volatile i64, i64* %13
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %24
18: ; preds = %2
%19 = add nsw i32 %0, 272
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i64*
%22 = load volatile i64, i64* %21
%23 = and i64 %22, -5
store volatile i64 %23, i64* %21
br label %24
24: ; preds = %18, %2
ret void
}