#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*/ SerialWriteString(char *);
void iRobot_SetSchedule(unsigned short days, unsigned short sun_hour,
                        unsigned short sun_minute, unsigned short mon_hour,
                        unsigned short mon_minute, unsigned short tue_hour,
                        signed short tue_minute, signed short wed_hour,
                        signed short wed_minute, unsigned short thu_hour,
                        unsigned short thu_minute, unsigned short fri_hour,
                        unsigned short fri_minute, unsigned short sat_hour,
                        unsigned short sat_minute) {
  char data[] = {167,      days,       sun_hour, sun_minute,
                 mon_hour, mon_minute, tue_hour, tue_minute,
                 wed_hour, wed_minute, thu_hour, thu_minute,
                 fri_hour, fri_minute, sat_hour, sat_minute};
  SerialWriteString(data);
}


x86 assembly (clang, -O0):
<iRobot_SetSchedule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r8d,-0x30(%rbp)
mov    %ecx,%eax
mov    -0x30(%rbp),%ecx
mov    %eax,-0x2c(%rbp)
mov    %edx,%eax
mov    -0x2c(%rbp),%edx
mov    %eax,-0x28(%rbp)
mov    %esi,%eax
mov    -0x28(%rbp),%esi
mov    %eax,-0x24(%rbp)
mov    %edi,%r8d
mov    -0x24(%rbp),%edi
mov    %r9w,%ax
mov    0x50(%rbp),%r9w
mov    0x48(%rbp),%r9w
mov    0x40(%rbp),%r9w
mov    0x38(%rbp),%r9w
mov    0x30(%rbp),%r9w
mov    0x28(%rbp),%r9w
mov    0x20(%rbp),%r9w
mov    0x18(%rbp),%r9w
mov    0x10(%rbp),%r9w
mov    %r8w,-0x2(%rbp)
mov    %di,-0x4(%rbp)
mov    %si,-0x6(%rbp)
mov    %dx,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
movb   $0xa7,-0x20(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,-0x1f(%rbp)
mov    -0x4(%rbp),%ax
mov    %al,-0x1e(%rbp)
mov    -0x6(%rbp),%ax
mov    %al,-0x1d(%rbp)
mov    -0x8(%rbp),%ax
mov    %al,-0x1c(%rbp)
mov    -0xa(%rbp),%ax
mov    %al,-0x1b(%rbp)
mov    -0xc(%rbp),%ax
mov    %al,-0x1a(%rbp)
mov    0x10(%rbp),%ax
mov    %al,-0x19(%rbp)
mov    0x18(%rbp),%ax
mov    %al,-0x18(%rbp)
mov    0x20(%rbp),%ax
mov    %al,-0x17(%rbp)
mov    0x28(%rbp),%ax
mov    %al,-0x16(%rbp)
mov    0x30(%rbp),%ax
mov    %al,-0x15(%rbp)
mov    0x38(%rbp),%ax
mov    %al,-0x14(%rbp)
mov    0x40(%rbp),%ax
mov    %al,-0x13(%rbp)
mov    0x48(%rbp),%ax
mov    %al,-0x12(%rbp)
mov    0x50(%rbp),%ax
mov    %al,-0x11(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <SerialWriteString@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iRobot_SetSchedule>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x90(%rsp),%r10b
mov    0x88(%rsp),%r11b
mov    0x80(%rsp),%bpl
mov    0x78(%rsp),%r14b
mov    0x70(%rsp),%r15b
mov    0x68(%rsp),%r12b
mov    0x60(%rsp),%r13b
mov    0x58(%rsp),%bl
mov    0x50(%rsp),%al
movb   $0xa7,(%rsp)
mov    %dil,0x1(%rsp)
mov    %sil,0x2(%rsp)
mov    %dl,0x3(%rsp)
mov    %cl,0x4(%rsp)
mov    %r8b,0x5(%rsp)
mov    %r9b,0x6(%rsp)
mov    %al,0x7(%rsp)
mov    %bl,0x8(%rsp)
mov    %r13b,0x9(%rsp)
mov    %r12b,0xa(%rsp)
mov    %r15b,0xb(%rsp)
mov    %r14b,0xc(%rsp)
mov    %bpl,0xd(%rsp)
mov    %r11b,0xe(%rsp)
mov    %r10b,0xf(%rsp)
mov    %rsp,%rdi
call   1030 <SerialWriteString@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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