#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 int /*<<< orphan*/ uint8_t;
typedef scalar_t__ uint64_t;
typedef int /*<<< orphan*/ hash;
typedef int /*<<< orphan*/ count;
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
scalar_t__ be64toh(int);
int /*<<< orphan*/ calculate_hmac_sha1(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                       int /*<<< orphan*/ *, int,
                                       int /*<<< orphan*/ *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ get_totp_sha1(int /*<<< orphan*/ *, int /*<<< orphan*/, int,
                                 char *, int);
int /*<<< orphan*/ get_totp_sha512(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   int, char *, int);
int /*<<< orphan*/ get_truncate(int /*<<< orphan*/ *, int, char *, int);
int run_valid_tests();
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int strcmp(char *, char *);
int /*<<< orphan*/ strlen(char *);
int run_totp_tests() {
  uint8_t hash[20];
  char buffer[9];
  uint64_t count = 0;
  int ret;
  calculate_hmac_sha1((uint8_t *)"12345678901234567890",
                      strlen("12345678901234567890"), (uint8_t *)&count,
                      sizeof(count), hash, 20);
  get_truncate(hash, sizeof(hash), buffer, sizeof(buffer));
  ret = strcmp(buffer + 2, "755224");
  if (ret != 0) {
    fprintf(stderr, "hotp null failed\n");
    return 0;
  }
  fprintf(stdout, "Hotp null test ok\n");
  count = be64toh(1);
  calculate_hmac_sha1((uint8_t *)"12345678901234567890",
                      strlen("12345678901234567890"), (uint8_t *)&count,
                      sizeof(count), hash, 20);
  get_truncate(hash, sizeof(hash), buffer, sizeof(buffer));
  ret = strcmp(buffer + 2, "287082");
  if (ret != 0) {
    fprintf(stderr, "hotp one failed\n");
    return 0;
  }
  fprintf(stdout, "Hotp one test ok\n");
  get_totp_sha1((uint8_t *)"12345678901234567890",
                strlen("12345678901234567890"), 1, buffer, sizeof(buffer));
  ret = strcmp(buffer, "94287082");
  if (ret != 0) {
    fprintf(stderr, "totp sha1 failed\n");
    return 0;
  }
  fprintf(stdout, "Totp sha1 test ok\n");
  get_totp_sha512(
      (uint8_t
           *)"1234567890123456789012345678901234567890123456789012345678901234",
      strlen(
          "1234567890123456789012345678901234567890123456789012345678901234"),
      1, buffer, sizeof(buffer));
  ret = strcmp(buffer, "90693936");
  if (ret != 0) {
    fprintf(stderr, "totp sha512 failed\n");
    return 0;
  }
  fprintf(stdout, "Totp sha512 test ok\n");
  return run_valid_tests();
}


x86 assembly (clang, -O0):
<run_totp_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movq   $0x0,-0x78(%rbp)
lea    0xe56(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
lea    -0x78(%rbp),%rdx
lea    -0x60(%rbp),%r8
lea    0xe40(%rip),%rdi
mov    $0x8,%ecx
mov    $0x14,%r9d
call   1090 <calculate_hmac_sha1@plt>
lea    -0x60(%rbp),%rdi
lea    -0x69(%rbp),%rdx
mov    $0x50,%esi
mov    $0x9,%ecx
call   1030 <get_truncate@plt>
lea    -0x69(%rbp),%rdi
add    $0x2,%rdi
lea    0xe1f(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,-0x7c(%rbp)
cmpl   $0x0,-0x7c(%rbp)
je     1229 <run_totp_tests+0x99>
mov    0x2dd1(%rip),%rax
mov    (%rax),%edi
lea    0xe04(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e9 <run_totp_tests+0x259>
mov    0x2da8(%rip),%rax
mov    (%rax),%edi
lea    0xdf5(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1070 <be64toh@plt>
mov    %rax,-0x78(%rbp)
lea    0xdad(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
lea    -0x78(%rbp),%rdx
lea    -0x60(%rbp),%r8
lea    0xd97(%rip),%rdi
mov    $0x8,%ecx
mov    $0x14,%r9d
call   1090 <calculate_hmac_sha1@plt>
lea    -0x60(%rbp),%rdi
lea    -0x69(%rbp),%rdx
mov    $0x50,%esi
mov    $0x9,%ecx
call   1030 <get_truncate@plt>
lea    -0x69(%rbp),%rdi
add    $0x2,%rdi
lea    0xdc7(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,-0x7c(%rbp)
cmpl   $0x0,-0x7c(%rbp)
je     12d2 <run_totp_tests+0x142>
mov    0x2d28(%rip),%rax
mov    (%rax),%edi
lea    0xd80(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e9 <run_totp_tests+0x259>
mov    0x2cff(%rip),%rax
mov    (%rax),%edi
lea    0xd70(%rip),%rsi
call   1060 <fprintf@plt>
lea    0xd12(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
lea    -0x69(%rbp),%rcx
lea    0xd00(%rip),%rdi
mov    $0x1,%edx
mov    $0x9,%r8d
call   1080 <get_totp_sha1@plt>
lea    -0x69(%rbp),%rdi
lea    0xd49(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,-0x7c(%rbp)
cmpl   $0x0,-0x7c(%rbp)
je     134e <run_totp_tests+0x1be>
mov    0x2cac(%rip),%rax
mov    (%rax),%edi
lea    0xd30(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e9 <run_totp_tests+0x259>
mov    0x2c83(%rip),%rax
mov    (%rax),%edi
lea    0xd21(%rip),%rsi
call   1060 <fprintf@plt>
lea    0xd28(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
lea    -0x69(%rbp),%rcx
lea    0xd16(%rip),%rdi
mov    $0x1,%edx
mov    $0x9,%r8d
call   10a0 <get_totp_sha512@plt>
lea    -0x69(%rbp),%rdi
lea    0xd3c(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,-0x7c(%rbp)
cmpl   $0x0,-0x7c(%rbp)
je     13ca <run_totp_tests+0x23a>
mov    0x2c30(%rip),%rax
mov    (%rax),%edi
lea    0xd23(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e9 <run_totp_tests+0x259>
mov    0x2c07(%rip),%rax
mov    (%rax),%edi
lea    0xd16(%rip),%rsi
call   1060 <fprintf@plt>
mov    $0x0,%al
call   10b0 <run_valid_tests@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_totp_tests>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
movq   $0x0,0x18(%rsp)
lea    0xe67(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x18(%rsp),%rdx
lea    0x20(%rsp),%r14
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x8,%ecx
mov    %r14,%r8
mov    $0x14,%r9d
call   1080 <calculate_hmac_sha1@plt>
lea    0xf(%rsp),%rdx
mov    %r14,%rdi
mov    $0x50,%esi
mov    $0x9,%ecx
call   1030 <get_truncate@plt>
mov    $0x32353537,%eax
xor    0x11(%rsp),%eax
mov    $0x343232,%ecx
xor    0x14(%rsp),%ecx
or     %eax,%ecx
je     1205 <run_totp_tests+0x85>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
lea    0xe1c(%rip),%rsi
jmp    1361 <run_totp_tests+0x1e1>
mov    0x2dcc(%rip),%r15
mov    (%r15),%edi
lea    0xe18(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <be64toh@plt>
mov    %rax,0x18(%rsp)
lea    0xdcf(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x18(%rsp),%rdx
lea    0x20(%rsp),%r14
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x8,%ecx
mov    %r14,%r8
mov    $0x14,%r9d
call   1080 <calculate_hmac_sha1@plt>
lea    0xf(%rsp),%rdx
mov    %r14,%rdi
mov    $0x50,%esi
mov    $0x9,%ecx
call   1030 <get_truncate@plt>
mov    $0x30373832,%eax
xor    0x11(%rsp),%eax
mov    $0x323830,%ecx
xor    0x14(%rsp),%ecx
or     %eax,%ecx
je     129d <run_totp_tests+0x11d>
mov    0x2d51(%rip),%rax
mov    (%rax),%edi
lea    0xda9(%rip),%rsi
jmp    1361 <run_totp_tests+0x1e1>
mov    (%r15),%edi
lea    0xdab(%rip),%rsi
call   1050 <fprintf@plt>
lea    0xd4d(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xf(%rsp),%rcx
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    $0x9,%r8d
call   1070 <get_totp_sha1@plt>
movabs $0x3238303738323439,%rax
30 38 32
xor    0xf(%rsp),%rax
movzbl 0x17(%rsp),%ecx
or     %rax,%rcx
je     1300 <run_totp_tests+0x180>
mov    0x2ceb(%rip),%rax
mov    (%rax),%edi
lea    0xd6f(%rip),%rsi
jmp    1361 <run_totp_tests+0x1e1>
mov    (%r15),%edi
lea    0xd75(%rip),%rsi
call   1050 <fprintf@plt>
lea    0xd7c(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xf(%rsp),%rcx
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    $0x9,%r8d
call   1090 <get_totp_sha512@plt>
movabs $0x3633393339363039,%rax
39 33 36
xor    0xf(%rsp),%rax
movzbl 0x17(%rsp),%ecx
or     %rax,%rcx
je     1372 <run_totp_tests+0x1f2>
mov    0x2c88(%rip),%rax
mov    (%rax),%edi
lea    0xd7b(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
mov    (%r15),%edi
lea    0xd74(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
call   10a0 <run_valid_tests@plt>
jmp    1368 <run_totp_tests+0x1e8>

LLVM IR (-O0):
@.str = [21 x i8] c"12345678901234567890\00"
@.str.1 = [7 x i8] c"755224\00"
@stderr = global i32 0
@.str.2 = [18 x i8] c"hotp null failed\0A\00"
@stdout = global i32 0
@.str.3 = [19 x i8] c"Hotp null test ok\0A\00"
@.str.4 = [7 x i8] c"287082\00"
@.str.5 = [17 x i8] c"hotp one failed\0A\00"
@.str.6 = [18 x i8] c"Hotp one test ok\0A\00"
@.str.7 = [9 x i8] c"94287082\00"
@.str.8 = [18 x i8] c"totp sha1 failed\0A\00"
@.str.9 = [19 x i8] c"Totp sha1 test ok\0A\00"
@.str.10 = [65 x i8] c"1234567890123456789012345678901234567890123456789012345678901234\00"
@.str.11 = [9 x i8] c"90693936\00"
@.str.12 = [20 x i8] c"totp sha512 failed\0A\00"
@.str.13 = [21 x i8] c"Totp sha512 test ok\0A\00"
define i32 @run_totp_tests() {
%1 = alloca i32
%2 = alloca [20 x i32]
%3 = alloca [9 x i8]
%4 = alloca i64
%5 = alloca i32
store i64 0, i64* %4
%6 = call i32 @strlen(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = bitcast i64* %4 to i32*
%8 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%9 = call i32 @calculate_hmac_sha1(i32* bitcast ([21 x i8]* @.str to i32*), i32 %6, i32* %7, i32 8, i32* %8, i32 20)
%10 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%11 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%12 = call i32 @get_truncate(i32* %10, i32 80, i8* %11, i32 9)
%13 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %0
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %70
21: ; preds = %0
%22 = load i32, i32* @stdout
%23 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%24 = call i64 @be64toh(i32 1)
store i64 %24, i64* %4
%25 = call i32 @strlen(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%26 = bitcast i64* %4 to i32*
%27 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%28 = call i32 @calculate_hmac_sha1(i32* bitcast ([21 x i8]* @.str to i32*), i32 %25, i32* %26, i32 8, i32* %27, i32 20)
%29 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%30 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%31 = call i32 @get_truncate(i32* %29, i32 80, i8* %30, i32 9)
%32 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%33 = getelementptr inbounds i8, i8* %32, i64 2
%34 = call i32 @strcmp(i8* %33, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
store i32 %34, i32* %5
%35 = load i32, i32* %5
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %21
%38 = load i32, i32* @stderr
%39 = call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %1
br label %70
40: ; preds = %21
%41 = load i32, i32* @stdout
%42 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%43 = call i32 @strlen(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%44 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%45 = call i32 @get_totp_sha1(i32* bitcast ([21 x i8]* @.str to i32*), i32 %43, i32 1, i8* %44, i32 9)
%46 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%47 = call i32 @strcmp(i8* %46, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
store i32 %47, i32* %5
%48 = load i32, i32* %5
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %53
50: ; preds = %40
%51 = load i32, i32* @stderr
%52 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %1
br label %70
53: ; preds = %40
%54 = load i32, i32* @stdout
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%56 = call i32 @strlen(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0))
%57 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%58 = call i32 @get_totp_sha512(i32* bitcast ([65 x i8]* @.str.10 to i32*), i32 %56, i32 1, i8* %57, i32 9)
%59 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%60 = call i32 @strcmp(i8* %59, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
store i32 %60, i32* %5
%61 = load i32, i32* %5
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %53
%64 = load i32, i32* @stderr
%65 = call i32 @fprintf(i32 %64, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
store i32 0, i32* %1
br label %70
66: ; preds = %53
%67 = load i32, i32* @stdout
%68 = call i32 @fprintf(i32 %67, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
%69 = call i32 (...) @run_valid_tests()
store i32 %69, i32* %1
br label %70
70: ; preds = %66, %63, %50, %37, %18
%71 = load i32, i32* %1
ret i32 %71
}

LLVM IR (-O2):
@.str = [21 x i8] c"12345678901234567890\00"
@.str.1 = [7 x i8] c"755224\00"
@stderr = global i32 0
@.str.2 = [18 x i8] c"hotp null failed\0A\00"
@stdout = global i32 0
@.str.3 = [19 x i8] c"Hotp null test ok\0A\00"
@.str.4 = [7 x i8] c"287082\00"
@.str.5 = [17 x i8] c"hotp one failed\0A\00"
@.str.6 = [18 x i8] c"Hotp one test ok\0A\00"
@.str.7 = [9 x i8] c"94287082\00"
@.str.8 = [18 x i8] c"totp sha1 failed\0A\00"
@.str.9 = [19 x i8] c"Totp sha1 test ok\0A\00"
@.str.10 = [65 x i8] c"1234567890123456789012345678901234567890123456789012345678901234\00"
@.str.11 = [9 x i8] c"90693936\00"
@.str.12 = [20 x i8] c"totp sha512 failed\0A\00"
@.str.13 = [21 x i8] c"Totp sha512 test ok\0A\00"
define i32 @run_totp_tests() {
%1 = alloca [20 x i32]
%2 = alloca [9 x i8]
%3 = alloca i64
%4 = bitcast [20 x i32]* %1 to i8*
%5 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%6 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%7 = tail call i32 @strlen(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = bitcast i64* %3 to i32*
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%10 = call i32 @calculate_hmac_sha1(i32* bitcast ([21 x i8]* @.str to i32*), i32 %7, i32* %8, i32 8, i32* %9, i32 20)
%11 = call i32 @get_truncate(i32* %9, i32 80, i8* %5, i32 9)
%12 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 2
%13 = call i32 @bcmp(i8* dereferenceable(7) %12, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i64 7)
%14 = icmp eq i32 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %0
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
br label %54
18: ; preds = %0
%19 = load i32, i32* @stdout
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%21 = call i64 @be64toh(i32 1)
store i64 %21, i64* %3
%22 = call i32 @strlen(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%23 = call i32 @calculate_hmac_sha1(i32* bitcast ([21 x i8]* @.str to i32*), i32 %22, i32* %8, i32 8, i32* %9, i32 20)
%24 = call i32 @get_truncate(i32* %9, i32 80, i8* %5, i32 9)
%25 = call i32 @bcmp(i8* dereferenceable(7) %12, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i64 7)
%26 = icmp eq i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %18
%28 = load i32, i32* @stderr
%29 = call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
br label %54
30: ; preds = %18
%31 = load i32, i32* @stdout
%32 = call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%33 = call i32 @strlen(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%34 = call i32 @get_totp_sha1(i32* bitcast ([21 x i8]* @.str to i32*), i32 %33, i32 1, i8* %5, i32 9)
%35 = call i32 @bcmp(i8* dereferenceable(9) %5, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i64 9)
%36 = icmp eq i32 %35, 0
br i1 %36, label %40, label %37
37: ; preds = %30
%38 = load i32, i32* @stderr
%39 = call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %54
40: ; preds = %30
%41 = load i32, i32* @stdout
%42 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%43 = call i32 @strlen(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0))
%44 = call i32 @get_totp_sha512(i32* bitcast ([65 x i8]* @.str.10 to i32*), i32 %43, i32 1, i8* %5, i32 9)
%45 = call i32 @bcmp(i8* dereferenceable(9) %5, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i64 9)
%46 = icmp eq i32 %45, 0
br i1 %46, label %50, label %47
47: ; preds = %40
%48 = load i32, i32* @stderr
%49 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
br label %54
50: ; preds = %40
%51 = load i32, i32* @stdout
%52 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
%53 = call i32 (...) @run_valid_tests()
br label %54
54: ; preds = %50, %47, %37, %27, %15
%55 = phi i32 [ 0, %15 ], [ 0, %27 ], [ 0, %37 ], [ 0, %47 ], [ %53, %50 ]
ret i32 %55
}