#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 *, float *, float *, float *, float *,
                         float *);
int main() {
  float x1, x2, a, b, c, d, m, n;
  printf("Enter The Value of A B C D M N: ");
  scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &m, &n);
  if ((a * d - c * b) != 0) {
    x1 = (m * d - b * n) / (a * d - c * b);
    x2 = (n * a - m * c) / (a * d - c * b);
    printf("X1= %.2f X2= %.2f \n", x1, x2);
  } else
    printf("ad - cb is 0... can't proceed!! ");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
lea    -0x20(%rbp),%r9
lea    -0x24(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
movss  -0x18(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11a5 <main+0x85>
jp     11a5 <main+0x85>
jmp    1280 <main+0x160>
movss  -0x20(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
movss  -0x14(%rbp),%xmm1
mulss  -0x24(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm3
movss  -0x18(%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,-0x8(%rbp)
movss  -0x24(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0x20(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm3
movss  -0x18(%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,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xdbf(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    128e <main+0x16e>
lea    0xdc0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rax
mov    %rax,(%rsp)
lea    0xedf(%rip),%rdi
lea    0x24(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x14(%rsp),%r9
call   1040 <scanf@plt>
movss  0x24(%rsp),%xmm1
movss  0x18(%rsp),%xmm0
movss  0x1c(%rsp),%xmm2
movss  0x20(%rsp),%xmm4
movaps %xmm4,%xmm5
mulss  %xmm2,%xmm5
movaps %xmm1,%xmm3
mulss  %xmm0,%xmm3
subss  %xmm5,%xmm3
xorps  %xmm5,%xmm5
ucomiss %xmm5,%xmm3
jne    1194 <main+0x74>
jnp    11d8 <main+0xb8>
movss  0x14(%rsp),%xmm5
movss  0x10(%rsp),%xmm6
mulss  %xmm6,%xmm4
mulss  %xmm5,%xmm0
subss  %xmm4,%xmm0
divss  %xmm3,%xmm0
mulss  %xmm5,%xmm2
mulss  %xmm6,%xmm1
subss  %xmm2,%xmm1
divss  %xmm3,%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
lea    0xe64(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    11e6 <main+0xc6>
lea    0xe68(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Enter The Value of A B C D M N: \00"
@.str.1 = [18 x i8] c"%f %f %f %f %f %f\00"
@.str.2 = [20 x i8] c"X1= %.2f X2= %.2f \0A\00"
@.str.3 = [33 x i8] c"ad - cb is 0... can't proceed!! \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
%8 = alloca float
%9 = alloca float
store i32 0, i32* %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), float* %4, float* %5, float* %6, float* %7, float* %8, float* %9)
%12 = load float, float* %4
%13 = load float, float* %7
%14 = load float, float* %6
%15 = load float, float* %5
%16 = fmul float %14, %15
%17 = fneg float %16
%18 = call float @llvm.fmuladd.f32(float %12, float %13, float %17)
%19 = fcmp une float %18, 0.000000e+00
br i1 %19, label %20, label %56
20: ; preds = %0
%21 = load float, float* %8
%22 = load float, float* %7
%23 = load float, float* %5
%24 = load float, float* %9
%25 = fmul float %23, %24
%26 = fneg float %25
%27 = call float @llvm.fmuladd.f32(float %21, float %22, float %26)
%28 = load float, float* %4
%29 = load float, float* %7
%30 = load float, float* %6
%31 = load float, float* %5
%32 = fmul float %30, %31
%33 = fneg float %32
%34 = call float @llvm.fmuladd.f32(float %28, float %29, float %33)
%35 = fdiv float %27, %34
store float %35, float* %2
%36 = load float, float* %9
%37 = load float, float* %4
%38 = load float, float* %8
%39 = load float, float* %6
%40 = fmul float %38, %39
%41 = fneg float %40
%42 = call float @llvm.fmuladd.f32(float %36, float %37, float %41)
%43 = load float, float* %4
%44 = load float, float* %7
%45 = load float, float* %6
%46 = load float, float* %5
%47 = fmul float %45, %46
%48 = fneg float %47
%49 = call float @llvm.fmuladd.f32(float %43, float %44, float %48)
%50 = fdiv float %42, %49
store float %50, float* %3
%51 = load float, float* %2
%52 = fpext float %51 to double
%53 = load float, float* %3
%54 = fpext float %53 to double
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %52, double %54)
br label %58
56: ; preds = %0
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %58
58: ; preds = %56, %20
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Enter The Value of A B C D M N: \00"
@.str.1 = [18 x i8] c"%f %f %f %f %f %f\00"
@.str.2 = [20 x i8] c"X1= %.2f X2= %.2f \0A\00"
@.str.3 = [33 x i8] c"ad - cb is 0... can't proceed!! \00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = bitcast float* %1 to i8*
%8 = bitcast float* %2 to i8*
%9 = bitcast float* %3 to i8*
%10 = bitcast float* %4 to i8*
%11 = bitcast float* %5 to i8*
%12 = bitcast float* %6 to i8*
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4, float* %5, float* %6)
%15 = load float, float* %1
%16 = load float, float* %4
%17 = load float, float* %3
%18 = load float, float* %2
%19 = fneg float %17
%20 = fmul float %18, %19
%21 = call float @llvm.fmuladd.f32(float %15, float %16, float %20)
%22 = fcmp une float %21, 0.000000e+00
br i1 %22, label %23, label %37
23: ; preds = %0
%24 = load float, float* %5
%25 = load float, float* %6
%26 = fneg float %18
%27 = fmul float %25, %26
%28 = call float @llvm.fmuladd.f32(float %24, float %16, float %27)
%29 = fdiv float %28, %21
%30 = fneg float %24
%31 = fmul float %17, %30
%32 = call float @llvm.fmuladd.f32(float %25, float %15, float %31)
%33 = fdiv float %32, %21
%34 = fpext float %29 to double
%35 = fpext float %33 to double
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %34, double %35)
br label %39
37: ; preds = %0
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %39
39: ; preds = %37, %23
ret i32 0
}