void transfer_CAN0_Buffer(unsigned long sttp_MsgRegTypeBuf,
                          unsigned char *u1t_TxDatabuf, unsigned char num) {
  unsigned short u2t_MCTRL;
  u2t_MCTRL = *((unsigned short *)(sttp_MsgRegTypeBuf + 0x0e));
  *((unsigned short *)(sttp_MsgRegTypeBuf + 0x0e)) = 0x0001;
  if ((*((unsigned short *)(sttp_MsgRegTypeBuf + 0x0e)) & 0x0001) == 0) {
    {
      unsigned char u1t_MDLCctr;
      for (u1t_MDLCctr = 0; u1t_MDLCctr < 8; u1t_MDLCctr++) {
        *((unsigned char *)(sttp_MsgRegTypeBuf + 0x00 + u1t_MDLCctr)) =
            u1t_TxDatabuf[u1t_MDLCctr];
      }
    }
    *((unsigned short *)(sttp_MsgRegTypeBuf + 0x0e)) = 0x0100;
    *((unsigned short *)(sttp_MsgRegTypeBuf + 0x0e)) = 0x0200;
  }
  return;
}


x86 assembly (clang, -O0):
<transfer_CAN0_Buffer>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    0xe(%rax),%ax
mov    %ax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movw   $0x1,0xe(%rax)
mov    -0x8(%rbp),%rax
movzwl 0xe(%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1189 <transfer_CAN0_Buffer+0x89>
movb   $0x0,-0x15(%rbp)
movzbl -0x15(%rbp),%eax
cmp    $0x8,%eax
jge    1175 <transfer_CAN0_Buffer+0x75>
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%ecx
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
add    $0x0,%rax
movzbl -0x15(%rbp),%edx
add    %rdx,%rax
mov    %cl,(%rax)
mov    -0x15(%rbp),%al
add    $0x1,%al
mov    %al,-0x15(%rbp)
jmp    113f <transfer_CAN0_Buffer+0x3f>
mov    -0x8(%rbp),%rax
movw   $0x100,0xe(%rax)
mov    -0x8(%rbp),%rax
movw   $0x200,0xe(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_CAN0_Buffer>:
movw   $0x1,0xe(%rdi)
ret

LLVM IR (-O0):
define void @transfer_CAN0_Buffer(i64 %0, i8* %1, i8 zeroext %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i16
%8 = alloca i8
store i64 %0, i64* %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%9 = load i64, i64* %4
%10 = add i64 %9, 14
%11 = inttoptr i64 %10 to i16*
%12 = load i16, i16* %11
store i16 %12, i16* %7
%13 = load i64, i64* %4
%14 = add i64 %13, 14
%15 = inttoptr i64 %14 to i16*
store i16 1, i16* %15
%16 = load i64, i64* %4
%17 = add i64 %16, 14
%18 = inttoptr i64 %17 to i16*
%19 = load i16, i16* %18
%20 = zext i16 %19 to i32
%21 = and i32 %20, 1
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %50
23: ; preds = %3
store i8 0, i8* %8
br label %24
24: ; preds = %40, %23
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = icmp slt i32 %26, 8
br i1 %27, label %28, label %43
28: ; preds = %24
%29 = load i8*, i8** %5
%30 = load i8, i8* %8
%31 = zext i8 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
%33 = load i8, i8* %32
%34 = load i64, i64* %4
%35 = add i64 %34, 0
%36 = load i8, i8* %8
%37 = zext i8 %36 to i64
%38 = add i64 %35, %37
%39 = inttoptr i64 %38 to i8*
store i8 %33, i8* %39
br label %40
40: ; preds = %28
%41 = load i8, i8* %8
%42 = add i8 %41, 1
store i8 %42, i8* %8
br label %24
43: ; preds = %24
%44 = load i64, i64* %4
%45 = add i64 %44, 14
%46 = inttoptr i64 %45 to i16*
store i16 256, i16* %46
%47 = load i64, i64* %4
%48 = add i64 %47, 14
%49 = inttoptr i64 %48 to i16*
store i16 512, i16* %49
br label %50
50: ; preds = %43, %3
ret void
}

LLVM IR (-O2):
define void @transfer_CAN0_Buffer(i64 %0, i8* nocapture readnone %1, i8 zeroext %2) {
%4 = add i64 %0, 14
%5 = inttoptr i64 %4 to i16*
store i16 1, i16* %5
ret void
}