#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 */
typedef char uint8_t;

/* Variables and functions */
int /*<<< orphan*/ cleanup(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
scalar_t__ mpw_core_calculate_master_key(char const *const, char *, size_t,
                                         char *, char *const, size_t const);
scalar_t__ mpw_core_calculate_master_key_salt(char const *const, char *,
                                              size_t *);
scalar_t__ mpw_core_calculate_site_seed(char *, size_t *, char const *const,
                                        char const *const, int const,
                                        char const *const);
int /*<<< orphan*/ mpw_core_compute_hmac(char *, char *, size_t, char *);
scalar_t__ mpw_core_convert_to_password(char const *const, char *, size_t const,
                                        char *const);
int /*<<< orphan*/ sprintf(char *const, char *, ...);
int /*<<< orphan*/ stderr;
int strlen(char const *const);
int mpw_core(char const *const mpNameSpace, char *const password,
             const size_t passLen, char const *const userName,
             char const *const masterPassword, char const *const siteTypeString,
             char const *const siteName, const int siteCounter,
             char const *const siteContext, char *const keyID,
             const size_t keyIDLen) {
  if (strlen(userName) >= 1024 || strlen(masterPassword) >= 1024 ||
      strlen(siteTypeString) >= 1024 || strlen(siteName) >= 1024) {
    sprintf(password,
            "At least one input string was longer than the cap of %d\n", 1024);
    return -1;
  }
  char masterKeySalt[2 * 1024];
  memset(masterKeySalt, 0, 2 * 1024);
  size_t masterKeySaltLength = 0;
  uint8_t masterKey[64];
  memset(masterKey, 0, 64);
  uint8_t sitePasswordInfo[2 * 1024];
  memset(sitePasswordInfo, 0, 2 * 1024);
  size_t sitePasswordInfoLength = 0;
  uint8_t sitePasswordSeed[32];
  memset(masterKey, 0, 32);
  if (0 != mpw_core_calculate_master_key_salt(userName, masterKeySalt,
                                              &masterKeySaltLength)) {
    cleanup(masterKey, sitePasswordSeed);
    sprintf(password, "Error preparing the salt");
    return -1;
  }
  if (0 != mpw_core_calculate_master_key(masterPassword, masterKeySalt,
                                         masterKeySaltLength, masterKey, keyID,
                                         keyIDLen)) {
    cleanup(masterKey, sitePasswordSeed);
    sprintf(password, "Error preparing the salt");
    return -1;
  }
  if (0 != mpw_core_calculate_site_seed(sitePasswordInfo,
                                        &sitePasswordInfoLength, mpNameSpace,
                                        siteName, siteCounter, siteContext)) {
    cleanup(masterKey, sitePasswordSeed);
    fprintf(stderr, "Coding error when building the sitePasswordInfo seed.\n");
  }
  mpw_core_compute_hmac(masterKey, sitePasswordInfo, sitePasswordInfoLength,
                        sitePasswordSeed);
  if (0 != mpw_core_convert_to_password(siteTypeString, sitePasswordSeed,
                                        passLen, password)) {
    cleanup(masterKey, sitePasswordSeed);
    return -1;
  }
  cleanup(masterKey, sitePasswordSeed);
  return 0;
}


x86 assembly (clang, -O0):
<mpw_core>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10c0,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x400,%eax
jge    1226 <mpw_core+0x86>
mov    -0x30(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x400,%eax
jge    1226 <mpw_core+0x86>
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x400,%eax
jge    1226 <mpw_core+0x86>
mov    0x10(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x400,%eax
jl     1249 <mpw_core+0xa9>
mov    -0x18(%rbp),%rdi
lea    0xdcf(%rip),%rsi
mov    $0x400,%edx
mov    $0x0,%al
call   10c0 <sprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    143f <mpw_core+0x29f>
lea    -0x840(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1060 <memset@plt>
movq   $0x0,-0x848(%rbp)
lea    -0x890(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
lea    -0x1090(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1060 <memset@plt>
movq   $0x0,-0x1098(%rbp)
lea    -0x890(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
mov    -0x28(%rbp),%rdi
lea    -0x840(%rbp),%rsi
lea    -0x848(%rbp),%rdx
call   1040 <mpw_core_calculate_master_key_salt@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1301 <mpw_core+0x161>
lea    -0x890(%rbp),%rdi
lea    -0x10c0(%rbp),%rsi
call   10a0 <cleanup@plt>
mov    -0x18(%rbp),%rdi
lea    0xd4b(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    143f <mpw_core+0x29f>
mov    -0x30(%rbp),%rdi
lea    -0x840(%rbp),%rsi
mov    -0x848(%rbp),%rdx
lea    -0x890(%rbp),%rcx
mov    0x28(%rbp),%r8
mov    0x30(%rbp),%r9
call   1070 <mpw_core_calculate_master_key@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1366 <mpw_core+0x1c6>
lea    -0x890(%rbp),%rdi
lea    -0x10c0(%rbp),%rsi
call   10a0 <cleanup@plt>
mov    -0x18(%rbp),%rdi
lea    0xce6(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    143f <mpw_core+0x29f>
lea    -0x1090(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8d
mov    0x20(%rbp),%r9
lea    -0x1098(%rbp),%rsi
call   10b0 <mpw_core_calculate_site_seed@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     13bf <mpw_core+0x21f>
lea    -0x890(%rbp),%rdi
lea    -0x10c0(%rbp),%rsi
call   10a0 <cleanup@plt>
mov    0x2c2f(%rip),%rax
mov    (%rax),%edi
lea    0xc98(%rip),%rsi
call   1080 <fprintf@plt>
lea    -0x890(%rbp),%rdi
lea    -0x1090(%rbp),%rsi
mov    -0x1098(%rbp),%rdx
lea    -0x10c0(%rbp),%rcx
call   1030 <mpw_core_compute_hmac@plt>
mov    -0x38(%rbp),%rdi
lea    -0x10c0(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1090 <mpw_core_convert_to_password@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1425 <mpw_core+0x285>
lea    -0x890(%rbp),%rdi
lea    -0x10c0(%rbp),%rsi
call   10a0 <cleanup@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    143f <mpw_core+0x29f>
lea    -0x890(%rbp),%rdi
lea    -0x10c0(%rbp),%rsi
call   10a0 <cleanup@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpw_core>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1078,%rsp
mov    %r9,%r14
mov    %r8,%rbx
mov    %rcx,%rbp
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%r12
mov    %rcx,%rdi
call   1050 <strlen@plt>
cmp    $0x3ff,%eax
jg     1204 <mpw_core+0x64>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cmp    $0x3ff,%eax
jg     1204 <mpw_core+0x64>
mov    %r14,%rdi
call   1050 <strlen@plt>
cmp    $0x3ff,%eax
jg     1204 <mpw_core+0x64>
mov    0x10b0(%rsp),%rdi
call   1050 <strlen@plt>
cmp    $0x400,%eax
jl     1231 <mpw_core+0x91>
lea    0xdf5(%rip),%rsi
mov    %r13,%rdi
mov    $0x400,%edx
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    $0xffffffff,%eax
add    $0x1078,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x870(%rsp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1060 <memset@plt>
movq   $0x0,0x8(%rsp)
lea    0x30(%rsp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
lea    0x70(%rsp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1060 <memset@plt>
movq   $0x0,(%rsp)
lea    0x30(%rsp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
lea    0x8(%rsp),%rdx
mov    %rbp,%rdi
lea    0x870(%rsp),%rsi
call   1040 <mpw_core_calculate_master_key_salt@plt>
test   %rax,%rax
jne    12d2 <mpw_core+0x132>
mov    0x10d0(%rsp),%r9
mov    0x10c8(%rsp),%r8
mov    0x8(%rsp),%rdx
lea    0x870(%rsp),%rsi
lea    0x30(%rsp),%rcx
mov    %rbx,%rdi
call   1070 <mpw_core_calculate_master_key@plt>
test   %rax,%rax
je     12fe <mpw_core+0x15e>
lea    0x30(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   10a0 <cleanup@plt>
movups 0xd51(%rip),%xmm0
movups %xmm0,0x0(%r13)
movups 0xd4e(%rip),%xmm0
movups %xmm0,0x9(%r13)
jmp    121a <mpw_core+0x7a>
mov    0x10c0(%rsp),%r9
mov    0x10b8(%rsp),%r8d
lea    0x70(%rsp),%rdi
mov    %rsp,%rsi
mov    %r12,%rdx
mov    0x10b0(%rsp),%rcx
call   10b0 <mpw_core_calculate_site_seed@plt>
test   %rax,%rax
je     134f <mpw_core+0x1af>
lea    0x30(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   10a0 <cleanup@plt>
mov    0x2c9f(%rip),%rax
mov    (%rax),%edi
lea    0xd08(%rip),%rsi
call   1080 <fprintf@plt>
mov    (%rsp),%rdx
lea    0x30(%rsp),%r12
lea    0x70(%rsp),%rsi
lea    0x10(%rsp),%rbp
mov    %r12,%rdi
mov    %rbp,%rcx
call   1030 <mpw_core_compute_hmac@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r13,%rcx
call   1090 <mpw_core_convert_to_password@plt>
mov    %rax,%rbx
mov    %r12,%rdi
mov    %rbp,%rsi
call   10a0 <cleanup@plt>
neg    %rbx
sbb    %eax,%eax
jmp    121f <mpw_core+0x7f>

LLVM IR (-O0):
@.str = [57 x i8] c"At least one input string was longer than the cap of %d\0A\00"
@.str.1 = [25 x i8] c"Error preparing the salt\00"
@stderr = global i32 0
@.str.2 = [55 x i8] c"Coding error when building the sitePasswordInfo seed.\0A\00"
define i32 @mpw_core(i8* %0, i8* %1, i64 %2, i8* %3, i8* %4, i8* %5, i8* %6, i32 %7, i8* %8, i8* %9, i64 %10) {
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i32
%21 = alloca i8*
%22 = alloca i8*
%23 = alloca i64
%24 = alloca [2048 x i8]
%25 = alloca i64
%26 = alloca [64 x i8]
%27 = alloca [2048 x i8]
%28 = alloca i64
%29 = alloca [32 x i8]
store i8* %0, i8** %13
store i8* %1, i8** %14
store i64 %2, i64* %15
store i8* %3, i8** %16
store i8* %4, i8** %17
store i8* %5, i8** %18
store i8* %6, i8** %19
store i32 %7, i32* %20
store i8* %8, i8** %21
store i8* %9, i8** %22
store i64 %10, i64* %23
%30 = load i8*, i8** %16
%31 = call i32 @strlen(i8* %30)
%32 = icmp sge i32 %31, 1024
br i1 %32, label %45, label %33
33: ; preds = %11
%34 = load i8*, i8** %17
%35 = call i32 @strlen(i8* %34)
%36 = icmp sge i32 %35, 1024
br i1 %36, label %45, label %37
37: ; preds = %33
%38 = load i8*, i8** %18
%39 = call i32 @strlen(i8* %38)
%40 = icmp sge i32 %39, 1024
br i1 %40, label %45, label %41
41: ; preds = %37
%42 = load i8*, i8** %19
%43 = call i32 @strlen(i8* %42)
%44 = icmp sge i32 %43, 1024
br i1 %44, label %45, label %48
45: ; preds = %41, %37, %33, %11
%46 = load i8*, i8** %14
%47 = call i32 (i8*, i8*, ...) @sprintf(i8* %46, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 1024)
store i32 -1, i32* %12
br label %116
48: ; preds = %41
%49 = getelementptr inbounds [2048 x i8], [2048 x i8]* %24, i64 0, i64 0
%50 = call i32 @memset(i8* %49, i32 0, i32 2048)
store i64 0, i64* %25
%51 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%52 = call i32 @memset(i8* %51, i32 0, i32 64)
%53 = getelementptr inbounds [2048 x i8], [2048 x i8]* %27, i64 0, i64 0
%54 = call i32 @memset(i8* %53, i32 0, i32 2048)
store i64 0, i64* %28
%55 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%56 = call i32 @memset(i8* %55, i32 0, i32 32)
%57 = load i8*, i8** %16
%58 = getelementptr inbounds [2048 x i8], [2048 x i8]* %24, i64 0, i64 0
%59 = call i64 @mpw_core_calculate_master_key_salt(i8* %57, i8* %58, i64* %25)
%60 = icmp ne i64 0, %59
br i1 %60, label %61, label %67
61: ; preds = %48
%62 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%63 = getelementptr inbounds [32 x i8], [32 x i8]* %29, i64 0, i64 0
%64 = call i32 @cleanup(i8* %62, i8* %63)
%65 = load i8*, i8** %14
%66 = call i32 (i8*, i8*, ...) @sprintf(i8* %65, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %12
br label %116
67: ; preds = %48
%68 = load i8*, i8** %17
%69 = getelementptr inbounds [2048 x i8], [2048 x i8]* %24, i64 0, i64 0
%70 = load i64, i64* %25
%71 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%72 = load i8*, i8** %22
%73 = load i64, i64* %23
%74 = call i64 @mpw_core_calculate_master_key(i8* %68, i8* %69, i64 %70, i8* %71, i8* %72, i64 %73)
%75 = icmp ne i64 0, %74
br i1 %75, label %76, label %82
76: ; preds = %67
%77 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%78 = getelementptr inbounds [32 x i8], [32 x i8]* %29, i64 0, i64 0
%79 = call i32 @cleanup(i8* %77, i8* %78)
%80 = load i8*, i8** %14
%81 = call i32 (i8*, i8*, ...) @sprintf(i8* %80, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %12
br label %116
82: ; preds = %67
%83 = getelementptr inbounds [2048 x i8], [2048 x i8]* %27, i64 0, i64 0
%84 = load i8*, i8** %13
%85 = load i8*, i8** %19
%86 = load i32, i32* %20
%87 = load i8*, i8** %21
%88 = call i64 @mpw_core_calculate_site_seed(i8* %83, i64* %28, i8* %84, i8* %85, i32 %86, i8* %87)
%89 = icmp ne i64 0, %88
br i1 %89, label %90, label %96
90: ; preds = %82
%91 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%92 = getelementptr inbounds [32 x i8], [32 x i8]* %29, i64 0, i64 0
%93 = call i32 @cleanup(i8* %91, i8* %92)
%94 = load i32, i32* @stderr
%95 = call i32 @fprintf(i32 %94, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
br label %96
96: ; preds = %90, %82
%97 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%98 = getelementptr inbounds [2048 x i8], [2048 x i8]* %27, i64 0, i64 0
%99 = load i64, i64* %28
%100 = getelementptr inbounds [32 x i8], [32 x i8]* %29, i64 0, i64 0
%101 = call i32 @mpw_core_compute_hmac(i8* %97, i8* %98, i64 %99, i8* %100)
%102 = load i8*, i8** %18
%103 = getelementptr inbounds [32 x i8], [32 x i8]* %29, i64 0, i64 0
%104 = load i64, i64* %15
%105 = load i8*, i8** %14
%106 = call i64 @mpw_core_convert_to_password(i8* %102, i8* %103, i64 %104, i8* %105)
%107 = icmp ne i64 0, %106
br i1 %107, label %108, label %112
108: ; preds = %96
%109 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%110 = getelementptr inbounds [32 x i8], [32 x i8]* %29, i64 0, i64 0
%111 = call i32 @cleanup(i8* %109, i8* %110)
store i32 -1, i32* %12
br label %116
112: ; preds = %96
%113 = getelementptr inbounds [64 x i8], [64 x i8]* %26, i64 0, i64 0
%114 = getelementptr inbounds [32 x i8], [32 x i8]* %29, i64 0, i64 0
%115 = call i32 @cleanup(i8* %113, i8* %114)
store i32 0, i32* %12
br label %116
116: ; preds = %112, %108, %76, %61, %45
%117 = load i32, i32* %12
ret i32 %117
}

LLVM IR (-O2):
@.str = [57 x i8] c"At least one input string was longer than the cap of %d\0A\00"
@.str.1 = [25 x i8] c"Error preparing the salt\00"
@stderr = global i32 0
@.str.2 = [55 x i8] c"Coding error when building the sitePasswordInfo seed.\0A\00"
define i32 @mpw_core(i8* %0, i8* %1, i64 %2, i8* %3, i8* %4, i8* %5, i8* %6, i32 %7, i8* %8, i8* %9, i64 %10) {
%12 = alloca [2048 x i8]
%13 = alloca i64
%14 = alloca [64 x i8]
%15 = alloca [2048 x i8]
%16 = alloca i64
%17 = alloca [32 x i8]
%18 = tail call i32 @strlen(i8* %3)
%19 = icmp sgt i32 %18, 1023
br i1 %19, label %29, label %20
20: ; preds = %11
%21 = tail call i32 @strlen(i8* %4)
%22 = icmp sgt i32 %21, 1023
br i1 %22, label %29, label %23
23: ; preds = %20
%24 = tail call i32 @strlen(i8* %5)
%25 = icmp sgt i32 %24, 1023
br i1 %25, label %29, label %26
26: ; preds = %23
%27 = tail call i32 @strlen(i8* %6)
%28 = icmp sgt i32 %27, 1023
br i1 %28, label %29, label %31
29: ; preds = %26, %23, %20, %11
%30 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 1024)
br label %68
31: ; preds = %26
%32 = getelementptr inbounds [2048 x i8], [2048 x i8]* %12, i64 0, i64 0
%33 = call i32 @memset(i8* %32, i32 0, i32 2048)
%34 = bitcast i64* %13 to i8*
store i64 0, i64* %13
%35 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%36 = call i32 @memset(i8* %35, i32 0, i32 64)
%37 = getelementptr inbounds [2048 x i8], [2048 x i8]* %15, i64 0, i64 0
%38 = call i32 @memset(i8* %37, i32 0, i32 2048)
%39 = bitcast i64* %16 to i8*
store i64 0, i64* %16
%40 = getelementptr inbounds [32 x i8], [32 x i8]* %17, i64 0, i64 0
%41 = call i32 @memset(i8* %35, i32 0, i32 32)
%42 = call i64 @mpw_core_calculate_master_key_salt(i8* %3, i8* %32, i64* %13)
%43 = icmp eq i64 %42, 0
br i1 %43, label %46, label %44
44: ; preds = %31
%45 = call i32 @cleanup(i8* %35, i8* %40)
br label %66
46: ; preds = %31
%47 = load i64, i64* %13
%48 = call i64 @mpw_core_calculate_master_key(i8* %4, i8* %32, i64 %47, i8* %35, i8* %9, i64 %10)
%49 = icmp eq i64 %48, 0
br i1 %49, label %52, label %50
50: ; preds = %46
%51 = call i32 @cleanup(i8* %35, i8* %40)
br label %66
52: ; preds = %46
%53 = call i64 @mpw_core_calculate_site_seed(i8* %37, i64* %16, i8* %0, i8* %6, i32 %7, i8* %8)
%54 = icmp eq i64 %53, 0
br i1 %54, label %59, label %55
55: ; preds = %52
%56 = call i32 @cleanup(i8* %35, i8* %40)
%57 = load i32, i32* @stderr
%58 = call i32 @fprintf(i32 %57, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
br label %59
59: ; preds = %55, %52
%60 = load i64, i64* %16
%61 = call i32 @mpw_core_compute_hmac(i8* %35, i8* %37, i64 %60, i8* %40)
%62 = call i64 @mpw_core_convert_to_password(i8* %5, i8* %40, i64 %2, i8* %1)
%63 = icmp ne i64 %62, 0
%64 = call i32 @cleanup(i8* %35, i8* %40)
%65 = sext i1 %63 to i32
br label %66
66: ; preds = %59, %50, %44
%67 = phi i32 [ -1, %44 ], [ -1, %50 ], [ %65, %59 ]
br label %68
68: ; preds = %66, %29
%69 = phi i32 [ -1, %29 ], [ %67, %66 ]
ret i32 %69
}