#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 */
void *returns_nonnull_whee();
void returns_nonnull_warning_tests() {
  if (returns_nonnull_whee() == (void *)0) {
  }
  if (returns_nonnull_whee() != (void *)0) {
  }
  if (returns_nonnull_whee()) {
  }
  if (!returns_nonnull_whee()) {
  }
  int and_again = !returns_nonnull_whee();
  and_again = !returns_nonnull_whee();
}


x86 assembly (clang, -O0):
<returns_nonnull_warning_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <returns_nonnull_whee@plt>
cmp    $0x0,%rax
jne    112e <returns_nonnull_warning_tests+0x1e>
jmp    112e <returns_nonnull_warning_tests+0x1e>
mov    $0x0,%al
call   1030 <returns_nonnull_whee@plt>
cmp    $0x0,%rax
je     1144 <returns_nonnull_warning_tests+0x34>
jmp    1144 <returns_nonnull_warning_tests+0x34>
mov    $0x0,%al
call   1030 <returns_nonnull_whee@plt>
cmp    $0x0,%rax
je     115a <returns_nonnull_warning_tests+0x4a>
jmp    115a <returns_nonnull_warning_tests+0x4a>
mov    $0x0,%al
call   1030 <returns_nonnull_whee@plt>
cmp    $0x0,%rax
jne    1170 <returns_nonnull_warning_tests+0x60>
jmp    1170 <returns_nonnull_warning_tests+0x60>
mov    $0x0,%al
call   1030 <returns_nonnull_whee@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <returns_nonnull_whee@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<returns_nonnull_warning_tests>:
push   %rax
xor    %eax,%eax
call   1030 <returns_nonnull_whee@plt>
xor    %eax,%eax
call   1030 <returns_nonnull_whee@plt>
xor    %eax,%eax
call   1030 <returns_nonnull_whee@plt>
xor    %eax,%eax
call   1030 <returns_nonnull_whee@plt>
xor    %eax,%eax
call   1030 <returns_nonnull_whee@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <returns_nonnull_whee@plt>

LLVM IR (-O0):
define void @returns_nonnull_warning_tests() {
%1 = alloca i32
%2 = call i8* (...) @returns_nonnull_whee()
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %5
4: ; preds = %0
br label %5
5: ; preds = %4, %0
%6 = call i8* (...) @returns_nonnull_whee()
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %5
br label %9
9: ; preds = %8, %5
%10 = call i8* (...) @returns_nonnull_whee()
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %9
br label %13
13: ; preds = %12, %9
%14 = call i8* (...) @returns_nonnull_whee()
%15 = icmp ne i8* %14, null
br i1 %15, label %17, label %16
16: ; preds = %13
br label %17
17: ; preds = %16, %13
%18 = call i8* (...) @returns_nonnull_whee()
%19 = icmp ne i8* %18, null
%20 = xor i1 %19, true
%21 = zext i1 %20 to i32
store i32 %21, i32* %1
%22 = call i8* (...) @returns_nonnull_whee()
%23 = icmp ne i8* %22, null
%24 = xor i1 %23, true
%25 = zext i1 %24 to i32
store i32 %25, i32* %1
ret void
}

LLVM IR (-O2):
define void @returns_nonnull_warning_tests() {
%1 = tail call i8* (...) @returns_nonnull_whee()
%2 = tail call i8* (...) @returns_nonnull_whee()
%3 = tail call i8* (...) @returns_nonnull_whee()
%4 = tail call i8* (...) @returns_nonnull_whee()
%5 = tail call i8* (...) @returns_nonnull_whee()
%6 = tail call i8* (...) @returns_nonnull_whee()
ret void
}