#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*/ cartesianas_polares(float, float, float *, float *);
int /*<<< orphan*/ polares_cartesianas(float, float, float *, float *);
int /*<<< orphan*/ printf(char *, float, float, float, float);
int main() {
  float x, y, r, theta;
  x = 60;
  y = 20;
  cartesianas_polares(x, y, &r, &theta);
  printf("(%f, %f): %f e %frad\n", x, y, r, theta);
  polares_cartesianas(r, theta, &x, &y);
  printf("%f e %frad: (%f, %f)\n", r, theta, x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeac(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <cartesianas_polares@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <polares_cartesianas@plt>
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
movss  -0xc(%rbp),%xmm3
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x42700000,0x14(%rsp)
42
movl   $0x41a00000,0x10(%rsp)
41
movss  0xeb4(%rip),%xmm0
movss  0xeb0(%rip),%xmm1
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <cartesianas_polares@plt>
movss  0xc(%rsp),%xmm2
movss  0x8(%rsp),%xmm3
lea    0xe92(%rip),%rdi
movss  0xe82(%rip),%xmm0
movss  0xe7e(%rip),%xmm1
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1050 <polares_cartesianas@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0x14(%rsp),%xmm2
movss  0x10(%rsp),%xmm3
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"(%f, %f): %f e %frad\0A\00"
@.str.1 = [22 x i8] c"%f e %frad: (%f, %f)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store float 6.000000e+01, float* %2
store float 2.000000e+01, float* %3
%6 = load float, float* %2
%7 = load float, float* %3
%8 = call i32 @cartesianas_polares(float %6, float %7, float* %4, float* %5)
%9 = load float, float* %2
%10 = load float, float* %3
%11 = load float, float* %4
%12 = load float, float* %5
%13 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float %9, float %10, float %11, float %12)
%14 = load float, float* %4
%15 = load float, float* %5
%16 = call i32 @polares_cartesianas(float %14, float %15, float* %2, float* %3)
%17 = load float, float* %4
%18 = load float, float* %5
%19 = load float, float* %2
%20 = load float, float* %3
%21 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), float %17, float %18, float %19, float %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"(%f, %f): %f e %frad\0A\00"
@.str.1 = [22 x i8] c"%f e %frad: (%f, %f)\0A\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*
store float 6.000000e+01, float* %1
store float 2.000000e+01, float* %2
%9 = call i32 @cartesianas_polares(float 6.000000e+01, float 2.000000e+01, float* %3, float* %4)
%10 = load float, float* %3
%11 = load float, float* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float 6.000000e+01, float 2.000000e+01, float %10, float %11)
%13 = load float, float* %3
%14 = load float, float* %4
%15 = call i32 @polares_cartesianas(float %13, float %14, float* %1, float* %2)
%16 = load float, float* %3
%17 = load float, float* %4
%18 = load float, float* %1
%19 = load float, float* %2
%20 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), float %16, float %17, float %18, float %19)
ret i32 0
}