#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 SerialAPI_request(unsigned char *, int);
int ZW_SetSUCNodeID(unsigned char id, unsigned char SUC, unsigned char power,
                    unsigned char cap) {
  unsigned char buf[255];
  buf[0] = 0x00;
  buf[1] = 0x54;
  buf[2] = id;
  buf[3] = SUC;
  buf[4] = power;
  buf[5] = cap;
  return SerialAPI_request(buf, 6);
}


x86 assembly (clang, -O0):
<ZW_SetSUCNodeID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movb   $0x0,-0x110(%rbp)
movb   $0x54,-0x10f(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x10e(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x10d(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x10c(%rbp)
mov    -0x4(%rbp),%al
mov    %al,-0x10b(%rbp)
lea    -0x110(%rbp),%rdi
mov    $0x6,%esi
call   1030 <SerialAPI_request@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZW_SetSUCNodeID>:
sub    $0x108,%rsp
movw   $0x5400,(%rsp)
mov    %dil,0x2(%rsp)
mov    %sil,0x3(%rsp)
mov    %dl,0x4(%rsp)
mov    %cl,0x5(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
call   1030 <SerialAPI_request@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
define i32 @ZW_SetSUCNodeID(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca [255 x i8]
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
store i8 0, i8* %10
%11 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 1
store i8 84, i8* %11
%12 = load i8, i8* %5
%13 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 2
store i8 %12, i8* %13
%14 = load i8, i8* %6
%15 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 3
store i8 %14, i8* %15
%16 = load i8, i8* %7
%17 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 4
store i8 %16, i8* %17
%18 = load i8, i8* %8
%19 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 5
store i8 %18, i8* %19
%20 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%21 = call i32 @SerialAPI_request(i8* %20, i32 6)
ret i32 %21
}

LLVM IR (-O2):
define i32 @ZW_SetSUCNodeID(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca [255 x i8]
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
store i8 0, i8* %6
%7 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 1
store i8 84, i8* %7
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 2
store i8 %0, i8* %8
%9 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 3
store i8 %1, i8* %9
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 4
store i8 %2, i8* %10
%11 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 5
store i8 %3, i8* %11
%12 = call i32 @SerialAPI_request(i8* %6, i32 6)
ret i32 %12
}