#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*/ log_close();
int /*<<< orphan*/ log_init(char *);
int /*<<< orphan*/ setenv(char *, char *, int);
int /*<<< orphan*/ test_htpass_authenticate_user_barney_valid();
int /*<<< orphan*/ test_htpass_authenticate_user_fred_invalid1();
int /*<<< orphan*/ test_htpass_authenticate_user_fred_invalid2();
int /*<<< orphan*/ test_htpass_authenticate_user_fred_invalid3();
int /*<<< orphan*/ test_htpass_authenticate_user_fred_valid();
int /*<<< orphan*/ test_htpass_authenticate_user_multithreaded(char *);
int /*<<< orphan*/ test_htpass_authenticate_user_unknown();
int /*<<< orphan*/ test_htpass_valid_file_ok();
int /*<<< orphan*/ test_htpass_valid_file_too_long();
int main() {
  setenv("DEBUG", "true", true);
  log_init("htpass_test.log");
  test_htpass_valid_file_ok();
  test_htpass_valid_file_too_long();
  test_htpass_authenticate_user_fred_valid();
  test_htpass_authenticate_user_fred_invalid1();
  test_htpass_authenticate_user_fred_invalid2();
  test_htpass_authenticate_user_fred_invalid3();
  test_htpass_authenticate_user_barney_valid();
  test_htpass_authenticate_user_unknown();
  log_close();
  test_htpass_authenticate_user_multithreaded("htpass_test_multithreaded.log");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xe35(%rip),%rdi
lea    0xe34(%rip),%rsi
mov    $0x1,%edx
call   1040 <setenv@plt>
lea    0xe28(%rip),%rdi
call   1030 <log_init@plt>
mov    $0x0,%al
call   10e0 <test_htpass_valid_file_ok@plt>
mov    $0x0,%al
call   1070 <test_htpass_valid_file_too_long@plt>
mov    $0x0,%al
call   1060 <test_htpass_authenticate_user_fred_valid@plt>
mov    $0x0,%al
call   10d0 <test_htpass_authenticate_user_fred_invalid1@plt>
mov    $0x0,%al
call   1050 <test_htpass_authenticate_user_fred_invalid2@plt>
mov    $0x0,%al
call   10b0 <test_htpass_authenticate_user_fred_invalid3@plt>
mov    $0x0,%al
call   1090 <test_htpass_authenticate_user_barney_valid@plt>
mov    $0x0,%al
call   1080 <test_htpass_authenticate_user_unknown@plt>
mov    $0x0,%al
call   10a0 <log_close@plt>
lea    0xded(%rip),%rdi
call   10c0 <test_htpass_authenticate_user_multithreaded@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe38(%rip),%rdi
lea    0xe37(%rip),%rsi
mov    $0x1,%edx
call   1040 <setenv@plt>
lea    0xe2b(%rip),%rdi
call   1030 <log_init@plt>
xor    %eax,%eax
call   10e0 <test_htpass_valid_file_ok@plt>
xor    %eax,%eax
call   1070 <test_htpass_valid_file_too_long@plt>
xor    %eax,%eax
call   1060 <test_htpass_authenticate_user_fred_valid@plt>
xor    %eax,%eax
call   10d0 <test_htpass_authenticate_user_fred_invalid1@plt>
xor    %eax,%eax
call   1050 <test_htpass_authenticate_user_fred_invalid2@plt>
xor    %eax,%eax
call   10b0 <test_htpass_authenticate_user_fred_invalid3@plt>
xor    %eax,%eax
call   1090 <test_htpass_authenticate_user_barney_valid@plt>
xor    %eax,%eax
call   1080 <test_htpass_authenticate_user_unknown@plt>
xor    %eax,%eax
call   10a0 <log_close@plt>
lea    0xdf0(%rip),%rdi
call   10c0 <test_htpass_authenticate_user_multithreaded@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"DEBUG\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [16 x i8] c"htpass_test.log\00"
@.str.3 = [30 x i8] c"htpass_test_multithreaded.log\00"
define i32 @main() {
%1 = call i32 @setenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = call i32 @log_init(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (...) @test_htpass_valid_file_ok()
%4 = call i32 (...) @test_htpass_valid_file_too_long()
%5 = call i32 (...) @test_htpass_authenticate_user_fred_valid()
%6 = call i32 (...) @test_htpass_authenticate_user_fred_invalid1()
%7 = call i32 (...) @test_htpass_authenticate_user_fred_invalid2()
%8 = call i32 (...) @test_htpass_authenticate_user_fred_invalid3()
%9 = call i32 (...) @test_htpass_authenticate_user_barney_valid()
%10 = call i32 (...) @test_htpass_authenticate_user_unknown()
%11 = call i32 (...) @log_close()
%12 = call i32 @test_htpass_authenticate_user_multithreaded(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"DEBUG\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [16 x i8] c"htpass_test.log\00"
@.str.3 = [30 x i8] c"htpass_test_multithreaded.log\00"
define i32 @main() {
%1 = tail call i32 @setenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = tail call i32 @log_init(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (...) @test_htpass_valid_file_ok()
%4 = tail call i32 (...) @test_htpass_valid_file_too_long()
%5 = tail call i32 (...) @test_htpass_authenticate_user_fred_valid()
%6 = tail call i32 (...) @test_htpass_authenticate_user_fred_invalid1()
%7 = tail call i32 (...) @test_htpass_authenticate_user_fred_invalid2()
%8 = tail call i32 (...) @test_htpass_authenticate_user_fred_invalid3()
%9 = tail call i32 (...) @test_htpass_authenticate_user_barney_valid()
%10 = tail call i32 (...) @test_htpass_authenticate_user_unknown()
%11 = tail call i32 (...) @log_close()
%12 = tail call i32 @test_htpass_authenticate_user_multithreaded(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}