#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 */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const, int const, int const, int const,
                          int const, int const, int const, int const);
void print_eui64addr(const uint8_t addr[8]) {
  printf("%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x", addr[0], addr[1], addr[2],
         addr[3], addr[4], addr[5], addr[6], addr[7]);
}


x86 assembly (clang, -O0):
<print_eui64addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%r9d
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%r11d
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%r10d
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
lea    0xea2(%rip),%rdi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_eui64addr>:
push   %rax
mov    (%rdi),%esi
mov    0x4(%rdi),%edx
mov    0x8(%rdi),%ecx
mov    0xc(%rdi),%r8d
mov    0x10(%rdi),%r9d
mov    0x14(%rdi),%r10d
mov    0x18(%rdi),%r11d
mov    0x1c(%rdi),%eax
sub    $0x8,%rsp
lea    0xec9(%rip),%rdi
push   %rax
push   %r11
push   %r10
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [40 x i8] c"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\00"
define void @print_eui64addr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 2
%11 = load i32, i32* %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 3
%14 = load i32, i32* %13
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 4
%17 = load i32, i32* %16
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 5
%20 = load i32, i32* %19
%21 = load i32*, i32** %2
%22 = getelementptr inbounds i32, i32* %21, i64 6
%23 = load i32, i32* %22
%24 = load i32*, i32** %2
%25 = getelementptr inbounds i32, i32* %24, i64 7
%26 = load i32, i32* %25
%27 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8, i32 %11, i32 %14, i32 %17, i32 %20, i32 %23, i32 %26)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\00"
define void @print_eui64addr(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 3
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %0, i64 4
%10 = load i32, i32* %9
%11 = getelementptr inbounds i32, i32* %0, i64 5
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 6
%14 = load i32, i32* %13
%15 = getelementptr inbounds i32, i32* %0, i64 7
%16 = load i32, i32* %15
%17 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 %6, i32 %8, i32 %10, i32 %12, i32 %14, i32 %16)
ret void
}