// #target: macos-x64
module test;

const uptr ABC = 0x213;
const void* BAC = (void*)144 - 1;
const void* EXX = (void*)155;
const isz KEX = BAC - EXX;
const void* CAB = BAC;
const uptr ZAB = (uptr)CAB;
const int* BOB = (int*)16 - 1;
const int* BAB = (int*)16 + 1;
const isz AO = BAB - BOB;

int abc @if(ZAB > 100) = 123;

fn void test()
{
	abc++;
	uptr foo = (uptr)BAC;
}

/* #expect: test.ll

@test.ABC = local_unnamed_addr constant i64 531, align 8
@test.BAC = local_unnamed_addr constant ptr inttoptr (i64 143 to ptr), align 8
@test.EXX = local_unnamed_addr constant ptr inttoptr (i64 155 to ptr), align 8
@test.KEX = local_unnamed_addr constant i64 -12, align 8
@test.CAB = local_unnamed_addr constant ptr inttoptr (i64 143 to ptr), align 8
@test.ZAB = local_unnamed_addr constant i64 143, align 8
@test.BOB = local_unnamed_addr constant ptr inttoptr (i64 12 to ptr), align 8
@test.BAB = local_unnamed_addr constant ptr inttoptr (i64 20 to ptr), align 8
@test.AO = local_unnamed_addr constant i64 2, align 8
@test.abc = local_unnamed_addr global i32 123, align 4