#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 */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ sflap_send(char *, int, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *, char *, char *,
                            char *, char *, char *, char *);
int /*<<< orphan*/ toc_debug_printf(char *, char *, char *, char *, char *,
                                    char *, char *, char *);
void serv_dir_search(char *first, char *middle, char *last, char *maiden,
                     char *city, char *state, char *country, char *email) {
  char buf[2048 * 2];
  snprintf(buf, sizeof(buf) / 2, "toc_dir_search %s:%s:%s:%s:%s:%s:%s:%s",
           first, middle, last, maiden, city, state, country, email);
  toc_debug_printf("Searching for: %s,%s,%s,%s,%s,%s,%s\n", first, middle, last,
                   maiden, city, state, country);
  sflap_send(buf, -1, 2);
}


x86 assembly (clang, -O0):
<serv_dir_search>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x1060,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
lea    -0x1040(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%r14
mov    -0x38(%rbp),%rbx
mov    -0x40(%rbp),%r11
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    $0x800,%esi
lea    0xe6f(%rip),%rdx
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1030 <snprintf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x38(%rbp),%r9
mov    -0x40(%rbp),%r10
mov    0x10(%rbp),%rax
lea    0xe56(%rip),%rdi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <toc_debug_printf@plt>
lea    -0x1040(%rbp),%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1040 <sflap_send@plt>
add    $0x1060,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<serv_dir_search>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1008,%rsp
mov    %r9,%r15
mov    %r8,%r12
mov    %rcx,%r13
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    %rdi,%r14
sub    $0x8,%rsp
lea    0xea2(%rip),%rdx
lea    0x8(%rsp),%rdi
mov    $0x800,%esi
mov    %r14,%rcx
mov    %rbp,%r8
mov    %rbx,%r9
push   0x1050(%rsp)
push   0x1050(%rsp)
push   %r15
push   %r12
push   %r13
call   1030 <snprintf@plt>
add    $0x30,%rsp
lea    0xe92(%rip),%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
mov    %rbx,%rcx
mov    %r13,%r8
mov    %r12,%r9
push   0x1040(%rsp)
push   %r15
call   1050 <toc_debug_printf@plt>
add    $0x10,%rsp
mov    %rsp,%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1040 <sflap_send@plt>
add    $0x1008,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [39 x i8] c"toc_dir_search %s:%s:%s:%s:%s:%s:%s:%s\00"
@.str.1 = [37 x i8] c"Searching for: %s,%s,%s,%s,%s,%s,%s\0A\00"
define void @serv_dir_search(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca [4096 x i8]
store i8* %0, i8** %9
store i8* %1, i8** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i8* %4, i8** %13
store i8* %5, i8** %14
store i8* %6, i8** %15
store i8* %7, i8** %16
%18 = getelementptr inbounds [4096 x i8], [4096 x i8]* %17, i64 0, i64 0
%19 = load i8*, i8** %9
%20 = load i8*, i8** %10
%21 = load i8*, i8** %11
%22 = load i8*, i8** %12
%23 = load i8*, i8** %13
%24 = load i8*, i8** %14
%25 = load i8*, i8** %15
%26 = load i8*, i8** %16
%27 = call i32 @snprintf(i8* %18, i32 2048, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %19, i8* %20, i8* %21, i8* %22, i8* %23, i8* %24, i8* %25, i8* %26)
%28 = load i8*, i8** %9
%29 = load i8*, i8** %10
%30 = load i8*, i8** %11
%31 = load i8*, i8** %12
%32 = load i8*, i8** %13
%33 = load i8*, i8** %14
%34 = load i8*, i8** %15
%35 = call i32 @toc_debug_printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %28, i8* %29, i8* %30, i8* %31, i8* %32, i8* %33, i8* %34)
%36 = getelementptr inbounds [4096 x i8], [4096 x i8]* %17, i64 0, i64 0
%37 = call i32 @sflap_send(i8* %36, i32 -1, i32 2)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"toc_dir_search %s:%s:%s:%s:%s:%s:%s:%s\00"
@.str.1 = [37 x i8] c"Searching for: %s,%s,%s,%s,%s,%s,%s\0A\00"
define void @serv_dir_search(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7) {
%9 = alloca [4096 x i8]
%10 = getelementptr inbounds [4096 x i8], [4096 x i8]* %9, i64 0, i64 0
%11 = call i32 @snprintf(i8* %10, i32 2048, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7)
%12 = call i32 @toc_debug_printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6)
%13 = call i32 @sflap_send(i8* %10, i32 -1, i32 2)
ret void
}