#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 */
char *strstr(char const *, char *);
char *check_http_crawler(const char *str) {
  char *match = NULL;
  if ((match = strstr(str, "; +http")))
    return match;
  if ((match = strstr(str, "; http")))
    return match;
  if ((match = strstr(str, " (+http")))
    return match;
  if ((match = strstr(str, " (http")))
    return match;
  if ((match = strstr(str, ";++http")))
    return match;
  return NULL;
}


x86 assembly (clang, -O0):
<check_http_crawler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     114f <check_http_crawler+0x3f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1203 <check_http_crawler+0xf3>
mov    -0x10(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     117a <check_http_crawler+0x6a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1203 <check_http_crawler+0xf3>
mov    -0x10(%rbp),%rdi
lea    0xe8a(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     11a5 <check_http_crawler+0x95>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1203 <check_http_crawler+0xf3>
mov    -0x10(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     11d0 <check_http_crawler+0xc0>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1203 <check_http_crawler+0xf3>
mov    -0x10(%rbp),%rdi
lea    0xe43(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     11fb <check_http_crawler+0xeb>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1203 <check_http_crawler+0xf3>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_http_crawler>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strstr@plt>
test   %rax,%rax
jne    1161 <check_http_crawler+0x51>
lea    0xedc(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strstr@plt>
test   %rax,%rax
jne    1161 <check_http_crawler+0x51>
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strstr@plt>
test   %rax,%rax
jne    1161 <check_http_crawler+0x51>
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strstr@plt>
test   %rax,%rax
je     1163 <check_http_crawler+0x53>
pop    %rbx
ret
lea    0xeb4(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strstr@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"; +http\00"
@.str.1 = [7 x i8] c"; http\00"
@.str.2 = [8 x i8] c" (+http\00"
@.str.3 = [7 x i8] c" (http\00"
@.str.4 = [8 x i8] c";++http\00"
define i8* @check_http_crawler(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* null, i8** %4
%5 = load i8*, i8** %3
%6 = call i8* @strstr(i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %4
store i8* %9, i8** %2
br label %35
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i8* @strstr(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
store i8* %12, i8** %4
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i8*, i8** %4
store i8* %15, i8** %2
br label %35
16: ; preds = %10
%17 = load i8*, i8** %3
%18 = call i8* @strstr(i8* %17, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
store i8* %18, i8** %4
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = load i8*, i8** %4
store i8* %21, i8** %2
br label %35
22: ; preds = %16
%23 = load i8*, i8** %3
%24 = call i8* @strstr(i8* %23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
store i8* %24, i8** %4
%25 = icmp ne i8* %24, null
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = load i8*, i8** %4
store i8* %27, i8** %2
br label %35
28: ; preds = %22
%29 = load i8*, i8** %3
%30 = call i8* @strstr(i8* %29, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
store i8* %30, i8** %4
%31 = icmp ne i8* %30, null
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = load i8*, i8** %4
store i8* %33, i8** %2
br label %35
34: ; preds = %28
store i8* null, i8** %2
br label %35
35: ; preds = %34, %32, %26, %20, %14, %8
%36 = load i8*, i8** %2
ret i8* %36
}

LLVM IR (-O2):
@.str = [8 x i8] c"; +http\00"
@.str.1 = [7 x i8] c"; http\00"
@.str.2 = [8 x i8] c" (+http\00"
@.str.3 = [7 x i8] c" (http\00"
@.str.4 = [8 x i8] c";++http\00"
define i8* @check_http_crawler(i8* %0) {
%2 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %15
4: ; preds = %1
%5 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %15
15: ; preds = %13, %10, %7, %4, %1
%16 = phi i8* [ %2, %1 ], [ %5, %4 ], [ %8, %7 ], [ %11, %10 ], [ %14, %13 ]
ret i8* %16
}