#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*/ preencheVetor(int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n = 0;
  int m = 0;
  scanf("%d", &n);
  scanf("%d", &m);
  if ((n >= 1 && n <= 10000) && (m >= 1 && m <= 500) && (m <= n)) {
    preencheVetor(n, m);
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeac(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jl     11a9 <main+0x89>
cmpl   $0x2710,-0x8(%rbp)
jg     11a9 <main+0x89>
cmpl   $0x1,-0xc(%rbp)
jl     11a9 <main+0x89>
cmpl   $0x1f4,-0xc(%rbp)
jg     11a9 <main+0x89>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11a9 <main+0x89>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <preencheVetor@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
lea    -0x2711(%rdi),%eax
cmp    $0xffffd8f0,%eax
jb     1180 <main+0x60>
mov    0x8(%rsp),%esi
test   %esi,%esi
jle    1180 <main+0x60>
cmp    $0x1f4,%esi
jg     1180 <main+0x60>
cmp    %edi,%esi
jg     1180 <main+0x60>
call   1030 <preencheVetor@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 1
br i1 %7, label %8, label %25
8: ; preds = %0
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 10000
br i1 %10, label %11, label %25
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp sge i32 %12, 1
br i1 %13, label %14, label %25
14: ; preds = %11
%15 = load i32, i32* %3
%16 = icmp sle i32 %15, 500
br i1 %16, label %17, label %25
17: ; preds = %14
%18 = load i32, i32* %3
%19 = load i32, i32* %2
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %25
21: ; preds = %17
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = call i32 @preencheVetor(i32 %22, i32 %23)
store i32 0, i32* %1
br label %25
25: ; preds = %21, %17, %14, %11, %8, %0
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = add i32 %7, -10001
%9 = icmp ult i32 %8, -10000
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 1
%12 = select i1 %9, i1 true, i1 %11
%13 = icmp sgt i32 %10, 500
%14 = select i1 %12, i1 true, i1 %13
%15 = icmp sgt i32 %10, %7
%16 = select i1 %14, i1 true, i1 %15
br i1 %16, label %19, label %17
17: ; preds = %0
%18 = call i32 @preencheVetor(i32 %7, i32 %10)
br label %19
19: ; preds = %0, %17
ret i32 0
}