#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 */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
char *bzImage_i386_probe(char *, int /*<<< orphan*/);
char *vmlinux_i386_probe(char *, int /*<<< orphan*/);
char *linux_i386_probe(char *kernel_buf, off_t kernel_size) {
  char *result;
  result = "";
  if (result)
    result = bzImage_i386_probe(kernel_buf, kernel_size);
  if (result)
    result = vmlinux_i386_probe(kernel_buf, kernel_size);
  if (result)
    result = bzImage_i386_probe(kernel_buf, kernel_size);
  return result;
}


x86 assembly (clang, -O0):
<linux_i386_probe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1155 <linux_i386_probe+0x35>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <bzImage_i386_probe@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1170 <linux_i386_probe+0x50>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <vmlinux_i386_probe@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     118b <linux_i386_probe+0x6b>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <bzImage_i386_probe@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linux_i386_probe>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <bzImage_i386_probe@plt>
test   %rax,%rax
je     1151 <linux_i386_probe+0x31>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <vmlinux_i386_probe@plt>
test   %rax,%rax
je     1151 <linux_i386_probe+0x31>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <bzImage_i386_probe@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @linux_i386_probe(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i8* @bzImage_i386_probe(i8* %9, i32 %10)
store i8* %11, i8** %5
br label %12
12: ; preds = %8, %2
%13 = load i8*, i8** %5
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = load i8*, i8** %3
%17 = load i32, i32* %4
%18 = call i8* @vmlinux_i386_probe(i8* %16, i32 %17)
store i8* %18, i8** %5
br label %19
19: ; preds = %15, %12
%20 = load i8*, i8** %5
%21 = icmp ne i8* %20, null
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = load i8*, i8** %3
%24 = load i32, i32* %4
%25 = call i8* @bzImage_i386_probe(i8* %23, i32 %24)
store i8* %25, i8** %5
br label %26
26: ; preds = %22, %19
%27 = load i8*, i8** %5
ret i8* %27
}

LLVM IR (-O2):
define i8* @linux_i386_probe(i8* %0, i32 %1) {
%3 = tail call i8* @bzImage_i386_probe(i8* %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i8* @vmlinux_i386_probe(i8* %0, i32 %1)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i8* @bzImage_i386_probe(i8* %0, i32 %1)
br label %10
10: ; preds = %2, %8, %5
%11 = phi i8* [ %9, %8 ], [ null, %5 ], [ null, %2 ]
ret i8* %11
}