#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 *, unsigned int *, unsigned int *, unsigned int *,
          unsigned int *);
void check_intInput(unsigned int *a, unsigned int *b, unsigned int *c,
                    unsigned int *d) {
  if ((scanf("%u %u %u %u%*c", a, b, c, d)) != 4) {
    printf("Not digit!");
    exit(EXIT_FAILURE);
  }
  if (*a < 0 || *b < 0 || *c < 0 || *d < 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    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xea1(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x4,%eax
je     1187 <check_intInput+0x57>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jb     11bb <check_intInput+0x8b>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jb     11bb <check_intInput+0x8b>
mov    -0x18(%rbp),%rax
cmpl   $0x0,(%rax)
jb     11bb <check_intInput+0x8b>
mov    -0x20(%rbp),%rax
cmpl   $0x0,(%rax)
jae    11d5 <check_intInput+0xa5>
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_intInput>:
push   %rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xebc(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x4,%eax
jne    1150 <check_intInput+0x20>
pop    %rax
ret
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%u %u %u %u%*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, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %9, i32* %10, i32* %11, i32* %12)
%14 = icmp ne i32 %13, 4
br i1 %14, label %15, label %19
15: ; preds = %4
%16 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* @EXIT_FAILURE
%18 = call i32 @exit(i32 %17)
unreachable
19: ; preds = %4
%20 = load i32*, i32** %5
%21 = load i32, i32* %20
%22 = icmp ult i32 %21, 0
br i1 %22, label %35, label %23
23: ; preds = %19
%24 = load i32*, i32** %6
%25 = load i32, i32* %24
%26 = icmp ult i32 %25, 0
br i1 %26, label %35, label %27
27: ; preds = %23
%28 = load i32*, i32** %7
%29 = load i32, i32* %28
%30 = icmp ult i32 %29, 0
br i1 %30, label %35, label %31
31: ; preds = %27
%32 = load i32*, i32** %8
%33 = load i32, i32* %32
%34 = icmp ult i32 %33, 0
br i1 %34, label %35, label %39
35: ; preds = %31, %27, %23, %19
%36 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%37 = load i32, i32* @EXIT_FAILURE
%38 = call i32 @exit(i32 %37)
unreachable
39: ; preds = %31
ret void
}

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