#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*/ c(int *);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, const char *argv[]) {
  int i, j, a[4], b[3];
  for (i = 0; i < 4; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++) {
      if (j == i)
        continue;
      if (j < i)
        b[j] = a[j];
      else
        b[j - 1] = a[j];
    }
    c(b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1170 <main+0x50>
movslq -0x14(%rbp),%rax
lea    -0x30(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xea3(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1202 <main+0xe2>
movl   $0x0,-0x18(%rbp)
cmpl   $0x4,-0x18(%rbp)
jge    11eb <main+0xcb>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    11a3 <main+0x83>
jmp    11dd <main+0xbd>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11c4 <main+0xa4>
movslq -0x18(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
movslq -0x18(%rbp),%rax
mov    %ecx,-0x3c(%rbp,%rax,4)
jmp    11d8 <main+0xb8>
movslq -0x18(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %ecx,-0x3c(%rbp,%rax,4)
jmp    11dd <main+0xbd>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1188 <main+0x68>
lea    -0x3c(%rbp),%rdi
call   1030 <c@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1177 <main+0x57>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xed2(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
mov    %eax,0x4(%rsp)
mov    0x18(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1030 <c@plt>
mov    0x10(%rsp),%eax
mov    %eax,0x4(%rsp)
mov    0x18(%rsp),%rax
mov    %rax,0x8(%rsp)
mov    %r14,%rdi
call   1030 <c@plt>
xor    %ebx,%ebx
jmp    11b4 <main+0x94>
nop
mov    0x1c(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    %r14,%rdi
call   1030 <c@plt>
add    $0x1,%rbx
mov    0x10(%rsp),%rax
mov    %rax,0x4(%rsp)
test   %rbx,%rbx
je     11a0 <main+0x80>
mov    0x18(%rsp),%eax
mov    %eax,0xc(%rsp)
cmp    $0x1,%rbx
jne    11a0 <main+0x80>
lea    0x4(%rsp),%rdi
call   1030 <c@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [4 x i32]
%9 = alloca [3 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %10
10: ; preds = %18, %2
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, 4
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 %15
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %16)
br label %18
18: ; preds = %13
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %10
21: ; preds = %10
store i32 0, i32* %6
br label %22
22: ; preds = %62, %21
%23 = load i32, i32* %6
%24 = icmp slt i32 %23, 4
br i1 %24, label %25, label %65
25: ; preds = %22
store i32 0, i32* %7
br label %26
26: ; preds = %56, %25
%27 = load i32, i32* %7
%28 = icmp slt i32 %27, 4
br i1 %28, label %29, label %59
29: ; preds = %26
%30 = load i32, i32* %7
%31 = load i32, i32* %6
%32 = icmp eq i32 %30, %31
br i1 %32, label %33, label %34
33: ; preds = %29
br label %56
34: ; preds = %29
%35 = load i32, i32* %7
%36 = load i32, i32* %6
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %46
38: ; preds = %34
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 %40
%42 = load i32, i32* %41
%43 = load i32, i32* %7
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 %44
store i32 %42, i32* %45
br label %55
46: ; preds = %34
%47 = load i32, i32* %7
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 %48
%50 = load i32, i32* %49
%51 = load i32, i32* %7
%52 = sub nsw i32 %51, 1
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 %53
store i32 %50, i32* %54
br label %55
55: ; preds = %46, %38
br label %56
56: ; preds = %55, %33
%57 = load i32, i32* %7
%58 = add nsw i32 %57, 1
store i32 %58, i32* %7
br label %26
59: ; preds = %26
%60 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
%61 = call i32 @c(i32* %60)
br label %62
62: ; preds = %59
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
br label %22
65: ; preds = %22
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i32]
%4 = alloca [3 x i32]
%5 = bitcast [4 x i32]* %3 to i8*
%6 = bitcast [3 x i32]* %4 to i8*
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 1
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 2
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %13)
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%16 = load i32, i32* %9
store i32 %16, i32* %15
%17 = load i32, i32* %11
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 1
store i32 %17, i32* %18
%19 = load i32, i32* %13
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 2
store i32 %19, i32* %20
%21 = call i32 @c(i32* %15)
%22 = load i32, i32* %7
store i32 %22, i32* %15
%23 = load i32, i32* %11
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 1
store i32 %23, i32* %24
%25 = load i32, i32* %13
%26 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 2
store i32 %25, i32* %26
%27 = call i32 @c(i32* %15)
%28 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 1
%29 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 2
%30 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 2
br label %31
31: ; preds = %39, %2
%32 = phi i64 [ 2, %2 ], [ %42, %39 ]
%33 = load i32, i32* %7
store i32 %33, i32* %15
%34 = load i32, i32* %9
store i32 %34, i32* %28
%35 = icmp eq i64 %32, 2
br i1 %35, label %39, label %36
36: ; preds = %31
%37 = load i32, i32* %11
store i32 %37, i32* %29
%38 = icmp eq i64 %32, 3
br i1 %38, label %43, label %39
39: ; preds = %31, %36
%40 = load i32, i32* %13
store i32 %40, i32* %30
%41 = call i32 @c(i32* %15)
%42 = add nuw nsw i64 %32, 1
br label %31
43: ; preds = %36
%44 = call i32 @c(i32* %15)
ret i32 0
}