#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*/ print_debug(char *);
int /*<<< orphan*/ sdram_enable();
int /*<<< orphan*/ sdram_enable_refresh();
int /*<<< orphan*/ sdram_first_normal_reference();
int /*<<< orphan*/ sdram_set_registers();
int /*<<< orphan*/ sdram_set_spd_registers();
int /*<<< orphan*/ sdram_special_finishup();
void sdram_initialize(void) {
  print_debug("Ram1\n");
  sdram_set_registers();
  print_debug("Ram2\n");
  sdram_set_spd_registers();
  print_debug("Ram3\n");
  sdram_enable();
  print_debug("Ram4\n");
  sdram_first_normal_reference();
  print_debug("Ram5\n");
  sdram_enable_refresh();
  sdram_special_finishup();
  print_debug("Ram6\n");
}


x86 assembly (clang, -O0):
<sdram_initialize>:
push   %rbp
mov    %rsp,%rbp
lea    0xe85(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1080 <sdram_set_registers@plt>
lea    0xe78(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1060 <sdram_set_spd_registers@plt>
lea    0xe6b(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1070 <sdram_enable@plt>
lea    0xe5e(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1030 <sdram_first_normal_reference@plt>
lea    0xe51(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1050 <sdram_enable_refresh@plt>
mov    $0x0,%al
call   1040 <sdram_special_finishup@plt>
lea    0xe3d(%rip),%rdi
call   1090 <print_debug@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdram_initialize>:
push   %rax
lea    0xe88(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1080 <sdram_set_registers@plt>
lea    0xe7b(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1060 <sdram_set_spd_registers@plt>
lea    0xe6e(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1070 <sdram_enable@plt>
lea    0xe61(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1030 <sdram_first_normal_reference@plt>
lea    0xe54(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1050 <sdram_enable_refresh@plt>
xor    %eax,%eax
call   1040 <sdram_special_finishup@plt>
lea    0xe40(%rip),%rdi
pop    %rax
jmp    1090 <print_debug@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Ram1\0A\00"
@.str.1 = [6 x i8] c"Ram2\0A\00"
@.str.2 = [6 x i8] c"Ram3\0A\00"
@.str.3 = [6 x i8] c"Ram4\0A\00"
@.str.4 = [6 x i8] c"Ram5\0A\00"
@.str.5 = [6 x i8] c"Ram6\0A\00"
define void @sdram_initialize() {
%1 = call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @sdram_set_registers()
%3 = call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @sdram_set_spd_registers()
%5 = call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (...) @sdram_enable()
%7 = call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (...) @sdram_first_normal_reference()
%9 = call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (...) @sdram_enable_refresh()
%11 = call i32 (...) @sdram_special_finishup()
%12 = call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Ram1\0A\00"
@.str.1 = [6 x i8] c"Ram2\0A\00"
@.str.2 = [6 x i8] c"Ram3\0A\00"
@.str.3 = [6 x i8] c"Ram4\0A\00"
@.str.4 = [6 x i8] c"Ram5\0A\00"
@.str.5 = [6 x i8] c"Ram6\0A\00"
define void @sdram_initialize() {
%1 = tail call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @sdram_set_registers()
%3 = tail call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @sdram_set_spd_registers()
%5 = tail call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (...) @sdram_enable()
%7 = tail call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 (...) @sdram_first_normal_reference()
%9 = tail call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 (...) @sdram_enable_refresh()
%11 = tail call i32 (...) @sdram_special_finishup()
%12 = tail call i32 @print_debug(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
ret void
}