#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*/ polar(double, double, double *, double *);
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main() {
  double x = 0.0, y = 0.0;
  puts("Ներածիր դեկարտյան կոորդինատները x,y․ ");
  scanf("%lf,%lf", &x, &y);
  double rho = 0.0, phi = 0.0;
  polar(x, y, &rho, &phi);
  puts("Բևեռային կոորդնատներն են․ ");
  printf("ρ = %lf, φ = %lf\n", rho, phi);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xe9a(%rip),%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1060 <scanf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1040 <polar@plt>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0xebd(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movq   $0x0,0x20(%rsp)
movq   $0x0,0x18(%rsp)
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
call   1060 <scanf@plt>
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <polar@plt>
lea    0xea1(%rip),%rdi
call   1030 <puts@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xebc(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [69 x i8] c"\D5\86\D5\A5\D6\80\D5\A1\D5\AE\D5\AB\D6\80 \D5\A4\D5\A5\D5\AF\D5\A1\D6\80\D5\BF\D5\B5\D5\A1\D5\B6 \D5\AF\D5\B8\D5\B8\D6\80\D5\A4\D5\AB\D5\B6\D5\A1\D5\BF\D5\B6\D5\A5\D6\80\D5\A8 x,y\E2\80\A4 \00"
@.str.1 = [8 x i8] c"%lf,%lf\00"
@.str.2 = [51 x i8] c"\D4\B2\D6\87\D5\A5\D5\BC\D5\A1\D5\B5\D5\AB\D5\B6 \D5\AF\D5\B8\D5\B8\D6\80\D5\A4\D5\B6\D5\A1\D5\BF\D5\B6\D5\A5\D6\80\D5\B6 \D5\A5\D5\B6\E2\80\A4 \00"
@.str.3 = [20 x i8] c"\CF\81 = %lf, \CF\86 = %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
store double 0.000000e+00, double* %3
%6 = call i32 @puts(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3)
store double 0.000000e+00, double* %4
store double 0.000000e+00, double* %5
%8 = load double, double* %2
%9 = load double, double* %3
%10 = call i32 @polar(double %8, double %9, double* %4, double* %5)
%11 = call i32 @puts(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%12 = load double, double* %4
%13 = load double, double* %5
%14 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %12, double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [69 x i8] c"\D5\86\D5\A5\D6\80\D5\A1\D5\AE\D5\AB\D6\80 \D5\A4\D5\A5\D5\AF\D5\A1\D6\80\D5\BF\D5\B5\D5\A1\D5\B6 \D5\AF\D5\B8\D5\B8\D6\80\D5\A4\D5\AB\D5\B6\D5\A1\D5\BF\D5\B6\D5\A5\D6\80\D5\A8 x,y\E2\80\A4 \00"
@.str.1 = [8 x i8] c"%lf,%lf\00"
@.str.2 = [51 x i8] c"\D4\B2\D6\87\D5\A5\D5\BC\D5\A1\D5\B5\D5\AB\D5\B6 \D5\AF\D5\B8\D5\B8\D6\80\D5\A4\D5\B6\D5\A1\D5\BF\D5\B6\D5\A5\D6\80\D5\B6 \D5\A5\D5\B6\E2\80\A4 \00"
@.str.3 = [20 x i8] c"\CF\81 = %lf, \CF\86 = %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%6 = bitcast double* %2 to i8*
store double 0.000000e+00, double* %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2)
%9 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
%10 = bitcast double* %4 to i8*
store double 0.000000e+00, double* %4
%11 = load double, double* %1
%12 = load double, double* %2
%13 = call i32 @polar(double %11, double %12, double* %3, double* %4)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%15 = load double, double* %3
%16 = load double, double* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %15, double %16)
ret i32 0
}