#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 *);
int help() {
  printf("\nSyntax: ./passweb [-menu][-add][-edit][-del][-verify] username "
         "password user-type [username2 password2 user-type2]\n");
  printf("Note: Only one switch can be used at once.\n\n");
  printf("\t-menu:\tThis switch displays the menu with options to choose "
         "from.\n\t\tYou may perform as many actions as you wish in this "
         "menu.\n\n");
  printf("\t-add:\tThis switch adds a user to the database.\n\t\tIt requires "
         "'username', 'password' and 'user-type' as its arguments.\n\t\tIf the "
         "user already exists, it will not be added.\n\n");
  printf("\t-edit:\tThis switch edits a user in the database.\n\t\tIt requires "
         "all the arguments above for both users.\n\t\tIf the user doesn't "
         "exist, it cannot be edited and no changes will be made.\n\n");
  printf("\t-del:\tThis switch deletes a user from the database.\n\t\tIt "
         "requires only the username argument.\n\t\tIf the username doesn't "
         "exist in the database, an error message will be displayed and "
         "nothing will occur.\n\n");
  printf("\t-verify:This switch verifies a user in the databse.\n\t\tIt "
         "requires the username and password arguments only.\n\t\tThe program "
         "will notify the user whether or not the username and password match "
         "an entry in the database.\n\t\tNote that if the username is found, "
         "the password must match that username's password.\n\n");
  printf("\t-help:\tThis switch prints out this help menu.\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4e(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6f(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe4(%rip),%rdi
call   1030 <printf@plt>
lea    0x1085(%rip),%rdi
call   1030 <printf@plt>
lea    0x1131(%rip),%rdi
call   1030 <printf@plt>
lea    0x11f2(%rip),%rdi
call   1030 <printf@plt>
lea    0x1319(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf50(%rip),%rdi
call   1030 <puts@plt>
lea    0xf70(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe4(%rip),%rdi
call   1030 <puts@plt>
lea    0x1084(%rip),%rdi
call   1030 <puts@plt>
lea    0x112f(%rip),%rdi
call   1030 <puts@plt>
lea    0x11ef(%rip),%rdi
call   1030 <puts@plt>
lea    0x1315(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [117 x i8] c"\0ASyntax: ./passweb [-menu][-add][-edit][-del][-verify] username password user-type [username2 password2 user-type2]\0A\00"
@.str.1 = [45 x i8] c"Note: Only one switch can be used at once.\0A\0A\00"
@.str.2 = [129 x i8] c"\09-menu:\09This switch displays the menu with options to choose from.\0A\09\09You may perform as many actions as you wish in this menu.\0A\0A\00"
@.str.3 = [173 x i8] c"\09-add:\09This switch adds a user to the database.\0A\09\09It requires 'username', 'password' and 'user-type' as its arguments.\0A\09\09If the user already exists, it will not be added.\0A\0A\00"
@.str.4 = [184 x i8] c"\09-edit:\09This switch edits a user in the database.\0A\09\09It requires all the arguments above for both users.\0A\09\09If the user doesn't exist, it cannot be edited and no changes will be made.\0A\0A\00"
@.str.5 = [205 x i8] c"\09-del:\09This switch deletes a user from the database.\0A\09\09It requires only the username argument.\0A\09\09If the username doesn't exist in the database, an error message will be displayed and nothing will occur.\0A\0A\00"
@.str.6 = [307 x i8] c"\09-verify:This switch verifies a user in the databse.\0A\09\09It requires the username and password arguments only.\0A\09\09The program will notify the user whether or not the username and password match an entry in the database.\0A\09\09Note that if the username is found, the password must match that username's password.\0A\0A\00"
@.str.7 = [49 x i8] c"\09-help:\09This switch prints out this help menu.\0A\0A\00"
define i32 @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([184 x i8], [184 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([205 x i8], [205 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([307 x i8], [307 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [116 x i8] c"\0ASyntax: ./passweb [-menu][-add][-edit][-del][-verify] username password user-type [username2 password2 user-type2]\00"
@str.8 = [44 x i8] c"Note: Only one switch can be used at once.\0A\00"
@str.9 = [128 x i8] c"\09-menu:\09This switch displays the menu with options to choose from.\0A\09\09You may perform as many actions as you wish in this menu.\0A\00"
@str.10 = [172 x i8] c"\09-add:\09This switch adds a user to the database.\0A\09\09It requires 'username', 'password' and 'user-type' as its arguments.\0A\09\09If the user already exists, it will not be added.\0A\00"
@str.11 = [183 x i8] c"\09-edit:\09This switch edits a user in the database.\0A\09\09It requires all the arguments above for both users.\0A\09\09If the user doesn't exist, it cannot be edited and no changes will be made.\0A\00"
@str.12 = [204 x i8] c"\09-del:\09This switch deletes a user from the database.\0A\09\09It requires only the username argument.\0A\09\09If the username doesn't exist in the database, an error message will be displayed and nothing will occur.\0A\00"
@str.13 = [306 x i8] c"\09-verify:This switch verifies a user in the databse.\0A\09\09It requires the username and password arguments only.\0A\09\09The program will notify the user whether or not the username and password match an entry in the database.\0A\09\09Note that if the username is found, the password must match that username's password.\0A\00"
@str.14 = [48 x i8] c"\09-help:\09This switch prints out this help menu.\0A\00"
define i32 @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([116 x i8], [116 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.8, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @str.9, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([172 x i8], [172 x i8]* @str.10, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([183 x i8], [183 x i8]* @str.11, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([204 x i8], [204 x i8]* @str.12, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([306 x i8], [306 x i8]* @str.13, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.14, i64 0, i64 0))
ret i32 0
}