#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*/ strfchr(char *);
char *strpair(int /*<<< orphan*/, char, char);
int _jsonIsObject(char *pcSrc, char **ppcNext) {
  char *pcEOD;
  if (*pcSrc == '{') {
    if ((pcEOD = strpair(strfchr(pcSrc), '{', '}'))) {
      *ppcNext = ++pcEOD;
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<_jsonIsObject>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7b,%eax
jne    118c <_jsonIsObject+0x6c>
mov    -0x10(%rbp),%rdi
call   1030 <strfchr@plt>
mov    %eax,%edi
mov    $0x7b,%esi
mov    $0x7d,%edx
call   1040 <strpair@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     1187 <_jsonIsObject+0x67>
mov    -0x20(%rbp),%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1193 <_jsonIsObject+0x73>
jmp    118c <_jsonIsObject+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_jsonIsObject>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
cmpb   $0x7b,(%rdi)
jne    1155 <_jsonIsObject+0x35>
mov    %rsi,%r14
call   1030 <strfchr@plt>
mov    %eax,%edi
mov    $0x7b,%esi
mov    $0x7d,%edx
call   1040 <strpair@plt>
test   %rax,%rax
je     1155 <_jsonIsObject+0x35>
add    $0x1,%rax
mov    %rax,(%r14)
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @_jsonIsObject(i8* %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8*
store i8* %0, i8** %4
store i8** %1, i8*** %5
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 123
br i1 %10, label %11, label %21
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = call i32 @strfchr(i8* %12)
%14 = call i8* @strpair(i32 %13, i8 signext 123, i8 signext 125)
store i8* %14, i8** %6
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %20
16: ; preds = %11
%17 = load i8*, i8** %6
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %6
%19 = load i8**, i8*** %5
store i8* %18, i8** %19
store i32 1, i32* %3
br label %22
20: ; preds = %11
br label %21
21: ; preds = %20, %2
store i32 0, i32* %3
br label %22
22: ; preds = %21, %16
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @_jsonIsObject(i8* %0, i8** nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 123
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = tail call i32 @strfchr(i8* %0)
%7 = tail call i8* @strpair(i32 %6, i8 signext 123, i8 signext 125)
%8 = icmp eq i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %10, i8** %1
br label %11
11: ; preds = %2, %5, %9
%12 = phi i32 [ 1, %9 ], [ 0, %5 ], [ 0, %2 ]
ret i32 %12
}