#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*/ IPC_parseFormat(char const *);
scalar_t__ formatsEqual(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void checkIt(const char *formatString1, const char *formatString2) {
  fprintf(stderr, "%s: \"%s\" \"%s\"\n",
          (formatsEqual(IPC_parseFormat(formatString1),
                        IPC_parseFormat(formatString2))
               ? "SAME"
               : "NOT SAME"),
          formatString1, formatString2);
}


x86 assembly (clang, -O0):
<checkIt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <IPC_parseFormat@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <IPC_parseFormat@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1040 <formatsEqual@plt>
mov    -0x14(%rbp),%edi
mov    %rax,%rcx
lea    0xe97(%rip),%rdx
lea    0xe94(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xe6a(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkIt>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2e9c(%rip),%rax
mov    (%rax),%r15d
call   1030 <IPC_parseFormat@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <IPC_parseFormat@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <formatsEqual@plt>
test   %rax,%rax
lea    0xea6(%rip),%rax
lea    0xea3(%rip),%rdx
cmove  %rax,%rdx
lea    0xe85(%rip),%rsi
mov    %r15d,%edi
mov    %rbx,%rcx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"%s: \22%s\22 \22%s\22\0A\00"
@.str.1 = [5 x i8] c"SAME\00"
@.str.2 = [9 x i8] c"NOT SAME\00"
define void @checkIt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @IPC_parseFormat(i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @IPC_parseFormat(i8* %8)
%10 = call i64 @formatsEqual(i32 %7, i32 %9)
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)
%14 = load i8*, i8** %3
%15 = load i8*, i8** %4
%16 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"%s: \22%s\22 \22%s\22\0A\00"
@.str.1 = [5 x i8] c"SAME\00"
@.str.2 = [9 x i8] c"NOT SAME\00"
define void @checkIt(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @IPC_parseFormat(i8* %0)
%5 = tail call i32 @IPC_parseFormat(i8* %1)
%6 = tail call i64 @formatsEqual(i32 %4, i32 %5)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%9 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %0, i8* %1)
ret void
}