#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 */
int /*<<< orphan*/ stage_scale2x(void *, void *, void const *, void const *,
                                 void const *, unsigned int, int);
void stage_scale4x(void *dst0, void *dst1, void *dst2, void *dst3,
                   const void *src0, const void *src1, const void *src2,
                   const void *src3, unsigned pixel, unsigned pixel_per_row) {
  stage_scale2x(dst0, dst1, src0, src1, src2, pixel, 2 * pixel_per_row);
  stage_scale2x(dst2, dst3, src1, src2, src3, pixel, 2 * pixel_per_row);
}


x86 assembly (clang, -O0):
<stage_scale4x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r8
mov    0x20(%rbp),%r9d
mov    0x28(%rbp),%eax
shl    $0x1,%eax
mov    %eax,(%rsp)
call   1030 <stage_scale2x@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8
mov    0x20(%rbp),%r9d
mov    0x28(%rbp),%eax
shl    $0x1,%eax
mov    %eax,(%rsp)
call   1030 <stage_scale2x@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stage_scale4x>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    0x40(%rsp),%r13
mov    0x50(%rsp),%ebp
mov    0x58(%rsp),%r12d
add    %r12d,%r12d
mov    %r12d,(%rsp)
mov    %r8,%rdx
mov    %r9,%rcx
mov    %r13,%r8
mov    %ebp,%r9d
call   1030 <stage_scale2x@plt>
mov    %r12d,(%rsp)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r13,%rcx
mov    0x48(%rsp),%r8
mov    %ebp,%r9d
call   1030 <stage_scale2x@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @stage_scale4x(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i32 %8, i32 %9) {
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i32
%20 = alloca i32
store i8* %0, i8** %11
store i8* %1, i8** %12
store i8* %2, i8** %13
store i8* %3, i8** %14
store i8* %4, i8** %15
store i8* %5, i8** %16
store i8* %6, i8** %17
store i8* %7, i8** %18
store i32 %8, i32* %19
store i32 %9, i32* %20
%21 = load i8*, i8** %11
%22 = load i8*, i8** %12
%23 = load i8*, i8** %15
%24 = load i8*, i8** %16
%25 = load i8*, i8** %17
%26 = load i32, i32* %19
%27 = load i32, i32* %20
%28 = mul i32 2, %27
%29 = call i32 @stage_scale2x(i8* %21, i8* %22, i8* %23, i8* %24, i8* %25, i32 %26, i32 %28)
%30 = load i8*, i8** %13
%31 = load i8*, i8** %14
%32 = load i8*, i8** %16
%33 = load i8*, i8** %17
%34 = load i8*, i8** %18
%35 = load i32, i32* %19
%36 = load i32, i32* %20
%37 = mul i32 2, %36
%38 = call i32 @stage_scale2x(i8* %30, i8* %31, i8* %32, i8* %33, i8* %34, i32 %35, i32 %37)
ret void
}

LLVM IR (-O2):
define void @stage_scale4x(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i32 %8, i32 %9) {
%11 = shl i32 %9, 1
%12 = tail call i32 @stage_scale2x(i8* %0, i8* %1, i8* %4, i8* %5, i8* %6, i32 %8, i32 %11)
%13 = tail call i32 @stage_scale2x(i8* %2, i8* %3, i8* %5, i8* %6, i8* %7, i32 %8, i32 %11)
ret void
}