#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*/ strcpy(char *, char *);
void UDPaddr_to_CAN(char *value, char shifted[18]) {
  char in[18];
  strcpy(in, value);
  shifted[0] = '1';
  shifted[1] = '0';
  shifted[2] = '0';
  shifted[3] = in[0];
  shifted[4] = in[1];
  shifted[5] = in[2];
  shifted[6] = in[3];
  shifted[7] = in[4];
  shifted[8] = in[5];
  shifted[9] = in[6];
  shifted[10] = in[7];
  shifted[11] = in[11];
  shifted[12] = in[12];
  shifted[13] = in[13];
  shifted[14] = in[14];
  shifted[15] = in[15];
  shifted[16] = '\0';
}


x86 assembly (clang, -O0):
<UDPaddr_to_CAN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
movb   $0x31,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x30,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x30,0x2(%rax)
mov    -0x30(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x2f(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x4(%rax)
mov    -0x2e(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x5(%rax)
mov    -0x2d(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x6(%rax)
mov    -0x2c(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x7(%rax)
mov    -0x2b(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x8(%rax)
mov    -0x2a(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x9(%rax)
mov    -0x29(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0xa(%rax)
mov    -0x25(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0xb(%rax)
mov    -0x24(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0xc(%rax)
mov    -0x23(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0xd(%rax)
mov    -0x22(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0xe(%rax)
mov    -0x21(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0xf(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x10(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UDPaddr_to_CAN>:
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
movw   $0x3031,(%rbx)
movb   $0x30,0x2(%rbx)
mov    (%rsp),%al
mov    %al,0x3(%rbx)
mov    0x1(%rsp),%al
mov    %al,0x4(%rbx)
mov    0x2(%rsp),%al
mov    %al,0x5(%rbx)
mov    0x3(%rsp),%al
mov    %al,0x6(%rbx)
mov    0x4(%rsp),%al
mov    %al,0x7(%rbx)
mov    0x5(%rsp),%al
mov    %al,0x8(%rbx)
mov    0x6(%rsp),%al
mov    %al,0x9(%rbx)
mov    0x7(%rsp),%al
mov    %al,0xa(%rbx)
mov    0xb(%rsp),%al
mov    %al,0xb(%rbx)
mov    0xc(%rsp),%al
mov    %al,0xc(%rbx)
mov    0xd(%rsp),%al
mov    %al,0xd(%rbx)
mov    0xe(%rsp),%al
mov    %al,0xe(%rbx)
mov    0xf(%rsp),%al
mov    %al,0xf(%rbx)
movb   $0x0,0x10(%rbx)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @UDPaddr_to_CAN(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [18 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @strcpy(i8* %6, i8* %7)
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 49, i8* %10
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8 48, i8* %12
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 2
store i8 48, i8* %14
%15 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 0
%16 = load i8, i8* %15
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 3
store i8 %16, i8* %18
%19 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 1
%20 = load i8, i8* %19
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 4
store i8 %20, i8* %22
%23 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 2
%24 = load i8, i8* %23
%25 = load i8*, i8** %4
%26 = getelementptr inbounds i8, i8* %25, i64 5
store i8 %24, i8* %26
%27 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 3
%28 = load i8, i8* %27
%29 = load i8*, i8** %4
%30 = getelementptr inbounds i8, i8* %29, i64 6
store i8 %28, i8* %30
%31 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 4
%32 = load i8, i8* %31
%33 = load i8*, i8** %4
%34 = getelementptr inbounds i8, i8* %33, i64 7
store i8 %32, i8* %34
%35 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 5
%36 = load i8, i8* %35
%37 = load i8*, i8** %4
%38 = getelementptr inbounds i8, i8* %37, i64 8
store i8 %36, i8* %38
%39 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 6
%40 = load i8, i8* %39
%41 = load i8*, i8** %4
%42 = getelementptr inbounds i8, i8* %41, i64 9
store i8 %40, i8* %42
%43 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 7
%44 = load i8, i8* %43
%45 = load i8*, i8** %4
%46 = getelementptr inbounds i8, i8* %45, i64 10
store i8 %44, i8* %46
%47 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 11
%48 = load i8, i8* %47
%49 = load i8*, i8** %4
%50 = getelementptr inbounds i8, i8* %49, i64 11
store i8 %48, i8* %50
%51 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 12
%52 = load i8, i8* %51
%53 = load i8*, i8** %4
%54 = getelementptr inbounds i8, i8* %53, i64 12
store i8 %52, i8* %54
%55 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 13
%56 = load i8, i8* %55
%57 = load i8*, i8** %4
%58 = getelementptr inbounds i8, i8* %57, i64 13
store i8 %56, i8* %58
%59 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 14
%60 = load i8, i8* %59
%61 = load i8*, i8** %4
%62 = getelementptr inbounds i8, i8* %61, i64 14
store i8 %60, i8* %62
%63 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 15
%64 = load i8, i8* %63
%65 = load i8*, i8** %4
%66 = getelementptr inbounds i8, i8* %65, i64 15
store i8 %64, i8* %66
%67 = load i8*, i8** %4
%68 = getelementptr inbounds i8, i8* %67, i64 16
store i8 0, i8* %68
ret void
}

LLVM IR (-O2):
define void @UDPaddr_to_CAN(i8* %0, i8* nocapture writeonly %1) {
%3 = alloca [18 x i8]
%4 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %0)
store i8 49, i8* %1
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 48, i8* %6
%7 = getelementptr inbounds i8, i8* %1, i64 2
store i8 48, i8* %7
%8 = load i8, i8* %4
%9 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %8, i8* %9
%10 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 1
%11 = load i8, i8* %10
%12 = getelementptr inbounds i8, i8* %1, i64 4
store i8 %11, i8* %12
%13 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 2
%14 = load i8, i8* %13
%15 = getelementptr inbounds i8, i8* %1, i64 5
store i8 %14, i8* %15
%16 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 3
%17 = load i8, i8* %16
%18 = getelementptr inbounds i8, i8* %1, i64 6
store i8 %17, i8* %18
%19 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 4
%20 = load i8, i8* %19
%21 = getelementptr inbounds i8, i8* %1, i64 7
store i8 %20, i8* %21
%22 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 5
%23 = load i8, i8* %22
%24 = getelementptr inbounds i8, i8* %1, i64 8
store i8 %23, i8* %24
%25 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 6
%26 = load i8, i8* %25
%27 = getelementptr inbounds i8, i8* %1, i64 9
store i8 %26, i8* %27
%28 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 7
%29 = load i8, i8* %28
%30 = getelementptr inbounds i8, i8* %1, i64 10
store i8 %29, i8* %30
%31 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 11
%32 = load i8, i8* %31
%33 = getelementptr inbounds i8, i8* %1, i64 11
store i8 %32, i8* %33
%34 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 12
%35 = load i8, i8* %34
%36 = getelementptr inbounds i8, i8* %1, i64 12
store i8 %35, i8* %36
%37 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 13
%38 = load i8, i8* %37
%39 = getelementptr inbounds i8, i8* %1, i64 13
store i8 %38, i8* %39
%40 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 14
%41 = load i8, i8* %40
%42 = getelementptr inbounds i8, i8* %1, i64 14
store i8 %41, i8* %42
%43 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 15
%44 = load i8, i8* %43
%45 = getelementptr inbounds i8, i8* %1, i64 15
store i8 %44, i8* %45
%46 = getelementptr inbounds i8, i8* %1, i64 16
store i8 0, i8* %46
ret void
}