#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*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ check_intInput(int *);
int colect_floating(float *, int, float *);
int colect_round(float *, int, float *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fill_array(float *, int);
int /*<<< orphan*/ print_info(float *, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int n;
  printf("Enter n: ");
  check_intInput(&n);
  if (n <= 0) {
    printf("n > 0 !");
    exit(EXIT_FAILURE);
  }
  float buffer[n];
  printf("Enter %d numbers : ", n);
  fill_array(buffer, n);
  int roundLenght;
  float roundNumbers[n];
  int floatingLenght;
  float floatingPointNumbers[n];
  floatingLenght = colect_floating(buffer, n, floatingPointNumbers);
  roundLenght = colect_round(buffer, n, roundNumbers);
  print_info(floatingPointNumbers, floatingLenght);
  print_info(roundNumbers, roundLenght);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1030 <check_intInput@plt>
cmpl   $0x0,-0x8(%rbp)
jg     11bc <main+0x4c>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2e2b(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe25(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1060 <fill_array@plt>
mov    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x48(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%esi
call   1070 <colect_floating@plt>
mov    -0x50(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%esi
call   1040 <colect_round@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,-0x1c(%rbp)
mov    -0x2c(%rbp),%esi
call   1090 <print_info@plt>
mov    -0x40(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1090 <print_info@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x2c(%rbp),%rdi
call   1030 <check_intInput@plt>
mov    -0x2c(%rbp),%eax
test   %eax,%eax
jle    1245 <main+0xd5>
mov    %rsp,%r13
mov    %rsp,%r14
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
mov    -0x2c(%rbp),%esi
lea    0xe50(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x2c(%rbp),%esi
mov    %r14,%rdi
call   1060 <fill_array@plt>
mov    -0x2c(%rbp),%esi
mov    %rsp,%r15
lea    0xf(,%rsi,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r14,%rdi
mov    %rbx,%rdx
call   1070 <colect_floating@plt>
mov    %eax,%r12d
mov    -0x2c(%rbp),%esi
mov    %r14,%rdi
mov    %r15,%rdx
call   1040 <colect_round@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
mov    %r12d,%esi
call   1090 <print_info@plt>
mov    %r15,%rdi
mov    %r14d,%esi
call   1090 <print_info@plt>
mov    0x2da7(%rip),%rax
mov    (%rax),%eax
mov    %r13,%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdbe(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Enter n: \00"
@.str.1 = [8 x i8] c"n > 0 !\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [20 x i8] c"Enter %d numbers : \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i64
%7 = alloca i32
%8 = alloca i64
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @check_intInput(i32* %2)
%11 = load i32, i32* %2
%12 = icmp sle i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
17: ; preds = %0
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
%20 = call i8* @llvm.stacksave()
store i8* %20, i8** %3
%21 = alloca float, i64 %19
store i64 %19, i64* %4
%22 = load i32, i32* %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %2
%25 = call i32 @fill_array(float* %21, i32 %24)
%26 = load i32, i32* %2
%27 = zext i32 %26 to i64
%28 = alloca float, i64 %27
store i64 %27, i64* %6
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
%31 = alloca float, i64 %30
store i64 %30, i64* %8
%32 = load i32, i32* %2
%33 = call i32 @colect_floating(float* %21, i32 %32, float* %31)
store i32 %33, i32* %7
%34 = load i32, i32* %2
%35 = call i32 @colect_round(float* %21, i32 %34, float* %28)
store i32 %35, i32* %5
%36 = load i32, i32* %7
%37 = call i32 @print_info(float* %31, i32 %36)
%38 = load i32, i32* %5
%39 = call i32 @print_info(float* %28, i32 %38)
%40 = load i32, i32* @EXIT_SUCCESS
store i32 %40, i32* %1
%41 = load i8*, i8** %3
%42 = load i32, i32* %1
ret i32 %42
}

LLVM IR (-O2):
@.str = [10 x i8] c"Enter n: \00"
@.str.1 = [8 x i8] c"n > 0 !\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [20 x i8] c"Enter %d numbers : \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @check_intInput(i32* %1)
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %0
%12 = zext i32 %5 to i64
%13 = call i8* @llvm.stacksave()
%14 = alloca float, i64 %12
%15 = load i32, i32* %1
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %1
%18 = call i32 @fill_array(float* %14, i32 %17)
%19 = load i32, i32* %1
%20 = zext i32 %19 to i64
%21 = alloca float, i64 %20
%22 = alloca float, i64 %20
%23 = call i32 @colect_floating(float* %14, i32 %19, float* %22)
%24 = load i32, i32* %1
%25 = call i32 @colect_round(float* %14, i32 %24, float* %21)
%26 = call i32 @print_info(float* %22, i32 %23)
%27 = call i32 @print_info(float* %21, i32 %25)
%28 = load i32, i32* @EXIT_SUCCESS
ret i32 %28
}