#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*/ memcpy(char *, char *, int);
int /*<<< orphan*/ printf(char *, char, char, char, char, char, char, char,
                          char);
int main(void) {
  char buff[8] = {0};
  char B[8] = {0x01};
  printf("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", B[0], B[1], B[2], B[3],
         B[4], B[5], B[6], B[7]);
  memcpy(B, buff, 8);
  printf("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", B[0], B[1], B[2], B[3],
         B[4], B[5], B[6], B[7]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
mov    0xeaa(%rip),%rax
mov    %rax,-0x14(%rbp)
mov    -0x14(%rbp),%sil
mov    -0x13(%rbp),%dl
mov    -0x12(%rbp),%cl
mov    -0x11(%rbp),%r8b
mov    -0x10(%rbp),%r9b
mov    -0xf(%rbp),%r10b
mov    -0xe(%rbp),%al
lea    0xe8e(%rip),%rdi
movsbl %sil,%esi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
movsbl -0xd(%rbp),%eax
mov    %eax,0x10(%rsp)
call   1030 <printf@plt>
lea    -0x14(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x8,%edx
call   1050 <memcpy@plt>
mov    -0x14(%rbp),%sil
mov    -0x13(%rbp),%dl
mov    -0x12(%rbp),%cl
mov    -0x11(%rbp),%r8b
mov    -0x10(%rbp),%r9b
mov    -0xf(%rbp),%r10b
mov    -0xe(%rbp),%al
lea    0xe2e(%rip),%rdi
movsbl %sil,%esi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
movsbl -0xd(%rbp),%eax
mov    %eax,0x10(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x1,0x8(%rsp)
sub    $0x8,%rsp
lea    0xebc(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
push   $0x0
call   1030 <printf@plt>
add    $0x20,%rsp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
movsbl 0x8(%rsp),%esi
movsbl 0x9(%rsp),%edx
movsbl 0xa(%rsp),%ecx
movsbl 0xb(%rsp),%r8d
movsbl 0xc(%rsp),%r9d
movsbl 0xd(%rsp),%r10d
movsbl 0xe(%rsp),%ebx
movsbl 0xf(%rsp),%eax
sub    $0x8,%rsp
mov    %r14,%rdi
push   %rax
push   %rbx
push   %r10
call   1030 <printf@plt>
add    $0x20,%rsp
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.B = [8 x i8] c"\01\00\00\00\00\00\00\00"
@.str = [41 x i8] c"%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
%3 = alloca [8 x i8]
store i32 0, i32* %1
%4 = bitcast [8 x i8]* %2 to i8*
%5 = bitcast [8 x i8]* %3 to i8*
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%7 = load i8, i8* %6
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 1
%9 = load i8, i8* %8
%10 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 2
%11 = load i8, i8* %10
%12 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 3
%13 = load i8, i8* %12
%14 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 4
%15 = load i8, i8* %14
%16 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 5
%17 = load i8, i8* %16
%18 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 6
%19 = load i8, i8* %18
%20 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 7
%21 = load i8, i8* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8 signext %7, i8 signext %9, i8 signext %11, i8 signext %13, i8 signext %15, i8 signext %17, i8 signext %19, i8 signext %21)
%23 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%24 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%25 = call i32 @memcpy(i8* %23, i8* %24, i32 8)
%26 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%27 = load i8, i8* %26
%28 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 1
%29 = load i8, i8* %28
%30 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 2
%31 = load i8, i8* %30
%32 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 3
%33 = load i8, i8* %32
%34 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 4
%35 = load i8, i8* %34
%36 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 5
%37 = load i8, i8* %36
%38 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 6
%39 = load i8, i8* %38
%40 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 7
%41 = load i8, i8* %40
%42 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8 signext %27, i8 signext %29, i8 signext %31, i8 signext %33, i8 signext %35, i8 signext %37, i8 signext %39, i8 signext %41)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %2 to [8 x i8]*
%4 = bitcast i64* %1 to i8*
store i64 0, i64* %1
%5 = bitcast i64* %2 to i8*
store i64 1, i64* %2
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 1
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 2
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 3
%9 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 4
%10 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 5
%11 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 6
%12 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 7
%13 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8 signext 1, i8 signext 0, i8 signext 0, i8 signext 0, i8 signext 0, i8 signext 0, i8 signext 0, i8 signext 0)
%14 = call i32 @memcpy(i8* %5, i8* %4, i32 8)
%15 = load i8, i8* %5
%16 = load i8, i8* %6
%17 = load i8, i8* %7
%18 = load i8, i8* %8
%19 = load i8, i8* %9
%20 = load i8, i8* %10
%21 = load i8, i8* %11
%22 = load i8, i8* %12
%23 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8 signext %15, i8 signext %16, i8 signext %17, i8 signext %18, i8 signext %19, i8 signext %20, i8 signext %21, i8 signext %22)
ret i32 0
}