#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 error_except(char *);
int exit_func(char *);
int my_strlen(char *);
int verif_error_inst(char *data) {
  int max;
  max = my_strlen(data);
  if (max >= 2)
    if (error_except(data) == -1)
      return (exit_func("Invalid null command.\n"));
  if (data[0] == '>')
    return (2);
  return (0);
}


x86 assembly (clang, -O0):
<verif_error_inst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jl     117d <verif_error_inst+0x4d>
mov    -0x10(%rbp),%rdi
call   1050 <error_except@plt>
cmp    $0xffffffff,%eax
jne    1178 <verif_error_inst+0x48>
lea    0xe95(%rip),%rdi
call   1040 <exit_func@plt>
mov    %eax,-0x4(%rbp)
jmp    11a0 <verif_error_inst+0x70>
jmp    117d <verif_error_inst+0x4d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3e,%eax
jne    1199 <verif_error_inst+0x69>
movl   $0x2,-0x4(%rbp)
jmp    11a0 <verif_error_inst+0x70>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verif_error_inst>:
push   %rbx
mov    %rdi,%rbx
call   1030 <my_strlen@plt>
cmp    $0x2,%eax
jl     114b <verif_error_inst+0x1b>
mov    %rbx,%rdi
call   1050 <error_except@plt>
cmp    $0xffffffff,%eax
je     1157 <verif_error_inst+0x27>
xor    %eax,%eax
cmpb   $0x3e,(%rbx)
sete   %al
add    %eax,%eax
pop    %rbx
ret
lea    0xea2(%rip),%rdi
pop    %rbx
jmp    1040 <exit_func@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Invalid null command.\0A\00"
define i32 @verif_error_inst(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @my_strlen(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 2
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 @error_except(i8* %10)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @exit_func(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i32 %14, i32* %2
br label %24
15: ; preds = %9
br label %16
16: ; preds = %15, %1
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 62
br i1 %21, label %22, label %23
22: ; preds = %16
store i32 2, i32* %2
br label %24
23: ; preds = %16
store i32 0, i32* %2
br label %24
24: ; preds = %23, %22, %13
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
@.str = [23 x i8] c"Invalid null command.\0A\00"
define i32 @verif_error_inst(i8* %0) {
%2 = tail call i32 @my_strlen(i8* %0)
%3 = icmp sgt i32 %2, 1
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i32 @error_except(i8* %0)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @exit_func(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %13
9: ; preds = %4, %1
%10 = load i8, i8* %0
%11 = icmp eq i8 %10, 62
%12 = select i1 %11, i32 2, i32 0
br label %13
13: ; preds = %9, %7
%14 = phi i32 [ %8, %7 ], [ %12, %9 ]
ret i32 %14
}