#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 */

/* Variables and functions */
unsigned int UARTRegConfigModeEnable(unsigned int, int);
void UARTSpecialCharDetectControl(unsigned int baseAdd,
                                  unsigned int controlFlag) {
  unsigned int lcrRegValue = 0;
  lcrRegValue = UARTRegConfigModeEnable(baseAdd, (0x00BF));
  (*((volatile unsigned int *)(baseAdd + (0x8)))) &= ~((0x00000020u));
  (*((volatile unsigned int *)(baseAdd + (0x8)))) |=
      (controlFlag & (0x00000020u));
  (*((volatile unsigned int *)(baseAdd + (0xC)))) = lcrRegValue;
}


x86 assembly (clang, -O0):
<UARTSpecialCharDetectControl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xbf,%esi
call   1030 <UARTRegConfigModeEnable@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xffffffdf,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
and    $0x20,%edx
mov    -0x4(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTSpecialCharDetectControl>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xbf,%esi
call   1030 <UARTRegConfigModeEnable@plt>
lea    0x8(%rbx),%ecx
andl   $0xffffffdf,(%rcx)
and    $0x20,%ebp
or     %ebp,(%rcx)
add    $0xc,%ebx
mov    %eax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @UARTSpecialCharDetectControl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = call i32 @UARTRegConfigModeEnable(i32 %6, i32 191)
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = add i32 %8, 8
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = and i32 %12, -33
store volatile i32 %13, i32* %11
%14 = load i32, i32* %4
%15 = and i32 %14, 32
%16 = load i32, i32* %3
%17 = add i32 %16, 8
%18 = zext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
%20 = load volatile i32, i32* %19
%21 = or i32 %20, %15
store volatile i32 %21, i32* %19
%22 = load i32, i32* %5
%23 = load i32, i32* %3
%24 = add i32 %23, 12
%25 = zext i32 %24 to i64
%26 = inttoptr i64 %25 to i32*
store volatile i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @UARTSpecialCharDetectControl(i32 %0, i32 %1) {
%3 = tail call i32 @UARTRegConfigModeEnable(i32 %0, i32 191)
%4 = add i32 %0, 8
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -33
store volatile i32 %8, i32* %6
%9 = and i32 %1, 32
%10 = load volatile i32, i32* %6
%11 = or i32 %10, %9
store volatile i32 %11, i32* %6
%12 = add i32 %0, 12
%13 = zext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
store volatile i32 %3, i32* %14
ret void
}