#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 /*<<< orphan*/ getUARTReg(int);
int /*<<< orphan*/ output(int, char *, int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/, int /*<<< orphan*/);
void dumpUARTRegs() {
  int i;
  output(1,
         "UART: IER=%02x, IIR=%02x, LCR=%02x, MCR=%02x, LSR=%02x, MSR=%02x.\n",
         getUARTReg(1), getUARTReg(2), getUARTReg(3), getUARTReg(4),
         getUARTReg(5), getUARTReg(6));
}


x86 assembly (clang, -O0):
<dumpUARTRegs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    $0x1,%edi
call   1040 <getUARTReg@plt>
mov    %eax,-0x18(%rbp)
mov    $0x2,%edi
call   1040 <getUARTReg@plt>
mov    %eax,-0x14(%rbp)
mov    $0x3,%edi
call   1040 <getUARTReg@plt>
mov    %eax,-0x10(%rbp)
mov    $0x4,%edi
call   1040 <getUARTReg@plt>
mov    %eax,-0xc(%rbp)
mov    $0x5,%edi
call   1040 <getUARTReg@plt>
mov    %eax,-0x8(%rbp)
mov    $0x6,%edi
call   1040 <getUARTReg@plt>
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0xc(%rbp),%r9d
mov    -0x8(%rbp),%r10d
mov    $0x1,%edi
lea    0xe6f(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <output@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpUARTRegs>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x1,%edi
call   1040 <getUARTReg@plt>
mov    %eax,%r14d
mov    $0x2,%edi
call   1040 <getUARTReg@plt>
mov    %eax,%r15d
mov    $0x3,%edi
call   1040 <getUARTReg@plt>
mov    %eax,%r12d
mov    $0x4,%edi
call   1040 <getUARTReg@plt>
mov    %eax,%ebp
mov    $0x5,%edi
call   1040 <getUARTReg@plt>
mov    %eax,%ebx
mov    $0x6,%edi
call   1040 <getUARTReg@plt>
lea    0xe88(%rip),%rsi
mov    $0x1,%edi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    %ebp,%r9d
push   %rax
push   %rbx
call   1030 <output@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [67 x i8] c"UART: IER=%02x, IIR=%02x, LCR=%02x, MCR=%02x, LSR=%02x, MSR=%02x.\0A\00"
define void @dumpUARTRegs() {
%1 = alloca i32
%2 = call i32 @getUARTReg(i32 1)
%3 = call i32 @getUARTReg(i32 2)
%4 = call i32 @getUARTReg(i32 3)
%5 = call i32 @getUARTReg(i32 4)
%6 = call i32 @getUARTReg(i32 5)
%7 = call i32 @getUARTReg(i32 6)
%8 = call i32 @output(i32 1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [67 x i8] c"UART: IER=%02x, IIR=%02x, LCR=%02x, MCR=%02x, LSR=%02x, MSR=%02x.\0A\00"
define void @dumpUARTRegs() {
%1 = tail call i32 @getUARTReg(i32 1)
%2 = tail call i32 @getUARTReg(i32 2)
%3 = tail call i32 @getUARTReg(i32 3)
%4 = tail call i32 @getUARTReg(i32 4)
%5 = tail call i32 @getUARTReg(i32 5)
%6 = tail call i32 @getUARTReg(i32 6)
%7 = tail call i32 @output(i32 1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
ret void
}