#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*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ error(int /*<<< orphan*/, int /*<<< orphan*/, char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ generate_output(char const *);
int /*<<< orphan*/ init_fp_formats();
int /*<<< orphan*/ read_input(char const *);
int main(int argc, char **argv) {
  if (argc != 3)
    error(EXIT_FAILURE, 0, "usage: gen-auto-libm-tests <input> <output>");
  const char *input_filename = argv[1];
  const char *output_filename = argv[2];
  init_fp_formats();
  read_input(input_filename);
  generate_output(output_filename);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1187 <main+0x37>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
lea    0xe7e(%rip),%rdx
call   1050 <error@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <init_fp_formats@plt>
mov    -0x18(%rbp),%rdi
call   1070 <read_input@plt>
mov    -0x20(%rbp),%rdi
call   1030 <generate_output@plt>
mov    0x2e19(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x3,%edi
je     1173 <main+0x23>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rdx
xor    %esi,%esi
call   1050 <error@plt>
mov    0x8(%rbx),%r14
mov    0x10(%rbx),%rbx
xor    %eax,%eax
call   1040 <init_fp_formats@plt>
mov    %r14,%rdi
call   1070 <read_input@plt>
mov    %rbx,%rdi
call   1030 <generate_output@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [44 x i8] c"usage: gen-auto-libm-tests <input> <output>\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 3
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @error(i32 %11, i32 0, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %10, %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
store i8* %16, i8** %6
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
store i8* %19, i8** %7
%20 = call i32 (...) @init_fp_formats()
%21 = load i8*, i8** %6
%22 = call i32 @read_input(i8* %21)
%23 = load i8*, i8** %7
%24 = call i32 @generate_output(i8* %23)
%25 = load i32, i32* @EXIT_SUCCESS
%26 = call i32 @exit(i32 %25)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [44 x i8] c"usage: gen-auto-libm-tests <input> <output>\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @error(i32 %5, i32 0, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 (...) @init_fp_formats()
%13 = tail call i32 @read_input(i8* %9)
%14 = tail call i32 @generate_output(i8* %11)
%15 = load i32, i32* @EXIT_SUCCESS
%16 = tail call i32 @exit(i32 %15)
unreachable
}