#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 abs(int);
int /*<<< orphan*/ printf(char *, ...);
void print_equation4(int CoeffA, int CoeffB, int CoeffC) {
  printf("\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");
  if (CoeffA == 1 && (!(CoeffB == 0) || !(CoeffC == 0)))
    printf("The equation is y = x^2 ");
  else if (CoeffA == -1 && (!(CoeffB == 0) || !(CoeffC == 0)))
    printf("The equation is y = -x^2 ");
  else if (CoeffA == 1 && CoeffB == 0 && CoeffC == 0)
    printf("The equation is y = x^2\n");
  else if (CoeffA == -1 && CoeffB == 0 && CoeffC == 0)
    printf("The equation is y = -x^2\n");
  if (CoeffB > 0 && !(CoeffC == 0))
    printf("+ %dx ", CoeffB);
  else if (CoeffB < 0 && !(CoeffC == 0))
    printf("- %dx ", abs(CoeffB));
  else if (CoeffB > 0 && CoeffC == 0)
    printf("+ %dx\n", CoeffB);
  else if (CoeffB < 0 && CoeffC == 0)
    printf("- %dx\n", abs(CoeffB));
  if (CoeffC > 0)
    printf("+ %d\n", CoeffC);
  else if (CoeffC < 0)
    printf("- %d\n", abs(CoeffC));
  if (CoeffA > 0)
    printf("The parabola opens upward.\n");
  else if (CoeffA < 0)
    printf("The parabola opens downward.\n");
  return;
}


x86 assembly (clang, -O0):
<print_equation4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x1,-0x4(%rbp)
jne    1170 <print_equation4+0x50>
cmpl   $0x0,-0x8(%rbp)
jne    115d <print_equation4+0x3d>
cmpl   $0x0,-0xc(%rbp)
je     1170 <print_equation4+0x50>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    120d <print_equation4+0xed>
cmpl   $0xffffffff,-0x4(%rbp)
jne    11a1 <print_equation4+0x81>
cmpl   $0x0,-0x8(%rbp)
jne    118e <print_equation4+0x6e>
cmpl   $0x0,-0xc(%rbp)
je     11a1 <print_equation4+0x81>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1208 <print_equation4+0xe8>
cmpl   $0x1,-0x4(%rbp)
jne    11d2 <print_equation4+0xb2>
cmpl   $0x0,-0x8(%rbp)
jne    11d2 <print_equation4+0xb2>
cmpl   $0x0,-0xc(%rbp)
jne    11d2 <print_equation4+0xb2>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1203 <print_equation4+0xe3>
cmpl   $0xffffffff,-0x4(%rbp)
jne    11fe <print_equation4+0xde>
cmpl   $0x0,-0x8(%rbp)
jne    11fe <print_equation4+0xde>
cmpl   $0x0,-0xc(%rbp)
jne    11fe <print_equation4+0xde>
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1203 <print_equation4+0xe3>
jmp    1208 <print_equation4+0xe8>
jmp    120d <print_equation4+0xed>
cmpl   $0x0,-0x8(%rbp)
jle    1237 <print_equation4+0x117>
cmpl   $0x0,-0xc(%rbp)
je     1237 <print_equation4+0x117>
mov    -0x8(%rbp),%esi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12cd <print_equation4+0x1ad>
cmpl   $0x0,-0x8(%rbp)
jge    1268 <print_equation4+0x148>
cmpl   $0x0,-0xc(%rbp)
je     1268 <print_equation4+0x148>
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%esi
lea    0xe41(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12c8 <print_equation4+0x1a8>
cmpl   $0x0,-0x8(%rbp)
jle    1292 <print_equation4+0x172>
cmpl   $0x0,-0xc(%rbp)
jne    1292 <print_equation4+0x172>
mov    -0x8(%rbp),%esi
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12c3 <print_equation4+0x1a3>
cmpl   $0x0,-0x8(%rbp)
jge    12be <print_equation4+0x19e>
cmpl   $0x0,-0xc(%rbp)
jne    12be <print_equation4+0x19e>
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%esi
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12c3 <print_equation4+0x1a3>
jmp    12c8 <print_equation4+0x1a8>
jmp    12cd <print_equation4+0x1ad>
cmpl   $0x0,-0xc(%rbp)
jle    12ed <print_equation4+0x1cd>
mov    -0xc(%rbp),%esi
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1314 <print_equation4+0x1f4>
cmpl   $0x0,-0xc(%rbp)
jge    130f <print_equation4+0x1ef>
mov    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%esi
lea    0xdb0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1314 <print_equation4+0x1f4>
cmpl   $0x0,-0x4(%rbp)
jle    1331 <print_equation4+0x211>
lea    0xd99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    134e <print_equation4+0x22e>
cmpl   $0x0,-0x4(%rbp)
jge    1349 <print_equation4+0x229>
lea    0xd98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    134e <print_equation4+0x22e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_equation4>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %esi,%ebx
mov    %edi,%r14d
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%eax
or     %ebx,%eax
je     114c <print_equation4+0x2c>
cmp    $0x1,%r14d
jne    114c <print_equation4+0x2c>
lea    0xeb6(%rip),%rdi
jmp    115d <print_equation4+0x3d>
test   %eax,%eax
je     11cc <print_equation4+0xac>
cmp    $0xffffffff,%r14d
jne    11cc <print_equation4+0xac>
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jle    1175 <print_equation4+0x55>
test   %ebp,%ebp
je     1175 <print_equation4+0x55>
lea    0xec0(%rip),%rdi
jmp    1186 <print_equation4+0x66>
test   %ebx,%ebx
jns    11df <print_equation4+0xbf>
test   %ebp,%ebp
je     11df <print_equation4+0xbf>
neg    %ebx
lea    0xeb4(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebp,%ebp
jle    11bf <print_equation4+0x9f>
lea    0xeb5(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
jle    11b8 <print_equation4+0x98>
lea    0xef8(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <puts@plt>
js     11f2 <print_equation4+0xd2>
pop    %rbx
pop    %r14
pop    %rbp
ret
jns    11a3 <print_equation4+0x83>
neg    %ebp
lea    0xe8b(%rip),%rdi
jmp    119a <print_equation4+0x7a>
cmp    $0x1,%r14d
jne    11fb <print_equation4+0xdb>
test   %eax,%eax
jne    11fb <print_equation4+0xdb>
lea    0xefe(%rip),%rdi
jmp    1214 <print_equation4+0xf4>
test   %ebx,%ebx
jle    121e <print_equation4+0xfe>
test   %ebp,%ebp
jne    121e <print_equation4+0xfe>
lea    0xe53(%rip),%rdi
mov    %ebx,%esi
jmp    119c <print_equation4+0x7c>
lea    0xe91(%rip),%rdi
jmp    11af <print_equation4+0x8f>
cmp    $0xffffffff,%r14d
jne    1164 <print_equation4+0x44>
test   %eax,%eax
jne    1164 <print_equation4+0x44>
lea    0xeae(%rip),%rdi
call   1030 <puts@plt>
jmp    1164 <print_equation4+0x44>
test   %ebx,%ebx
jns    118f <print_equation4+0x6f>
test   %ebp,%ebp
jne    118f <print_equation4+0x6f>
neg    %ebx
lea    0xe11(%rip),%rdi
mov    %ebx,%esi
jmp    119c <print_equation4+0x7c>

LLVM IR (-O0):
@.str = [48 x i8] c"\0A-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\0A\00"
@.str.1 = [25 x i8] c"The equation is y = x^2 \00"
@.str.2 = [26 x i8] c"The equation is y = -x^2 \00"
@.str.3 = [25 x i8] c"The equation is y = x^2\0A\00"
@.str.4 = [26 x i8] c"The equation is y = -x^2\0A\00"
@.str.5 = [7 x i8] c"+ %dx \00"
@.str.6 = [7 x i8] c"- %dx \00"
@.str.7 = [7 x i8] c"+ %dx\0A\00"
@.str.8 = [7 x i8] c"- %dx\0A\00"
@.str.9 = [6 x i8] c"+ %d\0A\00"
@.str.10 = [6 x i8] c"- %d\0A\00"
@.str.11 = [28 x i8] c"The parabola opens upward.\0A\00"
@.str.12 = [30 x i8] c"The parabola opens downward.\0A\00"
define void @print_equation4(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %18
10: ; preds = %3
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %6
%15 = icmp eq i32 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %13, %10
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %54
18: ; preds = %13, %3
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, -1
br i1 %20, label %21, label %29
21: ; preds = %18
%22 = load i32, i32* %5
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* %6
%26 = icmp eq i32 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %24, %21
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %53
29: ; preds = %24, %18
%30 = load i32, i32* %4
%31 = icmp eq i32 %30, 1
br i1 %31, label %32, label %40
32: ; preds = %29
%33 = load i32, i32* %5
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %40
35: ; preds = %32
%36 = load i32, i32* %6
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %52
40: ; preds = %35, %32, %29
%41 = load i32, i32* %4
%42 = icmp eq i32 %41, -1
br i1 %42, label %43, label %51
43: ; preds = %40
%44 = load i32, i32* %5
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %51
46: ; preds = %43
%47 = load i32, i32* %6
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %51
51: ; preds = %49, %46, %43, %40
br label %52
52: ; preds = %51, %38
br label %53
53: ; preds = %52, %27
br label %54
54: ; preds = %53, %16
%55 = load i32, i32* %5
%56 = icmp sgt i32 %55, 0
br i1 %56, label %57, label %63
57: ; preds = %54
%58 = load i32, i32* %6
%59 = icmp eq i32 %58, 0
br i1 %59, label %63, label %60
60: ; preds = %57
%61 = load i32, i32* %5
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %61)
br label %95
63: ; preds = %57, %54
%64 = load i32, i32* %5
%65 = icmp slt i32 %64, 0
br i1 %65, label %66, label %73
66: ; preds = %63
%67 = load i32, i32* %6
%68 = icmp eq i32 %67, 0
br i1 %68, label %73, label %69
69: ; preds = %66
%70 = load i32, i32* %5
%71 = call i32 @abs(i32 %70)
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %71)
br label %94
73: ; preds = %66, %63
%74 = load i32, i32* %5
%75 = icmp sgt i32 %74, 0
br i1 %75, label %76, label %82
76: ; preds = %73
%77 = load i32, i32* %6
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %82
79: ; preds = %76
%80 = load i32, i32* %5
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %80)
br label %93
82: ; preds = %76, %73
%83 = load i32, i32* %5
%84 = icmp slt i32 %83, 0
br i1 %84, label %85, label %92
85: ; preds = %82
%86 = load i32, i32* %6
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %92
88: ; preds = %85
%89 = load i32, i32* %5
%90 = call i32 @abs(i32 %89)
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %90)
br label %92
92: ; preds = %88, %85, %82
br label %93
93: ; preds = %92, %79
br label %94
94: ; preds = %93, %69
br label %95
95: ; preds = %94, %60
%96 = load i32, i32* %6
%97 = icmp sgt i32 %96, 0
br i1 %97, label %98, label %101
98: ; preds = %95
%99 = load i32, i32* %6
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %99)
br label %109
101: ; preds = %95
%102 = load i32, i32* %6
%103 = icmp slt i32 %102, 0
br i1 %103, label %104, label %108
104: ; preds = %101
%105 = load i32, i32* %6
%106 = call i32 @abs(i32 %105)
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i32 %106)
br label %108
108: ; preds = %104, %101
br label %109
109: ; preds = %108, %98
%110 = load i32, i32* %4
%111 = icmp sgt i32 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %109
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
br label %120
114: ; preds = %109
%115 = load i32, i32* %4
%116 = icmp slt i32 %115, 0
br i1 %116, label %117, label %119
117: ; preds = %114
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
br label %119
119: ; preds = %117, %114
br label %120
120: ; preds = %119, %112
ret void
}

LLVM IR (-O2):
@.str.1 = [25 x i8] c"The equation is y = x^2 \00"
@.str.2 = [26 x i8] c"The equation is y = -x^2 \00"
@.str.5 = [7 x i8] c"+ %dx \00"
@.str.6 = [7 x i8] c"- %dx \00"
@.str.7 = [7 x i8] c"+ %dx\0A\00"
@.str.8 = [7 x i8] c"- %dx\0A\00"
@.str.9 = [6 x i8] c"+ %d\0A\00"
@.str.10 = [6 x i8] c"- %d\0A\00"
@str = [47 x i8] c"\0A-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\00"
@str.13 = [29 x i8] c"The parabola opens downward.\00"
@str.14 = [27 x i8] c"The parabola opens upward.\00"
@str.15 = [25 x i8] c"The equation is y = -x^2\00"
@str.16 = [24 x i8] c"The equation is y = x^2\00"
define void @print_equation4(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%5 = icmp eq i32 %0, 1
%6 = xor i1 %5, true
%7 = or i32 %2, %1
%8 = icmp eq i32 %7, 0
%9 = or i1 %8, %6
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %26
12: ; preds = %3
%13 = icmp eq i32 %0, -1
%14 = xor i1 %13, true
%15 = or i1 %8, %14
br i1 %15, label %18, label %16
16: ; preds = %12
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %26
18: ; preds = %12
%19 = and i1 %5, %8
br i1 %19, label %20, label %22
20: ; preds = %18
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.16, i64 0, i64 0))
br label %26
22: ; preds = %18
%23 = and i1 %13, %8
br i1 %23, label %24, label %26
24: ; preds = %22
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.15, i64 0, i64 0))
br label %26
26: ; preds = %16, %22, %24, %20, %10
%27 = icmp slt i32 %1, 1
%28 = icmp eq i32 %2, 0
%29 = or i1 %27, %28
br i1 %29, label %32, label %30
30: ; preds = %26
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %1)
br label %49
32: ; preds = %26
%33 = icmp sgt i32 %1, -1
%34 = or i1 %33, %28
br i1 %34, label %38, label %35
35: ; preds = %32
%36 = sub nsw i32 0, %1
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %36)
br label %49
38: ; preds = %32
%39 = icmp sgt i32 %1, 0
%40 = and i1 %39, %28
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %1)
br label %58
43: ; preds = %38
%44 = icmp slt i32 %1, 0
%45 = and i1 %44, %28
br i1 %45, label %46, label %49
46: ; preds = %43
%47 = sub nsw i32 0, %1
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %47)
br label %58
49: ; preds = %35, %43, %30
%50 = icmp sgt i32 %2, 0
br i1 %50, label %51, label %53
51: ; preds = %49
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %2)
br label %58
53: ; preds = %49
%54 = icmp slt i32 %2, 0
br i1 %54, label %55, label %58
55: ; preds = %53
%56 = sub nsw i32 0, %2
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %46, %41, %53, %55, %51
%59 = icmp sgt i32 %0, 0
br i1 %59, label %62, label %60
60: ; preds = %58
%61 = icmp slt i32 %0, 0
br i1 %61, label %62, label %65
62: ; preds = %60, %58
%63 = phi i8* [ getelementptr inbounds ([27 x i8], [27 x i8]* @str.14, i64 0, i64 0), %58 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @str.13, i64 0, i64 0), %60 ]
%64 = tail call i32 @puts(i8* dereferenceable(1) %63)
br label %65
65: ; preds = %62, %60
ret void
}