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


x86 assembly (clang, -O0):
<check_intInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xea9(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x3,%eax
je     117f <check_intInput+0x4f>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jl     11a6 <check_intInput+0x76>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jl     11a6 <check_intInput+0x76>
mov    -0x18(%rbp),%rax
cmpl   $0x0,(%rax)
jge    11c0 <check_intInput+0x90>
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e27(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_intInput>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xebb(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <scanf@plt>
cmp    $0x3,%eax
jne    1178 <check_intInput+0x48>
cmpl   $0x0,(%rbx)
js     116f <check_intInput+0x3f>
cmpl   $0x0,(%r15)
js     116f <check_intInput+0x3f>
cmpl   $0x0,(%r14)
js     116f <check_intInput+0x3f>
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xea1(%rip),%rdi
jmp    117f <check_intInput+0x4f>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d%*c\00"
@.str.1 = [11 x i8] c"Not digit!\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [19 x i8] c"Can't be negative!\00"
define void @check_intInput(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %0, i32* %1, i32* %2)
%5 = icmp eq i32 %4, 3
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %3
%11 = load i32, i32* %0
%12 = icmp slt i32 %11, 0
br i1 %12, label %19, label %13
13: ; preds = %10
%14 = load i32, i32* %1
%15 = icmp slt i32 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %13
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %23
19: ; preds = %16, %13, %10
%20 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%21 = load i32, i32* @EXIT_FAILURE
%22 = tail call i32 @exit(i32 %21)
unreachable
23: ; preds = %16
ret void
}