#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 */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _UARTBaseValid(int);
void UARTSmartCardEnable(uint32_t ui32Base) {
  uint32_t ui32Val;
  ASSERT(_UARTBaseValid(ui32Base));
  ui32Val = (*((volatile uint32_t *)(ui32Base + 0x0000002C)));
  ui32Val &= ~(0x00000080 | 0x00000004 | 0x00000002 | 0x00000060);
  ui32Val |= 0x00000060 | 0x00000002 | 0x00000004 | 0x00000008;
  (*((volatile uint32_t *)(ui32Base + 0x0000002C))) = ui32Val;
  (*((volatile uint32_t *)(ui32Base + 0x00000030))) |= 0x00000008;
}


x86 assembly (clang, -O0):
<UARTSmartCardEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x2c,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffffff19,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     $0x6e,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x2c,%eax
cltq
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%ecx
or     $0x8,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTSmartCardEnable>:
push   %rbx
mov    %edi,%ebx
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
movslq %ebx,%rax
mov    $0xffffff11,%ecx
and    0x2c(%rax),%ecx
or     $0x6e,%ecx
mov    %ecx,0x2c(%rax)
orl    $0x8,0x30(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @UARTSmartCardEnable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @_UARTBaseValid(i32 %4)
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 44
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = and i32 %12, -231
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = or i32 %14, 110
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 44
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i32*
store volatile i32 %16, i32* %20
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 48
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to i32*
%25 = load volatile i32, i32* %24
%26 = or i32 %25, 8
store volatile i32 %26, i32* %24
ret void
}

LLVM IR (-O2):
define void @UARTSmartCardEnable(i32 %0) {
%2 = tail call i32 @_UARTBaseValid(i32 %0)
%3 = tail call i32 @ASSERT(i32 %2)
%4 = add nsw i32 %0, 44
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -239
%9 = or i32 %8, 110
store volatile i32 %9, i32* %6
%10 = add nsw i32 %0, 48
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
%14 = or i32 %13, 8
store volatile i32 %14, i32* %12
ret void
}