#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 */
double acos(int);
int cos(double);
int /*<<< orphan*/ printf(char *, int, int);
int sin(double);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int main(int argc, char **argv) {
  int tTa1, tTa2;
  int r = 0;
  double pi = acos(-1);
  if (argc == 4) {
    sscanf(argv[1], "%d", &tTa1);
    sscanf(argv[2], "%d", &tTa2);
    sscanf(argv[3], "%d", &r);
    printf("(x1,y1) : (%f,%f)\n", r * sin(pi * tTa1 / 180),
           r * cos(pi * tTa1 / 180));
    printf("(x2,y2) : (%f,%f)\n", r * sin(pi * tTa2 / 180),
           r * cos(pi * tTa2 / 180));
    printf("Vector : (%f,%f)\n",
           r * (sin(pi * tTa2 / 180) - sin(pi * tTa1 / 180)),
           r * (cos(pi * tTa2 / 180) - cos(pi * tTa1 / 180)));
  } else {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    $0xffffffff,%edi
call   1040 <acos@plt>
movsd  %xmm0,-0x28(%rbp)
cmpl   $0x4,-0x8(%rbp)
jne    1361 <main+0x211>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe73(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1060 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe5b(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1060 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xe43(%rip),%rsi
lea    -0x1c(%rbp),%rdx
call   1060 <sscanf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x54(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe16(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
mov    %eax,%ecx
mov    -0x54(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xde6(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1070 <cos@plt>
mov    -0x50(%rbp),%edx
mov    -0x4c(%rbp),%esi
imul   %eax,%edx
lea    0xdd8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdac(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x44(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd7c(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1070 <cos@plt>
mov    -0x44(%rbp),%edx
mov    -0x40(%rbp),%esi
imul   %eax,%edx
lea    0xd81(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd42(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
mov    %eax,-0x3c(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd20(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
mov    -0x3c(%rbp),%ecx
mov    %eax,%edx
mov    -0x38(%rbp),%eax
sub    %edx,%ecx
imul   %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x34(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xceb(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1070 <cos@plt>
mov    %eax,-0x2c(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcc9(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1070 <cos@plt>
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%esi
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
sub    %ecx,%eax
imul   %eax,%edx
lea    0xcda(%rip),%rdi
call   1030 <printf@plt>
jmp    1366 <main+0x216>
jmp    1366 <main+0x216>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
movl   $0x0,0xc(%rsp)
mov    $0xffffffff,%edi
call   1040 <acos@plt>
cmp    $0x4,%ebp
jne    12fc <main+0x1ac>
mov    0x8(%rbx),%rdi
lea    0xe85(%rip),%rbp
lea    0x14(%rsp),%rdx
mov    %rbp,%rsi
movsd  %xmm0,0x18(%rsp)
call   1060 <sscanf@plt>
mov    0x10(%rbx),%rdi
lea    0x10(%rsp),%rdx
mov    %rbp,%rsi
call   1060 <sscanf@plt>
mov    0x18(%rbx),%rdi
lea    0xc(%rsp),%rdx
mov    %rbp,%rsi
call   1060 <sscanf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x14(%rsp),%xmm0
mov    0xc(%rsp),%ebx
mulsd  0x18(%rsp),%xmm0
divsd  0xe2d(%rip),%xmm0
call   1050 <sin@plt>
imul   %eax,%ebx
mov    0xc(%rsp),%ebp
xorps  %xmm0,%xmm0
cvtsi2sdl 0x14(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
divsd  0xe0a(%rip),%xmm0
call   1070 <cos@plt>
imul   %eax,%ebp
lea    0xe06(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
mov    0xc(%rsp),%ebx
xorps  %xmm0,%xmm0
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
divsd  0xdd7(%rip),%xmm0
call   1050 <sin@plt>
imul   %eax,%ebx
mov    0xc(%rsp),%ebp
xorps  %xmm0,%xmm0
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
divsd  0xdb4(%rip),%xmm0
call   1070 <cos@plt>
imul   %eax,%ebp
lea    0xdc3(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
mov    0xc(%rsp),%ebp
xorps  %xmm0,%xmm0
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
divsd  0xd81(%rip),%xmm0
call   1050 <sin@plt>
mov    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sdl 0x14(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
divsd  0xd63(%rip),%xmm0
call   1050 <sin@plt>
sub    %eax,%ebx
imul   %ebp,%ebx
mov    0xc(%rsp),%r14d
xorps  %xmm0,%xmm0
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
divsd  0xd3d(%rip),%xmm0
call   1070 <cos@plt>
mov    %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sdl 0x14(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
divsd  0xd1f(%rip),%xmm0
call   1070 <cos@plt>
sub    %eax,%ebp
imul   %r14d,%ebp
lea    0xd3e(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [19 x i8] c"(x1,y1) : (%f,%f)\0A\00"
@.str.2 = [19 x i8] c"(x2,y2) : (%f,%f)\0A\00"
@.str.3 = [18 x i8] c"Vector : (%f,%f)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
%10 = call double @acos(i32 -1)
store double %10, double* %9
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 4
br i1 %12, label %13, label %91
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @sscanf(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = load i8*, i8** %19
%21 = call i32 @sscanf(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 3
%24 = load i8*, i8** %23
%25 = call i32 @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%26 = load i32, i32* %8
%27 = load double, double* %9
%28 = load i32, i32* %6
%29 = sitofp i32 %28 to double
%30 = fmul double %27, %29
%31 = fdiv double %30, 1.800000e+02
%32 = call i32 @sin(double %31)
%33 = mul nsw i32 %26, %32
%34 = load i32, i32* %8
%35 = load double, double* %9
%36 = load i32, i32* %6
%37 = sitofp i32 %36 to double
%38 = fmul double %35, %37
%39 = fdiv double %38, 1.800000e+02
%40 = call i32 @cos(double %39)
%41 = mul nsw i32 %34, %40
%42 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %33, i32 %41)
%43 = load i32, i32* %8
%44 = load double, double* %9
%45 = load i32, i32* %7
%46 = sitofp i32 %45 to double
%47 = fmul double %44, %46
%48 = fdiv double %47, 1.800000e+02
%49 = call i32 @sin(double %48)
%50 = mul nsw i32 %43, %49
%51 = load i32, i32* %8
%52 = load double, double* %9
%53 = load i32, i32* %7
%54 = sitofp i32 %53 to double
%55 = fmul double %52, %54
%56 = fdiv double %55, 1.800000e+02
%57 = call i32 @cos(double %56)
%58 = mul nsw i32 %51, %57
%59 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %50, i32 %58)
%60 = load i32, i32* %8
%61 = load double, double* %9
%62 = load i32, i32* %7
%63 = sitofp i32 %62 to double
%64 = fmul double %61, %63
%65 = fdiv double %64, 1.800000e+02
%66 = call i32 @sin(double %65)
%67 = load double, double* %9
%68 = load i32, i32* %6
%69 = sitofp i32 %68 to double
%70 = fmul double %67, %69
%71 = fdiv double %70, 1.800000e+02
%72 = call i32 @sin(double %71)
%73 = sub nsw i32 %66, %72
%74 = mul nsw i32 %60, %73
%75 = load i32, i32* %8
%76 = load double, double* %9
%77 = load i32, i32* %7
%78 = sitofp i32 %77 to double
%79 = fmul double %76, %78
%80 = fdiv double %79, 1.800000e+02
%81 = call i32 @cos(double %80)
%82 = load double, double* %9
%83 = load i32, i32* %6
%84 = sitofp i32 %83 to double
%85 = fmul double %82, %84
%86 = fdiv double %85, 1.800000e+02
%87 = call i32 @cos(double %86)
%88 = sub nsw i32 %81, %87
%89 = mul nsw i32 %75, %88
%90 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %74, i32 %89)
br label %92
91: ; preds = %2
br label %92
92: ; preds = %91, %13
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [19 x i8] c"(x1,y1) : (%f,%f)\0A\00"
@.str.2 = [19 x i8] c"(x2,y2) : (%f,%f)\0A\00"
@.str.3 = [18 x i8] c"Vector : (%f,%f)\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%9 = tail call double @acos(i32 -1)
%10 = icmp eq i32 %0, 4
br i1 %10, label %11, label %78
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @sscanf(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%15 = getelementptr inbounds i8*, i8** %1, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @sscanf(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%18 = getelementptr inbounds i8*, i8** %1, i64 3
%19 = load i8*, i8** %18
%20 = call i32 @sscanf(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%21 = load i32, i32* %5
%22 = load i32, i32* %3
%23 = sitofp i32 %22 to double
%24 = fmul double %9, %23
%25 = fdiv double %24, 1.800000e+02
%26 = call i32 @sin(double %25)
%27 = mul nsw i32 %26, %21
%28 = load i32, i32* %5
%29 = load i32, i32* %3
%30 = sitofp i32 %29 to double
%31 = fmul double %9, %30
%32 = fdiv double %31, 1.800000e+02
%33 = call i32 @cos(double %32)
%34 = mul nsw i32 %33, %28
%35 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %34)
%36 = load i32, i32* %5
%37 = load i32, i32* %4
%38 = sitofp i32 %37 to double
%39 = fmul double %9, %38
%40 = fdiv double %39, 1.800000e+02
%41 = call i32 @sin(double %40)
%42 = mul nsw i32 %41, %36
%43 = load i32, i32* %5
%44 = load i32, i32* %4
%45 = sitofp i32 %44 to double
%46 = fmul double %9, %45
%47 = fdiv double %46, 1.800000e+02
%48 = call i32 @cos(double %47)
%49 = mul nsw i32 %48, %43
%50 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %42, i32 %49)
%51 = load i32, i32* %5
%52 = load i32, i32* %4
%53 = sitofp i32 %52 to double
%54 = fmul double %9, %53
%55 = fdiv double %54, 1.800000e+02
%56 = call i32 @sin(double %55)
%57 = load i32, i32* %3
%58 = sitofp i32 %57 to double
%59 = fmul double %9, %58
%60 = fdiv double %59, 1.800000e+02
%61 = call i32 @sin(double %60)
%62 = sub nsw i32 %56, %61
%63 = mul nsw i32 %62, %51
%64 = load i32, i32* %5
%65 = load i32, i32* %4
%66 = sitofp i32 %65 to double
%67 = fmul double %9, %66
%68 = fdiv double %67, 1.800000e+02
%69 = call i32 @cos(double %68)
%70 = load i32, i32* %3
%71 = sitofp i32 %70 to double
%72 = fmul double %9, %71
%73 = fdiv double %72, 1.800000e+02
%74 = call i32 @cos(double %73)
%75 = sub nsw i32 %69, %74
%76 = mul nsw i32 %75, %64
%77 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %63, i32 %76)
br label %78
78: ; preds = %2, %11
ret i32 0
}