#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(
      "chntpw: change password of a user in a Windows SAM file,\n"
      "or invoke registry editor. Should handle both 32 and 64 bit windows "
      "and\n"
      "all version from NT3.x to Win7\n"
      "chntpw [OPTIONS] <samfile> [systemfile] [securityfile] [otherreghive] "
      "[...]\n"
      " -h          This message\n"
      " -u <user>   Username or RID to change, Administrator is default\n"
      " -l          list all users in SAM file\n"
      " -i          Interactive Menu system\n"
      " -e          Registry editor. Now with full write support!\n"
      " -d          Enter buffer debugger instead (hex editor), \n"
      " -v          Be a little more verbose (for debuging)\n"
      " -L          For scripts, write names of changed files to /tmp/changed\n"
      " -N          No allocation mode. Only same length overwrites possible "
      "(very safe mode)\n"
      " -E          No expand mode, do not expand hive file (safe mode)\n"
      " -A <subcommand> Auto / Noninteractive. Do stuff without asking\n"
      " -A F   reset on first admin user (lowest RID)\n"
      " -A A   reset all admins\n"
      " -A l   list all users, output it parseable\n"
      " -A g   list groups\n"
      " -A s   show machine SID\n"
      " -A a -u <username|RID> -u <grpid>  Add user to group\n"
      " -A r -u <username|RID> -g <grpid>  Remove user from group\n"
      "\nUsernames can be given as name or RID (in hex with 0x first)\n"
      "<grpid> group IDs must be given as number, can be hex with 0x first\n"
      "Example: chntpw -A a -u 0x3aa -g 1000 # Adds user with RID hex 0x3aa to "
      "group decimal 1000\n"
      "\nSee readme file on how to get to the registry files, and what they "
      "are.\n"
      "Source/binary freely distributable under GPL v2 license. See README for "
      "details.\n"
      "NOTE: This program is somewhat hackish! You are on your own!\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [1572 x i8] c"chntpw: change password of a user in a Windows SAM file,\0Aor invoke registry editor. Should handle both 32 and 64 bit windows and\0Aall version from NT3.x to Win7\0Achntpw [OPTIONS] <samfile> [systemfile] [securityfile] [otherreghive] [...]\0A -h This message\0A -u <user> Username or RID to change, Administrator is default\0A -l list all users in SAM file\0A -i Interactive Menu system\0A -e Registry editor. Now with full write support!\0A -d Enter buffer debugger instead (hex editor), \0A -v Be a little more verbose (for debuging)\0A -L For scripts, write names of changed files to /tmp/changed\0A -N No allocation mode. Only same length overwrites possible (very safe mode)\0A -E No expand mode, do not expand hive file (safe mode)\0A -A <subcommand> Auto / Noninteractive. Do stuff without asking\0A -A F reset on first admin user (lowest RID)\0A -A A reset all admins\0A -A l list all users, output it parseable\0A -A g list groups\0A -A s show machine SID\0A -A a -u <username|RID> -u <grpid> Add user to group\0A -A r -u <username|RID> -g <grpid> Remove user from group\0A\0AUsernames can be given as name or RID (in hex with 0x first)\0A<grpid> group IDs must be given as number, can be hex with 0x first\0AExample: chntpw -A a -u 0x3aa -g 1000 # Adds user with RID hex 0x3aa to group decimal 1000\0A\0ASee readme file on how to get to the registry files, and what they are.\0ASource/binary freely distributable under GPL v2 license. See README for details.\0ANOTE: This program is somewhat hackish! You are on your own!\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([1572 x i8], [1572 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [1571 x i8] c"chntpw: change password of a user in a Windows SAM file,\0Aor invoke registry editor. Should handle both 32 and 64 bit windows and\0Aall version from NT3.x to Win7\0Achntpw [OPTIONS] <samfile> [systemfile] [securityfile] [otherreghive] [...]\0A -h This message\0A -u <user> Username or RID to change, Administrator is default\0A -l list all users in SAM file\0A -i Interactive Menu system\0A -e Registry editor. Now with full write support!\0A -d Enter buffer debugger instead (hex editor), \0A -v Be a little more verbose (for debuging)\0A -L For scripts, write names of changed files to /tmp/changed\0A -N No allocation mode. Only same length overwrites possible (very safe mode)\0A -E No expand mode, do not expand hive file (safe mode)\0A -A <subcommand> Auto / Noninteractive. Do stuff without asking\0A -A F reset on first admin user (lowest RID)\0A -A A reset all admins\0A -A l list all users, output it parseable\0A -A g list groups\0A -A s show machine SID\0A -A a -u <username|RID> -u <grpid> Add user to group\0A -A r -u <username|RID> -g <grpid> Remove user from group\0A\0AUsernames can be given as name or RID (in hex with 0x first)\0A<grpid> group IDs must be given as number, can be hex with 0x first\0AExample: chntpw -A a -u 0x3aa -g 1000 # Adds user with RID hex 0x3aa to group decimal 1000\0A\0ASee readme file on how to get to the registry files, and what they are.\0ASource/binary freely distributable under GPL v2 license. See README for details.\0ANOTE: This program is somewhat hackish! You are on your own!\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([1571 x i8], [1571 x i8]* @str, i64 0, i64 0))
ret void
}