#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*/ GPIODirModeSet(int, int, int);
int /*<<< orphan*/ GPIOPadConfigSet(int, int, int, int);
int /*<<< orphan*/ GPIOPinWrite(int, int, int);
int /*<<< orphan*/ SSIConfigSetExpClk(int, int /*<<< orphan*/, int, int, int,
                                      int);
int /*<<< orphan*/ SSIEnable(int);
int /*<<< orphan*/ SysCtlClockGet();
int /*<<< orphan*/ SysCtlPeripheralEnable(int);
void PDCInit(void) {
  SysCtlPeripheralEnable(0x10000010);
  SysCtlPeripheralEnable(0x20000001);
  GPIODirModeSet(0x40004000, 0x00000004 | 0x00000020 | 0x00000010, 0x00000002);
  GPIODirModeSet(0x40004000, 0x00000008, 0x00000001);
  GPIOPadConfigSet(0x40004000, 0x00000004, 0x00000002, 0x0000000A);
  SSIConfigSetExpClk(0x40008000, SysCtlClockGet(), 0x00000000, 0x00000000,
                     1000000, 8);
  SSIEnable(0x40008000);
  GPIOPinWrite(0x40004000, 0x00000008, 0);
  GPIOPinWrite(0x40004000, 0x00000008, 0x00000008);
}


x86 assembly (clang, -O0):
<PDCInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000010,%edi
call   1040 <SysCtlPeripheralEnable@plt>
mov    $0x20000001,%edi
call   1040 <SysCtlPeripheralEnable@plt>
mov    $0x40004000,%edi
mov    $0x34,%esi
mov    $0x2,%edx
call   1070 <GPIODirModeSet@plt>
mov    $0x40004000,%edi
mov    $0x8,%esi
mov    $0x1,%edx
call   1070 <GPIODirModeSet@plt>
mov    $0x40004000,%edi
mov    $0x4,%esi
mov    $0x2,%edx
mov    $0xa,%ecx
call   1050 <GPIOPadConfigSet@plt>
mov    $0x0,%al
call   1060 <SysCtlClockGet@plt>
mov    %eax,%esi
mov    $0x40008000,%edi
xor    %ecx,%ecx
mov    $0xf4240,%r8d
mov    $0x8,%r9d
mov    %ecx,%edx
call   1080 <SSIConfigSetExpClk@plt>
mov    $0x40008000,%edi
call   1030 <SSIEnable@plt>
mov    $0x40004000,%edi
mov    $0x8,%esi
xor    %edx,%edx
call   1090 <GPIOPinWrite@plt>
mov    $0x40004000,%edi
mov    $0x8,%edx
mov    %edx,%esi
call   1090 <GPIOPinWrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDCInit>:
push   %rax
mov    $0x10000010,%edi
call   1040 <SysCtlPeripheralEnable@plt>
mov    $0x20000001,%edi
call   1040 <SysCtlPeripheralEnable@plt>
mov    $0x40004000,%edi
mov    $0x34,%esi
mov    $0x2,%edx
call   1070 <GPIODirModeSet@plt>
mov    $0x40004000,%edi
mov    $0x8,%esi
mov    $0x1,%edx
call   1070 <GPIODirModeSet@plt>
mov    $0x40004000,%edi
mov    $0x4,%esi
mov    $0x2,%edx
mov    $0xa,%ecx
call   1050 <GPIOPadConfigSet@plt>
xor    %eax,%eax
call   1060 <SysCtlClockGet@plt>
mov    $0x40008000,%edi
mov    %eax,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0xf4240,%r8d
mov    $0x8,%r9d
call   1080 <SSIConfigSetExpClk@plt>
mov    $0x40008000,%edi
call   1030 <SSIEnable@plt>
mov    $0x40004000,%edi
mov    $0x8,%esi
xor    %edx,%edx
call   1090 <GPIOPinWrite@plt>
mov    $0x40004000,%edi
mov    $0x8,%esi
mov    $0x8,%edx
pop    %rax
jmp    1090 <GPIOPinWrite@plt>

LLVM IR (-O0):
define void @PDCInit() {
%1 = call i32 @SysCtlPeripheralEnable(i32 268435472)
%2 = call i32 @SysCtlPeripheralEnable(i32 536870913)
%3 = call i32 @GPIODirModeSet(i32 1073758208, i32 52, i32 2)
%4 = call i32 @GPIODirModeSet(i32 1073758208, i32 8, i32 1)
%5 = call i32 @GPIOPadConfigSet(i32 1073758208, i32 4, i32 2, i32 10)
%6 = call i32 (...) @SysCtlClockGet()
%7 = call i32 @SSIConfigSetExpClk(i32 1073774592, i32 %6, i32 0, i32 0, i32 1000000, i32 8)
%8 = call i32 @SSIEnable(i32 1073774592)
%9 = call i32 @GPIOPinWrite(i32 1073758208, i32 8, i32 0)
%10 = call i32 @GPIOPinWrite(i32 1073758208, i32 8, i32 8)
ret void
}

LLVM IR (-O2):
define void @PDCInit() {
%1 = tail call i32 @SysCtlPeripheralEnable(i32 268435472)
%2 = tail call i32 @SysCtlPeripheralEnable(i32 536870913)
%3 = tail call i32 @GPIODirModeSet(i32 1073758208, i32 52, i32 2)
%4 = tail call i32 @GPIODirModeSet(i32 1073758208, i32 8, i32 1)
%5 = tail call i32 @GPIOPadConfigSet(i32 1073758208, i32 4, i32 2, i32 10)
%6 = tail call i32 (...) @SysCtlClockGet()
%7 = tail call i32 @SSIConfigSetExpClk(i32 1073774592, i32 %6, i32 0, i32 0, i32 1000000, i32 8)
%8 = tail call i32 @SSIEnable(i32 1073774592)
%9 = tail call i32 @GPIOPinWrite(i32 1073758208, i32 8, i32 0)
%10 = tail call i32 @GPIOPinWrite(i32 1073758208, i32 8, i32 8)
ret void
}