#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*/ cs5463_init_gpio();
int /*<<< orphan*/ cs5463_write(unsigned char *, int);
void cs5463_init(void) {
  unsigned char buff[4];
  cs5463_init_gpio();
  buff[0] = 0xff;
  buff[1] = 0xff;
  buff[2] = 0xff;
  buff[3] = 0xfe;
  cs5463_write(buff, 4);
  buff[0] = 0x40;
  buff[1] = 0x01;
  buff[2] = 0x10;
  buff[3] = 0x68;
  cs5463_write(buff, 4);
  buff[0] = 0x40 | 0x0A;
  buff[1] = 0x00;
  buff[2] = 0x01;
  buff[3] = 0xf4;
  cs5463_write(buff, 4);
}


x86 assembly (clang, -O0):
<cs5463_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <cs5463_init_gpio@plt>
movb   $0xff,-0x4(%rbp)
movb   $0xff,-0x3(%rbp)
movb   $0xff,-0x2(%rbp)
movb   $0xfe,-0x1(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
call   1040 <cs5463_write@plt>
movb   $0x40,-0x4(%rbp)
movb   $0x1,-0x3(%rbp)
movb   $0x10,-0x2(%rbp)
movb   $0x68,-0x1(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
call   1040 <cs5463_write@plt>
movb   $0x4a,-0x4(%rbp)
movb   $0x0,-0x3(%rbp)
movb   $0x1,-0x2(%rbp)
movb   $0xf4,-0x1(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
call   1040 <cs5463_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cs5463_init>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <cs5463_init_gpio@plt>
movl   $0xfeffffff,0xc(%rsp)
fe
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <cs5463_write@plt>
movl   $0x68100140,0xc(%rsp)
68
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <cs5463_write@plt>
movl   $0xf401004a,0xc(%rsp)
f4
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <cs5463_write@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @cs5463_init() {
%1 = alloca [4 x i8]
%2 = call i32 (...) @cs5463_init_gpio()
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
store i8 -1, i8* %3
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
store i8 -1, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
store i8 -1, i8* %5
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
store i8 -2, i8* %6
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%8 = call i32 @cs5463_write(i8* %7, i32 4)
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
store i8 64, i8* %9
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
store i8 1, i8* %10
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
store i8 16, i8* %11
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
store i8 104, i8* %12
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%14 = call i32 @cs5463_write(i8* %13, i32 4)
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
store i8 74, i8* %15
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
store i8 0, i8* %16
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
store i8 1, i8* %17
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
store i8 -12, i8* %18
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%20 = call i32 @cs5463_write(i8* %19, i32 4)
ret void
}

LLVM IR (-O2):
define void @cs5463_init() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @cs5463_init_gpio()
store i8 -1, i8* %2
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
store i8 -1, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
store i8 -1, i8* %5
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
store i8 -2, i8* %6
%7 = call i32 @cs5463_write(i8* %2, i32 4)
store i8 64, i8* %2
store i8 1, i8* %4
store i8 16, i8* %5
store i8 104, i8* %6
%8 = call i32 @cs5463_write(i8* %2, i32 4)
store i8 74, i8* %2
store i8 0, i8* %4
store i8 1, i8* %5
store i8 -12, i8* %6
%9 = call i32 @cs5463_write(i8* %2, i32 4)
ret void
}