// File: /workspace/github_c_makefile_star2_O0/mtnygard[P]complisp/lisp.c
// Function: compile_unary_zerop_with_zero_returns_true
TEST compile_unary_zerop_with_zero_returns_true(Buffer *buf) {
  ASTNode *node = new_unary_call("zero?", AST_new_integer(0));
  int compile_result = Compile_entry(buf, node);
  ASSERT_EQ(compile_result, 0);
  // 0:  48 c7 c0 00 00 00 00    mov    rax,0x0
  // 7:  48 3d 00 00 00 00       cmp    rax,0x00000000
  // d:  48 c7 c0 00 00 00 00    mov    rax,0x0
  // 14: 0f 94 c0                sete   al
  // 17: 48 c1 e0 07             shl    rax,0x7
  // 1b: 48 83 c8 1f             or     rax,0x1f
  byte expected[] = {0x48, 0xc7, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x48,
                     0x3d, 0x00, 0x00, 0x00, 0x00, 0x48, 0xc7, 0xc0,
                     0x00, 0x00, 0x00, 0x00, 0x0f, 0x94, 0xc0, 0x48,
                     0xc1, 0xe0, 0x07, 0x48, 0x83, 0xc8, 0x1f};
  EXPECT_ENTRY_CONTAINS_CODE(buf, expected);
  Buffer_make_executable(buf);
  uword result = Testing_execute_expr(buf);
  ASSERT_EQ(result, Object_true());
  AST_heap_free(node);
  PASS();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x15c0
movq %rax, %rsi
leaq 0x917f(%rip), %rdi      # 0x149de
callq 0x4ff0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4690
movl %eax, -0x1c(%rbp)
movl 0xf8c6(%rip), %eax      # 0x1b144
addl $0x1, %eax
movl %eax, 0xf8bd(%rip)      # 0x1b144
cmpl $0x0, -0x1c(%rbp)
je 0xb8d5
jmp 0xb88f
leaq 0x8e0d(%rip), %rax      # 0x146a3
movq %rax, 0xf8b3(%rip)      # 0x1b150
movl $0x68c, 0xf8a1(%rip)    # imm = 0x68C
leaq 0xa7d7(%rip), %rax      # 0x16085
movq %rax, 0xf8a3(%rip)      # 0x1b158
movzbl 0xf844(%rip), %eax      # 0x1b100
andl $0x4, %eax
cmpl $0x0, %eax
je 0xb8c9
callq 0x1040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb9dd
jmp 0xb8d7
movq 0x89c2(%rip), %rax      # 0x142a0
movq %rax, -0x40(%rbp)
movq 0x89bf(%rip), %rax      # 0x142a8
movq %rax, -0x38(%rbp)
movq 0x89bc(%rip), %rax      # 0x142b0
movq %rax, -0x30(%rbp)
movl 0x89ba(%rip), %eax      # 0x142b8
movl %eax, -0x28(%rbp)
movw 0x89b4(%rip), %ax       # 0x142bc
movw %ax, -0x24(%rbp)
movb 0x89ac(%rip), %al       # 0x142be
movb %al, -0x22(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x1f, %edx
callq 0x12d40
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0xb93b
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb9dd
jmp 0xb93d
movq -0x10(%rbp), %rdi
callq 0x1c50
movq -0x10(%rbp), %rdi
callq 0x4f20
movq %rax, -0x50(%rbp)
movl 0xf7eb(%rip), %eax      # 0x1b144
addl $0x1, %eax
movl %eax, 0xf7e2(%rip)      # 0x1b144
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
callq 0x1400
movq %rax, %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
je 0xb9c0
jmp 0xb97d
leaq 0x8d1f(%rip), %rax      # 0x146a3
movq %rax, 0xf7c5(%rip)      # 0x1b150
movl $0x69a, 0xf7b3(%rip)    # imm = 0x69A
leaq 0xa7a0(%rip), %rax      # 0x1613c
movq %rax, 0xf7b5(%rip)      # 0x1b158
movzbl 0xf756(%rip), %eax      # 0x1b100
andl $0x4, %eax
cmpl $0x0, %eax
je 0xb9b7
callq 0x1040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb9dd
jmp 0xb9c2
movq -0x18(%rbp), %rdi
callq 0x1800
movq $0x0, 0xf782(%rip) # 0x1b158
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)