#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 int /*<<< orphan*/ GLdouble;

/* Variables and functions */
void copymat3(GLdouble *to, GLdouble *from) {
  int i;
  for (i = 0; i < 9; i++) {
    *to++ = *from++;
  }
}


x86 assembly (clang, -O0):
<copymat3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x9,-0x14(%rbp)
jge    114d <copymat3+0x4d>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <copymat3+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copymat3>:
mov    (%rsi),%eax
mov    %eax,(%rdi)
mov    0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
mov    0x8(%rsi),%eax
mov    %eax,0x8(%rdi)
mov    0xc(%rsi),%eax
mov    %eax,0xc(%rdi)
mov    0x10(%rsi),%eax
mov    %eax,0x10(%rdi)
mov    0x14(%rsi),%eax
mov    %eax,0x14(%rdi)
mov    0x18(%rsi),%eax
mov    %eax,0x18(%rdi)
mov    0x1c(%rsi),%eax
mov    %eax,0x1c(%rdi)
mov    0x20(%rsi),%eax
mov    %eax,0x20(%rdi)
ret

LLVM IR (-O0):
define void @copymat3(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 9
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i32 1
store i32* %11, i32** %4
%12 = load i32, i32* %10
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i32 1
store i32* %14, i32** %3
store i32 %12, i32* %13
br label %15
15: ; preds = %9
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @copymat3(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 1
%4 = load i32, i32* %1
%5 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %4, i32* %0
%6 = getelementptr inbounds i32, i32* %1, i64 2
%7 = load i32, i32* %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %7, i32* %5
%9 = getelementptr inbounds i32, i32* %1, i64 3
%10 = load i32, i32* %6
%11 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %10, i32* %8
%12 = getelementptr inbounds i32, i32* %1, i64 4
%13 = load i32, i32* %9
%14 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %13, i32* %11
%15 = getelementptr inbounds i32, i32* %1, i64 5
%16 = load i32, i32* %12
%17 = getelementptr inbounds i32, i32* %0, i64 5
store i32 %16, i32* %14
%18 = getelementptr inbounds i32, i32* %1, i64 6
%19 = load i32, i32* %15
%20 = getelementptr inbounds i32, i32* %0, i64 6
store i32 %19, i32* %17
%21 = getelementptr inbounds i32, i32* %1, i64 7
%22 = load i32, i32* %18
%23 = getelementptr inbounds i32, i32* %0, i64 7
store i32 %22, i32* %20
%24 = getelementptr inbounds i32, i32* %1, i64 8
%25 = load i32, i32* %21
%26 = getelementptr inbounds i32, i32* %0, i64 8
store i32 %25, i32* %23
%27 = load i32, i32* %24
store i32 %27, i32* %26
ret void
}