#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 iStrNumSub(unsigned char *, int, unsigned char *, unsigned char *,
               unsigned int, int /*<<< orphan*/);
scalar_t__ strcmp(unsigned char *, char *);
int iStrNumCompare(unsigned char *pszA, unsigned char *pszB,
                   unsigned int uiBase) {
  unsigned char sT[128 + 1];
  int iRet;
  iRet = iStrNumSub(sT, 128, pszA, pszB, uiBase, 0);
  if (iRet == 1)
    return (-1);
  if (strcmp(sT, "0") != 0)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<iStrNumCompare>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x80,%esi
xor    %r9d,%r9d
call   1030 <iStrNumSub@plt>
mov    %eax,-0xa4(%rbp)
cmpl   $0x1,-0xa4(%rbp)
jne    1175 <iStrNumCompare+0x55>
movl   $0xffffffff,-0x4(%rbp)
jmp    11a5 <iStrNumCompare+0x85>
lea    -0xa0(%rbp),%rdi
lea    0xe7d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     119e <iStrNumCompare+0x7e>
movl   $0x1,-0x4(%rbp)
jmp    11a5 <iStrNumCompare+0x85>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iStrNumCompare>:
sub    $0x88,%rsp
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    %rsp,%rdi
mov    $0x80,%esi
xor    %r9d,%r9d
call   1030 <iStrNumSub@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x1,%ecx
je     1166 <iStrNumCompare+0x46>
lea    0xead(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x88,%rsp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
define i32 @iStrNumCompare(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca [129 x i8]
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%10 = getelementptr inbounds [129 x i8], [129 x i8]* %8, i64 0, i64 0
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @iStrNumSub(i8* %10, i32 128, i8* %11, i8* %12, i32 %13, i32 0)
store i32 %14, i32* %9
%15 = load i32, i32* %9
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %18
17: ; preds = %3
store i32 -1, i32* %4
br label %24
18: ; preds = %3
%19 = getelementptr inbounds [129 x i8], [129 x i8]* %8, i64 0, i64 0
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %4
br label %24
23: ; preds = %18
store i32 0, i32* %4
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %4
ret i32 %25
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define i32 @iStrNumCompare(i8* %0, i8* %1, i32 %2) {
%4 = alloca [129 x i8]
%5 = getelementptr inbounds [129 x i8], [129 x i8]* %4, i64 0, i64 0
%6 = call i32 @iStrNumSub(i8* %5, i32 128, i8* %0, i8* %1, i32 %2, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %12, label %8
8: ; preds = %3
%9 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %3
%13 = phi i32 [ -1, %3 ], [ %11, %8 ]
ret i32 %13
}