#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*/ sprintf(char *, char *, char *, char *, char *, char *,
                           char *);
void helpOutput(void) {
  char header[] = "smart traffic analyzer\nUSAGE: sta [OPTIONS]\nOPTIONS:\n";
  char opt_f[] = "-f FILE    read csv file\n";
  char opt_c[] = "-c CARS    number of cars\n";
  char opt_t[] = "-t ITER    number of iterations or simulation time\n";
  char opt_h[] = "-h         Display the help information\n";
  char str[1000];
  sprintf(str, "%s%d%s", header, opt_f, opt_c, opt_t, opt_h);
}


x86 assembly (clang, -O0):
<helpOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4f0,%rsp
lea    -0x40(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x36,%edx
call   1030 <memcpy@plt>
mov    0xef9(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xef6(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xef3(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xef0(%rip),%ax
mov    %ax,-0x48(%rbp)
mov    0xeed(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xeea(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xee7(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xee4(%rip),%ax
mov    %ax,-0x68(%rbp)
mov    0xedc(%rip),%al
mov    %al,-0x66(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xed1(%rip),%rsi
mov    $0x34,%edx
call   1030 <memcpy@plt>
lea    -0xf0(%rbp),%rdi
lea    0xef9(%rip),%rsi
mov    $0x29,%edx
call   1030 <memcpy@plt>
lea    -0x4e0(%rbp),%rdi
lea    -0x40(%rbp),%rdx
lea    -0x60(%rbp),%rcx
lea    -0x80(%rbp),%r8
lea    -0xc0(%rbp),%r9
lea    -0xf0(%rbp),%rax
lea    0xef0(%rip),%rsi
mov    %rax,(%rsp)
call   1040 <sprintf@plt>
add    $0x4f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helpOutput>:
sub    $0x4e8,%rsp
movaps 0xf02(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xec4(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movabs $0xa3a534e4f4954,%rax
mov    %rax,0xee(%rsp)
movups 0xeed(%rip),%xmm0
movups %xmm0,0x1a(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0xef6(%rip),%xmm0
movups %xmm0,0x3b(%rsp)
movaps 0xedf(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xf13(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xef4(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movl   $0xa656d,0xb0(%rsp)
movups 0xf14(%rip),%xmm0
movups %xmm0,0x69(%rsp)
movaps 0xeff(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
lea    0x50(%rsp),%rax
mov    %rax,(%rsp)
lea    0xef7(%rip),%rsi
lea    0x100(%rsp),%rdi
lea    0xc0(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x30(%rsp),%r8
lea    0x80(%rsp),%r9
call   1030 <sprintf@plt>
add    $0x4e8,%rsp
ret

LLVM IR (-O0):
@__const.helpOutput.header = [54 x i8] c"smart traffic analyzer\0AUSAGE: sta [OPTIONS]\0AOPTIONS:\0A\00"
@__const.helpOutput.opt_f = [26 x i8] c"-f FILE read csv file\0A\00"
@__const.helpOutput.opt_c = [27 x i8] c"-c CARS number of cars\0A\00"
@__const.helpOutput.opt_t = [52 x i8] c"-t ITER number of iterations or simulation time\0A\00"
@__const.helpOutput.opt_h = [41 x i8] c"-h Display the help information\0A\00"
@.str = [7 x i8] c"%s%d%s\00"
define void @helpOutput() {
%1 = alloca [54 x i8]
%2 = alloca [26 x i8]
%3 = alloca [27 x i8]
%4 = alloca [52 x i8]
%5 = alloca [41 x i8]
%6 = alloca [1000 x i8]
%7 = bitcast [54 x i8]* %1 to i8*
%8 = bitcast [26 x i8]* %2 to i8*
%9 = bitcast [27 x i8]* %3 to i8*
%10 = bitcast [52 x i8]* %4 to i8*
%11 = bitcast [41 x i8]* %5 to i8*
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [54 x i8], [54 x i8]* %1, i64 0, i64 0
%14 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%15 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 0
%16 = getelementptr inbounds [52 x i8], [52 x i8]* %4, i64 0, i64 0
%17 = getelementptr inbounds [41 x i8], [41 x i8]* %5, i64 0, i64 0
%18 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14, i8* %15, i8* %16, i8* %17)
ret void
}

LLVM IR (-O2):
@__const.helpOutput.header = [54 x i8] c"smart traffic analyzer\0AUSAGE: sta [OPTIONS]\0AOPTIONS:\0A\00"
@__const.helpOutput.opt_f = [26 x i8] c"-f FILE read csv file\0A\00"
@__const.helpOutput.opt_c = [27 x i8] c"-c CARS number of cars\0A\00"
@__const.helpOutput.opt_t = [52 x i8] c"-t ITER number of iterations or simulation time\0A\00"
@__const.helpOutput.opt_h = [41 x i8] c"-h Display the help information\0A\00"
@.str = [7 x i8] c"%s%d%s\00"
define void @helpOutput() {
%1 = alloca [54 x i8]
%2 = alloca [26 x i8]
%3 = alloca [27 x i8]
%4 = alloca [52 x i8]
%5 = alloca [41 x i8]
%6 = alloca [1000 x i8]
%7 = getelementptr inbounds [54 x i8], [54 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [52 x i8], [52 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [41 x i8], [41 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%13 = call i32 @sprintf(i8* %12, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %9, i8* %10, i8* %11)
ret void
}