#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 */
scalar_t__ DTTOIF(scalar_t__);
scalar_t__ DT_BLK;
scalar_t__ DT_CHR;
scalar_t__ DT_DIR;
scalar_t__ DT_FIFO;
scalar_t__ DT_REG;
scalar_t__ DT_SOCK;
scalar_t__ IFTODT(scalar_t__);
scalar_t__ S_IFBLK;
scalar_t__ S_IFCHR;
scalar_t__ S_IFDIR;
scalar_t__ S_IFIFO;
scalar_t__ S_IFREG;
scalar_t__ S_IFSOCK;
int /*<<< orphan*/ assert(int);
void test_macros(void) {
  assert(DTTOIF(DT_REG) == S_IFREG);
  assert(DTTOIF(DT_DIR) == S_IFDIR);
  assert(DTTOIF(DT_FIFO) == S_IFIFO);
  assert(DTTOIF(DT_SOCK) == S_IFSOCK);
  assert(DTTOIF(DT_CHR) == S_IFCHR);
  assert(DTTOIF(DT_BLK) == S_IFBLK);
  assert(IFTODT(S_IFREG) == DT_REG);
  assert(IFTODT(S_IFDIR) == DT_DIR);
  assert(IFTODT(S_IFIFO) == DT_FIFO);
  assert(IFTODT(S_IFSOCK) == DT_SOCK);
  assert(IFTODT(S_IFCHR) == DT_CHR);
  assert(IFTODT(S_IFBLK) == DT_BLK);
}


x86 assembly (clang, -O0):
<test_macros>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e95(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2e20(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2e01(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2e0a(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2e1c(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2dd5(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2dde(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2db7(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2dc0(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%rdi
call   1050 <IFTODT@plt>
mov    0x2da2(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2d4b(%rip),%rax
mov    (%rax),%rdi
call   1050 <IFTODT@plt>
mov    0x2d64(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2d35(%rip),%rax
mov    (%rax),%rdi
call   1050 <IFTODT@plt>
mov    0x2d0e(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2d47(%rip),%rax
mov    (%rax),%rdi
call   1050 <IFTODT@plt>
mov    0x2ce0(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2d09(%rip),%rax
mov    (%rax),%rdi
call   1050 <IFTODT@plt>
mov    0x2ce2(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2ceb(%rip),%rax
mov    (%rax),%rdi
call   1050 <IFTODT@plt>
mov    0x2cc4(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_macros>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e8e(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2e97(%rip),%r14
xor    %edi,%edi
cmp    (%r14),%rax
sete   %dil
call   1030 <assert@plt>
mov    0x2e52(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2e1b(%rip),%r15
xor    %edi,%edi
cmp    (%r15),%rax
sete   %dil
call   1030 <assert@plt>
mov    0x2dfe(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2e07(%rip),%r12
xor    %edi,%edi
cmp    (%r12),%rax
sete   %dil
call   1030 <assert@plt>
mov    0x2dd1(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2e1a(%rip),%r13
xor    %edi,%edi
cmp    0x0(%r13),%rax
sete   %dil
call   1030 <assert@plt>
mov    0x2dd4(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2ddd(%rip),%rbx
xor    %edi,%edi
cmp    (%rbx),%rax
sete   %dil
call   1030 <assert@plt>
mov    0x2db8(%rip),%rax
mov    (%rax),%rdi
call   1040 <DTTOIF@plt>
mov    0x2dc1(%rip),%rbp
xor    %edi,%edi
cmp    0x0(%rbp),%rax
sete   %dil
call   1030 <assert@plt>
mov    (%r14),%rdi
call   1050 <IFTODT@plt>
xor    %edi,%edi
mov    0x2da9(%rip),%rcx
cmp    (%rcx),%rax
sete   %dil
call   1030 <assert@plt>
mov    (%r15),%rdi
call   1050 <IFTODT@plt>
xor    %edi,%edi
mov    0x2d74(%rip),%rcx
cmp    (%rcx),%rax
sete   %dil
call   1030 <assert@plt>
mov    (%r12),%rdi
call   1050 <IFTODT@plt>
xor    %edi,%edi
mov    0x2d26(%rip),%rcx
cmp    (%rcx),%rax
sete   %dil
call   1030 <assert@plt>
mov    0x0(%r13),%rdi
call   1050 <IFTODT@plt>
xor    %edi,%edi
mov    0x2d00(%rip),%rcx
cmp    (%rcx),%rax
sete   %dil
call   1030 <assert@plt>
mov    (%rbx),%rdi
call   1050 <IFTODT@plt>
xor    %edi,%edi
mov    0x2d0b(%rip),%rcx
cmp    (%rcx),%rax
sete   %dil
call   1030 <assert@plt>
mov    0x0(%rbp),%rdi
call   1050 <IFTODT@plt>
xor    %edi,%edi
mov    0x2cf5(%rip),%rcx
cmp    (%rcx),%rax
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <assert@plt>

LLVM IR (-O0):
@DT_REG = global i64 0
@S_IFREG = global i64 0
@DT_DIR = global i64 0
@S_IFDIR = global i64 0
@DT_FIFO = global i64 0
@S_IFIFO = global i64 0
@DT_SOCK = global i64 0
@S_IFSOCK = global i64 0
@DT_CHR = global i64 0
@S_IFCHR = global i64 0
@DT_BLK = global i64 0
@S_IFBLK = global i64 0
define void @test_macros() {
%1 = load i64, i64* @DT_REG
%2 = call i64 @DTTOIF(i64 %1)
%3 = load i64, i64* @S_IFREG
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i64, i64* @DT_DIR
%8 = call i64 @DTTOIF(i64 %7)
%9 = load i64, i64* @S_IFDIR
%10 = icmp eq i64 %8, %9
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i64, i64* @DT_FIFO
%14 = call i64 @DTTOIF(i64 %13)
%15 = load i64, i64* @S_IFIFO
%16 = icmp eq i64 %14, %15
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i64, i64* @DT_SOCK
%20 = call i64 @DTTOIF(i64 %19)
%21 = load i64, i64* @S_IFSOCK
%22 = icmp eq i64 %20, %21
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = load i64, i64* @DT_CHR
%26 = call i64 @DTTOIF(i64 %25)
%27 = load i64, i64* @S_IFCHR
%28 = icmp eq i64 %26, %27
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = load i64, i64* @DT_BLK
%32 = call i64 @DTTOIF(i64 %31)
%33 = load i64, i64* @S_IFBLK
%34 = icmp eq i64 %32, %33
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
%37 = load i64, i64* @S_IFREG
%38 = call i64 @IFTODT(i64 %37)
%39 = load i64, i64* @DT_REG
%40 = icmp eq i64 %38, %39
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = load i64, i64* @S_IFDIR
%44 = call i64 @IFTODT(i64 %43)
%45 = load i64, i64* @DT_DIR
%46 = icmp eq i64 %44, %45
%47 = zext i1 %46 to i32
%48 = call i32 @assert(i32 %47)
%49 = load i64, i64* @S_IFIFO
%50 = call i64 @IFTODT(i64 %49)
%51 = load i64, i64* @DT_FIFO
%52 = icmp eq i64 %50, %51
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
%55 = load i64, i64* @S_IFSOCK
%56 = call i64 @IFTODT(i64 %55)
%57 = load i64, i64* @DT_SOCK
%58 = icmp eq i64 %56, %57
%59 = zext i1 %58 to i32
%60 = call i32 @assert(i32 %59)
%61 = load i64, i64* @S_IFCHR
%62 = call i64 @IFTODT(i64 %61)
%63 = load i64, i64* @DT_CHR
%64 = icmp eq i64 %62, %63
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = load i64, i64* @S_IFBLK
%68 = call i64 @IFTODT(i64 %67)
%69 = load i64, i64* @DT_BLK
%70 = icmp eq i64 %68, %69
%71 = zext i1 %70 to i32
%72 = call i32 @assert(i32 %71)
ret void
}

LLVM IR (-O2):
@DT_REG = global i64 0
@S_IFREG = global i64 0
@DT_DIR = global i64 0
@S_IFDIR = global i64 0
@DT_FIFO = global i64 0
@S_IFIFO = global i64 0
@DT_SOCK = global i64 0
@S_IFSOCK = global i64 0
@DT_CHR = global i64 0
@S_IFCHR = global i64 0
@DT_BLK = global i64 0
@S_IFBLK = global i64 0
define void @test_macros() {
%1 = load i64, i64* @DT_REG
%2 = tail call i64 @DTTOIF(i64 %1)
%3 = load i64, i64* @S_IFREG
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = load i64, i64* @DT_DIR
%8 = tail call i64 @DTTOIF(i64 %7)
%9 = load i64, i64* @S_IFDIR
%10 = icmp eq i64 %8, %9
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = load i64, i64* @DT_FIFO
%14 = tail call i64 @DTTOIF(i64 %13)
%15 = load i64, i64* @S_IFIFO
%16 = icmp eq i64 %14, %15
%17 = zext i1 %16 to i32
%18 = tail call i32 @assert(i32 %17)
%19 = load i64, i64* @DT_SOCK
%20 = tail call i64 @DTTOIF(i64 %19)
%21 = load i64, i64* @S_IFSOCK
%22 = icmp eq i64 %20, %21
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = load i64, i64* @DT_CHR
%26 = tail call i64 @DTTOIF(i64 %25)
%27 = load i64, i64* @S_IFCHR
%28 = icmp eq i64 %26, %27
%29 = zext i1 %28 to i32
%30 = tail call i32 @assert(i32 %29)
%31 = load i64, i64* @DT_BLK
%32 = tail call i64 @DTTOIF(i64 %31)
%33 = load i64, i64* @S_IFBLK
%34 = icmp eq i64 %32, %33
%35 = zext i1 %34 to i32
%36 = tail call i32 @assert(i32 %35)
%37 = load i64, i64* @S_IFREG
%38 = tail call i64 @IFTODT(i64 %37)
%39 = load i64, i64* @DT_REG
%40 = icmp eq i64 %38, %39
%41 = zext i1 %40 to i32
%42 = tail call i32 @assert(i32 %41)
%43 = load i64, i64* @S_IFDIR
%44 = tail call i64 @IFTODT(i64 %43)
%45 = load i64, i64* @DT_DIR
%46 = icmp eq i64 %44, %45
%47 = zext i1 %46 to i32
%48 = tail call i32 @assert(i32 %47)
%49 = load i64, i64* @S_IFIFO
%50 = tail call i64 @IFTODT(i64 %49)
%51 = load i64, i64* @DT_FIFO
%52 = icmp eq i64 %50, %51
%53 = zext i1 %52 to i32
%54 = tail call i32 @assert(i32 %53)
%55 = load i64, i64* @S_IFSOCK
%56 = tail call i64 @IFTODT(i64 %55)
%57 = load i64, i64* @DT_SOCK
%58 = icmp eq i64 %56, %57
%59 = zext i1 %58 to i32
%60 = tail call i32 @assert(i32 %59)
%61 = load i64, i64* @S_IFCHR
%62 = tail call i64 @IFTODT(i64 %61)
%63 = load i64, i64* @DT_CHR
%64 = icmp eq i64 %62, %63
%65 = zext i1 %64 to i32
%66 = tail call i32 @assert(i32 %65)
%67 = load i64, i64* @S_IFBLK
%68 = tail call i64 @IFTODT(i64 %67)
%69 = load i64, i64* @DT_BLK
%70 = icmp eq i64 %68, %69
%71 = zext i1 %70 to i32
%72 = tail call i32 @assert(i32 %71)
ret void
}