#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*/ print_diff(unsigned long);
int /*<<< orphan*/ printf(char *, ...);
void print_long(long *lo) {
  int i;
  printf("  direcciones miembros: ");
  for (i = 0; i < 5; i++)
    printf("%lx ", (unsigned long)&(lo[i]));
  print_diff((unsigned long)(&(lo[0])));
}


x86 assembly (clang, -O0):
<print_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1176 <print_long+0x56>
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <print_long+0x21>
mov    -0x8(%rbp),%rdi
call   1040 <print_diff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_long>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rbx),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rbx),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rbx),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x20(%rbx),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <print_diff@plt>

LLVM IR (-O0):
@.str = [25 x i8] c" direcciones miembros: \00"
@.str.1 = [5 x i8] c"%lx \00"
define void @print_long(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i64*, i64** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %9, i64 %11
%13 = ptrtoint i64* %12 to i64
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %13)
br label %15
15: ; preds = %8
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %5
18: ; preds = %5
%19 = load i64*, i64** %2
%20 = getelementptr inbounds i64, i64* %19, i64 0
%21 = ptrtoint i64* %20 to i64
%22 = call i32 @print_diff(i64 %21)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c" direcciones miembros: \00"
@.str.1 = [5 x i8] c"%lx \00"
define void @print_long(i64* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = ptrtoint i64* %0 to i64
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %3)
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = ptrtoint i64* %5 to i64
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %6)
%8 = getelementptr inbounds i64, i64* %0, i64 2
%9 = ptrtoint i64* %8 to i64
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %9)
%11 = getelementptr inbounds i64, i64* %0, i64 3
%12 = ptrtoint i64* %11 to i64
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %12)
%14 = getelementptr inbounds i64, i64* %0, i64 4
%15 = ptrtoint i64* %14 to i64
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %15)
%17 = tail call i32 @print_diff(i64 %3)
ret void
}