#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 */
scalar_t__ cregex(char *, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char result[200] = {0};
  if (0 == cregex("\"uid\":\"([0-9]*)\"",
                  "\"uid\":\"30710830\",\"albumUrl\":\"http://chunan.19lou.com/"
                  "user/album?uid=30710830&page=1\",",
                  result)) {
    printf("here is main %s\n", result);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1050 <memset@plt>
lea    -0xd0(%rbp),%rdx
lea    0xe9d(%rip),%rdi
lea    0xea7(%rip),%rsi
call   1030 <cregex@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1190 <main+0x60>
lea    -0xd0(%rbp),%rsi
lea    0xedc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xc8,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0xc0(%rsp)
lea    0xe7c(%rip),%rdi
lea    0xe86(%rip),%rsi
mov    %rsp,%rdx
call   1030 <cregex@plt>
test   %rax,%rax
jne    11a7 <main+0x87>
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xc8,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\22uid\22:\22([0-9]*)\22\00"
@.str.1 = [86 x i8] c"\22uid\22:\2230710830\22,\22albumUrl\22:\22http://chunan.19lou.com/user/album?uid=30710830&page=1\22,\00"
@.str.2 = [17 x i8] c"here is main %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
store i32 0, i32* %1
%3 = bitcast [200 x i8]* %2 to i8*
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%5 = call i64 @cregex(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = icmp eq i64 0, %5
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"\22uid\22:\22([0-9]*)\22\00"
@.str.1 = [86 x i8] c"\22uid\22:\2230710830\22,\22albumUrl\22:\22http://chunan.19lou.com/user/album?uid=30710830&page=1\22,\00"
@.str.2 = [17 x i8] c"here is main %s\0A\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = call i64 @cregex(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %2)
br label %7
7: ; preds = %5, %0
ret i32 0
}