#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 USBIntDisableControl(uint32_t ui32Base, uint32_t ui32Flags) {
  ;
  ;
  if (ui32Flags & 0x000000FF) {
    (*((volatile unsigned char *)(ui32Base + 0x0000000B))) &=
        ~(ui32Flags & 0x000000FF);
  }
  if (ui32Flags & 0x00000100) {
    (*((volatile unsigned long *)(ui32Base + 0x00000408))) = 0;
  }
  if (ui32Flags & 0x00000200) {
    (*((volatile unsigned long *)(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     1138 <USBIntDisableControl+0x38>
mov    -0x8(%rbp),%edx
and    $0xff,%edx
xor    $0xffffffff,%edx
mov    -0x4(%rbp),%eax
add    $0xb,%eax
cltq
mov    (%rax),%cl
movzbl %cl,%ecx
and    %edx,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     115a <USBIntDisableControl+0x5a>
mov    -0x4(%rbp),%eax
add    $0x408,%eax
cltq
movq   $0x0,(%rax)
mov    -0x8(%rbp),%eax
and    $0x200,%eax
cmp    $0x0,%eax
je     1177 <USBIntDisableControl+0x77>
mov    $0x40050448,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBIntDisableControl>:
movslq %edi,%rax
test   %sil,%sil
je     110f <USBIntDisableControl+0xf>
mov    %esi,%ecx
not    %cl
and    %cl,0xb(%rax)
test   $0x100,%esi
jne    1120 <USBIntDisableControl+0x20>
test   $0x200,%esi
jne    1133 <USBIntDisableControl+0x33>
ret
movq   $0x0,0x408(%rax)
test   $0x200,%esi
je     111f <USBIntDisableControl+0x1f>
movq   $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 %20
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 i8*
%16 = load volatile i8, i8* %15
%17 = zext i8 %16 to i32
%18 = and i32 %17, %11
%19 = trunc i32 %18 to i8
store volatile i8 %19, i8* %15
br label %20
20: ; preds = %8, %2
%21 = load i32, i32* %4
%22 = and i32 %21, 256
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1032
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i64*
store volatile i64 0, i64* %28
br label %29
29: ; preds = %24, %20
%30 = load i32, i32* %4
%31 = and i32 %30, 512
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %29
store volatile i64 0, i64* inttoptr (i64 1074070600 to i64*)
br label %34
34: ; preds = %33, %29
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 %13, label %5
5: ; preds = %2
%6 = add nsw i32 %0, 11
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
%9 = load volatile i8, i8* %8
%10 = trunc i32 %1 to i8
%11 = xor i8 %10, -1
%12 = and i8 %9, %11
store volatile i8 %12, i8* %8
br label %13
13: ; preds = %5, %2
%14 = and i32 %1, 256
%15 = icmp eq i32 %14, 0
br i1 %15, label %20, label %16
16: ; preds = %13
%17 = add nsw i32 %0, 1032
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i64*
store volatile i64 0, i64* %19
br label %20
20: ; preds = %16, %13
%21 = and i32 %1, 512
%22 = icmp eq i32 %21, 0
br i1 %22, label %24, label %23
23: ; preds = %20
store volatile i64 0, i64* inttoptr (i64 1074070600 to i64*)
br label %24
24: ; preds = %23, %20
ret void
}