#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 */
scalar_t__ rom_present(char *);
int st11_m_available(void) {
  return (rom_present(L"roms/hdd/st506/st11_bios_vers_1.7.bin") &&
          rom_present(L"roms/hdd/st506/st11_bios_vers_2.0.bin"));
}


x86 assembly (clang, -O0):
<st11_m_available>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <rom_present@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     114c <st11_m_available+0x3c>
lea    0xf5b(%rip),%rdi
call   1030 <rom_present@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<st11_m_available>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <rom_present@plt>
test   %rax,%rax
je     113b <st11_m_available+0x2b>
lea    0xf6f(%rip),%rdi
call   1030 <rom_present@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 104, i32 100, i32 100, i32 47, i32 115, i32 116, i32 53, i32 48, i32 54, i32 47, i32 115, i32 116, i32 49, i32 49, i32 95, i32 98, i32 105, i32 111, i32 115, i32 95, i32 118, i32 101, i32 114, i32 115, i32 95, i32 49, i32 46, i32 55, i32 46, i32 98, i32 105, i32 110, i32 0]
@.str.1 = [38 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 104, i32 100, i32 100, i32 47, i32 115, i32 116, i32 53, i32 48, i32 54, i32 47, i32 115, i32 116, i32 49, i32 49, i32 95, i32 98, i32 105, i32 111, i32 115, i32 95, i32 118, i32 101, i32 114, i32 115, i32 95, i32 50, i32 46, i32 48, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @st11_m_available() {
%1 = call i64 @rom_present(i8* bitcast ([38 x i32]* @.str to i8*))
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i64 @rom_present(i8* bitcast ([38 x i32]* @.str.1 to i8*))
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [38 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 104, i32 100, i32 100, i32 47, i32 115, i32 116, i32 53, i32 48, i32 54, i32 47, i32 115, i32 116, i32 49, i32 49, i32 95, i32 98, i32 105, i32 111, i32 115, i32 95, i32 118, i32 101, i32 114, i32 115, i32 95, i32 49, i32 46, i32 55, i32 46, i32 98, i32 105, i32 110, i32 0]
@.str.1 = [38 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 104, i32 100, i32 100, i32 47, i32 115, i32 116, i32 53, i32 48, i32 54, i32 47, i32 115, i32 116, i32 49, i32 49, i32 95, i32 98, i32 105, i32 111, i32 115, i32 95, i32 118, i32 101, i32 114, i32 115, i32 95, i32 50, i32 46, i32 48, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @st11_m_available() {
%1 = tail call i64 @rom_present(i8* bitcast ([38 x i32]* @.str to i8*))
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 @rom_present(i8* bitcast ([38 x i32]* @.str.1 to i8*))
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}