#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 *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *, int *);
main() {
  int min, max, a1, a2, a3, a4, a5;
  printf("Введите 5 целых чисел\n");
  scanf("%d %d %d %d %d", &a1, &a2, &a3, &a4, &a5);
  max = a1;
  min = a1;
  if (max < a2)
    max = a2;
  if (max < a3)
    max = a3;
  if (max < a4)
    max = a4;
  if (max < a5)
    max = a5;
  if (min > a2)
    min = a2;
  if (min > a3)
    min = a3;
  if (min > a4)
    min = a4;
  if (min > a5)
    min = a5;
  printf("Наименьшее= %d, наибольшее= %d\n", min, max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    -0x1c(%rbp),%r8
lea    -0x20(%rbp),%r9
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    117b <main+0x5b>
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    118d <main+0x6d>
mov    -0x18(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    119f <main+0x7f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11b1 <main+0x91>
mov    -0x20(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    11c3 <main+0xa3>
mov    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    11d5 <main+0xb5>
mov    -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    11e7 <main+0xc7>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    11f9 <main+0xd9>
mov    -0x20(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
lea    0x4(%rsp),%r9
call   1050 <scanf@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%eax
cmp    %eax,%esi
mov    %esi,%edx
cmovl  %eax,%edx
cmovg  %eax,%esi
mov    0xc(%rsp),%eax
cmp    %eax,%edx
cmovl  %eax,%edx
mov    0x8(%rsp),%ecx
cmp    %ecx,%edx
cmovl  %ecx,%edx
mov    0x4(%rsp),%edi
cmp    %edi,%edx
cmovl  %edi,%edx
cmp    %eax,%esi
cmovg  %eax,%esi
cmp    %ecx,%esi
cmovg  %ecx,%esi
cmp    %edi,%esi
cmovg  %edi,%esi
lea    0xe67(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [40 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 5 \D1\86\D0\B5\D0\BB\D1\8B\D1\85 \D1\87\D0\B8\D1\81\D0\B5\D0\BB\0A\00"
@.str.1 = [15 x i8] c"%d %d %d %d %d\00"
@.str.2 = [52 x i8] c"\D0\9D\D0\B0\D0\B8\D0\BC\D0\B5\D0\BD\D1\8C\D1\88\D0\B5\D0\B5= %d, \D0\BD\D0\B0\D0\B8\D0\B1\D0\BE\D0\BB\D1\8C\D1\88\D0\B5\D0\B5= %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%11 = load i32, i32* %4
store i32 %11, i32* %3
%12 = load i32, i32* %4
store i32 %12, i32* %2
%13 = load i32, i32* %3
%14 = load i32, i32* %5
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %0
%17 = load i32, i32* %5
store i32 %17, i32* %3
br label %18
18: ; preds = %16, %0
%19 = load i32, i32* %3
%20 = load i32, i32* %6
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = load i32, i32* %6
store i32 %23, i32* %3
br label %24
24: ; preds = %22, %18
%25 = load i32, i32* %3
%26 = load i32, i32* %7
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = load i32, i32* %7
store i32 %29, i32* %3
br label %30
30: ; preds = %28, %24
%31 = load i32, i32* %3
%32 = load i32, i32* %8
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = load i32, i32* %8
store i32 %35, i32* %3
br label %36
36: ; preds = %34, %30
%37 = load i32, i32* %2
%38 = load i32, i32* %5
%39 = icmp sgt i32 %37, %38
br i1 %39, label %40, label %42
40: ; preds = %36
%41 = load i32, i32* %5
store i32 %41, i32* %2
br label %42
42: ; preds = %40, %36
%43 = load i32, i32* %2
%44 = load i32, i32* %6
%45 = icmp sgt i32 %43, %44
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = load i32, i32* %6
store i32 %47, i32* %2
br label %48
48: ; preds = %46, %42
%49 = load i32, i32* %2
%50 = load i32, i32* %7
%51 = icmp sgt i32 %49, %50
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = load i32, i32* %7
store i32 %53, i32* %2
br label %54
54: ; preds = %52, %48
%55 = load i32, i32* %2
%56 = load i32, i32* %8
%57 = icmp sgt i32 %55, %56
br i1 %57, label %58, label %60
58: ; preds = %54
%59 = load i32, i32* %8
store i32 %59, i32* %2
br label %60
60: ; preds = %58, %54
%61 = load i32, i32* %2
%62 = load i32, i32* %3
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i32 %61, i32 %62)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"%d %d %d %d %d\00"
@.str.2 = [52 x i8] c"\D0\9D\D0\B0\D0\B8\D0\BC\D0\B5\D0\BD\D1\8C\D1\88\D0\B5\D0\B5= %d, \D0\BD\D0\B0\D0\B8\D0\B1\D0\BE\D0\BB\D1\8C\D1\88\D0\B5\D0\B5= %d\0A\00"
@str = [39 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 5 \D1\86\D0\B5\D0\BB\D1\8B\D1\85 \D1\87\D0\B8\D1\81\D0\B5\D0\BB\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4, i32* %5)
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = icmp slt i32 %13, %14
%16 = select i1 %15, i32 %14, i32 %13
%17 = load i32, i32* %3
%18 = icmp slt i32 %16, %17
%19 = select i1 %18, i32 %17, i32 %16
%20 = load i32, i32* %4
%21 = icmp slt i32 %19, %20
%22 = select i1 %21, i32 %20, i32 %19
%23 = load i32, i32* %5
%24 = icmp slt i32 %22, %23
%25 = select i1 %24, i32 %23, i32 %22
%26 = icmp sgt i32 %13, %14
%27 = select i1 %26, i32 %14, i32 %13
%28 = icmp sgt i32 %27, %17
%29 = select i1 %28, i32 %17, i32 %27
%30 = icmp sgt i32 %29, %20
%31 = select i1 %30, i32 %20, i32 %29
%32 = icmp sgt i32 %31, %23
%33 = select i1 %32, i32 %23, i32 %31
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i32 %33, i32 %25)
ret i32 0
}