#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 UARTAutoRTSAutoCTSControl(unsigned int baseAdd,
                               unsigned int autoCtsControl,
                               unsigned int autoRtsControl) {
  unsigned int lcrRegValue = 0;
  lcrRegValue = UARTRegConfigModeEnable(baseAdd, (0x00BF));
  (*((volatile unsigned int *)(baseAdd + (0x8)))) &=
      ~((0x00000080u) | (0x00000040u));
  (*((volatile unsigned int *)(baseAdd + (0x8)))) |=
      (autoCtsControl & (0x00000080u));
  (*((volatile unsigned int *)(baseAdd + (0x8)))) |=
      (autoRtsControl & (0x00000040u));
  (*((volatile unsigned int *)(baseAdd + (0xC)))) = lcrRegValue;
}


x86 assembly (clang, -O0):
<UARTAutoRTSAutoCTSControl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xbf,%esi
call   1030 <UARTRegConfigModeEnable@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xffffff3f,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
and    $0x80,%edx
mov    -0x4(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%edx
and    $0x40,%edx
mov    -0x4(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
mov    -0x10(%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):
<UARTAutoRTSAutoCTSControl>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xbf,%esi
call   1030 <UARTRegConfigModeEnable@plt>
lea    0x8(%rbx),%ecx
andl   $0xffffff3f,(%rcx)
and    $0x80,%ebp
or     %ebp,(%rcx)
and    $0x40,%r14d
or     %r14d,(%rcx)
add    $0xc,%ebx
mov    %eax,(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @UARTAutoRTSAutoCTSControl(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = call i32 @UARTRegConfigModeEnable(i32 %8, i32 191)
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = add i32 %10, 8
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = and i32 %14, -193
store volatile i32 %15, i32* %13
%16 = load i32, i32* %5
%17 = and i32 %16, 128
%18 = load i32, i32* %4
%19 = add i32 %18, 8
%20 = zext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load volatile i32, i32* %21
%23 = or i32 %22, %17
store volatile i32 %23, i32* %21
%24 = load i32, i32* %6
%25 = and i32 %24, 64
%26 = load i32, i32* %4
%27 = add i32 %26, 8
%28 = zext i32 %27 to i64
%29 = inttoptr i64 %28 to i32*
%30 = load volatile i32, i32* %29
%31 = or i32 %30, %25
store volatile i32 %31, i32* %29
%32 = load i32, i32* %7
%33 = load i32, i32* %4
%34 = add i32 %33, 12
%35 = zext i32 %34 to i64
%36 = inttoptr i64 %35 to i32*
store volatile i32 %32, i32* %36
ret void
}

LLVM IR (-O2):
define void @UARTAutoRTSAutoCTSControl(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @UARTRegConfigModeEnable(i32 %0, i32 191)
%5 = add i32 %0, 8
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, -193
store volatile i32 %9, i32* %7
%10 = and i32 %1, 128
%11 = load volatile i32, i32* %7
%12 = or i32 %11, %10
store volatile i32 %12, i32* %7
%13 = and i32 %2, 64
%14 = load volatile i32, i32* %7
%15 = or i32 %14, %13
store volatile i32 %15, i32* %7
%16 = add i32 %0, 12
%17 = zext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
store volatile i32 %4, i32* %18
ret void
}