void usage(char *exec) {
  int length = 0;
  length = (int)strlen(exec) + 7;
  printf("Usage: %s -t, --text  \"<text>\"     Converts ASCII text to Morse "
         "code\n",
         exec);
  printf("%*s -m, --morse \"<morse>\"    Converts Morse code to ASCII text\n",
         length, " ");
  printf("%*s -w, --wav   <wav>        Exports Morse code as a WAV file\n",
         length, " ");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x7,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xee8(%rip),%rdi
lea    0xf21(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xf12(%rip),%rdi
lea    0xf09(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x7(%rax),%ebp
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf00(%rip),%rdi
lea    0xf39(%rip),%rbx
mov    %ebp,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf28(%rip),%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [70 x i8] c"Usage: %s -t, --text \22<text>\22 Converts ASCII text to Morse code\0A\00"
@.str.1 = [64 x i8] c"%*s -m, --morse \22<morse>\22 Converts Morse code to ASCII text\0A\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [63 x i8] c"%*s -w, --wav <wav> Exports Morse code as a WAV file\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = trunc i64 %5 to i32
%7 = add nsw i32 %6, 7
store i32 %7, i32* %3
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0), i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [70 x i8] c"Usage: %s -t, --text \22<text>\22 Converts ASCII text to Morse code\0A\00"
@.str.1 = [64 x i8] c"%*s -m, --morse \22<morse>\22 Converts Morse code to ASCII text\0A\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [63 x i8] c"%*s -w, --wav <wav> Exports Morse code as a WAV file\0A\00"
define void @usage(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add nsw i32 %3, 7
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i32 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0), i32 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}