#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*/ Q16_16_add_Q16_16_to_Q16_16(int /*<<< orphan*/,
                                               int /*<<< orphan*/);
int Q16_16_to_int32(int /*<<< orphan*/);
int /*<<< orphan*/ float_to_Q16_16(double);
char *test_Q_add() {
  do {
    if (!(Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(
              float_to_Q16_16(1), float_to_Q16_16(1))) == 2))
      return "error in "
             "Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(1), "
             "float_to_Q16_16(1))) == 2";
  } while (0);
  do {
    if (!(Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(
              float_to_Q16_16(-1), float_to_Q16_16(1))) == 0))
      return "Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(-1), "
             "float_to_Q16_16(1))) == 0";
  } while (0);
  do {
    if (!(Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(
              float_to_Q16_16(1), float_to_Q16_16(-1))) == 0))
      return "Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(1), "
             "float_to_Q16_16(-1))) == 0";
  } while (0);
  do {
    if (!(Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(
              float_to_Q16_16(1), float_to_Q16_16(-1))) == 0))
      return "Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(1), "
             "float_to_Q16_16(-1))) == 0";
  } while (0);
  do {
    if (!(Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(
              float_to_Q16_16(0.5), float_to_Q16_16(0.5))) == 1))
      return "Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5),"
             " float_to_Q16_16(0.5))) == 1";
  } while (0);
  do {
    if (!(Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(
              float_to_Q16_16(0.5), float_to_Q16_16(1.5))) == 2))
      return "Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5),"
             " float_to_Q16_16(1.5))) == 2";
  } while (0);
  do {
    if (!(Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(
              float_to_Q16_16(0.5), float_to_Q16_16(-0.5))) == 0))
      return "Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5),"
             " float_to_Q16_16(-0.5))) == 0";
  } while (0);
  do {
    if (!(Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(
              float_to_Q16_16(0.5), float_to_Q16_16(-1.5))) == -1))
      return "Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5),"
             " float_to_Q16_16(-1.5))) == -1";
  } while (0);
  do {
    if (!(Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(
              float_to_Q16_16(0.4999999), float_to_Q16_16(-1.5))) == -2))
      return "Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0."
             "4999999), float_to_Q16_16(-1.5))) == -2";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_Q_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  0xec0(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,-0xc(%rbp)
movsd  0xeb0(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0x2,%eax
je     117f <test_Q_add+0x4f>
lea    0xec2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1414 <test_Q_add+0x2e4>
jmp    1184 <test_Q_add+0x54>
jmp    1189 <test_Q_add+0x59>
movsd  0xe77(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,-0x10(%rbp)
movsd  0xe5f(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0x0,%eax
je     11d0 <test_Q_add+0xa0>
lea    0xed4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1414 <test_Q_add+0x2e4>
jmp    11d5 <test_Q_add+0xa5>
jmp    11da <test_Q_add+0xaa>
movsd  0xe1e(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,-0x14(%rbp)
movsd  0xe16(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0x0,%eax
je     1221 <test_Q_add+0xf1>
lea    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1414 <test_Q_add+0x2e4>
jmp    1226 <test_Q_add+0xf6>
jmp    122b <test_Q_add+0xfb>
movsd  0xdcd(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,-0x18(%rbp)
movsd  0xdc5(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0x0,%eax
je     1272 <test_Q_add+0x142>
lea    0xe8d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1414 <test_Q_add+0x2e4>
jmp    1277 <test_Q_add+0x147>
jmp    127c <test_Q_add+0x14c>
movsd  0xd8c(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,-0x1c(%rbp)
movsd  0xd7c(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0x1,%eax
je     12c3 <test_Q_add+0x193>
lea    0xe97(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1414 <test_Q_add+0x2e4>
jmp    12c8 <test_Q_add+0x198>
jmp    12cd <test_Q_add+0x19d>
movsd  0xd3b(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,-0x20(%rbp)
movsd  0xd33(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    -0x20(%rbp),%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0x2,%eax
je     1314 <test_Q_add+0x1e4>
lea    0xea4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1414 <test_Q_add+0x2e4>
jmp    1319 <test_Q_add+0x1e9>
jmp    131e <test_Q_add+0x1ee>
movsd  0xcea(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,-0x24(%rbp)
movsd  0xcea(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    -0x24(%rbp),%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0x0,%eax
je     1365 <test_Q_add+0x235>
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1414 <test_Q_add+0x2e4>
jmp    136a <test_Q_add+0x23a>
jmp    136f <test_Q_add+0x23f>
movsd  0xc99(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,-0x28(%rbp)
movsd  0xca1(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    -0x28(%rbp),%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0xffffffff,%eax
je     13b6 <test_Q_add+0x286>
lea    0xebf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1414 <test_Q_add+0x2e4>
jmp    13bb <test_Q_add+0x28b>
jmp    13c0 <test_Q_add+0x290>
movsd  0xc68(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,-0x2c(%rbp)
movsd  0xc50(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    -0x2c(%rbp),%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0xfffffffe,%eax
je     1407 <test_Q_add+0x2d7>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1414 <test_Q_add+0x2e4>
jmp    140c <test_Q_add+0x2dc>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_Q_add>:
push   %rbp
push   %rbx
push   %rax
movsd  0xec5(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,%ebx
movsd  0xeb6(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0x2,%eax
jne    119d <test_Q_add+0x6d>
movsd  0xe9c(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,%ebx
movsd  0xe85(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
test   %eax,%eax
je     11ae <test_Q_add+0x7e>
lea    0xf00(%rip),%rbx
jmp    11a4 <test_Q_add+0x74>
lea    0xe94(%rip),%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
movsd  0xe4a(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,%ebx
movsd  0xe43(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
lea    0xf15(%rip),%rbx
test   %eax,%eax
jne    11a4 <test_Q_add+0x74>
movsd  0xe13(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,%ebp
movsd  0xe0c(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
test   %eax,%eax
jne    11a4 <test_Q_add+0x74>
movsd  0xdf3(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,%ebx
movsd  0xde4(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0x1,%eax
jne    12b3 <test_Q_add+0x183>
movsd  0xdc2(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,%ebx
movsd  0xdbb(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0x2,%eax
jne    12bf <test_Q_add+0x18f>
movsd  0xd91(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,%ebx
movsd  0xd92(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
test   %eax,%eax
je     12cb <test_Q_add+0x19b>
lea    0xf5f(%rip),%rbx
jmp    11a4 <test_Q_add+0x74>
lea    0xe97(%rip),%rbx
jmp    11a4 <test_Q_add+0x74>
lea    0xee9(%rip),%rbx
jmp    11a4 <test_Q_add+0x74>
movsd  0xd3d(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,%ebx
movsd  0xd46(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
cmp    $0xffffffff,%eax
je     1308 <test_Q_add+0x1d8>
lea    0xf69(%rip),%rbx
jmp    11a4 <test_Q_add+0x74>
movsd  0xd20(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %eax,%ebx
movsd  0xd09(%rip),%xmm0
call   1030 <float_to_Q16_16@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <Q16_16_add_Q16_16_to_Q16_16@plt>
mov    %eax,%edi
call   1050 <Q16_16_to_int32@plt>
xor    %ebx,%ebx
cmp    $0xfffffffe,%eax
lea    0xf8c(%rip),%rax
cmovne %rax,%rbx
jmp    11a4 <test_Q_add+0x74>

LLVM IR (-O0):
@.str = [99 x i8] c"error in Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(1), float_to_Q16_16(1))) == 2\00"
@.str.1 = [91 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(-1), float_to_Q16_16(1))) == 0\00"
@.str.2 = [91 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(1), float_to_Q16_16(-1))) == 0\00"
@.str.3 = [94 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5), float_to_Q16_16(0.5))) == 1\00"
@.str.4 = [94 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5), float_to_Q16_16(1.5))) == 2\00"
@.str.5 = [95 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5), float_to_Q16_16(-0.5))) == 0\00"
@.str.6 = [96 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5), float_to_Q16_16(-1.5))) == -1\00"
@.str.7 = [102 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.4999999), float_to_Q16_16(-1.5))) == -2\00"
define i8* @test_Q_add() {
%1 = alloca i8*
br label %2
2: ; preds = %0
%3 = call i32 @float_to_Q16_16(double 1.000000e+00)
%4 = call i32 @float_to_Q16_16(double 1.000000e+00)
%5 = call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %3, i32 %4)
%6 = call i32 @Q16_16_to_int32(i32 %5)
%7 = icmp eq i32 %6, 2
br i1 %7, label %9, label %8
8: ; preds = %2
store i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str, i64 0, i64 0), i8** %1
br label %83
9: ; preds = %2
br label %10
10: ; preds = %9
br label %11
11: ; preds = %10
%12 = call i32 @float_to_Q16_16(double -1.000000e+00)
%13 = call i32 @float_to_Q16_16(double 1.000000e+00)
%14 = call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %12, i32 %13)
%15 = call i32 @Q16_16_to_int32(i32 %14)
%16 = icmp eq i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %11
store i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %83
18: ; preds = %11
br label %19
19: ; preds = %18
br label %20
20: ; preds = %19
%21 = call i32 @float_to_Q16_16(double 1.000000e+00)
%22 = call i32 @float_to_Q16_16(double -1.000000e+00)
%23 = call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %21, i32 %22)
%24 = call i32 @Q16_16_to_int32(i32 %23)
%25 = icmp eq i32 %24, 0
br i1 %25, label %27, label %26
26: ; preds = %20
store i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.2, i64 0, i64 0), i8** %1
br label %83
27: ; preds = %20
br label %28
28: ; preds = %27
br label %29
29: ; preds = %28
%30 = call i32 @float_to_Q16_16(double 1.000000e+00)
%31 = call i32 @float_to_Q16_16(double -1.000000e+00)
%32 = call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %30, i32 %31)
%33 = call i32 @Q16_16_to_int32(i32 %32)
%34 = icmp eq i32 %33, 0
br i1 %34, label %36, label %35
35: ; preds = %29
store i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.2, i64 0, i64 0), i8** %1
br label %83
36: ; preds = %29
br label %37
37: ; preds = %36
br label %38
38: ; preds = %37
%39 = call i32 @float_to_Q16_16(double 5.000000e-01)
%40 = call i32 @float_to_Q16_16(double 5.000000e-01)
%41 = call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %39, i32 %40)
%42 = call i32 @Q16_16_to_int32(i32 %41)
%43 = icmp eq i32 %42, 1
br i1 %43, label %45, label %44
44: ; preds = %38
store i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.3, i64 0, i64 0), i8** %1
br label %83
45: ; preds = %38
br label %46
46: ; preds = %45
br label %47
47: ; preds = %46
%48 = call i32 @float_to_Q16_16(double 5.000000e-01)
%49 = call i32 @float_to_Q16_16(double 1.500000e+00)
%50 = call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %48, i32 %49)
%51 = call i32 @Q16_16_to_int32(i32 %50)
%52 = icmp eq i32 %51, 2
br i1 %52, label %54, label %53
53: ; preds = %47
store i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.4, i64 0, i64 0), i8** %1
br label %83
54: ; preds = %47
br label %55
55: ; preds = %54
br label %56
56: ; preds = %55
%57 = call i32 @float_to_Q16_16(double 5.000000e-01)
%58 = call i32 @float_to_Q16_16(double -5.000000e-01)
%59 = call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %57, i32 %58)
%60 = call i32 @Q16_16_to_int32(i32 %59)
%61 = icmp eq i32 %60, 0
br i1 %61, label %63, label %62
62: ; preds = %56
store i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.5, i64 0, i64 0), i8** %1
br label %83
63: ; preds = %56
br label %64
64: ; preds = %63
br label %65
65: ; preds = %64
%66 = call i32 @float_to_Q16_16(double 5.000000e-01)
%67 = call i32 @float_to_Q16_16(double -1.500000e+00)
%68 = call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %66, i32 %67)
%69 = call i32 @Q16_16_to_int32(i32 %68)
%70 = icmp eq i32 %69, -1
br i1 %70, label %72, label %71
71: ; preds = %65
store i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.6, i64 0, i64 0), i8** %1
br label %83
72: ; preds = %65
br label %73
73: ; preds = %72
br label %74
74: ; preds = %73
%75 = call i32 @float_to_Q16_16(double 0x3FDFFFFF94A03595)
%76 = call i32 @float_to_Q16_16(double -1.500000e+00)
%77 = call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %75, i32 %76)
%78 = call i32 @Q16_16_to_int32(i32 %77)
%79 = icmp eq i32 %78, -2
br i1 %79, label %81, label %80
80: ; preds = %74
store i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.7, i64 0, i64 0), i8** %1
br label %83
81: ; preds = %74
br label %82
82: ; preds = %81
store i8* null, i8** %1
br label %83
83: ; preds = %82, %80, %71, %62, %53, %44, %35, %26, %17, %8
%84 = load i8*, i8** %1
ret i8* %84
}

LLVM IR (-O2):
@.str = [99 x i8] c"error in Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(1), float_to_Q16_16(1))) == 2\00"
@.str.1 = [91 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(-1), float_to_Q16_16(1))) == 0\00"
@.str.2 = [91 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(1), float_to_Q16_16(-1))) == 0\00"
@.str.3 = [94 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5), float_to_Q16_16(0.5))) == 1\00"
@.str.4 = [94 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5), float_to_Q16_16(1.5))) == 2\00"
@.str.5 = [95 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5), float_to_Q16_16(-0.5))) == 0\00"
@.str.6 = [96 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.5), float_to_Q16_16(-1.5))) == -1\00"
@.str.7 = [102 x i8] c"Q16_16_to_int32(Q16_16_add_Q16_16_to_Q16_16(float_to_Q16_16(0.4999999), float_to_Q16_16(-1.5))) == -2\00"
define i8* @test_Q_add() {
%1 = tail call i32 @float_to_Q16_16(double 1.000000e+00)
%2 = tail call i32 @float_to_Q16_16(double 1.000000e+00)
%3 = tail call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %1, i32 %2)
%4 = tail call i32 @Q16_16_to_int32(i32 %3)
%5 = icmp eq i32 %4, 2
br i1 %5, label %6, label %55
6: ; preds = %0
%7 = tail call i32 @float_to_Q16_16(double -1.000000e+00)
%8 = tail call i32 @float_to_Q16_16(double 1.000000e+00)
%9 = tail call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %7, i32 %8)
%10 = tail call i32 @Q16_16_to_int32(i32 %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %55
12: ; preds = %6
%13 = tail call i32 @float_to_Q16_16(double 1.000000e+00)
%14 = tail call i32 @float_to_Q16_16(double -1.000000e+00)
%15 = tail call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %13, i32 %14)
%16 = tail call i32 @Q16_16_to_int32(i32 %15)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %55
18: ; preds = %12
%19 = tail call i32 @float_to_Q16_16(double 1.000000e+00)
%20 = tail call i32 @float_to_Q16_16(double -1.000000e+00)
%21 = tail call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %19, i32 %20)
%22 = tail call i32 @Q16_16_to_int32(i32 %21)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %55
24: ; preds = %18
%25 = tail call i32 @float_to_Q16_16(double 5.000000e-01)
%26 = tail call i32 @float_to_Q16_16(double 5.000000e-01)
%27 = tail call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %25, i32 %26)
%28 = tail call i32 @Q16_16_to_int32(i32 %27)
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %55
30: ; preds = %24
%31 = tail call i32 @float_to_Q16_16(double 5.000000e-01)
%32 = tail call i32 @float_to_Q16_16(double 1.500000e+00)
%33 = tail call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %31, i32 %32)
%34 = tail call i32 @Q16_16_to_int32(i32 %33)
%35 = icmp eq i32 %34, 2
br i1 %35, label %36, label %55
36: ; preds = %30
%37 = tail call i32 @float_to_Q16_16(double 5.000000e-01)
%38 = tail call i32 @float_to_Q16_16(double -5.000000e-01)
%39 = tail call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %37, i32 %38)
%40 = tail call i32 @Q16_16_to_int32(i32 %39)
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %55
42: ; preds = %36
%43 = tail call i32 @float_to_Q16_16(double 5.000000e-01)
%44 = tail call i32 @float_to_Q16_16(double -1.500000e+00)
%45 = tail call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %43, i32 %44)
%46 = tail call i32 @Q16_16_to_int32(i32 %45)
%47 = icmp eq i32 %46, -1
br i1 %47, label %48, label %55
48: ; preds = %42
%49 = tail call i32 @float_to_Q16_16(double 0x3FDFFFFF94A03595)
%50 = tail call i32 @float_to_Q16_16(double -1.500000e+00)
%51 = tail call i32 @Q16_16_add_Q16_16_to_Q16_16(i32 %49, i32 %50)
%52 = tail call i32 @Q16_16_to_int32(i32 %51)
%53 = icmp eq i32 %52, -2
%54 = select i1 %53, i8* null, i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.7, i64 0, i64 0)
br label %55
55: ; preds = %48, %42, %36, %30, %24, %18, %12, %6, %0
%56 = phi i8* [ getelementptr inbounds ([99 x i8], [99 x i8]* @.str, i64 0, i64 0), %0 ], [ getelementptr inbounds ([91 x i8], [91 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([91 x i8], [91 x i8]* @.str.2, i64 0, i64 0), %12 ], [ getelementptr inbounds ([91 x i8], [91 x i8]* @.str.2, i64 0, i64 0), %18 ], [ getelementptr inbounds ([94 x i8], [94 x i8]* @.str.3, i64 0, i64 0), %24 ], [ getelementptr inbounds ([94 x i8], [94 x i8]* @.str.4, i64 0, i64 0), %30 ], [ getelementptr inbounds ([95 x i8], [95 x i8]* @.str.5, i64 0, i64 0), %36 ], [ getelementptr inbounds ([96 x i8], [96 x i8]* @.str.6, i64 0, i64 0), %42 ], [ %54, %48 ]
ret i8* %56
}