#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 */
int getUARTReg(int);
int /*<<< orphan*/ output(int, char *, unsigned char, unsigned char);
int /*<<< orphan*/ setUARTReg(int, int);
void dumpUARTDL() {
  unsigned char dlm, dll;
  setUARTReg(3, getUARTReg(3) | 0x00000080);
  dll = getUARTReg(0);
  dlm = getUARTReg(1);
  setUARTReg(3, getUARTReg(3) & ~0x00000080);
  output(1, "DLM=%02x, DLL=%02X\n", dlm, dll);
}


x86 assembly (clang, -O0):
<dumpUARTDL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3,%edi
call   1050 <getUARTReg@plt>
mov    %eax,%esi
or     $0x80,%esi
mov    $0x3,%edi
call   1030 <setUARTReg@plt>
xor    %edi,%edi
call   1050 <getUARTReg@plt>
mov    %al,-0x2(%rbp)
mov    $0x1,%edi
call   1050 <getUARTReg@plt>
mov    %al,-0x1(%rbp)
mov    $0x3,%edi
call   1050 <getUARTReg@plt>
mov    %eax,%esi
and    $0xffffff7f,%esi
mov    $0x3,%edi
call   1030 <setUARTReg@plt>
mov    -0x1(%rbp),%al
mov    $0x1,%edi
lea    0xe6a(%rip),%rsi
movzbl %al,%edx
movzbl -0x2(%rbp),%ecx
call   1040 <output@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpUARTDL>:
push   %rbp
push   %rbx
push   %rax
mov    $0x3,%edi
call   1050 <getUARTReg@plt>
or     $0x80,%eax
mov    $0x3,%edi
mov    %eax,%esi
call   1030 <setUARTReg@plt>
xor    %edi,%edi
call   1050 <getUARTReg@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1050 <getUARTReg@plt>
mov    %eax,%ebp
mov    $0x3,%edi
call   1050 <getUARTReg@plt>
and    $0xffffff7f,%eax
mov    $0x3,%edi
mov    %eax,%esi
call   1030 <setUARTReg@plt>
movzbl %bl,%ecx
movzbl %bpl,%edx
lea    0xe74(%rip),%rsi
mov    $0x1,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <output@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"DLM=%02x, DLL=%02X\0A\00"
define void @dumpUARTDL() {
%1 = alloca i8
%2 = alloca i8
%3 = call i32 @getUARTReg(i32 3)
%4 = or i32 %3, 128
%5 = call i32 @setUARTReg(i32 3, i32 %4)
%6 = call i32 @getUARTReg(i32 0)
%7 = trunc i32 %6 to i8
store i8 %7, i8* %2
%8 = call i32 @getUARTReg(i32 1)
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = call i32 @getUARTReg(i32 3)
%11 = and i32 %10, -129
%12 = call i32 @setUARTReg(i32 3, i32 %11)
%13 = load i8, i8* %1
%14 = load i8, i8* %2
%15 = call i32 @output(i32 1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 zeroext %13, i8 zeroext %14)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"DLM=%02x, DLL=%02X\0A\00"
define void @dumpUARTDL() {
%1 = tail call i32 @getUARTReg(i32 3)
%2 = or i32 %1, 128
%3 = tail call i32 @setUARTReg(i32 3, i32 %2)
%4 = tail call i32 @getUARTReg(i32 0)
%5 = trunc i32 %4 to i8
%6 = tail call i32 @getUARTReg(i32 1)
%7 = trunc i32 %6 to i8
%8 = tail call i32 @getUARTReg(i32 3)
%9 = and i32 %8, -129
%10 = tail call i32 @setUARTReg(i32 3, i32 %9)
%11 = tail call i32 @output(i32 1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 zeroext %7, i8 zeroext %5)
ret void
}