// File: 0x0584[P]scmin-plus/src/repl/main.cpp
// Function: main
int main()
{
    cout << "This software comes with ABSOLUTLY NO WARRANTY." << endl;
    cout << "scmin++ is a minimal Scheme interpreter.\n" << endl;

    signal(SIGINT, &flush);
    sexpr::init_global();
    while (true) {
        sexpr_t e, res;
        string s;

        cout << "(" << loop << ")> ";
        if (not getline(cin, s)) {
            cout << "Bye!" << endl;
            break;
        } else if (not (e = parse(s)))
            continue;
        if ((res = eval(e, sexpr::global))) {
            cout << "=> "<<  res << endl;
            loop++;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl $0x0, -0x4(%rbp)
movq 0x181ff(%rip), %rdi     # 0x2dfc8
leaq 0xb911(%rip), %rsi      # 0x216e1
callq 0x32c0
movq %rax, %rdi
movq 0x181b1(%rip), %rsi     # 0x2df90
callq 0x32f0
movq 0x181dd(%rip), %rdi     # 0x2dfc8
leaq 0xb91f(%rip), %rsi      # 0x21711
callq 0x32c0
movq %rax, %rdi
movq 0x1818f(%rip), %rsi     # 0x2df90
callq 0x32f0
movl $0x2, %edi
leaq -0xc2(%rip), %rsi       # 0x15d50
callq 0x3350
callq 0x16df0
leaq -0x18(%rbp), %rdi
callq 0x6ef0
leaq -0x28(%rbp), %rdi
callq 0x6ef0
leaq -0x48(%rbp), %rdi
callq 0x33d0
movq 0x1818a(%rip), %rdi     # 0x2dfc8
leaq 0xb71b(%rip), %rsi      # 0x21560
callq 0x32c0
movq %rax, -0xb0(%rbp)
jmp 0x15e53
movq -0xb0(%rbp), %rdi
movq 0x18477(%rip), %rsi     # 0x2e2d8
callq 0x30b0
movq %rax, -0xb8(%rbp)
jmp 0x15e6f
movq -0xb8(%rbp), %rdi
leaq 0xb860(%rip), %rsi      # 0x216dd
callq 0x32c0
jmp 0x15e84
movq 0x1814d(%rip), %rdi     # 0x2dfd8
leaq -0x48(%rbp), %rsi
callq 0x3080
movq %rax, -0xc0(%rbp)
jmp 0x15e9d
movq -0xc0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3160
movb %al, -0xc1(%rbp)
jmp 0x15ebb
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x15ec7
jmp 0x15f15
movq 0x180fa(%rip), %rdi     # 0x2dfc8
leaq 0xb866(%rip), %rsi      # 0x2173b
callq 0x32c0
movq %rax, -0xd0(%rbp)
jmp 0x15ee3
movq -0xd0(%rbp), %rdi
movq 0x1809f(%rip), %rsi     # 0x2df90
callq 0x32f0
jmp 0x15ef8
movl $0x3, -0x58(%rbp)
jmp 0x16099
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x160db
leaq -0x88(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3120
jmp 0x15f27
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x1b5f0
jmp 0x15f39
leaq -0x18(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x4420
movq %rax, %rdi
callq 0xb5c0
xorb $-0x1, %al
movb %al, -0xd1(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x4450
leaq -0x88(%rbp), %rdi
callq 0x31d0
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0x15f77
jmp 0x15fa0
movl $0x2, -0x58(%rbp)
jmp 0x16099
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x31d0
jmp 0x160db
jmp 0x15fa2
leaq 0x1833f(%rip), %rdx     # 0x2e2e8
leaq -0x98(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x19aa0
jmp 0x15fbb
leaq -0x28(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x4420
movq %rax, %rdi
callq 0xb5c0
movb %al, -0xd2(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x4450
movb -0xd2(%rbp), %al
testb $0x1, %al
jne 0x15ff4
jmp 0x16092
movq 0x17fcd(%rip), %rdi     # 0x2dfc8
leaq 0xb73e(%rip), %rsi      # 0x21740
callq 0x32c0
movq %rax, -0xe0(%rbp)
jmp 0x16010
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x43d0
movq -0xe0(%rbp), %rdi
movq -0xf0(%rbp), %rsi
callq 0x10b90
movq %rax, -0xe8(%rbp)
jmp 0x16043
movq -0xe8(%rbp), %rdi
movq 0x17f3f(%rip), %rsi     # 0x2df90
callq 0x32f0
jmp 0x16058
leaq -0xa8(%rbp), %rdi
callq 0x4450
movq 0x1826d(%rip), %rax     # 0x2e2d8
addq $0x1, %rax
movq %rax, 0x18262(%rip)     # 0x2e2d8
jmp 0x16092
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x4450
jmp 0x160db
movl $0x0, -0x58(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x31d0
leaq -0x28(%rbp), %rdi
callq 0x4450
leaq -0x18(%rbp), %rdi
callq 0x4450
movl -0x58(%rbp), %eax
movl %eax, -0xf4(%rbp)
testl %eax, %eax
je 0x160d6
jmp 0x160c3
movl -0xf4(%rbp), %eax
subl $0x2, %eax
je 0x15e1c
jmp 0x160d4
jmp 0x160f8
jmp 0x15e1c
leaq -0x48(%rbp), %rdi
callq 0x31d0
leaq -0x28(%rbp), %rdi
callq 0x4450
leaq -0x18(%rbp), %rdi
callq 0x4450
jmp 0x16103
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x34f0
nopl (%rax)