#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 I2CMasterGlitchFilterConfigSet(uint32_t ui32Base, uint32_t ui32Config) {
  ;
  if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) ==
       (0x10000000 | 0x000A0000))) {
    (*((volatile uint32_t *)(ui32Base + 0x0000000C))) |= ui32Config;
  }
  if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) ==
       (0x10000000 | 0x00050000))) {
    (*((volatile uint32_t *)(ui32Base + 0x00000038))) |= (ui32Config >> 12);
    (*((volatile uint32_t *)(ui32Base + 0x00000020))) |= 0x00000040;
  }
}


x86 assembly (clang, -O0):
<I2CMasterGlitchFilterConfigSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x100a0000,%eax
jne    1132 <I2CMasterGlitchFilterConfigSet+0x32>
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x10050000,%eax
jne    116c <I2CMasterGlitchFilterConfigSet+0x6c>
mov    -0x8(%rbp),%edx
sar    $0xc,%edx
mov    -0x4(%rbp),%eax
add    $0x38,%eax
cltq
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x20,%eax
cltq
mov    (%rax),%ecx
or     $0x40,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterGlitchFilterConfigSet>:
mov    $0x70ff0000,%ecx
mov    0x400fe000,%edx
and    %ecx,%edx
movslq %edi,%rax
cmp    $0x100a0000,%edx
jne    111c <I2CMasterGlitchFilterConfigSet+0x1c>
or     %esi,0xc(%rax)
and    0x400fe000,%ecx
cmp    $0x10050000,%ecx
jne    1135 <I2CMasterGlitchFilterConfigSet+0x35>
sar    $0xc,%esi
or     %esi,0x38(%rax)
orl    $0x40,0x20(%rax)
ret

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

LLVM IR (-O2):
define void @I2CMasterGlitchFilterConfigSet(i32 %0, i32 %1) {
%3 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%4 = and i32 %3, 1895759872
%5 = icmp eq i32 %4, 269090816
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = add nsw i32 %0, 12
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = or i32 %10, %1
store volatile i32 %11, i32* %9
br label %12
12: ; preds = %6, %2
%13 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%14 = and i32 %13, 1895759872
%15 = icmp eq i32 %14, 268763136
br i1 %15, label %16, label %28
16: ; preds = %12
%17 = ashr i32 %1, 12
%18 = add nsw i32 %0, 56
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i32*
%21 = load volatile i32, i32* %20
%22 = or i32 %21, %17
store volatile i32 %22, i32* %20
%23 = add nsw i32 %0, 32
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i32*
%26 = load volatile i32, i32* %25
%27 = or i32 %26, 64
store volatile i32 %27, i32* %25
br label %28
28: ; preds = %16, %12
ret void
}