#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 uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef unsigned short uint16_t;

/* Variables and functions */
void I2SFormatConfigure(uint32_t ui32Base, uint8_t ui8iDataDelay,
                        uint8_t ui8iMemory24Bits, uint8_t ui8iSamplingEdge,
                        bool boolDualPhase, uint8_t ui8BitsPerSample,
                        uint16_t ui16transmissionDelay) {
  ;
  ;
  ;
  (*((volatile unsigned short *)(0x40021000 + 0x0000000C))) =
      (ui8iDataDelay << 8) | (ui8iMemory24Bits << 7) | (ui8iSamplingEdge << 6) |
      (boolDualPhase << 5) | (ui8BitsPerSample << 0);
  (*((volatile unsigned short *)(0x40021000 + 0x00000044))) =
      ui16transmissionDelay;
}


x86 assembly (clang, -O0):
<I2SFormatConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%ax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    -0xc(%rbp),%ecx
shl    $0x7,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
shl    $0x6,%ecx
or     %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x5,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %ax,%cx
mov    $0x4002100c,%eax
mov    %cx,(%rax)
mov    0x10(%rbp),%cx
mov    $0x40021044,%eax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2SFormatConfigure>:
movzwl 0x8(%rsp),%eax
shl    $0x8,%esi
shl    $0x7,%edx
or     %esi,%edx
shl    $0x6,%ecx
shl    $0x5,%r8d
or     %ecx,%r8d
or     %edx,%r8d
or     %r9d,%r8d
mov    %r8w,0x4002100c
02 40
mov    %ax,0x40021044
40
ret

LLVM IR (-O0):
define void @I2SFormatConfigure(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i16 zeroext %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i16
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i16 %6, i16* %14
%15 = load i32, i32* %9
%16 = shl i32 %15, 8
%17 = load i32, i32* %10
%18 = shl i32 %17, 7
%19 = or i32 %16, %18
%20 = load i32, i32* %11
%21 = shl i32 %20, 6
%22 = or i32 %19, %21
%23 = load i32, i32* %12
%24 = shl i32 %23, 5
%25 = or i32 %22, %24
%26 = load i32, i32* %13
%27 = shl i32 %26, 0
%28 = or i32 %25, %27
%29 = trunc i32 %28 to i16
store volatile i16 %29, i16* inttoptr (i64 1073877004 to i16*)
%30 = load i16, i16* %14
store volatile i16 %30, i16* inttoptr (i64 1073877060 to i16*)
ret void
}

LLVM IR (-O2):
define void @I2SFormatConfigure(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i16 zeroext %6) {
%8 = shl i32 %1, 8
%9 = shl i32 %2, 7
%10 = or i32 %9, %8
%11 = shl i32 %3, 6
%12 = or i32 %10, %11
%13 = shl i32 %4, 5
%14 = or i32 %12, %13
%15 = or i32 %14, %5
%16 = trunc i32 %15 to i16
store volatile i16 %16, i16* inttoptr (i64 1073877004 to i16*)
store volatile i16 %6, i16* inttoptr (i64 1073877060 to i16*)
ret void
}