#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char **argv) {
  int i, num, op, xivato;
  int suma = 0, max, min;
  int vector[100];
  do {
    printf("\n");
    printf("########################################\n");
    printf("# 1. Introdueix la dimensió del vector #\n");
    printf("# 2. Ompli el vector                   #\n");
    printf("# 3. Mostra suma, mitja, màxim i mínim #\n");
    printf("# 4. Surt del programa                 #\n");
    printf("########################################\n");
    printf("\n");
    printf("Tria una opció: ");
    scanf("%d", &op);
    printf("\n");
    switch (op) {
    case 1:
      do {
        printf("De quina dimensió vols que sigui el vector (1-100)? ");
        scanf("%d", &num);
      } while (num < 1 || num > 100);
      break;
    case 2:
      printf("Introduix numeros: ");
      scanf("%d", &vector[0]);
      suma = max = min = vector[0];
      for (i = 1; i < num; i++) {
        printf("Introduix numeros: ");
        scanf("%d", &vector[i]);
        suma = suma + vector[i];
        if (vector[i] > max) {
          max = vector[i];
        }
        if (vector[i] < min) {
          min = vector[i];
        }
      }
      printf("\n");
      break;
    case 3:
      printf("\nSuma: %d", suma);
      printf("\nMàxim: %d", max);
      printf("\nMínim: %d", min);
      printf("\nMitjana: %0.1f", (float)suma / num);
      printf("\n");
      break;
    case 4:
      printf("\nS'ha acabat el programa");
      break;
    default:
      printf("\nOpció incorrecta: %d", op);
    }
  } while (op != 4);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
lea    0xf46(%rip),%rdi
mov    %rdi,-0x1d8(%rbp)
xor    %eax,%eax
mov    %al,-0x1c9(%rbp)
call   1030 <printf@plt>
mov    -0x1c9(%rbp),%al
lea    0xea8(%rip),%rdi
mov    %rdi,-0x1e0(%rbp)
call   1030 <printf@plt>
mov    -0x1c9(%rbp),%al
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c9(%rbp),%al
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c9(%rbp),%al
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c9(%rbp),%al
lea    0xf04(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1e0(%rbp),%rdi
mov    -0x1c9(%rbp),%al
call   1030 <printf@plt>
mov    -0x1d8(%rbp),%rdi
mov    -0x1c9(%rbp),%al
call   1030 <printf@plt>
mov    -0x1c9(%rbp),%al
lea    0xef8(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4f(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x1d8(%rbp),%rdi
mov    -0x1c9(%rbp),%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x1c8(%rbp)
sub    $0x3,%eax
ja     13fb <main+0x2db>
mov    -0x1c8(%rbp),%rax
lea    0xdc6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    1248 <main+0x128>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x18(%rbp)
mov    %al,-0x1e1(%rbp)
jl     1285 <main+0x165>
cmpl   $0x64,-0x18(%rbp)
setg   %al
mov    %al,-0x1e1(%rbp)
mov    -0x1e1(%rbp),%al
test   $0x1,%al
jne    1248 <main+0x128>
jmp    140c <main+0x2ec>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x1c0(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x1c0(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    %eax,-0x28(%rbp)
mov    %eax,-0x24(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    136f <main+0x24f>
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x14(%rbp),%rax
lea    -0x1c0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe46(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x24(%rbp),%eax
movslq -0x14(%rbp),%rcx
add    -0x1c0(%rbp,%rcx,4),%eax
mov    %eax,-0x24(%rbp)
movslq -0x14(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%eax
cmp    -0x28(%rbp),%eax
jle    133a <main+0x21a>
movslq -0x14(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%eax
mov    %eax,-0x28(%rbp)
movslq -0x14(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%eax
cmp    -0x2c(%rbp),%eax
jge    135c <main+0x23c>
movslq -0x14(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%eax
mov    %eax,-0x2c(%rbp)
jmp    1361 <main+0x241>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12cf <main+0x1af>
lea    0xd17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    140c <main+0x2ec>
mov    -0x24(%rbp),%esi
lea    0xdb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cvtsi2ssl -0x24(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd95(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xcb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    140c <main+0x2ec>
lea    0xd84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    140c <main+0x2ec>
mov    -0x1c(%rbp),%esi
lea    0xd87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1411 <main+0x2f1>
cmpl   $0x4,-0x1c(%rbp)
jne    1140 <main+0x20>
mov    0x2bbe(%rip),%rax
mov    (%rax),%eax
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
lea    0x101d(%rip),%rbp
lea    0xf14(%rip),%r13
lea    0x8(%rsp),%r12
xor    %r14d,%r14d
jmp    118b <main+0x4b>
nopl   0x0(%rax)
lea    0xf40(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xchg   %ax,%ax
cmpl   $0x4,0xc(%rsp)
je     139d <main+0x25d>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,%rdi
call   1040 <puts@plt>
lea    0xf2a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf48(%rip),%rdi
call   1040 <puts@plt>
lea    0xf65(%rip),%rdi
call   1040 <puts@plt>
lea    0xf84(%rip),%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe2a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%esi
lea    -0x1(%rsi),%eax
cmp    $0x3,%eax
ja     1170 <main+0x30>
lea    0xde5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdf7(%rip),%rbp
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%eax
add    $0xffffff9b,%eax
cmp    $0xffffff9c,%eax
jb     1230 <main+0xf0>
lea    0xf1d(%rip),%rbp
jmp    1180 <main+0x40>
nopl   (%rax)
lea    0xdf1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
lea    0x10(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x10(%rsp),%ebx
cmpl   $0x2,0x8(%rsp)
jl     1373 <main+0x233>
mov    %r13,%rbp
mov    $0x1,%r13d
lea    0x14(%rsp),%r12
mov    %ebx,%r15d
mov    %ebx,%r14d
xchg   %ax,%ax
lea    0xdb1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
mov    (%r12),%eax
add    %eax,%r14d
cmp    %r15d,%eax
cmovg  %eax,%r15d
cmp    %ebx,%eax
cmovl  %eax,%ebx
add    $0x1,%r13
movslq 0x8(%rsp),%rax
add    $0x4,%r12
cmp    %rax,%r13
jl     12a0 <main+0x160>
jmp    137c <main+0x23c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xd75(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd6e(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd69(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r14d,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ssl 0x8(%rsp),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd4c(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1180 <main+0x40>
nopl   0x0(%rax,%rax,1)
lea    0xd37(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1180 <main+0x40>
mov    %ebx,%r14d
mov    %ebx,%r15d
mov    %r13,%rbp
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xde8(%rip),%r12
mov    %rbp,%r13
mov    %r12,%rbp
lea    0x8(%rsp),%r12
jmp    1180 <main+0x40>
mov    0x2c3c(%rip),%rax
mov    (%rax),%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [42 x i8] c"########################################\0A\00"
@.str.2 = [43 x i8] c"# 1. Introdueix la dimensi\C3\B3 del vector #\0A\00"
@.str.3 = [42 x i8] c"# 2. Ompli el vector #\0A\00"
@.str.4 = [44 x i8] c"# 3. Mostra suma, mitja, m\C3\A0xim i m\C3\ADnim #\0A\00"
@.str.5 = [42 x i8] c"# 4. Surt del programa #\0A\00"
@.str.6 = [18 x i8] c"Tria una opci\C3\B3: \00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [54 x i8] c"De quina dimensi\C3\B3 vols que sigui el vector (1-100)? \00"
@.str.9 = [20 x i8] c"Introduix numeros: \00"
@.str.10 = [10 x i8] c"\0ASuma: %d\00"
@.str.11 = [12 x i8] c"\0AM\C3\A0xim: %d\00"
@.str.12 = [12 x i8] c"\0AM\C3\ADnim: %d\00"
@.str.13 = [16 x i8] c"\0AMitjana: %0.1f\00"
@.str.14 = [25 x i8] c"\0AS'ha acabat el programa\00"
@.str.15 = [23 x i8] c"\0AOpci\C3\B3 incorrecta: %d\00"
@EXIT_SUCCESS = global i32 0
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
%11 = alloca i32
%12 = alloca i32
%13 = alloca [100 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %10
br label %14
14: ; preds = %112, %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %8)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%26 = load i32, i32* %8
switch i32 %26, label %108 [
i32 1, label %27
i32 2, label %40
i32 3, label %91
i32 4, label %106
]
27: ; preds = %14
br label %28
28: ; preds = %37, %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0))
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %7)
br label %31
31: ; preds = %28
%32 = load i32, i32* %7
%33 = icmp slt i32 %32, 1
br i1 %33, label %37, label %34
34: ; preds = %31
%35 = load i32, i32* %7
%36 = icmp sgt i32 %35, 100
br label %37
37: ; preds = %34, %31
%38 = phi i1 [ true, %31 ], [ %36, %34 ]
br i1 %38, label %28, label %39
39: ; preds = %37
br label %111
40: ; preds = %14
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%42 = getelementptr inbounds [100 x i32], [100 x i32]* %13, i64 0, i64 0
%43 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %42)
%44 = getelementptr inbounds [100 x i32], [100 x i32]* %13, i64 0, i64 0
%45 = load i32, i32* %44
store i32 %45, i32* %12
store i32 %45, i32* %11
store i32 %45, i32* %10
store i32 1, i32* %6
br label %46
46: ; preds = %86, %40
%47 = load i32, i32* %6
%48 = load i32, i32* %7
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %89
50: ; preds = %46
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%52 = load i32, i32* %6
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [100 x i32], [100 x i32]* %13, i64 0, i64 %53
%55 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %54)
%56 = load i32, i32* %10
%57 = load i32, i32* %6
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [100 x i32], [100 x i32]* %13, i64 0, i64 %58
%60 = load i32, i32* %59
%61 = add nsw i32 %56, %60
store i32 %61, i32* %10
%62 = load i32, i32* %6
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [100 x i32], [100 x i32]* %13, i64 0, i64 %63
%65 = load i32, i32* %64
%66 = load i32, i32* %11
%67 = icmp sgt i32 %65, %66
br i1 %67, label %68, label %73
68: ; preds = %50
%69 = load i32, i32* %6
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [100 x i32], [100 x i32]* %13, i64 0, i64 %70
%72 = load i32, i32* %71
store i32 %72, i32* %11
br label %73
73: ; preds = %68, %50
%74 = load i32, i32* %6
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [100 x i32], [100 x i32]* %13, i64 0, i64 %75
%77 = load i32, i32* %76
%78 = load i32, i32* %12
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %85
80: ; preds = %73
%81 = load i32, i32* %6
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [100 x i32], [100 x i32]* %13, i64 0, i64 %82
%84 = load i32, i32* %83
store i32 %84, i32* %12
br label %85
85: ; preds = %80, %73
br label %86
86: ; preds = %85
%87 = load i32, i32* %6
%88 = add nsw i32 %87, 1
store i32 %88, i32* %6
br label %46
89: ; preds = %46
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %111
91: ; preds = %14
%92 = load i32, i32* %10
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 %92)
%94 = load i32, i32* %11
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i32 %94)
%96 = load i32, i32* %12
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 %96)
%98 = load i32, i32* %10
%99 = sitofp i32 %98 to float
%100 = load i32, i32* %7
%101 = sitofp i32 %100 to float
%102 = fdiv float %99, %101
%103 = fpext float %102 to double
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), double %103)
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %111
106: ; preds = %14
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
br label %111
108: ; preds = %14
%109 = load i32, i32* %8
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0), i32 %109)
br label %111
111: ; preds = %108, %106, %91, %89, %39
br label %112
112: ; preds = %111
%113 = load i32, i32* %8
%114 = icmp ne i32 %113, 4
br i1 %114, label %14, label %115
115: ; preds = %112
%116 = load i32, i32* @EXIT_SUCCESS
ret i32 %116
}

LLVM IR (-O2):
@.str.6 = [18 x i8] c"Tria una opci\C3\B3: \00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [54 x i8] c"De quina dimensi\C3\B3 vols que sigui el vector (1-100)? \00"
@.str.9 = [20 x i8] c"Introduix numeros: \00"
@.str.10 = [10 x i8] c"\0ASuma: %d\00"
@.str.11 = [12 x i8] c"\0AM\C3\A0xim: %d\00"
@.str.12 = [12 x i8] c"\0AM\C3\ADnim: %d\00"
@.str.13 = [16 x i8] c"\0AMitjana: %0.1f\00"
@.str.14 = [25 x i8] c"\0AS'ha acabat el programa\00"
@.str.15 = [23 x i8] c"\0AOpci\C3\B3 incorrecta: %d\00"
@EXIT_SUCCESS = global i32 0
@str.16 = [42 x i8] c"# 1. Introdueix la dimensi\C3\B3 del vector #\00"
@str.17 = [41 x i8] c"# 2. Ompli el vector #\00"
@str.18 = [43 x i8] c"# 3. Mostra suma, mitja, m\C3\A0xim i m\C3\ADnim #\00"
@str.19 = [41 x i8] c"# 4. Surt del programa #\00"
@str.20 = [41 x i8] c"########################################\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100 x i32]
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast [100 x i32]* %5 to i8*
%9 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 0
br label %10
10: ; preds = %76, %2
%11 = phi i32 [ 0, %2 ], [ %77, %76 ]
%12 = phi i32 [ undef, %2 ], [ %78, %76 ]
%13 = phi i32 [ undef, %2 ], [ %79, %76 ]
%14 = call i32 @putchar(i32 10)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.20, i64 0, i64 0))
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.16, i64 0, i64 0))
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.17, i64 0, i64 0))
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.18, i64 0, i64 0))
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.19, i64 0, i64 0))
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.20, i64 0, i64 0))
%21 = call i32 @putchar(i32 10)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %4)
%24 = call i32 @putchar(i32 10)
%25 = load i32, i32* %4
switch i32 %25, label %74 [
i32 1, label %26
i32 2, label %32
i32 3, label %61
i32 4, label %72
]
26: ; preds = %10, %26
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0))
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %3)
%29 = load i32, i32* %3
%30 = add i32 %29, -101
%31 = icmp ult i32 %30, -100
br i1 %31, label %26, label %76
32: ; preds = %10
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %9)
%35 = load i32, i32* %9
%36 = load i32, i32* %3
%37 = icmp sgt i32 %36, 1
br i1 %37, label %38, label %56
38: ; preds = %32, %38
%39 = phi i64 [ %52, %38 ], [ 1, %32 ]
%40 = phi i32 [ %51, %38 ], [ %35, %32 ]
%41 = phi i32 [ %49, %38 ], [ %35, %32 ]
%42 = phi i32 [ %47, %38 ], [ %35, %32 ]
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%44 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 %39
%45 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %44)
%46 = load i32, i32* %44
%47 = add nsw i32 %46, %42
%48 = icmp sgt i32 %46, %41
%49 = select i1 %48, i32 %46, i32 %41
%50 = icmp slt i32 %46, %40
%51 = select i1 %50, i32 %46, i32 %40
%52 = add nuw nsw i64 %39, 1
%53 = load i32, i32* %3
%54 = sext i32 %53 to i64
%55 = icmp slt i64 %52, %54
br i1 %55, label %38, label %56
56: ; preds = %38, %32
%57 = phi i32 [ %35, %32 ], [ %47, %38 ]
%58 = phi i32 [ %35, %32 ], [ %49, %38 ]
%59 = phi i32 [ %35, %32 ], [ %51, %38 ]
%60 = call i32 @putchar(i32 10)
br label %76
61: ; preds = %10
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 %11)
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i32 %12)
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 %13)
%65 = sitofp i32 %11 to float
%66 = load i32, i32* %3
%67 = sitofp i32 %66 to float
%68 = fdiv float %65, %67
%69 = fpext float %68 to double
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), double %69)
%71 = call i32 @putchar(i32 10)
br label %76
72: ; preds = %10
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
br label %76
74: ; preds = %10
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0), i32 %25)
br label %76
76: ; preds = %26, %56, %61, %72, %74
%77 = phi i32 [ %11, %74 ], [ %11, %72 ], [ %11, %61 ], [ %57, %56 ], [ %11, %26 ]
%78 = phi i32 [ %12, %74 ], [ %12, %72 ], [ %12, %61 ], [ %58, %56 ], [ %12, %26 ]
%79 = phi i32 [ %13, %74 ], [ %13, %72 ], [ %13, %61 ], [ %59, %56 ], [ %13, %26 ]
%80 = load i32, i32* %4
%81 = icmp eq i32 %80, 4
br i1 %81, label %82, label %10
82: ; preds = %76
%83 = load i32, i32* @EXIT_SUCCESS
ret i32 %83
}