// #target: macos-x64
module test;

interface Test {}

fn void main()
{
	Test a;
	bool x = a == null;
	a = null;
	any z = a;
	z = null;
}

/* #expect: test.ll

%any = type { ptr, i64 }
@"$ct.void" = linkonce global %.introspect { i8 0, i64 0, ptr null, i64 1, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8

define void @test.main() #0 {
entry:
  %a = alloca %any, align 8
  %x = alloca i8, align 1
  %z = alloca %any, align 8
  store %any zeroinitializer, ptr %a, align 8
  %0 = load ptr, ptr %a, align 8
  %eq = icmp eq ptr %0, null
  %1 = zext i1 %eq to i8
  store i8 %1, ptr %x, align 1
  store %any { ptr null, i64 ptrtoint (ptr @"$ct.void" to i64) }, ptr %a, align 8
  %2 = load %any, ptr %a, align 8
  store %any %2, ptr %z, align 8
  store %any { ptr null, i64 ptrtoint (ptr @"$ct.void" to i64) }, ptr %z, align 8
  ret void
}