#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 /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int scanf(char *, unsigned short *, unsigned short *);
int /*<<< orphan*/ stderr;
void check_intInput(unsigned short *a, unsigned short *b) {
  if ((scanf("%hu %hu%*c", a, b)) != 2) {
    printf("Not digit!");
    exit(EXIT_FAILURE);
  }
  if (*a < 0 || *b < 0) {
    fprintf(stderr, "Can't be negative");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<check_intInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xea1(%rip),%rdi
call   1050 <scanf@plt>
cmp    $0x2,%eax
je     1187 <check_intInput+0x47>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
cmp    $0x0,%eax
jl     11a7 <check_intInput+0x67>
mov    -0x10(%rbp),%rax
movzwl (%rax),%eax
cmp    $0x0,%eax
jge    11ca <check_intInput+0x8a>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
lea    0xe5f(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_intInput>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xec2(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    114a <check_intInput+0x1a>
pop    %rax
ret
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%hu %hu%*c\00"
@.str.1 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
@stderr = global i32 0
@.str.2 = [18 x i8] c"Can't be negative\00"
define void @check_intInput(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
store i16* %0, i16** %3
store i16* %1, i16** %4
%5 = load i16*, i16** %3
%6 = load i16*, i16** %4
%7 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i16* %5, i16* %6)
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
%14 = load i16*, i16** %3
%15 = load i16, i16* %14
%16 = zext i16 %15 to i32
%17 = icmp slt i32 %16, 0
br i1 %17, label %23, label %18
18: ; preds = %13
%19 = load i16*, i16** %4
%20 = load i16, i16* %19
%21 = zext i16 %20 to i32
%22 = icmp slt i32 %21, 0
br i1 %22, label %23, label %28
23: ; preds = %18, %13
%24 = load i32, i32* @stderr
%25 = call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%26 = load i32, i32* @EXIT_FAILURE
%27 = call i32 @exit(i32 %26)
unreachable
28: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%hu %hu%*c\00"
@.str.1 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
@stderr = global i32 0
define void @check_intInput(i16* %0, i16* %1) {
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i16* %0, i16* %1)
%4 = icmp eq i32 %3, 2
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret void
}