#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*/ ip(char const *);
int /*<<< orphan*/ line();
int /*<<< orphan*/ name(char const *);
int /*<<< orphan*/ number(unsigned int);
int /*<<< orphan*/ space();
int /*<<< orphan*/ string(char *);
void log_rrns(const char server[4], const char *q, const char *data,
              unsigned int ttl) {
  string("     rr ");
  ip(server);
  space();
  number(ttl);
  string(" ns ");
  name(q);
  space();
  name(data);
  line();
}


x86 assembly (clang, -O0):
<log_rrns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xe82(%rip),%rdi
call   1040 <string@plt>
mov    -0x8(%rbp),%rdi
call   1080 <ip@plt>
mov    $0x0,%al
call   1030 <space@plt>
mov    -0x1c(%rbp),%edi
call   1060 <number@plt>
lea    0xe67(%rip),%rdi
call   1040 <string@plt>
mov    -0x10(%rbp),%rdi
call   1050 <name@plt>
mov    $0x0,%al
call   1030 <space@plt>
mov    -0x18(%rbp),%rdi
call   1050 <name@plt>
mov    $0x0,%al
call   1070 <line@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_rrns>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xe87(%rip),%rdi
call   1040 <string@plt>
mov    %rbx,%rdi
call   1080 <ip@plt>
xor    %eax,%eax
call   1030 <space@plt>
mov    %ebp,%edi
call   1060 <number@plt>
lea    0xe6e(%rip),%rdi
call   1040 <string@plt>
mov    %r15,%rdi
call   1050 <name@plt>
xor    %eax,%eax
call   1030 <space@plt>
mov    %r14,%rdi
call   1050 <name@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <line@plt>

LLVM IR (-O0):
@.str = [9 x i8] c" rr \00"
@.str.1 = [5 x i8] c" ns \00"
define void @log_rrns(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = call i32 @string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %5
%11 = call i32 @ip(i8* %10)
%12 = call i32 (...) @space()
%13 = load i32, i32* %8
%14 = call i32 @number(i32 %13)
%15 = call i32 @string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%16 = load i8*, i8** %6
%17 = call i32 @name(i8* %16)
%18 = call i32 (...) @space()
%19 = load i8*, i8** %7
%20 = call i32 @name(i8* %19)
%21 = call i32 (...) @line()
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c" rr \00"
@.str.1 = [5 x i8] c" ns \00"
define void @log_rrns(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @ip(i8* %0)
%7 = tail call i32 (...) @space()
%8 = tail call i32 @number(i32 %3)
%9 = tail call i32 @string(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @name(i8* %1)
%11 = tail call i32 (...) @space()
%12 = tail call i32 @name(i8* %2)
%13 = tail call i32 (...) @line()
ret void
}