// File: /workspace/github_c_makefile_star2_O0/afi-lambda[P]a_little_smalltalk/src/primitive.c
// Function: binaryPrims
static int binaryPrims(int number, object firstarg, object secondarg)
{
    char buffer[2000];
    int i;
    object returnedObject;

    returnedObject = firstarg;
    switch (number)
    {
    case 1: /* object identity test */
        if (firstarg == secondarg)
            returnedObject = trueobj;
        else
            returnedObject = falseobj;
        break;

    case 2: /* set class of object */
        decr(classField(firstarg))
        ;
        setClass(firstarg, secondarg);
        returnedObject = firstarg;
        break;

    case 3: /* debugging stuff */
        fprintf(stderr, "primitive 23 %d %d\n", firstarg, secondarg);
        break;

    case 4: /* string cat */
        strcpy(buffer, charPtr(firstarg));
        strcat(buffer, charPtr(secondarg));
        returnedObject = newStString(buffer);
        break;

    case 5: /* basicAt: */
        if (!isInteger(secondarg))
            sysError("non integer index", "basicAt:");
        returnedObject = basicAt(firstarg, intValue(secondarg));
        break;

    case 6: /* byteAt: */
        if (!isInteger(secondarg))
            sysError("non integer index", "byteAt:");
        i = byteAt(firstarg, intValue(secondarg));
        if (i < 0)
            i += 256;
        returnedObject = newInteger(i);
        break;

    case 7: /* symbol set */
        nameTableInsert(symbols, strHash(charPtr(firstarg)), firstarg,
                        secondarg);
        break;

    case 8: /* block start */
        /* first get previous link */
        i = intValue(basicAt(processStack, linkPointer));
        /* change context and byte pointer */
        fieldAtPut(processStack, i+1, firstarg)
        ;
        fieldAtPut(processStack, i+4, secondarg)
        ;
        break;

    case 9: /* duplicate a block, adding a new context to it */
        returnedObject = newBlock();
        basicAtPut(returnedObject, 1, secondarg);
        basicAtPut(returnedObject, 2, basicAt(firstarg, 2));
        basicAtPut(returnedObject, 3, basicAt(firstarg, 3));
        basicAtPut(returnedObject, 4, basicAt(firstarg, 4));
        break;

    default: /* unknown primitive */
        sysError("unknown primitive", "binaryPrims");
        break;

    }
    return (returnedObject);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x840, %rsp            # imm = 0x840
movw %dx, %ax
movw %si, %cx
movl %edi, -0x4(%rbp)
movw %cx, -0x6(%rbp)
movw %ax, -0x8(%rbp)
movw -0x6(%rbp), %ax
movw %ax, -0x7e6(%rbp)
movl -0x4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x7f0(%rbp)
subl $0x8, %eax
ja 0x749f
movq -0x7f0(%rbp), %rax
leaq 0x5724(%rip), %rcx      # 0xc560
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movswl -0x6(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jne 0x6e64
leaq 0x2319a(%rip), %rax     # 0x29ff2
movw (%rax), %ax
movw %ax, -0x7e6(%rbp)
jmp 0x6e75
leaq 0x23189(%rip), %rax     # 0x29ff4
movw (%rax), %ax
movw %ax, -0x7e6(%rbp)
jmp 0x74b2
movswl -0x6(%rbp), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x93d6(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movswl (%rax), %edi
callq 0x3020
movw -0x8(%rbp), %ax
movswl -0x6(%rbp), %ecx
sarl %ecx
movslq %ecx, %rdx
leaq 0x93b3(%rip), %rcx      # 0x10260
shlq $0x4, %rdx
addq %rdx, %rcx
movw %ax, (%rcx)
movswl %ax, %edi
callq 0x2fd0
movw -0x6(%rbp), %ax
movw %ax, -0x7e6(%rbp)
jmp 0x74b2
movq 0x8122(%rip), %rax      # 0xeff8
movq (%rax), %rdi
movswl -0x6(%rbp), %edx
movswl -0x8(%rbp), %ecx
leaq 0x5808(%rip), %rsi      # 0xc6f0
movb $0x0, %al
callq 0x2170
jmp 0x74b2
leaq -0x7e0(%rbp), %rax
movq %rax, -0x7f8(%rbp)
movw -0x6(%rbp), %ax
leaq 0x229a3(%rip), %rcx     # 0x298b0
movw %ax, (%rcx)
movswl %ax, %edi
callq 0x2fb0
cmpl $0x0, %eax
je 0x6f47
leaq 0x2298c(%rip), %rax     # 0x298b0
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x932d(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x800(%rbp)
jmp 0x6f6f
leaq 0x22962(%rip), %rax     # 0x298b0
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x9303(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x800(%rbp)
movq -0x7f8(%rbp), %rdi
movq -0x800(%rbp), %rsi
callq 0x2050
leaq -0x7e0(%rbp), %rax
movq %rax, -0x808(%rbp)
movw -0x8(%rbp), %ax
leaq 0x22915(%rip), %rcx     # 0x298b0
movw %ax, (%rcx)
movswl %ax, %edi
callq 0x2fb0
cmpl $0x0, %eax
je 0x6fd5
leaq 0x228fe(%rip), %rax     # 0x298b0
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x929f(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x810(%rbp)
jmp 0x6ffd
leaq 0x228d4(%rip), %rax     # 0x298b0
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x9275(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x810(%rbp)
movq -0x808(%rbp), %rdi
movq -0x810(%rbp), %rsi
callq 0x21c0
leaq -0x7e0(%rbp), %rdi
callq 0x45d0
movw %ax, -0x7e6(%rbp)
jmp 0x74b2
movswl -0x8(%rbp), %edi
callq 0x2fb0
cmpl $0x0, %eax
jne 0x7049
leaq 0x56c7(%rip), %rdi      # 0xc704
leaq 0x5244(%rip), %rsi      # 0xc288
callq 0x63f0
movswl -0x6(%rbp), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x9207(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x818(%rbp)
movswl -0x8(%rbp), %edi
callq 0x3470
movl %eax, %ecx
movq -0x818(%rbp), %rax
subl $0x1, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x7e6(%rbp)
jmp 0x74b2
movswl -0x8(%rbp), %edi
callq 0x2fb0
cmpl $0x0, %eax
jne 0x70b4
leaq 0x565c(%rip), %rdi      # 0xc704
leaq 0x5667(%rip), %rsi      # 0xc716
callq 0x63f0
movw -0x6(%rbp), %ax
leaq 0x227f1(%rip), %rcx     # 0x298b0
movw %ax, (%rcx)
movswl %ax, %edi
callq 0x2fb0
cmpl $0x0, %eax
je 0x70f9
leaq 0x227da(%rip), %rax     # 0x298b0
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x917b(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x820(%rbp)
jmp 0x7121
leaq 0x227b0(%rip), %rax     # 0x298b0
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x9151(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x820(%rbp)
movq -0x820(%rbp), %rax
movq %rax, -0x828(%rbp)
movswl -0x8(%rbp), %edi
callq 0x3470
movl %eax, %ecx
movq -0x828(%rbp), %rax
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x7e4(%rbp)
cmpl $0x0, -0x7e4(%rbp)
jge 0x716b
movl -0x7e4(%rbp), %eax
addl $0x100, %eax            # imm = 0x100
movl %eax, -0x7e4(%rbp)
movl -0x7e4(%rbp), %edi
callq 0x34a0
movw %ax, -0x7e6(%rbp)
jmp 0x74b2
leaq 0x2272b(%rip), %rax     # 0x298b4
movw (%rax), %ax
movw %ax, -0x82a(%rbp)
movw -0x6(%rbp), %ax
leaq 0x22712(%rip), %rcx     # 0x298b0
movw %ax, (%rcx)
movswl %ax, %edi
callq 0x2fb0
cmpl $0x0, %eax
je 0x71d8
leaq 0x226fb(%rip), %rax     # 0x298b0
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x909c(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x838(%rbp)
jmp 0x7200
leaq 0x226d1(%rip), %rax     # 0x298b0
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x9072(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x838(%rbp)
movq -0x838(%rbp), %rdi
callq 0x3960
movw -0x82a(%rbp), %cx
movl %eax, %esi
movw -0x6(%rbp), %ax
movswl %cx, %edi
movswl %ax, %edx
movswl -0x8(%rbp), %ecx
callq 0x34d0
jmp 0x74b2
leaq 0x22db4(%rip), %rax     # 0x29fe8
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x901d(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
leaq 0x22d97(%rip), %rcx     # 0x29fec
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %edi
callq 0x3470
movl %eax, -0x7e4(%rbp)
movl -0x7e4(%rbp), %ecx
addl $0x1, %ecx
leaq 0x2263c(%rip), %rax     # 0x298b8
movl %ecx, (%rax)
leaq 0x22d63(%rip), %rax     # 0x29fe8
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x8fcc(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
leaq 0x22612(%rip), %rcx     # 0x298b8
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %edi
callq 0x3020
movw -0x6(%rbp), %ax
leaq 0x22d26(%rip), %rcx     # 0x29fe8
movswl (%rcx), %ecx
sarl %ecx
movslq %ecx, %rdx
leaq 0x8f8f(%rip), %rcx      # 0x10260
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
leaq 0x225d5(%rip), %rdx     # 0x298b8
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
movw %ax, (%rcx,%rdx,2)
movswl %ax, %edi
callq 0x2fd0
movl -0x7e4(%rbp), %ecx
addl $0x4, %ecx
leaq 0x225b1(%rip), %rax     # 0x298b8
movl %ecx, (%rax)
leaq 0x22cd8(%rip), %rax     # 0x29fe8
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x8f41(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
leaq 0x22587(%rip), %rcx     # 0x298b8
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %edi
callq 0x3020
movw -0x8(%rbp), %ax
leaq 0x22c9b(%rip), %rcx     # 0x29fe8
movswl (%rcx), %ecx
sarl %ecx
movslq %ecx, %rdx
leaq 0x8f04(%rip), %rcx      # 0x10260
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
leaq 0x2254a(%rip), %rdx     # 0x298b8
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
movw %ax, (%rcx,%rdx,2)
movswl %ax, %edi
callq 0x2fd0
jmp 0x74b2
movb $0x0, %al
callq 0x3de0
movw %ax, -0x7e6(%rbp)
movw -0x8(%rbp), %ax
movswl -0x7e6(%rbp), %ecx
sarl %ecx
movslq %ecx, %rdx
leaq 0x8eb4(%rip), %rcx      # 0x10260
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
movw %ax, (%rcx)
movswl %ax, %edi
callq 0x2fd0
movswl -0x6(%rbp), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x8e8e(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movw 0x2(%rax), %ax
movswl -0x7e6(%rbp), %ecx
sarl %ecx
movslq %ecx, %rdx
leaq 0x8e6c(%rip), %rcx      # 0x10260
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
movw %ax, 0x2(%rcx)
movswl %ax, %edi
callq 0x2fd0
movswl -0x6(%rbp), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x8e45(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movw 0x4(%rax), %ax
movswl -0x7e6(%rbp), %ecx
sarl %ecx
movslq %ecx, %rdx
leaq 0x8e23(%rip), %rcx      # 0x10260
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
movw %ax, 0x4(%rcx)
movswl %ax, %edi
callq 0x2fd0
movswl -0x6(%rbp), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x8dfc(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movw 0x6(%rax), %ax
movswl -0x7e6(%rbp), %ecx
sarl %ecx
movslq %ecx, %rdx
leaq 0x8dda(%rip), %rcx      # 0x10260
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
movw %ax, 0x6(%rcx)
movswl %ax, %edi
callq 0x2fd0
jmp 0x74b2
leaq 0x5019(%rip), %rdi      # 0xc4bf
leaq 0x5271(%rip), %rsi      # 0xc71e
callq 0x63f0
movswl -0x7e6(%rbp), %eax
addq $0x840, %rsp            # imm = 0x840
popq %rbp
retq
nopw %cs:(%rax,%rax)