// File: cybozu[P]yrmcds/src/memcache/memcache.cpp
// Function: yrmcds::memcache::binary_response::error(yrmcds::memcache::binary_status)
void
binary_response::error(binary_status status) {
    switch( status ) {
    case binary_status::NotFound:
        send_error(status, STATUS_NOT_FOUND, sizeof(STATUS_NOT_FOUND) - 1);
        break;
    case binary_status::Exists:
        send_error(status, STATUS_EXISTS, sizeof(STATUS_EXISTS) - 1);
        break;
    case binary_status::TooLargeValue:
        send_error(status, STATUS_TOO_LARGE, sizeof(STATUS_TOO_LARGE) - 1);
        break;
    case binary_status::Invalid:
        send_error(status, STATUS_INVALID, sizeof(STATUS_INVALID) - 1);
        break;
    case binary_status::NotStored:
        send_error(status, STATUS_NOT_STORED, sizeof(STATUS_NOT_STORED) - 1);
        break;
    case binary_status::NonNumeric:
        send_error(status, STATUS_NON_NUMERIC, sizeof(STATUS_NON_NUMERIC) - 1);
        break;
    case binary_status::Locked:
        send_error(status, STATUS_LOCKED, sizeof(STATUS_LOCKED) - 1);
        break;
    case binary_status::NotLocked:
        send_error(status, STATUS_NOT_LOCKED, sizeof(STATUS_NOT_LOCKED) - 1);
        break;
    case binary_status::UnknownCommand:
        send_error(status, STATUS_UNKNOWN, sizeof(STATUS_UNKNOWN) - 1);
        break;
    case binary_status::OutOfMemory:
        send_error(status, STATUS_OOM, sizeof(STATUS_OOM) - 1);
        break;
    default:
        throw std::logic_error("<memcache::binary_response::error> bug");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw -0xa(%rbp), %ax
movw %ax, -0x1e(%rbp)
subw $0x1, %ax
je 0x6a06a
jmp 0x69fcf
movw -0x1e(%rbp), %ax
subw $0x2, %ax
je 0x6a088
jmp 0x69fdf
movw -0x1e(%rbp), %ax
subw $0x3, %ax
je 0x6a0a6
jmp 0x69fef
movw -0x1e(%rbp), %ax
subw $0x4, %ax
je 0x6a0c4
jmp 0x69fff
movw -0x1e(%rbp), %ax
subw $0x5, %ax
je 0x6a0e2
jmp 0x6a00f
movw -0x1e(%rbp), %ax
subw $0x6, %ax
je 0x6a100
jmp 0x6a01f
movw -0x1e(%rbp), %ax
subw $0x10, %ax
je 0x6a11e
jmp 0x6a02f
movw -0x1e(%rbp), %ax
subw $0x11, %ax
je 0x6a13c
jmp 0x6a03f
movw -0x1e(%rbp), %ax
movzwl %ax, %eax
subl $0x81, %eax
je 0x6a15a
jmp 0x6a053
movw -0x1e(%rbp), %ax
movzwl %ax, %eax
subl $0x82, %eax
je 0x6a175
jmp 0x6a190
movq -0x28(%rbp), %rdi
leaq 0x131ca(%rip), %rdx     # 0x7d23f
movl $0x9, %ecx
movzwl -0xa(%rbp), %esi
callq 0x768d0
jmp 0x6a1e0
movq -0x28(%rbp), %rdi
leaq 0x131b6(%rip), %rdx     # 0x7d249
movl $0x6, %ecx
movzwl -0xa(%rbp), %esi
callq 0x768d0
jmp 0x6a1e0
movq -0x28(%rbp), %rdi
leaq 0x1319f(%rip), %rdx     # 0x7d250
movl $0xf, %ecx
movzwl -0xa(%rbp), %esi
callq 0x768d0
jmp 0x6a1e0
movq -0x28(%rbp), %rdi
leaq 0x13191(%rip), %rdx     # 0x7d260
movl $0xf, %ecx
movzwl -0xa(%rbp), %esi
callq 0x768d0
jmp 0x6a1e0
movq -0x28(%rbp), %rdi
leaq 0x13183(%rip), %rdx     # 0x7d270
movl $0xa, %ecx
movzwl -0xa(%rbp), %esi
callq 0x768d0
jmp 0x6a1e0
movq -0x28(%rbp), %rdi
leaq 0x13175(%rip), %rdx     # 0x7d280
movl $0x11, %ecx
movzwl -0xa(%rbp), %esi
callq 0x768d0
jmp 0x6a1e0
movq -0x28(%rbp), %rdi
leaq 0x13169(%rip), %rdx     # 0x7d292
movl $0x6, %ecx
movzwl -0xa(%rbp), %esi
callq 0x768d0
jmp 0x6a1e0
movq -0x28(%rbp), %rdi
leaq 0x13152(%rip), %rdx     # 0x7d299
movl $0xa, %ecx
movzwl -0xa(%rbp), %esi
callq 0x768d0
jmp 0x6a1e0
movq -0x28(%rbp), %rdi
leaq 0x1314b(%rip), %rdx     # 0x7d2b0
movl $0xf, %ecx
movzwl -0xa(%rbp), %esi
callq 0x768d0
jmp 0x6a1e0
movq -0x28(%rbp), %rdi
leaq 0x13140(%rip), %rdx     # 0x7d2c0
movl $0xd, %ecx
movzwl -0xa(%rbp), %esi
callq 0x768d0
jmp 0x6a1e0
movl $0x10, %edi
callq 0x82f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x139cf(%rip), %rsi     # 0x7db7a
callq 0x89a0
jmp 0x6a1b2
movq -0x30(%rbp), %rdi
movq 0x44e03(%rip), %rsi     # 0xaefc0
movq 0x44dbc(%rip), %rdx     # 0xaef80
callq 0x8b70
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x8490
jmp 0x6a1e6
addq $0x30, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x8bc0
nop