#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 compare_file_names(char const *, char const *, int);
int compare_full_file_names(const char s[], const char t[], int ignore_case) {
  if (s[0] == '.' && t[0] != '.') {
    return -1;
  } else if (s[0] != '.' && t[0] == '.') {
    return 1;
  } else {
    return compare_file_names(s, t, ignore_case);
  }
}


x86 assembly (clang, -O0):
<compare_full_file_names>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    114f <compare_full_file_names+0x3f>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     114f <compare_full_file_names+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    118e <compare_full_file_names+0x7e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     117b <compare_full_file_names+0x6b>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    117b <compare_full_file_names+0x6b>
movl   $0x1,-0x4(%rbp)
jmp    118e <compare_full_file_names+0x7e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <compare_file_names@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_full_file_names>:
cmpb   $0x2e,(%rdi)
mov    (%rsi),%cl
jne    1122 <compare_full_file_names+0x12>
mov    $0xffffffff,%eax
cmp    $0x2e,%cl
je     112c <compare_full_file_names+0x1c>
ret
mov    $0x1,%eax
cmp    $0x2e,%cl
je     1121 <compare_full_file_names+0x11>
jmp    1030 <compare_file_names@plt>

LLVM IR (-O0):
define i32 @compare_full_file_names(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i8*, i8** %5
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 46
br i1 %12, label %13, label %20
13: ; preds = %3
%14 = load i8*, i8** %6
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 46
br i1 %18, label %19, label %20
19: ; preds = %13
store i32 -1, i32* %4
br label %38
20: ; preds = %13, %3
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i64 0
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 46
br i1 %25, label %26, label %33
26: ; preds = %20
%27 = load i8*, i8** %6
%28 = getelementptr inbounds i8, i8* %27, i64 0
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 46
br i1 %31, label %32, label %33
32: ; preds = %26
store i32 1, i32* %4
br label %38
33: ; preds = %26, %20
%34 = load i8*, i8** %5
%35 = load i8*, i8** %6
%36 = load i32, i32* %7
%37 = call i32 @compare_file_names(i8* %34, i8* %35, i32 %36)
store i32 %37, i32* %4
br label %38
38: ; preds = %33, %32, %19
%39 = load i32, i32* %4
ret i32 %39
}

LLVM IR (-O2):
define i32 @compare_full_file_names(i8* %0, i8* %1, i32 %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 46
%6 = load i8, i8* %1
%7 = icmp eq i8 %6, 46
br i1 %5, label %8, label %9
8: ; preds = %3
br i1 %7, label %10, label %12
9: ; preds = %3
br i1 %7, label %12, label %10
10: ; preds = %8, %9
%11 = tail call i32 @compare_file_names(i8* %0, i8* %1, i32 %2)
br label %12
12: ; preds = %9, %8, %10
%13 = phi i32 [ %11, %10 ], [ -1, %8 ], [ 1, %9 ]
ret i32 %13
}