// File: /workspace/github_c_makefile_star2_O3/afi-lambda[P]a_little_smalltalk/src/primitive.c
// Function: primitive
object primitive(register int primitiveNumber, object *arguments)
{
    register int primitiveGroup = primitiveNumber / 10;
    object returnedObject;

    if (primitiveNumber >= 150)
    {
        /* system dependent primitives, handled in separate module */
        returnedObject = sysPrimitive(primitiveNumber, arguments);
    }
    else
    {
        switch (primitiveGroup)
        {
        case 0:
            returnedObject = zeroaryPrims(primitiveNumber);
            break;
        case 1:
            returnedObject = unaryPrims(primitiveNumber - 10, arguments[0]);
            break;
        case 2:
            returnedObject = binaryPrims(primitiveNumber - 20, arguments[0],
                                         arguments[1]);
            break;
        case 3:
            returnedObject = trinaryPrims(primitiveNumber - 30, arguments[0],
                                          arguments[1], arguments[2]);
            break;

        case 5: /* integer unary operations */
            if (!isInteger(arguments[0]))
                returnedObject = nilobj;
            else
                returnedObject = intUnary(primitiveNumber - 50,
                                          intValue(arguments[0]));
            break;

        case 6:
        case 7: /* integer binary operations */
            if ((!isInteger(arguments[0])) || !isInteger(arguments[1]))
                returnedObject = nilobj;
            else
                returnedObject = intBinary(primitiveNumber - 60,
                                           intValue(arguments[0]), intValue(arguments[1]));
            break;

        case 8: /* string unary */
            returnedObject = strUnary(primitiveNumber - 80,
                                      charPtr(arguments[0]));
            break;

        case 10: /* float unary */
            returnedObject = floatUnary(primitiveNumber - 100, floatValue(
                                            arguments[0]));
            break;

        case 11: /* float binary */
            returnedObject = floatBinary(primitiveNumber - 110, floatValue(
                                             arguments[0]), floatValue(arguments[1]));
            break;

        case 12:
        case 13: /* file operations */

            returnedObject = ioPrimitive(primitiveNumber - 120, arguments);
            break;

        default:
            sysError("unknown primitive number", "doPrimitive");
            break;
        }
    }

    return (returnedObject);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7e8, %rsp            # imm = 0x7E8
movq %rsi, %r15
movl %edi, %r14d
cmpl $0x96, %edi
jl 0x4eac
movl %r14d, %edi
movq %r15, %rsi
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4e11
movslq %r14d, %rax
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x22, %rax
addl %ecx, %eax
cmpl $0xd, %eax
ja 0x51b1
leaq 0x4625(%rip), %rcx      # 0x94f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movswl (%r15), %edi
callq 0x2ed2
testl %eax, %eax
je 0x594c
movswl 0x2(%r15), %edi
callq 0x2ed2
testl %eax, %eax
je 0x594c
movswl (%r15), %edi
callq 0x3125
movl %eax, %ebx
movswl 0x2(%r15), %edi
callq 0x3125
movl %eax, %ecx
leal -0x3c(%r14), %eax
cmpl $0x13, %eax
ja 0x591a
leaq 0x466a(%rip), %rdx      # 0x9594
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
addl $-0x3e, %r14d
cmpl $0x5, %r14d
ja 0x591a
cmpl %ecx, %ebx
jne 0x57a8
jmp 0x57df
addl $-0x78, %r14d
movl %r14d, %edi
movq %r15, %rsi
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8a2a
movzwl (%r15), %ebx
addl $-0x15, %r14d
cmpl $0x8, %r14d
ja 0x56b9
movzwl 0x2(%r15), %eax
movswl %bx, %r15d
movswl %ax, %ebp
leaq 0x4699(%rip), %rcx      # 0x962c
movslq (%rcx,%r14,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
cmpw %ax, %bx
jne 0x57a8
jmp 0x57df
decl %r14d
cmpl $0x8, %r14d
ja 0x52f5
leaq 0x4692(%rip), %rax      # 0x9650
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
callq 0x2230
movl %eax, %ecx
shrl $0x8, %ecx
movl %ecx, %edx
negl %edx
btl $0x17, %eax
cmovael %ecx, %edx
movswl %dx, %edi
sarl %edi
jmp 0x591c
addl $-0xa, %r14d
movswl (%r15), %esi
movl %r14d, %edi
callq 0x59a7
movl %eax, %ebx
jmp 0x594e
movswl (%r15), %edi
leaq 0x22888(%rip), %rbx     # 0x27890
movw %di, (%rbx)
callq 0x2ed2
addl $-0x51, %r14d
cmpl $0x8, %r14d
ja 0x53d7
movswl (%rbx), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
leaq 0x920e(%rip), %rcx      # 0xe240
movq 0x8(%rcx,%rax), %rsi
leaq 0x4532(%rip), %rax      # 0x9570
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rsi, %rdi
callq 0x20a0
movl %eax, %edi
jmp 0x591c
movzwl (%r15), %ebx
addl $-0x1f, %r14d
cmpl $0x8, %r14d
ja 0x52d1
movzwl 0x2(%r15), %r12d
movzwl 0x4(%r15), %ebp
leaq 0x458f(%rip), %rax      # 0x9608
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movswl %r12w, %r14d
movl %r14d, %edi
callq 0x2ed2
testl %eax, %eax
jne 0x50a5
leaq 0x4683(%rip), %rdi      # 0x971c
leaq 0x4123(%rip), %rsi      # 0x91c3
callq 0x4dec
movswl %bp, %ebp
movl %ebp, %edi
callq 0x2ed2
testl %eax, %eax
jne 0x50c6
leaq 0x46ab(%rip), %rdi      # 0x9765
leaq 0x46b6(%rip), %rsi      # 0x9777
callq 0x4dec
movl %r14d, %edi
callq 0x3125
movl %eax, %r14d
movl %ebp, %edi
callq 0x3125
movswl %bx, %edi
movl %r14d, %esi
movl %eax, %edx
callq 0x2fe4
jmp 0x594e
movswl (%r15), %edi
callq 0x2ed2
testl %eax, %eax
je 0x594c
movswl (%r15), %edi
callq 0x3125
addl $-0x33, %r14d
cmpl $0x8, %r14d
ja 0x5752
leaq 0x44cb(%rip), %rcx      # 0x95e4
movslq (%rcx,%r14,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
cvtsi2sd %eax, %xmm0
jmp 0x583c
movswl (%r15), %edi
callq 0x3a72
movsd %xmm0, (%rsp)
movswl 0x2(%r15), %edi
callq 0x3a72
addl $-0x6e, %r14d
cmpl $0x9, %r14d
ja 0x5815
leaq 0x43d8(%rip), %rax      # 0x9530
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
jmp 0x5838
movswl (%r15), %edi
callq 0x3a72
addl $-0x65, %r14d
cmpl $0x5, %r14d
ja 0x539f
leaq 0x43cb(%rip), %rax      # 0x9558
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x4636(%rip), %rsi      # 0x97d3
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movb $0x1, %al
callq 0x21f0
jmp 0x562f
leaq 0x44e0(%rip), %rdi      # 0x9698
leaq 0x44f2(%rip), %rsi      # 0x96b1
callq 0x4dec
jmp 0x594e
movswl %bx, %ebx
movl %ebx, %edi
callq 0x68e4
leaq 0x226b6(%rip), %r14     # 0x27890
movw %r12w, (%r14)
movswl %r12w, %edi
callq 0x2ed2
movswl (%r14), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
leaq 0x9044(%rip), %r15      # 0xe240
movq 0x8(%r15,%rax), %rsi
movswl %bp, %r14d
movl %r14d, %edi
xorl %edx, %edx
callq 0x69b2
testl %eax, %eax
je 0x57a8
shrl %r14d
movswq %r14w, %rax
shlq $0x4, %rax
movq 0x8(%r15,%rax), %rax
movswl 0x2(%rax), %edi
movl %ebx, %esi
callq 0x3bbc
jmp 0x57df
leaq 0x22652(%rip), %r14     # 0x27890
movw %bx, (%r14)
movswl %bx, %edi
callq 0x2ed2
movswl (%r14), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
leaq 0x8fe1(%rip), %rcx      # 0xe240
movq 0x8(%rcx,%rax), %rbx
movswl %r12w, %r14d
movl %r14d, %edi
callq 0x2ed2
testl %eax, %eax
je 0x5280
movswl %bp, %edi
callq 0x2ed2
testl %eax, %eax
jne 0x5293
leaq 0x4495(%rip), %rdi      # 0x971c
leaq 0x44f1(%rip), %rsi      # 0x977f
callq 0x4dec
movl %r14d, %edi
callq 0x3125
movl %eax, %r14d
movswl %bp, %edi
callq 0x3125
movl %eax, %ebp
movl %r14d, %r15d
movq %rbx, %rdi
callq 0x20a0
cmpq %r15, %rax
setb %al
cmpl %ebp, %r14d
seta %cl
orb %al, %cl
je 0x5423
leaq 0x10(%rsp), %rax
jmp 0x5440
leaq 0x41ff(%rip), %rdi      # 0x94d7
leaq 0x44ab(%rip), %rsi      # 0x978a
jmp 0x56c7
xorl %edi, %edi
xorl %eax, %eax
callq 0x21a0
movswl %ax, %edi
jmp 0x591c
leaq 0x41db(%rip), %rdi      # 0x94d7
leaq 0x43dc(%rip), %rsi      # 0x96df
callq 0x4dec
jmp 0x594c
callq 0x2220
jmp 0x5319
callq 0x20e0
callq 0x39ee
jmp 0x5637
leaq 0xc(%rsp), %rbx
movq %rbx, %rdi
callq 0x2130
movl (%rbx), %eax
leal -0xc(%rax), %ecx
xorl %ebp, %ebp
cmpl $0xd, %eax
movl $0xc, %edi
cmovbl %eax, %edi
cmovael %ecx, %ebp
callq 0x2040
cvttsd2si %xmm0, %r14d
movl $0x2, %edi
callq 0x35ba
movswl %ax, %ebx
movl %r14d, %edi
callq 0x3130
movl %ebx, %ecx
shrl %ecx
movswq %cx, %r14
shlq $0x4, %r14
leaq 0x8ec9(%rip), %r15      # 0xe240
movq 0x8(%r15,%r14), %rcx
movw %ax, (%rcx)
movswl %ax, %edi
callq 0x2eda
movl %ebp, %edi
callq 0x3130
movq 0x8(%r15,%r14), %rcx
movw %ax, 0x2(%rcx)
movswl %ax, %edi
jmp 0x5748
leaq 0x4131(%rip), %rdi      # 0x94d7
leaq 0x4429(%rip), %rsi      # 0x97d6
jmp 0x51bf
movq %rsi, %rdi
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x379b
leaq 0x43ec(%rip), %rdi      # 0x97be
jmp 0x51bf
leaq 0x40f9(%rip), %rdi      # 0x94d7
leaq 0x43e5(%rip), %rsi      # 0x97ca
jmp 0x51bf
movq %rsi, %rdi
callq 0x3344
jmp 0x541c
leaq 0x22499(%rip), %rax     # 0x27894
movswl (%rax), %edi
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x345c
movq %rsi, %rdi
callq 0x20b0
movl %eax, %edi
jmp 0x591c
leaq 0x10(%rsp), %rax
leal -0x1(%r14), %ecx
movb (%rbx,%rcx), %cl
testb %cl, %cl
je 0x5440
movb %cl, (%rax)
incq %rax
incl %r14d
cmpl %ebp, %r14d
jbe 0x5428
movb $0x0, (%rax)
leaq 0x10(%rsp), %rdi
jmp 0x5632
leaq 0x22b74(%rip), %r14     # 0x27fc8
movswl (%r14), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
leaq 0x8dd7(%rip), %r12      # 0xe240
movq 0x8(%r12,%rax), %rax
leaq 0x22b57(%rip), %rcx     # 0x27fcc
movslq (%rcx), %rcx
movswl -0x2(%rax,%rcx,2), %edi
callq 0x3125
leal 0x1(%rax), %ecx
leaq 0x2240c(%rip), %rdx     # 0x27898
movl %ecx, (%rdx)
movswl (%r14), %ecx
shrl %ecx
movswq %cx, %rcx
shlq $0x4, %rcx
movq 0x8(%r12,%rcx), %rcx
movslq %eax, %r13
movswl (%rcx,%r13,2), %edi
callq 0x2f00
movswl (%r14), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
movq 0x8(%r12,%rax), %rax
leaq 0x223d0(%rip), %rcx     # 0x27898
movslq (%rcx), %rcx
movw %r15w, -0x2(%rax,%rcx,2)
movl %r15d, %edi
callq 0x2eda
leal 0x4(%r13), %eax
leaq 0x223b4(%rip), %r15     # 0x27898
movl %eax, (%r15)
movswl (%r14), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
movq 0x8(%r12,%rax), %rax
movswl 0x6(%rax,%r13,2), %edi
callq 0x2f00
movswl (%r14), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
movq 0x8(%r12,%rax), %rax
movslq (%r15), %rcx
movw %bp, -0x2(%rax,%rcx,2)
jmp 0x56b2
movl %ebp, %edi
callq 0x2ed2
testl %eax, %eax
jne 0x5543
leaq 0x41e5(%rip), %rdi      # 0x971c
leaq 0x41f0(%rip), %rsi      # 0x972e
callq 0x4dec
leaq 0x22346(%rip), %rbx     # 0x27890
movw %r15w, (%rbx)
movl %r15d, %edi
callq 0x2ed2
movswl (%rbx), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
leaq 0x8cd6(%rip), %rcx      # 0xe240
movq 0x8(%rcx,%rax), %rbx
movl %ebp, %edi
callq 0x3125
cltq
movzbl -0x1(%rbx,%rax), %edi
callq 0x3130
jmp 0x5637
movl %ebp, %edi
callq 0x2ed2
testl %eax, %eax
jne 0x55a5
leaq 0x4183(%rip), %rdi      # 0x971c
leaq 0x3cff(%rip), %rsi      # 0x929f
callq 0x4dec
shrl %r15d
movswq %r15w, %rax
shlq $0x4, %rax
leaq 0x8c89(%rip), %rcx      # 0xe240
movq 0x8(%rcx,%rax), %rbx
movl %ebp, %edi
callq 0x3125
cltq
movzwl -0x2(%rbx,%rax,2), %ebx
jmp 0x594e
leaq 0x222ba(%rip), %r14     # 0x27890
movw %r15w, (%r14)
movl %r15d, %edi
callq 0x2ed2
movswl (%r14), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
leaq 0x8c49(%rip), %r15      # 0xe240
movq 0x8(%r15,%rax), %rsi
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2050
movw %bp, (%r14)
movl %ebp, %edi
callq 0x2ed2
movswl (%r14), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
movq 0x8(%r15,%rax), %rsi
movq %rbx, %rdi
callq 0x21e0
movq %rbx, %rdi
callq 0x3b64
movl %eax, %ebx
jmp 0x594e
leaq 0x2224f(%rip), %rax     # 0x27894
movswl (%rax), %r14d
leaq 0x22240(%rip), %r12     # 0x27890
movw %r15w, (%r12)
movl %r15d, %edi
callq 0x2ed2
movswl (%r12), %eax
shrl %eax
movswq %ax, %rax
shlq $0x4, %rax
leaq 0x8bcd(%rip), %rcx      # 0xe240
movq 0x8(%rcx,%rax), %rdi
callq 0x3344
movl %r14d, %edi
movl %eax, %esi
movl %r15d, %edx
movl %ebp, %ecx
callq 0x313c
jmp 0x594e
shrl %r15d
movswq %r15w, %r14
shlq $0x4, %r14
leaq 0x8b9d(%rip), %r15      # 0xe240
movswl (%r15,%r14), %edi
callq 0x2f00
movw %bp, (%r15,%r14)
movl %ebp, %edi
jmp 0x5748
leaq 0x3e17(%rip), %rdi      # 0x94d7
leaq 0x406f(%rip), %rsi      # 0x9736
callq 0x4dec
jmp 0x594e
xorl %eax, %eax
callq 0x360f
movswl %ax, %ebx
movl %ebx, %eax
shrl %eax
movswq %ax, %r14
shlq $0x4, %r14
leaq 0x8b52(%rip), %r12      # 0xe240
movq 0x8(%r12,%r14), %rax
movw %bp, (%rax)
movl %ebp, %edi
callq 0x2eda
shrl %r15d
movswq %r15w, %r15
shlq $0x4, %r15
movq 0x8(%r12,%r15), %rax
movswl 0x2(%rax), %edi
movq 0x8(%r12,%r14), %rax
movw %di, 0x2(%rax)
callq 0x2eda
movq 0x8(%r12,%r15), %rax
movswl 0x4(%rax), %edi
movq 0x8(%r12,%r14), %rax
movw %di, 0x4(%rax)
callq 0x2eda
movq 0x8(%r12,%r15), %rax
movswl 0x6(%rax), %edi
movq 0x8(%r12,%r14), %rax
movw %di, 0x6(%rax)
callq 0x2eda
jmp 0x594e
leaq 0x4052(%rip), %rdi      # 0x97ab
leaq 0x454d(%rip), %rsi      # 0x9cad
jmp 0x51bf
movl %eax, %edi
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2d09
movl %eax, %edi
callq 0x2110
jmp 0x594c
movl %eax, %edi
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e43
ucomisd (%rsp), %xmm0
jae 0x57df
leaq 0x22825(%rip), %rax     # 0x27fd4
jmp 0x57e6
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
jmp 0x5838
ucomisd (%rsp), %xmm0
jbe 0x57a8
jmp 0x57df
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x57a8
jmp 0x57df
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jne 0x57df
jnp 0x57a8
leaq 0x227ec(%rip), %rax     # 0x27fd2
movzwl (%rax), %ebx
jmp 0x594e
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
jmp 0x5838
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x57a8
jmp 0x57df
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jne 0x57a8
jnp 0x57df
jmp 0x57a8
leaq 0x3cbb(%rip), %rdi      # 0x94d7
leaq 0x3fbe(%rip), %rsi      # 0x97e1
callq 0x4dec
movsd (%rsp), %xmm0
jmp 0x583c
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x39ee
xorl %ebx, %ecx
jmp 0x586c
testl %ecx, %ecx
je 0x594c
movl %ebx, %eax
cltd
idivl %ecx
movl %eax, %ebx
jmp 0x591a
andl %ebx, %ecx
movl %ecx, %ebx
jmp 0x591a
cmpl %ecx, %ebx
jge 0x57a8
jmp 0x57df
cmpl %ecx, %ebx
jl 0x57a8
jmp 0x57df
testl %ecx, %ecx
je 0x594c
movl %ebx, %eax
cltd
idivl %ecx
movl %edx, %ebx
jmp 0x591a
movslq %ebx, %rax
movslq %ecx, %rbx
leaq (%rbx,%rax), %rcx
addq $0x3fff, %rcx           # imm = 0x3FFF
cmpq $0x7ffe, %rcx           # imm = 0x7FFE
ja 0x594c
addq %rax, %rbx
jmp 0x591a
movslq %ebx, %rbx
movslq %ecx, %rax
subq %rax, %rbx
jmp 0x58f8
testl %ecx, %ecx
js 0x5916
shll %cl, %ebx
jmp 0x591a
cmpl %ecx, %ebx
jle 0x57a8
jmp 0x57df
cmpl %ecx, %ebx
jg 0x57a8
jmp 0x57df
movslq %ebx, %rax
movslq %ecx, %rbx
imulq %rax, %rbx
leaq 0x3fff(%rbx), %rax
cmpq $0x7ffe, %rax           # imm = 0x7FFE
jbe 0x591a
jmp 0x594c
cmpl %ecx, %ebx
je 0x57a8
jmp 0x57df
negb %cl
sarl %cl, %ebx
movl %ebx, %edi
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3130
movl %r12d, %edi
movl %ebx, %esi
movl %ebp, %edx
callq 0x2769
jmp 0x594e
callq 0x283d
jmp 0x594c
callq 0x2817
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7687(%rip), %rax      # 0xcff0
movq (%rax), %rdi
leaq 0x3d95(%rip), %rsi      # 0x9708
movl %r15d, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2180
jmp 0x594e
movq 0x7668(%rip), %rcx      # 0xcff0
movq (%rcx), %rdi
leaq 0x3e05(%rip), %rsi      # 0x9797
movl %eax, %edx
xorl %eax, %eax
callq 0x2180
jmp 0x51c4
xorl %edi, %edi
callq 0x2200