#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 */
typedef scalar_t__ GLdouble;

/* Variables and functions */
void diff3(GLdouble p[3], GLdouble q[3], GLdouble diff[3]) {
  diff[0] = p[0] - q[0];
  diff[1] = p[1] - q[1];
  diff[2] = p[2] - q[2];
}


x86 assembly (clang, -O0):
<diff3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
sub    (%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x10(%rbp),%rax
sub    0x8(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rcx
mov    -0x10(%rbp),%rax
sub    0x10(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<diff3>:
mov    (%rdi),%rax
sub    (%rsi),%rax
mov    %rax,(%rdx)
mov    0x8(%rdi),%rax
sub    0x8(%rsi),%rax
mov    %rax,0x8(%rdx)
mov    0x10(%rdi),%rax
sub    0x10(%rsi),%rax
mov    %rax,0x10(%rdx)
ret

LLVM IR (-O0):
define void @diff3(i64* %0, i64* %1, i64* %2) {
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i64*
store i64* %0, i64** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i64*, i64** %4
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = load i64*, i64** %5
%11 = getelementptr inbounds i64, i64* %10, i64 0
%12 = load i64, i64* %11
%13 = sub nsw i64 %9, %12
%14 = load i64*, i64** %6
%15 = getelementptr inbounds i64, i64* %14, i64 0
store i64 %13, i64* %15
%16 = load i64*, i64** %4
%17 = getelementptr inbounds i64, i64* %16, i64 1
%18 = load i64, i64* %17
%19 = load i64*, i64** %5
%20 = getelementptr inbounds i64, i64* %19, i64 1
%21 = load i64, i64* %20
%22 = sub nsw i64 %18, %21
%23 = load i64*, i64** %6
%24 = getelementptr inbounds i64, i64* %23, i64 1
store i64 %22, i64* %24
%25 = load i64*, i64** %4
%26 = getelementptr inbounds i64, i64* %25, i64 2
%27 = load i64, i64* %26
%28 = load i64*, i64** %5
%29 = getelementptr inbounds i64, i64* %28, i64 2
%30 = load i64, i64* %29
%31 = sub nsw i64 %27, %30
%32 = load i64*, i64** %6
%33 = getelementptr inbounds i64, i64* %32, i64 2
store i64 %31, i64* %33
ret void
}

LLVM IR (-O2):
define void @diff3(i64* nocapture %0, i64* nocapture %1, i64* nocapture writeonly %2) {
%4 = load i64, i64* %0
%5 = load i64, i64* %1
%6 = sub nsw i64 %4, %5
store i64 %6, i64* %2
%7 = getelementptr inbounds i64, i64* %0, i64 1
%8 = load i64, i64* %7
%9 = getelementptr inbounds i64, i64* %1, i64 1
%10 = load i64, i64* %9
%11 = sub nsw i64 %8, %10
%12 = getelementptr inbounds i64, i64* %2, i64 1
store i64 %11, i64* %12
%13 = getelementptr inbounds i64, i64* %0, i64 2
%14 = load i64, i64* %13
%15 = getelementptr inbounds i64, i64* %1, i64 2
%16 = load i64, i64* %15
%17 = sub nsw i64 %14, %16
%18 = getelementptr inbounds i64, i64* %2, i64 2
store i64 %17, i64* %18
ret void
}