#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*/ cfe_add_autoboot(int, int, char *, char *, char *, char *);
void board_setup_autoboot(void) {
  cfe_add_autoboot(2, 0, "pcmcia0", "elf", "fat", "autoboot");
  cfe_add_autoboot(1, 0x0040, "eth0", "raw", "tftp",
                   "$BOOT_SERVER:$BOOT_SCRIPT");
  cfe_add_autoboot(1, 0, "eth0", "elf", "tftp", 0);
  cfe_add_autoboot(1, 0, "eth0", "raw", "tftp", 0);
}


x86 assembly (clang, -O0):
<board_setup_autoboot>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
xor    %esi,%esi
lea    0xede(%rip),%rdx
lea    0xedf(%rip),%rcx
lea    0xedc(%rip),%r8
lea    0xed9(%rip),%r9
call   1030 <cfe_add_autoboot@plt>
mov    $0x1,%edi
mov    $0x40,%esi
lea    0xecc(%rip),%rdx
lea    0xeca(%rip),%rcx
lea    0xec7(%rip),%r8
lea    0xec5(%rip),%r9
call   1030 <cfe_add_autoboot@plt>
mov    $0x1,%edi
xor    %esi,%esi
lea    0xea4(%rip),%rdx
lea    0xe8c(%rip),%rcx
lea    0xe9f(%rip),%r8
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <cfe_add_autoboot@plt>
mov    $0x1,%edi
xor    %esi,%esi
lea    0xe7e(%rip),%rdx
lea    0xe7c(%rip),%rcx
lea    0xe79(%rip),%r8
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <cfe_add_autoboot@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_setup_autoboot>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xee1(%rip),%rdx
lea    0xee2(%rip),%r14
lea    0xedf(%rip),%r8
lea    0xedc(%rip),%r9
mov    $0x2,%edi
xor    %esi,%esi
mov    %r14,%rcx
call   1030 <cfe_add_autoboot@plt>
lea    0xecf(%rip),%rbx
lea    0xecd(%rip),%r15
lea    0xeca(%rip),%r12
lea    0xec8(%rip),%r9
mov    $0x1,%edi
mov    $0x40,%esi
mov    %rbx,%rdx
mov    %r15,%rcx
mov    %r12,%r8
call   1030 <cfe_add_autoboot@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %r12,%r8
xor    %r9d,%r9d
call   1030 <cfe_add_autoboot@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %r15,%rcx
mov    %r12,%r8
xor    %r9d,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <cfe_add_autoboot@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"pcmcia0\00"
@.str.1 = [4 x i8] c"elf\00"
@.str.2 = [4 x i8] c"fat\00"
@.str.3 = [9 x i8] c"autoboot\00"
@.str.4 = [5 x i8] c"eth0\00"
@.str.5 = [4 x i8] c"raw\00"
@.str.6 = [5 x i8] c"tftp\00"
@.str.7 = [26 x i8] c"$BOOT_SERVER:$BOOT_SCRIPT\00"
define void @board_setup_autoboot() {
%1 = call i32 @cfe_add_autoboot(i32 2, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%2 = call i32 @cfe_add_autoboot(i32 1, i32 64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%3 = call i32 @cfe_add_autoboot(i32 1, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* null)
%4 = call i32 @cfe_add_autoboot(i32 1, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* null)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"pcmcia0\00"
@.str.1 = [4 x i8] c"elf\00"
@.str.2 = [4 x i8] c"fat\00"
@.str.3 = [9 x i8] c"autoboot\00"
@.str.4 = [5 x i8] c"eth0\00"
@.str.5 = [4 x i8] c"raw\00"
@.str.6 = [5 x i8] c"tftp\00"
@.str.7 = [26 x i8] c"$BOOT_SERVER:$BOOT_SCRIPT\00"
define void @board_setup_autoboot() {
%1 = tail call i32 @cfe_add_autoboot(i32 2, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%2 = tail call i32 @cfe_add_autoboot(i32 1, i32 64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%3 = tail call i32 @cfe_add_autoboot(i32 1, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* null)
%4 = tail call i32 @cfe_add_autoboot(i32 1, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* null)
ret void
}