#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*/ GPTLerror(char *, char const *);
int ncmp(const void *pa, const void *pb) {
  static const char *thisfunc = "GPTLsetoption";
  const char **x = (const char **)pa;
  const char **y = (const char **)pb;
  if (*x > *y)
    return 1;
  if (*x < *y)
    return -1;
  if (*x == *y)
    GPTLerror("%s: shared memory address between timers\n", thisfunc);
}


x86 assembly (clang, -O0):
<ncmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jbe    1150 <ncmp+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1197 <ncmp+0x87>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jae    1170 <ncmp+0x60>
movl   $0xffffffff,-0x4(%rbp)
jmp    1197 <ncmp+0x87>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jne    1197 <ncmp+0x87>
mov    0x2e9d(%rip),%rsi
lea    0xe7c(%rip),%rdi
call   1030 <GPTLerror@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ncmp>:
push   %rax
mov    (%rdi),%rcx
mov    (%rsi),%rdx
mov    $0x1,%eax
cmp    %rdx,%rcx
ja     112a <ncmp+0x1a>
mov    $0xffffffff,%eax
jb     112a <ncmp+0x1a>
je     112c <ncmp+0x1c>
pop    %rcx
ret
lea    0xedb(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1030 <GPTLerror@plt>
pop    %rcx
ret

LLVM IR (-O0):
@ncmp.thisfunc = internal global i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0)
@.str = [14 x i8] c"GPTLsetoption\00"
@.str.1 = [42 x i8] c"%s: shared memory address between timers\0A\00"
define i32 @ncmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i8**
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
store i8** %9, i8*** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i8**
store i8** %11, i8*** %7
%12 = load i8**, i8*** %6
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %7
%15 = load i8*, i8** %14
%16 = icmp ugt i8* %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %34
18: ; preds = %2
%19 = load i8**, i8*** %6
%20 = load i8*, i8** %19
%21 = load i8**, i8*** %7
%22 = load i8*, i8** %21
%23 = icmp ult i8* %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 -1, i32* %3
br label %34
25: ; preds = %18
%26 = load i8**, i8*** %6
%27 = load i8*, i8** %26
%28 = load i8**, i8*** %7
%29 = load i8*, i8** %28
%30 = icmp eq i8* %27, %29
br i1 %30, label %31, label %34
31: ; preds = %25
%32 = load i8*, i8** @ncmp.thisfunc
%33 = call i32 @GPTLerror(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %32)
br label %34
34: ; preds = %17, %24, %31, %25
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
@.str = [14 x i8] c"GPTLsetoption\00"
@.str.1 = [42 x i8] c"%s: shared memory address between timers\0A\00"
define i32 @ncmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp ugt i8* %5, %6
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = icmp ult i8* %5, %6
br i1 %9, label %14, label %10
10: ; preds = %8
%11 = icmp eq i8* %5, %6
br i1 %11, label %12, label %14
12: ; preds = %10
%13 = tail call i32 @GPTLerror(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %10, %12, %8, %2
%15 = phi i32 [ 1, %2 ], [ -1, %8 ], [ undef, %12 ], [ undef, %10 ]
ret i32 %15
}