#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*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void print_lu_compare(char *title, unsigned long v1, unsigned long v2,
                      char *cont) {
  if (v1 != v2) {
    printf("FAILED - %10s\n", title);
    strcpy(cont, "P");
  } else
    printf("%-10s ......OK \n", title);
}


x86 assembly (clang, -O0):
<print_lu_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     116b <print_lu_compare+0x4b>
mov    -0x8(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1030 <strcpy@plt>
jmp    117b <print_lu_compare+0x5b>
mov    -0x8(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_lu_compare>:
mov    %rdi,%rax
cmp    %rdx,%rsi
jne    1137 <print_lu_compare+0x17>
lea    0xee2(%rip),%rdi
mov    %rax,%rsi
jmp    1040 <printf@plt>
push   %rbx
mov    %rcx,%rbx
lea    0xebe(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"FAILED - %10s\0A\00"
@.str.1 = [2 x i8] c"P\00"
@.str.2 = [17 x i8] c"%-10s ......OK \0A\00"
define void @print_lu_compare(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* %6
%10 = load i64, i64* %7
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %4
%13 = load i8*, i8** %5
%14 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = load i8*, i8** %8
%16 = call i32 @strcpy(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %20
17: ; preds = %4
%18 = load i8*, i8** %5
%19 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %17, %12
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"FAILED - %10s\0A\00"
@.str.1 = [2 x i8] c"P\00"
@.str.2 = [17 x i8] c"%-10s ......OK \0A\00"
define void @print_lu_compare(i8* %0, i64 %1, i64 %2, i8* %3) {
%5 = icmp eq i64 %1, %2
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %4
%10 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %11
11: ; preds = %9, %6
ret void
}