#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*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __aosc_split_and_8(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
void __aosc_split_and_16(uint16_t *word1, uint16_t *word2) {
  size_t i;
  uint8_t *__word1 = (uint8_t *)word1;
  uint8_t *__word2 = (uint8_t *)word2;
  for (i = 0; i < sizeof(uint16_t); i++)
    __aosc_split_and_8(__word1 + i, __word2 + i);
}


x86 assembly (clang, -O0):
<__aosc_split_and_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x4,-0x18(%rbp)
jae    1177 <__aosc_split_and_16+0x67>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
call   1030 <__aosc_split_and_8@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1138 <__aosc_split_and_16+0x28>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__aosc_split_and_16>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <__aosc_split_and_8@plt>
lea    0x4(%rbx),%rdi
lea    0x4(%r14),%rsi
call   1030 <__aosc_split_and_8@plt>
lea    0x8(%rbx),%rdi
lea    0x8(%r14),%rsi
call   1030 <__aosc_split_and_8@plt>
add    $0xc,%rbx
add    $0xc,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__aosc_split_and_8@plt>

LLVM IR (-O0):
define void @__aosc_split_and_16(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32*
%7 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
store i32* %8, i32** %6
%9 = load i32*, i32** %4
store i32* %9, i32** %7
store i64 0, i64* %5
br label %10
10: ; preds = %21, %2
%11 = load i64, i64* %5
%12 = icmp ult i64 %11, 4
br i1 %12, label %13, label %24
13: ; preds = %10
%14 = load i32*, i32** %6
%15 = load i64, i64* %5
%16 = getelementptr inbounds i32, i32* %14, i64 %15
%17 = load i32*, i32** %7
%18 = load i64, i64* %5
%19 = getelementptr inbounds i32, i32* %17, i64 %18
%20 = call i32 @__aosc_split_and_8(i32* %16, i32* %19)
br label %21
21: ; preds = %13
%22 = load i64, i64* %5
%23 = add i64 %22, 1
store i64 %23, i64* %5
br label %10
24: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @__aosc_split_and_16(i32* %0, i32* %1) {
%3 = tail call i32 @__aosc_split_and_8(i32* %0, i32* %1)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = tail call i32 @__aosc_split_and_8(i32* %4, i32* %5)
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = getelementptr inbounds i32, i32* %1, i64 2
%9 = tail call i32 @__aosc_split_and_8(i32* %7, i32* %8)
%10 = getelementptr inbounds i32, i32* %0, i64 3
%11 = getelementptr inbounds i32, i32* %1, i64 3
%12 = tail call i32 @__aosc_split_and_8(i32* %10, i32* %11)
ret void
}