#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 tl880_dev {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tl880_default_dpc_reg(struct tl880_dev *);
int /*<<< orphan*/ tl880_disable_interrupts(struct tl880_dev *);
int /*<<< orphan*/ tl880_init_dll(struct tl880_dev *);
int /*<<< orphan*/ tl880_init_dpc_pll(struct tl880_dev *);
int /*<<< orphan*/ tl880_init_mif_pll_eq(struct tl880_dev *, int);
int /*<<< orphan*/ tl880_init_sdram(struct tl880_dev *);
int /*<<< orphan*/ tl880_init_sys_pll_eq(struct tl880_dev *, int);
int /*<<< orphan*/ tl880_read_register(struct tl880_dev *, int /*<<< orphan*/);
int /*<<< orphan*/ tl880_write_register(struct tl880_dev *, int,
                                        int /*<<< orphan*/);
void tl880_init_chip(struct tl880_dev *tl880dev) {
  tl880_read_register(tl880dev, 0);
  tl880_write_register(tl880dev, 4, 0);
  tl880_init_sdram(tl880dev);
  tl880_init_sys_pll_eq(tl880dev, 0x64);
  tl880_init_mif_pll_eq(tl880dev, 0x64);
  tl880_init_dll(tl880dev);
  tl880_disable_interrupts(tl880dev);
  tl880_default_dpc_reg(tl880dev);
  tl880_init_dpc_pll(tl880dev);
}


x86 assembly (clang, -O0):
<tl880_init_chip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1060 <tl880_read_register@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
xor    %edx,%edx
call   1070 <tl880_write_register@plt>
mov    -0x8(%rbp),%rdi
call   1080 <tl880_init_sdram@plt>
mov    -0x8(%rbp),%rdi
mov    $0x64,%esi
call   1040 <tl880_init_sys_pll_eq@plt>
mov    -0x8(%rbp),%rdi
mov    $0x64,%esi
call   1050 <tl880_init_mif_pll_eq@plt>
mov    -0x8(%rbp),%rdi
call   1090 <tl880_init_dll@plt>
mov    -0x8(%rbp),%rdi
call   1030 <tl880_disable_interrupts@plt>
mov    -0x8(%rbp),%rdi
call   10a0 <tl880_default_dpc_reg@plt>
mov    -0x8(%rbp),%rdi
call   10b0 <tl880_init_dpc_pll@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tl880_init_chip>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1060 <tl880_read_register@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %edx,%edx
call   1070 <tl880_write_register@plt>
mov    %rbx,%rdi
call   1080 <tl880_init_sdram@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <tl880_init_sys_pll_eq@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <tl880_init_mif_pll_eq@plt>
mov    %rbx,%rdi
call   1090 <tl880_init_dll@plt>
mov    %rbx,%rdi
call   1030 <tl880_disable_interrupts@plt>
mov    %rbx,%rdi
call   10a0 <tl880_default_dpc_reg@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    10b0 <tl880_init_dpc_pll@plt>

LLVM IR (-O0):
%struct.tl880_dev = type { i32 }
define void @tl880_init_chip(%struct.tl880_dev* %0) {
%2 = alloca %struct.tl880_dev*
store %struct.tl880_dev* %0, %struct.tl880_dev** %2
%3 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%4 = call i32 @tl880_read_register(%struct.tl880_dev* %3, i32 0)
%5 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%6 = call i32 @tl880_write_register(%struct.tl880_dev* %5, i32 4, i32 0)
%7 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%8 = call i32 @tl880_init_sdram(%struct.tl880_dev* %7)
%9 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%10 = call i32 @tl880_init_sys_pll_eq(%struct.tl880_dev* %9, i32 100)
%11 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%12 = call i32 @tl880_init_mif_pll_eq(%struct.tl880_dev* %11, i32 100)
%13 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%14 = call i32 @tl880_init_dll(%struct.tl880_dev* %13)
%15 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%16 = call i32 @tl880_disable_interrupts(%struct.tl880_dev* %15)
%17 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%18 = call i32 @tl880_default_dpc_reg(%struct.tl880_dev* %17)
%19 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%20 = call i32 @tl880_init_dpc_pll(%struct.tl880_dev* %19)
ret void
}

LLVM IR (-O2):
%struct.tl880_dev = type { i32 }
define void @tl880_init_chip(%struct.tl880_dev* %0) {
%2 = tail call i32 @tl880_read_register(%struct.tl880_dev* %0, i32 0)
%3 = tail call i32 @tl880_write_register(%struct.tl880_dev* %0, i32 4, i32 0)
%4 = tail call i32 @tl880_init_sdram(%struct.tl880_dev* %0)
%5 = tail call i32 @tl880_init_sys_pll_eq(%struct.tl880_dev* %0, i32 100)
%6 = tail call i32 @tl880_init_mif_pll_eq(%struct.tl880_dev* %0, i32 100)
%7 = tail call i32 @tl880_init_dll(%struct.tl880_dev* %0)
%8 = tail call i32 @tl880_disable_interrupts(%struct.tl880_dev* %0)
%9 = tail call i32 @tl880_default_dpc_reg(%struct.tl880_dev* %0)
%10 = tail call i32 @tl880_init_dpc_pll(%struct.tl880_dev* %0)
ret void
}