name
string
code
string
asm
string
file
string
DecodeCopMemInstruction
static DecodeStatus DecodeCopMemInstruction(MCInst *Inst, unsigned Insn, uint64_t Address, const void *Decoder) { DecodeStatus S = MCDisassembler_Success; unsigned pred = fieldFromInstruction_4(Insn, 28, 4); unsigned CRd = fieldFromInstruction_4(Insn, 12, 4); unsigned coproc = fieldFromInstruction_4(Insn, 8, 4); unsigned imm = fieldFromInstruction_4(Insn, 0, 8); unsigned Rn = fieldFromInstruction_4(Insn, 16, 4); unsigned U = fieldFromInstruction_4(Insn, 23, 1); switch (MCInst_getOpcode(Inst)) { case ARM_LDC_OFFSET: case ARM_LDC_PRE: case ARM_LDC_POST: case ARM_LDC_OPTION: case ARM_LDCL_OFFSET: case ARM_LDCL_PRE: case ARM_LDCL_POST: case ARM_LDCL_OPTION: case ARM_STC_OFFSET: case ARM_STC_PRE: case ARM_STC_POST: case ARM_STC_OPTION: case ARM_STCL_OFFSET: case ARM_STCL_PRE: case ARM_STCL_POST: case ARM_STCL_OPTION: case ARM_t2LDC_OFFSET: case ARM_t2LDC_PRE: case ARM_t2LDC_POST: case ARM_t2LDC_OPTION: case ARM_t2LDCL_OFFSET: case ARM_t2LDCL_PRE: case ARM_t2LDCL_POST: case ARM_t2LDCL_OPTION: case ARM_t2STC_OFFSET: case ARM_t2STC_PRE: case ARM_t2STC_POST: case ARM_t2STC_OPTION: case ARM_t2STCL_OFFSET: case ARM_t2STCL_PRE: case ARM_t2STCL_POST: case ARM_t2STCL_OPTION: if (coproc == 0xA || coproc == 0xB) return MCDisassembler_Fail; break; default: break; } MCOperand_CreateImm0(Inst, coproc); MCOperand_CreateImm0(Inst, CRd); if (!Check(&S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder))) return MCDisassembler_Fail; switch (MCInst_getOpcode(Inst)) { case ARM_t2LDC2_OFFSET: case ARM_t2LDC2L_OFFSET: case ARM_t2LDC2_PRE: case ARM_t2LDC2L_PRE: case ARM_t2STC2_OFFSET: case ARM_t2STC2L_OFFSET: case ARM_t2STC2_PRE: case ARM_t2STC2L_PRE: case ARM_LDC2_OFFSET: case ARM_LDC2L_OFFSET: case ARM_LDC2_PRE: case ARM_LDC2L_PRE: case ARM_STC2_OFFSET: case ARM_STC2L_OFFSET: case ARM_STC2_PRE: case ARM_STC2L_PRE: case ARM_t2LDC_OFFSET: case ARM_t2LDCL_OFFSET: case ARM_t2LDC_PRE: case ARM_t2LDCL_PRE: case ARM_t2STC_OFFSET: case ARM_t2STCL_OFFSET: case ARM_t2STC_PRE: case ARM_t2STCL_PRE: case ARM_LDC_OFFSET: case ARM_LDCL_OFFSET: case ARM_LDC_PRE: case ARM_LDCL_PRE: case ARM_STC_OFFSET: case ARM_STCL_OFFSET: case ARM_STC_PRE: case ARM_STCL_PRE: imm = ARM_AM_getAM5Opc(U ? ARM_AM_add : ARM_AM_sub, (unsigned char)imm); MCOperand_CreateImm0(Inst, imm); break; case ARM_t2LDC2_POST: case ARM_t2LDC2L_POST: case ARM_t2STC2_POST: case ARM_t2STC2L_POST: case ARM_LDC2_POST: case ARM_LDC2L_POST: case ARM_STC2_POST: case ARM_STC2L_POST: case ARM_t2LDC_POST: case ARM_t2LDCL_POST: case ARM_t2STC_POST: case ARM_t2STCL_POST: case ARM_LDC_POST: case ARM_LDCL_POST: case ARM_STC_POST: case ARM_STCL_POST: imm |= U << 8; // fall through. default: // The 'option' variant doesn't encode 'U' in the immediate since // the immediate is unsigned [0,255]. MCOperand_CreateImm0(Inst, imm); break; } switch (MCInst_getOpcode(Inst)) { case ARM_LDC_OFFSET: case ARM_LDC_PRE: case ARM_LDC_POST: case ARM_LDC_OPTION: case ARM_LDCL_OFFSET: case ARM_LDCL_PRE: case ARM_LDCL_POST: case ARM_LDCL_OPTION: case ARM_STC_OFFSET: case ARM_STC_PRE: case ARM_STC_POST: case ARM_STC_OPTION: case ARM_STCL_OFFSET: case ARM_STCL_PRE: case ARM_STCL_POST: case ARM_STCL_OPTION: if (!Check(&S, DecodePredicateOperand(Inst, pred, Address, Decoder))) return MCDisassembler_Fail; break; default: break; } return S; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 callq 0xd43b8 cmpl $0x93c, %eax # imm = 0x93C jg 0xe35df leal -0x8a(%rax), %ecx cmpl $0x8, %ecx jb 0xe35f4 addl $0xfffffe73, %eax # imm = 0xFFFFFE73 cmpl $0x8, %eax jb 0xe35f4 jmp 0xe360a leal -0xa1e(%rax), %ecx cmpl $0x8, %ecx jb 0xe35f4 addl $0xfffff6c3, %eax # imm = 0xFFFFF6C3 cmpl $0x7, %eax ja 0xe360a movl %ebx, %ecx andl $0xe00, %ecx # imm = 0xE00 xorl %eax, %eax cmpl $0xa00, %ecx # imm = 0xA00 je 0xe3730 movl %ebx, %r12d shrl $0xc, %r12d andl $0xf, %r12d movl %ebx, %eax shrl $0x8, %eax andl $0xf, %eax movzbl %bl, %ebp movl %ebx, %r13d shrl $0x10, %r13d andl $0xf, %r13d movl %ebx, %r15d shrl $0x17, %r15d andl $0x1, %r15d movl %eax, %esi movq %r14, %rdi callq 0xd4468 movl %r12d, %esi movq %r14, %rdi callq 0xd4468 movl %r13d, %eax leaq 0x1949fb(%rip), %rcx # 0x278050 movzwl (%rcx,%rax,2), %esi movq %r14, %rdi callq 0xd443b movq %r14, %rdi callq 0xd43b8 cmpl $0x934, %eax # imm = 0x934 jg 0xe3682 leal -0x82(%rax), %ecx cmpl $0xf, %ecx jbe 0xe36ad addl $0xfffffe7b, %eax # imm = 0xFFFFFE7B jmp 0xe3692 leal -0x935(%rax), %ecx cmpl $0xf, %ecx jbe 0xe36c3 addl $0xfffff5ea, %eax # imm = 0xFFFFF5EA cmpl $0xf, %eax ja 0xe36f0 movl $0x9999, %ecx # imm = 0x9999 btl %eax, %ecx jb 0xe36cd movl $0x4444, %ecx # imm = 0x4444 btl %eax, %ecx jb 0xe36e9 jmp 0xe36f0 movl $0x9999, %edx # imm = 0x9999 btl %ecx, %edx jb 0xe36cd movl $0x4444, %edx # imm = 0x4444 btl %ecx, %edx jb 0xe36e9 jmp 0xe367b movl $0x9999, %edx # imm = 0x9999 btl %ecx, %edx jae 0xe36df shll $0x8, %r15d movzbl %bl, %ebp orl %r15d, %ebp xorl $0x100, %ebp # imm = 0x100 jmp 0xe36f0 movl $0x4444, %edx # imm = 0x4444 btl %ecx, %edx jae 0xe368d shll $0x8, %r15d orl %r15d, %ebp movl %ebp, %esi movq %r14, %rdi callq 0xd4468 movq %r14, %rdi callq 0xd43b8 leal -0x18d(%rax), %ecx cmpl $0x8, %ecx jb 0xe3717 addl $0xffffff76, %eax # imm = 0xFFFFFF76 cmpl $0x7, %eax ja 0xe373f shrl $0x1c, %ebx movq %r14, %rdi movl %ebx, %esi callq 0xe1b78 movl %eax, %eax leaq 0x1949b3(%rip), %rcx # 0x2780e0 movl (%rcx,%rax,4), %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x3, %eax jmp 0xe3730
/google[P]bloaty/third_party/capstone/arch/ARM/ARMDisassembler.c
DecodeVCVTD
static DecodeStatus DecodeVCVTD(MCInst *Inst, unsigned Insn, uint64_t Address, const void *Decoder) { DecodeStatus S = MCDisassembler_Success; unsigned Vm, imm, cmode, op; unsigned Vd = (fieldFromInstruction_4(Insn, 12, 4) << 0); Vd |= (fieldFromInstruction_4(Insn, 22, 1) << 4); Vm = (fieldFromInstruction_4(Insn, 0, 4) << 0); Vm |= (fieldFromInstruction_4(Insn, 5, 1) << 4); imm = fieldFromInstruction_4(Insn, 16, 6); cmode = fieldFromInstruction_4(Insn, 8, 4); op = fieldFromInstruction_4(Insn, 5, 1); // VMOVv2f32 is ambiguous with these decodings. if (!(imm & 0x38) && cmode == 0xF) { if (op == 1) return MCDisassembler_Fail; MCInst_setOpcode(Inst, ARM_VMOVv2f32); return DecodeNEONModImmInstruction(Inst, Insn, Address, Decoder); } if (!(imm & 0x20)) return MCDisassembler_Fail; if (!Check(&S, DecodeDPRRegisterClass(Inst, Vd, Address, Decoder))) return MCDisassembler_Fail; if (!Check(&S, DecodeDPRRegisterClass(Inst, Vm, Address, Decoder))) return MCDisassembler_Fail; MCOperand_CreateImm0(Inst, 64 - imm); return S; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx movl %esi, %r14d shrl $0x5, %r14d andl $0x1, %r14d movl %esi, %eax andl $0x380f00, %eax # imm = 0x380F00 cmpl $0xf00, %eax # imm = 0xF00 jne 0xe3beb testl %r14d, %r14d jne 0xe3bf1 movq %rbx, %rdi movl $0x55d, %esi # imm = 0x55D callq 0xd43b1 movq %rbx, %rdi movl %ebp, %esi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0xe3a3e btl $0x15, %ebp jb 0xe3bf5 xorl %eax, %eax jmp 0xe3c53 movl %ebp, %eax shrl $0xc, %eax andl $0xf, %eax movl %ebp, %ecx shrl $0x12, %ecx andl $0x10, %ecx orl %eax, %ecx movl %ebp, %eax andl $0xf, %eax shll $0x4, %r14d orl %eax, %r14d shrl $0x10, %ebp andl $0x3f, %ebp movl %ecx, %eax leaq 0x1924ae(%rip), %r15 # 0x2760d0 movzwl (%r15,%rax,2), %esi movq %rbx, %rdi callq 0xd443b movl %r14d, %eax movzwl (%r15,%rax,2), %esi movq %rbx, %rdi callq 0xd443b movl $0x40, %esi subl %ebp, %esi movq %rbx, %rdi callq 0xd4468 movl $0x3, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/google[P]bloaty/third_party/capstone/arch/ARM/ARMDisassembler.c
DecodeT2STRDPreInstruction
static DecodeStatus DecodeT2STRDPreInstruction(MCInst *Inst, unsigned Insn, uint64_t Address, const void *Decoder) { DecodeStatus S = MCDisassembler_Success; unsigned Rt = fieldFromInstruction_4(Insn, 12, 4); unsigned Rt2 = fieldFromInstruction_4(Insn, 8, 4); unsigned Rn = fieldFromInstruction_4(Insn, 16, 4); unsigned addr = fieldFromInstruction_4(Insn, 0, 8); unsigned W = fieldFromInstruction_4(Insn, 21, 1); unsigned U = fieldFromInstruction_4(Insn, 23, 1); unsigned P = fieldFromInstruction_4(Insn, 24, 1); bool writeback = (W == 1) | (P == 0); addr |= (U << 8) | (Rn << 9); if (writeback && (Rn == Rt || Rn == Rt2)) Check(&S, MCDisassembler_SoftFail); // Writeback operand if (!Check(&S, DecoderGPRRegisterClass(Inst, Rn, Address, Decoder))) return MCDisassembler_Fail; // Rt if (!Check(&S, DecoderGPRRegisterClass(Inst, Rt, Address, Decoder))) return MCDisassembler_Fail; // Rt2 if (!Check(&S, DecoderGPRRegisterClass(Inst, Rt2, Address, Decoder))) return MCDisassembler_Fail; // addr if (!Check(&S, DecodeT2AddrModeImm8s4(Inst, addr, Address, Decoder))) return MCDisassembler_Fail; return S; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebp movl %esi, %r13d shrl $0xc, %r13d andl $0xf, %r13d movl %esi, %r15d shrl $0x8, %r15d andl $0xf, %r15d movl %esi, %r14d shrl $0x10, %r14d andl $0xf, %r14d movl %esi, %eax andl $0x1200000, %eax # imm = 0x1200000 xorl %ecx, %ecx cmpl %r15d, %r14d setne %cl cmpl %r13d, %r14d leal 0x1(%rcx,%rcx), %ecx movl $0x1, %edx cmovnel %ecx, %edx cmpl $0x1000000, %eax # imm = 0x1000000 movl $0x3, %r12d cmovnel %edx, %r12d movq %rdi, (%rsp) movl %r14d, %esi callq 0xe5607 movl %eax, %ebx testl %eax, %eax je 0xe57e7 movb $0x1, %al cmpl $0x3, %ebx je 0xe57e2 cmpl $0x1, %ebx je 0xe57e9 xorl %eax, %eax movl %r12d, %ebx jmp 0xe57e9 xorl %eax, %eax xorl %r12d, %r12d testb %al, %al je 0xe5888 movq (%rsp), %rdi movl %r13d, %esi callq 0xe5607 movl %eax, %r13d testl %eax, %eax je 0xe581c movb $0x1, %al cmpl $0x3, %r13d je 0xe5817 cmpl $0x1, %r13d je 0xe581e xorl %eax, %eax movl %ebx, %r13d jmp 0xe581e xorl %eax, %eax testb %al, %al je 0xe5888 movq (%rsp), %rdi movl %r15d, %esi callq 0xe5607 movl %eax, %r15d testl %eax, %eax je 0xe584a movb $0x1, %al cmpl $0x3, %r15d je 0xe5845 cmpl $0x1, %r15d je 0xe584c xorl %eax, %eax movl %r13d, %r15d jmp 0xe584c xorl %eax, %eax testb %al, %al je 0xe5888 movl %ebp, %ebx shrl $0xf, %ebx movzbl %bpl, %eax andl $0x100, %ebx # imm = 0x100 orl %eax, %ebx movl %r14d, %eax leaq 0x1927e5(%rip), %rcx # 0x278050 movzwl (%rcx,%rax,2), %esi movq (%rsp), %r14 movq %r14, %rdi callq 0xd443b movq %r14, %rdi movl %ebx, %esi callq 0xe5703 movl %r15d, %r12d movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/google[P]bloaty/third_party/capstone/arch/ARM/ARMDisassembler.c
printAdrpLabel
static void printAdrpLabel(MCInst *MI, unsigned OpNum, SStream *O) { MCOperand *Op = MCInst_getOperand(MI, OpNum); if (MCOperand_isImm(Op)) { // ADRP sign extends a 21-bit offset, shifts it left by 12 // and adds it to the value of the PC with its bottom 12 bits cleared uint64_t imm = (MCOperand_getImm(Op) * 0x1000) + (MI->address & ~0xfff); printUInt64Bang(O, imm); if (MI->csh->detail) { #ifndef CAPSTONE_DIET uint8_t access; access = get_op_access(MI->csh, MCInst_getOpcode(MI), MI->ac_idx); MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].access = access; MI->ac_idx++; #endif MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].type = ARM64_OP_IMM; MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].imm = imm; MI->flat_insn->detail->arm64.op_count++; } return; } }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %rbx movl $0x1, %esi callq 0xd43bf movq %rax, %r14 movq %rax, %rdi callq 0xd43f8 testb %al, %al je 0x11be65 movq %r14, %rdi callq 0xd4410 shlq $0xc, %rax movq $-0x1000, %r14 # imm = 0xF000 andq 0x318(%rbx), %r14 addq %rax, %r14 movq %r15, %rdi movq %r14, %rsi callq 0xd45cf movq 0x320(%rbx), %r15 cmpl $0x0, 0x60(%r15) je 0x11be65 movq %rbx, %rdi callq 0xd43b8 movzbl 0x32f(%rbx), %r12d movq %r15, %rdi movl %eax, %esi callq 0x11d2d8 movzbl (%rax,%r12), %eax xorl %ecx, %ecx cmpb $-0x80, %al cmovnel %eax, %ecx movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x5e(%rax), %edx imulq $0x38, %rdx, %rdx movb %cl, 0x90(%rax,%rdx) incb 0x32f(%rbx) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x5e(%rax), %ecx imulq $0x38, %rcx, %rcx movl $0x2, 0x78(%rax,%rcx) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x5e(%rax), %ecx imulq $0x38, %rcx, %rcx movq %r14, 0x80(%rax,%rcx) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax incb 0x5e(%rax) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/google[P]bloaty/third_party/capstone/arch/AArch64/AArch64InstPrinter.c
DecodeLO32DSPRegisterClass
static DecodeStatus DecodeLO32DSPRegisterClass(MCInst *Inst, unsigned RegNo, uint64_t Address, const MCRegisterInfo *Decoder) { unsigned Reg; if (RegNo >= 4) return MCDisassembler_Fail; Reg = getReg(Decoder, Mips_LO32DSPRegClassID, RegNo); MCOperand_CreateReg0(Inst, Reg); return MCDisassembler_Success; }
xorl %eax, %eax cmpl $0x3, %esi ja 0x121afa pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx movq %rdx, %rdi movl $0x1b, %esi callq 0xd88fb movq (%rax), %rax movl %ebp, %ecx movzwl (%rax,%rcx,2), %esi movq %rbx, %rdi callq 0xd443b movl $0x3, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
/google[P]bloaty/third_party/capstone/arch/Mips/MipsDisassembler.c
DecodeGPR64RegisterClass
static DecodeStatus DecodeGPR64RegisterClass(MCInst *Inst, unsigned RegNo, uint64_t Address, const MCRegisterInfo *Decoder) { unsigned Reg; if (RegNo > 31) return MCDisassembler_Fail; Reg = getReg(Decoder, Mips_GPR64RegClassID, RegNo); MCOperand_CreateReg0(Inst, Reg); return MCDisassembler_Success; }
xorl %eax, %eax cmpl $0x1f, %esi ja 0x121b33 pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx movq %rdx, %rdi movl $0x23, %esi callq 0xd88fb movq (%rax), %rax movl %ebp, %ecx movzwl (%rax,%rcx,2), %esi movq %rbx, %rdi callq 0xd443b movl $0x3, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
/google[P]bloaty/third_party/capstone/arch/Mips/MipsDisassembler.c
DecodeFGR64RegisterClass
static DecodeStatus DecodeFGR64RegisterClass(MCInst *Inst, unsigned RegNo, uint64_t Address, const MCRegisterInfo *Decoder) { unsigned Reg; if (RegNo > 31) return MCDisassembler_Fail; Reg = getReg(Decoder, Mips_FGR64RegClassID, RegNo); MCOperand_CreateReg0(Inst, Reg); return MCDisassembler_Success; }
xorl %eax, %eax cmpl $0x1f, %esi ja 0x121c1e pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx movq %rdx, %rdi movl $0x22, %esi callq 0xd88fb movq (%rax), %rax movl %ebp, %ecx movzwl (%rax,%rcx,2), %esi movq %rbx, %rdi callq 0xd443b movl $0x3, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
/google[P]bloaty/third_party/capstone/arch/Mips/MipsDisassembler.c
DecodeDaddiGroupBranch_4
static DecodeStatus DecodeDaddiGroupBranch_4(MCInst *MI, uint32_t insn, uint64_t Address, const MCRegisterInfo *Decoder) { // If we are called then we can assume that MIPS32r6/MIPS64r6 is enabled // (otherwise we would have matched the ADDI instruction from the earlier // ISA's instead). // // We have: // 0b011000 sssss ttttt iiiiiiiiiiiiiiii // BNVC if rs >= rt // BNEZALC if rs == 0 && rt != 0 // BNEC if rs < rt && rs != 0 uint32_t Rs = fieldFromInstruction(insn, 21, 5); uint32_t Rt = fieldFromInstruction(insn, 16, 5); uint32_t Imm = (uint32_t)SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; if (Rs >= Rt) { MCInst_setOpcode(MI, Mips_BNVC); HasRs = true; } else if (Rs != 0 && Rs < Rt) { MCInst_setOpcode(MI, Mips_BNEC); HasRs = true; } else MCInst_setOpcode(MI, Mips_BNEZALC); if (HasRs) MCOperand_CreateReg0(MI, getReg(Decoder, Mips_GPR32RegClassID, Rs)); MCOperand_CreateReg0(MI, getReg(Decoder, Mips_GPR32RegClassID, Rt)); MCOperand_CreateImm0(MI, Imm); return MCDisassembler_Success; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx movl %esi, %r15d shrl $0x15, %r15d andl $0x1f, %r15d movl %esi, %r12d shrl $0x10, %r12d andl $0x1f, %r12d movl $0x122, %esi # imm = 0x122 cmpl %r12d, %r15d jae 0x122635 movl $0x113, %esi # imm = 0x113 testl %r15d, %r15d je 0x122696 movq %rbx, %rdi callq 0xd43b1 movq %r14, %rdi movl $0x8, %esi callq 0xd88fb movq (%rax), %rax movl %r15d, %ecx movzwl (%rax,%rcx,2), %esi movq %rbx, %rdi callq 0xd443b movswl %bp, %r15d shll $0x2, %r15d movq %r14, %rdi movl $0x8, %esi callq 0xd88fb movq (%rax), %rax movl %r12d, %ecx movzwl (%rax,%rcx,2), %esi movq %rbx, %rdi callq 0xd443b movq %rbx, %rdi movq %r15, %rsi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0xd4468 movq %rbx, %rdi movl $0x11e, %esi # imm = 0x11E callq 0xd43b1 jmp 0x12265c
/google[P]bloaty/third_party/capstone/arch/Mips/MipsDisassembler.c
SystemZ_getInstruction
bool SystemZ_getInstruction(csh ud, const uint8_t *code, size_t code_len, MCInst *MI, uint16_t *size, uint64_t address, void *info) { uint64_t Inst; const uint8_t *Table; uint16_t I; // The top 2 bits of the first byte specify the size. if (*code < 0x40) { *size = 2; Table = DecoderTable16; } else if (*code < 0xc0) { *size = 4; Table = DecoderTable32; } else { *size = 6; Table = DecoderTable48; } if (code_len < *size) // short of input data return false; if (MI->flat_insn->detail) { memset(MI->flat_insn->detail, 0, offsetof(cs_detail, sysz)+sizeof(cs_sysz)); } // Construct the instruction. Inst = 0; for (I = 0; I < *size; ++I) Inst = (Inst << 8) | code[I]; return decodeInstruction(Table, MI, Inst, address, info, 0); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, 0x10(%rsp) movq %rcx, %r14 movq %rsi, %r12 movb (%rsi), %al xorl %ecx, %ecx cmpb $-0x40, %al setae %cl leaq 0x2f633f(%rip), %rsi # 0x44fc90 leaq 0x2f8498(%rip), %rdi # 0x451df0 cmovbq %rsi, %rdi cmpb $0x40, %al leal 0x4(%rcx,%rcx), %eax movl $0x2, %ecx cmovael %eax, %ecx leaq 0x2f606f(%rip), %r13 # 0x44f9e0 cmovaeq %rdi, %r13 movw %cx, (%r8) cmpq %rdx, %rcx jbe 0x159985 xorl %eax, %eax jmp 0x159bfc movq %r8, %r15 movq 0x310(%r14), %rax movq 0xf0(%rax), %rdi testq %rdi, %rdi je 0x1599a7 movl $0x120, %edx # imm = 0x120 xorl %esi, %esi callq 0x6d3c0 movzwl (%r15), %eax xorl %esi, %esi testq %rax, %rax je 0x1599cd xorl %ecx, %ecx xorl %r15d, %r15d shlq $0x8, %r15 movzbl (%r12,%rcx), %edx orq %rdx, %r15 incq %rcx cmpq %rcx, %rax jne 0x1599b7 jmp 0x1599d0 xorl %r15d, %r15d movq %r15, %rdi notq %rdi movl $0x3, 0xc(%rsp) leaq 0x2f59bb(%rip), %r8 # 0x44f3a0 movq $-0x1, %r9 movl %esi, %r11d movzbl (%r13), %eax decl %eax cmpl $0x5, %eax ja 0x15997e movslq (%r8,%rax,4), %rax addq %r8, %rax jmpq *%rax movq %r13, %rax incq %rax xorl %edx, %edx xorl %r10d, %r10d xorl %ecx, %ecx movzbl (%rax,%rdx), %r12d movl %r12d, %r13d andl $0x7f, %r13d shlq %cl, %r13 addq %r13, %r10 addl $0x7, %ecx incq %rdx testb %r12b, %r12b js 0x159a11 movl %edx, %ecx leaq (%rax,%rcx), %r13 addq $0x2, %r13 cmpq %r11, %r10 je 0x1599ef addq %rcx, %rax movzwl (%rax), %eax addq %rax, %r13 jmp 0x1599ef incq %r13 xorl %eax, %eax cmpb $0x0, (%r13,%rax) leaq 0x1(%rax), %rax js 0x159a4d movl %eax, %eax addq %rax, %r13 addq $0x2, %r13 jmp 0x1599ef movzbl 0x1(%r13), %eax movb 0x2(%r13), %dl movq $-0x1, %r12 movl %edx, %ecx shlq %cl, %r12 notq %r12 movl %eax, %ecx shlq %cl, %r12 cmpb $0x40, %dl cmoveq %r9, %r12 movq %r13, %rdx addq $0x3, %rdx xorl %r13d, %r13d xorl %r10d, %r10d xorl %ecx, %ecx movzbl (%rdx,%r13), %ebp movl %ebp, %ebx andl $0x7f, %ebx shlq %cl, %rbx addq %rbx, %r10 addl $0x7, %ecx incq %r13 testb %bpl, %bpl js 0x159a97 andq %r15, %r12 movl %eax, %ecx shrq %cl, %r12 movl %r13d, %eax leaq (%rdx,%rax), %r13 addq $0x2, %r13 movl %r10d, %ecx cmpq %r12, %rcx je 0x1599ef addq %rax, %rdx movzwl (%rdx), %eax addq %rax, %r13 jmp 0x1599ef leaq 0x1(%r13), %rax xorl %r10d, %r10d xorl %edx, %edx xorl %ecx, %ecx movzbl (%rax,%r10), %r11d movl %r11d, %ebx andl $0x7f, %ebx shlq %cl, %rbx addq %rbx, %rdx addl $0x7, %ecx incq %r10 testb %r11b, %r11b js 0x159aea movl %r10d, %ecx addq %rcx, %rax leaq (%rcx,%r13), %r12 incq %r12 xorl %r11d, %r11d xorl %r10d, %r10d xorl %ecx, %ecx movzbl (%r12,%r11), %ebx movl %ebx, %r13d andl $0x7f, %r13d shlq %cl, %r13 addq %r13, %r10 addl $0x7, %ecx incq %r11 testb %bl, %bl js 0x159b1b movl %r11d, %ecx addq %rcx, %rax andq %r15, %rdx andq %rdi, %r10 orq %rdx, %r10 movl 0xc(%rsp), %ecx movl $0x1, %edx cmovnel %edx, %ecx movl %ecx, 0xc(%rsp) movq %rax, %r13 jmp 0x1599ec movb 0x1(%r13), %al movb 0x2(%r13), %dl addq $0x3, %r13 movq $-0x1, %rsi movl %edx, %ecx shlq %cl, %rsi notq %rsi movl %eax, %ecx shlq %cl, %rsi cmpb $0x40, %dl cmoveq %r9, %rsi andq %r15, %rsi shrq %cl, %rsi jmp 0x1599ec incq %r13 xorl %eax, %eax xorl %esi, %esi xorl %ecx, %ecx movzbl (%r13,%rax), %edx movl %edx, %edi andl $0x7f, %edi shlq %cl, %rdi addq %rdi, %rsi addl $0x7, %ecx incq %rax testb %dl, %dl js 0x159b99 movl %eax, %eax addq %rax, %r13 xorl %r12d, %r12d xorl %ecx, %ecx movzbl (%r13), %eax movl %eax, %edx andl $0x7f, %edx shlq %cl, %rdx addq %rdx, %r12 addl $0x7, %ecx incq %r13 testb %al, %al js 0x159bbe movq %r14, %rdi callq 0xd43b1 movl 0xc(%rsp), %edi movl %r12d, %esi movq %r15, %rdx movq %r14, %rcx movq 0x10(%rsp), %r8 callq 0x159c4c testl %eax, %eax setne %al addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/google[P]bloaty/third_party/capstone/arch/SystemZ/SystemZDisassembler.c
printBDLAddrOperand
static void printBDLAddrOperand(MCInst *MI, int OpNum, SStream *O) { unsigned Base = MCOperand_getReg(MCInst_getOperand(MI, OpNum)); uint64_t Disp = (uint64_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum + 1)); uint64_t Length = (uint64_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum + 2)); if (Disp > HEX_THRESHOLD) SStream_concat(O, "0x%"PRIx64, Disp); else SStream_concat(O, "%"PRIu64, Disp); if (Length > HEX_THRESHOLD) SStream_concat(O, "(0x%"PRIx64, Length); else SStream_concat(O, "(%"PRIu64, Length); if (Base) SStream_concat(O, ", %%%s", getRegisterName(Base)); SStream_concat0(O, ")"); if (MI->csh->detail) { MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_MEM; MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.base = (uint8_t)SystemZ_map_register(Base); MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.length = Length; MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.disp = (int64_t)Disp; MI->flat_insn->detail->sysz.op_count++; } }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r12 movl %esi, %r13d movq %rdi, %rbx callq 0xd43bf movq %rax, %rdi callq 0xd4408 movl %eax, %r15d leal 0x1(%r13), %esi movq %rbx, %rdi callq 0xd43bf movq %rax, %rdi callq 0xd4410 movq %rax, %r14 addl $0x2, %r13d movq %rbx, %rdi movl %r13d, %esi callq 0xd43bf movq %rax, %rdi callq 0xd4410 movq %rax, %r13 cmpq $0xa, %r14 leaq 0xf5303(%rip), %rax # 0x254fca leaq 0xf5303(%rip), %rsi # 0x254fd1 cmovaeq %rax, %rsi movq %r12, %rdi movq %r14, %rdx xorl %eax, %eax callq 0xd44d5 cmpq $0xa, %r13 leaq 0x3013df(%rip), %rax # 0x4610c9 leaq 0x3013df(%rip), %rsi # 0x4610d0 cmovaeq %rax, %rsi movq %r12, %rdi movq %r13, %rdx xorl %eax, %eax callq 0xd44d5 testl %r15d, %r15d je 0x15fd31 leal -0x1(%r15), %eax leaq 0x3011ee(%rip), %rcx # 0x460f00 movzwl (%rcx,%rax,2), %eax leaq 0x301083(%rip), %rdx # 0x460da0 addq %rax, %rdx leaq 0x3013ae(%rip), %rsi # 0x4610d5 movq %r12, %rdi xorl %eax, %eax callq 0xd44d5 leaq 0xeac0e(%rip), %rsi # 0x24a946 movq %r12, %rdi callq 0xd448e movq 0x320(%rbx), %rax cmpl $0x0, 0x60(%rax) je 0x15fdd4 movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x5c(%rax), %ecx shll $0x5, %ecx movl $0x3, 0x60(%rax,%rcx) movl %r15d, %edi callq 0x160ade movq 0x310(%rbx), %rcx movq 0xf0(%rcx), %rcx movzbl 0x5c(%rcx), %edx shll $0x5, %edx movb %al, 0x68(%rcx,%rdx) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x5c(%rax), %ecx shll $0x5, %ecx movq %r13, 0x70(%rax,%rcx) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x5c(%rax), %ecx shll $0x5, %ecx movq %r14, 0x78(%rax,%rcx) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax incb 0x5c(%rax) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/google[P]bloaty/third_party/capstone/arch/SystemZ/SystemZInstPrinter.c
DecodeL4RSrcDstSrcDstInstruction
static DecodeStatus DecodeL4RSrcDstSrcDstInstruction(MCInst *Inst, unsigned Insn, uint64_t Address, const void *Decoder) { unsigned Op1, Op2, Op3; unsigned Op4 = fieldFromInstruction_4(Insn, 16, 4); DecodeStatus S = Decode3OpInstruction(fieldFromInstruction_4(Insn, 0, 16), &Op1, &Op2, &Op3); if (S == MCDisassembler_Success) { DecodeGRRegsRegisterClass(Inst, Op1, Address, Decoder); S = DecodeGRRegsRegisterClass(Inst, Op4, Address, Decoder); } if (S == MCDisassembler_Success) { DecodeGRRegsRegisterClass(Inst, Op1, Address, Decoder); DecodeGRRegsRegisterClass(Inst, Op4, Address, Decoder); DecodeGRRegsRegisterClass(Inst, Op2, Address, Decoder); DecodeGRRegsRegisterClass(Inst, Op3, Address, Decoder); } return S; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r14 movl %esi, %ebp shrl $0x10, %ebp movl %esi, %eax shrl $0x6, %eax andl $0x1f, %eax cmpl $0x1a, %eax ja 0x16206f movl %eax, %edx imulq $0x55555556, %rdx, %rcx # imm = 0x55555556 shrq $0x20, %rcx leal (%rcx,%rcx,2), %edi movl %eax, %r8d subl %edi, %r8d imulq $0x55555556, %rcx, %rdi # imm = 0x55555556 shrq $0x20, %rdi leal (%rdi,%rdi,2), %edi subl %edi, %ecx imulq $0x1c71c71d, %rdx, %rdx # imm = 0x1C71C71D shrq $0x20, %rdx movl %esi, %edi shrl $0x4, %edi andl $0x3, %edi leal (%rdi,%r8,4), %r13d movl %esi, %edi shrl $0x2, %edi andl $0x3, %edi leal (%rdi,%rcx,4), %ecx movl %ecx, 0x4(%rsp) andl $0x3, %esi leal (%rsi,%rdx,4), %r12d movl $0x3, %r15d jmp 0x162072 xorl %r15d, %r15d andl $0xf, %ebp cmpl $0x1a, %eax ja 0x162098 movq %r14, %rdi movl %r13d, %esi movq %rbx, %rdx callq 0x1617b3 movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx callq 0x1617b3 movl %eax, %r15d cmpl $0x3, %r15d jne 0x1620d6 movq %r14, %rdi movl %r13d, %esi movq %rbx, %rdx callq 0x1617b3 movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx callq 0x1617b3 movq %r14, %rdi movl 0x4(%rsp), %esi movq %rbx, %rdx callq 0x1617b3 movq %r14, %rdi movl %r12d, %esi movq %rbx, %rdx callq 0x1617b3 movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/google[P]bloaty/third_party/capstone/arch/XCore/XCoreDisassembler.c
DecodeLR2RInstruction
static DecodeStatus DecodeLR2RInstruction(MCInst *Inst, unsigned Insn, uint64_t Address, const void *Decoder) { unsigned Op1, Op2; DecodeStatus S = Decode2OpInstruction(fieldFromInstruction_4(Insn, 0, 16), &Op1, &Op2); if (S != MCDisassembler_Success) return DecodeL2OpInstructionFail(Inst, Insn, Address, Decoder); DecodeGRRegsRegisterClass(Inst, Op2, Address, Decoder); DecodeGRRegsRegisterClass(Inst, Op1, Address, Decoder); return S; }
pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movl %esi, %ebp movq %rdi, %r14 movzwl %bp, %edi leaq 0xc(%rsp), %rsi leaq 0x8(%rsp), %rdx callq 0x1625e8 cmpl $0x3, %eax jne 0x1623a1 movl 0x8(%rsp), %esi movq %r14, %rdi movq %rbx, %rdx callq 0x1617b3 movl 0xc(%rsp), %esi movq %r14, %rdi movq %rbx, %rdx callq 0x1617b3 movl $0x3, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r14 popq %rbp jmp 0x1627a2
/google[P]bloaty/third_party/capstone/arch/XCore/XCoreDisassembler.c
DecodeL2OpInstructionFail
static DecodeStatus DecodeL2OpInstructionFail(MCInst *Inst, unsigned Insn, uint64_t Address, const void *Decoder) { // Try and decode as a L3R / L2RUS instruction. unsigned Opcode = fieldFromInstruction_4(Insn, 16, 4) | fieldFromInstruction_4(Insn, 27, 5) << 4; switch (Opcode) { case 0x0c: MCInst_setOpcode(Inst, XCore_STW_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x1c: MCInst_setOpcode(Inst, XCore_XOR_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x2c: MCInst_setOpcode(Inst, XCore_ASHR_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x3c: MCInst_setOpcode(Inst, XCore_LDAWF_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x4c: MCInst_setOpcode(Inst, XCore_LDAWB_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x5c: MCInst_setOpcode(Inst, XCore_LDA16F_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x6c: MCInst_setOpcode(Inst, XCore_LDA16B_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x7c: MCInst_setOpcode(Inst, XCore_MUL_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x8c: MCInst_setOpcode(Inst, XCore_DIVS_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x9c: MCInst_setOpcode(Inst, XCore_DIVU_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x10c: MCInst_setOpcode(Inst, XCore_ST16_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x11c: MCInst_setOpcode(Inst, XCore_ST8_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x12c: MCInst_setOpcode(Inst, XCore_ASHR_l2rus); return DecodeL2RUSBitpInstruction(Inst, Insn, Address, Decoder); case 0x12d: MCInst_setOpcode(Inst, XCore_OUTPW_l2rus); return DecodeL2RUSBitpInstruction(Inst, Insn, Address, Decoder); case 0x12e: MCInst_setOpcode(Inst, XCore_INPW_l2rus); return DecodeL2RUSBitpInstruction(Inst, Insn, Address, Decoder); case 0x13c: MCInst_setOpcode(Inst, XCore_LDAWF_l2rus); return DecodeL2RUSInstruction(Inst, Insn, Address, Decoder); case 0x14c: MCInst_setOpcode(Inst, XCore_LDAWB_l2rus); return DecodeL2RUSInstruction(Inst, Insn, Address, Decoder); case 0x15c: MCInst_setOpcode(Inst, XCore_CRC_l3r); return DecodeL3RSrcDstInstruction(Inst, Insn, Address, Decoder); case 0x18c: MCInst_setOpcode(Inst, XCore_REMS_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); case 0x19c: MCInst_setOpcode(Inst, XCore_REMU_l3r); return DecodeL3RInstruction(Inst, Insn, Address, Decoder); } return MCDisassembler_Fail; }
pushq %rbp pushq %r14 pushq %rbx movq %rdx, %rbx movl %esi, %ebp movq %rdi, %r14 movl %esi, %ecx shrl $0x10, %ecx andl $0xf, %ecx movl %esi, %eax shrl $0x17, %eax andl $-0x10, %eax orl %ecx, %eax cmpl $0x10b, %eax # imm = 0x10B jg 0x1627fd cmpl $0x5b, %eax jg 0x16283d cmpl $0x2b, %eax jle 0x1628ab cmpl $0x2c, %eax je 0x16295a cmpl $0x3c, %eax je 0x16292f cmpl $0x4c, %eax jne 0x1629fa movq %r14, %rdi movl $0x89, %esi jmp 0x1629c6 cmpl $0x13b, %eax # imm = 0x13B jg 0x162872 cmpl $0x12b, %eax # imm = 0x12B jle 0x1628ca cmpl $0x12c, %eax # imm = 0x12C je 0x162964 cmpl $0x12d, %eax # imm = 0x12D je 0x16293c cmpl $0x12e, %eax # imm = 0x12E jne 0x1629fa movq %r14, %rdi movl $0x71, %esi jmp 0x16296c cmpl $0x7b, %eax jle 0x1628ed cmpl $0x7c, %eax je 0x162982 cmpl $0x8c, %eax je 0x162946 cmpl $0x9c, %eax jne 0x1629fa movq %r14, %rdi movl $0x48, %esi jmp 0x1629c6 cmpl $0x15b, %eax # imm = 0x15B jle 0x16290c cmpl $0x15c, %eax # imm = 0x15C je 0x16298c cmpl $0x18c, %eax # imm = 0x18C je 0x162950 cmpl $0x19c, %eax # imm = 0x19C jne 0x1629fa movq %r14, %rdi movl $0xbb, %esi jmp 0x1629c6 cmpl $0xc, %eax je 0x1629aa cmpl $0x1c, %eax jne 0x1629fa movq %r14, %rdi movl $0xf4, %esi jmp 0x1629c6 cmpl $0x10c, %eax # imm = 0x10C je 0x1629b4 cmpl $0x11c, %eax # imm = 0x11C jne 0x1629fa movq %r14, %rdi movl $0xdc, %esi jmp 0x1629c6 cmpl $0x5c, %eax je 0x1629be cmpl $0x6c, %eax jne 0x1629fa movq %r14, %rdi movl $0x81, %esi jmp 0x1629c6 cmpl $0x13c, %eax # imm = 0x13C je 0x1629dc cmpl $0x14c, %eax # imm = 0x14C jne 0x1629fa movq %r14, %rdi movl $0x88, %esi jmp 0x1629e4 movq %r14, %rdi movl $0x90, %esi jmp 0x1629c6 movq %r14, %rdi movl $0xb5, %esi jmp 0x16296c movq %r14, %rdi movl $0x47, %esi jmp 0x1629c6 movq %r14, %rdi movl $0xba, %esi jmp 0x1629c6 movq %r14, %rdi movl $0x1d, %esi jmp 0x1629c6 movq %r14, %rdi movl $0x1c, %esi callq 0xd43b1 movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx popq %rbx popq %r14 popq %rbp jmp 0x1623b6 movq %r14, %rdi movl $0xaf, %esi jmp 0x1629c6 movq %r14, %rdi movl $0x43, %esi callq 0xd43b1 movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx popq %rbx popq %r14 popq %rbp jmp 0x162523 movq %r14, %rdi movl $0xe7, %esi jmp 0x1629c6 movq %r14, %rdi movl $0xdb, %esi jmp 0x1629c6 movq %r14, %rdi movl $0x82, %esi callq 0xd43b1 movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx popq %rbx popq %r14 popq %rbp jmp 0x161e5a movq %r14, %rdi movl $0x8f, %esi callq 0xd43b1 movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx popq %rbx popq %r14 popq %rbp jmp 0x162473 xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
/google[P]bloaty/third_party/capstone/arch/XCore/XCoreDisassembler.c
XCore_printInst
void XCore_printInst(MCInst *MI, SStream *O, void *Info) { printInstruction(MI, O, Info); set_mem_access(MI, false, 0); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0xd43b8 movl %eax, %eax leaq 0x32f964(%rip), %rcx # 0x492650 movl (%rcx,%rax,4), %r12d movl %r12d, %eax andl $0x7ff, %eax # imm = 0x7FF leaq 0x32fd31(%rip), %rcx # 0x492a30 leaq (%rax,%rcx), %r15 decq %r15 movq %r14, %rdi movq %r15, %rsi callq 0xd448e movq %r15, %rdi movl $0x5b, %esi callq 0x6d280 testq %rax, %rax je 0x162d32 movq %rbx, %rdi movl $0x1, %esi xorl %edx, %edx callq 0x163317 movl %r12d, %eax shrl $0xb, %eax andl $0x3, %eax leaq 0x32f87e(%rip), %rcx # 0x4925c0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq %rbx, %rdi movq %r15, %rsi callq 0x162a41 jmp 0x163058 movl $0x1, %esi jmp 0x162d6b movl $0x2, %esi jmp 0x162d6b xorl %esi, %esi movq %rbx, %rdi movq %r14, %rdx callq 0x16349a movl %r12d, %eax shrl $0xd, %eax andl $0x1f, %eax decl %eax cmpl $0xf, %eax ja 0x163075 leaq 0x32f83f(%rip), %rcx # 0x4925d0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x351b44(%rip), %rsi # 0x4b48e5 jmp 0x16307c leaq 0x3301e7(%rip), %rsi # 0x492f94 jmp 0x162f62 leaq 0x3301c9(%rip), %rsi # 0x492f82 movq %r14, %rdi callq 0xd448e movq %rbx, %rdi movl $0x1, %esi movl $0x2, %edx jmp 0x162f46 leaq 0x330178(%rip), %rsi # 0x492f52 movq %r14, %rdi callq 0xd448e movq %rbx, %rdi movl $0x1, %esi xorl %edx, %edx callq 0x163317 jmp 0x163084 leaq 0x33018b(%rip), %rsi # 0x492f88 movq %r14, %rdi callq 0xd448e movq %rbx, %rdi movl $0x1, %esi movl $0x4, %edx jmp 0x162f46 leaq 0x330156(%rip), %rsi # 0x492f74 movq %r14, %rdi callq 0xd448e movq 0x320(%rbx), %rax cmpl $0x3, 0x60(%rax) jne 0x16304b movb $0x0, 0x6c(%rax) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movb $0x11, 0x61(%rax,%rcx) jmp 0x16303a leaq 0x33013a(%rip), %rsi # 0x492f9b movq %r14, %rdi callq 0xd448e movq 0x320(%rbx), %rax cmpl $0x3, 0x60(%rax) jne 0x162e7a movb $0x0, 0x6c(%rax) movq %rbx, %rdi xorl %esi, %esi movq %r14, %rdx callq 0x16349a leaq 0x238c29(%rip), %rsi # 0x39bab7 movq %r14, %rdi callq 0xd448e movq %rbx, %rdi movl $0x1, %esi jmp 0x163050 leaq 0x11d25e(%rip), %rsi # 0x280108 movq %r14, %rdi callq 0xd448e movq 0x320(%rbx), %rax cmpl $0x3, 0x60(%rax) jne 0x163084 movb $0x0, 0x6c(%rax) jmp 0x163084 leaq 0x330093(%rip), %rsi # 0x492f66 movq %r14, %rdi callq 0xd448e movq 0x320(%rbx), %rax cmpl $0x3, 0x60(%rax) jne 0x16304b movb $0x0, 0x6c(%rax) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movb $0x2, 0x61(%rax,%rcx) jmp 0x16303a leaq 0x330043(%rip), %rsi # 0x492f59 movq %r14, %rdi callq 0xd448e movq %rbx, %rdi movl $0x1, %esi xorl %edx, %edx jmp 0x162f46 leaq 0x33005d(%rip), %rsi # 0x492f8e movq %r14, %rdi callq 0xd448e movq %rbx, %rdi movl $0x1, %esi movl $0x1, %edx callq 0x163317 movq %rbx, %rdi movl $0x1, %esi movq %r14, %rdx callq 0x16349a leaq 0x15d395(%rip), %rsi # 0x2c02f7 movq %r14, %rdi callq 0xd448e movq 0x320(%rbx), %rax cmpl $0x3, 0x60(%rax) jne 0x163058 movb $0x0, 0x6c(%rax) jmp 0x163058 leaq 0x32ffd4(%rip), %rsi # 0x492f5f movq %r14, %rdi callq 0xd448e movq 0x320(%rbx), %rax cmpl $0x3, 0x60(%rax) jne 0x16304b movb $0x0, 0x6c(%rax) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movb $0x1, 0x61(%rax,%rcx) jmp 0x16303a leaq 0x32ffb0(%rip), %rsi # 0x492f7b movq %r14, %rdi callq 0xd448e movq 0x320(%rbx), %rax cmpl $0x3, 0x60(%rax) jne 0x16304b movb $0x0, 0x6c(%rax) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movb $0x4, 0x61(%rax,%rcx) jmp 0x16303a leaq 0x32ff66(%rip), %rsi # 0x492f6d movq %r14, %rdi callq 0xd448e movq 0x320(%rbx), %rax cmpl $0x3, 0x60(%rax) jne 0x16304b movb $0x0, 0x6c(%rax) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movb $0x3, 0x61(%rax,%rcx) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax incb 0x58(%rax) movq %rbx, %rdi xorl %esi, %esi movq %r14, %rdx callq 0x16349a movq 0x320(%rbx), %rax cmpl $0x3, 0x60(%rax) jne 0x163069 movb $0x0, 0x6c(%rax) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x238a3b(%rip), %rsi # 0x39bab7 movq %r14, %rdi callq 0xd448e movl %r12d, %eax shrl $0x12, %eax andl $0x7, %eax leal -0x2(%rax), %ecx cmpl $0x2, %ecx jb 0x163058 movq %rbx, %rdi cmpl $0x1, %eax je 0x1630d4 cmpl $0x4, %eax jne 0x1630fa xorl %esi, %esi movq %r14, %rdx callq 0x16349a leaq 0x238a04(%rip), %rsi # 0x39bab7 movq %r14, %rdi callq 0xd448e movl %r12d, %eax shrl $0x15, %eax andl $0x7, %eax leaq 0x32f545(%rip), %rcx # 0x492610 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x2, %esi movq %r14, %rdx callq 0x16349a movl %r12d, %eax shrl $0x15, %eax andl $0x7, %eax leaq 0x32f51f(%rip), %rcx # 0x492610 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x1, %esi movq %r14, %rdx callq 0x16349a movl %r12d, %eax shrl $0x15, %eax andl $0x7, %eax leaq 0x32f4f9(%rip), %rcx # 0x492610 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x238990(%rip), %rsi # 0x39bab7 movq %r14, %rdi callq 0xd448e jmp 0x1631ab leaq 0x11cfd0(%rip), %rsi # 0x280108 movq %r14, %rdi callq 0xd448e movq 0x320(%rbx), %rax cmpl $0x3, 0x60(%rax) jne 0x163151 movb $0x0, 0x6c(%rax) movq %rbx, %rdi movl $0x2, %esi jmp 0x163050 movq %rbx, %rdi movl $0x3, %esi movq %r14, %rdx callq 0x16349a leaq 0x238942(%rip), %rsi # 0x39bab7 movq %r14, %rdi jmp 0x1631f7 leaq 0x32fe1e(%rip), %rsi # 0x492f9f movq %r14, %rdi callq 0xd448e movq %rbx, %rdi movl $0x1, %esi movl $0xffff0001, %edx # imm = 0xFFFF0001 jmp 0x163225 movq %rbx, %rdi movl $0x2, %esi movq %r14, %rdx callq 0x16349a movl %r12d, %eax shrl $0x18, %eax andl $0x7, %eax decl %eax cmpl $0x3, %eax ja 0x16326e leaq 0x32f46a(%rip), %rcx # 0x492630 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x2388e1(%rip), %r15 # 0x39bab7 movq %r14, %rdi movq %r15, %rsi callq 0xd448e movq %rbx, %rdi movl $0x3, %esi movq %r14, %rdx callq 0x16349a movq %r14, %rdi movq %r15, %rsi callq 0xd448e movq %rbx, %rdi movl $0x4, %esi jmp 0x163050 leaq 0x15c50f(%rip), %rsi # 0x2bf71f movq %r14, %rdi callq 0xd448e movq %rbx, %rdi movl $0x1, %esi movl $0xffff, %edx # imm = 0xFFFF callq 0x163317 movq %rbx, %rdi movl $0x2, %esi jmp 0x162f53 movq %rbx, %rdi movl $0x4, %esi movq %r14, %rdx callq 0x16349a leaq 0x238869(%rip), %rsi # 0x39bab7 movq %r14, %rdi callq 0xd448e shrl $0x1b, %r12d andl $0x3, %r12d leaq 0x32f3db(%rip), %rax # 0x492640 movslq (%rax,%r12,4), %rcx addq %rax, %rcx jmpq *%rcx movq %rbx, %rdi movl $0x2, %esi movq %r14, %rdx callq 0x16349a shrl $0x1b, %r12d andl $0x3, %r12d leaq 0x32f3b3(%rip), %rax # 0x492640 movslq (%rax,%r12,4), %rcx addq %rax, %rcx jmpq *%rcx movq %rbx, %rdi movl $0x2, %esi movq %r14, %rdx callq 0x16349a leaq 0x23880a(%rip), %rsi # 0x39bab7 movq %r14, %rdi callq 0xd448e movq %rbx, %rdi movl $0x3, %esi jmp 0x163050 leaq 0x2387ee(%rip), %r15 # 0x39bab7 movq %r14, %rdi movq %r15, %rsi callq 0xd448e movq %rbx, %rdi movl $0x3, %esi movq %r14, %rdx callq 0x16349a movq %r14, %rdi movq %r15, %rsi callq 0xd448e movq %rbx, %rdi movl $0x4, %esi movq %r14, %rdx callq 0x16349a movq %r14, %rdi movq %r15, %rsi callq 0xd448e movq %rbx, %rdi movl $0x5, %esi jmp 0x163050
/google[P]bloaty/third_party/capstone/arch/XCore/XCoreInstPrinter.c
set_mem_access
static void set_mem_access(MCInst *MI, bool status, int reg) { if (MI->csh->detail != CS_OPT_ON) return; MI->csh->doing_mem = status; if (status) { if (reg != 0xffff && reg != -0xffff) { MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].type = XCORE_OP_MEM; if (reg) { MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.base = (uint8_t)reg; } else { MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.base = XCORE_REG_INVALID; } MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.index = XCORE_REG_INVALID; MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.disp = 0; MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.direct = 1; } else { // the last op should be the memory base MI->flat_insn->detail->xcore.op_count--; MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].type = XCORE_OP_MEM; MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.base = (uint8_t)MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].reg; MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.index = XCORE_REG_INVALID; MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.disp = 0; if (reg > 0) MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.direct = 1; else MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.direct = -1; } } else { if (reg) { MI->flat_insn->detail->xcore.operands[MI->flat_insn->detail->xcore.op_count].mem.index = (uint8_t)reg; // done, create the next operand slot MI->flat_insn->detail->xcore.op_count++; } } }
movq 0x320(%rdi), %rax cmpl $0x3, 0x60(%rax) jne 0x163407 movb %sil, 0x6c(%rax) testb %sil, %sil je 0x1633d9 cmpl $0xffff0001, %edx # imm = 0xFFFF0001 je 0x163349 cmpl $0xffff, %edx # imm = 0xFFFF jne 0x163408 movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax decb 0x58(%rax) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movl $0x3, 0x5c(%rax,%rcx) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movb $0x0, 0x61(%rax,%rcx) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movl $0x0, 0x64(%rax,%rcx) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx addq %rcx, %rax addq $0x68, %rax testl %edx, %edx jle 0x163493 movl $0x1, (%rax) retq testl %edx, %edx je 0x163407 movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movb %dl, 0x61(%rax,%rcx) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax incb 0x58(%rax) retq movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movl $0x3, 0x5c(%rax,%rcx) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movb %dl, 0x60(%rax,%rcx) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movb $0x0, 0x61(%rax,%rcx) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movl $0x0, 0x64(%rax,%rcx) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movl $0x1, 0x68(%rax,%rcx) retq movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF retq
/google[P]bloaty/third_party/capstone/arch/XCore/XCoreInstPrinter.c
printOperand
static void printOperand(MCInst *MI, int OpNum, SStream *O) { if (OpNum >= MI->size) return; _printOperand(MI, MCInst_getOperand(MI, OpNum), O); }
movzbl 0x4(%rdi), %eax cmpl %esi, %eax jle 0x1635d9 pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx callq 0xd43bf movq %rax, %r15 movq %rax, %rdi callq 0xd43f0 testb %al, %al je 0x16353a movq %r15, %rdi callq 0xd4408 movl %eax, %r15d leal -0x1(%r15), %eax leaq 0x32fad5(%rip), %rcx # 0x492fb0 movzbl (%rax,%rcx), %eax leaq 0x32fa3a(%rip), %rsi # 0x492f20 addq %rax, %rsi movq %r14, %rdi callq 0xd448e movq 0x320(%rbx), %rdx cmpl $0x0, 0x60(%rdx) je 0x1635d4 movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx addq $0x5c, %rax cmpb $0x1, 0x6c(%rdx) jne 0x163593 shll $0x4, %ecx addq %rcx, %rax addq $0x4, %rax cmpb $0x0, (%rax) je 0x1635da movb %r15b, 0x1(%rax) jmp 0x1635d4 movq %r15, %rdi callq 0xd43f8 testb %al, %al je 0x1635d4 movq %r15, %rdi callq 0xd4410 movq %rax, %r15 movq %r14, %rdi movl %r15d, %esi callq 0xd46a8 movq 0x320(%rbx), %rdx cmpl $0x0, 0x60(%rdx) je 0x1635d4 movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx addq $0x5c, %rax cmpb $0x1, 0x6c(%rdx) jne 0x16359f shll $0x4, %ecx movl %r15d, 0x8(%rax,%rcx) jmp 0x1635d4 shll $0x4, %ecx movl $0x1, (%rax,%rcx) jmp 0x1635a9 shll $0x4, %ecx movl $0x2, (%rax,%rcx) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx shll $0x4, %ecx movl %r15d, 0x60(%rax,%rcx) movq 0x310(%rbx), %rax movq 0xf0(%rax), %rax incb 0x58(%rax) popq %rbx popq %r14 popq %r15 retq movb %r15b, (%rax) jmp 0x1635d4 nop
/google[P]bloaty/third_party/capstone/arch/XCore/XCoreInstPrinter.c
XCore_reg_name
const char *XCore_reg_name(csh handle, unsigned int reg) { #ifndef CAPSTONE_DIET if (reg >= ARR_SIZE(reg_name_maps)) return NULL; return reg_name_maps[reg].name; #else return NULL; #endif }
cmpl $0x19, %esi jbe 0x1635e8 xorl %eax, %eax retq movl %esi, %eax shlq $0x4, %rax leaq 0x413a2b(%rip), %rcx # 0x577020 movq 0x8(%rax,%rcx), %rax retq
/google[P]bloaty/third_party/capstone/arch/XCore/XCoreMapping.c
XCore_reg_id
xcore_reg XCore_reg_id(char *name) { int i; for(i = 1; i < ARR_SIZE(reg_name_maps); i++) { if (!strcmp(name, reg_name_maps[i].name)) return reg_name_maps[i].id; } // not found return 0; }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movl $0x18, %r14d leaq 0x413a10(%rip), %r15 # 0x577020 movq (%r14,%r15), %rsi movq %rbx, %rdi callq 0x6da80 testl %eax, %eax je 0x163631 addq $0x10, %r14 cmpq $0x1a8, %r14 # imm = 0x1A8 jne 0x163610 xorl %eax, %eax jmp 0x163636 movl -0x8(%r14,%r15), %eax popq %rbx popq %r14 popq %r15 retq
/google[P]bloaty/third_party/capstone/arch/XCore/XCoreMapping.c
XCore_insn_name
const char *XCore_insn_name(csh handle, unsigned int id) { #ifndef CAPSTONE_DIET unsigned int i; if (id >= XCORE_INS_ENDING) return NULL; // handle special alias first for (i = 0; i < ARR_SIZE(alias_insn_names); i++) { if (alias_insn_names[i].id == id) return alias_insn_names[i].name; } return insn_name_maps[id].name; #else return NULL; #endif }
leal -0x79(%rsi), %eax cmpl $-0x78, %eax jae 0x163728 xorl %eax, %eax retq movl %esi, %eax shlq $0x4, %rax leaq 0x413a8b(%rip), %rcx # 0x5771c0 movq 0x8(%rax,%rcx), %rax retq
/google[P]bloaty/third_party/capstone/arch/XCore/XCoreMapping.c
peek_imm_32
static unsigned int peek_imm_32(const m68k_info *info) { return m68k_read_safe_32((info), (info)->pc); }
movl 0x20(%rdi), %ecx subl 0x10(%rdi), %ecx andl 0x2c(%rdi), %ecx leaq 0x4(%rcx), %rdx movl $0xaaaaaaaa, %eax # imm = 0xAAAAAAAA cmpq %rdx, 0x8(%rdi) jb 0x163b4d movq (%rdi), %rax movl (%rax,%rcx), %eax bswapl %eax retq
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68000_abcd_rr
static void d68000_abcd_rr(m68k_info *info) { build_rr(info, M68K_INS_ABCD, 1, 0); }
pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x18(%rdi), %rdi movl $0x1, %ebp movl $0x1, %esi callq 0xd43b1 movb $0x2, 0x118(%rbx) movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x110(%rbx) movl %ebp, 0x64(%rbx) movl 0x24(%rbx), %eax movl %eax, %ecx andl $0x7, %ecx incl %ecx movl %ecx, 0x30(%rbx) movl %ebp, 0x9c(%rbx) shrl $0x9, %eax andl $0x7, %eax incl %eax movl %eax, 0x68(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68000_addi_8
static unsigned int peek_imm_8(const m68k_info *info) { return (m68k_read_safe_16((info), (info)->pc)&0xff); }
movl 0x20(%rdi), %eax movl %eax, %edx subl 0x10(%rdi), %edx andl 0x2c(%rdi), %edx leaq 0x2(%rdx), %rsi movl $0xaa, %ecx cmpq %rsi, 0x8(%rdi) jb 0x163ddc movq (%rdi), %rcx movzbl 0x1(%rcx,%rdx), %ecx addl $0x2, %eax movl %eax, 0x20(%rdi) movl $0x4, %esi movl $0x1, %edx jmp 0x168c5f
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68000_addx_rr_16
static void d68000_addx_rr_16(m68k_info *info) { build_rr(info, M68K_INS_ADDX, 2, 0); }
pushq %rbx movq %rdi, %rbx movq 0x18(%rdi), %rdi movl $0x6, %esi callq 0xd43b1 movb $0x2, 0x118(%rbx) movabsq $0x200000001, %rax # imm = 0x200000001 movq %rax, 0x110(%rbx) movl $0x1, %eax movl %eax, 0x64(%rbx) movl 0x24(%rbx), %ecx movl %ecx, %edx andl $0x7, %edx incl %edx movl %edx, 0x30(%rbx) movl %eax, 0x9c(%rbx) shrl $0x9, %ecx andl $0x7, %ecx incl %ecx movl %ecx, 0x68(%rbx) popq %rbx retq
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68000_addx_mm_8
static void d68000_addx_mm_8(m68k_info *info) { build_mm(info, M68K_INS_ADDX, 1, 0); }
pushq %rbx movq %rdi, %rbx movq 0x18(%rdi), %rdi movl $0x6, %esi callq 0xd43b1 movb $0x2, 0x118(%rbx) movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x110(%rbx) movl $0x5, %eax movl %eax, 0x64(%rbx) movl 0x24(%rbx), %ecx movl %ecx, %edx andl $0x7, %edx addl $0x9, %edx movl %edx, 0x30(%rbx) movl %eax, 0x9c(%rbx) shrl $0x9, %ecx andl $0x7, %ecx addl $0x9, %ecx movl %ecx, 0x68(%rbx) popq %rbx retq
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68000_asr_r_16
static void d68000_asr_r_16(m68k_info *info) { build_r(info, M68K_INS_ASR, 2); }
pushq %rbx movq %rdi, %rbx movq 0x18(%rdi), %rdi movl $0xa, %esi callq 0xd43b1 movb $0x2, 0x118(%rbx) movabsq $0x200000001, %rax # imm = 0x200000001 movq %rax, 0x110(%rbx) movl $0x1, %eax movl %eax, 0x64(%rbx) movl 0x24(%rbx), %ecx movl %ecx, %edx shrl $0x9, %edx andl $0x7, %edx incl %edx movl %edx, 0x30(%rbx) movl %eax, 0x9c(%rbx) andl $0x7, %ecx incl %ecx movl %ecx, 0x68(%rbx) popq %rbx retq
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68000_bra_8
static void d68000_bra_8(m68k_info *info) { build_relative_branch(info, M68K_INS_BRA, 1, make_int_8(info->ir)); }
pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx movl 0x24(%rdi), %eax movzbl %al, %eax movsbl %al, %ebp andl $0xffffff00, %ebp # imm = 0xFFFFFF00 orl %eax, %ebp movq 0x18(%rdi), %rdi movl $0x1b, %esi callq 0xd43b1 movb $0x1, %al movb %al, 0x118(%rbx) movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x110(%rbx) movabsq $0x1300000008, %rcx # imm = 0x1300000008 movq %rcx, 0x60(%rbx) movl %ebp, 0x54(%rbx) movb %al, 0x58(%rbx) movzbl 0x17b(%rbx), %ecx leal 0x1(%rcx), %edx movb %dl, 0x17b(%rbx) movb %al, 0x173(%rbx,%rcx) movzbl 0x17b(%rbx), %eax leal 0x1(%rax), %ecx movb %cl, 0x17b(%rbx) movb $0x7, 0x173(%rbx,%rax) addq $0x8, %rsp popq %rbx popq %rbp retq
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68020_bra_32
static void d68020_bra_32(m68k_info *info) { LIMIT_CPU_TYPES(info, M68020_PLUS); build_relative_branch(info, M68K_INS_BRA, 4, read_imm_32(info)); }
pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx testb $0x1c, 0x28(%rdi) je 0x1649fa movq %rbx, %rdi callq 0x163b2d movl %eax, %ebp addl $0x4, 0x20(%rbx) movq 0x18(%rbx), %rdi movl $0x1b, %esi callq 0xd43b1 movb $0x1, %al movb %al, 0x118(%rbx) movabsq $0x400000001, %rcx # imm = 0x400000001 movq %rcx, 0x110(%rbx) movabsq $0x1300000008, %rcx # imm = 0x1300000008 movq %rcx, 0x60(%rbx) movl %ebp, 0x54(%rbx) movb $0x4, 0x58(%rbx) movzbl 0x17b(%rbx), %ecx leal 0x1(%rcx), %edx movb %dl, 0x17b(%rbx) movb %al, 0x173(%rbx,%rcx) movzbl 0x17b(%rbx), %eax leal 0x1(%rax), %ecx movb %cl, 0x17b(%rbx) movb $0x7, 0x173(%rbx,%rax) addq $0x8, %rsp popq %rbx popq %rbp retq movl 0x24(%rbx), %edx movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x168599
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68020_bsr_32
static void d68020_bsr_32(m68k_info *info) { LIMIT_CPU_TYPES(info, M68020_PLUS); build_relative_branch(info, M68K_INS_BSR, 4, peek_imm_32(info)); }
pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx testb $0x1c, 0x28(%rdi) je 0x164c14 movq %rbx, %rdi callq 0x163b2d movl %eax, %ebp movq 0x18(%rbx), %rdi movl $0x1c, %esi callq 0xd43b1 movb $0x1, %al movb %al, 0x118(%rbx) movabsq $0x400000001, %rcx # imm = 0x400000001 movq %rcx, 0x110(%rbx) movabsq $0x1300000008, %rcx # imm = 0x1300000008 movq %rcx, 0x60(%rbx) movl %ebp, 0x54(%rbx) movb $0x4, 0x58(%rbx) movzbl 0x17b(%rbx), %ecx leal 0x1(%rcx), %edx movb %dl, 0x17b(%rbx) movb %al, 0x173(%rbx,%rcx) movzbl 0x17b(%rbx), %eax leal 0x1(%rax), %ecx movb %cl, 0x17b(%rbx) movb $0x7, 0x173(%rbx,%rax) addq $0x8, %rsp popq %rbx popq %rbp retq movl 0x24(%rbx), %edx movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x168599
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68020_cpbcc_16
static void d68020_cpbcc_16(m68k_info *info) { cs_m68k_op* op0; cs_m68k* ext; LIMIT_CPU_TYPES(info, M68020_PLUS); // these are all in row with the extension so just doing a add here is fine info->inst->Opcode += (info->ir & 0x2f); ext = build_init_op(info, M68K_INS_FBF, 1, 2); op0 = &ext->operands[0]; make_cpbcc_operand(op0, M68K_OP_BR_DISP_SIZE_WORD, make_int_16(read_imm_16(info))); set_insn_group(info, M68K_GRP_JUMP); set_insn_group(info, M68K_GRP_BRANCH_RELATIVE); }
pushq %rbx movq %rdi, %rbx testb $0x1c, 0x28(%rdi) movl 0x24(%rdi), %edx je 0x165299 andl $0x2f, %edx movq 0x18(%rbx), %rdi addl %edx, 0x8(%rdi) movl $0x5f, %esi callq 0xd43b1 movb $0x1, 0x118(%rbx) movabsq $0x200000001, %rax # imm = 0x200000001 movq %rax, 0x110(%rbx) movl 0x20(%rbx), %eax movl %eax, %edx subl 0x10(%rbx), %edx andl 0x2c(%rbx), %edx leaq 0x2(%rdx), %rsi movl $0xaaaa, %ecx # imm = 0xAAAA cmpq %rsi, 0x8(%rbx) jb 0x165242 movq (%rbx), %rcx movzwl (%rcx,%rdx), %ecx rolw $0x8, %cx movzwl %cx, %ecx addl $0x2, %eax movl %eax, 0x20(%rbx) movswl %cx, %eax andl $0xffff0000, %eax # imm = 0xFFFF0000 orl %ecx, %eax movabsq $0x1300000008, %rcx # imm = 0x1300000008 movq %rcx, 0x60(%rbx) movl %eax, 0x54(%rbx) movb $0x2, 0x58(%rbx) movzbl 0x17b(%rbx), %eax leal 0x1(%rax), %ecx movb %cl, 0x17b(%rbx) movb $0x1, 0x173(%rbx,%rax) movzbl 0x17b(%rbx), %eax leal 0x1(%rax), %ecx movb %cl, 0x17b(%rbx) movb $0x7, 0x173(%rbx,%rax) popq %rbx retq movq %rbx, %rdi xorl %esi, %esi popq %rbx jmp 0x168599
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68020_cpdbcc
static void d68020_cpdbcc(m68k_info *info) { cs_m68k* ext; cs_m68k_op* op0; cs_m68k_op* op1; uint ext1, ext2; LIMIT_CPU_TYPES(info, M68020_PLUS); ext1 = read_imm_16(info); ext2 = read_imm_16(info); // these are all in row with the extension so just doing a add here is fine info->inst->Opcode += (ext1 & 0x2f); ext = build_init_op(info, M68K_INS_FDBF, 2, 0); op0 = &ext->operands[0]; op1 = &ext->operands[1]; op0->reg = M68K_REG_D0 + (info->ir & 7); make_cpbcc_operand(op1, M68K_OP_BR_DISP_SIZE_WORD, make_int_16(ext2) + 2); set_insn_group(info, M68K_GRP_JUMP); set_insn_group(info, M68K_GRP_BRANCH_RELATIVE); }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx testb $0x1c, 0x28(%rdi) je 0x165457 movl 0x20(%rbx), %eax movq 0x8(%rbx), %rsi movq 0x10(%rbx), %rdi movl %eax, %ecx subl %edi, %ecx movl 0x2c(%rbx), %edx movl %edx, %r8d andl %ecx, %r8d leaq 0x2(%r8), %r9 movl $0x2a, %ecx cmpq %r9, %rsi jb 0x165391 movq (%rbx), %rcx movzbl 0x1(%rcx,%r8), %ecx andl $0x2f, %ecx leal 0x2(%rax), %r8d movl %r8d, 0x20(%rbx) subl %edi, %r8d andl %r8d, %edx leaq 0x2(%rdx), %rdi movl $0xaaaa, %r14d # imm = 0xAAAA cmpq %rdi, %rsi jb 0x1653bd movq (%rbx), %rsi movzwl (%rsi,%rdx), %edx rolw $0x8, %dx movzwl %dx, %r14d addl $0x4, %eax movl %eax, 0x20(%rbx) movq 0x18(%rbx), %rdi addl %ecx, 0x8(%rdi) movl $0x82, %esi callq 0xd43b1 movb $0x2, %al movb %al, 0x118(%rbx) movq $0x1, 0x110(%rbx) movl 0x24(%rbx), %ecx andl $0x7, %ecx incl %ecx movl %ecx, 0x30(%rbx) movswl %r14w, %ecx andl $0xffff0000, %ecx # imm = 0xFFFF0000 addl %r14d, %ecx addl $0x2, %ecx movabsq $0x1300000008, %rdx # imm = 0x1300000008 movq %rdx, 0x98(%rbx) movl %ecx, 0x8c(%rbx) movb %al, 0x90(%rbx) movzbl 0x17b(%rbx), %eax leal 0x1(%rax), %ecx movb %cl, 0x17b(%rbx) movb $0x1, 0x173(%rbx,%rax) movzbl 0x17b(%rbx), %eax leal 0x1(%rax), %ecx movb %cl, 0x17b(%rbx) movb $0x7, 0x173(%rbx,%rax) addq $0x8, %rsp popq %rbx popq %r14 retq movl 0x24(%rbx), %edx movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x168599
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68020_cprestore
static void d68020_cprestore(m68k_info *info) { cs_m68k* ext; LIMIT_CPU_TYPES(info, M68020_PLUS); ext = build_init_op(info, M68K_INS_FRESTORE, 1, 0); get_ea_mode_op(info, &ext->operands[0], info->ir, 1); }
pushq %rbx movq %rdi, %rbx testb $0x1c, 0x28(%rdi) je 0x165a17 movq 0x18(%rbx), %rdi movl $0xbd, %esi callq 0xd43b1 leaq 0x30(%rbx), %rsi movb $0x1, 0x118(%rbx) movq $0x1, 0x110(%rbx) movl 0x24(%rbx), %edx movq %rbx, %rdi movl $0x1, %ecx popq %rbx jmp 0x168746 movl 0x24(%rbx), %edx movq %rbx, %rdi xorl %esi, %esi popq %rbx jmp 0x168599
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68020_cpscc
static void d68020_cpscc(m68k_info *info) { cs_m68k* ext; LIMIT_CPU_TYPES(info, M68020_PLUS); ext = build_init_op(info, M68K_INS_FSF, 1, 1); // these are all in row with the extension so just doing a add here is fine info->inst->Opcode += (read_imm_16(info) & 0x2f); get_ea_mode_op(info, &ext->operands[0], info->ir, 1); }
pushq %rbx movq %rdi, %rbx testb $0x1c, 0x28(%rdi) je 0x165ae9 movq 0x18(%rbx), %rdi movl $0xc8, %esi callq 0xd43b1 leaq 0x30(%rbx), %rsi movb $0x1, 0x118(%rbx) movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x110(%rbx) movl 0x20(%rbx), %eax movl %eax, %edx subl 0x10(%rbx), %edx andl 0x2c(%rbx), %edx leaq 0x2(%rdx), %rdi movl $0x2a, %ecx cmpq %rdi, 0x8(%rbx) jb 0x165acb movq (%rbx), %rcx movzbl 0x1(%rcx,%rdx), %ecx andl $0x2f, %ecx addl $0x2, %eax movl %eax, 0x20(%rbx) movq 0x18(%rbx), %rax addl %ecx, 0x8(%rax) movl 0x24(%rbx), %edx movq %rbx, %rdi movl $0x1, %ecx popq %rbx jmp 0x168746 movl 0x24(%rbx), %edx movq %rbx, %rdi xorl %esi, %esi popq %rbx jmp 0x168599
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68020_cptrapcc_16
static void d68020_cptrapcc_16(m68k_info *info) { uint extension1, extension2; cs_m68k_op* op0; cs_m68k* ext; LIMIT_CPU_TYPES(info, M68020_PLUS); extension1 = read_imm_16(info); extension2 = read_imm_16(info); ext = build_init_op(info, M68K_INS_FTRAPF, 1, 2); // these are all in row with the extension so just doing a add here is fine info->inst->Opcode += (extension1 & 0x2f); op0 = &ext->operands[0]; op0->address_mode = M68K_AM_IMMEDIATE; op0->type = M68K_OP_IMM; op0->imm = extension2; }
pushq %rbp pushq %r14 pushq %rbx movq %rdi, %rbx testb $0x1c, 0x28(%rdi) je 0x165c25 movl 0x20(%rbx), %eax movq 0x8(%rbx), %rdx movq 0x10(%rbx), %rsi movl %eax, %r8d subl %esi, %r8d movl 0x2c(%rbx), %ecx movl %ecx, %edi andl %r8d, %edi leaq 0x2(%rdi), %r8 movl $0x2a, %ebp cmpq %r8, %rdx jb 0x165bb3 movq (%rbx), %r8 movzbl 0x1(%r8,%rdi), %ebp andl $0x2f, %ebp leal 0x2(%rax), %edi movl %edi, 0x20(%rbx) subl %esi, %edi andl %edi, %ecx leaq 0x2(%rcx), %rsi movl $0xaaaa, %r14d # imm = 0xAAAA cmpq %rsi, %rdx jb 0x165bdb movq (%rbx), %rdx movzwl (%rdx,%rcx), %ecx rolw $0x8, %cx movzwl %cx, %r14d addl $0x4, %eax movl %eax, 0x20(%rbx) movq 0x18(%rbx), %rdi movl $0xee, %esi callq 0xd43b1 movb $0x1, 0x118(%rbx) movabsq $0x200000001, %rax # imm = 0x200000001 movq %rax, 0x110(%rbx) movq 0x18(%rbx), %rax addl %ebp, 0x8(%rax) movabsq $0x1200000002, %rax # imm = 0x1200000002 movq %rax, 0x60(%rbx) movq %r14, 0x30(%rbx) popq %rbx popq %r14 popq %rbp retq movl 0x24(%rbx), %edx movq %rbx, %rdi xorl %esi, %esi popq %rbx popq %r14 popq %rbp jmp 0x168599
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68000_dbcc
static unsigned int peek_imm_16(const m68k_info *info) { return m68k_read_safe_16((info), (info)->pc); }
movl 0x20(%rdi), %eax movl %eax, %edx subl 0x10(%rdi), %edx andl 0x2c(%rdi), %edx leaq 0x2(%rdx), %rsi movl $0xaaaa, %ecx # imm = 0xAAAA cmpq %rsi, 0x8(%rdi) jb 0x165d33 movq (%rdi), %rcx movzwl (%rcx,%rdx), %ecx rolw $0x8, %cx movzwl %cx, %ecx addl $0x2, %eax movl %eax, 0x20(%rdi) movswl %cx, %edx andl $0xffff0000, %edx # imm = 0xFFFF0000 orl %ecx, %edx movl 0x24(%rdi), %eax shrl $0x6, %eax andl $0x3c, %eax leaq 0x331a6c(%rip), %rcx # 0x4977c0 movl (%rax,%rcx), %esi jmp 0x1691a8
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68020_divl
static void d68020_divl(m68k_info *info) { uint extension, insn_signed; cs_m68k* ext; cs_m68k_op* op0; cs_m68k_op* op1; uint reg_0, reg_1; LIMIT_CPU_TYPES(info, M68020_PLUS); extension = read_imm_16(info); insn_signed = 0; if (BIT_B((extension))) insn_signed = 1; ext = build_init_op(info, insn_signed ? M68K_INS_DIVS : M68K_INS_DIVU, 2, 4); op0 = &ext->operands[0]; op1 = &ext->operands[1]; get_ea_mode_op(info, op0, info->ir, 4); reg_0 = extension & 7; reg_1 = (extension >> 12) & 7; op1->address_mode = M68K_AM_NONE; op1->type = M68K_OP_REG_PAIR; op1->reg_pair.reg_0 = reg_0; op1->reg_pair.reg_1 = reg_1; if ((reg_0 == reg_1) || !BIT_A(extension)) { op1->type = M68K_OP_REG; op1->reg = M68K_REG_D0 + reg_1; } }
pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx testb $0x1c, 0x28(%rdi) je 0x165e81 movl 0x20(%rbx), %eax movl %eax, %ecx subl 0x10(%rbx), %ecx andl 0x2c(%rbx), %ecx leaq 0x2(%rcx), %rdx movl $0xaaaa, %ebp # imm = 0xAAAA cmpq %rdx, 0x8(%rbx) jb 0x165df5 movq (%rbx), %rdx movzwl (%rdx,%rcx), %ecx rolw $0x8, %cx movzwl %cx, %ebp addl $0x2, %eax movl %eax, 0x20(%rbx) xorl %eax, %eax btl $0xb, %ebp setae %al leal 0x4c(,%rax,2), %esi movq 0x18(%rbx), %rdi callq 0xd43b1 leaq 0x30(%rbx), %rsi movb $0x2, 0x118(%rbx) movabsq $0x400000001, %rax # imm = 0x400000001 movq %rax, 0x110(%rbx) movl 0x24(%rbx), %edx movq %rbx, %rdi movl $0x4, %ecx callq 0x168746 movl %ebp, %ecx andl $0x7, %ecx movl %ebp, %eax shrl $0xc, %eax andl $0x7, %eax movq $0x7, 0x98(%rbx) movl %ecx, 0x68(%rbx) movl %eax, 0x6c(%rbx) cmpl %eax, %ecx setne %cl shrl $0xa, %ebp testb %cl, %bpl jne 0x165e7a movl $0x1, 0x98(%rbx) incl %eax movl %eax, 0x68(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq movl 0x24(%rbx), %edx movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x168599
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68000_lsr_r_32
static void d68000_lsr_r_32(m68k_info *info) { build_r(info, M68K_INS_LSR, 4); }
pushq %rbx movq %rdi, %rbx movq 0x18(%rdi), %rdi movl $0x118, %esi # imm = 0x118 callq 0xd43b1 movb $0x2, 0x118(%rbx) movabsq $0x400000001, %rax # imm = 0x400000001 movq %rax, 0x110(%rbx) movl $0x1, %eax movl %eax, 0x64(%rbx) movl 0x24(%rbx), %ecx movl %ecx, %edx shrl $0x9, %edx andl $0x7, %edx incl %edx movl %edx, 0x30(%rbx) movl %eax, 0x9c(%rbx) andl $0x7, %ecx incl %ecx movl %ecx, 0x68(%rbx) popq %rbx retq
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68000_move_to_usp
static void d68000_move_to_usp(m68k_info *info) { cs_m68k_op* op0; cs_m68k_op* op1; cs_m68k* ext = build_init_op(info, M68K_INS_MOVE, 2, 0); op0 = &ext->operands[0]; op1 = &ext->operands[1]; op0->address_mode = M68K_AM_NONE; op0->reg = M68K_REG_A0 + (info->ir & 7); op1->address_mode = M68K_AM_NONE; op1->reg = M68K_REG_USP; }
pushq %rbx movq %rdi, %rbx movq 0x18(%rdi), %rdi movl $0x119, %esi # imm = 0x119 callq 0xd43b1 movb $0x2, 0x118(%rbx) movq $0x1, 0x110(%rbx) movabsq $0x1e00000000, %rax # imm = 0x1E00000000 movq %rax, 0x64(%rbx) movl 0x24(%rbx), %eax andl $0x7, %eax addl $0x9, %eax movl %eax, 0x30(%rbx) movl $0x0, 0x9c(%rbx) popq %rbx retq
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
d68000_ror_r_32
static void d68000_ror_r_32(m68k_info *info) { build_r(info, M68K_INS_ROR, 4); }
pushq %rbx movq %rdi, %rbx movq 0x18(%rdi), %rdi movl $0x13d, %esi # imm = 0x13D callq 0xd43b1 movb $0x2, 0x118(%rbx) movabsq $0x400000001, %rax # imm = 0x400000001 movq %rax, 0x110(%rbx) movl $0x1, %eax movl %eax, 0x64(%rbx) movl 0x24(%rbx), %ecx movl %ecx, %edx shrl $0x9, %edx andl $0x7, %edx incl %edx movl %edx, 0x30(%rbx) movl %eax, 0x9c(%rbx) andl $0x7, %ecx incl %ecx movl %ecx, 0x68(%rbx) popq %rbx retq
/google[P]bloaty/third_party/capstone/arch/M68K/M68KDisassembler.c
printMemOperand2
static void printMemOperand2(MCInst *MI, unsigned OpNo, SStream *O) { MCOperand *Op = MCInst_getOperand(MI, OpNo); int64_t Val = MCOperand_getImm(Op); uint16_t offset; unsigned basereg; cs_tms320c64x *tms320c64x; basereg = Val & 0x7f; offset = (Val >> 7) & 0x7fff; SStream_concat(O, "*+%s[0x%x]", getRegisterName(basereg), offset); if (MI->csh->detail) { tms320c64x = &MI->flat_insn->detail->tms320c64x; tms320c64x->operands[tms320c64x->op_count].type = TMS320C64X_OP_MEM; tms320c64x->operands[tms320c64x->op_count].mem.base = basereg; tms320c64x->operands[tms320c64x->op_count].mem.unit = 2; tms320c64x->operands[tms320c64x->op_count].mem.disp = offset; tms320c64x->operands[tms320c64x->op_count].mem.disptype = TMS320C64X_MEM_DISP_CONSTANT; tms320c64x->operands[tms320c64x->op_count].mem.direction = TMS320C64X_MEM_DIR_FW; tms320c64x->operands[tms320c64x->op_count].mem.modify = TMS320C64X_MEM_MOD_NO; tms320c64x->op_count++; } }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %r14 movl $0x1, %esi callq 0xd43bf movq %rax, %rdi callq 0xd4410 movq %rax, %rbx movl %ebx, %r12d andl $0x7f, %r12d shrl $0x7, %ebx andl $0x7fff, %ebx # imm = 0x7FFF leal -0x1(%r12), %eax leaq 0x32bd5f(%rip), %rcx # 0x498310 movzwl (%rcx,%rax,2), %eax leaq 0x47e3f4(%rip), %rdx # 0x5ea9b0 addq %rax, %rdx leaq 0x32c43d(%rip), %rsi # 0x498a03 movq %r15, %rdi movl %ebx, %ecx xorl %eax, %eax callq 0xd44d5 movq 0x320(%r14), %rax cmpl $0x0, 0x60(%rax) je 0x16c62a movq 0x310(%r14), %rax movq 0xf0(%rax), %rax movzbl 0x58(%rax), %ecx leal 0x1(%rcx), %edx shll $0x5, %ecx movl $0x3, 0x5c(%rax,%rcx) movl %r12d, 0x60(%rax,%rcx) movl $0x2, 0x68(%rax,%rcx) movl %ebx, 0x64(%rax,%rcx) movabsq $0x100000001, %rsi # imm = 0x100000001 movq %rsi, 0x70(%rax,%rcx) movl $0x1, 0x78(%rax,%rcx) movb %dl, 0x58(%rax) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
/google[P]bloaty/third_party/capstone/arch/TMS320C64x/TMS320C64xInstPrinter.c
TMS320C64x_reg_name
const char *TMS320C64x_reg_name(csh handle, unsigned int reg) { #ifndef CAPSTONE_DIET if (reg >= ARR_SIZE(reg_name_maps)) return NULL; return reg_name_maps[reg].name; #else return NULL; #endif }
cmpl $0x59, %esi jbe 0x16c640 xorl %eax, %eax retq movl %esi, %eax shlq $0x4, %rax leaq 0x40c063(%rip), %rcx # 0x5786b0 movq 0x8(%rax,%rcx), %rax retq
/google[P]bloaty/third_party/capstone/arch/TMS320C64x/TMS320C64xMapping.c
TMS320C64x_get_insn_id
void TMS320C64x_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id) { unsigned short i; i = insn_find(insns, ARR_SIZE(insns), id, &h->insn_cache); if (i != 0) { insn->id = insns[i].mapid; if (h->detail) { #ifndef CAPSTONE_DIET memcpy(insn->detail->regs_read, insns[i].regs_use, sizeof(insns[i].regs_use)); insn->detail->regs_read_count = (uint8_t)count_positive(insns[i].regs_use); memcpy(insn->detail->regs_write, insns[i].regs_mod, sizeof(insns[i].regs_mod)); insn->detail->regs_write_count = (uint8_t)count_positive(insns[i].regs_mod); memcpy(insn->detail->groups, insns[i].groups, sizeof(insns[i].groups)); insn->detail->groups_count = (uint8_t)count_positive8(insns[i].groups); if (insns[i].branch || insns[i].indirect_branch) { insn->detail->groups[insn->detail->groups_count] = TMS320C64X_GRP_JUMP; insn->detail->groups_count++; } #endif } } }
pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 leaq 0x70(%rdi), %rcx leaq 0x47e806(%rip), %r14 # 0x5eaeb0 movq %r14, %rdi movl $0x103, %esi # imm = 0x103 callq 0xd4728 testw %ax, %ax je 0x16c76f movzwl %ax, %eax imulq $0x4e, %rax, %rax movzwl 0x2(%rax,%r14), %ecx movl %ecx, (%rbx) cmpl $0x0, 0x60(%r15) je 0x16c76f addq %rax, %r14 movq 0xf0(%rbx), %rax leaq 0x4(%r14), %rdi movq 0x14(%r14), %rcx movq %rcx, 0x10(%rax) movups 0x4(%r14), %xmm0 movups %xmm0, (%rax) callq 0xd4819 movq 0xf0(%rbx), %rcx movb %al, 0x20(%rcx) leaq 0x1c(%r14), %rdi movq 0x3c(%r14), %rax movq %rax, 0x42(%rcx) movups 0x1c(%r14), %xmm0 movups 0x2c(%r14), %xmm1 movups %xmm1, 0x32(%rcx) movups %xmm0, 0x22(%rcx) callq 0xd4819 movq 0xf0(%rbx), %rcx movb %al, 0x4a(%rcx) leaq 0x44(%r14), %rdi movq 0x44(%r14), %rax movq %rax, 0x4b(%rcx) callq 0xd4828 movq 0xf0(%rbx), %rcx movb %al, 0x53(%rcx) cmpb $0x0, 0x4c(%r14) jne 0x16c75d cmpb $0x1, 0x4d(%r14) jne 0x16c76f movzbl %al, %eax movb $0x1, 0x4b(%rcx,%rax) movq 0xf0(%rbx), %rax incb 0x53(%rax) popq %rbx popq %r14 popq %r15 retq
/google[P]bloaty/third_party/capstone/arch/TMS320C64x/TMS320C64xMapping.c
M680X_get_insn_id
void M680X_get_insn_id(cs_struct *handle, cs_insn *insn, unsigned int id) { const m680x_info *const info = (const m680x_info *)handle->printer_info; const cpu_tables *cpu = info->cpu; uint8_t insn_prefix = (id >> 8) & 0xff; int index; int i; insn->id = M680X_INS_ILLGL; for (i = 0; i < ARR_SIZE(cpu->pageX_prefix); ++i) { if (cpu->pageX_table_size[i] == 0 || (cpu->inst_pageX_table[i] == NULL)) break; if (cpu->pageX_prefix[i] == insn_prefix) { index = binary_search(cpu->inst_pageX_table[i], cpu->pageX_table_size[i], id & 0xff); insn->id = (index >= 0) ? cpu->inst_pageX_table[i][index].insn : M680X_INS_ILLGL; return; } } if (insn_prefix != 0) return; insn->id = cpu->inst_page1_table[id].insn; if (insn->id != M680X_INS_ILLGL) return; // Check if opcode byte is present in an overlay table for (i = 0; i < ARR_SIZE(cpu->overlay_table_size); ++i) { if (cpu->overlay_table_size[i] == 0 || (cpu->inst_overlay_table[i] == NULL)) break; if ((index = binary_search(cpu->inst_overlay_table[i], cpu->overlay_table_size[i], id & 0xff)) >= 0) { insn->id = cpu->inst_overlay_table[i][index].insn; return; } } }
pushq %rbx movq 0x10(%rdi), %rax movq 0xf0(%rax), %rcx movl %edx, %edi shrl $0x8, %edi movl $0x9f, (%rsi) movq $-0x3, %r9 movq 0x60(%rcx,%r9,8), %r8 testq %r8, %r8 je 0x16c80e movq 0x48(%rcx,%r9,8), %rax testq %rax, %rax je 0x16c80e cmpb %dil, 0x2b(%rcx,%r9) je 0x16c8b3 incq %r9 jne 0x16c7ea testl $0xff00, %edx # imm = 0xFF00 jne 0x16c91a movq (%rcx), %rax movl %edx, %edi movl $0x1ff, %r8d # imm = 0x1FF andl (%rax,%rdi,4), %r8d movl %r8d, (%rsi) cmpl $0x9f, %r8d jne 0x16c91a movzbl %dl, %edx xorl %r8d, %r8d movq 0x18(%rcx,%r8,8), %r11 testq %r11, %r11 je 0x16c91a movq 0x8(%rcx,%r8,8), %rax testq %rax, %rax je 0x16c91a movl $0xffffffff, %edi # imm = 0xFFFFFFFF testl %r11d, %r11d jle 0x16c8a1 decl %r11d xorl %r9d, %r9d movl %r11d, %r10d movl %r11d, %ebx shrl $0x1f, %ebx addl %r11d, %ebx sarl %ebx movslq %ebx, %r11 movzbl (%rax,%r11,4), %r11d cmpl %edx, %r11d jae 0x16c88d incl %ebx movl %ebx, %r9d jmp 0x16c894 je 0x16c89f decl %ebx movl %ebx, %r10d leal (%r10,%r9), %r11d cmpl %r10d, %r9d jle 0x16c86e jmp 0x16c8a1 movl %ebx, %edi testl %edi, %edi jns 0x16c904 leaq 0x1(%r8), %rax testq %r8, %r8 movq %rax, %r8 je 0x16c83f jmp 0x16c91a movl $0xffffffff, %edi # imm = 0xFFFFFFFF testl %r8d, %r8d jle 0x16c900 decl %r8d movzbl %dl, %ecx xorl %edx, %edx movl %r8d, %r9d movl %r8d, %r10d shrl $0x1f, %r10d addl %r8d, %r10d sarl %r10d movslq %r10d, %r8 movzbl (%rax,%r8,4), %r8d cmpl %ecx, %r8d jae 0x16c8ea incl %r10d movl %r10d, %edx jmp 0x16c8f2 je 0x16c8fd decl %r10d movl %r10d, %r9d leal (%r9,%rdx), %r8d cmpl %r9d, %edx jle 0x16c8c8 jmp 0x16c900 movl %r10d, %edi testl %edi, %edi js 0x16c913 movl %edi, %ecx movl (%rax,%rcx,4), %eax shrl $0x8, %eax andl $0x1ff, %eax # imm = 0x1FF jmp 0x16c918 movl $0x9f, %eax movl %eax, (%rsi) popq %rbx retq
/google[P]bloaty/third_party/capstone/arch/M680X/M680XDisassembler.c
M680X_reg_access
void M680X_reg_access(const cs_insn *insn, cs_regs regs_read, uint8_t *regs_read_count, cs_regs regs_write, uint8_t *regs_write_count) { if (insn->detail == NULL) { *regs_read_count = 0; *regs_write_count = 0; } else { *regs_read_count = insn->detail->regs_read_count; *regs_write_count = insn->detail->regs_write_count; memcpy(regs_read, insn->detail->regs_read, *regs_read_count * sizeof(insn->detail->regs_read[0])); memcpy(regs_write, insn->detail->regs_write, *regs_write_count * sizeof(insn->detail->regs_write[0])); } }
pushq %r15 pushq %r14 pushq %rbx movq %r8, %rbx movq 0xf0(%rdi), %rax testq %rax, %rax je 0x16d6cf movq %rcx, %r14 movq %rdi, %r15 movb 0x20(%rax), %al movb %al, (%rdx) movq 0xf0(%rdi), %rax movb 0x4a(%rax), %al movb %al, (%rbx) movq 0xf0(%rdi), %rax movzbl (%rdx), %edx addl %edx, %edx movq %rsi, %rdi movq %rax, %rsi callq 0x6d5a0 movq 0xf0(%r15), %rsi addq $0x22, %rsi movzbl (%rbx), %edx addl %edx, %edx movq %r14, %rdi popq %rbx popq %r14 popq %r15 jmp 0x6d5a0 xorl %eax, %eax movb %al, (%rdx) movb %al, (%rbx) popq %rbx popq %r14 popq %r15 retq
/google[P]bloaty/third_party/capstone/arch/M680X/M680XDisassembler.c
relative8_hdlr
static void relative8_hdlr(MCInst *MI, m680x_info *info, uint16_t *address) { int16_t offset = 0; read_byte_sign_extended(info, &offset, (*address)++); add_rel_operand(info, offset, *address + offset); add_insn_group(MI->flat_insn->detail, M680X_GRP_BRAREL); if ((info->insn != M680X_INS_BRA) && (info->insn != M680X_INS_BSR) && (info->insn != M680X_INS_BRN)) add_reg_to_rw_list(MI, M680X_REG_CC, READ); }
movzwl (%rdx), %ecx leal 0x1(%rcx), %eax movw %ax, (%rdx) movzwl 0xc(%rsi), %edx subq %rdx, %rcx cmpl 0x8(%rsi), %ecx jae 0x16d8bb movq (%rsi), %rdx movzbl (%rdx,%rcx), %ecx movl %ecx, %edx orl $0xffffff00, %edx # imm = 0xFFFFFF00 testb %cl, %cl movzbl %cl, %ecx cmovsl %edx, %ecx jmp 0x16d8bd xorl %ecx, %ecx movswl %cx, %ecx addl %ecx, %eax movzbl 0x15(%rsi), %edx leal 0x1(%rdx), %r8d movb %r8b, 0x15(%rsi) leaq (%rdx,%rdx,2), %rdx movl $0x6, 0x18(%rsi,%rdx,8) movb $0x0, 0x2c(%rsi,%rdx,8) movw %cx, 0x1e(%rsi,%rdx,8) movw %ax, 0x1c(%rsi,%rdx,8) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax testq %rax, %rax je 0x16d90b movzbl 0x53(%rax), %ecx leal 0x1(%rcx), %edx movb %dl, 0x53(%rax) movb $0x7, 0x4b(%rax,%rcx) movl 0xf8(%rsi), %eax addl $-0x44, %eax cmpl $0x3, %eax ja 0x16d91f cmpl $0x2, %eax je 0x16d91f retq movl $0x8, %esi movl $0x1, %edx jmp 0x16d6db
/google[P]bloaty/third_party/capstone/arch/M680X/M680XDisassembler.c
relative16_hdlr
static void relative16_hdlr(MCInst *MI, m680x_info *info, uint16_t *address) { uint16_t offset = 0; read_word(info, &offset, *address); *address += 2; add_rel_operand(info, (int16_t)offset, *address + offset); add_insn_group(MI->flat_insn->detail, M680X_GRP_BRAREL); if ((info->insn != M680X_INS_LBRA) && (info->insn != M680X_INS_LBSR) && (info->insn != M680X_INS_LBRN)) add_reg_to_rw_list(MI, M680X_REG_CC, READ); }
movzwl (%rdx), %eax movzwl 0xc(%rsi), %ecx movq %rax, %r8 subq %rcx, %r8 leaq 0x1(%r8), %rcx cmpl 0x8(%rsi), %ecx jae 0x16d95a movq (%rsi), %r9 movzbl (%r9,%r8), %r8d shll $0x8, %r8d movzbl (%r9,%rcx), %ecx orl %r8d, %ecx jmp 0x16d95c xorl %ecx, %ecx leal 0x2(%rax), %r8d movw %r8w, (%rdx) addl %ecx, %eax addl $0x2, %eax movzbl 0x15(%rsi), %edx leal 0x1(%rdx), %r8d movb %r8b, 0x15(%rsi) leaq (%rdx,%rdx,2), %rdx movl $0x6, 0x18(%rsi,%rdx,8) movb $0x0, 0x2c(%rsi,%rdx,8) movw %cx, 0x1e(%rsi,%rdx,8) movw %ax, 0x1c(%rsi,%rdx,8) movq 0x310(%rdi), %rax movq 0xf0(%rax), %rax testq %rax, %rax je 0x16d9b2 movzbl 0x53(%rax), %ecx leal 0x1(%rcx), %edx movb %dl, 0x53(%rax) movb $0x7, 0x4b(%rax,%rcx) movl $0xffffff47, %eax # imm = 0xFFFFFF47 addl 0xf8(%rsi), %eax cmpl $0x3, %eax jae 0x16d9c3 retq movl $0x8, %esi movl $0x1, %edx jmp 0x16d6db
/google[P]bloaty/third_party/capstone/arch/M680X/M680XDisassembler.c
absl::WebSafeBase64Escape[abi:cxx11](std::basic_string_view<char, std::char_traits<char>>)
std::string WebSafeBase64Escape(absl::string_view src) { std::string dest; strings_internal::Base64EscapeInternal( reinterpret_cast<const unsigned char*>(src.data()), src.size(), &dest, false, strings_internal::kWebSafeBase64Chars); return dest; }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) leaq 0x340dd2(%rip), %r8 # 0x4b2180 movq %rdx, %rdi movq %rbx, %rdx xorl %ecx, %ecx callq 0x171626 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x1713da movq (%r15), %rsi incq %rsi callq 0x6d6d0 movq %r14, %rdi callq 0x6dd70
/google[P]bloaty/third_party/abseil-cpp/absl/strings/escaping.cc
absl::StrCat[abi:cxx11](absl::AlphaNum const&, absl::AlphaNum const&)
std::string StrCat(const AlphaNum& a, const AlphaNum& b) { std::string result; // Use uint64_t to prevent size_t overflow. We assume it is not possible for // in memory strings to overflow a uint64_t. constexpr uint64_t kMaxSize = uint64_t{std::numeric_limits<size_t>::max()}; const uint64_t result_size = static_cast<uint64_t>(a.size()) + static_cast<uint64_t>(b.size()); ABSL_INTERNAL_CHECK(result_size <= kMaxSize, "size_t overflow"); absl::strings_internal::STLStringResizeUninitialized( &result, static_cast<size_t>(result_size)); char* const begin = &result[0]; char* out = begin; out = Append(out, a); out = Append(out, b); assert(out == begin + result.size()); return result; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq (%rdx), %rsi addq (%r13), %rsi xorl %edx, %edx callq 0x6d1f0 movq (%rbx), %r15 movq (%r13), %r12 testq %r12, %r12 je 0x174222 movq 0x8(%r13), %rsi movq %r15, %rdi movq %r12, %rdx callq 0x6d5a0 addq %r15, %r12 movq (%r14), %r13 testq %r13, %r13 je 0x17423c movq 0x8(%r14), %rsi movq %r12, %rdi movq %r13, %rdx callq 0x6d5a0 addq %r13, %r12 addq 0x8(%rbx), %r15 cmpq %r15, %r12 jne 0x174255 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x32d5eb(%rip), %rdi # 0x4a1847 leaq 0x32d536(%rip), %rsi # 0x4a1799 leaq 0x32d5a0(%rip), %rcx # 0x4a180a movl $0x4d, %edx callq 0x6d460 movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x17428a movq (%r15), %rsi incq %rsi callq 0x6d6d0 movq %r14, %rdi callq 0x6dd70
/google[P]bloaty/third_party/abseil-cpp/absl/strings/str_cat.cc
absl::substitute_internal::SubstituteAndAppendArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>> const*, unsigned long)
void SubstituteAndAppendArray( absl::Nonnull<std::string*> output, absl::string_view format, absl::Nullable<const absl::string_view*> args_array, size_t num_args) { // Determine total size needed. size_t size = 0; for (size_t i = 0; i < format.size(); i++) { if (format[i] == '$') { if (i + 1 >= format.size()) { #ifndef NDEBUG ABSL_RAW_LOG(FATAL, "Invalid absl::Substitute() format string: \"%s\".", absl::CEscape(format).c_str()); #endif return; } else if (absl::ascii_isdigit( static_cast<unsigned char>(format[i + 1]))) { int index = format[i + 1] - '0'; if (static_cast<size_t>(index) >= num_args) { #ifndef NDEBUG ABSL_RAW_LOG( FATAL, "Invalid absl::Substitute() format string: asked for \"$" "%d\", but only %d args were given. Full format string was: " "\"%s\".", index, static_cast<int>(num_args), absl::CEscape(format).c_str()); #endif return; } size += args_array[index].size(); ++i; // Skip next char. } else if (format[i + 1] == '$') { ++size; ++i; // Skip next char. } else { #ifndef NDEBUG ABSL_RAW_LOG(FATAL, "Invalid absl::Substitute() format string: \"%s\".", absl::CEscape(format).c_str()); #endif return; } } else { ++size; } } if (size == 0) return; // Build the string. size_t original_size = output->size(); ABSL_INTERNAL_CHECK( size <= std::numeric_limits<size_t>::max() - original_size, "size_t overflow"); strings_internal::STLStringResizeUninitializedAmortized(output, original_size + size); char* target = &(*output)[original_size]; for (size_t i = 0; i < format.size(); i++) { if (format[i] == '$') { if (absl::ascii_isdigit(static_cast<unsigned char>(format[i + 1]))) { const absl::string_view src = args_array[format[i + 1] - '0']; target = std::copy(src.begin(), src.end(), target); ++i; // Skip next char. } else if (format[i + 1] == '$') { *target++ = '$'; ++i; // Skip next char. } } else { *target++ = format[i]; } } assert(target == output->data() + output->size()); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, %r12 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 testq %rsi, %rsi je 0x174e89 movq %r8, %r13 xorl %esi, %esi xorl %eax, %eax movl $0x1, %ecx cmpb $0x24, (%rbx,%rax) jne 0x174e7c incq %rax cmpq %r14, %rax jae 0x174ff3 movzbl (%rbx,%rax), %ebp leal -0x30(%rbp), %edx cmpb $0x9, %dl ja 0x174e73 addl $-0x30, %ebp cmpq %r13, %rbp jae 0x1750af shlq $0x4, %rbp movq (%r12,%rbp), %rcx jmp 0x174e7c cmpl $0x24, %ebp jne 0x175051 addq %rcx, %rsi incq %rax cmpq %r14, %rax jb 0x174e3a jmp 0x174e8b xorl %esi, %esi testq %rsi, %rsi je 0x174f36 movq 0x8(%r15), %r13 addq %r13, %rsi jb 0x174f45 movq %r15, %rdi callq 0x17536a movq %r15, 0x30(%rsp) addq (%r15), %r13 testq %r14, %r14 je 0x174f21 xorl %eax, %eax movb (%rbx,%rax), %cl cmpb $0x24, %cl jne 0x174efb leaq 0x1(%rax), %r15 movzbl 0x1(%rbx,%rax), %ecx leal -0x30(%rcx), %edx cmpb $0x9, %dl ja 0x174f12 shll $0x4, %ecx movq -0x300(%r12,%rcx), %rbp testq %rbp, %rbp je 0x174ef6 addq %r12, %rcx movq -0x2f8(%rcx), %rsi movq %r13, %rdi movq %rbp, %rdx callq 0x6dc70 addq %rbp, %r13 jmp 0x174f05 movb %cl, (%r13) incq %r13 movq %rax, %r15 incq %r15 movq %r15, %rax cmpq %r14, %r15 jb 0x174eb8 jmp 0x174f21 cmpl $0x24, %ecx jne 0x174f02 movb $0x24, (%r13) incq %r13 jmp 0x174f05 movq 0x30(%rsp), %rcx movq (%rcx), %rax addq 0x8(%rcx), %rax cmpq %rax, %r13 jne 0x175117 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x20(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x32d050(%rip), %rsi # 0x4a1fa5 leaq 0x32d092(%rip), %rdx # 0x4a1fee leaq 0x10(%rsp), %rdi callq 0x7b4ac leaq 0x48(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x32d079(%rip), %rsi # 0x4a1fef leaq 0x32d081(%rip), %rdx # 0x4a1ffe leaq 0x38(%rsp), %rdi callq 0x7b4ac movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx leaq 0x10(%rsp), %rdi callq 0x6d200 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0x174fb2 movq 0x48(%rsp), %rsi incq %rsi callq 0x6d6d0 leaq 0x47b2d7(%rip), %rax # 0x5f0290 movq (%rax), %rax leaq 0x32ce2a(%rip), %rsi # 0x4a1ded leaq 0x10(%rsp), %rcx movl $0x3, %edi movl $0x5a, %edx callq *%rax leaq 0x32aaf4(%rip), %rdi # 0x49facf leaq 0x32ce0b(%rip), %rsi # 0x4a1ded leaq 0x32cea8(%rip), %rcx # 0x4a1e91 movl $0x5a, %edx callq 0x6d460 leaq 0x10(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x170755 movq (%r15), %r8 leaq 0x32ce43(%rip), %rsi # 0x4a1e53 leaq 0x32ce4a(%rip), %rcx # 0x4a1e61 movl $0x3, %edi movl $0x31, %edx xorl %eax, %eax callq 0x2144bd leaq 0x10(%rsp), %rdi callq 0x6df28 leaq 0x32aa96(%rip), %rdi # 0x49facf leaq 0x32cdad(%rip), %rsi # 0x4a1ded leaq 0x32ce4a(%rip), %rcx # 0x4a1e91 movl $0x31, %edx callq 0x6d460 leaq 0x10(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x170755 movq (%r15), %r8 leaq 0x32cde5(%rip), %rsi # 0x4a1e53 leaq 0x32cdec(%rip), %rcx # 0x4a1e61 movl $0x3, %edi movl $0x4b, %edx xorl %eax, %eax callq 0x2144bd leaq 0x10(%rsp), %rdi callq 0x6df28 leaq 0x32aa38(%rip), %rdi # 0x49facf leaq 0x32cd4f(%rip), %rsi # 0x4a1ded leaq 0x32cdec(%rip), %rcx # 0x4a1e91 movl $0x4b, %edx callq 0x6d460 leaq 0x10(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x170755 movq (%r15), %rax movq %rax, (%rsp) leaq 0x32cd83(%rip), %rsi # 0x4a1e53 leaq 0x32ce57(%rip), %rcx # 0x4a1f2e movl $0x3, %edi movl $0x3e, %edx movl %ebp, %r8d movl %r13d, %r9d xorl %eax, %eax callq 0x2144bd leaq 0x10(%rsp), %rdi callq 0x6df28 leaq 0x32a9d0(%rip), %rdi # 0x49facf leaq 0x32cce7(%rip), %rsi # 0x4a1ded leaq 0x32cd84(%rip), %rcx # 0x4a1e91 movl $0x3e, %edx callq 0x6d460 leaq 0x32cee1(%rip), %rdi # 0x4a1fff leaq 0x32ccc8(%rip), %rsi # 0x4a1ded leaq 0x32cd65(%rip), %rcx # 0x4a1e91 movl $0x6d, %edx callq 0x6d460 jmp 0x17513a jmp 0x17513a movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi jne 0x175178 jmp 0x17518a jmp 0x17516b movq %rax, %rbx movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0x17516e movq 0x48(%rsp), %rsi incq %rsi callq 0x6d6d0 jmp 0x17516e movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %r14, %rdi je 0x17518a movq 0x20(%rsp), %rsi incq %rsi callq 0x6d6d0 jmp 0x17518a movq %rax, %rbx movq %rbx, %rdi callq 0x6dd70
/google[P]bloaty/third_party/abseil-cpp/absl/strings/substitute.cc
absl::strings_internal::ParsedFloat absl::strings_internal::ParseFloat<10>(char const*, char const*, absl::chars_format)
strings_internal::ParsedFloat ParseFloat(const char* begin, const char* end, chars_format format_flags) { strings_internal::ParsedFloat result; // Exit early if we're given an empty range. if (begin == end) return result; // Handle the infinity and NaN cases. if (ParseInfinityOrNan(begin, end, &result)) { return result; } const char* const mantissa_begin = begin; while (begin < end && *begin == '0') { ++begin; // skip leading zeros } uint64_t mantissa = 0; int exponent_adjustment = 0; bool mantissa_is_inexact = false; int pre_decimal_digits = ConsumeDigits<base>( begin, end, MantissaDigitsMax<base>(), &mantissa, &mantissa_is_inexact); begin += pre_decimal_digits; int digits_left; if (pre_decimal_digits >= DigitLimit<base>()) { // refuse to parse pathological inputs return result; } else if (pre_decimal_digits > MantissaDigitsMax<base>()) { // We dropped some non-fraction digits on the floor. Adjust our exponent // to compensate. exponent_adjustment = static_cast<int>(pre_decimal_digits - MantissaDigitsMax<base>()); digits_left = 0; } else { digits_left = static_cast<int>(MantissaDigitsMax<base>() - pre_decimal_digits); } if (begin < end && *begin == '.') { ++begin; if (mantissa == 0) { // If we haven't seen any nonzero digits yet, keep skipping zeros. We // have to adjust the exponent to reflect the changed place value. const char* begin_zeros = begin; while (begin < end && *begin == '0') { ++begin; } int zeros_skipped = static_cast<int>(begin - begin_zeros); if (zeros_skipped >= DigitLimit<base>()) { // refuse to parse pathological inputs return result; } exponent_adjustment -= static_cast<int>(zeros_skipped); } int post_decimal_digits = ConsumeDigits<base>( begin, end, digits_left, &mantissa, &mantissa_is_inexact); begin += post_decimal_digits; // Since `mantissa` is an integer, each significant digit we read after // the decimal point requires an adjustment to the exponent. "1.23e0" will // be stored as `mantissa` == 123 and `exponent` == -2 (that is, // "123e-2"). if (post_decimal_digits >= DigitLimit<base>()) { // refuse to parse pathological inputs return result; } else if (post_decimal_digits > digits_left) { exponent_adjustment -= digits_left; } else { exponent_adjustment -= post_decimal_digits; } } // If we've found no mantissa whatsoever, this isn't a number. if (mantissa_begin == begin) { return result; } // A bare "." doesn't count as a mantissa either. if (begin - mantissa_begin == 1 && *mantissa_begin == '.') { return result; } if (mantissa_is_inexact) { // We dropped significant digits on the floor. Handle this appropriately. if (base == 10) { // If we truncated significant decimal digits, store the full range of the // mantissa for future big integer math for exact rounding. result.subrange_begin = mantissa_begin; result.subrange_end = begin; } else if (base == 16) { // If we truncated hex digits, reflect this fact by setting the low // ("sticky") bit. This allows for correct rounding in all cases. mantissa |= 1; } } result.mantissa = mantissa; const char* const exponent_begin = begin; result.literal_exponent = 0; bool found_exponent = false; if (AllowExponent(format_flags) && begin < end && IsExponentCharacter<base>(*begin)) { bool negative_exponent = false; ++begin; if (begin < end && *begin == '-') { negative_exponent = true; ++begin; } else if (begin < end && *begin == '+') { ++begin; } const char* const exponent_digits_begin = begin; // Exponent is always expressed in decimal, even for hexadecimal floats. begin += ConsumeDigits<10>(begin, end, kDecimalExponentDigitsMax, &result.literal_exponent, nullptr); if (begin == exponent_digits_begin) { // there were no digits where we expected an exponent. We failed to read // an exponent and should not consume the 'e' after all. Rewind 'begin'. found_exponent = false; begin = exponent_begin; } else { found_exponent = true; if (negative_exponent) { result.literal_exponent = -result.literal_exponent; } } } if (!found_exponent && RequireExponent(format_flags)) { // Provided flags required an exponent, but none was found. This results // in a failure to scan. return result; } // Success! result.type = strings_internal::FloatType::kNumber; if (result.mantissa > 0) { result.exponent = result.literal_exponent + (DigitMagnitude<base>() * exponent_adjustment); } else { result.exponent = 0; } result.end = begin; return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movl $0x0, 0x10(%rdi) movups %xmm0, 0x18(%rdi) movq $0x0, 0x28(%rdi) cmpq %rdx, %rsi je 0x178049 movl %ecx, %ebp movq %rdx, %r14 movq %rsi, %r12 movq %rsi, %rdi movq %rdx, %rsi movq %rbx, %rdx callq 0x17795c testb %al, %al jne 0x178049 movq %r12, %r15 cmpq %r14, %r12 jae 0x177e6b movq %r12, %r15 cmpb $0x30, (%r15) jne 0x177e6b incq %r15 cmpq %r14, %r15 jne 0x177e5a movq %r14, %r15 movl %ebp, 0xc(%rsp) leaq 0x10(%rsp), %rcx movq $0x0, (%rcx) leaq 0x7(%rsp), %r8 movb $0x0, (%r8) movl $0x13, %r13d movq %r15, %rdi movq %r14, %rsi movl $0x13, %edx callq 0x177a9c cmpl $0x2faf07f, %eax # imm = 0x2FAF07F jg 0x178049 movslq %eax, %rcx addq %rcx, %r15 subl %eax, %r13d xorl %ecx, %ecx cmpl $0x14, %eax cmovgel %ecx, %r13d leal -0x13(%rax), %esi cmovll %ecx, %esi cmpq %r14, %r15 jae 0x177f5a cmpb $0x2e, (%r15) jne 0x177f5a incq %r15 cmpq $0x0, 0x10(%rsp) je 0x177ee4 movl %esi, 0x8(%rsp) movq %r15, %rbp jmp 0x177f1c movq %r15, %rbp cmpq %r14, %r15 jae 0x177f00 movq %r15, %rbp cmpb $0x30, (%rbp) jne 0x177f00 incq %rbp cmpq %r14, %rbp jb 0x177eef movq %r14, %rbp movl %ebp, %ecx subl %r15d, %ecx xorl %eax, %eax cmpl $0x2faf080, %ecx # imm = 0x2FAF080 cmovll %ecx, %eax jge 0x178049 subl %eax, %esi movl %esi, 0x8(%rsp) leaq 0x10(%rsp), %rcx leaq 0x7(%rsp), %r8 movq %rbp, %rdi movq %r14, %rsi movl %r13d, %edx callq 0x177a9c cmpl %r13d, %eax cmovll %eax, %r13d xorl %ecx, %ecx cmpl $0x2faf080, %eax # imm = 0x2FAF080 cmovll %r13d, %ecx movl 0x8(%rsp), %esi jge 0x178049 cltq addq %rax, %rbp subl %ecx, %esi movq %rbp, %r15 movq %r15, %rax subq %r12, %rax je 0x178049 cmpq $0x1, %rax jne 0x177f77 cmpb $0x2e, (%r12) je 0x178049 cmpb $0x1, 0x7(%rsp) jne 0x177f86 movq %r12, 0x18(%rbx) movq %r15, 0x20(%rbx) movq 0x10(%rsp), %rax movq %rax, (%rbx) movl $0x0, 0xc(%rbx) movl 0xc(%rsp), %edx andl $0x3, %edx xorl %ecx, %ecx cmpl $0x2, %edx je 0x17802a cmpq %r14, %r15 jae 0x17802a movb (%r15), %al andb $-0x21, %al cmpb $0x45, %al jne 0x177fdb movl %edx, 0xc(%rsp) leaq 0xc(%rbx), %r12 leaq 0x1(%r15), %r13 cmpq %r14, %r13 movl %esi, 0x8(%rsp) jae 0x177fe9 movb (%r13), %al cmpb $0x2d, %al jne 0x177fdf leaq 0x2(%r15), %r13 movb $0x1, %bpl jmp 0x177feb xorl %ecx, %ecx jmp 0x17802a leaq 0x2(%r15), %rcx cmpb $0x2b, %al cmoveq %rcx, %r13 xorl %ebp, %ebp movq %r13, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x177be3 movslq %eax, %rcx addq %rcx, %r13 testl %ecx, %ecx setne %cl cmovneq %r13, %r15 testb %bpl, %bpl je 0x178022 testl %eax, %eax movl 0x8(%rsp), %esi je 0x17801c negl (%r12) movq %r13, %r15 movl 0xc(%rsp), %edx jmp 0x17802a movl 0xc(%rsp), %edx movl 0x8(%rsp), %esi cmpl $0x1, %edx jne 0x178033 testb %cl, %cl je 0x178049 xorl %eax, %eax movl %eax, 0x10(%rbx) addl 0xc(%rbx), %esi cmpq $0x0, (%rbx) cmovel %eax, %esi movl %esi, 0x8(%rbx) movq %r15, 0x28(%rbx) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/google[P]bloaty/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc
absl::FindLongestCommonSuffix(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>)
absl::string_view FindLongestCommonSuffix(absl::string_view a, absl::string_view b) { const absl::string_view::size_type limit = std::min(a.size(), b.size()); if (limit == 0) return absl::string_view(); const char* pa = a.data() + a.size() - 1; const char* pb = b.data() + b.size() - 1; absl::string_view::size_type count = (unsigned) 0; while (count < limit && *pa == *pb) { --pa; --pb; ++count; } return absl::string_view(++pa, count); }
cmpq %rdi, %rdx movq %rdi, %r8 cmovbq %rdx, %r8 testq %r8, %r8 je 0x1784b4 movq %rdx, %rax leaq (%rsi,%rdi), %rdx subq %r8, %rdi addq %rsi, %rdi addq %rax, %rcx decq %rcx xorl %eax, %eax movb -0x1(%rdx), %sil cmpb (%rcx), %sil jne 0x1784b8 decq %rdx incq %rax decq %rcx cmpq %rax, %r8 jne 0x178496 movq %rdi, %rdx movq %r8, %rax retq xorl %edx, %edx xorl %eax, %eax retq nopl (%rax)
/google[P]bloaty/third_party/abseil-cpp/absl/strings/match.cc
absl::debugging_internal::ParseRequirement(absl::debugging_internal::State*)
static bool ParseRequirement(State *state) { ComplexityGuard guard(state); if (guard.IsTooComplex()) return false; ParseState copy = state->parse_state; if (ParseOneCharToken(state, 'X') && ParseExpression(state) && Optional(ParseOneCharToken(state, 'N')) && // This logic backtracks cleanly if we eat an R but a valid type doesn't // follow it. (!ParseOneCharToken(state, 'R') || ParseTypeConstraint(state))) { return true; } state->parse_state = copy; if (ParseOneCharToken(state, 'T') && ParseType(state)) return true; state->parse_state = copy; if (ParseOneCharToken(state, 'Q') && ParseExpression(state)) return true; state->parse_state = copy; return false; }
pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl 0x14(%rdi), %eax movl 0x18(%rdi), %ecx leal 0x1(%rax), %edx movl %edx, 0x14(%rdi) leal 0x1(%rcx), %edx movl %edx, 0x18(%rdi) cmpl $0x100, %eax # imm = 0x100 setge %al cmpl $0x20000, %ecx # imm = 0x20000 setge %cl orb %al, %cl jne 0x17b8dc movups 0x1c(%rbx), %xmm0 movaps %xmm0, (%rsp) movq %rbx, %rdi movl $0x58, %esi callq 0x1792e6 testb %al, %al je 0x17b880 movq %rbx, %rdi callq 0x179d1d testb %al, %al je 0x17b880 movq %rbx, %rdi movl $0x4e, %esi callq 0x1792e6 movq %rbx, %rdi movl $0x52, %esi callq 0x1792e6 movb $0x1, %bpl testb %al, %al je 0x17b8de movq %rbx, %rdi callq 0x178c40 testb %al, %al jne 0x17b8de leaq 0x1c(%rbx), %r14 movaps (%rsp), %xmm0 movups %xmm0, (%r14) movq %rbx, %rdi movl $0x54, %esi callq 0x1792e6 testb %al, %al je 0x17b8ac movq %rbx, %rdi callq 0x17a74a movb $0x1, %bpl testb %al, %al jne 0x17b8de movaps (%rsp), %xmm0 movups %xmm0, (%r14) movq %rbx, %rdi movl $0x51, %esi callq 0x1792e6 testb %al, %al je 0x17b8d4 movq %rbx, %rdi callq 0x179d1d movb $0x1, %bpl testb %al, %al jne 0x17b8de movaps (%rsp), %xmm0 movups %xmm0, (%r14) xorl %ebp, %ebp decl 0x14(%rbx) movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq decl 0x14(%rbx) movq %rax, %rdi callq 0x6dd70
/google[P]bloaty/third_party/abseil-cpp/absl/debugging/internal/demangle.cc
absl::debugging_internal::ParseDiscriminator(absl::debugging_internal::State*)
static bool ParseDiscriminator(State *state) { ComplexityGuard guard(state); if (guard.IsTooComplex()) return false; ParseState copy = state->parse_state; // Both forms start with _ so parse that first. if (!ParseOneCharToken(state, '_')) return false; // <digit> if (ParseDigit(state, nullptr)) return true; // _ <number> _ if (ParseOneCharToken(state, '_') && ParseNumber(state, nullptr) && ParseOneCharToken(state, '_')) { return true; } state->parse_state = copy; return false; }
pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl 0x14(%rdi), %eax movl 0x18(%rdi), %ecx leal 0x1(%rax), %edx movl %edx, 0x14(%rdi) leal 0x1(%rcx), %edx movl %edx, 0x18(%rdi) cmpl $0x100, %eax # imm = 0x100 setge %al cmpl $0x20000, %ecx # imm = 0x20000 setge %cl orb %al, %cl jne 0x17bec4 movups 0x1c(%rbx), %xmm0 movaps %xmm0, (%rsp) movq %rbx, %rdi movl $0x5f, %esi callq 0x1792e6 testb %al, %al je 0x17bec4 leaq 0x329a9d(%rip), %rsi # 0x4a591a movq %rbx, %rdi callq 0x1798ac testb %al, %al jne 0x17bec4 movq %rbx, %rdi movl $0x5f, %esi callq 0x1792e6 testb %al, %al je 0x17beb9 movq %rbx, %rdi xorl %esi, %esi callq 0x179724 testb %al, %al je 0x17beb9 movq %rbx, %rdi movl $0x5f, %esi callq 0x1792e6 testb %al, %al jne 0x17bec4 leaq 0x1c(%rbx), %rax movaps (%rsp), %xmm0 movups %xmm0, (%rax) decl 0x14(%rbx) addq $0x10, %rsp popq %rbx retq
/google[P]bloaty/third_party/abseil-cpp/absl/debugging/internal/demangle.cc
void google::protobuf::internal::RepeatedFieldHelper<5>::Serialize<google::protobuf::io::CodedOutputStream>(void const*, google::protobuf::internal::FieldMetadata const&, google::protobuf::io::CodedOutputStream*)
static void Serialize(const void* field, const FieldMetadata& md, O* output) { typedef typename PrimitiveTypeHelper<type>::Type T; const RepeatedField<T>& array = Get<RepeatedField<T> >(field); for (int i = 0; i < array.size(); i++) { WriteTagTo(md.tag, output); SerializeTo<type>(&array[i], output); } }
cmpl $0x0, (%rdi) jle 0x17f040 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 xorl %r13d, %r13d leaq 0x4(%rsp), %r12 xorl %ebp, %ebp movl 0x4(%r14), %eax movl %eax, 0x4(%rsp) movq %r12, %rdi movq %rbx, %rsi callq 0x181926 movq 0x8(%r15), %rdi addq %r13, %rdi movq %rbx, %rsi callq 0x181aa8 incq %rbp movslq (%r15), %rax addq $0x4, %r13 cmpq %rax, %rbp jl 0x17f001 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.cc
void google::protobuf::internal::PackedFieldHelper<6>::Serialize<google::protobuf::io::CodedOutputStream>(void const*, google::protobuf::internal::FieldMetadata const&, google::protobuf::io::CodedOutputStream*)
inline bool RepeatedField<Element>::empty() const { return current_size_ == 0; }
cmpl $0x0, (%rdi) je 0x17f203 pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r14 movl 0x4(%rsi), %eax movq %rsp, %rdi movl %eax, (%rdi) movq %rdx, %rsi callq 0x181926 movl 0x10(%r14), %eax leaq 0x4(%rsp), %rdi movl %eax, (%rdi) movq %rbx, %rsi callq 0x181926 cmpl $0x0, (%r14) jle 0x17f1f8 xorl %r15d, %r15d movq 0x8(%r14), %rax movq (%rax,%r15,8), %r12 movq 0x40(%rbx), %rsi cmpq (%rbx), %rsi jae 0x17f1ea movq 0x40(%rbx), %rax movq %r12, (%rax) addq $0x8, %rax movq %rax, 0x40(%rbx) incq %r15 movslq (%r14), %rax cmpq %rax, %r15 jl 0x17f1bd jmp 0x17f1f8 movq %rbx, %rdi callq 0x1833fe movq %rax, 0x40(%rbx) jmp 0x17f1ce addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h
void google::protobuf::internal::SingularFieldHelper<7>::Serialize<google::protobuf::io::CodedOutputStream>(void const*, google::protobuf::internal::FieldMetadata const&, google::protobuf::io::CodedOutputStream*)
static void Serialize(const void* field, const FieldMetadata& md, O* output) { WriteTagTo(md.tag, output); SerializeTo<type>(field, output); }
pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rdi, %r14 movl 0x4(%rsi), %eax leaq 0xc(%rsp), %rdi movl %eax, (%rdi) movq %rdx, %rsi callq 0x181926 movl (%r14), %ebp movq 0x40(%rbx), %rsi cmpq (%rbx), %rsi jae 0x17f247 movq 0x40(%rbx), %rax movl %ebp, (%rax) addq $0x4, %rax movq %rax, 0x40(%rbx) addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq movq %rbx, %rdi callq 0x1833fe movq %rax, 0x40(%rbx) jmp 0x17f230 nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.cc
void google::protobuf::internal::PackedFieldHelper<9>::Serialize<google::protobuf::io::CodedOutputStream>(void const*, google::protobuf::internal::FieldMetadata const&, google::protobuf::io::CodedOutputStream*)
static void Serialize(const void* field, const FieldMetadata& md, O* output) { GOOGLE_LOG(FATAL) << "Not implemented field number " << md.tag << " with type " << md.type; }
pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx leaq 0x326a03(%rip), %rdx # 0x4a5f2c leaq 0x10(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x205, %ecx # imm = 0x205 callq 0x18d728 leaq 0x326a6a(%rip), %rsi # 0x4a5fb1 movq %r14, %rdi callq 0x18d1cc movl 0x4(%rbx), %esi movq %rax, %rdi callq 0x18d532 leaq 0x326acd(%rip), %rsi # 0x4a602e movq %rax, %rdi callq 0x18d1cc movl 0xc(%rbx), %esi movq %rax, %rdi callq 0x18d532 leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x10(%rsp), %rdi callq 0x18d746 addq $0x48, %rsp popq %rbx popq %r14 retq jmp 0x17f595 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x18d746 movq %rbx, %rdi callq 0x6dd70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.cc
void google::protobuf::internal::RepeatedFieldHelper<1>::Serialize<google::protobuf::internal::ArrayOutput>(void const*, google::protobuf::internal::FieldMetadata const&, google::protobuf::internal::ArrayOutput*)
static void Serialize(const void* field, const FieldMetadata& md, O* output) { typedef typename PrimitiveTypeHelper<type>::Type T; const RepeatedField<T>& array = Get<RepeatedField<T> >(field); for (int i = 0; i < array.size(); i++) { WriteTagTo(md.tag, output); SerializeTo<type>(&array[i], output); } }
cmpl $0x0, (%rdi) jle 0x17fda4 xorl %eax, %eax movl 0x4(%rsi), %r9d movq (%rdx), %rcx cmpl $0x7f, %r9d ja 0x17fd3a movb %r9b, (%rcx) incq %rcx jmp 0x17fd84 movl %r9d, %r8d orb $-0x80, %r8b movb %r8b, (%rcx) movl %r9d, %r8d shrl $0x7, %r8d cmpl $0x3fff, %r9d # imm = 0x3FFF ja 0x17fd5e movb %r8b, 0x1(%rcx) addq $0x2, %rcx jmp 0x17fd84 addq $0x2, %rcx movl %r8d, %r9d movl %r9d, %r10d orb $-0x80, %r10b movb %r10b, -0x1(%rcx) shrl $0x7, %r8d incq %rcx cmpl $0x3fff, %r9d # imm = 0x3FFF ja 0x17fd62 movb %r8b, -0x1(%rcx) movq %rcx, (%rdx) movq 0x8(%rdi), %r8 movq (%r8,%rax,8), %r8 movq %r8, (%rcx) addq $0x8, %rcx movq %rcx, (%rdx) incq %rax movslq (%rdi), %rcx cmpq %rcx, %rax jl 0x17fd25 retq nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.cc
void google::protobuf::internal::SerializeGroupTo<google::protobuf::internal::ArrayOutput>(google::protobuf::MessageLite const*, void const*, google::protobuf::internal::ArrayOutput*)
void SerializeGroupTo(const MessageLite* msg, const void* table_ptr, O* output) { const SerializationTable* table = static_cast<const SerializationTable*>(table_ptr); if (!table) { // Proto1 SerializeMessageNoTable(msg, output); return; } const FieldMetadata* field_table = table->field_table; const uint8* base = reinterpret_cast<const uint8*>(msg); int cached_size = *reinterpret_cast<const int32*>(base + field_table->offset); int num_fields = table->num_fields - 1; SerializeMessageDispatch(*msg, field_table + 1, num_fields, cached_size, output); }
pushq %rbx movq %rdx, %rbx testq %rsi, %rsi je 0x181f74 movq 0x8(%rsi), %rax movl (%rsi), %edx decl %edx addq $0x18, %rax movzbl 0x8(%rbx), %ecx movq (%rbx), %r8 movq %rax, %rsi callq 0x17d8da movq %rax, (%rbx) popq %rbx retq movq %rbx, %rsi popq %rbx jmp 0x17cf26
/google[P]bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.cc
google::protobuf::io::CodedInputStream::ReadRaw(void*, int)
bool CodedInputStream::ReadRaw(void* buffer, int size) { int current_buffer_size; while ((current_buffer_size = BufferSize()) < size) { // Reading past end of buffer. Copy what we have, then refresh. memcpy(buffer, buffer_, current_buffer_size); buffer = reinterpret_cast<uint8*>(buffer) + current_buffer_size; size -= current_buffer_size; Advance(current_buffer_size); if (!Refresh()) return false; } memcpy(buffer, buffer_, size); Advance(size); return true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx movl %ebp, %r12d movq (%rbx), %rsi movq 0x8(%rbx), %r13 subq %rsi, %r13 subl %r13d, %ebp jle 0x18261d movslq %r13d, %r15 movq %r14, %rdi movq %r15, %rdx callq 0x6d5a0 addq %r15, %r14 addq %r15, (%rbx) movq %rbx, %rdi callq 0x18246e testb %al, %al jne 0x1825e9 jmp 0x18262e movslq %r12d, %r15 movq %r14, %rdi movq %r15, %rdx callq 0x6d5a0 addq %r15, (%rbx) cmpl %r13d, %r12d setle %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/io/coded_stream.cc
google::protobuf::io::FileInputStream::CopyingFileInputStream::Skip(int)
int FileInputStream::CopyingFileInputStream::Skip(int count) { GOOGLE_CHECK(!is_closed_); if (!previous_seek_failed_ && lseek(file_, count, SEEK_CUR) != (off_t)-1) { // Seek succeeded. return count; } else { // Failed to seek. // Note to self: Don't seek again. This file descriptor doesn't // support it. previous_seek_failed_ = true; // Use the default implementation. return CopyingInputStream::Skip(count); } }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movl %esi, %ebx movq %rdi, %r14 movb 0xd(%rdi), %bpl cmpb $0x1, %bpl jne 0x183c29 leaq 0x3225de(%rip), %rdx # 0x4a61ca leaq 0x10(%rsp), %r15 movq %r15, %rdi movl $0x3, %esi movl $0x94, %ecx callq 0x18d728 leaq 0x322658(%rip), %rsi # 0x4a6262 movq %r15, %rdi callq 0x18d1cc leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x10(%rsp), %rdi callq 0x18d746 testb %bpl, %bpl cmpb $0x0, 0x14(%r14) jne 0x183c4a movl 0x8(%r14), %edi movslq %ebx, %rsi movl $0x1, %edx callq 0x6de60 cmpq $-0x1, %rax jne 0x183c5b movb $0x1, 0x14(%r14) movq %r14, %rdi movl %ebx, %esi callq 0x184aac movl %eax, %ebx movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq jmp 0x183c6a movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x18d746 movq %rbx, %rdi callq 0x6dd70 nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc
google::protobuf::io::FileInputStream::~FileInputStream()
class PROTOBUF_EXPORT FileInputStream : public ZeroCopyInputStream { public: // Creates a stream that reads from the given Unix file descriptor. // If a block_size is given, it specifies the number of bytes that // should be read and returned with each call to Next(). Otherwise, // a reasonable default is used. explicit FileInputStream(int file_descriptor, int block_size = -1); // Flushes any buffers and closes the underlying file. Returns false if // an error occurs during the process; use GetErrno() to examine the error. // Even if an error occurs, the file descriptor is closed when this returns. bool Close(); // By default, the file descriptor is not closed when the stream is // destroyed. Call SetCloseOnDelete(true) to change that. WARNING: // This leaves no way for the caller to detect if close() fails. If // detecting close() errors is important to you, you should arrange // to close the descriptor yourself. void SetCloseOnDelete(bool value) { copying_input_.SetCloseOnDelete(value); } // If an I/O error has occurred on this file descriptor, this is the // errno from that error. Otherwise, this is zero. Once an error // occurs, the stream is broken and all subsequent operations will // fail. int GetErrno() const { return copying_input_.GetErrno(); } // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; int64 ByteCount() const override; private: class PROTOBUF_EXPORT CopyingFileInputStream : public CopyingInputStream { public: CopyingFileInputStream(int file_descriptor); ~CopyingFileInputStream() override; bool Close(); void SetCloseOnDelete(bool value) { close_on_delete_ = value; } int GetErrno() const { return errno_; } // implements CopyingInputStream --------------------------------- int Read(void* buffer, int size) override; int Skip(int count) override; private: // The file descriptor. const int file_; bool close_on_delete_; bool is_closed_; // The errno of the I/O error, if one has occurred. Otherwise, zero. int errno_; // Did we try to seek once and fail? If so, we assume this file descriptor // doesn't support seeking and won't try again. bool previous_seek_failed_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingFileInputStream); }
pushq %rbx movq %rdi, %rbx leaq 0x3f9fcf(%rip), %rax # 0x57e2c0 movq %rax, (%rdi) addq $0x20, %rdi callq 0x184b4c leaq 0x8(%rbx), %rdi callq 0x183a54 movq %rbx, %rdi popq %rbx jmp 0x6d670 nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h
google::protobuf::io::CopyingInputStreamAdaptor::Skip(int)
bool CopyingInputStreamAdaptor::Skip(int count) { GOOGLE_CHECK_GE(count, 0); if (failed_) { // Already failed on a previous read. return false; } // First skip any bytes left over from a previous BackUp(). if (backup_bytes_ >= count) { // We have more data left over than we're trying to skip. Just chop it. backup_bytes_ -= count; return true; } count -= backup_bytes_; backup_bytes_ = 0; int skipped = copying_stream_->Skip(count); position_ += skipped; return skipped == count; }
pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movl %esi, %ebx movq %rdi, %r14 testl %esi, %esi jns 0x184ea6 leaq 0x32166f(%rip), %rdx # 0x4a64d8 leaq 0x8(%rsp), %r15 movq %r15, %rdi movl $0x3, %esi movl $0x107, %ecx # imm = 0x107 callq 0x18d728 leaq 0x321771(%rip), %rsi # 0x4a65f8 movq %r15, %rdi callq 0x18d1cc leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x8(%rsp), %rdi callq 0x18d746 testl %ebx, %ebx cmpb $0x0, 0x11(%r14) je 0x184eb3 xorl %eax, %eax jmp 0x184ee6 movl 0x30(%r14), %eax movl %eax, %ecx subl %ebx, %ecx jge 0x184ee0 subl %eax, %ebx movl $0x0, 0x30(%r14) movq 0x8(%r14), %rdi movq (%rdi), %rax movl %ebx, %esi callq *0x18(%rax) cltq addq %rax, 0x18(%r14) cmpl %ebx, %eax sete %al jmp 0x184ee6 movl %ecx, 0x30(%r14) movb $0x1, %al addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x184ef2 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x18d746 movq %rbx, %rdi callq 0x6dd70 nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
google::protobuf::RepeatedField<bool>::at(int) const
inline const Element& RepeatedField<Element>::at(int index) const { GOOGLE_CHECK_GE(index, 0); GOOGLE_CHECK_LT(index, current_size_); return elements()[index]; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x78, %rsp movl %esi, %ebp movq %rdi, %rbx testl %esi, %esi jns 0x18722d leaq 0xc0253(%rip), %rdx # 0x247443 leaq 0x40(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x49f, %ecx # imm = 0x49F callq 0x18d728 leaq 0xc02b1(%rip), %rsi # 0x2474bf movq %r14, %rdi callq 0x18d1cc leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x40(%rsp), %rdi callq 0x18d746 testl %ebp, %ebp movl (%rbx), %r15d cmpl %ebp, %r15d jg 0x18727b leaq 0xc0205(%rip), %rdx # 0x247443 leaq 0x8(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x4a0, %ecx # imm = 0x4A0 callq 0x18d728 leaq 0xc0282(%rip), %rsi # 0x2474de movq %r14, %rdi callq 0x18d1cc leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x8(%rsp), %rdi callq 0x18d746 cmpl %ebp, %r15d movslq %ebp, %rax addq 0x8(%rbx), %rax addq $0x78, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq jmp 0x187292 movq %rax, %rbx leaq 0x40(%rsp), %rdi jmp 0x1872a6 jmp 0x18729e movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x18d746 movq %rbx, %rdi callq 0x6dd70 nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h
google::protobuf::RepeatedField<bool>::at(int)
inline Element& RepeatedField<Element>::at(int index) { GOOGLE_CHECK_GE(index, 0); GOOGLE_CHECK_LT(index, current_size_); return elements()[index]; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x78, %rsp movl %esi, %ebp movq %rdi, %rbx testl %esi, %esi jns 0x18730b leaq 0xc0175(%rip), %rdx # 0x247443 leaq 0x40(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x4a6, %ecx # imm = 0x4A6 callq 0x18d728 leaq 0xc01d3(%rip), %rsi # 0x2474bf movq %r14, %rdi callq 0x18d1cc leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x40(%rsp), %rdi callq 0x18d746 testl %ebp, %ebp movl (%rbx), %r15d cmpl %ebp, %r15d jg 0x187359 leaq 0xc0127(%rip), %rdx # 0x247443 leaq 0x8(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x4a7, %ecx # imm = 0x4A7 callq 0x18d728 leaq 0xc01a4(%rip), %rsi # 0x2474de movq %r14, %rdi callq 0x18d1cc leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x8(%rsp), %rdi callq 0x18d746 cmpl %ebp, %r15d movslq %ebp, %rax addq 0x8(%rbx), %rax addq $0x78, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq jmp 0x187370 movq %rax, %rbx leaq 0x40(%rsp), %rdi jmp 0x187384 jmp 0x18737c movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x18d746 movq %rbx, %rdi callq 0x6dd70 nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h
google::protobuf::RepeatedField<bool>::Swap(google::protobuf::RepeatedField<bool>*)
void RepeatedField<Element>::Swap(RepeatedField* other) { if (this == other) return; if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { InternalSwap(other); } else { RepeatedField<Element> temp(other->GetArenaNoVirtual()); temp.MergeFrom(*this); CopyFrom(*other); other->UnsafeArenaSwap(&temp); } }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp cmpq %rsi, %rdi je 0x187642 movq %rsi, %rbx movq %rdi, %r14 leaq 0x8(%rdi), %rcx movq 0x8(%rdi), %rax leaq -0x8(%rax), %rdx cmpl $0x0, 0x4(%rdi) cmoveq %rcx, %rdx movq (%rdx), %rsi leaq 0x8(%rbx), %rdi movq 0x8(%rbx), %rcx leaq -0x8(%rcx), %rdx cmpl $0x0, 0x4(%rbx) cmoveq %rdi, %rdx cmpq (%rdx), %rsi je 0x187622 movq (%rdx), %rsi leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x186e1e movl (%r14), %esi testl %esi, %esi je 0x1875c5 leaq 0x8(%rsp), %rdi movslq (%rdi), %r12 addl %r12d, %esi callq 0x186e6a movslq (%r14), %rdx addl %edx, 0x8(%rsp) addq 0x10(%rsp), %r12 movq 0x8(%r14), %rsi movq %r12, %rdi callq 0x6d5a0 movl $0x0, (%r14) movl (%rbx), %esi testl %esi, %esi je 0x1875ef movq %r14, %rdi callq 0x186e6a movl (%rbx), %eax movq 0x8(%r14), %rdi addl %eax, (%r14) movq 0x8(%rbx), %rsi movslq (%rbx), %rdx callq 0x6d5a0 cmpq %rbx, %r15 je 0x187616 movq 0x8(%rbx), %rax movq 0x10(%rsp), %rcx movq %rcx, 0x8(%rbx) movq %rax, 0x10(%rsp) movq 0x8(%rsp), %rax movq (%rbx), %rcx movq %rax, (%rbx) movq %rcx, 0x8(%rsp) leaq 0x8(%rsp), %rdi callq 0x186f7c jmp 0x187642 movq %rcx, 0x8(%r14) movq %rax, 0x8(%rbx) movl (%r14), %eax movl (%rbx), %ecx movl %ecx, (%r14) movl %eax, (%rbx) movl 0x4(%r14), %eax movl 0x4(%rbx), %ecx movl %ecx, 0x4(%r14) movl %eax, 0x4(%rbx) addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x186f7c movq %rbx, %rdi callq 0x6dd70 nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h
google::protobuf::RepeatedField<bool>::erase(bool const*)
inline typename RepeatedField<Element>::iterator RepeatedField<Element>::erase( const_iterator position) { return erase(position, position + 1); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rax movq %rdi, %rbx incq %rsi movq 0x8(%rdi), %r14 subl %r14d, %eax movslq (%rdi), %r12 addq %r14, %r12 movslq %eax, %r15 addq %r15, %r14 subq %rsi, %r12 je 0x187758 movq %r14, %rdi movq %r12, %rdx callq 0x6dc70 cmpl $0x0, (%rbx) jle 0x187767 addl %r12d, %r14d subl 0x8(%rbx), %r14d movl %r14d, (%rbx) addq 0x8(%rbx), %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h
google::protobuf::RepeatedField<bool>::erase(bool const*, bool const*)
inline typename RepeatedField<Element>::iterator RepeatedField<Element>::erase( const_iterator first, const_iterator last) { size_type first_offset = first - cbegin(); if (first != last) { Truncate(std::copy(last, cend(), begin() + first_offset) - cbegin()); } return begin() + first_offset; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x8(%rdi), %rax movq %rsi, %r12 subq %rax, %r12 cmpq %rdx, %rsi je 0x1877c2 movslq (%rbx), %r14 addq %rax, %r14 movslq %r12d, %r15 addq %rax, %r15 subq %rdx, %r14 je 0x1877b3 movq %r15, %rdi movq %rdx, %rsi movq %r14, %rdx callq 0x6dc70 cmpl $0x0, (%rbx) jle 0x1877c2 addl %r14d, %r15d subl 0x8(%rbx), %r15d movl %r15d, (%rbx) movslq %r12d, %rax addq 0x8(%rbx), %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h
google::protobuf::RepeatedField<int>::Reserve(int)
void RepeatedField<Element>::Reserve(int new_size) { if (total_size_ >= new_size) return; Rep* old_rep = total_size_ > 0 ? rep() : NULL; Rep* new_rep; Arena* arena = GetArenaNoVirtual(); new_size = std::max(internal::kMinRepeatedFieldAllocationSize, std::max(total_size_ * 2, new_size)); GOOGLE_DCHECK_LE( static_cast<size_t>(new_size), (std::numeric_limits<size_t>::max() - kRepHeaderSize) / sizeof(Element)) << "Requested size is too large to fit into size_t."; size_t bytes = kRepHeaderSize + sizeof(Element) * static_cast<size_t>(new_size); if (arena == NULL) { new_rep = static_cast<Rep*>(::operator new(bytes)); } else { new_rep = reinterpret_cast<Rep*>(Arena::CreateArray<char>(arena, bytes)); } new_rep->arena = arena; int old_total_size = total_size_; total_size_ = new_size; arena_or_elements_ = new_rep->elements; // Invoke placement-new on newly allocated elements. We shouldn't have to do // this, since Element is supposed to be POD, but a previous version of this // code allocated storage with "new Element[size]" and some code uses // RepeatedField with non-POD types, relying on constructor invocation. If // Element has a trivial constructor (e.g., int32), gcc (tested with -O2) // completely removes this loop because the loop body is empty, so this has no // effect unless its side-effects are required for correctness. // Note that we do this before MoveArray() below because Element's copy // assignment implementation will want an initialized instance first. Element* e = &elements()[0]; Element* limit = e + total_size_; for (; e < limit; e++) { new (e) Element; } if (current_size_ > 0) { MoveArray(&elements()[0], old_rep->elements, current_size_); } // Likewise, we need to invoke destructors on the old array. InternalDeallocate(old_rep, old_total_size); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl 0x4(%rdi), %r13d cmpl %esi, %r13d jge 0x187902 movq %rdi, %r14 leaq 0x8(%rdi), %rax movq 0x8(%rdi), %rcx addq $-0x8, %rcx xorl %ebx, %ebx testl %r13d, %r13d cmovgq %rcx, %rbx cmoveq %rax, %rcx movq (%rcx), %r15 leal (,%r13,2), %eax cmpl %esi, %eax cmovgl %eax, %esi cmpl $0x5, %esi movl $0x4, %ebp cmovgel %esi, %ebp leaq (,%rbp,4), %rdi testq %r15, %r15 je 0x1878c7 addq $0xf, %rdi movabsq $0x3fffffff8, %r12 # imm = 0x3FFFFFFF8 andq %rdi, %r12 cmpq $0x0, 0x70(%r15) jne 0x187927 movq %r15, %rdi movq %r12, %rsi callq 0x6ec00 jmp 0x1878d0 addq $0x8, %rdi callq 0x6df30 movq %r15, (%rax) movl %ebp, 0x4(%r14) addq $0x8, %rax movq %rax, 0x8(%r14) movslq (%r14), %rdx testq %rdx, %rdx jle 0x1878f7 leaq 0x8(%rbx), %rsi shlq $0x2, %rdx movq %rax, %rdi callq 0x6d5a0 testl %r13d, %r13d jle 0x187902 cmpq $0x0, (%rbx) je 0x187911 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x6d670 movq 0x3fb6ba(%rip), %rsi # 0x582fe8 movq %r15, %rdi movq %r12, %rdx callq 0x17cdda jmp 0x1878ba
/google[P]bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h
google::protobuf::RepeatedField<int>::AddNAlreadyReserved(int)
inline Element* RepeatedField<Element>::AddNAlreadyReserved(int n) { GOOGLE_DCHECK_GE(total_size_ - current_size_, n) << total_size_ << ", " << current_size_; // Warning: sometimes people call this when n == 0 and total_size_ == 0. In // this case the return pointer points to a zero size array (n == 0). Hence // we can just use unsafe_elements(), because the user cannot dereference the // pointer anyway. Element* ret = unsafe_elements() + current_size_; current_size_ += n; return ret; }
movslq (%rdi), %rax addl %eax, %esi shlq $0x2, %rax addq 0x8(%rdi), %rax movl %esi, (%rdi) retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h
google::protobuf::internal::WireFormatLite::WriteDoubleArray(double const*, int, google::protobuf::io::CodedOutputStream*)
void WireFormatLite::WriteDoubleArray(const double* a, int n, io::CodedOutputStream* output) { WriteArray<double>(a, n, output); }
pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movl %esi, %edx movq %rdi, %rsi shll $0x3, %edx movq (%rbx), %rax movq 0x40(%rbx), %r14 subq %r14, %rax movslq %edx, %r15 cmpq %r15, %rax jl 0x18fef8 movq %r14, %rdi movq %r15, %rdx callq 0x6d5a0 addq %r15, %r14 movq %r14, 0x40(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rbx, %rdi movq %r14, %rcx callq 0x183522 movq %rax, %r14 jmp 0x18feee
/google[P]bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.cc
google::protobuf::internal::WireFormatLite::WriteFixed32Array(unsigned int const*, int, google::protobuf::io::CodedOutputStream*)
void WireFormatLite::WriteFixed32Array(const uint32* a, int n, io::CodedOutputStream* output) { WriteArray<uint32>(a, n, output); }
pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movl %esi, %edx movq %rdi, %rsi shll $0x2, %edx movq (%rbx), %rax movq 0x40(%rbx), %r14 subq %r14, %rax movslq %edx, %r15 cmpq %r15, %rax jl 0x18ff42 movq %r14, %rdi movq %r15, %rdx callq 0x6d5a0 addq %r15, %r14 movq %r14, 0x40(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rbx, %rdi movq %r14, %rcx callq 0x183522 movq %rax, %r14 jmp 0x18ff38
/google[P]bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.cc
google::protobuf::internal::WireFormatLite::WriteFixed64Array(unsigned long const*, int, google::protobuf::io::CodedOutputStream*)
void WireFormatLite::WriteFixed64Array(const uint64* a, int n, io::CodedOutputStream* output) { WriteArray<uint64>(a, n, output); }
pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movl %esi, %edx movq %rdi, %rsi shll $0x3, %edx movq (%rbx), %rax movq 0x40(%rbx), %r14 subq %r14, %rax movslq %edx, %r15 cmpq %r15, %rax jl 0x18ff8c movq %r14, %rdi movq %r15, %rdx callq 0x6d5a0 addq %r15, %r14 movq %r14, 0x40(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rbx, %rdi movq %r14, %rcx callq 0x183522 movq %rax, %r14 jmp 0x18ff82
/google[P]bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.cc
google::protobuf::internal::WireFormatLite::WriteSFixed32Array(int const*, int, google::protobuf::io::CodedOutputStream*)
void WireFormatLite::WriteSFixed32Array(const int32* a, int n, io::CodedOutputStream* output) { WriteArray<int32>(a, n, output); }
pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movl %esi, %edx movq %rdi, %rsi shll $0x2, %edx movq (%rbx), %rax movq 0x40(%rbx), %r14 subq %r14, %rax movslq %edx, %r15 cmpq %r15, %rax jl 0x18ffd6 movq %r14, %rdi movq %r15, %rdx callq 0x6d5a0 addq %r15, %r14 movq %r14, 0x40(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rbx, %rdi movq %r14, %rcx callq 0x183522 movq %rax, %r14 jmp 0x18ffcc
/google[P]bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.cc
google::protobuf::internal::WireFormatLite::WriteSFixed64Array(long const*, int, google::protobuf::io::CodedOutputStream*)
void WireFormatLite::WriteSFixed64Array(const int64* a, int n, io::CodedOutputStream* output) { WriteArray<int64>(a, n, output); }
pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movl %esi, %edx movq %rdi, %rsi shll $0x3, %edx movq (%rbx), %rax movq 0x40(%rbx), %r14 subq %r14, %rax movslq %edx, %r15 cmpq %r15, %rax jl 0x190020 movq %r14, %rdi movq %r15, %rdx callq 0x6d5a0 addq %r15, %r14 movq %r14, 0x40(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rbx, %rdi movq %r14, %rcx callq 0x183522 movq %rax, %r14 jmp 0x190016
/google[P]bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.cc
unsigned long const& google::protobuf::Reflection::GetRaw<unsigned long>(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
const Type& Reflection::GetRaw(const Message& message, const FieldDescriptor* field) const { if (field->containing_oneof() && !HasOneofField(message, field)) { return DefaultRaw<Type>(field); } return GetConstRefAtOffset<Type>(message, schema_.GetFieldOffset(field)); }
pushq %rbx movq %rsi, %rbx movq 0x58(%rdx), %rax testq %rax, %rax je 0x19b838 movq 0x10(%rax), %rcx subq 0x30(%rcx), %rax shrq $0x4, %rax imull $0xaaaaaaac, %eax, %eax # imm = 0xAAAAAAAC addl 0x2c(%rdi), %eax movl (%rbx,%rax), %eax cmpl 0x44(%rdx), %eax jne 0x19b84e addq $0x8, %rdi movq %rdx, %rsi callq 0x19b8f8 movl %eax, %eax addq %rax, %rbx movq %rbx, %rax popq %rbx retq addq $0x8, %rdi movq %rdx, %rsi popq %rbx jmp 0x19b984 nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc
google::protobuf::internal::ExtensionSet::MessageSetByteSize() const::$_0 google::protobuf::internal::ExtensionSet::ForEach<std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension>>, google::protobuf::internal::ExtensionSet::MessageSetByteSize() const::$_0>(std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension>>, std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension>>, google::protobuf::internal::ExtensionSet::MessageSetByteSize() const::$_0)
static KeyValueFunctor ForEach(Iterator begin, Iterator end, KeyValueFunctor func) { for (Iterator it = begin; it != end; ++it) func(it->first, it->second); return std::move(func); }
pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx cmpq %rsi, %rdi je 0x1c43b5 movq %rsi, %r14 movq %rdi, %r15 movl 0x20(%r15), %esi leaq 0x28(%r15), %rdi callq 0x1c40da addq %rax, (%rbx) movq %r15, %rdi callq 0x6d4a0 movq %rax, %r15 cmpq %r14, %rax jne 0x1c4395 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/extension_set.h
char const* google::protobuf::internal::ExtensionSet::ParseFieldWithExtensionInfo<google::protobuf::internal::InternalMetadataWithArenaLite>(int, bool, google::protobuf::internal::ExtensionInfo const&, google::protobuf::internal::InternalMetadataWithArenaLite*, char const*, google::protobuf::internal::ParseContext*)
const char* ExtensionSet::ParseFieldWithExtensionInfo( int number, bool was_packed_on_wire, const ExtensionInfo& extension, T* metadata, const char* ptr, internal::ParseContext* ctx) { if (was_packed_on_wire) { switch (extension.type) { #define HANDLE_TYPE(UPPERCASE, CPP_CAMELCASE) \ case WireFormatLite::TYPE_##UPPERCASE: \ return internal::Packed##CPP_CAMELCASE##Parser( \ MutableRawRepeatedField(number, extension.type, extension.is_packed, \ extension.descriptor), \ ptr, ctx); HANDLE_TYPE(INT32, Int32); HANDLE_TYPE(INT64, Int64); HANDLE_TYPE(UINT32, UInt32); HANDLE_TYPE(UINT64, UInt64); HANDLE_TYPE(SINT32, SInt32); HANDLE_TYPE(SINT64, SInt64); HANDLE_TYPE(FIXED32, Fixed32); HANDLE_TYPE(FIXED64, Fixed64); HANDLE_TYPE(SFIXED32, SFixed32); HANDLE_TYPE(SFIXED64, SFixed64); HANDLE_TYPE(FLOAT, Float); HANDLE_TYPE(DOUBLE, Double); HANDLE_TYPE(BOOL, Bool); #undef HANDLE_TYPE case WireFormatLite::TYPE_ENUM: return internal::PackedEnumParserArg( MutableRawRepeatedField(number, extension.type, extension.is_packed, extension.descriptor), ptr, ctx, extension.enum_validity_check.func, extension.enum_validity_check.arg, metadata, number); case WireFormatLite::TYPE_STRING: case WireFormatLite::TYPE_BYTES: case WireFormatLite::TYPE_GROUP: case WireFormatLite::TYPE_MESSAGE: GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; break; } } else { switch (extension.type) { #define HANDLE_VARINT_TYPE(UPPERCASE, CPP_CAMELCASE) \ case WireFormatLite::TYPE_##UPPERCASE: { \ uint64 value; \ ptr = VarintParse(ptr, &value); \ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); \ if (extension.is_repeated) { \ Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, \ extension.is_packed, value, extension.descriptor); \ } else { \ Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value, \ extension.descriptor); \ } \ } break HANDLE_VARINT_TYPE(INT32, Int32); HANDLE_VARINT_TYPE(INT64, Int64); HANDLE_VARINT_TYPE(UINT32, UInt32); HANDLE_VARINT_TYPE(UINT64, UInt64); #undef HANDLE_VARINT_TYPE #define HANDLE_SVARINT_TYPE(UPPERCASE, CPP_CAMELCASE, SIZE) \ case WireFormatLite::TYPE_##UPPERCASE: { \ uint64 val; \ ptr = VarintParse(ptr, &val); \ GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); \ auto value = WireFormatLite::ZigZagDecode##SIZE(val); \ if (extension.is_repeated) { \ Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, \ extension.is_packed, value, extension.descriptor); \ } else { \ Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value, \ extension.descriptor); \ } \ } break HANDLE_SVARINT_TYPE(SINT32, Int32, 32); HANDLE_SVARINT_TYPE(SINT64, Int64, 64); #undef HANDLE_SVARINT_TYPE #define HANDLE_FIXED_TYPE(UPPERCASE, CPP_CAMELCASE, CPPTYPE) \ case WireFormatLite::TYPE_##UPPERCASE: { \ auto value = UnalignedLoad<CPPTYPE>(ptr); \ ptr += sizeof(CPPTYPE); \ if (extension.is_repeated) { \ Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, \ extension.is_packed, value, extension.descriptor); \ } else { \ Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value, \ extension.descriptor); \ } \ } break HANDLE_FIXED_TYPE(FIXED32, UInt32, uint32); HANDLE_FIXED_TYPE(FIXED64, UInt64, uint64); HANDLE_FIXED_TYPE(SFIXED32, Int32, int32); HANDLE_FIXED_TYPE(SFIXED64, Int64, int64); HANDLE_FIXED_TYPE(FLOAT, Float, float); HANDLE_FIXED_TYPE(DOUBLE, Double, double); HANDLE_FIXED_TYPE(BOOL, Bool, bool); #undef HANDLE_FIXED_TYPE case WireFormatLite::TYPE_ENUM: { uint64 val; ptr = VarintParse(ptr, &val); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); int value = val; if (!extension.enum_validity_check.func( extension.enum_validity_check.arg, value)) { WriteVarint(number, val, metadata->mutable_unknown_fields()); } else if (extension.is_repeated) { AddEnum(number, WireFormatLite::TYPE_ENUM, extension.is_packed, value, extension.descriptor); } else { SetEnum(number, WireFormatLite::TYPE_ENUM, value, extension.descriptor); } break; } case WireFormatLite::TYPE_BYTES: case WireFormatLite::TYPE_STRING: { std::string* value = extension.is_repeated ? AddString(number, WireFormatLite::TYPE_STRING, extension.descriptor) : MutableString(number, WireFormatLite::TYPE_STRING, extension.descriptor); int size = ReadSize(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); return ctx->ReadString(ptr, size, value); } case WireFormatLite::TYPE_GROUP: { MessageLite* value = extension.is_repeated ? AddMessage(number, WireFormatLite::TYPE_GROUP, *extension.message_info.prototype, extension.descriptor) : MutableMessage(number, WireFormatLite::TYPE_GROUP, *extension.message_info.prototype, extension.descriptor); uint32 tag = (number << 3) + WireFormatLite::WIRETYPE_START_GROUP; return ctx->ParseGroup(value, ptr, tag); } case WireFormatLite::TYPE_MESSAGE: { MessageLite* value = extension.is_repeated ? AddMessage(number, WireFormatLite::TYPE_MESSAGE, *extension.message_info.prototype, extension.descriptor) : MutableMessage(number, WireFormatLite::TYPE_MESSAGE, *extension.message_info.prototype, extension.descriptor); return ctx->ParseMessage(value, ptr); } } } return ptr; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, %rbx movq %r8, %rbp movq %rcx, %r12 movl %edx, %eax movl %esi, %r14d movq %rdi, %r15 movq 0x90(%rsp), %r13 movzbl (%rcx), %edx testl %eax, %eax je 0x1c4451 leal -0x1(%rdx), %eax cmpl $0x11, %eax ja 0x1c5028 leaq 0x2e6ce9(%rip), %rcx # 0x4ab0e8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x2e7038(%rip), %rdx # 0x4ab447 leaq 0x20(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x4e, %ecx callq 0x18d728 leaq 0x2e6f87(%rip), %rsi # 0x4ab3b4 movq %r14, %rdi callq 0x18d1cc leaq 0x17(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x20(%rsp), %rdi callq 0x18d746 jmp 0x1c5028 decl %edx cmpl $0x11, %edx ja 0x1c5028 leaq 0x2e6c3d(%rip), %rax # 0x4ab0a0 movslq (%rax,%rdx,4), %rcx addq %rax, %rcx jmpq *%rcx movq 0x18(%r12), %rcx cmpb $0x1, 0x1(%r12) jne 0x1c4605 movq %r15, %rdi movl %r14d, %esi movl $0x9, %edx callq 0x1bdae6 jmp 0x1c4615 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b41 movsbq (%rbx), %r13 leaq 0x1(%rbx), %rax testq %r13, %r13 js 0x1c4c04 movq %rax, %rbx jmp 0x1c4d1c movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b7e movl (%rbx), %ebp addq $0x4, %rbx cmpb $0x1, 0x1(%r12) jne 0x1c4a2b movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0xf, %edx movl %ebp, %r8d callq 0x1bc466 jmp 0x1c5028 movq 0x8(%r12), %rcx movq 0x18(%r12), %r8 cmpb $0x1, 0x1(%r12) jne 0x1c4a53 movq %r15, %rdi movl %r14d, %esi movl $0xb, %edx callq 0x1be0fc jmp 0x1c4a63 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b09 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b17 movsbq (%rbx), %r13 leaq 0x1(%rbx), %rax testq %r13, %r13 js 0x1c4c2a movq %rax, %rbx jmp 0x1c4d8d movsbq (%rbx), %r13 leaq 0x1(%rbx), %rax testq %r13, %r13 js 0x1c4c50 movq %rax, %rbx jmp 0x1c4df7 movq %r15, %rdi movl %r14d, %esi movl $0x9, %edx callq 0x1bd914 movq %rax, %r14 movzbl (%rbx), %edx testb %dl, %dl js 0x1c49f9 incq %rbx jmp 0x1c4a06 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b25 movsbq (%rbx), %r13 leaq 0x1(%rbx), %rax testq %r13, %r13 js 0x1c4c76 movq %rax, %rbx jmp 0x1c4e61 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b88 movq (%rbx), %r13 addq $0x8, %rbx cmpb $0x1, 0x1(%r12) jne 0x1c4a7f movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0x10, %edx movq %r13, %r8 callq 0x1bc6b6 jmp 0x1c5028 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b33 movsbq (%rbx), %r13 leaq 0x1(%rbx), %rax testq %r13, %r13 js 0x1c4c9c movq %rax, %rbx jmp 0x1c4ec3 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b6b movb (%rbx), %bpl incq %rbx cmpb $0x1, 0x1(%r12) jne 0x1c4aa7 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movzbl %bpl, %r8d andl $0x1, %r8d movq %r15, %rdi movl %r14d, %esi movl $0x8, %edx callq 0x1bd288 jmp 0x1c5028 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b92 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b8d movq (%rbx), %xmm0 addq $0x8, %rbx cmpb $0x1, 0x1(%r12) jne 0x1c4ad6 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi movl $0x1, %edx callq 0x1bd038 jmp 0x1c5028 movd (%rbx), %xmm0 addq $0x4, %rbx cmpb $0x1, 0x1(%r12) jne 0x1c4b0e movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi movl $0x2, %edx callq 0x1bcdc2 jmp 0x1c5028 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b4f movsbq (%rbx), %r13 leaq 0x1(%rbx), %rax testq %r13, %r13 js 0x1c4cc2 movq %rax, %rbx jmp 0x1c4f26 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq 0x8(%r12), %rcx movq 0x10(%r12), %r8 movl %r14d, (%rsp) movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx movq %rbp, %r9 callq 0x6f22c jmp 0x1c502b movsbq (%rbx), %r13 leaq 0x1(%rbx), %rax testq %r13, %r13 js 0x1c4ce8 movq %rax, %rbx jmp 0x1c4fa3 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b83 movq (%rbx), %r13 addq $0x8, %rbx cmpb $0x1, 0x1(%r12) jne 0x1c4b46 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0x6, %edx movq %r13, %r8 callq 0x1bcb4e jmp 0x1c5028 movq 0x8(%r12), %rcx movq 0x18(%r12), %r8 cmpb $0x1, 0x1(%r12) jne 0x1c4b71 movq %r15, %rdi movl %r14d, %esi movl $0xa, %edx callq 0x1be0fc jmp 0x1c4b81 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r8 movq %r15, %rdi movl %r14d, %esi callq 0x1bd364 movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185b79 movl (%rbx), %ebp addq $0x4, %rbx cmpb $0x1, 0x1(%r12) jne 0x1c4bda movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0x7, %edx movl %ebp, %r8d callq 0x1bc8fe jmp 0x1c5028 movq %rbx, %rdi movl %edx, %esi callq 0x6f029 movq %rax, %rbx testq %rbx, %rbx je 0x1c5026 movq %r13, %rdi movq %rbx, %rsi movq %r14, %rcx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185bfe movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c4bf9 movw $0xf, 0x8(%rax) jmp 0x1c4bf9 movq %r15, %rdi movl %r14d, %esi movl $0xb, %edx callq 0x1bdc56 movq %r13, %rdi movq %rax, %rsi movq %rbx, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x185796 movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c4b65 movw $0x10, 0x8(%rax) jmp 0x1c4b65 movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c4ac6 movw $0x8, 0x8(%rax) andb $0x1, %bpl andb $-0x10, 0xa(%rax) movb %bpl, (%rax) jmp 0x1c5028 movq %xmm0, 0x18(%rsp) movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c4afb movw $0x1, 0x8(%rax) andb $-0x10, 0xa(%rax) movq 0x18(%rsp), %xmm0 movq %xmm0, (%rax) jmp 0x1c5028 movd %xmm0, 0x18(%rsp) movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c4b33 movw $0x2, 0x8(%rax) andb $-0x10, 0xa(%rax) movd 0x18(%rsp), %xmm0 movd %xmm0, (%rax) jmp 0x1c5028 movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c4b65 movw $0x6, 0x8(%rax) andb $-0x10, 0xa(%rax) movq %r13, (%rax) jmp 0x1c5028 movq %r15, %rdi movl %r14d, %esi movl $0xa, %edx callq 0x1bdc56 movl 0x58(%r13), %ecx leal -0x1(%rcx), %edx movl %edx, 0x58(%r13) testl %ecx, %ecx jle 0x1c5026 leal 0x3(,%r14,8), %ebp incl 0x5c(%r13) movq (%rax), %rcx movq %rax, %rdi movq %rbx, %rsi movq %r13, %rdx callq *0x68(%rcx) movq 0x58(%r13), %xmm0 paddd 0x2e1db3(%rip), %xmm0 # 0x4a6970 movq %xmm0, 0x58(%r13) xorl %ebx, %ebx cmpl %ebp, 0x50(%r13) movl $0x0, 0x50(%r13) cmoveq %rax, %rbx jmp 0x1c5028 movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c4bf9 movw $0x7, 0x8(%rax) andb $-0x10, 0xa(%rax) movl %ebp, (%rax) jmp 0x1c5028 movzbl %r13b, %ecx movzbl (%rax), %eax movl %eax, %edx shll $0x7, %edx leal (%rcx,%rdx), %esi addl $-0x80, %esi testb %al, %al js 0x1c4d0e movl %esi, %r13d addq $0x2, %rbx jmp 0x1c4d1c movzbl %r13b, %ecx movzbl (%rax), %eax movl %eax, %edx shll $0x7, %edx leal (%rcx,%rdx), %esi addl $-0x80, %esi testb %al, %al js 0x1c4d7f movl %esi, %r13d addq $0x2, %rbx jmp 0x1c4d8d movzbl %r13b, %ecx movzbl (%rax), %eax movl %eax, %edx shll $0x7, %edx leal (%rcx,%rdx), %esi addl $-0x80, %esi testb %al, %al js 0x1c4de9 movl %esi, %r13d addq $0x2, %rbx jmp 0x1c4df7 movzbl %r13b, %ecx movzbl (%rax), %eax movl %eax, %edx shll $0x7, %edx leal (%rcx,%rdx), %esi addl $-0x80, %esi testb %al, %al js 0x1c4e53 movl %esi, %r13d addq $0x2, %rbx jmp 0x1c4e61 movzbl %r13b, %ecx movzbl (%rax), %eax movl %eax, %edx shll $0x7, %edx leal (%rcx,%rdx), %esi addl $-0x80, %esi testb %al, %al js 0x1c4eb5 movl %esi, %r13d addq $0x2, %rbx jmp 0x1c4ec3 movzbl %r13b, %ecx movzbl (%rax), %eax movl %eax, %edx shll $0x7, %edx leal (%rcx,%rdx), %esi addl $-0x80, %esi testb %al, %al js 0x1c4f18 movl %esi, %r13d addq $0x2, %rbx jmp 0x1c4f26 movzbl %r13b, %ecx movzbl (%rax), %eax movl %eax, %edx shll $0x7, %edx leal (%rcx,%rdx), %esi addl $-0x80, %esi testb %al, %al js 0x1c4f95 movl %esi, %r13d addq $0x2, %rbx jmp 0x1c4fa3 movq %rbx, %rdi callq 0x185976 movq %rax, %rbx movq %rdx, %r13 testq %rbx, %rbx je 0x1c5026 movl %r13d, %eax shrl %eax andl $0x1, %r13d negl %r13d xorl %eax, %r13d cmpb $0x1, 0x1(%r12) jne 0x1c4d57 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0x11, %edx jmp 0x1c4e1e movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c501a movw $0x11, 0x8(%rax) jmp 0x1c501a movq %rbx, %rdi callq 0x185976 movq %rax, %rbx movq %rdx, %r13 testq %rbx, %rbx je 0x1c5026 cmpb $0x1, 0x1(%r12) jne 0x1c4dc1 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0xd, %edx movl %r13d, %r8d callq 0x1bc8fe jmp 0x1c5021 movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c501a movw $0xd, 0x8(%rax) jmp 0x1c501a movq %rbx, %rdi callq 0x185976 movq %rax, %rbx movq %rdx, %r13 testq %rbx, %rbx je 0x1c5026 cmpb $0x1, 0x1(%r12) jne 0x1c4e2b movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0x5, %edx movl %r13d, %r8d callq 0x1bc466 jmp 0x1c5021 movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c501a movw $0x5, 0x8(%rax) jmp 0x1c501a movq %rbx, %rdi callq 0x185976 movq %rax, %rbx movq %rdx, %r13 testq %rbx, %rbx je 0x1c5026 cmpb $0x1, 0x1(%r12) jne 0x1c4e8d movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0x3, %edx jmp 0x1c4f5d movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c4f89 movw $0x3, 0x8(%rax) jmp 0x1c4f89 movq %rbx, %rdi callq 0x185976 movq %rax, %rbx movq %rdx, %r13 testq %rbx, %rbx je 0x1c5026 cmpb $0x1, 0x1(%r12) jne 0x1c4ef7 movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0x4, %edx movq %r13, %r8 callq 0x1bcb4e jmp 0x1c5021 movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c4f89 movw $0x4, 0x8(%rax) jmp 0x1c4f89 movq %rbx, %rdi callq 0x185976 movq %rax, %rbx movq %rdx, %r13 testq %rbx, %rbx je 0x1c5026 movq %r13, %rax shrq %rax andl $0x1, %r13d negq %r13 xorq %rax, %r13 cmpb $0x1, 0x1(%r12) jne 0x1c4f6a movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0x12, %edx movq %r13, %r8 callq 0x1bc6b6 jmp 0x1c5021 movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c4f89 movw $0x12, 0x8(%rax) andb $-0x10, 0xa(%rax) movq %r13, (%rax) jmp 0x1c5021 movq %rbx, %rdi callq 0x185976 movq %rax, %rbx movq %rdx, %r13 testq %rbx, %rbx je 0x1c5026 movq 0x10(%r12), %rdi movl %r13d, %esi callq *0x8(%r12) testb %al, %al je 0x1c4fe1 cmpb $0x1, 0x1(%r12) jne 0x1c4ffb movzbl 0x2(%r12), %ecx movq 0x18(%r12), %r9 movq %r15, %rdi movl %r14d, %esi movl $0xe, %edx movl %r13d, %r8d callq 0x1bd832 jmp 0x1c5021 movq (%rbp), %rdx testb $0x1, %dl je 0x1c503a andq $-0x2, %rdx movl %r14d, %edi movq %r13, %rsi callq 0x18579b jmp 0x1c5021 movq 0x18(%r12), %r12 movq %r15, %rdi movl %r14d, %esi callq 0x1bf300 movq %r12, 0x10(%rax) testb $0x1, %dl je 0x1c501a movw $0xe, 0x8(%rax) andb $-0x10, 0xa(%rax) movl %r13d, (%rax) testq %rbx, %rbx jne 0x1c5028 xorl %ebx, %ebx movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbp, %rdi callq 0x18606e movq %rax, %rdx jmp 0x1c4fee jmp 0x1c5049 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x18d746 movq %rbx, %rdi callq 0x6dd70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/extension_set_inl.h
google::protobuf::ZeroCopyCodedInputStream::Next(void const**, int*)
bool Next(const void** data, int* size) final { if (!cis_->GetDirectBufferPointer(data, size)) return false; cis_->Skip(*size); return true; }
pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r15 movq %rdi, %r14 movq 0x8(%rdi), %rdi callq 0x182432 movl %eax, %ebx testb %al, %al je 0x1c7303 movslq (%r15), %rsi testq %rsi, %rsi js 0x1c7303 movq 0x8(%r14), %rdi movl 0x8(%rdi), %edx movq (%rdi), %rax subl %eax, %edx cmpl %edx, %esi jle 0x1c72fd callq 0x1823c0 jmp 0x1c7303 addq %rsi, %rax movq %rax, (%rdi) movl %ebx, %eax popq %rbx popq %r14 popq %r15 retq nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/message_lite.cc
google::protobuf::UnescapeCEscapeSequences(char const*, char*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
int UnescapeCEscapeSequences(const char* source, char* dest, std::vector<string> *errors) { GOOGLE_DCHECK(errors == nullptr) << "Error reporting not implemented."; char* d = dest; const char* p = source; // Small optimization for case where source = dest and there's no escaping while ( p == d && *p != '\0' && *p != '\\' ) p++, d++; while (*p != '\0') { if (*p != '\\') { *d++ = *p++; } else { switch ( *++p ) { // skip past the '\\' case '\0': LOG_STRING(ERROR, errors) << "String cannot end with \\"; *d = '\0'; return d - dest; // we're done with p case 'a': *d++ = '\a'; break; case 'b': *d++ = '\b'; break; case 'f': *d++ = '\f'; break; case 'n': *d++ = '\n'; break; case 'r': *d++ = '\r'; break; case 't': *d++ = '\t'; break; case 'v': *d++ = '\v'; break; case '\\': *d++ = '\\'; break; case '?': *d++ = '\?'; break; // \? Who knew? case '\'': *d++ = '\''; break; case '"': *d++ = '\"'; break; case '0': case '1': case '2': case '3': // octal digit: 1 to 3 digits case '4': case '5': case '6': case '7': { char ch = *p - '0'; if ( IS_OCTAL_DIGIT(p[1]) ) ch = ch * 8 + *++p - '0'; if ( IS_OCTAL_DIGIT(p[1]) ) // safe (and easy) to do this twice ch = ch * 8 + *++p - '0'; // now points at last digit *d++ = ch; break; } case 'x': case 'X': { if (!isxdigit(p[1])) { if (p[1] == '\0') { LOG_STRING(ERROR, errors) << "String cannot end with \\x"; } else { LOG_STRING(ERROR, errors) << "\\x cannot be followed by non-hex digit: \\" << *p << p[1]; } break; } unsigned int ch = 0; const char *hex_start = p; while (isxdigit(p[1])) // arbitrarily many hex digits ch = (ch << 4) + hex_digit_to_int(*++p); if (ch > 0xFF) LOG_STRING(ERROR, errors) << "Value of " << "\\" << string(hex_start, p+1-hex_start) << " exceeds 8 bits"; *d++ = ch; break; } #if 0 // TODO(kenton): Support \u and \U? Requires runetochar(). case 'u': { // \uhhhh => convert 4 hex digits to UTF-8 char32 rune = 0; const char *hex_start = p; for (int i = 0; i < 4; ++i) { if (isxdigit(p[1])) { // Look one char ahead. rune = (rune << 4) + hex_digit_to_int(*++p); // Advance p. } else { LOG_STRING(ERROR, errors) << "\\u must be followed by 4 hex digits: \\" << string(hex_start, p+1-hex_start); break; } } d += runetochar(d, &rune); break; } case 'U': { // \Uhhhhhhhh => convert 8 hex digits to UTF-8 char32 rune = 0; const char *hex_start = p; for (int i = 0; i < 8; ++i) { if (isxdigit(p[1])) { // Look one char ahead. // Don't change rune until we're sure this // is within the Unicode limit, but do advance p. char32 newrune = (rune << 4) + hex_digit_to_int(*++p); if (newrune > 0x10FFFF) { LOG_STRING(ERROR, errors) << "Value of \\" << string(hex_start, p + 1 - hex_start) << " exceeds Unicode limit (0x10FFFF)"; break; } else { rune = newrune; } } else { LOG_STRING(ERROR, errors) << "\\U must be followed by 8 hex digits: \\" << string(hex_start, p+1-hex_start); break; } } d += runetochar(d, &rune); break; } #endif default: LOG_STRING(ERROR, errors) << "Unknown escape sequence: \\" << *p; } p++; // read past letter we escaped } } *d = '\0'; return d - dest; }
cmpq %rsi, %rdi je 0x1c7eda movq %rsi, %rax jmp 0x1c7f01 movq %rsi, %rcx movzbl (%rdi), %eax testl %eax, %eax je 0x1c7efe cmpl $0x5c, %eax je 0x1c7efe leaq 0x1(%rdi), %r9 leaq 0x1(%rcx), %rax cmpq %rdi, %rcx movq %r9, %rdi movq %rax, %rcx je 0x1c7edd jmp 0x1c7f04 movq %rcx, %rax movq %rdi, %r9 movabsq $0x3f0000003f, %rcx # imm = 0x3F0000003F leaq 0x2e3fcb(%rip), %rdx # 0x4abee0 movzbl (%r9), %r8d cmpl $0x5c, %r8d je 0x1c7f2d testl %r8d, %r8d jne 0x1c80b6 jmp 0x1c80ca leaq 0x1(%r9), %rdi movb 0x1(%r9), %r8b movzbl %r8b, %r10d cmpl $0x3e, %r10d jle 0x1c7f69 cmpl $0x61, %r10d jle 0x1c7fe4 leal -0x6e(%r10), %r8d cmpl $0xa, %r8d ja 0x1c8090 movslq (%rdx,%r8,4), %r8 addq %rdx, %r8 jmpq *%r8 movb $0xa, %r8b jmp 0x1c80b3 cmpl $0x2f, %r10d jle 0x1c807d addl $-0x30, %r10d cmpl $0x8, %r10d jae 0x1c80bf addb $-0x30, %r8b movb 0x2(%r9), %r10b addq $0x2, %r9 leal (,%r8,8), %r11d addb %r10b, %r11b andb $-0x8, %r10b addb $-0x30, %r11b cmpb $0x30, %r10b cmoveq %r9, %rdi movzbl %r11b, %r9d movzbl %r8b, %r10d cmovel %r9d, %r10d leaq 0x1(%rdi), %r9 movb 0x1(%rdi), %r8b leal (,%r10,8), %r11d addb %r8b, %r11b andb $-0x8, %r8b addb $-0x30, %r11b cmpb $0x30, %r8b cmovneq %rdi, %r9 movzbl %r11b, %r8d cmovnel %r10d, %r8d jmp 0x1c80b6 cmpl $0x5b, %r10d jg 0x1c8069 cmpl $0x3f, %r10d je 0x1c80b3 cmpl $0x58, %r10d jne 0x1c80bf movb 0x2(%r9), %r8b leal -0x30(%r8), %r9d cmpb $0xa, %r9b jb 0x1c8028 movzbl %r8b, %r8d addl $-0x41, %r8d cmpl $0x25, %r8d ja 0x1c80bf btq %r8, %rcx jae 0x1c80bf xorl %r8d, %r8d movb 0x1(%rdi), %r9b leal -0x30(%r9), %r10d movzbl %r9b, %r9d cmpb $0xa, %r10b jb 0x1c804d leal -0x41(%r9), %r10d cmpl $0x25, %r10d ja 0x1c80b3 btq %r10, %rcx jae 0x1c80b3 incq %rdi shll $0x4, %r8d leal 0x9(%r9), %r10d cmpb $0x3a, %r9b cmovbl %r9d, %r10d andl $0xf, %r10d orl %r10d, %r8d jmp 0x1c802b cmpl $0x5c, %r10d je 0x1c80b3 movb $0x7, %r8b movq %rdi, %r9 cmpl $0x61, %r10d je 0x1c80b6 jmp 0x1c80bf cmpl $0x22, %r10d je 0x1c80b3 cmpl $0x27, %r10d je 0x1c80b3 testl %r10d, %r10d jne 0x1c80bf jmp 0x1c80ca cmpl $0x66, %r10d je 0x1c80b0 cmpl $0x62, %r10d jne 0x1c80bf movb $0x8, %r8b jmp 0x1c80b3 movb $0x9, %r8b jmp 0x1c80b3 movb $0xb, %r8b jmp 0x1c80b3 movb $0xd, %r8b jmp 0x1c80b3 movb $0xc, %r8b movq %rdi, %r9 movb %r8b, (%rax) incq %rax movq %r9, %rdi incq %rdi movq %rdi, %r9 jmp 0x1c7f15 movb $0x0, (%rax) subl %esi, %eax retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::UnescapeCEscapeString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
int UnescapeCEscapeString(const string& src, string* dest, std::vector<string> *errors) { std::unique_ptr<char[]> unescaped(new char[src.size() + 1]); int len = UnescapeCEscapeSequences(src.c_str(), unescaped.get(), errors); GOOGLE_CHECK(dest); dest->assign(unescaped.get(), len); return len; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %r15 movq 0x8(%rdi), %rdi incq %rdi callq 0x6d040 movq %rax, %rbx movq (%r15), %rdi movq %rax, %rsi callq 0x1c7ed0 movl %eax, %ebp testq %r14, %r14 jne 0x1c8149 leaq 0x2e43a3(%rip), %rdx # 0x4ac4b0 leaq 0x10(%rsp), %rdi movl $0x3, %esi movl $0x1dc, %ecx # imm = 0x1DC callq 0x18d728 leaq 0x2e4404(%rip), %rsi # 0x4ac52c leaq 0x10(%rsp), %rdi callq 0x18d1cc leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x10(%rsp), %rdi callq 0x18d746 testq %r14, %r14 movslq %ebp, %r8 movq 0x8(%r14), %rdx movq %r14, %rdi xorl %esi, %esi movq %rbx, %rcx callq 0x6dbc0 movq %rbx, %rdi callq 0x6d960 movl %ebp, %eax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq jmp 0x1c8177 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x18d746 jmp 0x1c818b jmp 0x1c8188 movq %rax, %r14 movq %rbx, %rdi callq 0x6d960 movq %r14, %rdi callq 0x6dd70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::strings::Utf8SafeCEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string Utf8SafeCEscape(const string& src) { const int dest_length = src.size() * 4 + 1; // Maximum possible expansion std::unique_ptr<char[]> dest(new char[dest_length]); const int len = CEscapeInternal(src.data(), src.size(), dest.get(), dest_length, false, true); GOOGLE_DCHECK_GE(len, 0); return string(dest.get(), len); }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %r15 movq %rdi, %rbx movl 0x8(%rsi), %r12d leal (,%r12,4), %eax leal 0x1(,%r12,4), %ebp testl %eax, %eax movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmovnsl %ebp, %eax movslq %eax, %rdi callq 0x6d040 movq %rax, %r14 movq (%r15), %rdi movl %r12d, %esi movq %rax, %rdx movl %ebp, %ecx xorl %r8d, %r8d movl $0x1, %r9d callq 0x1c81fc movslq %eax, %rdx leaq 0x10(%rbx), %rax movq %rax, (%rbx) addq %r14, %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x7b4ac movq %r14, %rdi callq 0x6d960 movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq %r14, %rdi callq 0x6d960 movq %rbx, %rdi callq 0x6dd70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::FastInt64ToBuffer(long, char*)
char *FastInt64ToBuffer(int64 i, char* buffer) { // We could collapse the positive and negative sections, but that // would be slightly slower for positive numbers... // 22 bytes is enough to store -2**64, -18446744073709551616. char* p = buffer + kFastInt64ToBufferOffset; *p-- = '\0'; if (i >= 0) { do { *p-- = '0' + i % 10; i /= 10; } while (i > 0); return p + 1; } else { // On different platforms, % and / have different behaviors for // negative numbers, so we need to jump through hoops to make sure // we don't divide negative numbers. if (i > -10) { i = -i; *p-- = '0' + i; *p = '-'; return p; } else { // Make sure we aren't at MIN_INT, in which case we can't say i = -i i = i + 10; i = -i; *p-- = '0' + i % 10; // Undo what we did a moment ago i = i / 10 + 1; do { *p-- = '0' + i % 10; i /= 10; } while (i > 0); *p = '-'; return p; } } }
movb $0x0, 0x15(%rsi) testq %rdi, %rdi js 0x1c87c5 addq $0x15, %rsi movabsq $-0x3333333333333333, %r8 # imm = 0xCCCCCCCCCCCCCCCD movq %rdi, %rax mulq %r8 leaq -0x1(%rsi), %rcx shrq $0x3, %rdx leal (%rdx,%rdx), %eax leal (%rax,%rax,4), %eax movl %edi, %r9d subl %eax, %r9d orb $0x30, %r9b movb %r9b, -0x1(%rsi) movq %rcx, %rsi cmpq $0xa, %rdi movq %rdx, %rdi jae 0x1c8795 jmp 0x1c883f cmpq $-0x9, %rdi jl 0x1c87dc movb $0x30, %al subb %dil, %al movb %al, 0x14(%rsi) addq $0x13, %rsi movq %rsi, %rcx jmp 0x1c883c movq $-0xa, %rcx subq %rdi, %rcx movabsq $-0x3333333333333333, %r8 # imm = 0xCCCCCCCCCCCCCCCD movq %rcx, %rax mulq %r8 movq %rdx, %rdi shrq $0x3, %rdi leal (%rdi,%rdi), %eax leal (%rax,%rax,4), %eax subl %eax, %ecx orb $0x30, %cl movb %cl, 0x14(%rsi) addq $0x13, %rsi incq %rdi movq %rsi, %rcx movq %rdi, %rax mulq %r8 shrq $0x3, %rdx leal (%rdx,%rdx), %eax leal (%rax,%rax,4), %eax movl %edi, %esi subl %eax, %esi orb $0x30, %sil movb %sil, (%rcx) decq %rcx cmpq $0x9, %rdi movq %rdx, %rdi ja 0x1c8815 movb $0x2d, (%rcx) movq %rcx, %rax retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::FastHexToBuffer(int, char*)
char *FastHexToBuffer(int i, char* buffer) { GOOGLE_CHECK(i >= 0) << "FastHexToBuffer() wants non-negative integers, not " << i; static const char *hexdigits = "0123456789abcdef"; char *p = buffer + 21; *p-- = '\0'; do { *p-- = hexdigits[i & 15]; // mod by 16 i >>= 4; // divide by 16 } while (i > 0); return p + 1; }
pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %rbx movl %edi, %ebp testl %edi, %edi jns 0x1c895f leaq 0x2e3ba7(%rip), %rdx # 0x4ac4b0 leaq 0x8(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x38d, %ecx # imm = 0x38D callq 0x18d728 leaq 0x2e3c1a(%rip), %rsi # 0x4ac541 movq %r14, %rdi callq 0x18d1cc leaq 0x2e3c22(%rip), %rsi # 0x4ac558 movq %rax, %rdi callq 0x18d1cc movq %rax, %rdi movl %ebp, %esi callq 0x18d4ea leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x8(%rsp), %rdi callq 0x18d746 testl %ebp, %ebp movb $0x0, 0x15(%rbx) addq $0x15, %rbx leaq 0x2e3ce0(%rip), %rax # 0x4ac650 movl %ebp, %ecx andl $0xf, %ecx movb (%rcx,%rax), %cl movb %cl, -0x1(%rbx) decq %rbx sarl $0x4, %ebp testl %ebp, %ebp jg 0x1c8970 movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq jmp 0x1c8993 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x18d746 movq %rbx, %rdi callq 0x6dd70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::DelocalizeRadix(char*)
void DelocalizeRadix(char* buffer) { // Fast check: if the buffer has a normal decimal point, assume no // translation is needed. if (strchr(buffer, '.') != nullptr) return; // Find the first unknown character. while (IsValidFloatChar(*buffer)) ++buffer; if (*buffer == '\0') { // No radix character found. return; } // We are now pointing at the locale-specific radix character. Replace it // with '.'. *buffer = '.'; ++buffer; if (!IsValidFloatChar(*buffer) && *buffer != '\0') { // It appears the radix was a multi-byte character. We need to remove the // extra bytes. char* target = buffer; do { ++buffer; } while (!IsValidFloatChar(*buffer) && *buffer != '\0'); memmove(target, buffer, strlen(buffer) + 1); } }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movl $0x2e, %esi callq 0x6d280 testq %rax, %rax jne 0x1c9042 addq $0x2, %rbx movabsq $0x400000004000005, %rax # imm = 0x400000004000005 movzbl -0x2(%rbx), %ecx leal -0x30(%rcx), %edx cmpb $0xa, %dl jb 0x1c9017 leal -0x2b(%rcx), %edx cmpl $0x3a, %edx ja 0x1c901c btq %rdx, %rax jae 0x1c901c incq %rbx jmp 0x1c8ffd testl %ecx, %ecx je 0x1c9042 movb $0x2e, -0x2(%rbx) movzbl -0x1(%rbx), %ecx leal -0x30(%rcx), %edx cmpb $0xa, %dl jb 0x1c9042 leal -0x2b(%rcx), %edx cmpl $0x3a, %edx ja 0x1c903e btq %rdx, %rax jb 0x1c9042 testl %ecx, %ecx jne 0x1c9048 popq %rbx popq %r14 popq %r15 retq leaq -0x1(%rbx), %r14 movq %rbx, %r15 movzbl (%rbx), %ecx leal -0x30(%rcx), %edx cmpb $0xa, %dl jb 0x1c9070 leal -0x2b(%rcx), %edx cmpl $0x3a, %edx ja 0x1c9068 btq %rdx, %rax jb 0x1c9070 leaq 0x1(%r15), %rbx testl %ecx, %ecx jne 0x1c904c movq %r15, %rdi callq 0x6d2d0 leaq 0x1(%rax), %rdx movq %r14, %rdi movq %r15, %rsi popq %rbx popq %r14 popq %r15 jmp 0x6dc70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::StrCat[abi:cxx11](google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&)
string StrCat(const AlphaNum &a, const AlphaNum &b) { string result; result.resize(a.size() + b.size()); char *const begin = &*result.begin(); char *out = Append2(begin, a, b); GOOGLE_DCHECK_EQ(out, begin + result.size()); return result; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x8(%rdx), %rsi addq 0x8(%r15), %rsi xorl %edx, %edx callq 0x6d1f0 movq (%rbx), %r12 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %r12, %rdi callq 0x6d5a0 addq 0x8(%r15), %r12 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %r12, %rdi callq 0x6d5a0 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r12, %rdi je 0x1c97c8 callq 0x6d670 movq %r14, %rdi callq 0x6dd70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::StrCat[abi:cxx11](google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&)
string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c) { string result; result.resize(a.size() + b.size() + c.size()); char *const begin = &*result.begin(); char *out = Append2(begin, a, b); out = Append1(out, c); GOOGLE_DCHECK_EQ(out, begin + result.size()); return result; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x8(%rdx), %rsi addq 0x8(%r12), %rsi addq 0x8(%rcx), %rsi xorl %edx, %edx callq 0x6d1f0 movq (%rbx), %r13 movq (%r12), %rsi movq 0x8(%r12), %rdx movq %r13, %rdi callq 0x6d5a0 addq 0x8(%r12), %r13 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %r13, %rdi callq 0x6d5a0 addq 0x8(%r15), %r13 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %r13, %rdi callq 0x6d5a0 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0x1c9864 callq 0x6d670 movq %r14, %rdi callq 0x6dd70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::StrCat[abi:cxx11](google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&, google::protobuf::strings::AlphaNum const&)
string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c, const AlphaNum &d, const AlphaNum &e) { string result; result.resize(a.size() + b.size() + c.size() + d.size() + e.size()); char *const begin = &*result.begin(); char *out = Append4(begin, a, b, c, d); out = Append1(out, e); GOOGLE_DCHECK_EQ(out, begin + result.size()); return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %rbp movq %rbp, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x8(%rdx), %rsi addq 0x8(%r14), %rsi addq 0x8(%rcx), %rsi addq 0x8(%r8), %rsi movq %r9, (%rsp) addq 0x8(%r9), %rsi xorl %edx, %edx callq 0x6d1f0 movq (%rbx), %rbp movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbp, %rdi callq 0x6d5a0 addq 0x8(%r14), %rbp movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbp, %rdi callq 0x6d5a0 addq 0x8(%r13), %rbp movq (%r12), %rsi movq 0x8(%r12), %rdx movq %rbp, %rdi callq 0x6d5a0 addq 0x8(%r12), %rbp movq (%r15), %rsi movq 0x8(%r15), %rdx movq %rbp, %rdi callq 0x6d5a0 addq 0x8(%r15), %rbp movq (%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx movq %rbp, %rdi callq 0x6d5a0 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbx), %rdi cmpq %rbp, %rdi je 0x1c99fd callq 0x6d670 movq %r14, %rdi callq 0x6dd70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::Base64EscapeInternal(unsigned char const*, int, char*, int, char const*, bool)
int Base64EscapeInternal(const unsigned char *src, int szsrc, char *dest, int szdest, const char *base64, bool do_padding) { static const char kPad64 = '='; if (szsrc <= 0) return 0; if (szsrc * 4 > szdest * 3) return 0; char *cur_dest = dest; const unsigned char *cur_src = src; char *limit_dest = dest + szdest; const unsigned char *limit_src = src + szsrc; // Three bytes of data encodes to four characters of cyphertext. // So we can pump through three-byte chunks atomically. while (cur_src < limit_src - 3) { // keep going as long as we have >= 32 bits uint32 in = BigEndian::Load32(cur_src) >> 8; cur_dest[0] = base64[in >> 18]; in &= 0x3FFFF; cur_dest[1] = base64[in >> 12]; in &= 0xFFF; cur_dest[2] = base64[in >> 6]; in &= 0x3F; cur_dest[3] = base64[in]; cur_dest += 4; cur_src += 3; } // To save time, we didn't update szdest or szsrc in the loop. So do it now. szdest = limit_dest - cur_dest; szsrc = limit_src - cur_src; /* now deal with the tail (<=3 bytes) */ switch (szsrc) { case 0: // Nothing left; nothing more to do. break; case 1: { // One byte left: this encodes to two characters, and (optionally) // two pad characters to round out the four-character cypherblock. if ((szdest -= 2) < 0) return 0; uint32 in = cur_src[0]; cur_dest[0] = base64[in >> 2]; in &= 0x3; cur_dest[1] = base64[in << 4]; cur_dest += 2; if (do_padding) { if ((szdest -= 2) < 0) return 0; cur_dest[0] = kPad64; cur_dest[1] = kPad64; cur_dest += 2; } break; } case 2: { // Two bytes left: this encodes to three characters, and (optionally) // one pad character to round out the four-character cypherblock. if ((szdest -= 3) < 0) return 0; uint32 in = BigEndian::Load16(cur_src); cur_dest[0] = base64[in >> 10]; in &= 0x3FF; cur_dest[1] = base64[in >> 4]; in &= 0x00F; cur_dest[2] = base64[in << 2]; cur_dest += 3; if (do_padding) { if ((szdest -= 1) < 0) return 0; cur_dest[0] = kPad64; cur_dest += 1; } break; } case 3: { // Three bytes left: same as in the big loop above. We can't do this in // the loop because the loop above always reads 4 bytes, and the fourth // byte is past the end of the input. if ((szdest -= 4) < 0) return 0; uint32 in = (cur_src[0] << 16) + BigEndian::Load16(cur_src + 1); cur_dest[0] = base64[in >> 18]; in &= 0x3FFFF; cur_dest[1] = base64[in >> 12]; in &= 0xFFF; cur_dest[2] = base64[in >> 6]; in &= 0x3F; cur_dest[3] = base64[in]; cur_dest += 4; break; } default: // Should not be reached: blocks of 4 bytes are handled // in the while loop before this switch statement. GOOGLE_LOG(FATAL) << "Logic problem? szsrc = " << szsrc; break; } return (cur_dest - dest); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp xorl %eax, %eax testl %esi, %esi jle 0x1caab4 movq %rdx, %rbx leal (,%rsi,4), %edx leal (%rcx,%rcx,2), %r10d cmpl %r10d, %edx jg 0x1caab4 movl %esi, %edx leaq (%rdi,%rdx), %r14 addq %rdi, %rdx addq $-0x3, %rdx movq %rbx, %r12 cmpq %rdi, %rdx jbe 0x1ca91e movl (%rdi), %esi bswapl %esi movl %esi, %r10d shrl $0x8, %r10d movl %esi, %r11d shrl $0x1a, %r11d movb (%r8,%r11), %r11b movb %r11b, (%r12) movl %esi, %r11d shrl $0x14, %r11d andl $0x3f, %r11d movb (%r8,%r11), %r11b movb %r11b, 0x1(%r12) shrl $0xe, %esi andl $0x3f, %esi movb (%r8,%rsi), %sil movb %sil, 0x2(%r12) andl $0x3f, %r10d movb (%r8,%r10), %sil movb %sil, 0x3(%r12) addq $0x4, %r12 addq $0x3, %rdi cmpq %rdx, %rdi jb 0x1ca8c7 subq %rdi, %r14 cmpl $0x3, %r14d ja 0x1caa49 movslq %ecx, %rcx addq %rbx, %rcx subl %r12d, %ecx movl %r14d, %edx leaq 0x2e15f2(%rip), %rsi # 0x4abf30 movslq (%rsi,%rdx,4), %rdx addq %rsi, %rdx jmpq *%rdx cmpl $0x2, %ecx jl 0x1caab4 movzbl (%rdi), %edx movl %edx, %esi shrl $0x2, %esi movb (%r8,%rsi), %sil movb %sil, (%r12) shll $0x4, %edx andl $0x30, %edx movb (%r8,%rdx), %dl movb %dl, 0x1(%r12) leaq 0x2(%r12), %rsi movb $0x1, %dl testb %r9b, %r9b je 0x1caaa7 cmpl $0x4, %ecx jl 0x1ca9e7 movw $0x3d3d, 0x2(%r12) # imm = 0x3D3D jmp 0x1caaa0 cmpl $0x3, %ecx jl 0x1caab4 movzwl (%rdi), %edx rolw $0x8, %dx movzwl %dx, %edx movl %edx, %esi shrl $0xa, %esi movb (%r8,%rsi), %sil movb %sil, (%r12) movl %edx, %esi shrl $0x4, %esi andl $0x3f, %esi movb (%r8,%rsi), %sil movb %sil, 0x1(%r12) andl $0xf, %edx movb (%r8,%rdx,4), %dl movb %dl, 0x2(%r12) leaq 0x3(%r12), %rsi movb $0x1, %dl testb %r9b, %r9b je 0x1caaa7 cmpl $0x3, %ecx jne 0x1caa9a xorl %edx, %edx jmp 0x1caaa7 cmpl $0x4, %ecx jl 0x1caab4 movzbl (%rdi), %eax movzwl 0x1(%rdi), %ecx rolw $0x8, %cx movzwl %cx, %ecx movl %eax, %edx shrl $0x2, %edx movb (%r8,%rdx), %dl movb %dl, (%r12) andl $0x3, %eax shll $0x10, %eax orl %ecx, %eax shrl $0xc, %eax movb (%r8,%rax), %al movb %al, 0x1(%r12) movl %ecx, %eax shrl $0x6, %eax andl $0x3f, %eax movb (%r8,%rax), %al movb %al, 0x2(%r12) andl $0x3f, %ecx movb (%r8,%rcx), %al movb %al, 0x3(%r12) addq $0x4, %r12 jmp 0x1caaae leaq 0x2e1a60(%rip), %rdx # 0x4ac4b0 leaq 0x10(%rsp), %r15 movq %r15, %rdi movl $0x3, %esi movl $0x892, %ecx # imm = 0x892 callq 0x18d728 leaq 0x2e1b63(%rip), %rsi # 0x4ac5d1 movq %r15, %rdi callq 0x18d1cc movq %rax, %rdi movl %r14d, %esi callq 0x18d4ea leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x10(%rsp), %rdi callq 0x18d746 jmp 0x1caaae movb $0x3d, 0x3(%r12) addq $0x4, %r12 movq %r12, %rsi movq %rsi, %r12 testb %dl, %dl je 0x1caab4 subl %ebx, %r12d movl %r12d, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x1caac2 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x18d746 movq %rbx, %rdi callq 0x6dd70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::EncodeAsUTF8Char(unsigned int, char*)
int EncodeAsUTF8Char(uint32 code_point, char* output) { uint32 tmp = 0; int len = 0; if (code_point <= 0x7f) { tmp = code_point; len = 1; } else if (code_point <= 0x07ff) { tmp = 0x0000c080 | ((code_point & 0x07c0) << 2) | (code_point & 0x003f); len = 2; } else if (code_point <= 0xffff) { tmp = 0x00e08080 | ((code_point & 0xf000) << 4) | ((code_point & 0x0fc0) << 2) | (code_point & 0x003f); len = 3; } else { // UTF-16 is only defined for code points up to 0x10FFFF, and UTF-8 is // normally only defined up to there as well. tmp = 0xf0808080 | ((code_point & 0x1c0000) << 6) | ((code_point & 0x03f000) << 4) | ((code_point & 0x000fc0) << 2) | (code_point & 0x003f); len = 4; } tmp = ghtonl(tmp); memcpy(output, reinterpret_cast<const char*>(&tmp) + sizeof(tmp) - len, len); return len; }
pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movl $0x0, 0xc(%rsp) cmpl $0x7f, %edi ja 0x1cac25 movl %edi, 0xc(%rsp) movl $0x1, %ebp jmp 0x1cacb1 cmpl $0x7ff, %edi # imm = 0x7FF ja 0x1cac4a movl %edi, %eax andl $0x7c0, %eax # imm = 0x7C0 andl $0x3f, %edi leal (%rdi,%rax,4), %eax addl $0xc080, %eax # imm = 0xC080 movl %eax, 0xc(%rsp) movl $0x2, %ebp jmp 0x1cacb1 cmpl $0xffff, %edi # imm = 0xFFFF ja 0x1cac7c movl %edi, %eax shll $0x4, %eax andl $0xf0000, %eax # imm = 0xF0000 movl %edi, %ecx andl $0xfc0, %ecx # imm = 0xFC0 andl $0x3f, %edi leal (%rdi,%rcx,4), %ecx addl %ecx, %eax addl $0xe08080, %eax # imm = 0xE08080 movl %eax, 0xc(%rsp) movl $0x3, %ebp jmp 0x1cacb1 movl %edi, %eax shll $0x6, %eax andl $0x7000000, %eax # imm = 0x7000000 movl %edi, %ecx shll $0x4, %ecx andl $0x3f0000, %ecx # imm = 0x3F0000 movl %edi, %edx andl $0xfc0, %edx # imm = 0xFC0 andl $0x3f, %edi orl %ecx, %edi orl %eax, %edi leal (%rdi,%rdx,4), %eax addl $0xf0808080, %eax # imm = 0xF0808080 movl %eax, 0xc(%rsp) movl $0x4, %ebp leaq 0xc(%rsp), %r14 movl (%r14), %edi callq 0x18d81e movl %eax, (%r14) movl %ebp, %edx subq %rdx, %r14 addq $0x4, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x6d5a0 movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::CleanStringLineEndings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool)
void CleanStringLineEndings(string *str, bool auto_end_last_line) { ptrdiff_t output_pos = 0; bool r_seen = false; ptrdiff_t len = str->size(); char *p = &(*str)[0]; for (ptrdiff_t input_pos = 0; input_pos < len;) { if (!r_seen && input_pos + 8 < len) { uint64_t v = GOOGLE_UNALIGNED_LOAD64(p + input_pos); // Loop over groups of 8 bytes at a time until we come across // a word that has a byte whose value is less than or equal to // '\r' (i.e. could contain a \n (0x0a) or a \r (0x0d) ). // // We use a has_less macro that quickly tests a whole 64-bit // word to see if any of the bytes has a value < N. // // For more details, see: // http://graphics.stanford.edu/~seander/bithacks.html#HasLessInWord #define has_less(x, n) (((x) - ~0ULL / 255 * (n)) & ~(x) & ~0ULL / 255 * 128) if (!has_less(v, '\r' + 1)) { #undef has_less // No byte in this word has a value that could be a \r or a \n if (output_pos != input_pos) { GOOGLE_UNALIGNED_STORE64(p + output_pos, v); } input_pos += 8; output_pos += 8; continue; } } string::const_reference in = p[input_pos]; if (in == '\r') { if (r_seen) p[output_pos++] = '\n'; r_seen = true; } else if (in == '\n') { if (input_pos != output_pos) p[output_pos++] = '\n'; else output_pos++; r_seen = false; } else { if (r_seen) p[output_pos++] = '\n'; r_seen = false; if (input_pos != output_pos) p[output_pos++] = in; else output_pos++; } input_pos++; } if (r_seen || (auto_end_last_line && output_pos > 0 && p[output_pos - 1] != '\n')) { str->resize(output_pos + 1); str->operator[](output_pos) = '\n'; } else if (output_pos < len) { str->resize(output_pos); } }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx movabsq $-0x7f7f7f7f7f7f7f80, %rdx # imm = 0x8080808080808080 movq (%rdi), %rcx movq 0x8(%rdi), %rax xorl %r10d, %r10d movabsq $0xe0e0e0e0e0e0e0d, %rdi # imm = 0xE0E0E0E0E0E0E0D xorl %r9d, %r9d xorl %r11d, %r11d movq %r11, %r14 movq %r10, %r15 cmpq %rax, %r15 jge 0x1cae8f testb $0x1, %r9b jne 0x1cae22 leaq 0x8(%r15), %r8 cmpq %rax, %r8 jge 0x1cae2a movq (%rcx,%r15), %r13 movq %rdi, %r12 subq %r13, %r12 orq %r13, %r12 andq %rdx, %r12 cmpq %rdx, %r12 jne 0x1cae18 cmpq %r15, %r14 je 0x1cae0f movq %r13, (%rcx,%r14) addq $0x8, %r14 movq %r8, %r15 jmp 0x1cae1b movq %r15, %r8 cmpq %rdx, %r12 je 0x1cadd9 jmp 0x1cae2d movq %r10, %r8 movq %r11, %r14 jmp 0x1cae2d movq %r15, %r8 movzbl (%rcx,%r8), %r10d cmpl $0xa, %r10d je 0x1cae51 cmpl $0xd, %r10d jne 0x1cae5d movb $0x1, %r11b testb $0x1, %r9b je 0x1cae7e movb $0xa, (%rcx,%r14) incq %r14 jmp 0x1cae7e cmpq %r14, %r8 je 0x1cae78 movb $0xa, (%rcx,%r14) jmp 0x1cae78 testb $0x1, %r9b je 0x1cae6b movb $0xa, (%rcx,%r14) incq %r14 cmpq %r14, %r8 je 0x1cae78 movb (%rcx,%r8), %r9b movb %r9b, (%rcx,%r14) incq %r14 xorl %r11d, %r11d incq %r8 movq %r8, %r10 movl %r11d, %r9d movq %r14, %r11 jmp 0x1cadd6 testb $0x1, %r9b je 0x1caead leaq 0x1(%r14), %rsi movq %rbx, %rdi xorl %edx, %edx callq 0x6d1f0 movq (%rbx), %rax movb $0xa, (%rax,%r14) jmp 0x1caeda testb %sil, %sil je 0x1caebf testq %r14, %r14 jle 0x1caebf cmpb $0xa, -0x1(%rcx,%r14) jne 0x1cae95 cmpq %rax, %r14 jge 0x1caeda movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x6d1f0 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
bool google::protobuf::safe_int_internal<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int*)
bool safe_int_internal(string text, IntType* value_p) { *value_p = 0; bool negative; if (!safe_parse_sign(&text, &negative)) { return false; } if (!negative) { return safe_parse_positive_int(text, value_p); } else { return safe_parse_negative_int(text, value_p); } }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq %rdi, %r14 movl $0x0, (%rsi) movq (%rdi), %rax movq 0x8(%rdi), %rcx leaq (%rax,%rcx), %rsi movq %rax, %rdx testq %rcx, %rcx jle 0x1caf95 movq %rax, %rdx cmpb $0x20, (%rdx) jne 0x1caf95 incq %rdx cmpq %rsi, %rdx jb 0x1caf88 addq %rax, %rcx incq %rcx cmpq %rsi, %rdx jae 0x1cb003 leaq -0x1(%rsi), %rdi decq %rcx cmpb $0x20, -0x1(%rsi) movq %rdi, %rsi je 0x1caf9b movzbl (%rdx), %esi cmpl $0x2d, %esi sete %bpl je 0x1cafc1 cmpl $0x2b, %esi jne 0x1cafcc incq %rdi incq %rdx cmpq %rdi, %rdx jae 0x1cb007 subq %rdx, %rcx subq %rax, %rdx leaq 0x28(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x6d710 movq %r14, %rdi movq %r15, %rsi callq 0x6d8b0 movq (%r15), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x1cafff callq 0x6d670 movb $0x1, %al jmp 0x1cb009 xorl %eax, %eax jmp 0x1cb009 xorl %eax, %eax testb %al, %al je 0x1cb022 testb $0x1, %bpl je 0x1cb026 movq %r14, %rdi movq %rbx, %rsi callq 0x1cb3ea movl %eax, %ebx jmp 0x1cb060 xorl %ebx, %ebx jmp 0x1cb060 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x79bac movq %r14, %rdi movq %rbx, %rsi callq 0x1cb37c movl %eax, %ebx movq (%r14), %rdi cmpq %r15, %rdi je 0x1cb060 callq 0x6d670 movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
bool google::protobuf::safe_uint_internal<unsigned long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long*)
bool safe_uint_internal(string text, IntType* value_p) { *value_p = 0; bool negative; if (!safe_parse_sign(&text, &negative) || negative) { return false; } return safe_parse_positive_int(text, value_p); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq %rdi, %r14 movq $0x0, (%rsi) movq (%rdi), %rax movq 0x8(%rdi), %rcx leaq (%rax,%rcx), %rdi movq %rax, %rdx testq %rcx, %rcx jle 0x1cb2b7 movq %rax, %rdx cmpb $0x20, (%rdx) jne 0x1cb2b7 incq %rdx cmpq %rdi, %rdx jb 0x1cb2aa addq %rax, %rcx incq %rcx movb $0x1, %sil cmpq %rdi, %rdx jae 0x1cb328 leaq -0x1(%rdi), %r8 decq %rcx cmpb $0x20, -0x1(%rdi) movq %r8, %rdi je 0x1cb2bd movzbl (%rdx), %edi cmpl $0x2d, %edi sete %bpl je 0x1cb2e6 cmpl $0x2b, %edi jne 0x1cb2f1 incq %r8 incq %rdx cmpq %r8, %rdx jae 0x1cb328 subq %rdx, %rcx subq %rax, %rdx leaq 0x28(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x6d710 movq %r14, %rdi movq %r15, %rsi callq 0x6d8b0 movq (%r15), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x1cb324 callq 0x6d670 xorl %esi, %esi jmp 0x1cb328 orb %sil, %bpl testb $0x1, %bpl je 0x1cb335 xorl %ebx, %ebx jmp 0x1cb36f leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x79bac movq %r14, %rdi movq %rbx, %rsi callq 0x1cb5dd movl %eax, %ebx movq (%r14), %rdi cmpq %r15, %rdi je 0x1cb36f callq 0x6d670 movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
bool google::protobuf::safe_parse_negative_int<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long*)
char *InternalFastHexToBuffer(uint64 value, char* buffer, int num_byte) { static const char *hexdigits = "0123456789abcdef"; buffer[num_byte] = '\0'; for (int i = num_byte - 1; i >= 0; i--) { #ifdef _M_X64 // MSVC x64 platform has a bug optimizing the uint32(value) in the #else // block. Given that the uint32 cast was to improve performance on 32-bit // platforms, we use 64-bit '&' directly. buffer[i] = hexdigits[value & 0xf]; #else buffer[i] = hexdigits[uint32(value) & 0xf]; #endif value >>= 4; } return buffer; }
pushq %rbx movq 0x8(%rdi), %rcx testq %rcx, %rcx setle %al jle 0x1cb5d4 movq (%rdi), %rdx addq %rdx, %rcx movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000 xorl %edi, %edi movabsq $-0xccccccccccccccd, %r9 # imm = 0xF333333333333333 leaq 0x8(%r8), %r10 movzbl (%rdx), %r11d leal -0x3a(%r11), %ebx cmpb $-0xb, %bl ja 0x1cb58e movq %rdi, (%rsi) jmp 0x1cb596 cmpq %r9, %rdi jg 0x1cb5ab movq %r8, (%rsi) xorl %r11d, %r11d testb %r11b, %r11b je 0x1cb5d9 incq %rdx cmpq %rcx, %rdx setae %al jb 0x1cb57c jmp 0x1cb5d6 addq %rdi, %rdi leaq (%rdi,%rdi,4), %rdi andl $0xf, %r11d movq %r11, %rbx orq %r8, %rbx cmpq %rbx, %rdi jge 0x1cb5cc movq %r8, (%rsi) xorl %r11d, %r11d movq %r10, %rdi jmp 0x1cb599 subq %r11, %rdi movb $0x1, %r11b jmp 0x1cb599 xorl %edi, %edi movq %rdi, (%rsi) andb $0x1, %al popq %rbx retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc
google::protobuf::internal::AnyMetadata::PackFrom(google::protobuf::Message const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void AnyMetadata::PackFrom(const Message& message, const std::string& type_url_prefix) { type_url_->SetNoArena( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString(), GetTypeUrl(message.GetDescriptor()->full_name(), type_url_prefix)); message.SerializeToString(value_->MutableNoArena( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 movq (%rdi), %r12 callq 0x17ce71 movq (%rbx), %rax movq %rbx, %rdi callq *0xa8(%rax) movq 0x8(%rax), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx movq (%r15), %rcx movq 0x8(%r15), %r8 leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x1bb340 leaq 0x525702(%rip), %rsi # 0x6f0e20 movq %r12, %rdi movq %r15, %rdx callq 0x8b052 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1cb73c callq 0x6d670 movq 0x8(%r14), %r14 movq (%r14), %rax cmpq 0x3b7816(%rip), %rax # 0x582f60 jne 0x1cb75b leaq 0x5256cd(%rip), %rsi # 0x6f0e20 movq %r14, %rdi callq 0x8af9a movq (%r14), %rsi movq %rbx, %rdi callq 0x1c6d7c addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1cb788 callq 0x6d670 movq %rbx, %rdi callq 0x6dd70
/google[P]bloaty/third_party/protobuf/src/google/protobuf/any.cc
google::protobuf::internal::AnyMetadata::UnpackTo(google::protobuf::Message*) const
bool AnyMetadata::UnpackTo(Message* message) const { if (!InternalIs(message->GetDescriptor()->full_name())) { return false; } return message->ParseFromString(value_->GetNoArena()); }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rax movq %rsi, %rdi callq *0xa8(%rax) movq 0x8(%rax), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx movq %r14, %rdi callq 0x1bb4c0 testb %al, %al je 0x1cb7d3 movq 0x8(%r14), %rax movq (%rax), %rsi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1c65a8 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/any.cc
google::protobuf::FileDescriptor::SyntaxName(google::protobuf::FileDescriptor::Syntax)
const char* FileDescriptor::SyntaxName(FileDescriptor::Syntax syntax) { switch (syntax) { case SYNTAX_PROTO2: return "proto2"; case SYNTAX_PROTO3: return "proto3"; case SYNTAX_UNKNOWN: return "unknown"; } GOOGLE_LOG(FATAL) << "can't reach here."; return nullptr; }
pushq %rbx subq $0x40, %rsp testl %edi, %edi je 0x1cb8c9 cmpl $0x2, %edi je 0x1cb8c0 cmpl $0x3, %edi jne 0x1cb8d2 leaq 0x2e0fcf(%rip), %rax # 0x4ac88d jmp 0x1cb918 leaq 0x2e0fbf(%rip), %rax # 0x4ac886 jmp 0x1cb918 leaq 0x2de57b(%rip), %rax # 0x4a9e4b jmp 0x1cb918 leaq 0x2e0fbb(%rip), %rdx # 0x4ac894 leaq 0x8(%rsp), %rbx movq %rbx, %rdi movl $0x3, %esi movl $0xe5, %ecx callq 0x18d728 leaq 0x2dfb3e(%rip), %rsi # 0x4ab435 movq %rbx, %rdi callq 0x18d1cc leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x18d2a6 leaq 0x8(%rsp), %rdi callq 0x18d746 xorl %eax, %eax addq $0x40, %rsp popq %rbx retq jmp 0x1cb920 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x18d746 movq %rbx, %rdi callq 0x6dd70 nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc
google::protobuf::DescriptorPool::Tables::RollbackToLastCheckpoint()
void DescriptorPool::Tables::RollbackToLastCheckpoint() { GOOGLE_DCHECK(!checkpoints_.empty()); const CheckPoint& checkpoint = checkpoints_.back(); for (int i = checkpoint.pending_symbols_before_checkpoint; i < symbols_after_checkpoint_.size(); i++) { symbols_by_name_.erase(symbols_after_checkpoint_[i]); } for (int i = checkpoint.pending_files_before_checkpoint; i < files_after_checkpoint_.size(); i++) { files_by_name_.erase(files_after_checkpoint_[i]); } for (int i = checkpoint.pending_extensions_before_checkpoint; i < extensions_after_checkpoint_.size(); i++) { extensions_.erase(extensions_after_checkpoint_[i]); } symbols_after_checkpoint_.resize( checkpoint.pending_symbols_before_checkpoint); files_after_checkpoint_.resize(checkpoint.pending_files_before_checkpoint); extensions_after_checkpoint_.resize( checkpoint.pending_extensions_before_checkpoint); strings_.resize(checkpoint.strings_before_checkpoint); messages_.resize(checkpoint.messages_before_checkpoint); once_dynamics_.resize(checkpoint.once_dynamics_before_checkpoint); file_tables_.resize(checkpoint.file_tables_before_checkpoint); allocations_.resize(checkpoint.allocations_before_checkpoint); checkpoints_.pop_back(); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx movq 0x1e0(%rdi), %r12 movq 0x1f0(%rdi), %rsi movslq -0xc(%r12), %r15 movq 0x1f8(%rdi), %rax subq %rsi, %rax sarq $0x3, %rax cmpq %r15, %rax jbe 0x1cc1c5 leaq 0x138(%rbx), %r14 leaq (,%r15,8), %r13 addq %r13, %rsi movq %r14, %rdi callq 0x1eab1a incq %r15 movq 0x1f0(%rbx), %rsi movq 0x1f8(%rbx), %rax subq %rsi, %rax sarq $0x3, %rax addq $0x8, %r13 cmpq %r15, %rax ja 0x1cc199 movslq -0x8(%r12), %r15 movq 0x208(%rbx), %rsi movq 0x210(%rbx), %rax subq %rsi, %rax sarq $0x3, %rax cmpq %r15, %rax jbe 0x1cc21f leaq 0x170(%rbx), %r14 leaq (,%r15,8), %r13 addq %r13, %rsi movq %r14, %rdi callq 0x1eac2c incq %r15 movq 0x208(%rbx), %rsi movq 0x210(%rbx), %rax subq %rsi, %rax sarq $0x3, %rax addq $0x8, %r13 cmpq %r15, %rax ja 0x1cc1f3 movslq -0x4(%r12), %r15 movq 0x220(%rbx), %rsi movq 0x228(%rbx), %rax subq %rsi, %rax sarq $0x4, %rax cmpq %r15, %rax jbe 0x1cc283 leaq 0x1a8(%rbx), %r14 movq %r15, %r13 shlq $0x4, %r13 addq %r13, %rsi movq %r14, %rdi callq 0x1ead3e movq %r14, %rdi movq %rax, %rsi callq 0x1eae20 incq %r15 movq 0x220(%rbx), %rsi movq 0x228(%rbx), %rax subq %rsi, %rax sarq $0x4, %rax addq $0x10, %r13 cmpq %r15, %rax ja 0x1cc24c leaq 0x208(%rbx), %r14 leaq 0x1f0(%rbx), %rdi leaq 0x220(%rbx), %r15 movslq -0xc(%r12), %rsi callq 0x1e83a8 movslq -0x8(%r12), %rsi movq %r14, %rdi callq 0x1e83a8 movslq -0x4(%r12), %rsi movq %r15, %rdi callq 0x1e83da leaq 0xd8(%rbx), %rdi movslq -0x20(%r12), %rsi callq 0x1e840e leaq 0xf0(%rbx), %rdi movslq -0x1c(%r12), %rsi callq 0x1e8438 leaq 0x108(%rbx), %rdi movslq -0x18(%r12), %rsi callq 0x1e84b0 leaq 0x120(%rbx), %rdi movslq -0x14(%r12), %rsi callq 0x1e8528 leaq 0xc0(%rbx), %rdi movslq -0x10(%r12), %rsi callq 0x1e8592 addq $-0x20, 0x1e0(%rbx) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc
google::protobuf::DescriptorPool::TryFindSymbolInFallbackDatabase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
bool DescriptorPool::TryFindSymbolInFallbackDatabase( const std::string& name) const { if (fallback_database_ == nullptr) return false; if (tables_->known_bad_symbols_.count(name) > 0) return false; FileDescriptorProto file_proto; if ( // We skip looking in the fallback database if the name is a sub-symbol // of any descriptor that already exists in the descriptor pool (except // for package descriptors). This is valid because all symbols except // for packages are defined in a single file, so if the symbol exists // then we should already have its definition. // // The other reason to do this is to support "overriding" type // definitions by merging two databases that define the same type. (Yes, // people do this.) The main difficulty with making this work is that // FindFileContainingSymbol() is allowed to return both false positives // (e.g., SimpleDescriptorDatabase, UpgradedDescriptorDatabase) and // false negatives (e.g. ProtoFileParser, SourceTreeDescriptorDatabase). // When two such databases are merged, looking up a non-existent // sub-symbol of a type that already exists in the descriptor pool can // result in an attempt to load multiple definitions of the same type. // The check below avoids this. IsSubSymbolOfBuiltType(name) // Look up file containing this symbol in fallback database. || !fallback_database_->FindFileContainingSymbol(name, &file_proto) // Check if we've already built this file. If so, it apparently doesn't // contain the symbol we're looking for. Some DescriptorDatabases // return false positives. || tables_->FindFile(file_proto.name()) != nullptr // Build the file. || BuildFileFromDatabase(file_proto) == nullptr) { tables_->known_bad_symbols_.insert(name); return false; } return true; }
pushq %rbp pushq %r14 pushq %rbx subq $0xe0, %rsp cmpq $0x0, 0x8(%rdi) je 0x1cc4ee movq %rsi, %rbx movq %rdi, %r14 movq 0x20(%rdi), %rdi addq $0x50, %rdi callq 0x1ece94 testq %rax, %rax je 0x1cc4f5 xorl %ebp, %ebp jmp 0x1cc586 leaq 0x8(%rsp), %rdi callq 0x1f1e26 movq %r14, %rdi movq %rbx, %rsi callq 0x1cf246 testb %al, %al jne 0x1cc564 movq 0x8(%r14), %rdi movq (%rdi), %rax leaq 0x8(%rsp), %rdx movq %rbx, %rsi callq *0x18(%rax) testb %al, %al je 0x1cc564 movl $0x170, %edi # imm = 0x170 addq 0x20(%r14), %rdi movq 0xb8(%rsp), %rax movq (%rax), %rax movq %rsp, %rsi movq %rax, (%rsi) callq 0x1e9cf8 testq %rax, %rax je 0x1cc54f cmpq $0x0, 0x10(%rax) jne 0x1cc564 leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x1cf1a8 movb $0x1, %bpl testq %rax, %rax jne 0x1cc57c movq 0x20(%r14), %rdi addq $0x50, %rdi movq %rsp, %rdx movq %rdi, (%rdx) movq %rbx, %rsi callq 0x1ecf90 xorl %ebp, %ebp leaq 0x8(%rsp), %rdi callq 0x1f257a movl %ebp, %eax addq $0xe0, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x1f257a movq %rbx, %rdi callq 0x6dd70 nop
/google[P]bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc
google::protobuf::FileDescriptorTables::FieldsByLowercaseNamesLazyInitInternal() const
void FileDescriptorTables::FieldsByLowercaseNamesLazyInitInternal() const { for (FieldsByNumberMap::const_iterator it = fields_by_number_.begin(); it != fields_by_number_.end(); it++) { PointerStringPair lowercase_key(FindParentForFieldsByMap(it->second), it->second->lowercase_name().c_str()); InsertIfNotPresent(&fields_by_lowercase_name_, lowercase_key, it->second); } }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq 0xd8(%rdi), %r15 testq %r15, %r15 je 0x1cc637 movq %rdi, %rbx addq $0x38, %rbx movq %rsp, %r14 movq 0x18(%r15), %rax movl $0x50, %ecx cmpb $0x1, 0x42(%rax) jne 0x1cc60c movq 0x60(%rax), %rcx testq %rcx, %rcx jne 0x1cc610 movl $0x28, %ecx movq (%rax,%rcx), %rcx leaq 0x18(%r15), %rdx movq 0x10(%rax), %rax movq (%rax), %rax movq %rcx, (%rsp) movq %rax, 0x8(%rsp) movq %rbx, %rdi movq %r14, %rsi callq 0x1cc641 movq (%r15), %r15 testq %r15, %r15 jne 0x1cc5ef addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc
google::protobuf::DescriptorPool::Tables::AddSymbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Symbol)
bool DescriptorPool::Tables::AddSymbol(const std::string& full_name, Symbol symbol) { if (InsertIfNotPresent(&symbols_by_name_, full_name.c_str(), symbol)) { symbols_after_checkpoint_.push_back(full_name.c_str()); return true; } else { return false; } }
pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 movq %rdi, %rbx addq $0x138, %rdi # imm = 0x138 movq (%rsi), %rax movq %rsp, %rsi movq %rax, (%rsi) movl %edx, 0x8(%rsi) movq %rcx, 0x10(%rsi) leaq 0x18(%rsp), %rdx movq %rdi, (%rdx) callq 0x1eb88a movl %edx, %ebp testb $0x1, %dl je 0x1cc969 movq (%r14), %rax movq %rax, (%rsp) movq 0x1f8(%rbx), %rsi cmpq 0x200(%rbx), %rsi je 0x1cc957 movq %rax, (%rsi) addq $0x8, 0x1f8(%rbx) jmp 0x1cc969 addq $0x1f0, %rbx # imm = 0x1F0 movq %rsp, %rdx movq %rbx, %rdi callq 0x1ebb30 andb $0x1, %bpl movl %ebp, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq
/google[P]bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc