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


x86 assembly (clang, -O0):
<stage_scale4x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x30(%rbp),%eax
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),%r10d
shl    $0x1,%r10d
mov    0x30(%rbp),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%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),%r10d
shl    $0x1,%r10d
mov    0x30(%rbp),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%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    0x60(%rsp),%eax
mov    0x58(%rsp),%r12d
add    %r12d,%r12d
mov    %r8,%rdx
mov    %r9,%rcx
mov    %r13,%r8
mov    %ebp,%r9d
push   %rax
push   %r12
call   1030 <stage_scale2x@plt>
add    $0x10,%rsp
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r13,%rcx
mov    0x48(%rsp),%r8
mov    %ebp,%r9d
mov    0x60(%rsp),%eax
push   %rax
push   %r12
call   1030 <stage_scale2x@plt>
add    $0x18,%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, i32 %10) {
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i8* %0, i8** %12
store i8* %1, i8** %13
store i8* %2, i8** %14
store i8* %3, i8** %15
store i8* %4, i8** %16
store i8* %5, i8** %17
store i8* %6, i8** %18
store i8* %7, i8** %19
store i32 %8, i32* %20
store i32 %9, i32* %21
store i32 %10, i32* %22
%23 = load i8*, i8** %12
%24 = load i8*, i8** %13
%25 = load i8*, i8** %16
%26 = load i8*, i8** %17
%27 = load i8*, i8** %18
%28 = load i32, i32* %20
%29 = load i32, i32* %21
%30 = mul i32 2, %29
%31 = load i32, i32* %22
%32 = call i32 @stage_scale2x(i8* %23, i8* %24, i8* %25, i8* %26, i8* %27, i32 %28, i32 %30, i32 %31)
%33 = load i8*, i8** %14
%34 = load i8*, i8** %15
%35 = load i8*, i8** %17
%36 = load i8*, i8** %18
%37 = load i8*, i8** %19
%38 = load i32, i32* %20
%39 = load i32, i32* %21
%40 = mul i32 2, %39
%41 = load i32, i32* %22
%42 = call i32 @stage_scale2x(i8* %33, i8* %34, i8* %35, i8* %36, i8* %37, i32 %38, i32 %40, i32 %41)
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, i32 %10) {
%12 = shl i32 %9, 1
%13 = tail call i32 @stage_scale2x(i8* %0, i8* %1, i8* %4, i8* %5, i8* %6, i32 %8, i32 %12, i32 %10)
%14 = tail call i32 @stage_scale2x(i8* %2, i8* %3, i8* %5, i8* %6, i8* %7, i32 %8, i32 %12, i32 %10)
ret void
}