#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*/ uartPuts(char *);
void initUART(void) {
  (*(volatile unsigned int *)(0x7F008000)) =
      ((*(volatile unsigned int *)(0x7F008000)) & 0xFFFFFF00) | 0x00000022;
  (*(volatile unsigned int *)(0x7F005028)) = 34;
  (*(volatile unsigned int *)(0x7F00502C)) = 0xDFDD;
  (*(volatile unsigned int *)(0x7F005000)) = 3;
  (*(volatile unsigned int *)(0x7F005004)) =
      ((*(volatile unsigned int *)(0x7F005004)) & 0xFFFFF000) | 0x805;
  (*(volatile unsigned int *)(0x7F005008)) = 0;
  (*(volatile unsigned int *)(0x7F00500C)) = 0;
  uartPuts("\n\n");
  return;
}


x86 assembly (clang, -O0):
<initUART>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008000,%eax
mov    (%rax),%ecx
and    $0xffffff00,%ecx
or     $0x22,%ecx
mov    $0x7f008000,%eax
mov    %ecx,(%rax)
mov    $0x7f005028,%eax
movl   $0x22,(%rax)
mov    $0x7f00502c,%eax
movl   $0xdfdd,(%rax)
mov    $0x7f005000,%eax
movl   $0x3,(%rax)
mov    $0x7f005004,%eax
mov    (%rax),%ecx
and    $0xfffff000,%ecx
or     $0x805,%ecx
mov    $0x7f005004,%eax
mov    %ecx,(%rax)
mov    $0x7f005008,%eax
movl   $0x0,(%rax)
mov    $0x7f00500c,%eax
movl   $0x0,(%rax)
lea    0xe7d(%rip),%rdi
call   1030 <uartPuts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initUART>:
mov    $0xffffff00,%eax
and    0x7f008000,%eax
or     $0x22,%eax
mov    %eax,0x7f008000
movl   $0x22,0x7f005028
movl   $0xdfdd,0x7f00502c
movl   $0x3,0x7f005000
mov    $0xfffff000,%eax
and    0x7f005004,%eax
or     $0x805,%eax
mov    %eax,0x7f005004
movl   $0x0,0x7f005008
movl   $0x0,0x7f00500c
lea    0xe84(%rip),%rdi
jmp    1030 <uartPuts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
define void @initUART() {
%1 = load volatile i32, i32* inttoptr (i64 2130739200 to i32*)
%2 = and i32 %1, -256
%3 = or i32 %2, 34
store volatile i32 %3, i32* inttoptr (i64 2130739200 to i32*)
store volatile i32 34, i32* inttoptr (i64 2130726952 to i32*)
store volatile i32 57309, i32* inttoptr (i64 2130726956 to i32*)
store volatile i32 3, i32* inttoptr (i64 2130726912 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 2130726916 to i32*)
%5 = and i32 %4, -4096
%6 = or i32 %5, 2053
store volatile i32 %6, i32* inttoptr (i64 2130726916 to i32*)
store volatile i32 0, i32* inttoptr (i64 2130726920 to i32*)
store volatile i32 0, i32* inttoptr (i64 2130726924 to i32*)
%7 = call i32 @uartPuts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0A\0A\00"
define void @initUART() {
%1 = load volatile i32, i32* inttoptr (i64 2130739200 to i32*)
%2 = and i32 %1, -256
%3 = or i32 %2, 34
store volatile i32 %3, i32* inttoptr (i64 2130739200 to i32*)
store volatile i32 34, i32* inttoptr (i64 2130726952 to i32*)
store volatile i32 57309, i32* inttoptr (i64 2130726956 to i32*)
store volatile i32 3, i32* inttoptr (i64 2130726912 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 2130726916 to i32*)
%5 = and i32 %4, -4096
%6 = or i32 %5, 2053
store volatile i32 %6, i32* inttoptr (i64 2130726916 to i32*)
store volatile i32 0, i32* inttoptr (i64 2130726920 to i32*)
store volatile i32 0, i32* inttoptr (i64 2130726924 to i32*)
%7 = tail call i32 @uartPuts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}