#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*/ free(char *);
int /*<<< orphan*/ printf(char *, char *, ...);
char *supported_mass_units();
char *supported_per_units();
char *supported_sma_units();
void print_unit_info() {
  char *sup_sma = supported_sma_units();
  char *sup_per = supported_per_units();
  char *sup_mass = supported_mass_units();
  printf("%s\n", "An invalid unit was entered, please try again with a "
                 "different measurement.");
  printf("%s\n",
         "The workbench can work with measurements in the following units:");
  printf("%s%s\n", "Length: ", sup_sma);
  printf("%s%s\n", "Time: ", sup_per);
  printf("%s%s\n", "Mass: ", sup_mass);
  free(sup_sma);
  free(sup_per);
  free(sup_mass);
}


x86 assembly (clang, -O0):
<print_unit_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <supported_sma_units@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <supported_per_units@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1070 <supported_mass_units@plt>
mov    %rax,-0x18(%rbp)
lea    0xf0f(%rip),%rdi
lea    0xe79(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xefa(%rip),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdx
lea    0xedf(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdx
lea    0xec6(%rip),%rdi
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdx
lea    0xead(%rip),%rdi
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_unit_info>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <supported_sma_units@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1060 <supported_per_units@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1070 <supported_mass_units@plt>
mov    %rax,%r12
lea    0xf12(%rip),%rbx
lea    0xe7c(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb7(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee7(%rip),%rbx
lea    0xee6(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xedb(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xece(%rip),%rsi
mov    %rbx,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [76 x i8] c"An invalid unit was entered, please try again with a different measurement.\00"
@.str.2 = [65 x i8] c"The workbench can work with measurements in the following units:\00"
@.str.3 = [6 x i8] c"%s%s\0A\00"
@.str.4 = [9 x i8] c"Length: \00"
@.str.5 = [7 x i8] c"Time: \00"
@.str.6 = [7 x i8] c"Mass: \00"
define void @print_unit_info() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = call i8* (...) @supported_sma_units()
store i8* %4, i8** %1
%5 = call i8* (...) @supported_per_units()
store i8* %5, i8** %2
%6 = call i8* (...) @supported_mass_units()
store i8* %6, i8** %3
%7 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%9 = load i8*, i8** %1
%10 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %2
%12 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %3
%14 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %13)
%15 = load i8*, i8** %1
%16 = call i32 @free(i8* %15)
%17 = load i8*, i8** %2
%18 = call i32 @free(i8* %17)
%19 = load i8*, i8** %3
%20 = call i32 @free(i8* %19)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [76 x i8] c"An invalid unit was entered, please try again with a different measurement.\00"
@.str.2 = [65 x i8] c"The workbench can work with measurements in the following units:\00"
@.str.3 = [6 x i8] c"%s%s\0A\00"
@.str.4 = [9 x i8] c"Length: \00"
@.str.5 = [7 x i8] c"Time: \00"
@.str.6 = [7 x i8] c"Mass: \00"
define void @print_unit_info() {
%1 = tail call i8* (...) @supported_sma_units()
%2 = tail call i8* (...) @supported_per_units()
%3 = tail call i8* (...) @supported_mass_units()
%4 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %1)
%7 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %2)
%8 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %3)
%9 = tail call i32 @free(i8* %1)
%10 = tail call i32 @free(i8* %2)
%11 = tail call i32 @free(i8* %3)
ret void
}