#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*/ expofactor(short *, short *, short *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, short *);
main() {
  short p1[10], p2[10], p3[10];
  int i;
  for (i = 0; i < 5; i++)
    scanf("%hd", &p1[i]);
  for (i = 0; i < 5; i++)
    scanf("%hd", &p2[i]);
  expofactor(p1, p2, p3);
  for (i = 0; i < 5; i++)
    printf("%d ", (int)p3[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0x5,-0x64(%rbp)
jge    1179 <main+0x49>
movslq -0x64(%rbp),%rax
lea    -0x20(%rbp),%rsi
shl    $0x1,%rax
add    %rax,%rsi
lea    0xe9a(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1146 <main+0x16>
movl   $0x0,-0x64(%rbp)
cmpl   $0x5,-0x64(%rbp)
jge    11b3 <main+0x83>
movslq -0x64(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x1,%rax
add    %rax,%rsi
lea    0xe60(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1180 <main+0x50>
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   1030 <expofactor@plt>
movl   $0x0,-0x64(%rbp)
cmpl   $0x5,-0x64(%rbp)
jge    11f8 <main+0xc8>
movslq -0x64(%rbp),%rax
movswl -0x60(%rbp,%rax,2),%esi
lea    0xe1f(%rip),%rdi
call   1040 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11cb <main+0x9b>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x60,%rsp
lea    0xec0(%rip),%rbx
lea    0x40(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0x42(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x44(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x46(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x48(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x20(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
lea    0x22(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x26(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %rsp,%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <expofactor@plt>
movswl (%rsp),%esi
lea    0xe23(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
movswl 0x2(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movswl 0x4(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movswl 0x6(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
movswl 0x8(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%hd\00"
@.str.1 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca [10 x i16]
%2 = alloca [10 x i16]
%3 = alloca [10 x i16]
%4 = bitcast [10 x i16]* %1 to i8*
%5 = bitcast [10 x i16]* %2 to i8*
%6 = bitcast [10 x i16]* %3 to i8*
%7 = getelementptr inbounds [10 x i16], [10 x i16]* %1, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %7)
%9 = getelementptr inbounds [10 x i16], [10 x i16]* %1, i64 0, i64 1
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %9)
%11 = getelementptr inbounds [10 x i16], [10 x i16]* %1, i64 0, i64 2
%12 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %11)
%13 = getelementptr inbounds [10 x i16], [10 x i16]* %1, i64 0, i64 3
%14 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %13)
%15 = getelementptr inbounds [10 x i16], [10 x i16]* %1, i64 0, i64 4
%16 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %15)
%17 = getelementptr inbounds [10 x i16], [10 x i16]* %2, i64 0, i64 0
%18 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %17)
%19 = getelementptr inbounds [10 x i16], [10 x i16]* %2, i64 0, i64 1
%20 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %19)
%21 = getelementptr inbounds [10 x i16], [10 x i16]* %2, i64 0, i64 2
%22 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %21)
%23 = getelementptr inbounds [10 x i16], [10 x i16]* %2, i64 0, i64 3
%24 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %23)
%25 = getelementptr inbounds [10 x i16], [10 x i16]* %2, i64 0, i64 4
%26 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %25)
%27 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 0
%28 = call i32 @expofactor(i16* %7, i16* %17, i16* %27)
%29 = load i16, i16* %27
%30 = sext i16 %29 to i32
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 1
%33 = load i16, i16* %32
%34 = sext i16 %33 to i32
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 2
%37 = load i16, i16* %36
%38 = sext i16 %37 to i32
%39 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %38)
%40 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 3
%41 = load i16, i16* %40
%42 = sext i16 %41 to i32
%43 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %42)
%44 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 4
%45 = load i16, i16* %44
%46 = sext i16 %45 to i32
%47 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %46)
ret i32 0
}