#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 */
struct ST_SUIM {
  int dummy;
};

/* Variables and functions */
int GetFunctionDefine(struct ST_SUIM *, char const *);
int IsNullOrEmpty(char const *);
const int IsExistFunction(const int *S, const char *pchFuncName) {
  char *pchLine;
  if (S == NULL)
    return (0);
  int inFlag = IsNullOrEmpty(pchFuncName);
  if (inFlag != 0)
    return (0);
  struct ST_SUIM *pS = (struct ST_SUIM *)S;
  int inLineNo = GetFunctionDefine(pS, pchFuncName);
  if (inLineNo == 0)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<IsExistFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <IsExistFunction+0x27>
movl   $0x0,-0x4(%rbp)
jmp    119e <IsExistFunction+0x7e>
mov    -0x18(%rbp),%rdi
call   1030 <IsNullOrEmpty@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1169 <IsExistFunction+0x49>
movl   $0x0,-0x4(%rbp)
jmp    119e <IsExistFunction+0x7e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <GetFunctionDefine@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jne    1197 <IsExistFunction+0x77>
movl   $0x0,-0x4(%rbp)
jmp    119e <IsExistFunction+0x7e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsExistFunction>:
push   %r15
push   %r14
push   %rbx
xor    %ebx,%ebx
test   %rdi,%rdi
je     1150 <IsExistFunction+0x30>
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <IsNullOrEmpty@plt>
test   %eax,%eax
jne    1150 <IsExistFunction+0x30>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <GetFunctionDefine@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.ST_SUIM = type { i32 }
define i32 @IsExistFunction(i32* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.ST_SUIM*
%9 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
%10 = load i32*, i32** %4
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %29
13: ; preds = %2
%14 = load i8*, i8** %5
%15 = call i32 @IsNullOrEmpty(i8* %14)
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %13
store i32 0, i32* %3
br label %29
19: ; preds = %13
%20 = load i32*, i32** %4
%21 = bitcast i32* %20 to %struct.ST_SUIM*
store %struct.ST_SUIM* %21, %struct.ST_SUIM** %8
%22 = load %struct.ST_SUIM*, %struct.ST_SUIM** %8
%23 = load i8*, i8** %5
%24 = call i32 @GetFunctionDefine(%struct.ST_SUIM* %22, i8* %23)
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %19
store i32 0, i32* %3
br label %29
28: ; preds = %19
store i32 1, i32* %3
br label %29
29: ; preds = %28, %27, %18, %12
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
%struct.ST_SUIM = type { i32 }
define i32 @IsExistFunction(i32* %0, i8* %1) {
%3 = icmp eq i32* %0, null
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = tail call i32 @IsNullOrEmpty(i8* %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = bitcast i32* %0 to %struct.ST_SUIM*
%9 = tail call i32 @GetFunctionDefine(%struct.ST_SUIM* %8, i8* %1)
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %7, %4, %2
%13 = phi i32 [ 0, %2 ], [ %11, %7 ], [ 0, %4 ]
ret i32 %13
}