#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 u_char;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int, int, int, int);
char *e2str(u_char *e) {
  static char str[32];
  sprintf(str, "%x:%x:%x:%x:%x:%x", e[0], e[1], e[2], e[3], e[4], e[5]);
  return (str);
}


x86 assembly (clang, -O0):
<e2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x2ef1(%rip),%rdi
lea    0xeaa(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <sprintf@plt>
lea    0x2ed6(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e2str>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%edx
mov    0x4(%rdi),%ecx
mov    0x8(%rdi),%r8d
mov    0xc(%rdi),%r9d
mov    0x10(%rdi),%eax
mov    0x14(%rdi),%ebx
lea    0x2f12(%rip),%r14
lea    0xecb(%rip),%rsi
mov    %r14,%rdi
push   %rbx
push   %rax
call   1030 <sprintf@plt>
add    $0x10,%rsp
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@e2str.str = internal global [32 x i8] zeroinitializer
@.str = [18 x i8] c"%x:%x:%x:%x:%x:%x\00"
define i8* @e2str(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 = call i32 @sprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @e2str.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8, i32 %11, i32 %14, i32 %17, i32 %20)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @e2str.str, i64 0, i64 0)
}

LLVM IR (-O2):
@e2str.str = internal global [32 x i8] zeroinitializer
@.str = [18 x i8] c"%x:%x:%x:%x:%x:%x\00"
define i8* @e2str(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 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @e2str.str, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 %6, i32 %8, i32 %10, i32 %12)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @e2str.str, i64 0, i64 0)
}