#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 sin(double);
scalar_t__ swalloc(int);
double func23aa(double d) {
  double *dd = (double *)swalloc(sizeof(double));
  *dd = sin(d);
  return sin((double)(int)dd) * sin(*dd) * sin(d) * sin((double)(int)&d);
}


x86 assembly (clang, -O0):
<func23aa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x8,%edi
call   1030 <swalloc@plt>
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
cvtsi2sd %eax,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    -0x8(%rbp),%rax
cvtsi2sd %eax,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func23aa>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    $0x8,%edi
call   1030 <swalloc@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,(%rbx)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  (%rbx),%xmm0
call   1040 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
lea    0x8(%rsp),%rax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
call   1040 <sin@plt>
mulsd  (%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @func23aa(double %0) {
%2 = alloca double
%3 = alloca double*
store double %0, double* %2
%4 = call i64 @swalloc(i32 8)
%5 = inttoptr i64 %4 to double*
store double* %5, double** %3
%6 = load double, double* %2
%7 = call double @sin(double %6)
%8 = load double*, double** %3
store double %7, double* %8
%9 = load double*, double** %3
%10 = ptrtoint double* %9 to i32
%11 = sitofp i32 %10 to double
%12 = call double @sin(double %11)
%13 = load double*, double** %3
%14 = load double, double* %13
%15 = call double @sin(double %14)
%16 = fmul double %12, %15
%17 = load double, double* %2
%18 = call double @sin(double %17)
%19 = fmul double %16, %18
%20 = ptrtoint double* %2 to i32
%21 = sitofp i32 %20 to double
%22 = call double @sin(double %21)
%23 = fmul double %19, %22
ret double %23
}

LLVM IR (-O2):
define double @func23aa(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = tail call i64 @swalloc(i32 8)
%4 = inttoptr i64 %3 to double*
%5 = tail call double @sin(double %0)
store double %5, double* %4
%6 = trunc i64 %3 to i32
%7 = sitofp i32 %6 to double
%8 = tail call double @sin(double %7)
%9 = load double, double* %4
%10 = tail call double @sin(double %9)
%11 = fmul double %8, %10
%12 = load double, double* %2
%13 = tail call double @sin(double %12)
%14 = fmul double %11, %13
%15 = ptrtoint double* %2 to i64
%16 = trunc i64 %15 to i32
%17 = sitofp i32 %16 to double
%18 = call double @sin(double %17)
%19 = fmul double %14, %18
ret double %19
}