#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 printhelp() {
  printf("bc is an arbitrary precision numeric processing language\n");
  printf("Following are the commands to use it:\n\n");
  printf(
      "->"
      "scale"
      " is the no. of digits after decimal in answer (by default set to 0)\n");
  printf("To change scale :\n");
  printf("->scale=num  ...(changes scale to num entered by user)\n\n");
  printf("->"
         "ibase"
         " is the base of input numbers (by default set to 10)\n");
  printf("To change ibase:\n");
  printf(
      "->ibase=num  (1<num<=10)...(changes ibase to num entered by user)\n\n");
  printf("->"
         "obase"
         " is the base of output answer (by default set to 10)\n");
  printf("To change obase:\n");
  printf(
      "->obase=num  (1<num<=16)...(changes obase to num entered by user)\n\n");
  printf("Expressions:\n");
  printf("ibase = num  ...changes ibase\n");
  printf("obase = num  ...changes obase\n");
  printf("scale = num  ...changes scale\n");
  printf("->n1+n2  ...Adds n1 and n2 and prints answer\n");
  printf("->n1-n2  ...Subtracts n2 and n1 and prints answer\n");
  printf("->n1*n2  ...Multiplies n1 and n2 and prints answer\n");
  printf("->n1/n2  ...Divides n1 by n2 and prints answer\n");
  printf("->n1%%n2  ...Prints remainder of n1/n2 \n");
  printf("->n1^n2  ...n1 raise to power n2\n");
  printf("->$num   ...Prints Square root of num \n");
  printf("->(n1 op n2)  ...Bracket operations\n");
  printf("->n1/n2+n3*($n4) ...Expression evaluation\n\n");
  printf("->Type "
         "quit"
         " to exit\n\n");
  printf("Precedence: (higher to lower)\n");
  printf("1. ( , )\n2. $\n3. ^\n4. %%\n5. * , /\n6. + , -\n");
}


x86 assembly (clang, -O0):
<printhelp>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf76(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa3(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd4(%rip),%rdi
call   1030 <printf@plt>
lea    0xfda(%rip),%rdi
call   1030 <printf@plt>
lea    0x1012(%rip),%rdi
call   1030 <printf@plt>
lea    0x1043(%rip),%rdi
call   1030 <printf@plt>
lea    0x1049(%rip),%rdi
call   1030 <printf@plt>
lea    0x1081(%rip),%rdi
call   1030 <printf@plt>
lea    0x1083(%rip),%rdi
call   1030 <printf@plt>
lea    0x1096(%rip),%rdi
call   1030 <printf@plt>
lea    0x10a9(%rip),%rdi
call   1030 <printf@plt>
lea    0x10bc(%rip),%rdi
call   1030 <printf@plt>
lea    0x10de(%rip),%rdi
call   1030 <printf@plt>
lea    0x1105(%rip),%rdi
call   1030 <printf@plt>
lea    0x112d(%rip),%rdi
call   1030 <printf@plt>
lea    0x1151(%rip),%rdi
call   1030 <printf@plt>
lea    0x116e(%rip),%rdi
call   1030 <printf@plt>
lea    0x1184(%rip),%rdi
call   1030 <printf@plt>
lea    0x11a0(%rip),%rdi
call   1030 <printf@plt>
lea    0x11b9(%rip),%rdi
call   1030 <printf@plt>
lea    0x11d9(%rip),%rdi
call   1030 <printf@plt>
lea    0x11e3(%rip),%rdi
call   1030 <printf@plt>
lea    0x11f6(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printhelp>:
push   %rax
lea    0xf2d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf75(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfba(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe6(%rip),%rdi
call   1030 <puts@plt>
lea    0x1016(%rip),%rdi
call   1030 <puts@plt>
lea    0x101b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1052(%rip),%rdi
call   1030 <puts@plt>
lea    0x1082(%rip),%rdi
call   1030 <puts@plt>
lea    0x1087(%rip),%rdi
call   1030 <puts@plt>
lea    0x10be(%rip),%rdi
call   1030 <puts@plt>
lea    0x10bf(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d1(%rip),%rdi
call   1030 <puts@plt>
lea    0x10e3(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f5(%rip),%rdi
call   1030 <puts@plt>
lea    0x1116(%rip),%rdi
call   1030 <puts@plt>
lea    0x113c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1163(%rip),%rdi
call   1030 <puts@plt>
lea    0xdf4(%rip),%rdi
call   1040 <printf@plt>
lea    0x117a(%rip),%rdi
call   1030 <puts@plt>
lea    0x118f(%rip),%rdi
call   1030 <puts@plt>
lea    0x11aa(%rip),%rdi
call   1030 <puts@plt>
lea    0x11c2(%rip),%rdi
call   1030 <puts@plt>
lea    0x11e1(%rip),%rdi
call   1030 <puts@plt>
lea    0x11ea(%rip),%rdi
call   1030 <puts@plt>
lea    0xdc9(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"bc is an arbitrary precision numeric processing language\0A\00"
@.str.1 = [40 x i8] c"Following are the commands to use it:\0A\0A\00"
@.str.2 = [76 x i8] c"->scale is the no. of digits after decimal in answer (by default set to 0)\0A\00"
@.str.3 = [19 x i8] c"To change scale :\0A\00"
@.str.4 = [57 x i8] c"->scale=num ...(changes scale to num entered by user)\0A\0A\00"
@.str.5 = [61 x i8] c"->ibase is the base of input numbers (by default set to 10)\0A\00"
@.str.6 = [18 x i8] c"To change ibase:\0A\00"
@.str.7 = [68 x i8] c"->ibase=num (1<num<=10)...(changes ibase to num entered by user)\0A\0A\00"
@.str.8 = [61 x i8] c"->obase is the base of output answer (by default set to 10)\0A\00"
@.str.9 = [18 x i8] c"To change obase:\0A\00"
@.str.10 = [68 x i8] c"->obase=num (1<num<=16)...(changes obase to num entered by user)\0A\0A\00"
@.str.11 = [14 x i8] c"Expressions:\0A\00"
@.str.12 = [31 x i8] c"ibase = num ...changes ibase\0A\00"
@.str.13 = [31 x i8] c"obase = num ...changes obase\0A\00"
@.str.14 = [31 x i8] c"scale = num ...changes scale\0A\00"
@.str.15 = [46 x i8] c"->n1+n2 ...Adds n1 and n2 and prints answer\0A\00"
@.str.16 = [51 x i8] c"->n1-n2 ...Subtracts n2 and n1 and prints answer\0A\00"
@.str.17 = [52 x i8] c"->n1*n2 ...Multiplies n1 and n2 and prints answer\0A\00"
@.str.18 = [48 x i8] c"->n1/n2 ...Divides n1 by n2 and prints answer\0A\00"
@.str.19 = [41 x i8] c"->n1%%n2 ...Prints remainder of n1/n2 \0A\00"
@.str.20 = [34 x i8] c"->n1^n2 ...n1 raise to power n2\0A\00"
@.str.21 = [40 x i8] c"->$num ...Prints Square root of num \0A\00"
@.str.22 = [37 x i8] c"->(n1 op n2) ...Bracket operations\0A\00"
@.str.23 = [44 x i8] c"->n1/n2+n3*($n4) ...Expression evaluation\0A\0A\00"
@.str.24 = [22 x i8] c"->Type quit to exit\0A\0A\00"
@.str.25 = [31 x i8] c"Precedence: (higher to lower)\0A\00"
@.str.26 = [44 x i8] c"1. ( , )\0A2. $\0A3. ^\0A4. %%\0A5. * , /\0A6. + , -\0A\00"
define void @printhelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 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 ([68 x i8], [68 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.22, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.23, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.25, i64 0, i64 0))
%27 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.26, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.19 = [41 x i8] c"->n1%%n2 ...Prints remainder of n1/n2 \0A\00"
@.str.26 = [44 x i8] c"1. ( , )\0A2. $\0A3. ^\0A4. %%\0A5. * , /\0A6. + , -\0A\00"
@str = [57 x i8] c"bc is an arbitrary precision numeric processing language\00"
@str.27 = [39 x i8] c"Following are the commands to use it:\0A\00"
@str.28 = [75 x i8] c"->scale is the no. of digits after decimal in answer (by default set to 0)\00"
@str.29 = [18 x i8] c"To change scale :\00"
@str.30 = [56 x i8] c"->scale=num ...(changes scale to num entered by user)\0A\00"
@str.31 = [60 x i8] c"->ibase is the base of input numbers (by default set to 10)\00"
@str.32 = [17 x i8] c"To change ibase:\00"
@str.33 = [67 x i8] c"->ibase=num (1<num<=10)...(changes ibase to num entered by user)\0A\00"
@str.34 = [60 x i8] c"->obase is the base of output answer (by default set to 10)\00"
@str.35 = [17 x i8] c"To change obase:\00"
@str.36 = [67 x i8] c"->obase=num (1<num<=16)...(changes obase to num entered by user)\0A\00"
@str.37 = [13 x i8] c"Expressions:\00"
@str.38 = [30 x i8] c"ibase = num ...changes ibase\00"
@str.39 = [30 x i8] c"obase = num ...changes obase\00"
@str.40 = [30 x i8] c"scale = num ...changes scale\00"
@str.41 = [45 x i8] c"->n1+n2 ...Adds n1 and n2 and prints answer\00"
@str.42 = [50 x i8] c"->n1-n2 ...Subtracts n2 and n1 and prints answer\00"
@str.43 = [51 x i8] c"->n1*n2 ...Multiplies n1 and n2 and prints answer\00"
@str.44 = [47 x i8] c"->n1/n2 ...Divides n1 by n2 and prints answer\00"
@str.45 = [33 x i8] c"->n1^n2 ...n1 raise to power n2\00"
@str.46 = [39 x i8] c"->$num ...Prints Square root of num \00"
@str.47 = [36 x i8] c"->(n1 op n2) ...Bracket operations\00"
@str.48 = [43 x i8] c"->n1/n2+n3*($n4) ...Expression evaluation\0A\00"
@str.49 = [21 x i8] c"->Type quit to exit\0A\00"
@str.50 = [30 x i8] c"Precedence: (higher to lower)\00"
define void @printhelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.27, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.28, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.29, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.30, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.31, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.32, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.33, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.34, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.35, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.36, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.37, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.38, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.39, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.40, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.41, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.42, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.43, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.44, i64 0, i64 0))
%20 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.19, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.45, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.46, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.47, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.48, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.49, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.50, i64 0, i64 0))
%27 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.26, i64 0, i64 0))
ret void
}