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

/* Variables and functions */
int /*<<< orphan*/ EMACPHYWrite(int, int /*<<< orphan*/, int, int);
void EMACPHYExtendedWrite(uint32_t ui32Base, uint8_t ui8PhyAddr,
                          uint16_t ui16RegAddr, uint16_t ui16Value) {
  ;
  ;
  EMACPHYWrite(0x400EC000, ui8PhyAddr, 0x0000000D, 0x001F);
  EMACPHYWrite(0x400EC000, ui8PhyAddr, 0x0000000E, ui16RegAddr);
  EMACPHYWrite(0x400EC000, ui8PhyAddr, 0x0000000D, 0x401F);
  EMACPHYWrite(0x400EC000, ui8PhyAddr, 0x0000000E, ui16Value);
}


x86 assembly (clang, -O0):
<EMACPHYExtendedWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x400ec000,%edi
mov    $0xd,%edx
mov    $0x1f,%ecx
call   1030 <EMACPHYWrite@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%ecx
mov    $0x400ec000,%edi
mov    $0xe,%edx
call   1030 <EMACPHYWrite@plt>
mov    -0x8(%rbp),%esi
mov    $0x400ec000,%edi
mov    $0xd,%edx
mov    $0x401f,%ecx
call   1030 <EMACPHYWrite@plt>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%ecx
mov    $0x400ec000,%edi
mov    $0xe,%edx
call   1030 <EMACPHYWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACPHYExtendedWrite>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
mov    $0x400ec000,%edi
mov    $0xd,%edx
mov    $0x1f,%ecx
call   1030 <EMACPHYWrite@plt>
mov    $0x400ec000,%edi
mov    %ebx,%esi
mov    $0xe,%edx
mov    %ebp,%ecx
call   1030 <EMACPHYWrite@plt>
mov    $0x400ec000,%edi
mov    %ebx,%esi
mov    $0xd,%edx
mov    $0x401f,%ecx
call   1030 <EMACPHYWrite@plt>
mov    $0x400ec000,%edi
mov    %ebx,%esi
mov    $0xe,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <EMACPHYWrite@plt>

LLVM IR (-O0):
define void @EMACPHYExtendedWrite(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = call i32 @EMACPHYWrite(i32 1074708480, i32 %9, i32 13, i32 31)
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = call i32 @EMACPHYWrite(i32 1074708480, i32 %11, i32 14, i32 %12)
%14 = load i32, i32* %6
%15 = call i32 @EMACPHYWrite(i32 1074708480, i32 %14, i32 13, i32 16415)
%16 = load i32, i32* %6
%17 = load i32, i32* %8
%18 = call i32 @EMACPHYWrite(i32 1074708480, i32 %16, i32 14, i32 %17)
ret void
}

LLVM IR (-O2):
define void @EMACPHYExtendedWrite(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @EMACPHYWrite(i32 1074708480, i32 %1, i32 13, i32 31)
%6 = tail call i32 @EMACPHYWrite(i32 1074708480, i32 %1, i32 14, i32 %2)
%7 = tail call i32 @EMACPHYWrite(i32 1074708480, i32 %1, i32 13, i32 16415)
%8 = tail call i32 @EMACPHYWrite(i32 1074708480, i32 %1, i32 14, i32 %3)
ret void
}