#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*/ puts(char *);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float radians, degrees;
  puts("\tRadians to degrees converter\n");
  for (;;) {
    printf("Please enter the value in degrees here : ");
    scanf("%f", &degrees);
    radians = degrees * 0.0174532925;
    printf("\t%.2f degrees equals %f radians\n\n\n", degrees, radians);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef1(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe86(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xeaf(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
jmp    114b <main+0x1b>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%r14
lea    0xeff(%rip),%r15
lea    0x4(%rsp),%r12
lea    0xef6(%rip),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
mulsd  0xe76(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
jmp    1160 <main+0x30>

LLVM IR (-O0):
@.str = [31 x i8] c"\09Radians to degrees converter\0A\00"
@.str.1 = [42 x i8] c"Please enter the value in degrees here : \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [35 x i8] c"\09%.2f degrees equals %f radians\0A\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 @puts(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %5, %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fmul double %9, 0x3F91DF46A1FAE711
%11 = fptrunc double %10 to float
store float %11, float* %2
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = load float, float* %2
%15 = fpext float %14 to double
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %13, double %15)
br label %5
}

LLVM IR (-O2):
@.str = [31 x i8] c"\09Radians to degrees converter\0A\00"
@.str.1 = [42 x i8] c"Please enter the value in degrees here : \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [35 x i8] c"\09%.2f degrees equals %f radians\0A\0A\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %4, %0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%7 = load float, float* %1
%8 = fpext float %7 to double
%9 = fmul double %8, 0x3F91DF46A1FAE711
%10 = fptrunc double %9 to float
%11 = fpext float %10 to double
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %8, double %11)
br label %4
}