#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*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char **argv) {
  int n;
  int jumlah;
  int max, min;
  int input;
  jumlah = 0;
  for (n = 1; n <= 7; n++) {
    scanf("%d", &input);
    if (n == 1) {
      max = input;
    } else {
      if (input > max) {
        max = input;
      }
    }
    if (n == 1) {
      min = input;
    } else {
      if (input < min) {
        min = input;
      }
    }
    jumlah = jumlah + input;
  }
  if (max % 2 == 0) {
    printf("Nilai terbesar adalah genap : %d\n", max);
  } else {
    printf("Nilai terbesar adalah ganjil : %d\n", max);
  }
  printf("Dengan nilai satuan : %d\n", max % 10);
  if (min % 2 == 0) {
    printf("Nilai terkecil adalah genap : %d\n", min);
  } else {
    printf("Nilai terkecil adalah ganjil : %d\n", min);
  }
  printf("Dengan nilai satuan : %d\n", min % 10);
  printf("Jumlah ketujuh bilangan tersebut adalah : %d\n", jumlah);
  printf("Rata-rata ketujuh bilangan tersebut adalah : %.2f\n",
         (float)jumlah / 7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x7,-0x14(%rbp)
jg     11cd <main+0xad>
lea    0xeaf(%rip),%rdi
lea    -0x24(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    1173 <main+0x53>
mov    -0x24(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    118a <main+0x6a>
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    1185 <main+0x65>
mov    -0x24(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    118a <main+0x6a>
cmpl   $0x1,-0x14(%rbp)
jne    119f <main+0x7f>
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    11b6 <main+0x96>
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11b1 <main+0x91>
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    11b6 <main+0x96>
mov    -0x18(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <main+0x24>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11f7 <main+0xd7>
cvtsi2ssl -0x1c(%rbp),%xmm0
lea    0xe1a(%rip),%rdi
call   1030 <printf@plt>
jmp    1208 <main+0xe8>
cvtsi2ssl -0x1c(%rbp),%xmm0
lea    0xe26(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    124d <main+0x12d>
cvtsi2ssl -0x20(%rbp),%xmm0
lea    0xe23(%rip),%rdi
call   1030 <printf@plt>
jmp    125e <main+0x13e>
cvtsi2ssl -0x20(%rbp),%xmm0
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
lea    0xdd8(%rip),%rdi
call   1030 <printf@plt>
cvtsi2ssl -0x18(%rbp),%xmm0
lea    0xe26(%rip),%rdi
call   1030 <printf@plt>
cvtsi2ssl -0x18(%rbp),%xmm0
movss  0xd69(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xecf(%rip),%r12
lea    0x8(%rsp),%r13
mov    %r12,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%ebx
mov    %r12,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%ebp
mov    %ebx,0xc(%rsp)
cmp    %ebx,%ebp
mov    %ebx,%r15d
cmovg  %ebp,%r15d
cmovl  %ebp,%ebx
mov    %r12,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
mov    %eax,0x14(%rsp)
cmp    %r15d,%eax
cmovg  %eax,%r15d
cmp    %ebx,%eax
cmovl  %eax,%ebx
mov    %r12,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
mov    %eax,0x10(%rsp)
cmp    %r15d,%eax
cmovg  %eax,%r15d
cmp    %ebx,%eax
cmovl  %eax,%ebx
mov    %r12,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%r14d
cmp    %r15d,%r14d
cmovg  %r14d,%r15d
cmp    %ebx,%r14d
cmovl  %r14d,%ebx
mov    %r12,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%r13d
cmp    %r15d,%r13d
cmovg  %r13d,%r15d
cmp    %ebx,%r13d
cmovl  %r13d,%ebx
mov    %r12,%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%r12d
cmp    %r15d,%r12d
cmovg  %r12d,%r15d
cmp    %ebx,%r12d
cmovl  %r12d,%ebx
test   $0x1,%r15b
cvtsi2ss %r15d,%xmm0
lea    0xdf5(%rip),%rax
lea    0xe10(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
movslq %r15d,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
lea    0xdfe(%rip),%r15
mov    %r15,%rdi
call   1030 <printf@plt>
test   $0x1,%bl
lea    0xe06(%rip),%rax
lea    0xe21(%rip),%rdi
cmove  %rax,%rdi
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
call   1030 <printf@plt>
add    0xc(%rsp),%ebp
add    0x14(%rsp),%ebp
add    0x10(%rsp),%ebp
add    %r14d,%ebp
add    %r13d,%ebp
add    %r12d,%ebp
movslq %ebx,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %r15,%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
movss  %xmm0,0xc(%rsp)
lea    0xdde(%rip),%rdi
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
divss  0xd20(%rip),%xmm0
lea    0xdf2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [34 x i8] c"Nilai terbesar adalah genap : %d\0A\00"
@.str.2 = [35 x i8] c"Nilai terbesar adalah ganjil : %d\0A\00"
@.str.3 = [26 x i8] c"Dengan nilai satuan : %d\0A\00"
@.str.4 = [34 x i8] c"Nilai terkecil adalah genap : %d\0A\00"
@.str.5 = [35 x i8] c"Nilai terkecil adalah ganjil : %d\0A\00"
@.str.6 = [46 x i8] c"Jumlah ketujuh bilangan tersebut adalah : %d\0A\00"
@.str.7 = [51 x i8] c"Rata-rata ketujuh bilangan tersebut adalah : %.2f\0A\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 i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 1, i32* %6
br label %11
11: ; preds = %43, %2
%12 = load i32, i32* %6
%13 = icmp sle i32 %12, 7
br i1 %13, label %14, label %46
14: ; preds = %11
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %10)
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = load i32, i32* %10
store i32 %19, i32* %8
br label %27
20: ; preds = %14
%21 = load i32, i32* %10
%22 = load i32, i32* %8
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = load i32, i32* %10
store i32 %25, i32* %8
br label %26
26: ; preds = %24, %20
br label %27
27: ; preds = %26, %18
%28 = load i32, i32* %6
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = load i32, i32* %10
store i32 %31, i32* %9
br label %39
32: ; preds = %27
%33 = load i32, i32* %10
%34 = load i32, i32* %9
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = load i32, i32* %10
store i32 %37, i32* %9
br label %38
38: ; preds = %36, %32
br label %39
39: ; preds = %38, %30
%40 = load i32, i32* %7
%41 = load i32, i32* %10
%42 = add nsw i32 %40, %41
store i32 %42, i32* %7
br label %43
43: ; preds = %39
%44 = load i32, i32* %6
%45 = add nsw i32 %44, 1
store i32 %45, i32* %6
br label %11
46: ; preds = %11
%47 = load i32, i32* %8
%48 = srem i32 %47, 2
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %54
50: ; preds = %46
%51 = load i32, i32* %8
%52 = sitofp i32 %51 to float
%53 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), float %52)
br label %58
54: ; preds = %46
%55 = load i32, i32* %8
%56 = sitofp i32 %55 to float
%57 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), float %56)
br label %58
58: ; preds = %54, %50
%59 = load i32, i32* %8
%60 = srem i32 %59, 10
%61 = sitofp i32 %60 to float
%62 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), float %61)
%63 = load i32, i32* %9
%64 = srem i32 %63, 2
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %70
66: ; preds = %58
%67 = load i32, i32* %9
%68 = sitofp i32 %67 to float
%69 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), float %68)
br label %74
70: ; preds = %58
%71 = load i32, i32* %9
%72 = sitofp i32 %71 to float
%73 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), float %72)
br label %74
74: ; preds = %70, %66
%75 = load i32, i32* %9
%76 = srem i32 %75, 10
%77 = sitofp i32 %76 to float
%78 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), float %77)
%79 = load i32, i32* %7
%80 = sitofp i32 %79 to float
%81 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), float %80)
%82 = load i32, i32* %7
%83 = sitofp i32 %82 to float
%84 = fdiv float %83, 7.000000e+00
%85 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0), float %84)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [34 x i8] c"Nilai terbesar adalah genap : %d\0A\00"
@.str.2 = [35 x i8] c"Nilai terbesar adalah ganjil : %d\0A\00"
@.str.3 = [26 x i8] c"Dengan nilai satuan : %d\0A\00"
@.str.4 = [34 x i8] c"Nilai terkecil adalah genap : %d\0A\00"
@.str.5 = [35 x i8] c"Nilai terkecil adalah ganjil : %d\0A\00"
@.str.6 = [46 x i8] c"Jumlah ketujuh bilangan tersebut adalah : %d\0A\00"
@.str.7 = [51 x i8] c"Rata-rata ketujuh bilangan tersebut adalah : %.2f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, %6
%10 = select i1 %9, i32 %8, i32 %6
%11 = icmp slt i32 %8, %6
%12 = select i1 %11, i32 %8, i32 %6
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %3
%15 = icmp sgt i32 %14, %10
%16 = select i1 %15, i32 %14, i32 %10
%17 = icmp slt i32 %14, %12
%18 = select i1 %17, i32 %14, i32 %12
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%20 = load i32, i32* %3
%21 = icmp sgt i32 %20, %16
%22 = select i1 %21, i32 %20, i32 %16
%23 = icmp slt i32 %20, %18
%24 = select i1 %23, i32 %20, i32 %18
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%26 = load i32, i32* %3
%27 = icmp sgt i32 %26, %22
%28 = select i1 %27, i32 %26, i32 %22
%29 = icmp slt i32 %26, %24
%30 = select i1 %29, i32 %26, i32 %24
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%32 = load i32, i32* %3
%33 = icmp sgt i32 %32, %28
%34 = select i1 %33, i32 %32, i32 %28
%35 = icmp slt i32 %32, %30
%36 = select i1 %35, i32 %32, i32 %30
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%38 = load i32, i32* %3
%39 = icmp sgt i32 %38, %34
%40 = select i1 %39, i32 %38, i32 %34
%41 = icmp slt i32 %38, %36
%42 = select i1 %41, i32 %38, i32 %36
%43 = and i32 %40, 1
%44 = icmp eq i32 %43, 0
%45 = sitofp i32 %40 to float
%46 = select i1 %44, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0)
%47 = call i32 @printf(i8* %46, float %45)
%48 = srem i32 %40, 10
%49 = sitofp i32 %48 to float
%50 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), float %49)
%51 = and i32 %42, 1
%52 = icmp eq i32 %51, 0
%53 = select i1 %52, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0)
%54 = sitofp i32 %42 to float
%55 = call i32 @printf(i8* %53, float %54)
%56 = add nsw i32 %8, %6
%57 = add nsw i32 %14, %56
%58 = add nsw i32 %20, %57
%59 = add nsw i32 %26, %58
%60 = add nsw i32 %32, %59
%61 = add nsw i32 %38, %60
%62 = srem i32 %42, 10
%63 = sitofp i32 %62 to float
%64 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), float %63)
%65 = sitofp i32 %61 to float
%66 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), float %65)
%67 = fdiv float %65, 7.000000e+00
%68 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0), float %67)
ret i32 0
}