#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 floor(double);
void t360(double *a, double *b) {
  *a -= (floor(*a / 360.0) * 360.0);
  *b -= (floor(*b / 360.0) * 360.0);
}


x86 assembly (clang, -O0):
<t360>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xed0(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <floor@plt>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
movsd  0xea0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xe84(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <floor@plt>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
movsd  0xe54(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t360>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsp)
divsd  0xed5(%rip),%xmm0
call   1030 <floor@plt>
movsd  0xec8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  (%rsp),%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx)
movsd  (%r14),%xmm0
movsd  %xmm0,(%rsp)
divsd  %xmm1,%xmm0
call   1030 <floor@plt>
mulsd  0xe9c(%rip),%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @t360(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = fdiv double %6, 3.600000e+02
%8 = call double @llvm.floor.f64(double %7)
%9 = load double*, double** %3
%10 = load double, double* %9
%11 = fneg double %8
%12 = call double @llvm.fmuladd.f64(double %11, double 3.600000e+02, double %10)
store double %12, double* %9
%13 = load double*, double** %4
%14 = load double, double* %13
%15 = fdiv double %14, 3.600000e+02
%16 = call double @llvm.floor.f64(double %15)
%17 = load double*, double** %4
%18 = load double, double* %17
%19 = fneg double %16
%20 = call double @llvm.fmuladd.f64(double %19, double 3.600000e+02, double %18)
store double %20, double* %17
ret void
}

LLVM IR (-O2):
define void @t360(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = fdiv double %3, 3.600000e+02
%5 = tail call double @llvm.floor.f64(double %4)
%6 = fneg double %5
%7 = tail call double @llvm.fmuladd.f64(double %6, double 3.600000e+02, double %3)
store double %7, double* %0
%8 = load double, double* %1
%9 = fdiv double %8, 3.600000e+02
%10 = tail call double @llvm.floor.f64(double %9)
%11 = fneg double %10
%12 = tail call double @llvm.fmuladd.f64(double %11, double 3.600000e+02, double %8)
store double %12, double* %1
ret void
}