#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 */
void pwm_set_pinmux(void) {
  uint32_t mux_conf = 0;
  volatile uint32_t *mux_addr = (uint32_t *)(0x01c14000 + 0x120);
  mux_addr += (11);
  mux_conf = *mux_addr;
  mux_conf &= ~(0xf << ((6) * 4));
  mux_conf |= 0x2 << ((6) * 4);
  *mux_addr = mux_conf;
  mux_conf &= ~(0xf << ((5) * 4));
  mux_conf |= 0x2 << ((5) * 4);
  *mux_addr = mux_conf;
  mux_addr = (uint32_t *)(0x01c14000 + 0x120);
  mux_addr += (13);
  mux_conf = *mux_addr;
  mux_conf &= ~(0xf << ((4) * 4));
  mux_conf |= 0x2 << ((4) * 4);
  *mux_addr = mux_conf;
  mux_conf &= ~(0xf << ((3) * 4));
  mux_conf |= 0x2 << ((3) * 4);
  *mux_addr = mux_conf;
  mux_conf &= ~(0xf << ((2) * 4));
  mux_conf |= 0x2 << ((2) * 4);
  *mux_addr = mux_conf;
  mux_conf &= ~(0xf << ((1) * 4));
  mux_conf |= 0x2 << ((1) * 4);
  *mux_addr = mux_conf;
  return;
}


x86 assembly (clang, -O0):
<pwm_set_pinmux>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x1c14120,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x2c,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0ffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x2000000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
and    $0xff0fffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x200000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1c14120,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x34,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfff0ffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x20000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
and    $0xffff0fff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x2000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
and    $0xfffff0ff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x200,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
and    $0xffffff0f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwm_set_pinmux>:
mov    $0xf0ffffff,%eax
and    0x1c1414c,%eax
or     $0x2000000,%eax
mov    %eax,0x1c1414c
and    $0xf20fffff,%eax
or     $0x200000,%eax
mov    %eax,0x1c1414c
mov    $0xfff0ffff,%eax
and    0x1c14154,%eax
or     $0x20000,%eax
mov    %eax,0x1c14154
and    $0xfff20fff,%eax
or     $0x2000,%eax
mov    %eax,0x1c14154
and    $0xfff220ff,%eax
or     $0x200,%eax
mov    %eax,0x1c14154
and    $0xfff2220f,%eax
or     $0x20,%eax
mov    %eax,0x1c14154
ret

LLVM IR (-O0):
define void @pwm_set_pinmux() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
store i32* inttoptr (i64 29442336 to i32*), i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 11
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = load volatile i32, i32* %5
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = and i32 %7, -251658241
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = or i32 %9, 33554432
store i32 %10, i32* %1
%11 = load i32, i32* %1
%12 = load i32*, i32** %2
store volatile i32 %11, i32* %12
%13 = load i32, i32* %1
%14 = and i32 %13, -15728641
store i32 %14, i32* %1
%15 = load i32, i32* %1
%16 = or i32 %15, 2097152
store i32 %16, i32* %1
%17 = load i32, i32* %1
%18 = load i32*, i32** %2
store volatile i32 %17, i32* %18
store i32* inttoptr (i64 29442336 to i32*), i32** %2
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 13
store i32* %20, i32** %2
%21 = load i32*, i32** %2
%22 = load volatile i32, i32* %21
store i32 %22, i32* %1
%23 = load i32, i32* %1
%24 = and i32 %23, -983041
store i32 %24, i32* %1
%25 = load i32, i32* %1
%26 = or i32 %25, 131072
store i32 %26, i32* %1
%27 = load i32, i32* %1
%28 = load i32*, i32** %2
store volatile i32 %27, i32* %28
%29 = load i32, i32* %1
%30 = and i32 %29, -61441
store i32 %30, i32* %1
%31 = load i32, i32* %1
%32 = or i32 %31, 8192
store i32 %32, i32* %1
%33 = load i32, i32* %1
%34 = load i32*, i32** %2
store volatile i32 %33, i32* %34
%35 = load i32, i32* %1
%36 = and i32 %35, -3841
store i32 %36, i32* %1
%37 = load i32, i32* %1
%38 = or i32 %37, 512
store i32 %38, i32* %1
%39 = load i32, i32* %1
%40 = load i32*, i32** %2
store volatile i32 %39, i32* %40
%41 = load i32, i32* %1
%42 = and i32 %41, -241
store i32 %42, i32* %1
%43 = load i32, i32* %1
%44 = or i32 %43, 32
store i32 %44, i32* %1
%45 = load i32, i32* %1
%46 = load i32*, i32** %2
store volatile i32 %45, i32* %46
ret void
}

LLVM IR (-O2):
define void @pwm_set_pinmux() {
%1 = load volatile i32, i32* inttoptr (i64 29442380 to i32*)
%2 = and i32 %1, -251658241
%3 = or i32 %2, 33554432
store volatile i32 %3, i32* inttoptr (i64 29442380 to i32*)
%4 = and i32 %3, -233832449
%5 = or i32 %4, 2097152
store volatile i32 %5, i32* inttoptr (i64 29442380 to i32*)
%6 = load volatile i32, i32* inttoptr (i64 29442388 to i32*)
%7 = and i32 %6, -983041
%8 = or i32 %7, 131072
store volatile i32 %8, i32* inttoptr (i64 29442388 to i32*)
%9 = and i32 %8, -913409
%10 = or i32 %9, 8192
store volatile i32 %10, i32* inttoptr (i64 29442388 to i32*)
%11 = and i32 %10, -909057
%12 = or i32 %11, 512
store volatile i32 %12, i32* inttoptr (i64 29442388 to i32*)
%13 = and i32 %12, -908785
%14 = or i32 %13, 32
store volatile i32 %14, i32* inttoptr (i64 29442388 to i32*)
ret void
}