#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\r\n");
  sdram_set_registers();
  print_debug("Ram2\r\n");
  sdram_set_spd_registers();
  print_debug("Ram3\r\n");
  sdram_enable();
  print_debug("Ram4\r\n");
  sdram_first_normal_reference();
  print_debug("Ram5\r\n");
  sdram_enable_refresh();
  sdram_special_finishup();
  print_debug("Ram6\r\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    0xe79(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1060 <sdram_set_spd_registers@plt>
lea    0xe6d(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1070 <sdram_enable@plt>
lea    0xe61(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1030 <sdram_first_normal_reference@plt>
lea    0xe55(%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    0xe42(%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    0xe7c(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1060 <sdram_set_spd_registers@plt>
lea    0xe70(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1070 <sdram_enable@plt>
lea    0xe64(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1030 <sdram_first_normal_reference@plt>
lea    0xe58(%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    0xe45(%rip),%rdi
pop    %rax
jmp    1090 <print_debug@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"Ram1\0D\0A\00"
@.str.1 = [7 x i8] c"Ram2\0D\0A\00"
@.str.2 = [7 x i8] c"Ram3\0D\0A\00"
@.str.3 = [7 x i8] c"Ram4\0D\0A\00"
@.str.4 = [7 x i8] c"Ram5\0D\0A\00"
@.str.5 = [7 x i8] c"Ram6\0D\0A\00"
define void @sdram_initialize() {
%1 = tail call i32 @print_debug(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @sdram_set_registers()
%3 = tail call i32 @print_debug(i8* getelementptr inbounds ([7 x i8], [7 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 ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (...) @sdram_enable()
%7 = tail call i32 @print_debug(i8* getelementptr inbounds ([7 x i8], [7 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 ([7 x i8], [7 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 ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
ret void
}