#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 *, char *);
scalar_t__ strcmp(char *, char *);
bool testfilename(char *filename1, char *filename2) {
  if (filename1 == NULL)
    return false;
  if (filename2 == NULL)
    return false;
  if (strcmp(filename1, filename2) != 0)
    return false;
  printf("same file names for different file types is not allowed: %s - %s\n",
         filename1, filename2);
  return true;
}


x86 assembly (clang, -O0):
<testfilename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <testfilename+0x27>
movl   $0x0,-0x4(%rbp)
jmp    119c <testfilename+0x7c>
cmpq   $0x0,-0x18(%rbp)
jne    115e <testfilename+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    119c <testfilename+0x7c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1181 <testfilename+0x61>
movl   $0x0,-0x4(%rbp)
jmp    119c <testfilename+0x7c>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testfilename>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
test   %rdi,%rdi
je     115c <testfilename+0x3c>
mov    %rsi,%rbx
test   %rsi,%rsi
je     115c <testfilename+0x3c>
mov    %rdi,%rbp
mov    %rbx,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    115c <testfilename+0x3c>
lea    0xeb5(%rip),%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [66 x i8] c"same file names for different file types is not allowed: %s - %s\0A\00"
define i32 @testfilename(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %23
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 0, i32* %3
br label %23
13: ; preds = %9
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = call i64 @strcmp(i8* %14, i8* %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %13
store i32 0, i32* %3
br label %23
19: ; preds = %13
%20 = load i8*, i8** %4
%21 = load i8*, i8** %5
%22 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* %20, i8* %21)
store i32 1, i32* %3
br label %23
23: ; preds = %19, %18, %12, %8
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
@.str = [66 x i8] c"same file names for different file types is not allowed: %s - %s\0A\00"
define i32 @testfilename(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = tail call i64 @strcmp(i8* %0, i8* %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %11
11: ; preds = %6, %2, %9
%12 = phi i32 [ 1, %9 ], [ 0, %2 ], [ 0, %6 ]
ret i32 %12
}