#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*/ input_side_conv(int *, int *, int *);
int /*<<< orphan*/ output_side_conv(int *, int *, int *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int x[(6)] = {0, -1, -1, 2, 1, 1};
  int h[(4)] = {1, 0, -1, 1};
  int y1[(((6)) + ((4)) - 1)] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
  int y2[(((6)) + ((4)) - 1)] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
  int i;
  input_side_conv(x, h, y1);
  output_side_conv(x, h, y2);
  printf("Input Side        Output Side\n");
  for (i = 0; i < (((6)) + ((4)) - 1); i++)
    printf("[%2d]              [%d]\n", y1[i], y2[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xea4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xea1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xea6(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xea3(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1040 <memset@plt>
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   1060 <input_side_conv@plt>
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   1050 <output_side_conv@plt>
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0x9,-0x94(%rbp)
jge    1231 <main+0xf1>
movslq -0x94(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%esi
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edx
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    11e9 <main+0xa9>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    0xebf(%rip),%rax
mov    %rax,0x80(%rsp)
movaps 0xea0(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movl   $0x0,0x50(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x20(%rsp)
lea    0x70(%rsp),%rbx
lea    0x60(%rsp),%r14
lea    0x30(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <input_side_conv@plt>
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <output_side_conv@plt>
lea    0xe83(%rip),%rdi
call   1030 <puts@plt>
mov    0x30(%rsp),%esi
mov    (%rsp),%edx
lea    0xe57(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x34(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x3c(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rsp),%esi
mov    0x10(%rsp),%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x44(%rsp),%esi
mov    0x14(%rsp),%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rsp),%esi
mov    0x18(%rsp),%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4c(%rsp),%esi
mov    0x1c(%rsp),%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x50(%rsp),%esi
mov    0x20(%rsp),%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.x = [6 x i32] [i32 0, i32 -1, i32 -1, i32 2, i32 1, i32 1]
@__const.main.h = [4 x i32] [i32 1, i32 0, i32 -1, i32 1]
@.str = [31 x i8] c"Input Side Output Side\0A\00"
@.str.1 = [25 x i8] c"[%2d] [%d]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
%3 = alloca [4 x i32]
%4 = alloca [9 x i32]
%5 = alloca [9 x i32]
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [6 x i32]* %2 to i8*
%8 = bitcast [4 x i32]* %3 to i8*
%9 = bitcast [9 x i32]* %4 to i8*
%10 = bitcast [9 x i32]* %5 to i8*
%11 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%13 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 0
%14 = call i32 @input_side_conv(i32* %11, i32* %12, i32* %13)
%15 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%17 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 0
%18 = call i32 @output_side_conv(i32* %15, i32* %16, i32* %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %20
20: ; preds = %33, %0
%21 = load i32, i32* %6
%22 = icmp slt i32 %21, 9
br i1 %22, label %23, label %36
23: ; preds = %20
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 %25
%27 = load i32, i32* %26
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 %29
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %31)
br label %33
33: ; preds = %23
%34 = load i32, i32* %6
%35 = add nsw i32 %34, 1
store i32 %35, i32* %6
br label %20
36: ; preds = %20
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [6 x i32] [i32 0, i32 -1, i32 -1, i32 2, i32 1, i32 1]
@__const.main.h = [4 x i32] [i32 1, i32 0, i32 -1, i32 1]
@.str.1 = [25 x i8] c"[%2d] [%d]\0A\00"
@str = [30 x i8] c"Input Side Output Side\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = alloca [4 x i32]
%3 = alloca [9 x i32]
%4 = alloca [9 x i32]
%5 = bitcast [6 x i32]* %1 to i8*
%6 = bitcast [4 x i32]* %2 to i8*
%7 = bitcast [9 x i32]* %3 to i8*
%8 = bitcast [9 x i32]* %4 to i8*
%9 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%11 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 0
%12 = call i32 @input_side_conv(i32* %9, i32* %10, i32* %11)
%13 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 0
%14 = call i32 @output_side_conv(i32* %9, i32* %10, i32* %13)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%16 = load i32, i32* %11
%17 = load i32, i32* %13
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %17)
%19 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 1
%20 = load i32, i32* %19
%21 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 1
%22 = load i32, i32* %21
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %22)
%24 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 2
%25 = load i32, i32* %24
%26 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 2
%27 = load i32, i32* %26
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %25, i32 %27)
%29 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 3
%30 = load i32, i32* %29
%31 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 3
%32 = load i32, i32* %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %30, i32 %32)
%34 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 4
%35 = load i32, i32* %34
%36 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 4
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %35, i32 %37)
%39 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 5
%40 = load i32, i32* %39
%41 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 5
%42 = load i32, i32* %41
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %40, i32 %42)
%44 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 6
%45 = load i32, i32* %44
%46 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 6
%47 = load i32, i32* %46
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %45, i32 %47)
%49 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 7
%50 = load i32, i32* %49
%51 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 7
%52 = load i32, i32* %51
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %50, i32 %52)
%54 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 8
%55 = load i32, i32* %54
%56 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 8
%57 = load i32, i32* %56
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %55, i32 %57)
ret i32 0
}