#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 */
struct wcfxs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Codec_reg_data_latch(struct wcfxs *, int);
int /*<<< orphan*/ fx_write_SPI2UART_wo_CS(int);
void init_WM8510(struct wcfxs *wc, int port) {
  fx_write_SPI2UART_wo_CS(0x000F);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x020F);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x4138);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x16D0);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x1D08);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x420B);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x4532);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x4608);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x3032);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x3270);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x0818);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x0C00);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x0A14);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x0E0A);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x1408);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x0415);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x5F00);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x6401);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x7040);
  Codec_reg_data_latch(wc, port);
  fx_write_SPI2UART_wo_CS(0x0665);
  Codec_reg_data_latch(wc, port);
}


x86 assembly (clang, -O0):
<init_WM8510>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xf,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x20f,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x4138,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x16d0,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x1d08,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x420b,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x4532,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x4608,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x3032,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x3270,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x818,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0xc00,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0xa14,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0xe0a,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x1408,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x415,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x5f00,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x6401,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x7040,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x665,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <Codec_reg_data_latch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_WM8510>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0xf,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x20f,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x4138,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x16d0,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x1d08,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x420b,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x4532,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x4608,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x3032,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x3270,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x818,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0xc00,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0xa14,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0xe0a,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x1408,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x415,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x5f00,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x6401,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x7040,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <Codec_reg_data_latch@plt>
mov    $0x665,%edi
call   1030 <fx_write_SPI2UART_wo_CS@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <Codec_reg_data_latch@plt>

LLVM IR (-O0):
%struct.wcfxs = type { i32 }
define void @init_WM8510(%struct.wcfxs* %0, i32 %1) {
%3 = alloca %struct.wcfxs*
%4 = alloca i32
store %struct.wcfxs* %0, %struct.wcfxs** %3
store i32 %1, i32* %4
%5 = call i32 @fx_write_SPI2UART_wo_CS(i32 15)
%6 = load %struct.wcfxs*, %struct.wcfxs** %3
%7 = load i32, i32* %4
%8 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %6, i32 %7)
%9 = call i32 @fx_write_SPI2UART_wo_CS(i32 527)
%10 = load %struct.wcfxs*, %struct.wcfxs** %3
%11 = load i32, i32* %4
%12 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %10, i32 %11)
%13 = call i32 @fx_write_SPI2UART_wo_CS(i32 16696)
%14 = load %struct.wcfxs*, %struct.wcfxs** %3
%15 = load i32, i32* %4
%16 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %14, i32 %15)
%17 = call i32 @fx_write_SPI2UART_wo_CS(i32 5840)
%18 = load %struct.wcfxs*, %struct.wcfxs** %3
%19 = load i32, i32* %4
%20 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %18, i32 %19)
%21 = call i32 @fx_write_SPI2UART_wo_CS(i32 7432)
%22 = load %struct.wcfxs*, %struct.wcfxs** %3
%23 = load i32, i32* %4
%24 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %22, i32 %23)
%25 = call i32 @fx_write_SPI2UART_wo_CS(i32 16907)
%26 = load %struct.wcfxs*, %struct.wcfxs** %3
%27 = load i32, i32* %4
%28 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %26, i32 %27)
%29 = call i32 @fx_write_SPI2UART_wo_CS(i32 17714)
%30 = load %struct.wcfxs*, %struct.wcfxs** %3
%31 = load i32, i32* %4
%32 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %30, i32 %31)
%33 = call i32 @fx_write_SPI2UART_wo_CS(i32 17928)
%34 = load %struct.wcfxs*, %struct.wcfxs** %3
%35 = load i32, i32* %4
%36 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %34, i32 %35)
%37 = call i32 @fx_write_SPI2UART_wo_CS(i32 12338)
%38 = load %struct.wcfxs*, %struct.wcfxs** %3
%39 = load i32, i32* %4
%40 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %38, i32 %39)
%41 = call i32 @fx_write_SPI2UART_wo_CS(i32 12912)
%42 = load %struct.wcfxs*, %struct.wcfxs** %3
%43 = load i32, i32* %4
%44 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %42, i32 %43)
%45 = call i32 @fx_write_SPI2UART_wo_CS(i32 2072)
%46 = load %struct.wcfxs*, %struct.wcfxs** %3
%47 = load i32, i32* %4
%48 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %46, i32 %47)
%49 = call i32 @fx_write_SPI2UART_wo_CS(i32 3072)
%50 = load %struct.wcfxs*, %struct.wcfxs** %3
%51 = load i32, i32* %4
%52 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %50, i32 %51)
%53 = call i32 @fx_write_SPI2UART_wo_CS(i32 2580)
%54 = load %struct.wcfxs*, %struct.wcfxs** %3
%55 = load i32, i32* %4
%56 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %54, i32 %55)
%57 = call i32 @fx_write_SPI2UART_wo_CS(i32 3594)
%58 = load %struct.wcfxs*, %struct.wcfxs** %3
%59 = load i32, i32* %4
%60 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %58, i32 %59)
%61 = call i32 @fx_write_SPI2UART_wo_CS(i32 5128)
%62 = load %struct.wcfxs*, %struct.wcfxs** %3
%63 = load i32, i32* %4
%64 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %62, i32 %63)
%65 = call i32 @fx_write_SPI2UART_wo_CS(i32 1045)
%66 = load %struct.wcfxs*, %struct.wcfxs** %3
%67 = load i32, i32* %4
%68 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %66, i32 %67)
%69 = call i32 @fx_write_SPI2UART_wo_CS(i32 24320)
%70 = load %struct.wcfxs*, %struct.wcfxs** %3
%71 = load i32, i32* %4
%72 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %70, i32 %71)
%73 = call i32 @fx_write_SPI2UART_wo_CS(i32 25601)
%74 = load %struct.wcfxs*, %struct.wcfxs** %3
%75 = load i32, i32* %4
%76 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %74, i32 %75)
%77 = call i32 @fx_write_SPI2UART_wo_CS(i32 28736)
%78 = load %struct.wcfxs*, %struct.wcfxs** %3
%79 = load i32, i32* %4
%80 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %78, i32 %79)
%81 = call i32 @fx_write_SPI2UART_wo_CS(i32 1637)
%82 = load %struct.wcfxs*, %struct.wcfxs** %3
%83 = load i32, i32* %4
%84 = call i32 @Codec_reg_data_latch(%struct.wcfxs* %82, i32 %83)
ret void
}

LLVM IR (-O2):
%struct.wcfxs = type { i32 }
define void @init_WM8510(%struct.wcfxs* %0, i32 %1) {
%3 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 15)
%4 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%5 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 527)
%6 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%7 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 16696)
%8 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%9 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 5840)
%10 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%11 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 7432)
%12 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%13 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 16907)
%14 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%15 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 17714)
%16 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%17 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 17928)
%18 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%19 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 12338)
%20 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%21 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 12912)
%22 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%23 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 2072)
%24 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%25 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 3072)
%26 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%27 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 2580)
%28 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%29 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 3594)
%30 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%31 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 5128)
%32 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%33 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 1045)
%34 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%35 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 24320)
%36 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%37 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 25601)
%38 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%39 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 28736)
%40 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
%41 = tail call i32 @fx_write_SPI2UART_wo_CS(i32 1637)
%42 = tail call i32 @Codec_reg_data_latch(%struct.wcfxs* %0, i32 %1)
ret void
}