#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*/ EXIT_FAILURE;
int /*<<< orphan*/ exitErrorf(int /*<<< orphan*/, int, char *, char const *,
                              unsigned long long, char const *, ...);
void allocExitError(const char *function, unsigned long long count,
                    unsigned long long size, const char *name) {
  if (size == 1)
    exitErrorf(EXIT_FAILURE, 1, "Can't %s %llu %ss", function, count, name);
  else
    exitErrorf(EXIT_FAILURE, 1, "Can't %s %llu %ss totalling %llu bytes",
               function, count, name, count * size);
}


x86 assembly (clang, -O0):
<allocExitError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x1,-0x18(%rbp)
jne    1160 <allocExitError+0x50>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    $0x1,%esi
lea    0xeac(%rip),%rdx
mov    $0x0,%al
call   1030 <exitErrorf@plt>
jmp    1195 <allocExitError+0x85>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    $0x1,%esi
lea    0xe88(%rip),%rdx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <exitErrorf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocExitError>:
push   %rax
mov    %rcx,%r9
mov    %rsi,%r8
mov    %rdi,%rcx
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
cmp    $0x1,%rdx
jne    113e <allocExitError+0x2e>
lea    0xed0(%rip),%rdx
mov    $0x1,%esi
xor    %eax,%eax
pop    %r11
jmp    1030 <exitErrorf@plt>
imul   %r8,%rdx
mov    %rdx,(%rsp)
lea    0xec5(%rip),%rdx
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <exitErrorf@plt>
pop    %rax
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [18 x i8] c"Can't %s %llu %ss\00"
@.str.1 = [39 x i8] c"Can't %s %llu %ss totalling %llu bytes\00"
define void @allocExitError(i8* %0, i64 %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load i64, i64* %7
%10 = icmp eq i64 %9, 1
br i1 %10, label %11, label %17
11: ; preds = %4
%12 = load i32, i32* @EXIT_FAILURE
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = load i8*, i8** %8
%16 = call i32 (i32, i32, i8*, i8*, i64, i8*, ...) @exitErrorf(i32 %12, i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %13, i64 %14, i8* %15)
br label %26
17: ; preds = %4
%18 = load i32, i32* @EXIT_FAILURE
%19 = load i8*, i8** %5
%20 = load i64, i64* %6
%21 = load i8*, i8** %8
%22 = load i64, i64* %6
%23 = load i64, i64* %7
%24 = mul i64 %22, %23
%25 = call i32 (i32, i32, i8*, i8*, i64, i8*, ...) @exitErrorf(i32 %18, i32 1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8* %19, i64 %20, i8* %21, i64 %24)
br label %26
26: ; preds = %17, %11
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [18 x i8] c"Can't %s %llu %ss\00"
@.str.1 = [39 x i8] c"Can't %s %llu %ss totalling %llu bytes\00"
define void @allocExitError(i8* %0, i64 %1, i64 %2, i8* %3) {
%5 = icmp eq i64 %2, 1
%6 = load i32, i32* @EXIT_FAILURE
br i1 %5, label %7, label %9
7: ; preds = %4
%8 = tail call i32 (i32, i32, i8*, i8*, i64, i8*, ...) @exitErrorf(i32 %6, i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1, i8* %3)
br label %12
9: ; preds = %4
%10 = mul i64 %2, %1
%11 = tail call i32 (i32, i32, i8*, i8*, i64, i8*, ...) @exitErrorf(i32 %6, i32 1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8* %0, i64 %1, i8* %3, i64 %10)
br label %12
12: ; preds = %9, %7
ret void
}