#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 cos(double);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, double *, double *);
int sin(double);
int main(void) {
  int A = 7, B = 5;
  double t, dt;
  scanf("%lf%lf", &t, &dt);
  for (int i = 0; i < 10; ++i) {
    printf("(x,y) = (%lf,%lf)\n", A * sin(t + i * dt) / (t + i * dt),
           B * cos(t + i * dt));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
lea    0xe9c(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1050 <scanf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xa,-0x24(%rbp)
jge    1217 <main+0xd7>
mov    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm1
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sin@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x18(%rbp),%xmm2
cvtsi2sdl -0x24(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
movsd  -0x18(%rbp),%xmm1
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <cos@plt>
mov    -0x2c(%rbp),%edx
mov    -0x28(%rbp),%esi
imul   %eax,%edx
lea    0xe03(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1178 <main+0x38>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
lea    0xeb9(%rip),%rdi
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1050 <scanf@plt>
xorpd  %xmm1,%xmm1
mov    $0xa,%ebx
lea    0xea1(%rip),%r14
xchg   %ax,%ax
movsd  %xmm1,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
addsd  0x18(%rsp),%xmm0
call   1040 <sin@plt>
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%ebp
call   1060 <cos@plt>
lea    (%rax,%rax,4),%edx
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm1
addsd  0xe2b(%rip),%xmm1
add    $0xffffffff,%ebx
jne    1170 <main+0x30>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%lf%lf\00"
@.str.1 = [19 x i8] c"(x,y) = (%lf,%lf)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store i32 0, i32* %1
store i32 7, i32* %2
store i32 5, i32* %3
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %4, double* %5)
store i32 0, i32* %6
br label %8
8: ; preds = %37, %0
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %40
11: ; preds = %8
%12 = load i32, i32* %2
%13 = load double, double* %4
%14 = load i32, i32* %6
%15 = sitofp i32 %14 to double
%16 = load double, double* %5
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double %13)
%18 = call i32 @sin(double %17)
%19 = mul nsw i32 %12, %18
%20 = sitofp i32 %19 to double
%21 = load double, double* %4
%22 = load i32, i32* %6
%23 = sitofp i32 %22 to double
%24 = load double, double* %5
%25 = call double @llvm.fmuladd.f64(double %23, double %24, double %21)
%26 = fdiv double %20, %25
%27 = fptosi double %26 to i32
%28 = load i32, i32* %3
%29 = load double, double* %4
%30 = load i32, i32* %6
%31 = sitofp i32 %30 to double
%32 = load double, double* %5
%33 = call double @llvm.fmuladd.f64(double %31, double %32, double %29)
%34 = call i32 @cos(double %33)
%35 = mul nsw i32 %28, %34
%36 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %35)
br label %37
37: ; preds = %11
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 1
store i32 %39, i32* %6
br label %8
40: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%lf%lf\00"
@.str.1 = [19 x i8] c"(x,y) = (%lf,%lf)\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
br label %7
6: ; preds = %7
ret i32 0
7: ; preds = %0, %7
%8 = phi i32 [ 0, %0 ], [ %24, %7 ]
%9 = load double, double* %1
%10 = sitofp i32 %8 to double
%11 = load double, double* %2
%12 = call double @llvm.fmuladd.f64(double %10, double %11, double %9)
%13 = call i32 @sin(double %12)
%14 = mul nsw i32 %13, 7
%15 = sitofp i32 %14 to double
%16 = load double, double* %1
%17 = load double, double* %2
%18 = call double @llvm.fmuladd.f64(double %10, double %17, double %16)
%19 = fdiv double %15, %18
%20 = fptosi double %19 to i32
%21 = call i32 @cos(double %18)
%22 = mul nsw i32 %21, 5
%23 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %22)
%24 = add nuw nsw i32 %8, 1
%25 = icmp eq i32 %24, 10
br i1 %25, label %6, label %7
}