#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*/ abort();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t, ...);
int /*<<< orphan*/ stderr;
void sat_oom(size_t num, size_t len) {
  if (num)
    fprintf(stderr, "Out of memory allocating %zu*%zu bytes!\n", num, len);
  else
    fprintf(stderr, "Out of memory allocating %zu bytes!\n", len);
  abort();
  exit(1);
}


x86 assembly (clang, -O0):
<sat_oom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115f <sat_oom+0x3f>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xead(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    117a <sat_oom+0x5a>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<sat_oom>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
test   %rdx,%rdx
jne    114d <sat_oom+0x2d>
lea    0xeed(%rip),%rsi
mov    %rcx,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>
lea    0xeac(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Out of memory allocating %zu*%zu bytes!\0A\00"
@.str.1 = [37 x i8] c"Out of memory allocating %zu bytes!\0A\00"
define void @sat_oom(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = call i32 (i32, i8*, i64, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %9, i64 %10)
br label %16
12: ; preds = %2
%13 = load i32, i32* @stderr
%14 = load i64, i64* %4
%15 = call i32 (i32, i8*, i64, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i64 %14)
br label %16
16: ; preds = %12, %7
%17 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Out of memory allocating %zu*%zu bytes!\0A\00"
@.str.1 = [37 x i8] c"Out of memory allocating %zu bytes!\0A\00"
define void @sat_oom(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
%4 = load i32, i32* @stderr
br i1 %3, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (i32, i8*, i64, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
br label %9
7: ; preds = %2
%8 = tail call i32 (i32, i8*, i64, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i64 %1)
br label %9
9: ; preds = %7, %5
%10 = tail call i32 (...) @abort()
unreachable
}