#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*/ si475x_command(int, unsigned char *, int /*<<< orphan*/,
                                  int /*<<< orphan*/ *);
void si475x_set_property(unsigned short propNumber, unsigned short propValue) {
  unsigned char cmd[6] = {0};
  cmd[0] = 0x13;
  cmd[1] = 0;
  cmd[2] = (unsigned char)(propNumber >> 8);
  cmd[3] = (unsigned char)(propNumber & 0x00FF);
  cmd[4] = (unsigned char)(propValue >> 8);
  cmd[5] = (unsigned char)(propValue & 0x00FF);
  si475x_command(6, cmd, 0, NULL);
}


x86 assembly (clang, -O0):
<si475x_set_property>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
lea    -0xa(%rbp),%rdi
xor    %esi,%esi
mov    $0x6,%edx
call   1040 <memset@plt>
movb   $0x13,-0xa(%rbp)
movb   $0x0,-0x9(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
mov    %al,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x7(%rbp)
movzwl -0x4(%rbp),%eax
sar    $0x8,%eax
mov    %al,-0x6(%rbp)
movzwl -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
lea    -0xa(%rbp),%rsi
mov    $0x6,%edi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <si475x_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<si475x_set_property>:
push   %rax
mov    %esi,%eax
mov    %edi,%ecx
movw   $0x13,0x2(%rsp)
mov    %ch,0x4(%rsp)
mov    %cl,0x5(%rsp)
mov    %ah,0x6(%rsp)
mov    %al,0x7(%rsp)
lea    0x2(%rsp),%rsi
mov    $0x6,%edi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <si475x_command@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @si475x_set_property(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca [6 x i8]
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = bitcast [6 x i8]* %5 to i8*
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
store i8 19, i8* %7
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 1
store i8 0, i8* %8
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = ashr i32 %10, 8
%12 = trunc i32 %11 to i8
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 2
store i8 %12, i8* %13
%14 = load i16, i16* %3
%15 = zext i16 %14 to i32
%16 = and i32 %15, 255
%17 = trunc i32 %16 to i8
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 3
store i8 %17, i8* %18
%19 = load i16, i16* %4
%20 = zext i16 %19 to i32
%21 = ashr i32 %20, 8
%22 = trunc i32 %21 to i8
%23 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 4
store i8 %22, i8* %23
%24 = load i16, i16* %4
%25 = zext i16 %24 to i32
%26 = and i32 %25, 255
%27 = trunc i32 %26 to i8
%28 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 5
store i8 %27, i8* %28
%29 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%30 = call i32 @si475x_command(i32 6, i8* %29, i32 0, i32* null)
ret void
}

LLVM IR (-O2):
define void @si475x_set_property(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca [6 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
store i8 19, i8* %4
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 1
store i8 0, i8* %5
%6 = lshr i16 %0, 8
%7 = trunc i16 %6 to i8
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 2
store i8 %7, i8* %8
%9 = trunc i16 %0 to i8
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 3
store i8 %9, i8* %10
%11 = lshr i16 %1, 8
%12 = trunc i16 %11 to i8
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 4
store i8 %12, i8* %13
%14 = trunc i16 %1 to i8
%15 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 5
store i8 %14, i8* %15
%16 = call i32 @si475x_command(i32 6, i8* %4, i32 0, i32* null)
ret void
}