#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 usage(void) {
  printf("Rebases base-10 numbers to a new arbitrary base, where the base is "
         "an integer equal to at least 2.\n\n");
  printf("Data entry should take the form of one of the following:\n");
  printf("1) rebaser (base) (number to rebase), e.g.:\n");
  printf("\t$ ./rebaser 16 15 16 17\n");
  printf("2) (stdin) | rebaser, e.g.:\n");
  printf("\t$ echo 8 7 8 9 | ./rebaser\n");
  printf("3) rebaser (file). N.B. The first value in (file) will be set as the "
         "base, e.g.\n");
  printf("\t$ ./rebaser <test_file\n");
  printf("Where\n");
  printf("\t$ cat test_file\n");
  printf("\t31\n");
  printf("\t30\n");
  printf("\t31\n");
  printf("\t32\n");
  printf("Arguments are assigned a higher precedence than stdin, thus allowing "
         "for setting the base in the arguments, and piping in data.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3e(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9b(%rip),%rdi
call   1030 <printf@plt>
lea    0xfac(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbd(%rip),%rdi
call   1030 <printf@plt>
lea    0x1002(%rip),%rdi
call   1030 <printf@plt>
lea    0x100f(%rip),%rdi
call   1030 <printf@plt>
lea    0x100a(%rip),%rdi
call   1030 <printf@plt>
lea    0x1010(%rip),%rdi
call   1030 <printf@plt>
lea    0x1009(%rip),%rdi
call   1030 <printf@plt>
lea    0xff8(%rip),%rdi
call   1030 <printf@plt>
lea    0xff6(%rip),%rdi
call   1030 <printf@plt>
lea    0xfef(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf40(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9a(%rip),%rdi
call   1030 <puts@plt>
lea    0xfaa(%rip),%rdi
call   1030 <puts@plt>
lea    0xfba(%rip),%rdi
call   1030 <puts@plt>
lea    0xffe(%rip),%rdi
call   1030 <puts@plt>
lea    0x100a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1004(%rip),%rdi
call   1030 <puts@plt>
lea    0x100d(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xffa(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xfee(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe6(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [101 x i8] c"Rebases base-10 numbers to a new arbitrary base, where the base is an integer equal to at least 2.\0A\0A\00"
@.str.1 = [58 x i8] c"Data entry should take the form of one of the following:\0A\00"
@.str.2 = [45 x i8] c"1) rebaser (base) (number to rebase), e.g.:\0A\00"
@.str.3 = [26 x i8] c"\09$ ./rebaser 16 15 16 17\0A\00"
@.str.4 = [29 x i8] c"2) (stdin) | rebaser, e.g.:\0A\00"
@.str.5 = [29 x i8] c"\09$ echo 8 7 8 9 | ./rebaser\0A\00"
@.str.6 = [81 x i8] c"3) rebaser (file). N.B. The first value in (file) will be set as the base, e.g.\0A\00"
@.str.7 = [25 x i8] c"\09$ ./rebaser <test_file\0A\00"
@.str.8 = [7 x i8] c"Where\0A\00"
@.str.9 = [18 x i8] c"\09$ cat test_file\0A\00"
@.str.10 = [5 x i8] c"\0931\0A\00"
@.str.11 = [5 x i8] c"\0930\0A\00"
@.str.12 = [5 x i8] c"\0932\0A\00"
@.str.13 = [129 x i8] c"Arguments are assigned a higher precedence than stdin, thus allowing for setting the base in the arguments, and piping in data.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [100 x i8] c"Rebases base-10 numbers to a new arbitrary base, where the base is an integer equal to at least 2.\0A\00"
@str.14 = [57 x i8] c"Data entry should take the form of one of the following:\00"
@str.15 = [44 x i8] c"1) rebaser (base) (number to rebase), e.g.:\00"
@str.16 = [25 x i8] c"\09$ ./rebaser 16 15 16 17\00"
@str.17 = [28 x i8] c"2) (stdin) | rebaser, e.g.:\00"
@str.18 = [28 x i8] c"\09$ echo 8 7 8 9 | ./rebaser\00"
@str.19 = [80 x i8] c"3) rebaser (file). N.B. The first value in (file) will be set as the base, e.g.\00"
@str.20 = [24 x i8] c"\09$ ./rebaser <test_file\00"
@str.21 = [6 x i8] c"Where\00"
@str.22 = [17 x i8] c"\09$ cat test_file\00"
@str.24 = [4 x i8] c"\0930\00"
@str.25 = [4 x i8] c"\0931\00"
@str.26 = [4 x i8] c"\0932\00"
@str.27 = [128 x i8] c"Arguments are assigned a higher precedence than stdin, thus allowing for setting the base in the arguments, and piping in data.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.14, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.15, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.16, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.17, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.18, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.19, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.20, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.21, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.22, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.25, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.24, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @str.27, i64 0, i64 0))
ret void
}