#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void outcome_print(FILE *out, char *variable_name, int cpu,
                   long unsigned *n_success, long unsigned *n_fail) {
  fprintf(out, "[%d]: %s outcome\n", cpu, variable_name);
  fprintf(out, "%s successful:\t%lu\n", variable_name, n_success[cpu]);
  fprintf(out, "%s failed:\t%lu\n", variable_name, n_fail[cpu]);
}


x86 assembly (clang, -O0):
<outcome_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xec3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xeb3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xea5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outcome_print>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8,%r14
mov    %rcx,%r15
mov    %edx,%ebp
mov    %rsi,%r12
mov    %rdi,%rbx
lea    0xed3(%rip),%rsi
mov    %r12,%rcx
xor    %eax,%eax
call   1030 <fprintf@plt>
movslq %ebp,%rbp
mov    (%r15,%rbp,8),%rcx
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14,%rbp,8),%rcx
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"[%d]: %s outcome\0A\00"
@.str.1 = [20 x i8] c"%s successful:\09%lu\0A\00"
@.str.2 = [16 x i8] c"%s failed:\09%lu\0A\00"
define void @outcome_print(i32* %0, i8* %1, i32 %2, i64* %3, i64* %4) {
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i64*
%10 = alloca i64*
store i32* %0, i32** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i64* %3, i64** %9
store i64* %4, i64** %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %8
%13 = load i8*, i8** %7
%14 = call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %13)
%15 = load i32*, i32** %6
%16 = load i8*, i8** %7
%17 = load i64*, i64** %9
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i64, i64* %17, i64 %19
%21 = load i64, i64* %20
%22 = call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %16, i64 %21)
%23 = load i32*, i32** %6
%24 = load i8*, i8** %7
%25 = load i64*, i64** %10
%26 = load i32, i32* %8
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i64, i64* %25, i64 %27
%29 = load i64, i64* %28
%30 = call i32 (i32*, i8*, ...) @fprintf(i32* %23, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %24, i64 %29)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"[%d]: %s outcome\0A\00"
@.str.1 = [20 x i8] c"%s successful:\09%lu\0A\00"
@.str.2 = [16 x i8] c"%s failed:\09%lu\0A\00"
define void @outcome_print(i32* nocapture %0, i8* %1, i32 %2, i64* nocapture %3, i64* nocapture %4) {
%6 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %1)
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i64, i64* %3, i64 %7
%9 = load i64, i64* %8
%10 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %1, i64 %9)
%11 = getelementptr inbounds i64, i64* %4, i64 %7
%12 = load i64, i64* %11
%13 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %1, i64 %12)
ret void
}