#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 byte_re_search_2(struct re_pattern_buffer *, char const *, int,
                     char const *, int, int, int, struct re_registers *, int);
int re_search_2(struct re_pattern_buffer *bufp, const char *string1, int size1,
                const char *string2, int size2, int startpos, int range,
                struct re_registers *regs, int stop) {
  return byte_re_search_2(bufp, string1, size1, string2, size2, startpos, range,
                          regs, stop);
}


x86 assembly (clang, -O0):
<re_search_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <byte_re_search_2@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<re_search_2>:
jmp    1030 <byte_re_search_2@plt>

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 @byte_re_search_2(%struct.re_pattern_buffer* %19, i8* %20, i32 %21, i8* %22, i32 %23, i32 %24, i32 %25, %struct.re_registers* %26, i32 %27)
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 @byte_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)
ret i32 %10
}