#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 INT32_MAX;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_int(int);
int /*<<< orphan*/ test_mixed();
int /*<<< orphan*/ test_str(char *);
int main(int argc, char *argv[]) {
  test_int(0);
  test_int(-1);
  test_int(INT32_MAX);
  test_str("test123");
  test_str("1234567890!!@#$%%$^&*()_");
  test_mixed();
  printf("-----------------\n");
  printf("All Tests Passed!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1060 <test_int@plt>
mov    $0xffffffff,%edi
call   1060 <test_int@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1060 <test_int@plt>
lea    0xe84(%rip),%rdi
call   1030 <test_str@plt>
lea    0xe80(%rip),%rdi
call   1030 <test_str@plt>
mov    $0x0,%al
call   1040 <test_mixed@plt>
lea    0xe86(%rip),%rdi
call   1050 <printf@plt>
lea    0xe8d(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <test_int@plt>
mov    $0xffffffff,%edi
call   1060 <test_int@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1060 <test_int@plt>
lea    0xe99(%rip),%rdi
call   1030 <test_str@plt>
lea    0xe95(%rip),%rdi
call   1030 <test_str@plt>
xor    %eax,%eax
call   1050 <test_mixed@plt>
lea    0xe9b(%rip),%rdi
call   1040 <puts@plt>
lea    0xea1(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@INT32_MAX = global i32 0
@.str = [8 x i8] c"test123\00"
@.str.1 = [25 x i8] c"1234567890!!@#$%%$^&*()_\00"
@.str.2 = [19 x i8] c"-----------------\0A\00"
@.str.3 = [19 x i8] c"All Tests Passed!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @test_int(i32 0)
%7 = call i32 @test_int(i32 -1)
%8 = load i32, i32* @INT32_MAX
%9 = call i32 @test_int(i32 %8)
%10 = call i32 @test_str(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @test_str(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (...) @test_mixed()
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@INT32_MAX = global i32 0
@.str = [8 x i8] c"test123\00"
@.str.1 = [25 x i8] c"1234567890!!@#$%%$^&*()_\00"
@str = [18 x i8] c"-----------------\00"
@str.4 = [18 x i8] c"All Tests Passed!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_int(i32 0)
%4 = tail call i32 @test_int(i32 -1)
%5 = load i32, i32* @INT32_MAX
%6 = tail call i32 @test_int(i32 %5)
%7 = tail call i32 @test_str(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @test_str(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 (...) @test_mixed()
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}