#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 print_info(int extended) {
  printf("Syntax: raspws2801 [-demo 0|1] [-leds number_of_leds] [-delay "
         "delay_in_milliseconds]\n"
         "                   [-file path|-] [-noloop] [-namedpipe] [-h | "
         "--help]\n");
  if (!extended)
    return;
  printf("\n"
         "-leds   <integer>     The number of leds available.\n"
         "                Default: 128\n"
         "-file   <path or ->   The file to open, or - to read stdin.\n"
         "                Default: stdin\n"
         "-delay  <integer>     The delay in milliseconds between frames.\n"
         "                Default: 33\n"
         "-demo   <0 or 1>      Plays a demo sequence. 0 for once, 1 for an "
         "infinite loop\n"
         "\n"
         "-namedpipe      Output black and wait for new data instead of exit "
         "when the other side of the pipe disconnects.\n"
         "-noloop         If the input is a file, play it once and exit.\n"
         "-h --help       Prints this information");
}


x86 assembly (clang, -O0):
<print_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1136 <print_info+0x26>
jmp    1142 <print_info+0x32>
lea    0xf60(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_info>:
push   %rbx
mov    %edi,%ebx
lea    0x1107(%rip),%rdi
call   1030 <puts@plt>
test   %ebx,%ebx
je     1140 <print_info+0x20>
lea    0xec6(%rip),%rdi
pop    %rbx
jmp    1040 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [157 x i8] c"Syntax: raspws2801 [-demo 0|1] [-leds number_of_leds] [-delay delay_in_milliseconds]\0A [-file path|-] [-noloop] [-namedpipe] [-h | --help]\0A\00"
@.str.1 = [561 x i8] c"\0A-leds <integer> The number of leds available.\0A Default: 128\0A-file <path or -> The file to open, or - to read stdin.\0A Default: stdin\0A-delay <integer> The delay in milliseconds between frames.\0A Default: 33\0A-demo <0 or 1> Plays a demo sequence. 0 for once, 1 for an infinite loop\0A\0A-namedpipe Output black and wait for new data instead of exit when the other side of the pipe disconnects.\0A-noloop If the input is a file, play it once and exit.\0A-h --help Prints this information\00"
define void @print_info(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([561 x i8], [561 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str.1 = [561 x i8] c"\0A-leds <integer> The number of leds available.\0A Default: 128\0A-file <path or -> The file to open, or - to read stdin.\0A Default: stdin\0A-delay <integer> The delay in milliseconds between frames.\0A Default: 33\0A-demo <0 or 1> Plays a demo sequence. 0 for once, 1 for an infinite loop\0A\0A-namedpipe Output black and wait for new data instead of exit when the other side of the pipe disconnects.\0A-noloop If the input is a file, play it once and exit.\0A-h --help Prints this information\00"
@str = [156 x i8] c"Syntax: raspws2801 [-demo 0|1] [-leds number_of_leds] [-delay delay_in_milliseconds]\0A [-file path|-] [-noloop] [-namedpipe] [-h | --help]\00"
define void @print_info(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([156 x i8], [156 x i8]* @str, i64 0, i64 0))
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([561 x i8], [561 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
ret void
}