#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*/ scanf(char *, double *);
int main() {
  double a, b, c;
  printf("a = ");
  scanf("%lf", &a);
  printf("b = ");
  scanf("%lf", &b);
  printf("c = ");
  scanf("%lf", &c);
  int isPositiveSign = (a > 0 && b > 0 && c > 0) || (a > 0 && b < 0 && c < 0) ||
                       (a < 0 && b > 0 && c < 0) || (a < 0 && b < 0 && c > 0);
  if (isPositiveSign) {
    printf("+\n");
  } else if (a == 0 || b == 0 || c == 0) {
    printf("0\n");
  } else {
    printf("-\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8b(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11be <main+0x9e>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11be <main+0x9e>
movsd  -0x20(%rbp),%xmm0
mov    $0x1,%al
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x25(%rbp)
ja     1262 <main+0x142>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11f1 <main+0xd1>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11f1 <main+0xd1>
mov    $0x1,%al
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
mov    %al,-0x25(%rbp)
ja     1262 <main+0x142>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1224 <main+0x104>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1224 <main+0x104>
mov    $0x1,%al
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
mov    %al,-0x25(%rbp)
ja     1262 <main+0x142>
xor    %eax,%eax
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x26(%rbp)
jbe    125c <main+0x13c>
xor    %eax,%eax
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0x26(%rbp)
jbe    125c <main+0x13c>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x26(%rbp)
mov    -0x26(%rbp),%al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1288 <main+0x168>
lea    0xd95(%rip),%rdi
call   1030 <printf@plt>
jmp    12fc <main+0x1dc>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12a5 <main+0x185>
jp     12a5 <main+0x185>
jmp    12da <main+0x1ba>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12c2 <main+0x1a2>
jp     12c2 <main+0x1a2>
jmp    12da <main+0x1ba>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12eb <main+0x1cb>
jp     12eb <main+0x1cb>
lea    0xd35(%rip),%rdi
call   1030 <printf@plt>
jmp    12f7 <main+0x1d7>
lea    0xd27(%rip),%rdi
call   1030 <printf@plt>
jmp    12fc <main+0x1dc>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
lea    0xebd(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movsd  0x18(%rsp),%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
lea    0xe6f(%rip),%rdi
jbe    11be <main+0x8e>
ucomisd %xmm3,%xmm1
jbe    11be <main+0x8e>
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm2
ja     1240 <main+0x110>
ucomisd %xmm3,%xmm0
jbe    11d4 <main+0xa4>
xorpd  %xmm3,%xmm3
ucomisd %xmm1,%xmm3
jbe    11d4 <main+0xa4>
ucomisd %xmm2,%xmm3
ja     1240 <main+0x110>
xorpd  %xmm3,%xmm3
ucomisd %xmm0,%xmm3
jbe    11ee <main+0xbe>
ucomisd %xmm3,%xmm1
jbe    11ee <main+0xbe>
xorpd  %xmm4,%xmm4
ucomisd %xmm2,%xmm4
ja     1240 <main+0x110>
ucomisd %xmm0,%xmm3
jbe    1204 <main+0xd4>
xorpd  %xmm3,%xmm3
ucomisd %xmm1,%xmm3
jbe    1204 <main+0xd4>
ucomisd %xmm3,%xmm2
ja     1240 <main+0x110>
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm2
lea    0xe00(%rip),%rax
lea    0xdfb(%rip),%rdi
mov    %rdi,%rcx
cmovne %rax,%rcx
cmovp  %rax,%rcx
ucomisd %xmm3,%xmm1
mov    %rdi,%rax
cmovne %rcx,%rax
cmovp  %rcx,%rax
ucomisd %xmm3,%xmm0
cmovne %rax,%rdi
cmovp  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"a = \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [5 x i8] c"b = \00"
@.str.3 = [5 x i8] c"c = \00"
@.str.4 = [3 x i8] c"+\0A\00"
@.str.5 = [3 x i8] c"0\0A\00"
@.str.6 = [3 x i8] c"-\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%12 = load double, double* %2
%13 = fcmp ogt double %12, 0.000000e+00
br i1 %13, label %14, label %20
14: ; preds = %0
%15 = load double, double* %3
%16 = fcmp ogt double %15, 0.000000e+00
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load double, double* %4
%19 = fcmp ogt double %18, 0.000000e+00
br i1 %19, label %49, label %20
20: ; preds = %17, %14, %0
%21 = load double, double* %2
%22 = fcmp ogt double %21, 0.000000e+00
br i1 %22, label %23, label %29
23: ; preds = %20
%24 = load double, double* %3
%25 = fcmp olt double %24, 0.000000e+00
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = load double, double* %4
%28 = fcmp olt double %27, 0.000000e+00
br i1 %28, label %49, label %29
29: ; preds = %26, %23, %20
%30 = load double, double* %2
%31 = fcmp olt double %30, 0.000000e+00
br i1 %31, label %32, label %38
32: ; preds = %29
%33 = load double, double* %3
%34 = fcmp ogt double %33, 0.000000e+00
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = load double, double* %4
%37 = fcmp olt double %36, 0.000000e+00
br i1 %37, label %49, label %38
38: ; preds = %35, %32, %29
%39 = load double, double* %2
%40 = fcmp olt double %39, 0.000000e+00
br i1 %40, label %41, label %47
41: ; preds = %38
%42 = load double, double* %3
%43 = fcmp olt double %42, 0.000000e+00
br i1 %43, label %44, label %47
44: ; preds = %41
%45 = load double, double* %4
%46 = fcmp ogt double %45, 0.000000e+00
br label %47
47: ; preds = %44, %41, %38
%48 = phi i1 [ false, %41 ], [ false, %38 ], [ %46, %44 ]
br label %49
49: ; preds = %47, %35, %26, %17
%50 = phi i1 [ true, %35 ], [ true, %26 ], [ true, %17 ], [ %48, %47 ]
%51 = zext i1 %50 to i32
store i32 %51, i32* %5
%52 = load i32, i32* %5
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %49
%55 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %70
56: ; preds = %49
%57 = load double, double* %2
%58 = fcmp oeq double %57, 0.000000e+00
br i1 %58, label %65, label %59
59: ; preds = %56
%60 = load double, double* %3
%61 = fcmp oeq double %60, 0.000000e+00
br i1 %61, label %65, label %62
62: ; preds = %59
%63 = load double, double* %4
%64 = fcmp oeq double %63, 0.000000e+00
br i1 %64, label %65, label %67
65: ; preds = %62, %59, %56
%66 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %69
67: ; preds = %62
%68 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %69
69: ; preds = %67, %65
br label %70
70: ; preds = %69, %54
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"a = \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [5 x i8] c"b = \00"
@.str.3 = [5 x i8] c"c = \00"
@str = [2 x i8] c"-\00"
@str.7 = [2 x i8] c"0\00"
@str.8 = [2 x i8] c"+\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%13 = load double, double* %1
%14 = fcmp ogt double %13, 0.000000e+00
%15 = load double, double* %2
%16 = fcmp ogt double %15, 0.000000e+00
%17 = select i1 %14, i1 %16, i1 false
%18 = load double, double* %3
%19 = fcmp ogt double %18, 0.000000e+00
%20 = select i1 %17, i1 %19, i1 false
br i1 %20, label %40, label %21
21: ; preds = %0
%22 = fcmp olt double %15, 0.000000e+00
%23 = select i1 %14, i1 %22, i1 false
%24 = fcmp olt double %18, 0.000000e+00
%25 = select i1 %23, i1 %24, i1 false
br i1 %25, label %40, label %26
26: ; preds = %21
%27 = fcmp olt double %13, 0.000000e+00
%28 = select i1 %27, i1 %16, i1 false
%29 = select i1 %28, i1 %24, i1 false
br i1 %29, label %40, label %30
30: ; preds = %26
%31 = select i1 %27, i1 %22, i1 false
%32 = select i1 %31, i1 %19, i1 false
br i1 %32, label %40, label %33
33: ; preds = %30
%34 = fcmp oeq double %13, 0.000000e+00
%35 = fcmp oeq double %15, 0.000000e+00
%36 = select i1 %34, i1 true, i1 %35
%37 = fcmp oeq double %18, 0.000000e+00
%38 = select i1 %36, i1 true, i1 %37
%39 = select i1 %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0)
br label %40
40: ; preds = %33, %30, %0, %21, %26
%41 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0), %26 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0), %21 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0), %0 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0), %30 ], [ %39, %33 ]
%42 = call i32 @puts(i8* dereferenceable(1) %41)
ret i32 0
}