#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*/ PrintErrorExit(char *, char *);
scalar_t__ atoi(char *);
void Check_delay(int argc, char **argv) {
  if (argc > 4) {
    if (argc == 5) {
      if (atoi(argv[4]) >= 0)
        return;
      PrintErrorExit(argv[0], "delay: Negative value");
    }
    PrintErrorExit(argv[0], "delay");
  }
  PrintErrorExit(argv[0], "delay");
}


x86 assembly (clang, -O0):
<Check_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x4(%rbp)
jle    1185 <Check_delay+0x65>
cmpl   $0x5,-0x4(%rbp)
jne    1172 <Check_delay+0x52>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1030 <atoi@plt>
cmp    $0x0,%rax
jl     115f <Check_delay+0x3f>
jmp    1198 <Check_delay+0x78>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe93(%rip),%rsi
call   1040 <PrintErrorExit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe96(%rip),%rsi
call   1040 <PrintErrorExit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe83(%rip),%rsi
call   1040 <PrintErrorExit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Check_delay>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x5,%edi
jl     1159 <Check_delay+0x39>
jne    114a <Check_delay+0x2a>
mov    0x20(%rbx),%rdi
call   1030 <atoi@plt>
test   %rax,%rax
js     113b <Check_delay+0x1b>
pop    %rbx
ret
mov    (%rbx),%rdi
lea    0xebb(%rip),%rsi
call   1040 <PrintErrorExit@plt>
mov    (%rbx),%rdi
lea    0xec2(%rip),%rsi
call   1040 <PrintErrorExit@plt>
mov    (%rbx),%rdi
lea    0xeb3(%rip),%rsi
pop    %rbx
jmp    1040 <PrintErrorExit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"delay: Negative value\00"
@.str.1 = [6 x i8] c"delay\00"
define void @Check_delay(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 4
br i1 %6, label %7, label %27
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 5
br i1 %9, label %10, label %22
10: ; preds = %7
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 4
%13 = load i8*, i8** %12
%14 = call i64 @atoi(i8* %13)
%15 = icmp sge i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %10
br label %32
17: ; preds = %10
%18 = load i8**, i8*** %4
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @PrintErrorExit(i8* %20, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %22
22: ; preds = %17, %7
%23 = load i8**, i8*** %4
%24 = getelementptr inbounds i8*, i8** %23, i64 0
%25 = load i8*, i8** %24
%26 = call i32 @PrintErrorExit(i8* %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %27
27: ; preds = %22, %2
%28 = load i8**, i8*** %4
%29 = getelementptr inbounds i8*, i8** %28, i64 0
%30 = load i8*, i8** %29
%31 = call i32 @PrintErrorExit(i8* %30, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %27, %16
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"delay: Negative value\00"
@.str.1 = [6 x i8] c"delay\00"
define void @Check_delay(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 4
br i1 %3, label %4, label %17
4: ; preds = %2
%5 = icmp eq i32 %0, 5
br i1 %5, label %6, label %14
6: ; preds = %4
%7 = getelementptr inbounds i8*, i8** %1, i64 4
%8 = load i8*, i8** %7
%9 = tail call i64 @atoi(i8* %8)
%10 = icmp sgt i64 %9, -1
br i1 %10, label %20, label %11
11: ; preds = %6
%12 = load i8*, i8** %1
%13 = tail call i32 @PrintErrorExit(i8* %12, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %11, %4
%15 = load i8*, i8** %1
%16 = tail call i32 @PrintErrorExit(i8* %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %14, %2
%18 = load i8*, i8** %1
%19 = tail call i32 @PrintErrorExit(i8* %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %20
20: ; preds = %6, %17
ret void
}