#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_assert_command();
int /*<<< orphan*/ sdram_set_command_cbr();
int /*<<< orphan*/ sdram_set_command_none();
int /*<<< orphan*/ sdram_set_command_noop();
int /*<<< orphan*/ sdram_set_command_precharge();
int /*<<< orphan*/ sdram_set_mode_register();
int /*<<< orphan*/ udelay(int);
void sdram_enable(void) {
  print_debug("Ram Enable 1\n");
  sdram_set_command_noop();
  udelay(200);
  sdram_assert_command();
  sdram_set_command_precharge();
  sdram_assert_command();
  print_debug("Ram Enable 2\n");
  sdram_set_command_cbr();
  sdram_assert_command();
  sdram_assert_command();
  sdram_assert_command();
  sdram_assert_command();
  sdram_assert_command();
  sdram_assert_command();
  sdram_assert_command();
  sdram_assert_command();
  print_debug("Ram Enable 3\n");
  sdram_set_mode_register();
  print_debug("Ram Enable 4\n");
  sdram_set_command_none();
  print_debug("Ram Enable 5\n");
}


x86 assembly (clang, -O0):
<sdram_enable>:
push   %rbp
mov    %rsp,%rbp
lea    0xe75(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1060 <sdram_set_command_noop@plt>
mov    $0xc8,%edi
call   1070 <udelay@plt>
mov    $0x0,%al
call   1040 <sdram_assert_command@plt>
mov    $0x0,%al
call   1080 <sdram_set_command_precharge@plt>
mov    $0x0,%al
call   1040 <sdram_assert_command@plt>
lea    0xe51(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1050 <sdram_set_command_cbr@plt>
mov    $0x0,%al
call   1040 <sdram_assert_command@plt>
mov    $0x0,%al
call   1040 <sdram_assert_command@plt>
mov    $0x0,%al
call   1040 <sdram_assert_command@plt>
mov    $0x0,%al
call   1040 <sdram_assert_command@plt>
mov    $0x0,%al
call   1040 <sdram_assert_command@plt>
mov    $0x0,%al
call   1040 <sdram_assert_command@plt>
mov    $0x0,%al
call   1040 <sdram_assert_command@plt>
mov    $0x0,%al
call   1040 <sdram_assert_command@plt>
lea    0xe14(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   10a0 <sdram_set_mode_register@plt>
lea    0xe0f(%rip),%rdi
call   1090 <print_debug@plt>
mov    $0x0,%al
call   1030 <sdram_set_command_none@plt>
lea    0xe0a(%rip),%rdi
call   1090 <print_debug@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdram_enable>:
push   %rax
lea    0xe78(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1060 <sdram_set_command_noop@plt>
mov    $0xc8,%edi
call   1070 <udelay@plt>
xor    %eax,%eax
call   1040 <sdram_assert_command@plt>
xor    %eax,%eax
call   1080 <sdram_set_command_precharge@plt>
xor    %eax,%eax
call   1040 <sdram_assert_command@plt>
lea    0xe54(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1050 <sdram_set_command_cbr@plt>
xor    %eax,%eax
call   1040 <sdram_assert_command@plt>
xor    %eax,%eax
call   1040 <sdram_assert_command@plt>
xor    %eax,%eax
call   1040 <sdram_assert_command@plt>
xor    %eax,%eax
call   1040 <sdram_assert_command@plt>
xor    %eax,%eax
call   1040 <sdram_assert_command@plt>
xor    %eax,%eax
call   1040 <sdram_assert_command@plt>
xor    %eax,%eax
call   1040 <sdram_assert_command@plt>
xor    %eax,%eax
call   1040 <sdram_assert_command@plt>
lea    0xe17(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   10a0 <sdram_set_mode_register@plt>
lea    0xe12(%rip),%rdi
call   1090 <print_debug@plt>
xor    %eax,%eax
call   1030 <sdram_set_command_none@plt>
lea    0xe0d(%rip),%rdi
pop    %rax
jmp    1090 <print_debug@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Ram Enable 1\0A\00"
@.str.1 = [14 x i8] c"Ram Enable 2\0A\00"
@.str.2 = [14 x i8] c"Ram Enable 3\0A\00"
@.str.3 = [14 x i8] c"Ram Enable 4\0A\00"
@.str.4 = [14 x i8] c"Ram Enable 5\0A\00"
define void @sdram_enable() {
%1 = call i32 @print_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @sdram_set_command_noop()
%3 = call i32 @udelay(i32 200)
%4 = call i32 (...) @sdram_assert_command()
%5 = call i32 (...) @sdram_set_command_precharge()
%6 = call i32 (...) @sdram_assert_command()
%7 = call i32 @print_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (...) @sdram_set_command_cbr()
%9 = call i32 (...) @sdram_assert_command()
%10 = call i32 (...) @sdram_assert_command()
%11 = call i32 (...) @sdram_assert_command()
%12 = call i32 (...) @sdram_assert_command()
%13 = call i32 (...) @sdram_assert_command()
%14 = call i32 (...) @sdram_assert_command()
%15 = call i32 (...) @sdram_assert_command()
%16 = call i32 (...) @sdram_assert_command()
%17 = call i32 @print_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 (...) @sdram_set_mode_register()
%19 = call i32 @print_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 (...) @sdram_set_command_none()
%21 = call i32 @print_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Ram Enable 1\0A\00"
@.str.1 = [14 x i8] c"Ram Enable 2\0A\00"
@.str.2 = [14 x i8] c"Ram Enable 3\0A\00"
@.str.3 = [14 x i8] c"Ram Enable 4\0A\00"
@.str.4 = [14 x i8] c"Ram Enable 5\0A\00"
define void @sdram_enable() {
%1 = tail call i32 @print_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @sdram_set_command_noop()
%3 = tail call i32 @udelay(i32 200)
%4 = tail call i32 (...) @sdram_assert_command()
%5 = tail call i32 (...) @sdram_set_command_precharge()
%6 = tail call i32 (...) @sdram_assert_command()
%7 = tail call i32 @print_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 (...) @sdram_set_command_cbr()
%9 = tail call i32 (...) @sdram_assert_command()
%10 = tail call i32 (...) @sdram_assert_command()
%11 = tail call i32 (...) @sdram_assert_command()
%12 = tail call i32 (...) @sdram_assert_command()
%13 = tail call i32 (...) @sdram_assert_command()
%14 = tail call i32 (...) @sdram_assert_command()
%15 = tail call i32 (...) @sdram_assert_command()
%16 = tail call i32 (...) @sdram_assert_command()
%17 = tail call i32 @print_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%18 = tail call i32 (...) @sdram_set_mode_register()
%19 = tail call i32 @print_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%20 = tail call i32 (...) @sdram_set_command_none()
%21 = tail call i32 @print_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
ret void
}