#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*/ WriteAFEReg(int, int, int);
void WriteAFE(int iHandle) {
  WriteAFEReg(iHandle, 0x04, 0x00);
  WriteAFEReg(iHandle, 0x03, 0x12);
  WriteAFEReg(iHandle, 0x02, 0x04);
  WriteAFEReg(iHandle, 0x05, 0x10);
  WriteAFEReg(iHandle, 0x01, 0x03);
  WriteAFEReg(iHandle, 0x20, 0xc0);
  WriteAFEReg(iHandle, 0x21, 0xc0);
  WriteAFEReg(iHandle, 0x22, 0xc0);
  WriteAFEReg(iHandle, 0x28, 0x05);
  WriteAFEReg(iHandle, 0x29, 0x03);
  WriteAFEReg(iHandle, 0x2A, 0x04);
}


x86 assembly (clang, -O0):
<WriteAFE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
xor    %edx,%edx
call   1030 <WriteAFEReg@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
mov    $0x12,%edx
call   1030 <WriteAFEReg@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
mov    $0x4,%edx
call   1030 <WriteAFEReg@plt>
mov    -0x4(%rbp),%edi
mov    $0x5,%esi
mov    $0x10,%edx
call   1030 <WriteAFEReg@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <WriteAFEReg@plt>
mov    -0x4(%rbp),%edi
mov    $0x20,%esi
mov    $0xc0,%edx
call   1030 <WriteAFEReg@plt>
mov    -0x4(%rbp),%edi
mov    $0x21,%esi
mov    $0xc0,%edx
call   1030 <WriteAFEReg@plt>
mov    -0x4(%rbp),%edi
mov    $0x22,%esi
mov    $0xc0,%edx
call   1030 <WriteAFEReg@plt>
mov    -0x4(%rbp),%edi
mov    $0x28,%esi
mov    $0x5,%edx
call   1030 <WriteAFEReg@plt>
mov    -0x4(%rbp),%edi
mov    $0x29,%esi
mov    $0x3,%edx
call   1030 <WriteAFEReg@plt>
mov    -0x4(%rbp),%edi
mov    $0x2a,%esi
mov    $0x4,%edx
call   1030 <WriteAFEReg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteAFE>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%esi
xor    %edx,%edx
call   1030 <WriteAFEReg@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    $0x12,%edx
call   1030 <WriteAFEReg@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    $0x4,%edx
call   1030 <WriteAFEReg@plt>
mov    %ebx,%edi
mov    $0x5,%esi
mov    $0x10,%edx
call   1030 <WriteAFEReg@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <WriteAFEReg@plt>
mov    %ebx,%edi
mov    $0x20,%esi
mov    $0xc0,%edx
call   1030 <WriteAFEReg@plt>
mov    %ebx,%edi
mov    $0x21,%esi
mov    $0xc0,%edx
call   1030 <WriteAFEReg@plt>
mov    %ebx,%edi
mov    $0x22,%esi
mov    $0xc0,%edx
call   1030 <WriteAFEReg@plt>
mov    %ebx,%edi
mov    $0x28,%esi
mov    $0x5,%edx
call   1030 <WriteAFEReg@plt>
mov    %ebx,%edi
mov    $0x29,%esi
mov    $0x3,%edx
call   1030 <WriteAFEReg@plt>
mov    %ebx,%edi
mov    $0x2a,%esi
mov    $0x4,%edx
pop    %rbx
jmp    1030 <WriteAFEReg@plt>

LLVM IR (-O0):
define void @WriteAFE(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @WriteAFEReg(i32 %3, i32 4, i32 0)
%5 = load i32, i32* %2
%6 = call i32 @WriteAFEReg(i32 %5, i32 3, i32 18)
%7 = load i32, i32* %2
%8 = call i32 @WriteAFEReg(i32 %7, i32 2, i32 4)
%9 = load i32, i32* %2
%10 = call i32 @WriteAFEReg(i32 %9, i32 5, i32 16)
%11 = load i32, i32* %2
%12 = call i32 @WriteAFEReg(i32 %11, i32 1, i32 3)
%13 = load i32, i32* %2
%14 = call i32 @WriteAFEReg(i32 %13, i32 32, i32 192)
%15 = load i32, i32* %2
%16 = call i32 @WriteAFEReg(i32 %15, i32 33, i32 192)
%17 = load i32, i32* %2
%18 = call i32 @WriteAFEReg(i32 %17, i32 34, i32 192)
%19 = load i32, i32* %2
%20 = call i32 @WriteAFEReg(i32 %19, i32 40, i32 5)
%21 = load i32, i32* %2
%22 = call i32 @WriteAFEReg(i32 %21, i32 41, i32 3)
%23 = load i32, i32* %2
%24 = call i32 @WriteAFEReg(i32 %23, i32 42, i32 4)
ret void
}

LLVM IR (-O2):
define void @WriteAFE(i32 %0) {
%2 = tail call i32 @WriteAFEReg(i32 %0, i32 4, i32 0)
%3 = tail call i32 @WriteAFEReg(i32 %0, i32 3, i32 18)
%4 = tail call i32 @WriteAFEReg(i32 %0, i32 2, i32 4)
%5 = tail call i32 @WriteAFEReg(i32 %0, i32 5, i32 16)
%6 = tail call i32 @WriteAFEReg(i32 %0, i32 1, i32 3)
%7 = tail call i32 @WriteAFEReg(i32 %0, i32 32, i32 192)
%8 = tail call i32 @WriteAFEReg(i32 %0, i32 33, i32 192)
%9 = tail call i32 @WriteAFEReg(i32 %0, i32 34, i32 192)
%10 = tail call i32 @WriteAFEReg(i32 %0, i32 40, i32 5)
%11 = tail call i32 @WriteAFEReg(i32 %0, i32 41, i32 3)
%12 = tail call i32 @WriteAFEReg(i32 %0, i32 42, i32 4)
ret void
}