#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 uint32_t *)(ui32Base + 0xFFFFC010))) &=
      ~(((ui32IntFlags & 0x00010000) >> 14) |
        ((ui32IntFlags & 0x00020000) >> 16) |
        ((ui32IntFlags & 0x00040000) >> 19));
  (*((volatile uint32_t *)(ui32Base + 0x0000011C))) &=
      ~(ui32IntFlags & 0x0000ffff);
  if ((*((volatile uint32_t *)(ui32Base + 0x0000011C))) == 0x0) {
    (*((volatile uint32_t *)(ui32Base + 0x00000110))) &= ~0x00000004;
  }
}


x86 assembly (clang, -O0):
<SHAMD5IntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
and    $0x10000,%edx
sar    $0xe,%edx
mov    -0x8(%rbp),%eax
and    $0x20000,%eax
sar    $0x10,%eax
or     %eax,%edx
mov    -0x8(%rbp),%eax
and    $0x40000,%eax
sar    $0x13,%eax
or     %eax,%edx
xor    $0xffffffff,%edx
mov    -0x4(%rbp),%eax
add    $0xffffc010,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
and    $0xffff,%edx
xor    $0xffffffff,%edx
mov    -0x4(%rbp),%eax
add    $0x11c,%eax
cltq
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x11c,%eax
cltq
mov    (%rax),%eax
cmp    $0x0,%eax
jne    1185 <SHAMD5IntDisable+0x85>
mov    -0x4(%rbp),%eax
add    $0x110,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAMD5IntDisable>:
mov    %esi,%ecx
not    %ecx
mov    %esi,%eax
shr    $0xe,%eax
and    $0x4,%eax
shr    $0x10,%esi
and    $0x2,%esi
or     %eax,%esi
not    %esi
lea    -0x3ff0(%rdi),%eax
and    %esi,(%rax)
or     $0xffff0000,%ecx
movslq %edi,%rax
and    %ecx,0x11c(%rax)
cmpl   $0x0,0x11c(%rax)
je     1137 <SHAMD5IntDisable+0x37>
ret
andl   $0xfffffffb,0x110(%rax)
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, 65536
%7 = ashr i32 %6, 14
%8 = load i32, i32* %4
%9 = and i32 %8, 131072
%10 = ashr i32 %9, 16
%11 = or i32 %7, %10
%12 = load i32, i32* %4
%13 = and i32 %12, 262144
%14 = ashr i32 %13, 19
%15 = or i32 %11, %14
%16 = xor i32 %15, -1
%17 = load i32, i32* %3
%18 = add i32 %17, -16368
%19 = zext i32 %18 to i64
%20 = inttoptr i64 %19 to i32*
%21 = load volatile i32, i32* %20
%22 = and i32 %21, %16
store volatile i32 %22, i32* %20
%23 = load i32, i32* %4
%24 = and i32 %23, 65535
%25 = xor i32 %24, -1
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 284
%28 = sext i32 %27 to i64
%29 = inttoptr i64 %28 to i32*
%30 = load volatile i32, i32* %29
%31 = and i32 %30, %25
store volatile i32 %31, i32* %29
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 284
%34 = sext i32 %33 to i64
%35 = inttoptr i64 %34 to i32*
%36 = load volatile i32, i32* %35
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %45
38: ; preds = %2
%39 = load i32, i32* %3
%40 = add nsw i32 %39, 272
%41 = sext i32 %40 to i64
%42 = inttoptr i64 %41 to i32*
%43 = load volatile i32, i32* %42
%44 = and i32 %43, -5
store volatile i32 %44, i32* %42
br label %45
45: ; preds = %38, %2
ret void
}

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