#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 *, float *);
int main() {
  float a1, a2, b1, b2, x, y;
  scanf("%f", &a1);
  scanf("%f", &a2);
  scanf("%f", &b1);
  scanf("%f", &b2);
  x = (a1 * a2 * (b1 - b2)) / (a2 * b1 - a1 * b2);
  y = (b1 * b2 * (a1 - a2)) / (a1 * b2 - a2 * b1);
  if (a2 * b1 != a1 * b2) {
    printf("(%0.3f,%0.3f)", x, y);
  } else if (a2 * b1 == a1 * b2) {
    printf("INF");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe9a(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
subss  -0x14(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm3
movss  -0x8(%rbp),%xmm2
mulss  -0x14(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x14(%rbp),%xmm3
movss  -0xc(%rbp),%xmm2
mulss  -0x10(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jne    122b <main+0x10b>
jp     122b <main+0x10b>
jmp    1250 <main+0x130>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xdbf(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    1286 <main+0x166>
movss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jne    1281 <main+0x161>
jp     1281 <main+0x161>
lea    0xd97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1286 <main+0x166>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm1
movss  0x8(%rsp),%xmm4
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm5
movaps %xmm1,%xmm2
mulss  %xmm5,%xmm2
movaps %xmm4,%xmm3
mulss  %xmm0,%xmm3
ucomiss %xmm2,%xmm3
jne    118a <main+0x6a>
jnp    11d6 <main+0xb6>
movaps %xmm0,%xmm6
mulss  %xmm5,%xmm6
movaps %xmm1,%xmm7
subss  %xmm4,%xmm7
mulss  %xmm6,%xmm7
movaps %xmm2,%xmm6
subss  %xmm3,%xmm6
divss  %xmm6,%xmm7
mulss  %xmm4,%xmm1
subss  %xmm5,%xmm0
mulss  %xmm1,%xmm0
subss  %xmm2,%xmm3
divss  %xmm3,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm7,%xmm1
lea    0xe36(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    11e4 <main+0xc4>
lea    0xe34(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [14 x i8] c"(%0.3f,%0.3f)\00"
@.str.2 = [4 x i8] c"INF\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %4)
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %5)
%12 = load float, float* %2
%13 = load float, float* %3
%14 = fmul float %12, %13
%15 = load float, float* %4
%16 = load float, float* %5
%17 = fsub float %15, %16
%18 = fmul float %14, %17
%19 = load float, float* %3
%20 = load float, float* %4
%21 = load float, float* %2
%22 = load float, float* %5
%23 = fmul float %21, %22
%24 = fneg float %23
%25 = call float @llvm.fmuladd.f32(float %19, float %20, float %24)
%26 = fdiv float %18, %25
store float %26, float* %6
%27 = load float, float* %4
%28 = load float, float* %5
%29 = fmul float %27, %28
%30 = load float, float* %2
%31 = load float, float* %3
%32 = fsub float %30, %31
%33 = fmul float %29, %32
%34 = load float, float* %2
%35 = load float, float* %5
%36 = load float, float* %3
%37 = load float, float* %4
%38 = fmul float %36, %37
%39 = fneg float %38
%40 = call float @llvm.fmuladd.f32(float %34, float %35, float %39)
%41 = fdiv float %33, %40
store float %41, float* %7
%42 = load float, float* %3
%43 = load float, float* %4
%44 = fmul float %42, %43
%45 = load float, float* %2
%46 = load float, float* %5
%47 = fmul float %45, %46
%48 = fcmp une float %44, %47
br i1 %48, label %49, label %55
49: ; preds = %0
%50 = load float, float* %6
%51 = fpext float %50 to double
%52 = load float, float* %7
%53 = fpext float %52 to double
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %51, double %53)
br label %66
55: ; preds = %0
%56 = load float, float* %3
%57 = load float, float* %4
%58 = fmul float %56, %57
%59 = load float, float* %2
%60 = load float, float* %5
%61 = fmul float %59, %60
%62 = fcmp oeq float %58, %61
br i1 %62, label %63, label %65
63: ; preds = %55
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %65
65: ; preds = %63, %55
br label %66
66: ; preds = %65, %49
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [14 x i8] c"(%0.3f,%0.3f)\00"
@.str.2 = [4 x i8] c"INF\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = bitcast float* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %4)
%13 = load float, float* %1
%14 = load float, float* %2
%15 = load float, float* %3
%16 = load float, float* %4
%17 = fmul float %13, %16
%18 = fmul float %14, %15
%19 = fcmp une float %18, %17
br i1 %19, label %20, label %36
20: ; preds = %0
%21 = fmul float %15, %16
%22 = fsub float %13, %14
%23 = fmul float %22, %21
%24 = fneg float %18
%25 = call float @llvm.fmuladd.f32(float %13, float %16, float %24)
%26 = fdiv float %23, %25
%27 = fmul float %13, %14
%28 = fsub float %15, %16
%29 = fmul float %27, %28
%30 = fneg float %17
%31 = call float @llvm.fmuladd.f32(float %14, float %15, float %30)
%32 = fdiv float %29, %31
%33 = fpext float %32 to double
%34 = fpext float %26 to double
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %33, double %34)
br label %38
36: ; preds = %0
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %38
38: ; preds = %36, %20
ret i32 0
}