#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct evkeyvalq {
  struct evkeyval *tqh_first;
};
struct TYPE_2__ {
  struct evkeyval *tqe_next;
};
struct evkeyval {
  char const *key;
  char *value;
  TYPE_1__ next;
};
struct evhttp_request {
  int dummy;
};
struct evbuffer {
  int dummy;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
#define EVHTTP_REQ_CONNECT 136
#define EVHTTP_REQ_DELETE 135
#define EVHTTP_REQ_GET 134
#define EVHTTP_REQ_HEAD 133
#define EVHTTP_REQ_OPTIONS 132
#define EVHTTP_REQ_PATCH 131
#define EVHTTP_REQ_POST 130
#define EVHTTP_REQ_PUT 129
#define EVHTTP_REQ_TRACE 128
scalar_t__ evbuffer_get_length(struct evbuffer *);
int evbuffer_remove(struct evbuffer *, char *, int);
int evhttp_request_get_command(struct evhttp_request *);
struct evbuffer *evhttp_request_get_input_buffer(struct evhttp_request *);
struct evkeyvalq *evhttp_request_get_input_headers(struct evhttp_request *);
char *evhttp_request_get_uri(struct evhttp_request *);
int /*<<< orphan*/ evhttp_send_reply(struct evhttp_request *, int, char *,
                                     int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *, char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdout;
void dump_request_cb(struct evhttp_request *req, void *arg) {
  const char *cmdtype;
  struct evkeyvalq *headers;
  struct evkeyval *header;
  struct evbuffer *buf;
  switch (evhttp_request_get_command(req)) {
  case EVHTTP_REQ_GET:
    cmdtype = "GET";
    break;
  case EVHTTP_REQ_POST:
    cmdtype = "POST";
    break;
  case EVHTTP_REQ_HEAD:
    cmdtype = "HEAD";
    break;
  case EVHTTP_REQ_PUT:
    cmdtype = "PUT";
    break;
  case EVHTTP_REQ_DELETE:
    cmdtype = "DELETE";
    break;
  case EVHTTP_REQ_OPTIONS:
    cmdtype = "OPTIONS";
    break;
  case EVHTTP_REQ_TRACE:
    cmdtype = "TRACE";
    break;
  case EVHTTP_REQ_CONNECT:
    cmdtype = "CONNECT";
    break;
  case EVHTTP_REQ_PATCH:
    cmdtype = "PATCH";
    break;
  default:
    cmdtype = "unknown";
    break;
  }
  printf("Received a %s request for %s\nHeaders:\n", cmdtype,
         evhttp_request_get_uri(req));
  headers = evhttp_request_get_input_headers(req);
  for (header = headers->tqh_first; header; header = header->next.tqe_next) {
    printf("  %s: %s\n", header->key, header->value);
  }
  buf = evhttp_request_get_input_buffer(req);
  puts("Input data: <<<");
  while (evbuffer_get_length(buf)) {
    int n;
    char cbuf[128];
    n = evbuffer_remove(buf, cbuf, sizeof(buf) - 1);
    if (n > 0)
      (void)fwrite(cbuf, 1, n, stdout);
  }
  puts(">>>");
  evhttp_send_reply(req, 200, "OK", NULL);
}


x86 assembly (clang, -O0):
<dump_request_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <evhttp_request_get_command@plt>
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0xc8(%rbp)
sub    $0x8,%eax
ja     1278 <dump_request_cb+0xd8>
mov    -0xc8(%rbp),%rax
lea    0xe21(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe35(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1283 <dump_request_cb+0xe3>
lea    0xe29(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1283 <dump_request_cb+0xe3>
lea    0xe1e(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1283 <dump_request_cb+0xe3>
lea    0xe13(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1283 <dump_request_cb+0xe3>
lea    0xe07(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1283 <dump_request_cb+0xe3>
lea    0xdfe(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1283 <dump_request_cb+0xe3>
lea    0xdf6(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1283 <dump_request_cb+0xe3>
lea    0xdec(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1283 <dump_request_cb+0xe3>
lea    0xde4(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1283 <dump_request_cb+0xe3>
lea    0xdda(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <evhttp_request_get_uri@plt>
mov    -0xd0(%rbp),%rsi
mov    %rax,%rdx
lea    0xdb9(%rip),%rdi
call   1060 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1080 <evhttp_request_get_input_headers@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     12fc <dump_request_cb+0x15c>
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xda2(%rip),%rdi
call   1060 <printf@plt>
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    12c5 <dump_request_cb+0x125>
mov    -0x8(%rbp),%rdi
call   10a0 <evhttp_request_get_input_buffer@plt>
mov    %rax,-0x30(%rbp)
lea    0xd82(%rip),%rdi
call   1040 <puts@plt>
mov    -0x30(%rbp),%rdi
call   1090 <evbuffer_get_length@plt>
cmp    $0x0,%rax
je     136c <dump_request_cb+0x1cc>
mov    -0x30(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
mov    $0x7,%edx
call   1050 <evbuffer_remove@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jle    1367 <dump_request_cb+0x1c7>
lea    -0xc0(%rbp),%rdi
mov    -0x34(%rbp),%edx
mov    0x2c85(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   10b0 <fwrite@plt>
jmp    1315 <dump_request_cb+0x175>
lea    0xd2f(%rip),%rdi
call   1040 <puts@plt>
mov    -0x8(%rbp),%rdi
mov    $0xc8,%esi
lea    0xd1e(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   10c0 <evhttp_send_reply@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_request_cb>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%r14
call   1030 <evhttp_request_get_command@plt>
add    $0xffffff80,%eax
cmp    $0x8,%eax
ja     11d0 <dump_request_cb+0x30>
cltq
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rbx
add    %rcx,%rbx
jmp    11d7 <dump_request_cb+0x37>
lea    0xe5e(%rip),%rbx
mov    %r14,%rdi
call   1070 <evhttp_request_get_uri@plt>
lea    0xe57(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1060 <printf@plt>
mov    %r14,%rdi
call   1080 <evhttp_request_get_input_headers@plt>
mov    (%rax),%rbx
test   %rbx,%rbx
je     1228 <dump_request_cb+0x88>
lea    0xe5c(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%rsi
mov    0x8(%rbx),%rdx
mov    %r15,%rdi
call   1060 <printf@plt>
mov    0x10(%rbx),%rbx
test   %rbx,%rbx
jne    1210 <dump_request_cb+0x70>
mov    %r14,%rdi
call   10a0 <evhttp_request_get_input_buffer@plt>
mov    %rax,%rbx
lea    0xe34(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1090 <evbuffer_get_length@plt>
test   %rax,%rax
je     1296 <dump_request_cb+0xf6>
mov    %rsp,%r15
mov    0x2d8a(%rip),%r12
jmp    126d <dump_request_cb+0xcd>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1090 <evbuffer_get_length@plt>
test   %rax,%rax
je     1296 <dump_request_cb+0xf6>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x7,%edx
call   1050 <evbuffer_remove@plt>
test   %eax,%eax
jle    1260 <dump_request_cb+0xc0>
mov    (%r12),%ecx
mov    %r15,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   10b0 <fwrite@plt>
jmp    1260 <dump_request_cb+0xc0>
lea    0xde1(%rip),%rdi
call   1040 <puts@plt>
lea    0xdd9(%rip),%rdx
mov    %r14,%rdi
mov    $0xc8,%esi
xor    %ecx,%ecx
call   10c0 <evhttp_send_reply@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.evhttp_request = type { i32 }
%struct.evkeyvalq = type { %struct.evkeyval* }
%struct.evkeyval = type { i8*, i8*, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { %struct.evkeyval* }
%struct.evbuffer = type { i32 }
@.str = [4 x i8] c"GET\00"
@.str.1 = [5 x i8] c"POST\00"
@.str.2 = [5 x i8] c"HEAD\00"
@.str.3 = [4 x i8] c"PUT\00"
@.str.4 = [7 x i8] c"DELETE\00"
@.str.5 = [8 x i8] c"OPTIONS\00"
@.str.6 = [6 x i8] c"TRACE\00"
@.str.7 = [8 x i8] c"CONNECT\00"
@.str.8 = [6 x i8] c"PATCH\00"
@.str.9 = [8 x i8] c"unknown\00"
@.str.10 = [39 x i8] c"Received a %s request for %s\0AHeaders:\0A\00"
@.str.11 = [10 x i8] c" %s: %s\0A\00"
@.str.12 = [16 x i8] c"Input data: <<<\00"
@stdout = global i32 0
@.str.13 = [4 x i8] c">>>\00"
@.str.14 = [3 x i8] c"OK\00"
define void @dump_request_cb(%struct.evhttp_request* %0, i8* %1) {
%3 = alloca %struct.evhttp_request*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.evkeyvalq*
%7 = alloca %struct.evkeyval*
%8 = alloca %struct.evbuffer*
%9 = alloca i32
%10 = alloca [128 x i8]
store %struct.evhttp_request* %0, %struct.evhttp_request** %3
store i8* %1, i8** %4
%11 = load %struct.evhttp_request*, %struct.evhttp_request** %3
%12 = call i32 @evhttp_request_get_command(%struct.evhttp_request* %11)
switch i32 %12, label %22 [
i32 134, label %13
i32 130, label %14
i32 133, label %15
i32 129, label %16
i32 135, label %17
i32 132, label %18
i32 128, label %19
i32 136, label %20
i32 131, label %21
]
13: ; preds = %2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %5
br label %23
14: ; preds = %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %5
br label %23
15: ; preds = %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %5
br label %23
16: ; preds = %2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %5
br label %23
17: ; preds = %2
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %5
br label %23
18: ; preds = %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8** %5
br label %23
19: ; preds = %2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %5
br label %23
20: ; preds = %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %5
br label %23
21: ; preds = %2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8** %5
br label %23
22: ; preds = %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8** %5
br label %23
23: ; preds = %22, %21, %20, %19, %18, %17, %16, %15, %14, %13
%24 = load i8*, i8** %5
%25 = load %struct.evhttp_request*, %struct.evhttp_request** %3
%26 = call i8* @evhttp_request_get_uri(%struct.evhttp_request* %25)
%27 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0), i8* %24, i8* %26)
%28 = load %struct.evhttp_request*, %struct.evhttp_request** %3
%29 = call %struct.evkeyvalq* @evhttp_request_get_input_headers(%struct.evhttp_request* %28)
store %struct.evkeyvalq* %29, %struct.evkeyvalq** %6
%30 = load %struct.evkeyvalq*, %struct.evkeyvalq** %6
%31 = getelementptr inbounds %struct.evkeyvalq, %struct.evkeyvalq* %30, i32 0, i32 0
%32 = load %struct.evkeyval*, %struct.evkeyval** %31
store %struct.evkeyval* %32, %struct.evkeyval** %7
br label %33
33: ; preds = %44, %23
%34 = load %struct.evkeyval*, %struct.evkeyval** %7
%35 = icmp ne %struct.evkeyval* %34, null
br i1 %35, label %36, label %49
36: ; preds = %33
%37 = load %struct.evkeyval*, %struct.evkeyval** %7
%38 = getelementptr inbounds %struct.evkeyval, %struct.evkeyval* %37, i32 0, i32 0
%39 = load i8*, i8** %38
%40 = load %struct.evkeyval*, %struct.evkeyval** %7
%41 = getelementptr inbounds %struct.evkeyval, %struct.evkeyval* %40, i32 0, i32 1
%42 = load i8*, i8** %41
%43 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %39, i8* %42)
br label %44
44: ; preds = %36
%45 = load %struct.evkeyval*, %struct.evkeyval** %7
%46 = getelementptr inbounds %struct.evkeyval, %struct.evkeyval* %45, i32 0, i32 2
%47 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %46, i32 0, i32 0
%48 = load %struct.evkeyval*, %struct.evkeyval** %47
store %struct.evkeyval* %48, %struct.evkeyval** %7
br label %33
49: ; preds = %33
%50 = load %struct.evhttp_request*, %struct.evhttp_request** %3
%51 = call %struct.evbuffer* @evhttp_request_get_input_buffer(%struct.evhttp_request* %50)
store %struct.evbuffer* %51, %struct.evbuffer** %8
%52 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
br label %53
53: ; preds = %68, %49
%54 = load %struct.evbuffer*, %struct.evbuffer** %8
%55 = call i64 @evbuffer_get_length(%struct.evbuffer* %54)
%56 = icmp ne i64 %55, 0
br i1 %56, label %57, label %69
57: ; preds = %53
%58 = load %struct.evbuffer*, %struct.evbuffer** %8
%59 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%60 = call i32 @evbuffer_remove(%struct.evbuffer* %58, i8* %59, i32 7)
store i32 %60, i32* %9
%61 = load i32, i32* %9
%62 = icmp sgt i32 %61, 0
br i1 %62, label %63, label %68
63: ; preds = %57
%64 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%65 = load i32, i32* %9
%66 = load i32, i32* @stdout
%67 = call i32 @fwrite(i8* %64, i32 1, i32 %65, i32 %66)
br label %68
68: ; preds = %63, %57
br label %53
69: ; preds = %53
%70 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
%71 = load %struct.evhttp_request*, %struct.evhttp_request** %3
%72 = call i32 @evhttp_send_reply(%struct.evhttp_request* %71, i32 200, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
%struct.evhttp_request = type { i32 }
%struct.evkeyvalq = type { %struct.evkeyval* }
%struct.evkeyval = type { i8*, i8*, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { %struct.evkeyval* }
%struct.evbuffer = type { i32 }
@.str = [4 x i8] c"GET\00"
@.str.1 = [5 x i8] c"POST\00"
@.str.2 = [5 x i8] c"HEAD\00"
@.str.3 = [4 x i8] c"PUT\00"
@.str.4 = [7 x i8] c"DELETE\00"
@.str.5 = [8 x i8] c"OPTIONS\00"
@.str.6 = [6 x i8] c"TRACE\00"
@.str.7 = [8 x i8] c"CONNECT\00"
@.str.8 = [6 x i8] c"PATCH\00"
@.str.9 = [8 x i8] c"unknown\00"
@.str.10 = [39 x i8] c"Received a %s request for %s\0AHeaders:\0A\00"
@.str.11 = [10 x i8] c" %s: %s\0A\00"
@.str.12 = [16 x i8] c"Input data: <<<\00"
@stdout = global i32 0
@.str.13 = [4 x i8] c">>>\00"
@.str.14 = [3 x i8] c"OK\00"
@reltable.dump_request_cb = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.6 to i64), i64 ptrtoint ([9 x i32]* @reltable.dump_request_cb to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.3 to i64), i64 ptrtoint ([9 x i32]* @reltable.dump_request_cb to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.1 to i64), i64 ptrtoint ([9 x i32]* @reltable.dump_request_cb to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.8 to i64), i64 ptrtoint ([9 x i32]* @reltable.dump_request_cb to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.5 to i64), i64 ptrtoint ([9 x i32]* @reltable.dump_request_cb to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.2 to i64), i64 ptrtoint ([9 x i32]* @reltable.dump_request_cb to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([9 x i32]* @reltable.dump_request_cb to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.dump_request_cb to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.7 to i64), i64 ptrtoint ([9 x i32]* @reltable.dump_request_cb to i64)) to i32)]
define void @dump_request_cb(%struct.evhttp_request* %0, i8* nocapture readnone %1) {
%3 = alloca [128 x i8]
%4 = tail call i32 @evhttp_request_get_command(%struct.evhttp_request* %0)
%5 = add i32 %4, -128
%6 = icmp ult i32 %5, 9
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = sext i32 %5 to i64
%9 = shl i64 %8, 2
%10 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.dump_request_cb to i8*), i64 %9)
br label %11
11: ; preds = %2, %7
%12 = phi i8* [ %10, %7 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %2 ]
%13 = tail call i8* @evhttp_request_get_uri(%struct.evhttp_request* %0)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0), i8* %12, i8* %13)
%15 = tail call %struct.evkeyvalq* @evhttp_request_get_input_headers(%struct.evhttp_request* %0)
%16 = getelementptr inbounds %struct.evkeyvalq, %struct.evkeyvalq* %15, i64 0, i32 0
%17 = load %struct.evkeyval*, %struct.evkeyval** %16
%18 = icmp eq %struct.evkeyval* %17, null
br i1 %18, label %29, label %19
19: ; preds = %11, %19
%20 = phi %struct.evkeyval* [ %27, %19 ], [ %17, %11 ]
%21 = getelementptr inbounds %struct.evkeyval, %struct.evkeyval* %20, i64 0, i32 0
%22 = load i8*, i8** %21
%23 = getelementptr inbounds %struct.evkeyval, %struct.evkeyval* %20, i64 0, i32 1
%24 = load i8*, i8** %23
%25 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %22, i8* %24)
%26 = getelementptr inbounds %struct.evkeyval, %struct.evkeyval* %20, i64 0, i32 2, i32 0
%27 = load %struct.evkeyval*, %struct.evkeyval** %26
%28 = icmp eq %struct.evkeyval* %27, null
br i1 %28, label %29, label %19
29: ; preds = %19, %11
%30 = tail call %struct.evbuffer* @evhttp_request_get_input_buffer(%struct.evhttp_request* %0)
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%32 = call i64 @evbuffer_get_length(%struct.evbuffer* %30)
%33 = icmp eq i64 %32, 0
br i1 %33, label %45, label %34
34: ; preds = %29
%35 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
br label %36
36: ; preds = %34, %42
%37 = call i32 @evbuffer_remove(%struct.evbuffer* %30, i8* %35, i32 7)
%38 = icmp sgt i32 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %36
%40 = load i32, i32* @stdout
%41 = call i32 @fwrite(i8* %35, i32 1, i32 %37, i32 %40)
br label %42
42: ; preds = %39, %36
%43 = call i64 @evbuffer_get_length(%struct.evbuffer* %30)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %36
45: ; preds = %42, %29
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
%47 = call i32 @evhttp_send_reply(%struct.evhttp_request* %0, i32 200, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i32* null)
ret void
}