#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 *)(ui32Base + 0xFFFFC010))) &=
      ~(((ui32IntFlags & 0x00010000) >> 14) |
        ((ui32IntFlags & 0x00020000) >> 16) |
        ((ui32IntFlags & 0x00040000) >> 19));
  (*((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    $0x10000,%eax
sar    $0xe,%eax
mov    -0x8(%rbp),%ecx
and    $0x20000,%ecx
sar    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    $0x40000,%ecx
sar    $0x13,%ecx
or     %ecx,%eax
xor    $0xffffffff,%eax
movslq %eax,%rdx
mov    -0x4(%rbp),%eax
add    $0xffffc010,%eax
mov    %eax,%eax
mov    (%rax),%rcx
and    %rdx,%rcx
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    1196 <SHAMD5IntDisable+0x96>
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
mov    %esi,%ecx
shr    $0xe,%ecx
and    $0x4,%ecx
shr    $0x10,%esi
and    $0x2,%esi
or     %ecx,%esi
not    %esi
movslq %esi,%rcx
lea    -0x3ff0(%rdi),%edx
and    %rcx,(%rdx)
not    %eax
or     $0xffff0000,%eax
movslq %eax,%rcx
movslq %edi,%rax
and    %rcx,0x11c(%rax)
cmpq   $0x0,0x11c(%rax)
je     113f <SHAMD5IntDisable+0x3f>
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, 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 = sext i32 %16 to i64
%18 = load i32, i32* %3
%19 = add i32 %18, -16368
%20 = zext i32 %19 to i64
%21 = inttoptr i64 %20 to i64*
%22 = load volatile i64, i64* %21
%23 = and i64 %22, %17
store volatile i64 %23, i64* %21
%24 = load i32, i32* %4
%25 = and i32 %24, 65535
%26 = xor i32 %25, -1
%27 = sext i32 %26 to i64
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 284
%30 = sext i32 %29 to i64
%31 = inttoptr i64 %30 to i64*
%32 = load volatile i64, i64* %31
%33 = and i64 %32, %27
store volatile i64 %33, i64* %31
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 284
%36 = sext i32 %35 to i64
%37 = inttoptr i64 %36 to i64*
%38 = load volatile i64, i64* %37
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %47
40: ; preds = %2
%41 = load i32, i32* %3
%42 = add nsw i32 %41, 272
%43 = sext i32 %42 to i64
%44 = inttoptr i64 %43 to i64*
%45 = load volatile i64, i64* %44
%46 = and i64 %45, -5
store volatile i64 %46, i64* %44
br label %47
47: ; preds = %40, %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 = sext i32 %8 to i64
%10 = add i32 %0, -16368
%11 = zext i32 %10 to i64
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
%14 = and i64 %13, %9
store volatile i64 %14, i64* %12
%15 = and i32 %1, 65535
%16 = xor i32 %15, -1
%17 = sext i32 %16 to i64
%18 = add nsw i32 %0, 284
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i64*
%21 = load volatile i64, i64* %20
%22 = and i64 %21, %17
store volatile i64 %22, i64* %20
%23 = load volatile i64, i64* %20
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %31
25: ; preds = %2
%26 = add nsw i32 %0, 272
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i64*
%29 = load volatile i64, i64* %28
%30 = and i64 %29, -5
store volatile i64 %30, i64* %28
br label %31
31: ; preds = %25, %2
ret void
}