#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 sigma_available(void) {
  return ((rom_present(L"roms/video/sigma/sigma400_font.rom") &&
           rom_present(L"roms/video/sigma/sigma400_bios.rom")));
}


x86 assembly (clang, -O0):
<sigma_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 <sigma_available+0x3c>
lea    0xf4f(%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):
<sigma_available>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <rom_present@plt>
test   %rax,%rax
je     113b <sigma_available+0x2b>
lea    0xf63(%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 = [35 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 115, i32 105, i32 103, i32 109, i32 97, i32 47, i32 115, i32 105, i32 103, i32 109, i32 97, i32 52, i32 48, i32 48, i32 95, i32 102, i32 111, i32 110, i32 116, i32 46, i32 114, i32 111, i32 109, i32 0]
@.str.1 = [35 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 115, i32 105, i32 103, i32 109, i32 97, i32 47, i32 115, i32 105, i32 103, i32 109, i32 97, i32 52, i32 48, i32 48, i32 95, i32 98, i32 105, i32 111, i32 115, i32 46, i32 114, i32 111, i32 109, i32 0]
define i32 @sigma_available() {
%1 = call i64 @rom_present(i8* bitcast ([35 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 ([35 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 = [35 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 115, i32 105, i32 103, i32 109, i32 97, i32 47, i32 115, i32 105, i32 103, i32 109, i32 97, i32 52, i32 48, i32 48, i32 95, i32 102, i32 111, i32 110, i32 116, i32 46, i32 114, i32 111, i32 109, i32 0]
@.str.1 = [35 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 115, i32 105, i32 103, i32 109, i32 97, i32 47, i32 115, i32 105, i32 103, i32 109, i32 97, i32 52, i32 48, i32 48, i32 95, i32 98, i32 105, i32 111, i32 115, i32 46, i32 114, i32 111, i32 109, i32 0]
define i32 @sigma_available() {
%1 = tail call i64 @rom_present(i8* bitcast ([35 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 ([35 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
}