#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*/ case_insensitive_paths();
scalar_t__ strcasecmp(char const *, char const *);
scalar_t__ strcmp(char const *, char const *);
int is_case_change(const char src[], const char dst[]) {
  if (!case_insensitive_paths()) {
    return 0;
  }
  return strcasecmp(src, dst) == 0 && strcmp(src, dst) != 0;
}


x86 assembly (clang, -O0):
<is_case_change>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0x0,%al
call   1040 <case_insensitive_paths@plt>
cmp    $0x0,%eax
jne    115c <is_case_change+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    119d <is_case_change+0x6d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x19(%rbp)
jne    1192 <is_case_change+0x62>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_case_change>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <case_insensitive_paths@plt>
test   %eax,%eax
je     116b <is_case_change+0x3b>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
jne    116b <is_case_change+0x3b>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @is_case_change(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = call i32 (...) @case_insensitive_paths()
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %2
store i32 0, i32* %3
br label %22
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = call i64 @strcasecmp(i8* %10, i8* %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %9
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = call i64 @strcmp(i8* %15, i8* %16)
%18 = icmp ne i64 %17, 0
br label %19
19: ; preds = %14, %9
%20 = phi i1 [ false, %9 ], [ %18, %14 ]
%21 = zext i1 %20 to i32
store i32 %21, i32* %3
br label %22
22: ; preds = %19, %8
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @is_case_change(i8* %0, i8* %1) {
%3 = tail call i32 (...) @case_insensitive_paths()
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = tail call i64 @strcasecmp(i8* %0, i8* %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = tail call i64 @strcmp(i8* %0, i8* %1)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %5, %8, %2
%13 = phi i32 [ 0, %2 ], [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}