#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() {
  printf("This application takes one or more arguments, where each argument is "
         "a supported a_type, and prints out\n");
  printf("the corresponding a_val. If there are N a_type arguments passed to "
         "lsauxv, then the standard output will\n");
  printf("consist of N lines, where each line is the a_val of the "
         "corresponding a_type argument. Use --list to get\n");
  printf("a list of the supported a_type arguments.\n\n");
  printf("In this context, an \"a_type\" argument refers to the a_type member "
         "of the auxv_t struct, which is defined\n");
  printf("in /usr/include/elf.h. For each a_type argument, the lsauxv "
         "application scans the auxv_t structures in\n");
  printf("/proc/self/auxv until a auxv_t structure with a matching a_type is "
         "found. The a_val of the matching auxv_t\n");
  printf("structure is then printed to standard out (one a_val per line per "
         "a_type parameter).\n\n");
  printf("Sample usage of lsauxv (with output): \n");
  printf("> lsauxv AT_PAGESZ AT_UID at_uid\n");
  printf("4096\n1016\n1016\n");
}


x86 assembly (clang, -O0):
<print_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf42(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa0(%rip),%rdi
call   1030 <printf@plt>
lea    0xffe(%rip),%rdi
call   1030 <printf@plt>
lea    0x101e(%rip),%rdi
call   1030 <printf@plt>
lea    0x107c(%rip),%rdi
call   1030 <printf@plt>
lea    0x10d8(%rip),%rdi
call   1030 <printf@plt>
lea    0x1138(%rip),%rdi
call   1030 <printf@plt>
lea    0x1183(%rip),%rdi
call   1030 <printf@plt>
lea    0x119f(%rip),%rdi
call   1030 <printf@plt>
lea    0x11b5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_info>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf44(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa1(%rip),%rdi
call   1030 <puts@plt>
lea    0xffe(%rip),%rdi
call   1030 <puts@plt>
lea    0x101d(%rip),%rdi
call   1030 <puts@plt>
lea    0x107a(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d5(%rip),%rdi
call   1030 <puts@plt>
lea    0x1134(%rip),%rdi
call   1030 <puts@plt>
lea    0x117e(%rip),%rdi
call   1030 <puts@plt>
lea    0x1199(%rip),%rdi
call   1030 <puts@plt>
lea    0x11ae(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [105 x i8] c"This application takes one or more arguments, where each argument is a supported a_type, and prints out\0A\00"
@.str.1 = [106 x i8] c"the corresponding a_val. If there are N a_type arguments passed to lsauxv, then the standard output will\0A\00"
@.str.2 = [106 x i8] c"consist of N lines, where each line is the a_val of the corresponding a_type argument. Use --list to get\0A\00"
@.str.3 = [44 x i8] c"a list of the supported a_type arguments.\0A\0A\00"
@.str.4 = [106 x i8] c"In this context, an \22a_type\22 argument refers to the a_type member of the auxv_t struct, which is defined\0A\00"
@.str.5 = [104 x i8] c"in /usr/include/elf.h. For each a_type argument, the lsauxv application scans the auxv_t structures in\0A\00"
@.str.6 = [108 x i8] c"/proc/self/auxv until a auxv_t structure with a matching a_type is found. The a_val of the matching auxv_t\0A\00"
@.str.7 = [87 x i8] c"structure is then printed to standard out (one a_val per line per a_type parameter).\0A\0A\00"
@.str.8 = [40 x i8] c"Sample usage of lsauxv (with output): \0A\00"
@.str.9 = [34 x i8] c"> lsauxv AT_PAGESZ AT_UID at_uid\0A\00"
@.str.10 = [16 x i8] c"4096\0A1016\0A1016\0A\00"
define void @print_info() {
%1 = call i32 @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [104 x i8] c"This application takes one or more arguments, where each argument is a supported a_type, and prints out\00"
@str.11 = [105 x i8] c"the corresponding a_val. If there are N a_type arguments passed to lsauxv, then the standard output will\00"
@str.12 = [105 x i8] c"consist of N lines, where each line is the a_val of the corresponding a_type argument. Use --list to get\00"
@str.13 = [43 x i8] c"a list of the supported a_type arguments.\0A\00"
@str.14 = [105 x i8] c"In this context, an \22a_type\22 argument refers to the a_type member of the auxv_t struct, which is defined\00"
@str.15 = [103 x i8] c"in /usr/include/elf.h. For each a_type argument, the lsauxv application scans the auxv_t structures in\00"
@str.16 = [107 x i8] c"/proc/self/auxv until a auxv_t structure with a matching a_type is found. The a_val of the matching auxv_t\00"
@str.17 = [86 x i8] c"structure is then printed to standard out (one a_val per line per a_type parameter).\0A\00"
@str.18 = [39 x i8] c"Sample usage of lsauxv (with output): \00"
@str.19 = [33 x i8] c"> lsauxv AT_PAGESZ AT_UID at_uid\00"
@str.20 = [15 x i8] c"4096\0A1016\0A1016\00"
define void @print_info() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([104 x i8], [104 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([105 x i8], [105 x i8]* @str.11, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([105 x i8], [105 x i8]* @str.12, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([105 x i8], [105 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([107 x i8], [107 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.19, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.20, i64 0, i64 0))
ret void
}