void CNullOrLeqNT(const volatile void *e, const volatile void *e1,
                  const volatile void *e2, unsigned int sz, const char *why,
                  const char *text, const char *file, int line,
                  const char *func) {
  if (e && e1 > e2) {
    if (!(deputy_nullcheck(e2, (e1 - e2) / sz, sz)) || 0) {
      deputy_fail_mayreturn(why, text, file, line, func);
    };
  }
}


x86 assembly (clang, -O0):
<CNullOrLeqNT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11af <CNullOrLeqNT+0x8f>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    11af <CNullOrLeqNT+0x8f>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
mov    -0x1c(%rbp),%ecx
cqto
idiv   %rcx
mov    %rax,%rsi
mov    -0x1c(%rbp),%edx
mov    $0x0,%al
call   1040 <deputy_nullcheck@plt>
cmp    $0x0,%eax
jne    11aa <CNullOrLeqNT+0x8a>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    0x10(%rbp),%rdx
mov    0x18(%rbp),%ecx
mov    0x20(%rbp),%r8
mov    $0x0,%al
call   1030 <deputy_fail_mayreturn@plt>
jmp    11af <CNullOrLeqNT+0x8f>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CNullOrLeqNT>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     117d <CNullOrLeqNT+0x5d>
mov    %rdx,%rbp
sub    %rdx,%rsi
jbe    117d <CNullOrLeqNT+0x5d>
mov    %r9,%r14
mov    %r8,%rbx
mov    0x50(%rsp),%r15
mov    0x48(%rsp),%r12d
mov    0x40(%rsp),%r13
mov    %ecx,%edi
mov    %rsi,%rax
shr    $0x20,%rax
je     1165 <CNullOrLeqNT+0x45>
mov    %rsi,%rax
cqto
idiv   %rdi
mov    %rax,%rsi
jmp    116d <CNullOrLeqNT+0x4d>
mov    %esi,%eax
xor    %edx,%edx
div    %edi
mov    %eax,%esi
mov    %rbp,%rdi
mov    %ecx,%edx
xor    %eax,%eax
call   1040 <deputy_nullcheck@plt>
test   %eax,%eax
je     118c <CNullOrLeqNT+0x6c>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %r15,%r8
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <deputy_fail_mayreturn@plt>

LLVM IR (-O0):
define void @CNullOrLeqNT(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i8* %5, i8* %6, i32 %7, i8* %8) {
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32
%18 = alloca i8*
store i8* %0, i8** %10
store i8* %1, i8** %11
store i8* %2, i8** %12
store i32 %3, i32* %13
store i8* %4, i8** %14
store i8* %5, i8** %15
store i8* %6, i8** %16
store i32 %7, i32* %17
store i8* %8, i8** %18
%19 = load i8*, i8** %10
%20 = icmp ne i8* %19, null
br i1 %20, label %21, label %46
21: ; preds = %9
%22 = load i8*, i8** %11
%23 = load i8*, i8** %12
%24 = icmp ugt i8* %22, %23
br i1 %24, label %25, label %46
25: ; preds = %21
%26 = load i8*, i8** %12
%27 = load i8*, i8** %11
%28 = load i8*, i8** %12
%29 = ptrtoint i8* %27 to i64
%30 = ptrtoint i8* %28 to i64
%31 = sub i64 %29, %30
%32 = load i32, i32* %13
%33 = zext i32 %32 to i64
%34 = sdiv i64 %31, %33
%35 = load i32, i32* %13
%36 = call i32 (i8*, i64, i32, ...) bitcast (i32 (...)* @deputy_nullcheck to i32 (i8*, i64, i32, ...)*)(i8* %26, i64 %34, i32 %35)
%37 = icmp ne i32 %36, 0
br i1 %37, label %45, label %38
38: ; preds = %25
%39 = load i8*, i8** %14
%40 = load i8*, i8** %15
%41 = load i8*, i8** %16
%42 = load i32, i32* %17
%43 = load i8*, i8** %18
%44 = call i32 (i8*, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @deputy_fail_mayreturn to i32 (i8*, i8*, i8*, i32, i8*, ...)*)(i8* %39, i8* %40, i8* %41, i32 %42, i8* %43)
br label %45
45: ; preds = %38, %25
br label %46
46: ; preds = %45, %21, %9
ret void
}

LLVM IR (-O2):
define void @CNullOrLeqNT(i8* readnone %0, i8* %1, i8* %2, i32 %3, i8* %4, i8* %5, i8* %6, i32 %7, i8* %8) {
%10 = icmp ne i8* %0, null
%11 = icmp ugt i8* %1, %2
%12 = and i1 %10, %11
br i1 %12, label %13, label %23
13: ; preds = %9
%14 = ptrtoint i8* %1 to i64
%15 = ptrtoint i8* %2 to i64
%16 = sub i64 %14, %15
%17 = zext i32 %3 to i64
%18 = sdiv i64 %16, %17
%19 = tail call i32 (i8*, i64, i32, ...) bitcast (i32 (...)* @deputy_nullcheck to i32 (i8*, i64, i32, ...)*)(i8* %2, i64 %18, i32 %3)
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %13
%22 = tail call i32 (i8*, i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @deputy_fail_mayreturn to i32 (i8*, i8*, i8*, i32, i8*, ...)*)(i8* %4, i8* %5, i8* %6, i32 %7, i8* %8)
br label %23
23: ; preds = %13, %21, %9
ret void
}