#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*/ four_swap(int *, int *, int);
void R(int *a, int r) {
  int b1[4] = {8, 9, 11, 10};
  int b2[4] = {1, 7, 19, 15};
  int b3[4] = {5, 17, 13, 3};
  four_swap(a, b1, r);
  four_swap(a, b2, r);
  four_swap(a, b3, r);
}


x86 assembly (clang, -O0):
<R>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed1(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <four_swap@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <four_swap@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <four_swap@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<R>:
push   %rbp
push   %rbx
sub    $0x38,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
movaps 0xede(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xee6(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rsi
mov    %ebp,%edx
call   1030 <four_swap@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <four_swap@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <four_swap@plt>
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.R.b1 = [4 x i32] [i32 8, i32 9, i32 11, i32 10]
@__const.R.b2 = [4 x i32] [i32 1, i32 7, i32 19, i32 15]
@__const.R.b3 = [4 x i32] [i32 5, i32 17, i32 13, i32 3]
define void @R(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [4 x i32]
%6 = alloca [4 x i32]
%7 = alloca [4 x i32]
store i32* %0, i32** %3
store i32 %1, i32* %4
%8 = bitcast [4 x i32]* %5 to i8*
%9 = bitcast [4 x i32]* %6 to i8*
%10 = bitcast [4 x i32]* %7 to i8*
%11 = load i32*, i32** %3
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%13 = load i32, i32* %4
%14 = call i32 @four_swap(i32* %11, i32* %12, i32 %13)
%15 = load i32*, i32** %3
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%17 = load i32, i32* %4
%18 = call i32 @four_swap(i32* %15, i32* %16, i32 %17)
%19 = load i32*, i32** %3
%20 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
%21 = load i32, i32* %4
%22 = call i32 @four_swap(i32* %19, i32* %20, i32 %21)
ret void
}

LLVM IR (-O2):
@__const.R.b1 = [4 x i32] [i32 8, i32 9, i32 11, i32 10]
@__const.R.b2 = [4 x i32] [i32 1, i32 7, i32 19, i32 15]
@__const.R.b3 = [4 x i32] [i32 5, i32 17, i32 13, i32 3]
define void @R(i32* %0, i32 %1) {
%3 = alloca [4 x i32]
%4 = alloca [4 x i32]
%5 = alloca [4 x i32]
%6 = bitcast [4 x i32]* %3 to i8*
%7 = bitcast [4 x i32]* %4 to i8*
%8 = bitcast [4 x i32]* %5 to i8*
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%10 = call i32 @four_swap(i32* %0, i32* %9, i32 %1)
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
%12 = call i32 @four_swap(i32* %0, i32* %11, i32 %1)
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%14 = call i32 @four_swap(i32* %0, i32* %13, i32 %1)
ret void
}