#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*/ hwaddr_mac(unsigned char *, int);
int /*<<< orphan*/ printf(char *, unsigned char, unsigned char, unsigned char,
                          unsigned char, unsigned char, unsigned char);
int main() {
  unsigned char mac[6];
  hwaddr_mac(mac, 6);
  printf("Mac : %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", mac[0], mac[1], mac[2],
         mac[3], mac[4], mac[5]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x6(%rbp),%rdi
mov    $0x6,%esi
call   1030 <hwaddr_mac@plt>
mov    -0x6(%rbp),%sil
mov    -0x5(%rbp),%dl
mov    -0x4(%rbp),%cl
mov    -0x3(%rbp),%r8b
mov    -0x2(%rbp),%al
lea    0xeb2(%rip),%rdi
movzbl %sil,%esi
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl %r8b,%r8d
movzbl %al,%r9d
movzbl -0x1(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x12(%rsp),%rdi
mov    $0x6,%esi
call   1030 <hwaddr_mac@plt>
movzbl 0x12(%rsp),%esi
movzbl 0x13(%rsp),%edx
movzbl 0x14(%rsp),%ecx
movzbl 0x15(%rsp),%r8d
movzbl 0x16(%rsp),%r9d
movzbl 0x17(%rsp),%eax
mov    %eax,(%rsp)
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Mac : %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\0A\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @hwaddr_mac(i8* %2, i32 6)
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%5 = load i8, i8* %4
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 1
%7 = load i8, i8* %6
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 2
%9 = load i8, i8* %8
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 3
%11 = load i8, i8* %10
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 4
%13 = load i8, i8* %12
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 5
%15 = load i8, i8* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8 zeroext %5, i8 zeroext %7, i8 zeroext %9, i8 zeroext %11, i8 zeroext %13, i8 zeroext %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"Mac : %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\0A\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @hwaddr_mac(i8* %2, i32 6)
%4 = load i8, i8* %2
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 2
%8 = load i8, i8* %7
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 3
%10 = load i8, i8* %9
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 4
%12 = load i8, i8* %11
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 5
%14 = load i8, i8* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8 zeroext %4, i8 zeroext %6, i8 zeroext %8, i8 zeroext %10, i8 zeroext %12, i8 zeroext %14)
ret i32 0
}