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

/* Variables and functions */
void USBIntDisableControl(uint32_t ui32Base, uint32_t ui32Flags) {
  ;
  ;
  if (ui32Flags & 0x000000FF) {
    (*((volatile uint8_t *)(ui32Base + 0x0000000B))) &=
        ~(ui32Flags & 0x000000FF);
  }
  if (ui32Flags & 0x00000100) {
    (*((volatile uint32_t *)(ui32Base + 0x00000408))) = 0;
  }
  if (ui32Flags & 0x00000200) {
    (*((volatile uint32_t *)(0x40050000 + 0x00000448))) = 0;
  }
}


x86 assembly (clang, -O0):
<USBIntDisableControl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
cmp    $0x0,%eax
je     1135 <USBIntDisableControl+0x35>
mov    -0x8(%rbp),%edx
and    $0xff,%edx
xor    $0xffffffff,%edx
mov    -0x4(%rbp),%eax
add    $0xb,%eax
cltq
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     1156 <USBIntDisableControl+0x56>
mov    -0x4(%rbp),%eax
add    $0x408,%eax
cltq
movl   $0x0,(%rax)
mov    -0x8(%rbp),%eax
and    $0x200,%eax
cmp    $0x0,%eax
je     1172 <USBIntDisableControl+0x72>
mov    $0x40050448,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBIntDisableControl>:
mov    %esi,%ecx
movslq %edi,%rax
and    $0xff,%ecx
je     1112 <USBIntDisableControl+0x12>
not    %ecx
and    %ecx,0xb(%rax)
test   $0x100,%esi
jne    1123 <USBIntDisableControl+0x23>
test   $0x200,%esi
jne    1135 <USBIntDisableControl+0x35>
ret
movl   $0x0,0x408(%rax)
test   $0x200,%esi
je     1122 <USBIntDisableControl+0x22>
movl   $0x0,0x40050448
ret

LLVM IR (-O0):
define void @USBIntDisableControl(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, 255
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %2
%9 = load i32, i32* %4
%10 = and i32 %9, 255
%11 = xor i32 %10, -1
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 11
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = and i32 %16, %11
store volatile i32 %17, i32* %15
br label %18
18: ; preds = %8, %2
%19 = load i32, i32* %4
%20 = and i32 %19, 256
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1032
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to i32*
store volatile i32 0, i32* %26
br label %27
27: ; preds = %22, %18
%28 = load i32, i32* %4
%29 = and i32 %28, 512
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %27
store volatile i32 0, i32* inttoptr (i64 1074070600 to i32*)
br label %32
32: ; preds = %31, %27
ret void
}

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