#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*/ printf(char *);
int /*<<< orphan*/ test_accuracy();
int /*<<< orphan*/ test_atan_huge();
int /*<<< orphan*/ test_inverse();
int /*<<< orphan*/ test_p2x_atan2();
int /*<<< orphan*/ test_special();
int /*<<< orphan*/ test_special_atan2();
int /*<<< orphan*/ test_tiny();
int main(int argc, char *argv[]) {
  printf("1..7\n");
  test_special();
  printf("ok 1 - special\n");
  test_special_atan2();
  printf("ok 2 - atan2 special\n");
  test_accuracy();
  printf("ok 3 - accuracy\n");
  test_p2x_atan2();
  printf("ok 4 - atan2 p2x\n");
  test_tiny();
  printf("ok 5 - tiny inputs\n");
  test_atan_huge();
  printf("ok 6 - atan huge inputs\n");
  test_inverse();
  printf("ok 7 - inverse\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)
lea    0xe63(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <test_special@plt>
lea    0xe56(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <test_special_atan2@plt>
lea    0xe53(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10a0 <test_accuracy@plt>
lea    0xe56(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <test_p2x_atan2@plt>
lea    0xe54(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <test_tiny@plt>
lea    0xe53(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <test_atan_huge@plt>
lea    0xe54(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <test_inverse@plt>
lea    0xe5a(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe78(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <test_special@plt>
lea    0xe6a(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <test_special_atan2@plt>
lea    0xe66(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   10a0 <test_accuracy@plt>
lea    0xe68(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <test_p2x_atan2@plt>
lea    0xe65(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <test_tiny@plt>
lea    0xe63(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <test_atan_huge@plt>
lea    0xe63(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1090 <test_inverse@plt>
lea    0xe68(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"1..7\0A\00"
@.str.1 = [16 x i8] c"ok 1 - special\0A\00"
@.str.2 = [22 x i8] c"ok 2 - atan2 special\0A\00"
@.str.3 = [17 x i8] c"ok 3 - accuracy\0A\00"
@.str.4 = [18 x i8] c"ok 4 - atan2 p2x\0A\00"
@.str.5 = [20 x i8] c"ok 5 - tiny inputs\0A\00"
@.str.6 = [25 x i8] c"ok 6 - atan huge inputs\0A\00"
@.str.7 = [16 x i8] c"ok 7 - inverse\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 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @test_special()
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (...) @test_special_atan2()
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (...) @test_accuracy()
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 (...) @test_p2x_atan2()
%14 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 (...) @test_tiny()
%16 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 (...) @test_atan_huge()
%18 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%19 = call i32 (...) @test_inverse()
%20 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"1..7\00"
@str.8 = [15 x i8] c"ok 1 - special\00"
@str.9 = [21 x i8] c"ok 2 - atan2 special\00"
@str.10 = [16 x i8] c"ok 3 - accuracy\00"
@str.11 = [17 x i8] c"ok 4 - atan2 p2x\00"
@str.12 = [19 x i8] c"ok 5 - tiny inputs\00"
@str.13 = [24 x i8] c"ok 6 - atan huge inputs\00"
@str.14 = [15 x i8] c"ok 7 - inverse\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @test_special()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.8, i64 0, i64 0))
%6 = tail call i32 (...) @test_special_atan2()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.9, i64 0, i64 0))
%8 = tail call i32 (...) @test_accuracy()
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.10, i64 0, i64 0))
%10 = tail call i32 (...) @test_p2x_atan2()
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.11, i64 0, i64 0))
%12 = tail call i32 (...) @test_tiny()
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.12, i64 0, i64 0))
%14 = tail call i32 (...) @test_atan_huge()
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.13, i64 0, i64 0))
%16 = tail call i32 (...) @test_inverse()
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.14, i64 0, i64 0))
ret i32 0
}