#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*/ delete (char **, int *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
int hamming(char *, char *);
int inarray(char const **, int, char *);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, char **, int *);
int /*<<< orphan*/ stderr;
int strlen(char *);
int /*<<< orphan*/ strtolower(char *);
int main(int argc, char **argv) {
  int i, j, k;
  int n_passw = argc - 1;
  if (n_passw < 2) {
    fprintf(stderr, "Too few arguments: %i\nUSAGE: %s PASSWORD PASSWORD...\n",
            n_passw, argv[0]);
    return 1;
  }
  char **passwords = &argv[1];
  int len = strlen(passwords[0]);
  for (i = 1; i < n_passw; i++) {
    if (strlen(passwords[i]) != len) {
      fprintf(stderr, "Passwords are of different length: '%s' and '%s'\n",
              passwords[0], passwords[i]);
      return 2;
    }
  }
  for (i = 0; i < n_passw; i++)
    strtolower(passwords[i]);
  char *input;
  int correct;
  for (i = 0; i < n_passw; i++) {
    printf("Enter password and number of correct letters\n> ");
    if (scanf("%ms %i", &input, &correct) != 2)
      return 0;
    strtolower(input);
    if (inarray((const char **)passwords, n_passw, input) == -1) {
      fprintf(stderr, "%s is not in the list of possible passwords\n", input);
      free(input);
      return 3;
    }
    delete (passwords, &n_passw, input);
    for (j = n_passw; j > 0; --j) {
      if (hamming(passwords[j], input) != correct) {
        delete (passwords, &n_passw, passwords[j]);
      }
    }
    switch (n_passw) {
    case 0:
      fprintf(stderr, "No more passwords left\n");
      free(input);
      return 4;
    case 1:
      printf("The password is: %s\n", passwords[0]);
      free(input);
      return 0;
    default:
      printf("Possible passwords:");
      for (k = 0; k < n_passw; k++) {
        printf(" %s", passwords[k]);
      }
      printf("\n");
    }
    free(input);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    11e6 <main+0x56>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
lea    0xe2d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1498 <main+0x308>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x2c(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1277 <main+0xe7>
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <strlen@plt>
cmp    -0x2c(%rbp),%eax
je     1264 <main+0xd4>
mov    0x2dab(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xde5(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1498 <main+0x308>
jmp    1269 <main+0xd9>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1208 <main+0x78>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    12a9 <main+0x119>
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <strtolower@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    127e <main+0xee>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1498 <main+0x308>
lea    0xda5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xdc7(%rip),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
call   10a0 <scanf@plt>
cmp    $0x2,%eax
je     12f3 <main+0x163>
movl   $0x0,-0x4(%rbp)
jmp    1498 <main+0x308>
mov    -0x38(%rbp),%rdi
call   1050 <strtolower@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x38(%rbp),%rdx
call   1090 <inarray@plt>
cmp    $0xffffffff,%eax
jne    1345 <main+0x1b5>
mov    0x2cc4(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
lea    0xd76(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
movl   $0x3,-0x4(%rbp)
jmp    1498 <main+0x308>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    -0x20(%rbp),%rsi
call   10b0 <delete@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    13b0 <main+0x220>
mov    -0x28(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x38(%rbp),%rsi
call   1080 <hamming@plt>
cmp    -0x3c(%rbp),%eax
je     139d <main+0x20d>
mov    -0x28(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    -0x20(%rbp),%rsi
call   10b0 <delete@plt>
jmp    13a2 <main+0x212>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    135c <main+0x1cc>
mov    -0x20(%rbp),%eax
mov    %eax,-0x40(%rbp)
test   %eax,%eax
je     13d4 <main+0x244>
jmp    13c3 <main+0x233>
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
je     1400 <main+0x270>
jmp    142a <main+0x29a>
mov    0x2c05(%rip),%rax
mov    (%rax),%edi
lea    0xce8(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
movl   $0x4,-0x4(%rbp)
jmp    1498 <main+0x308>
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
lea    0xcd6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
jmp    1498 <main+0x308>
lea    0xcc8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1473 <main+0x2e3>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xcaf(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    143f <main+0x2af>
lea    0xbec(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12b0 <main+0x120>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r13
lea    -0x1(%rdi),%r15d
mov    %r15d,0xc(%rsp)
cmp    $0x2,%edi
jg     11e7 <main+0x47>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
mov    0x0(%r13),%rcx
lea    0xe2d(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%ebx
jmp    13da <main+0x23a>
mov    %rdi,0x20(%rsp)
lea    0x8(%r13),%r14
mov    0x8(%r13),%rdi
call   1050 <strlen@plt>
mov    %eax,%ebp
mov    %r15d,%r15d
lea    -0x1(%r15),%r12
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x10(%r13,%rbx,8),%rdi
call   1050 <strlen@plt>
cmp    %ebp,%eax
jne    13b1 <main+0x211>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1210 <main+0x70>
mov    0x20(%rsp),%rbp
cmp    $0x1,%ebp
jle    13d8 <main+0x238>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1060 <strtolower@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1240 <main+0xa0>
xor    %ebx,%ebx
cmp    $0x2,%ebp
jl     13da <main+0x23a>
lea    0xc(%rsp),%rbx
lea    0xea4(%rip),%rbp
xor    %r12d,%r12d
jmp    1296 <main+0xf6>
xchg   %ax,%ax
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
add    $0x1,%r12d
cmp    0xc(%rsp),%r12d
mov    %r15,%rbx
jge    13d8 <main+0x238>
lea    0xdcb(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xded(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x1c(%rsp),%rdx
call   10b0 <scanf@plt>
cmp    $0x2,%eax
jne    13d8 <main+0x238>
mov    0x10(%rsp),%rdi
call   1060 <strtolower@plt>
mov    0xc(%rsp),%esi
mov    0x10(%rsp),%rdx
mov    %r14,%rdi
call   10a0 <inarray@plt>
cmp    $0xffffffff,%eax
je     13eb <main+0x24b>
mov    0x10(%rsp),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   10c0 <delete@plt>
mov    0xc(%rsp),%r15d
test   %r15d,%r15d
jle    1355 <main+0x1b5>
add    $0x1,%r15
jmp    131a <main+0x17a>
nopw   0x0(%rax,%rax,1)
add    $0xffffffffffffffff,%r15
cmp    $0x1,%r15
jle    1350 <main+0x1b0>
mov    0x0(%r13,%r15,8),%rdi
mov    0x10(%rsp),%rsi
call   1090 <hamming@plt>
cmp    0x1c(%rsp),%eax
je     1310 <main+0x170>
mov    0x0(%r13,%r15,8),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   10c0 <delete@plt>
jmp    1310 <main+0x170>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0xc(%rsp),%r15d
cmp    $0x1,%r15d
je     1418 <main+0x278>
test   %r15d,%r15d
je     1437 <main+0x297>
mov    %rbx,%r15
lea    0xd87(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1270 <main+0xd0>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jl     1390 <main+0x1f0>
jmp    1270 <main+0xd0>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r13),%rdx
mov    0x10(%r13,%rbx,8),%rcx
lea    0xc6c(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x2,%ebx
jmp    13da <main+0x23a>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2bee(%rip),%rax
mov    (%rax),%edi
mov    0x10(%rsp),%rdx
lea    0xc9f(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    $0x3,%ebx
jmp    13da <main+0x23a>
mov    (%r14),%rsi
lea    0xcc2(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
jmp    13da <main+0x23a>
mov    0x2ba2(%rip),%rax
mov    (%rax),%edi
lea    0xc85(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    $0x4,%ebx
jmp    13da <main+0x23a>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [54 x i8] c"Too few arguments: %i\0AUSAGE: %s PASSWORD PASSWORD...\0A\00"
@.str.1 = [50 x i8] c"Passwords are of different length: '%s' and '%s'\0A\00"
@.str.2 = [48 x i8] c"Enter password and number of correct letters\0A> \00"
@.str.3 = [7 x i8] c"%ms %i\00"
@.str.4 = [45 x i8] c"%s is not in the list of possible passwords\0A\00"
@.str.5 = [24 x i8] c"No more passwords left\0A\00"
@.str.6 = [21 x i8] c"The password is: %s\0A\00"
@.str.7 = [20 x i8] c"Possible passwords:\00"
@.str.8 = [4 x i8] c" %s\00"
@.str.9 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8**
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %9
%16 = load i32, i32* %9
%17 = icmp slt i32 %16, 2
br i1 %17, label %18, label %25
18: ; preds = %2
%19 = load i32, i32* @stderr
%20 = load i32, i32* %9
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 0
%23 = load i8*, i8** %22
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %20, i8* %23)
store i32 1, i32* %3
br label %167
25: ; preds = %2
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
store i8** %27, i8*** %10
%28 = load i8**, i8*** %10
%29 = getelementptr inbounds i8*, i8** %28, i64 0
%30 = load i8*, i8** %29
%31 = call i32 @strlen(i8* %30)
store i32 %31, i32* %11
store i32 1, i32* %6
br label %32
32: ; preds = %57, %25
%33 = load i32, i32* %6
%34 = load i32, i32* %9
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %60
36: ; preds = %32
%37 = load i8**, i8*** %10
%38 = load i32, i32* %6
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i8*, i8** %37, i64 %39
%41 = load i8*, i8** %40
%42 = call i32 @strlen(i8* %41)
%43 = load i32, i32* %11
%44 = icmp ne i32 %42, %43
br i1 %44, label %45, label %56
45: ; preds = %36
%46 = load i32, i32* @stderr
%47 = load i8**, i8*** %10
%48 = getelementptr inbounds i8*, i8** %47, i64 0
%49 = load i8*, i8** %48
%50 = load i8**, i8*** %10
%51 = load i32, i32* %6
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8*, i8** %50, i64 %52
%54 = load i8*, i8** %53
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8* %49, i8* %54)
store i32 2, i32* %3
br label %167
56: ; preds = %36
br label %57
57: ; preds = %56
%58 = load i32, i32* %6
%59 = add nsw i32 %58, 1
store i32 %59, i32* %6
br label %32
60: ; preds = %32
store i32 0, i32* %6
br label %61
61: ; preds = %72, %60
%62 = load i32, i32* %6
%63 = load i32, i32* %9
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %75
65: ; preds = %61
%66 = load i8**, i8*** %10
%67 = load i32, i32* %6
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8*, i8** %66, i64 %68
%70 = load i8*, i8** %69
%71 = call i32 @strtolower(i8* %70)
br label %72
72: ; preds = %65
%73 = load i32, i32* %6
%74 = add nsw i32 %73, 1
store i32 %74, i32* %6
br label %61
75: ; preds = %61
store i32 0, i32* %6
br label %76
76: ; preds = %164, %75
%77 = load i32, i32* %6
%78 = load i32, i32* %9
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %167
80: ; preds = %76
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%82 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %12, i32* %13)
%83 = icmp ne i32 %82, 2
br i1 %83, label %84, label %85
84: ; preds = %80
store i32 0, i32* %3
br label %167
85: ; preds = %80
%86 = load i8*, i8** %12
%87 = call i32 @strtolower(i8* %86)
%88 = load i8**, i8*** %10
%89 = load i32, i32* %9
%90 = load i8*, i8** %12
%91 = call i32 @inarray(i8** %88, i32 %89, i8* %90)
%92 = icmp eq i32 %91, -1
br i1 %92, label %93, label %99
93: ; preds = %85
%94 = load i32, i32* @stderr
%95 = load i8*, i8** %12
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i8* %95)
%97 = load i8*, i8** %12
%98 = call i32 @free(i8* %97)
store i32 3, i32* %3
br label %167
99: ; preds = %85
%100 = load i8**, i8*** %10
%101 = load i8*, i8** %12
%102 = call i32 @delete(i8** %100, i32* %9, i8* %101)
%103 = load i32, i32* %9
store i32 %103, i32* %7
br label %104
104: ; preds = %126, %99
%105 = load i32, i32* %7
%106 = icmp sgt i32 %105, 0
br i1 %106, label %107, label %129
107: ; preds = %104
%108 = load i8**, i8*** %10
%109 = load i32, i32* %7
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i8*, i8** %108, i64 %110
%112 = load i8*, i8** %111
%113 = load i8*, i8** %12
%114 = call i32 @hamming(i8* %112, i8* %113)
%115 = load i32, i32* %13
%116 = icmp ne i32 %114, %115
br i1 %116, label %117, label %125
117: ; preds = %107
%118 = load i8**, i8*** %10
%119 = load i8**, i8*** %10
%120 = load i32, i32* %7
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds i8*, i8** %119, i64 %121
%123 = load i8*, i8** %122
%124 = call i32 @delete(i8** %118, i32* %9, i8* %123)
br label %125
125: ; preds = %117, %107
br label %126
126: ; preds = %125
%127 = load i32, i32* %7
%128 = add nsw i32 %127, -1
store i32 %128, i32* %7
br label %104
129: ; preds = %104
%130 = load i32, i32* %9
switch i32 %130, label %143 [
i32 0, label %131
i32 1, label %136
]
131: ; preds = %129
%132 = load i32, i32* @stderr
%133 = call i32 (i32, i8*, ...) @fprintf(i32 %132, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%134 = load i8*, i8** %12
%135 = call i32 @free(i8* %134)
store i32 4, i32* %3
br label %167
136: ; preds = %129
%137 = load i8**, i8*** %10
%138 = getelementptr inbounds i8*, i8** %137, i64 0
%139 = load i8*, i8** %138
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* %139)
%141 = load i8*, i8** %12
%142 = call i32 @free(i8* %141)
store i32 0, i32* %3
br label %167
143: ; preds = %129
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %8
br label %145
145: ; preds = %156, %143
%146 = load i32, i32* %8
%147 = load i32, i32* %9
%148 = icmp slt i32 %146, %147
br i1 %148, label %149, label %159
149: ; preds = %145
%150 = load i8**, i8*** %10
%151 = load i32, i32* %8
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds i8*, i8** %150, i64 %152
%154 = load i8*, i8** %153
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %154)
br label %156
156: ; preds = %149
%157 = load i32, i32* %8
%158 = add nsw i32 %157, 1
store i32 %158, i32* %8
br label %145
159: ; preds = %145
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %161
161: ; preds = %159
%162 = load i8*, i8** %12
%163 = call i32 @free(i8* %162)
br label %164
164: ; preds = %161
%165 = load i32, i32* %6
%166 = add nsw i32 %165, 1
store i32 %166, i32* %6
br label %76
167: ; preds = %18, %45, %84, %93, %131, %136, %76
%168 = load i32, i32* %3
ret i32 %168
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [54 x i8] c"Too few arguments: %i\0AUSAGE: %s PASSWORD PASSWORD...\0A\00"
@.str.1 = [50 x i8] c"Passwords are of different length: '%s' and '%s'\0A\00"
@.str.2 = [48 x i8] c"Enter password and number of correct letters\0A> \00"
@.str.3 = [7 x i8] c"%ms %i\00"
@.str.4 = [45 x i8] c"%s is not in the list of possible passwords\0A\00"
@.str.5 = [24 x i8] c"No more passwords left\0A\00"
@.str.6 = [21 x i8] c"The password is: %s\0A\00"
@.str.7 = [20 x i8] c"Possible passwords:\00"
@.str.8 = [4 x i8] c" %s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = add nsw i32 %0, -1
store i32 %7, i32* %3
%8 = icmp slt i32 %0, 3
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %1
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %11)
br label %128
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = tail call i32 @strlen(i8* %15)
%17 = zext i32 %7 to i64
br label %25
18: ; preds = %38
%19 = icmp sgt i32 %0, 1
br i1 %19, label %23, label %20
20: ; preds = %18
%21 = bitcast i8** %4 to i8*
%22 = bitcast i32* %5 to i8*
br label %124
23: ; preds = %18
%24 = zext i32 %7 to i64
br label %41
25: ; preds = %13, %38
%26 = phi i64 [ 1, %13 ], [ %39, %38 ]
%27 = getelementptr inbounds i8*, i8** %14, i64 %26
%28 = load i8*, i8** %27
%29 = tail call i32 @strlen(i8* %28)
%30 = icmp eq i32 %29, %16
br i1 %30, label %38, label %31
31: ; preds = %25
%32 = and i64 %26, 4294967295
%33 = getelementptr inbounds i8*, i8** %14, i64 %32
%34 = load i32, i32* @stderr
%35 = load i8*, i8** %14
%36 = load i8*, i8** %33
%37 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8* %35, i8* %36)
br label %128
38: ; preds = %25
%39 = add nuw nsw i64 %26, 1
%40 = icmp eq i64 %39, %17
br i1 %40, label %18, label %25
41: ; preds = %23, %41
%42 = phi i64 [ 0, %23 ], [ %46, %41 ]
%43 = getelementptr inbounds i8*, i8** %14, i64 %42
%44 = load i8*, i8** %43
%45 = tail call i32 @strtolower(i8* %44)
%46 = add nuw nsw i64 %42, 1
%47 = icmp eq i64 %46, %24
br i1 %47, label %48, label %41
48: ; preds = %41
%49 = bitcast i8** %4 to i8*
%50 = bitcast i32* %5 to i8*
br i1 %19, label %51, label %124
51: ; preds = %48, %117
%52 = phi i32 [ %121, %117 ], [ 0, %48 ]
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%54 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %4, i32* %5)
%55 = icmp eq i32 %54, 2
br i1 %55, label %56, label %124
56: ; preds = %51
%57 = load i8*, i8** %4
%58 = call i32 @strtolower(i8* %57)
%59 = load i32, i32* %3
%60 = load i8*, i8** %4
%61 = call i32 @inarray(i8** %14, i32 %59, i8* %60)
%62 = icmp eq i32 %61, -1
br i1 %62, label %63, label %69
63: ; preds = %56
%64 = load i32, i32* @stderr
%65 = load i8*, i8** %4
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i8* %65)
%67 = load i8*, i8** %4
%68 = call i32 @free(i8* %67)
br label %124
69: ; preds = %56
%70 = load i8*, i8** %4
%71 = call i32 @delete(i8** %14, i32* %3, i8* %70)
%72 = load i32, i32* %3
%73 = icmp sgt i32 %72, 0
br i1 %73, label %74, label %92
74: ; preds = %69
%75 = zext i32 %72 to i64
br label %76
76: ; preds = %74, %87
%77 = phi i64 [ %75, %74 ], [ %88, %87 ]
%78 = getelementptr inbounds i8*, i8** %14, i64 %77
%79 = load i8*, i8** %78
%80 = load i8*, i8** %4
%81 = call i32 @hamming(i8* %79, i8* %80)
%82 = load i32, i32* %5
%83 = icmp eq i32 %81, %82
br i1 %83, label %87, label %84
84: ; preds = %76
%85 = load i8*, i8** %78
%86 = call i32 @delete(i8** %14, i32* %3, i8* %85)
br label %87
87: ; preds = %76, %84
%88 = add nsw i64 %77, -1
%89 = icmp sgt i64 %77, 1
br i1 %89, label %76, label %90
90: ; preds = %87
%91 = load i32, i32* %3
br label %92
92: ; preds = %90, %69
%93 = phi i32 [ %91, %90 ], [ %72, %69 ]
switch i32 %93, label %104 [
i32 0, label %94
i32 1, label %99
]
94: ; preds = %92
%95 = load i32, i32* @stderr
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %95, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%97 = load i8*, i8** %4
%98 = call i32 @free(i8* %97)
br label %124
99: ; preds = %92
%100 = load i8*, i8** %14
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* %100)
%102 = load i8*, i8** %4
%103 = call i32 @free(i8* %102)
br label %124
104: ; preds = %92
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
%106 = load i32, i32* %3
%107 = icmp sgt i32 %106, 0
br i1 %107, label %108, label %117
108: ; preds = %104, %108
%109 = phi i64 [ %113, %108 ], [ 0, %104 ]
%110 = getelementptr inbounds i8*, i8** %14, i64 %109
%111 = load i8*, i8** %110
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %111)
%113 = add nuw nsw i64 %109, 1
%114 = load i32, i32* %3
%115 = sext i32 %114 to i64
%116 = icmp slt i64 %113, %115
br i1 %116, label %108, label %117
117: ; preds = %108, %104
%118 = call i32 @putchar(i32 10)
%119 = load i8*, i8** %4
%120 = call i32 @free(i8* %119)
%121 = add nuw nsw i32 %52, 1
%122 = load i32, i32* %3
%123 = icmp slt i32 %121, %122
br i1 %123, label %51, label %124
124: ; preds = %51, %117, %20, %48, %99, %94, %63
%125 = phi i32 [ 3, %63 ], [ 0, %99 ], [ 4, %94 ], [ 0, %48 ], [ 0, %20 ], [ 0, %117 ], [ 0, %51 ]
%126 = bitcast i8** %4 to i8*
%127 = bitcast i32* %5 to i8*
br label %128
128: ; preds = %31, %124, %9
%129 = phi i32 [ 1, %9 ], [ 2, %31 ], [ %125, %124 ]
ret i32 %129
}