#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 */

/* Variables and functions */
int /*<<< orphan*/ QueueMessage(void *, char *, unsigned short, int, char *,
                                unsigned short, char *, unsigned long);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *,
                           char *);
int /*<<< orphan*/ stderr;
int callback(void *client, char *Sender, unsigned short Sender_len, int MSG_ID,
             char *Target, unsigned short Target_len, char *Value,
             unsigned long Value_len) {
  fprintf(stderr, "HERE: %s %i %s %s\n", Sender, MSG_ID, Target, Value);
  QueueMessage(client, Sender, Sender_len, MSG_ID, Target, Target_len, Value,
               Value_len);
}


x86 assembly (clang, -O0):
<callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %r9w,%ax
mov    0x18(%rbp),%r9
mov    0x10(%rbp),%r9
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %dx,-0x1a(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %ax,-0x2a(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    0x10(%rbp),%r9
lea    0xe96(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1a(%rbp),%dx
mov    -0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2a(%rbp),%r9w
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
movzwl %dx,%edx
movzwl %r9w,%r9d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <QueueMessage@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callback>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8,%r12
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%r13
mov    0x40(%rsp),%r9
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %r12,%r8
mov    %r14d,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <QueueMessage@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"HERE: %s %i %s %s\0A\00"
define i32 @callback(i8* %0, i8* %1, i16 zeroext %2, i32 %3, i8* %4, i16 zeroext %5, i8* %6, i64 %7) {
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i16
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i16
%16 = alloca i8*
%17 = alloca i64
store i8* %0, i8** %10
store i8* %1, i8** %11
store i16 %2, i16* %12
store i32 %3, i32* %13
store i8* %4, i8** %14
store i16 %5, i16* %15
store i8* %6, i8** %16
store i64 %7, i64* %17
%18 = load i32, i32* @stderr
%19 = load i8*, i8** %11
%20 = load i32, i32* %13
%21 = load i8*, i8** %14
%22 = load i8*, i8** %16
%23 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %19, i32 %20, i8* %21, i8* %22)
%24 = load i8*, i8** %10
%25 = load i8*, i8** %11
%26 = load i16, i16* %12
%27 = load i32, i32* %13
%28 = load i8*, i8** %14
%29 = load i16, i16* %15
%30 = load i8*, i8** %16
%31 = load i64, i64* %17
%32 = call i32 @QueueMessage(i8* %24, i8* %25, i16 zeroext %26, i32 %27, i8* %28, i16 zeroext %29, i8* %30, i64 %31)
%33 = load i32, i32* %9
ret i32 %33
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"HERE: %s %i %s %s\0A\00"
define i32 @callback(i8* %0, i8* %1, i16 zeroext %2, i32 %3, i8* %4, i16 zeroext %5, i8* %6, i64 %7) {
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %3, i8* %4, i8* %6)
%11 = tail call i32 @QueueMessage(i8* %0, i8* %1, i16 zeroext %2, i32 %3, i8* %4, i16 zeroext %5, i8* %6, i64 %7)
ret i32 undef
}