#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 TYPE_2__ {
  int s_addr;
};
struct sockaddr_in {
  int sin_family;
  int sin_port;
  TYPE_1__ sin_addr;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void imprimir(struct sockaddr_in *aa) {
  fprintf(stdout, "\t%d\n", aa->sin_family);
  fprintf(stdout, "\t%d\n", aa->sin_addr.s_addr);
  fprintf(stdout, "\t%d\n", aa->sin_port);
}


x86 assembly (clang, -O0):
<imprimir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xece(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%edx
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xe96(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimir>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2ec1(%rip),%r15
mov    (%r15),%edi
mov    (%rbx),%edx
lea    0xed5(%rip),%r14
mov    %r14,%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    0x8(%rbx),%edx
mov    %r14,%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    0x4(%rbx),%edx
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
@stdout = global i32 0
@.str = [5 x i8] c"\09%d\0A\00"
define void @imprimir(%struct.sockaddr_in* %0) {
%2 = alloca %struct.sockaddr_in*
store %struct.sockaddr_in* %0, %struct.sockaddr_in** %2
%3 = load i32, i32* @stdout
%4 = load %struct.sockaddr_in*, %struct.sockaddr_in** %2
%5 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stdout
%9 = load %struct.sockaddr_in*, %struct.sockaddr_in** %2
%10 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 2
%11 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @stdout
%15 = load %struct.sockaddr_in*, %struct.sockaddr_in** %2
%16 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %15, i32 0, i32 1
%17 = load i32, i32* %16
%18 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %17)
ret void
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
@stdout = global i32 0
@.str = [5 x i8] c"\09%d\0A\00"
define void @imprimir(%struct.sockaddr_in* nocapture %0) {
%2 = load i32, i32* @stdout
%3 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stdout
%7 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %0, i64 0, i32 2, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stdout
%11 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %0, i64 0, i32 1
%12 = load i32, i32* %11
%13 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12)
ret void
}