#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 uint32_t;

/* Variables and functions */
scalar_t__ f2m_is_equal(int *, int *, int *);
int /*<<< orphan*/ f2m_print(int *, int *);
int /*<<< orphan*/ f2m_print_as_array(int *, int *);
int /*<<< orphan*/ f2m_print_human(int *, int *);
int /*<<< orphan*/ printf(char *, ...);
void testeqprint(char *testname, uint32_t testnr, uint32_t *t, uint32_t *A,
                 uint32_t *B) {
  if (f2m_is_equal(t, A, B)) {
    printf("%s %d PASSED\n", testname, testnr);
  } else {
    printf("%s %d FAILED\n", testname, testnr);
    printf("    A: ");
    f2m_print(t, A);
    printf("       ");
    f2m_print_human(t, A);
    printf("\n       ");
    f2m_print_as_array(t, A);
    printf("\n");
    printf("    B: ");
    f2m_print(t, B);
    printf("       ");
    f2m_print_human(t, B);
    printf("\n       ");
    f2m_print_as_array(t, B);
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<testeqprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <f2m_is_equal@plt>
cmp    $0x0,%rax
je     11a0 <testeqprint+0x50>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1273 <testeqprint+0x123>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1060 <f2m_print@plt>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <f2m_print_human@plt>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <f2m_print_as_array@plt>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1060 <f2m_print@plt>
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1070 <f2m_print_human@plt>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1050 <f2m_print_as_array@plt>
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testeqprint>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r12
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rdx,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
call   1040 <f2m_is_equal@plt>
test   %rax,%rax
je     11ad <testeqprint+0x4d>
lea    0xe6d(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printf@plt>
lea    0xe5a(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe55(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1070 <f2m_print@plt>
lea    0xe45(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1080 <f2m_print_human@plt>
lea    0xe28(%rip),%r13
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1060 <f2m_print_as_array@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe0b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1070 <f2m_print@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1080 <f2m_print_human@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1060 <f2m_print_as_array@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%s %d PASSED\0A\00"
@.str.1 = [14 x i8] c"%s %d FAILED\0A\00"
@.str.2 = [8 x i8] c" A: \00"
@.str.3 = [8 x i8] c" \00"
@.str.4 = [9 x i8] c"\0A \00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [8 x i8] c" B: \00"
define void @testeqprint(i8* %0, i32 %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i32*, i32** %8
%12 = load i32*, i32** %9
%13 = load i32*, i32** %10
%14 = call i64 @f2m_is_equal(i32* %11, i32* %12, i32* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %5
%17 = load i8*, i8** %6
%18 = load i32, i32* %7
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %17, i32 %18)
br label %50
20: ; preds = %5
%21 = load i8*, i8** %6
%22 = load i32, i32* %7
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %21, i32 %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%25 = load i32*, i32** %8
%26 = load i32*, i32** %9
%27 = call i32 @f2m_print(i32* %25, i32* %26)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%29 = load i32*, i32** %8
%30 = load i32*, i32** %9
%31 = call i32 @f2m_print_human(i32* %29, i32* %30)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%33 = load i32*, i32** %8
%34 = load i32*, i32** %9
%35 = call i32 @f2m_print_as_array(i32* %33, i32* %34)
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%38 = load i32*, i32** %8
%39 = load i32*, i32** %10
%40 = call i32 @f2m_print(i32* %38, i32* %39)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%42 = load i32*, i32** %8
%43 = load i32*, i32** %10
%44 = call i32 @f2m_print_human(i32* %42, i32* %43)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%46 = load i32*, i32** %8
%47 = load i32*, i32** %10
%48 = call i32 @f2m_print_as_array(i32* %46, i32* %47)
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %50
50: ; preds = %20, %16
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s %d PASSED\0A\00"
@.str.1 = [14 x i8] c"%s %d FAILED\0A\00"
@.str.2 = [8 x i8] c" A: \00"
@.str.3 = [8 x i8] c" \00"
@.str.4 = [9 x i8] c"\0A \00"
@.str.6 = [8 x i8] c" B: \00"
define void @testeqprint(i8* %0, i32 %1, i32* %2, i32* %3, i32* %4) {
%6 = tail call i64 @f2m_is_equal(i32* %2, i32* %3, i32* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
br label %26
10: ; preds = %5
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 %1)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%13 = tail call i32 @f2m_print(i32* %2, i32* %3)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%15 = tail call i32 @f2m_print_human(i32* %2, i32* %3)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%17 = tail call i32 @f2m_print_as_array(i32* %2, i32* %3)
%18 = tail call i32 @putchar(i32 10)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%20 = tail call i32 @f2m_print(i32* %2, i32* %4)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%22 = tail call i32 @f2m_print_human(i32* %2, i32* %4)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%24 = tail call i32 @f2m_print_as_array(i32* %2, i32* %4)
%25 = tail call i32 @putchar(i32 10)
br label %26
26: ; preds = %10, %8
ret void
}