#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 re_registers {
  int dummy;
};
struct re_pattern_buffer {
  int dummy;
};

/* Variables and functions */
int re_search_2_stub(struct re_pattern_buffer *, char const *, int,
                     char const *, int, int, int, struct re_registers *, int,
                     int /*<<< orphan*/);
int re_search_2(struct re_pattern_buffer *bufp, const char *string1,
                int lenght1, const char *string2, int length2, int start,
                int range, struct re_registers *regs, int stop) {
  return re_search_2_stub(bufp, string1, lenght1, string2, length2, start,
                          range, regs, stop, 0);
}


x86 assembly (clang, -O0):
<re_search_2>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x48,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9d,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%eax
xor    %ebx,%ebx
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
movl   $0x0,0x18(%rsp)
call   1030 <re_search_2_stub@plt>
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<re_search_2>:
push   %rax
mov    0x10(%rsp),%r10d
mov    0x20(%rsp),%eax
push   $0x0
push   %rax
push   0x28(%rsp)
push   %r10
call   1030 <re_search_2_stub@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.re_pattern_buffer = type { i32 }
%struct.re_registers = type { i32 }
define i32 @re_search_2(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i8* %3, i32 %4, i32 %5, i32 %6, %struct.re_registers* %7, i32 %8) {
%10 = alloca %struct.re_pattern_buffer*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca %struct.re_registers*
%18 = alloca i32
store %struct.re_pattern_buffer* %0, %struct.re_pattern_buffer** %10
store i8* %1, i8** %11
store i32 %2, i32* %12
store i8* %3, i8** %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store %struct.re_registers* %7, %struct.re_registers** %17
store i32 %8, i32* %18
%19 = load %struct.re_pattern_buffer*, %struct.re_pattern_buffer** %10
%20 = load i8*, i8** %11
%21 = load i32, i32* %12
%22 = load i8*, i8** %13
%23 = load i32, i32* %14
%24 = load i32, i32* %15
%25 = load i32, i32* %16
%26 = load %struct.re_registers*, %struct.re_registers** %17
%27 = load i32, i32* %18
%28 = call i32 @re_search_2_stub(%struct.re_pattern_buffer* %19, i8* %20, i32 %21, i8* %22, i32 %23, i32 %24, i32 %25, %struct.re_registers* %26, i32 %27, i32 0)
ret i32 %28
}

LLVM IR (-O2):
%struct.re_pattern_buffer = type { i32 }
%struct.re_registers = type { i32 }
define i32 @re_search_2(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i8* %3, i32 %4, i32 %5, i32 %6, %struct.re_registers* %7, i32 %8) {
%10 = tail call i32 @re_search_2_stub(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i8* %3, i32 %4, i32 %5, i32 %6, %struct.re_registers* %7, i32 %8, i32 0)
ret i32 %10
}