#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*/ printf(char *, ...);
void printUsage(void) {
  printf("hr20cmd version %s\n", "0.2");
  printf("Options:\n\n");
  printf(" -p, --port                serial port (default /dev/ttyS0)\n");
  printf(" -d, --set_datetime        set current local date and time\n");
  printf(" -t, --set_temperature t   set wanted temperature (19.5°C = 195)\n");
  printf(" -m, --set_mode mode       set mode auto/manu\n");
  printf(" -g, --get_timers          get the whole timing table\n");
  printf(" -a, --set_timer AB[CDDEE] set a specific timer\n");
  printf("                           A day 0-7, B slot, C mode, DDEE time in "
         "hours and minutes\n");
  printf("                           Modes: 0 frost protection, 1 energy save, "
         "2 comfort, 3 supercomfort\n");
  printf("                           if only day and slot specified, the slot "
         "will be unset\n");
  printf("                           example: 1020700 stands for comfort mode "
         "on monday 7:00\n");
  printf(" -h, --help                this help\n\n");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x102c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x107e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10c3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1109(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee5(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
lea    0xf38(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf90(%rip),%rdi
call   1030 <puts@plt>
lea    0xfba(%rip),%rdi
call   1030 <puts@plt>
lea    0xfde(%rip),%rdi
call   1030 <puts@plt>
lea    0x1027(%rip),%rdi
call   1030 <puts@plt>
lea    0x107a(%rip),%rdi
call   1030 <puts@plt>
lea    0x10c0(%rip),%rdi
call   1030 <puts@plt>
lea    0x1107(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"hr20cmd version %s\0A\00"
@.str.1 = [4 x i8] c"0.2\00"
@.str.2 = [11 x i8] c"Options:\0A\0A\00"
@.str.3 = [61 x i8] c" -p, --port serial port (default /dev/ttyS0)\0A\00"
@.str.4 = [60 x i8] c" -d, --set_datetime set current local date and time\0A\00"
@.str.5 = [67 x i8] c" -t, --set_temperature t set wanted temperature (19.5\C2\B0C = 195)\0A\00"
@.str.6 = [47 x i8] c" -m, --set_mode mode set mode auto/manu\0A\00"
@.str.7 = [55 x i8] c" -g, --get_timers get the whole timing table\0A\00"
@.str.8 = [49 x i8] c" -a, --set_timer AB[CDDEE] set a specific timer\0A\00"
@.str.9 = [86 x i8] c" A day 0-7, B slot, C mode, DDEE time in hours and minutes\0A\00"
@.str.10 = [96 x i8] c" Modes: 0 frost protection, 1 energy save, 2 comfort, 3 supercomfort\0A\00"
@.str.11 = [83 x i8] c" if only day and slot specified, the slot will be unset\0A\00"
@.str.12 = [84 x i8] c" example: 1020700 stands for comfort mode on monday 7:00\0A\00"
@.str.13 = [39 x i8] c" -h, --help this help\0A\0A\00"
define void @printUsage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.5, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.9, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.10, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.11, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.12, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"hr20cmd version %s\0A\00"
@.str.1 = [4 x i8] c"0.2\00"
@str = [10 x i8] c"Options:\0A\00"
@str.14 = [60 x i8] c" -p, --port serial port (default /dev/ttyS0)\00"
@str.15 = [59 x i8] c" -d, --set_datetime set current local date and time\00"
@str.16 = [66 x i8] c" -t, --set_temperature t set wanted temperature (19.5\C2\B0C = 195)\00"
@str.17 = [46 x i8] c" -m, --set_mode mode set mode auto/manu\00"
@str.18 = [54 x i8] c" -g, --get_timers get the whole timing table\00"
@str.19 = [48 x i8] c" -a, --set_timer AB[CDDEE] set a specific timer\00"
@str.20 = [85 x i8] c" A day 0-7, B slot, C mode, DDEE time in hours and minutes\00"
@str.21 = [95 x i8] c" Modes: 0 frost protection, 1 energy save, 2 comfort, 3 supercomfort\00"
@str.22 = [82 x i8] c" if only day and slot specified, the slot will be unset\00"
@str.23 = [83 x i8] c" example: 1020700 stands for comfort mode on monday 7:00\00"
@str.24 = [38 x i8] c" -h, --help this help\0A\00"
define void @printUsage() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.14, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.15, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.16, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.17, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.18, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.19, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str.20, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.21, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str.22, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str.23, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.24, i64 0, i64 0))
ret void
}