#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 evbuffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EVBUFFER_DATA(struct evbuffer *);
int /*<<< orphan*/ EVBUFFER_LENGTH(struct evbuffer *);
int /*<<< orphan*/ info_parse(struct evbuffer *, struct evbuffer *);
int /*<<< orphan*/ info_rc4_cipher(int /*<<< orphan*/, unsigned char *,
                                   int /*<<< orphan*/);
scalar_t__ udp_get_key();
void dgram_parse(struct evbuffer *out, struct evbuffer *in) {
  info_rc4_cipher(EVBUFFER_DATA(in), (unsigned char *)udp_get_key(),
                  EVBUFFER_LENGTH(in));
  info_parse(out, in);
}


x86 assembly (clang, -O0):
<dgram_parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <EVBUFFER_DATA@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1060 <udp_get_key@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <EVBUFFER_LENGTH@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <info_rc4_cipher@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <info_parse@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgram_parse>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1070 <EVBUFFER_DATA@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <udp_get_key@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
call   1040 <EVBUFFER_LENGTH@plt>
mov    %r15d,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1030 <info_rc4_cipher@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <info_parse@plt>

LLVM IR (-O0):
%struct.evbuffer = type { i32 }
define void @dgram_parse(%struct.evbuffer* %0, %struct.evbuffer* %1) {
%3 = alloca %struct.evbuffer*
%4 = alloca %struct.evbuffer*
store %struct.evbuffer* %0, %struct.evbuffer** %3
store %struct.evbuffer* %1, %struct.evbuffer** %4
%5 = load %struct.evbuffer*, %struct.evbuffer** %4
%6 = call i32 @EVBUFFER_DATA(%struct.evbuffer* %5)
%7 = call i64 (...) @udp_get_key()
%8 = inttoptr i64 %7 to i8*
%9 = load %struct.evbuffer*, %struct.evbuffer** %4
%10 = call i32 @EVBUFFER_LENGTH(%struct.evbuffer* %9)
%11 = call i32 @info_rc4_cipher(i32 %6, i8* %8, i32 %10)
%12 = load %struct.evbuffer*, %struct.evbuffer** %3
%13 = load %struct.evbuffer*, %struct.evbuffer** %4
%14 = call i32 @info_parse(%struct.evbuffer* %12, %struct.evbuffer* %13)
ret void
}

LLVM IR (-O2):
%struct.evbuffer = type { i32 }
define void @dgram_parse(%struct.evbuffer* %0, %struct.evbuffer* %1) {
%3 = tail call i32 @EVBUFFER_DATA(%struct.evbuffer* %1)
%4 = tail call i64 (...) @udp_get_key()
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @EVBUFFER_LENGTH(%struct.evbuffer* %1)
%7 = tail call i32 @info_rc4_cipher(i32 %3, i8* %5, i32 %6)
%8 = tail call i32 @info_parse(%struct.evbuffer* %0, %struct.evbuffer* %1)
ret void
}