name
stringlengths
1
473k
code
stringlengths
7
647k
asm
stringlengths
4
3.39M
file
stringlengths
8
196
ncnn::Quantize::forward(ncnn::Mat const&, ncnn::Mat&, ncnn::Option const&) const
int Quantize::forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const { const int dims = bottom_blob.dims; const int w = bottom_blob.w; const int h = bottom_blob.h; const int channels = bottom_blob.c; if (dims == 1) { top_blob.create(w, (size_t)1u, opt.blob_allocator); if (top_blob.empty()) return -100; // assert scale_data_size == 1 const float* ptr = bottom_blob; signed char* s8ptr = top_blob; const float scale = scale_data[0]; quantize(ptr, s8ptr, scale, w); } if (dims == 2) { top_blob.create(w, h, (size_t)1u, opt.blob_allocator); if (top_blob.empty()) return -100; #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < h; i++) { const float* ptr = bottom_blob.row(i); signed char* s8ptr = top_blob.row<signed char>(i); const float scale = scale_data_size == 1 ? scale_data[0] : scale_data[i]; quantize(ptr, s8ptr, scale, w); } } if (dims == 3) { top_blob.create(w, h, channels, (size_t)1u, opt.blob_allocator); if (top_blob.empty()) return -100; #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < channels; q++) { const float* ptr = bottom_blob.channel(q); signed char* s8ptr = top_blob.channel(q); const float scale = scale_data_size == 1 ? scale_data[0] : scale_data[q]; quantize(ptr, s8ptr, scale, w * h); } } return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, 0x10(%rsp) movl 0x28(%rsi), %edx movl 0x2c(%rsi), %r12d movl 0x30(%rsi), %r13d xorl %eax, %eax cmpl $0x3, %edx movq %rbx, 0x20(%rsp) je 0x343c6a cmpl $0x2, %edx je 0x343b72 cmpl $0x1, %edx jne 0x343d65 movq 0x8(%rcx), %rcx movl $0x1, %edx movq %rbx, %rdi movl %r12d, %esi callq 0x2aeaa movq (%rbx), %r13 movl $0xffffff9c, %eax # imm = 0xFFFFFF9C testq %r13, %r13 je 0x343d65 movslq 0x38(%rbx), %rcx imulq 0x40(%rbx), %rcx testq %rcx, %rcx je 0x343d65 movl $0x0, %eax testl %r12d, %r12d jle 0x343d65 movq 0x10(%rsp), %rax movq 0xd8(%rax), %rax movss (%rax), %xmm0 movss %xmm0, 0xc(%rsp) movq (%r15), %rbx xorl %r14d, %r14d movss (%rbx,%r14,4), %xmm0 mulss 0xc(%rsp), %xmm0 callq 0x24390 cvttss2si %xmm0, %eax cmpl $-0x7e, %eax jge 0x343b56 movl $0xffffff81, %eax # imm = 0xFFFFFF81 cmpl $0x7f, %eax jl 0x343b60 movl $0x7f, %eax movb %al, (%r13,%r14) incq %r14 cmpl %r14d, %r12d jne 0x343b37 jmp 0x343d63 movq 0x8(%rcx), %r8 movl $0x1, %ecx movq %rbx, %rdi movl %r12d, %esi movl %r13d, %edx callq 0x2afb4 movl $0xffffff9c, %eax # imm = 0xFFFFFF9C cmpq $0x0, (%rbx) je 0x343d65 movslq 0x38(%rbx), %rcx imulq 0x40(%rbx), %rcx testq %rcx, %rcx je 0x343d65 movl $0x0, %eax testl %r13d, %r13d jle 0x343d65 movq %r15, 0x18(%rsp) xorl %ebp, %ebp movq 0x10(%rsp), %rax cmpl $0x1, 0xd0(%rax) movl %ebp, %ecx movl $0x0, %eax cmovneq %rcx, %rax testl %r12d, %r12d jle 0x343c59 movq 0x10(%rsp), %rcx movq 0xd8(%rcx), %rcx movss (%rcx,%rax,4), %xmm0 movss %xmm0, 0xc(%rsp) movq 0x20(%rsp), %rsi movslq 0x2c(%rsi), %rax movq 0x18(%rsp), %rdx movslq 0x2c(%rdx), %rcx movq 0x10(%rdx), %r14 imulq %rbp, %r14 imulq %rcx, %r14 addq (%rdx), %r14 movq 0x10(%rsi), %r15 imulq %rbp, %r15 imulq %rax, %r15 addq (%rsi), %r15 xorl %ebx, %ebx movss (%r14,%rbx,4), %xmm0 mulss 0xc(%rsp), %xmm0 callq 0x24390 cvttss2si %xmm0, %eax cmpl $-0x7e, %eax jge 0x343c43 movl $0xffffff81, %eax # imm = 0xFFFFFF81 cmpl $0x7f, %eax jl 0x343c4d movl $0x7f, %eax movb %al, (%r15,%rbx) incq %rbx cmpl %ebx, %r12d jne 0x343c24 incq %rbp cmpq %r13, %rbp jne 0x343bbf jmp 0x343d63 movl 0x38(%r15), %eax movq 0x8(%rcx), %r9 movl $0x1, %r8d movq %rbx, %rdi movl %r12d, %esi movl %r13d, %edx movq %rax, 0x18(%rsp) movl %eax, %ecx callq 0x2b0d2 movl $0xffffff9c, %eax # imm = 0xFFFFFF9C cmpq $0x0, (%rbx) je 0x343d65 movslq 0x38(%rbx), %rcx imulq 0x40(%rbx), %rcx testq %rcx, %rcx je 0x343d65 movl $0x0, %eax cmpl $0x0, 0x18(%rsp) jle 0x343d65 imull %r12d, %r13d xorl %r12d, %r12d movq 0x10(%rsp), %rax cmpl $0x1, 0xd0(%rax) movl %r12d, %ecx movl $0x0, %eax cmovneq %rcx, %rax testl %r13d, %r13d jle 0x343d55 movq 0x10(%rsp), %rcx movq 0xd8(%rcx), %rcx movss (%rcx,%rax,4), %xmm0 movss %xmm0, 0xc(%rsp) movq 0x20(%rsp), %rax movq 0x40(%rax), %rbp movq 0x40(%r15), %r14 imulq 0x10(%r15), %r14 imulq %r12, %r14 addq (%r15), %r14 imulq 0x10(%rax), %rbp imulq %r12, %rbp addq (%rax), %rbp xorl %ebx, %ebx movss (%r14,%rbx,4), %xmm0 mulss 0xc(%rsp), %xmm0 callq 0x24390 cvttss2si %xmm0, %eax cmpl $-0x7e, %eax jge 0x343d3f movl $0xffffff81, %eax # imm = 0xFFFFFF81 cmpl $0x7f, %eax jl 0x343d49 movl $0x7f, %eax movb %al, (%rbp,%rbx) incq %rbx cmpl %ebx, %r13d jne 0x343d20 incq %r12 cmpq 0x18(%rsp), %r12 jne 0x343cc5 xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/Tencent[P]ncnn/src/layer/quantize.cpp
ncnn::Quantize_x86::forward(ncnn::Mat const&, ncnn::Mat&, ncnn::Option const&) const
int Quantize_x86::forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const { const int dims = bottom_blob.dims; const int w = bottom_blob.w; const int h = bottom_blob.h; const int channels = bottom_blob.c; const int elempack = bottom_blob.elempack; if (dims == 1) { int out_elempack = 1; #if __SSE2__ if (opt.use_packing_layout) { out_elempack = w * elempack % 8 == 0 ? 8 : 1; } #endif const int outw = w * elempack / out_elempack; const size_t out_elemsize = out_elempack * 1u; top_blob.create(outw, out_elemsize, out_elempack, opt.blob_allocator); if (top_blob.empty()) return -100; const int wp = std::max(1, w / opt.num_threads); const int nn_w = (w + wp - 1) / wp; #pragma omp parallel for num_threads(opt.num_threads) for (int ii = 0; ii < nn_w; ii++) { const int i = ii * wp; const float* ptr = (const float*)bottom_blob + i * elempack; signed char* s8ptr = (signed char*)top_blob + i * elempack; // assert scale_data_size == 1 const int size = std::min(w - i, wp) * elempack; quantize(ptr, s8ptr, scale_data, size, 1); } } if (dims == 2) { int out_elempack = 1; #if __SSE2__ if (opt.use_packing_layout) { out_elempack = h * elempack % 8 == 0 ? 8 : 1; } #endif const int outh = h * elempack / out_elempack; const size_t out_elemsize = out_elempack * 1u; top_blob.create(w, outh, out_elemsize, out_elempack, opt.blob_allocator); if (top_blob.empty()) return -100; #if __SSE2__ #if __AVX512F__ if (elempack == 16 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < h; i++) { const float* ptr = bottom_blob.row(i); signed char* s8ptr0 = top_blob.row<signed char>(i * 2); signed char* s8ptr1 = top_blob.row<signed char>(i * 2 + 1); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * elempack, elempack) : scale_data; quantize_pack16to8(ptr, s8ptr0, s8ptr1, scale_data_i, w); } } #endif // __AVX512F__ #if !__AVX__ if (elempack == 4 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < outh; i++) { const float* ptr0 = bottom_blob.row(i * 2); const float* ptr1 = bottom_blob.row(i * 2 + 1); signed char* s8ptr = top_blob.row<signed char>(i); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * out_elempack, out_elempack) : scale_data; quantize_pack4to8(ptr0, ptr1, s8ptr, scale_data_i, w); } } #endif // !__AVX__ if (elempack == 4 && out_elempack == 1) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < h; i++) { const float* ptr = bottom_blob.row(i); signed char* s8ptr0 = top_blob.row<signed char>(i * 4); signed char* s8ptr1 = top_blob.row<signed char>(i * 4 + 1); signed char* s8ptr2 = top_blob.row<signed char>(i * 4 + 2); signed char* s8ptr3 = top_blob.row<signed char>(i * 4 + 3); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * elempack, elempack) : scale_data; quantize_pack4to1(ptr, s8ptr0, s8ptr1, s8ptr2, s8ptr3, scale_data_i, w); } } #endif // __SSE2__ if (elempack == out_elempack) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < h; i++) { const float* ptr = bottom_blob.row(i); signed char* s8ptr = top_blob.row<signed char>(i); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * elempack, elempack) : scale_data; quantize(ptr, s8ptr, scale_data_i, w, elempack); } } } if (dims == 3) { int out_elempack = 1; #if __SSE2__ if (opt.use_packing_layout) { out_elempack = channels * elempack % 8 == 0 ? 8 : 1; } #endif const int outc = channels * elempack / out_elempack; const size_t out_elemsize = out_elempack * 1u; top_blob.create(w, h, outc, out_elemsize, out_elempack, opt.blob_allocator); if (top_blob.empty()) return -100; #if __SSE2__ #if __AVX512F__ if (elempack == 16 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < channels; q++) { const float* ptr = bottom_blob.channel(q); signed char* s8ptr0 = top_blob.channel(q * 2); signed char* s8ptr1 = top_blob.channel(q * 2 + 1); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * elempack, elempack) : scale_data; quantize_pack16to8(ptr, s8ptr0, s8ptr1, scale_data_q, w * h); } } #endif // __AVX512F__ #if !__AVX__ if (elempack == 4 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < outc; q++) { const float* ptr0 = bottom_blob.channel(q * 2); const float* ptr1 = bottom_blob.channel(q * 2 + 1); signed char* s8ptr = top_blob.channel(q); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * out_elempack, out_elempack) : scale_data; quantize_pack4to8(ptr0, ptr1, s8ptr, scale_data_q, w * h); } } #endif // !__AVX__ if (elempack == 4 && out_elempack == 1) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < channels; q++) { const float* ptr = bottom_blob.channel(q); signed char* s8ptr0 = top_blob.channel(q * 4); signed char* s8ptr1 = top_blob.channel(q * 4 + 1); signed char* s8ptr2 = top_blob.channel(q * 4 + 2); signed char* s8ptr3 = top_blob.channel(q * 4 + 3); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * elempack, elempack) : scale_data; quantize_pack4to1(ptr, s8ptr0, s8ptr1, s8ptr2, s8ptr3, scale_data_q, w * h); } } #endif // __SSE2__ if (elempack == out_elempack) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < channels; q++) { const float* ptr = bottom_blob.channel(q); signed char* s8ptr = top_blob.channel(q); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * elempack, elempack) : scale_data; quantize(ptr, s8ptr, scale_data_q, w * h, elempack); } } } return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, %rbp movq %rdx, %r15 movq %rsi, %r12 movq %rdi, 0x20(%rsp) movl 0x18(%rsi), %ecx movl 0x28(%rsi), %eax movl 0x2c(%rsi), %esi movl 0x30(%r12), %edx movq %rdx, 0x10(%rsp) movl %ecx, 0x8(%rsp) movslq %ecx, %r14 xorl %edx, %edx cmpl $0x3, %eax movq %r12, 0x28(%rsp) movq %r14, 0x40(%rsp) movq %rsi, 0x18(%rsp) je 0x344189 cmpl $0x2, %eax je 0x344011 cmpl $0x1, %eax jne 0x344793 movl 0x8(%rsp), %eax imull %esi, %eax cmpb $0x0, 0x27(%rbp) movl $0x8, %ecx movl $0x1, %edx cmovel %edx, %ecx testb $0x7, %al cmovnel %edx, %ecx cltd idivl %ecx movq 0x8(%rbp), %r8 movq %r15, %rdi movl %eax, %esi movq %rcx, %rdx callq 0x29e6a movl $0xffffff9c, %edx # imm = 0xFFFFFF9C cmpq $0x0, (%r15) je 0x344793 movslq 0x38(%r15), %rax imulq 0x40(%r15), %rax testq %rax, %rax movq 0x20(%rsp), %r9 je 0x344793 movq 0x18(%rsp), %rcx movl %ecx, %eax cltd idivl 0x4(%rbp) cmpl $0x2, %eax movl $0x1, %ebx cmovgel %eax, %ebx leal (%rcx,%rbx), %eax decl %eax cltd idivl %ebx movl $0x0, %edx testl %eax, %eax jle 0x344793 movl %ebx, %ecx movl %eax, %ebp imulq %rcx, %r14 movq %r14, 0x40(%rsp) leaq (,%r14,4), %rax movq %rax, 0x10(%rsp) xorl %r13d, %r13d xorl %r14d, %r14d movq 0x18(%rsp), %r8 movq (%r12), %rdi addq %r14, %rdi movq (%r15), %rsi addq %r13, %rsi movq %r15, %r12 movl %ebx, %r15d subl %r8d, %r15d cmovll %ebx, %r8d negl %r15d imull 0x8(%rsp), %r8d movq 0xd8(%r9), %rdx movl 0x104(%r9), %ecx movl $0x1, %r9d callq 0x3447b6 movq 0x20(%rsp), %r9 addq 0x10(%rsp), %r14 addq 0x40(%rsp), %r13 movl %r15d, %r8d movq %r12, %r15 movq 0x28(%rsp), %r12 decq %rbp jne 0x343faf xorl %edx, %edx jmp 0x344793 movl 0x8(%rsp), %eax imull 0x10(%rsp), %eax testb $0x7, %al sete %r14b andb 0x27(%rbp), %r14b movl $0x8, %ecx movl $0x1, %ebx cmovnel %ecx, %ebx cltd idivl %ebx movl %eax, %r13d movq 0x8(%rbp), %r9 movq %r15, %rdi movl %eax, %edx movq %rbx, %rcx movl %ebx, %r8d callq 0x29f78 movl $0xffffff9c, %edx # imm = 0xFFFFFF9C cmpq $0x0, (%r15) je 0x344793 movslq 0x38(%r15), %rax imulq 0x40(%r15), %rax testq %rax, %rax movq 0x20(%rsp), %r10 je 0x344793 movq %rbx, 0x30(%rsp) cmpl $0x4, 0x8(%rsp) setne %al testl %r13d, %r13d setle %cl movb %r14b, 0x38(%rsp) movl %r14d, %edx xorb $0x1, %dl orb %al, %dl orb %cl, %dl movq 0x18(%rsp), %r11 jne 0x344322 movl %r13d, %ebp xorl %ebx, %ebx leaq (%rbx,%rbx), %rdi movq (%r12), %rax movslq 0x2c(%r12), %rcx imulq 0x10(%r12), %rcx imulq %rcx, %rdi addq %rax, %rdi leaq 0x1(,%rbx,2), %rsi imulq %rcx, %rsi addq %rax, %rsi movslq 0x2c(%r15), %rdx imulq %rbx, %rdx imulq 0x10(%r15), %rdx addq (%r15), %rdx cmpl $0x2, 0xd0(%r10) jl 0x344104 movq 0xe8(%r10), %r13 imulq %rbx, %r13 shlq $0x3, %r13 addq 0xd8(%r10), %r13 movl $0x8, %r8d jmp 0x344154 movq 0xd8(%r10), %r13 movq 0xe0(%r10), %r14 movl 0x104(%r10), %r8d testq %r14, %r14 je 0x344154 movq 0xf8(%r10), %rax movq %rax, 0x28(%rsp) lock incl (%r14) movq %r13, %rcx movl %r11d, %r9d callq 0x34493b lock decl (%r14) jne 0x34415f movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x34417a movq (%rdi), %rax movq %r13, %rsi callq *0x18(%rax) jmp 0x34415f movq %r13, %rcx movl %r11d, %r9d callq 0x34493b incq %rbx cmpq %rbp, %rbx movq 0x20(%rsp), %r10 movq 0x18(%rsp), %r11 jne 0x3440a3 jmp 0x344322 testq %r13, %r13 je 0x34415f movq %r13, %rdi callq 0x244a0 jmp 0x34415f movl 0x38(%r12), %ecx movl 0x8(%rsp), %eax movq %rcx, 0x38(%rsp) imull %ecx, %eax testb $0x7, %al sete %cl andb 0x27(%rbp), %cl movb %cl, 0xf(%rsp) movl $0x8, %ecx movl $0x1, %ebx cmovnel %ecx, %ebx cltd idivl %ebx movl %eax, %r14d subq $0x8, %rsp movq %r15, %rdi movq 0x18(%rsp), %rdx movl %eax, %ecx movq %rbx, %r8 movl %ebx, %r9d pushq 0x8(%rbp) callq 0x2a094 addq $0x10, %rsp movl $0xffffff9c, %edx # imm = 0xFFFFFF9C cmpq $0x0, (%r15) je 0x344793 movslq 0x38(%r15), %rax imulq 0x40(%r15), %rax testq %rax, %rax movq 0x20(%rsp), %r11 je 0x344793 movq %rbx, 0x50(%rsp) cmpl $0x4, 0x8(%rsp) setne %al testl %r14d, %r14d setle %cl movb 0xf(%rsp), %dl xorb $0x1, %dl orb %al, %dl orb %cl, %dl jne 0x344444 movq 0x10(%rsp), %rax imull 0x18(%rsp), %eax movl %eax, 0x30(%rsp) movl %r14d, %r13d xorl %ebx, %ebx leaq (%rbx,%rbx), %rdi movq 0x40(%r12), %rax imulq %rax, %rdi movq (%r12), %rcx movq 0x10(%r12), %rdx imulq %rdx, %rdi addq %rcx, %rdi leaq 0x1(,%rbx,2), %rsi imulq %rax, %rsi imulq %rdx, %rsi addq %rcx, %rsi movq 0x40(%r15), %rdx imulq %rbx, %rdx imulq 0x10(%r15), %rdx addq (%r15), %rdx cmpl $0x2, 0xd0(%r11) jl 0x34429e movq 0xe8(%r11), %rbp imulq %rbx, %rbp shlq $0x3, %rbp addq 0xd8(%r11), %rbp movl $0x8, %r8d jmp 0x3442f0 movq 0xd8(%r11), %rbp movq 0xe0(%r11), %r14 movl 0x104(%r11), %r8d testq %r14, %r14 je 0x3442f0 movq 0xf8(%r11), %rax movq %rax, 0x48(%rsp) lock incl (%r14) movq %rbp, %rcx movl 0x30(%rsp), %r9d callq 0x34493b lock decl (%r14) jne 0x3442fd movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x344313 movq (%rdi), %rax movq %rbp, %rsi callq *0x18(%rax) jmp 0x3442fd movq %rbp, %rcx movl 0x30(%rsp), %r9d callq 0x34493b incq %rbx cmpq %r13, %rbx movq 0x20(%rsp), %r11 jne 0x344236 jmp 0x344444 testq %rbp, %rbp je 0x3442fd movq %rbp, %rdi callq 0x244a0 jmp 0x3442fd cmpl $0x4, 0x8(%rsp) sete %al movb 0x38(%rsp), %cl notb %cl andb %al, %cl cmpl $0x0, 0x10(%rsp) setg %al andb %cl, %al cmpb $0x1, %al jne 0x344583 movl $0x3, %ebx xorl %ebp, %ebp movslq 0x2c(%r12), %rdi imulq %rbp, %rdi imulq 0x10(%r12), %rdi leaq -0x3(%rbx), %rax movq (%r15), %r9 movslq 0x2c(%r15), %r8 imulq 0x10(%r15), %r8 movq %r8, %rsi imulq %rax, %rsi addq %r9, %rsi leaq -0x2(%rbx), %rdx imulq %r8, %rdx addq %r9, %rdx leaq -0x1(%rbx), %rcx imulq %r8, %rcx addq %r9, %rcx imulq %rbx, %r8 addq %r9, %r8 movq 0xd8(%r10), %r13 addq (%r12), %rdi cmpl $0x2, 0xd0(%r10) jl 0x3443b8 imulq 0xe8(%r10), %rax addq %rax, %r13 movl $0x4, %eax jmp 0x344405 movq 0xe0(%r10), %r14 movl 0x104(%r10), %eax testq %r14, %r14 je 0x344405 movq 0xf8(%r10), %r9 movq %r9, 0x28(%rsp) lock incl (%r14) movq %r13, %r9 pushq %r11 pushq %rax callq 0x344ab3 addq $0x10, %rsp lock decl (%r14) jne 0x344414 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x344435 movq (%rdi), %rax movq %r13, %rsi callq *0x18(%rax) jmp 0x344414 movq %r13, %r9 pushq %r11 pushq %rax callq 0x344ab3 addq $0x10, %rsp incq %rbp addq $0x4, %rbx cmpq %rbp, 0x10(%rsp) movq 0x20(%rsp), %r10 movq 0x18(%rsp), %r11 jne 0x34434b jmp 0x344583 testq %r13, %r13 je 0x344414 movq %r13, %rdi callq 0x244a0 jmp 0x344414 cmpl $0x4, 0x8(%rsp) sete %al movb 0xf(%rsp), %cl notb %cl andb %al, %cl cmpl $0x0, 0x38(%rsp) setg %al andb %cl, %al cmpb $0x1, %al jne 0x344684 movq 0x10(%rsp), %rax imull 0x18(%rsp), %eax movq %rax, 0x30(%rsp) movl $0x3, %ebp xorl %ebx, %ebx movq 0x40(%r12), %rdi imulq %rbx, %rdi imulq 0x10(%r12), %rdi leaq -0x3(%rbp), %rax movq 0x40(%r15), %r8 movq %r8, %rsi imulq %rax, %rsi movq (%r15), %r9 movq 0x10(%r15), %r10 imulq %r10, %rsi addq %r9, %rsi leaq -0x2(%rbp), %rdx imulq %r8, %rdx imulq %r10, %rdx addq %r9, %rdx leaq -0x1(%rbp), %rcx imulq %r8, %rcx imulq %r10, %rcx addq %r9, %rcx imulq %rbp, %r8 imulq %r10, %r8 addq %r9, %r8 movq 0xd8(%r11), %r13 addq (%r12), %rdi cmpl $0x2, 0xd0(%r11) jl 0x3444f8 imulq 0xe8(%r11), %rax addq %rax, %r13 movl $0x4, %eax jmp 0x344547 movq 0xe0(%r11), %r14 movl 0x104(%r11), %eax testq %r14, %r14 je 0x344547 movq 0xf8(%r11), %r9 movq %r9, 0x48(%rsp) lock incl (%r14) movq %r13, %r9 pushq 0x30(%rsp) pushq %rax callq 0x344ab3 addq $0x10, %rsp lock decl (%r14) jne 0x344558 movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x344574 movq (%rdi), %rax movq %r13, %rsi callq *0x18(%rax) jmp 0x344558 movq %r13, %r9 pushq 0x30(%rsp) pushq %rax callq 0x344ab3 addq $0x10, %rsp incq %rbx addq $0x4, %rbp cmpq %rbx, 0x38(%rsp) movq 0x20(%rsp), %r11 jne 0x34447c jmp 0x344684 testq %r13, %r13 je 0x344558 movq %r13, %rdi callq 0x244a0 jmp 0x344558 cmpl $0x0, 0x10(%rsp) setg %al movq 0x30(%rsp), %rcx cmpl %ecx, 0x8(%rsp) sete %cl andb %al, %cl movl $0x0, %edx cmpb $0x1, %cl jne 0x344793 xorl %ebx, %ebx xorl %ebp, %ebp movl 0x8(%rsp), %r9d movq 0x18(%rsp), %r8 movslq 0x2c(%r12), %rdi imulq %rbp, %rdi imulq 0x10(%r12), %rdi addq (%r12), %rdi movslq 0x2c(%r15), %rsi imulq %rbp, %rsi imulq 0x10(%r15), %rsi addq (%r15), %rsi cmpl $0x2, 0xd0(%r10) jl 0x3445f9 movq 0xe8(%r10), %r13 imulq %rbx, %r13 addq 0xd8(%r10), %r13 movl %r9d, %ecx jmp 0x344646 movq 0xd8(%r10), %r13 movq 0xe0(%r10), %r14 movl 0x104(%r10), %ecx testq %r14, %r14 je 0x344646 movq 0xf8(%r10), %rax movq %rax, 0x28(%rsp) lock incl (%r14) movq %r13, %rdx callq 0x3447b6 lock decl (%r14) jne 0x34464e movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x344675 movq (%rdi), %rax movq %r13, %rsi callq *0x18(%rax) jmp 0x34464e movq %r13, %rdx callq 0x3447b6 incq %rbp addq 0x40(%rsp), %rbx cmpq %rbp, 0x10(%rsp) movq 0x20(%rsp), %r10 movl 0x8(%rsp), %r9d movq 0x18(%rsp), %r8 jne 0x3445b5 jmp 0x34400a testq %r13, %r13 je 0x34464e movq %r13, %rdi callq 0x244a0 jmp 0x34464e cmpl $0x0, 0x38(%rsp) setg %al movq 0x50(%rsp), %rcx cmpl %ecx, 0x8(%rsp) sete %cl andb %al, %cl movl $0x0, %edx cmpb $0x1, %cl jne 0x344793 movq 0x10(%rsp), %rax imull 0x18(%rsp), %eax movq %rax, 0x10(%rsp) xorl %ebx, %ebx xorl %ebp, %ebp movl 0x8(%rsp), %r9d movq 0x40(%r12), %rdi imulq %rbp, %rdi imulq 0x10(%r12), %rdi addq (%r12), %rdi movq 0x40(%r15), %rsi imulq %rbp, %rsi imulq 0x10(%r15), %rsi addq (%r15), %rsi cmpl $0x2, 0xd0(%r11) jl 0x344704 movq 0xe8(%r11), %r12 imulq %rbx, %r12 addq 0xd8(%r11), %r12 movl %r9d, %ecx jmp 0x344750 movq 0xd8(%r11), %r12 movq 0xe0(%r11), %r14 movl 0x104(%r11), %ecx testq %r14, %r14 je 0x344750 movq 0xf8(%r11), %r13 lock incl (%r14) movq %r12, %rdx movq 0x10(%rsp), %r8 callq 0x3447b6 lock decl (%r14) jne 0x34475d testq %r13, %r13 je 0x344784 movq (%r13), %rax movq %r13, %rdi movq %r12, %rsi callq *0x18(%rax) jmp 0x34475d movq %r12, %rdx movq 0x10(%rsp), %r8 callq 0x3447b6 incq %rbp addq 0x40(%rsp), %rbx cmpq %rbp, 0x38(%rsp) movq 0x28(%rsp), %r12 movq 0x20(%rsp), %r11 movl 0x8(%rsp), %r9d jne 0x3446c0 jmp 0x34400a testq %r12, %r12 je 0x34475d movq %r12, %rdi callq 0x244a0 jmp 0x34475d movl %edx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3447ae jmp 0x3447ae jmp 0x3447ae jmp 0x3447ae jmp 0x3447ae movq %rax, %rdi callq 0x2953f
/Tencent[P]ncnn/src/layer/x86/quantize_x86.cpp
ncnn::Quantize_x86_avx512::forward(ncnn::Mat const&, ncnn::Mat&, ncnn::Option const&) const
int Quantize_x86_avx512::forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const { const int dims = bottom_blob.dims; const int w = bottom_blob.w; const int h = bottom_blob.h; const int channels = bottom_blob.c; const int elempack = bottom_blob.elempack; if (dims == 1) { int out_elempack = 1; #if __SSE2__ if (opt.use_packing_layout) { out_elempack = w * elempack % 8 == 0 ? 8 : 1; } #endif const int outw = w * elempack / out_elempack; const size_t out_elemsize = out_elempack * 1u; top_blob.create(outw, out_elemsize, out_elempack, opt.blob_allocator); if (top_blob.empty()) return -100; const int wp = std::max(1, w / opt.num_threads); const int nn_w = (w + wp - 1) / wp; #pragma omp parallel for num_threads(opt.num_threads) for (int ii = 0; ii < nn_w; ii++) { const int i = ii * wp; const float* ptr = (const float*)bottom_blob + i * elempack; signed char* s8ptr = (signed char*)top_blob + i * elempack; // assert scale_data_size == 1 const int size = std::min(w - i, wp) * elempack; quantize(ptr, s8ptr, scale_data, size, 1); } } if (dims == 2) { int out_elempack = 1; #if __SSE2__ if (opt.use_packing_layout) { out_elempack = h * elempack % 8 == 0 ? 8 : 1; } #endif const int outh = h * elempack / out_elempack; const size_t out_elemsize = out_elempack * 1u; top_blob.create(w, outh, out_elemsize, out_elempack, opt.blob_allocator); if (top_blob.empty()) return -100; #if __SSE2__ #if __AVX512F__ if (elempack == 16 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < h; i++) { const float* ptr = bottom_blob.row(i); signed char* s8ptr0 = top_blob.row<signed char>(i * 2); signed char* s8ptr1 = top_blob.row<signed char>(i * 2 + 1); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * elempack, elempack) : scale_data; quantize_pack16to8(ptr, s8ptr0, s8ptr1, scale_data_i, w); } } #endif // __AVX512F__ #if !__AVX__ if (elempack == 4 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < outh; i++) { const float* ptr0 = bottom_blob.row(i * 2); const float* ptr1 = bottom_blob.row(i * 2 + 1); signed char* s8ptr = top_blob.row<signed char>(i); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * out_elempack, out_elempack) : scale_data; quantize_pack4to8(ptr0, ptr1, s8ptr, scale_data_i, w); } } #endif // !__AVX__ if (elempack == 4 && out_elempack == 1) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < h; i++) { const float* ptr = bottom_blob.row(i); signed char* s8ptr0 = top_blob.row<signed char>(i * 4); signed char* s8ptr1 = top_blob.row<signed char>(i * 4 + 1); signed char* s8ptr2 = top_blob.row<signed char>(i * 4 + 2); signed char* s8ptr3 = top_blob.row<signed char>(i * 4 + 3); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * elempack, elempack) : scale_data; quantize_pack4to1(ptr, s8ptr0, s8ptr1, s8ptr2, s8ptr3, scale_data_i, w); } } #endif // __SSE2__ if (elempack == out_elempack) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < h; i++) { const float* ptr = bottom_blob.row(i); signed char* s8ptr = top_blob.row<signed char>(i); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * elempack, elempack) : scale_data; quantize(ptr, s8ptr, scale_data_i, w, elempack); } } } if (dims == 3) { int out_elempack = 1; #if __SSE2__ if (opt.use_packing_layout) { out_elempack = channels * elempack % 8 == 0 ? 8 : 1; } #endif const int outc = channels * elempack / out_elempack; const size_t out_elemsize = out_elempack * 1u; top_blob.create(w, h, outc, out_elemsize, out_elempack, opt.blob_allocator); if (top_blob.empty()) return -100; #if __SSE2__ #if __AVX512F__ if (elempack == 16 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < channels; q++) { const float* ptr = bottom_blob.channel(q); signed char* s8ptr0 = top_blob.channel(q * 2); signed char* s8ptr1 = top_blob.channel(q * 2 + 1); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * elempack, elempack) : scale_data; quantize_pack16to8(ptr, s8ptr0, s8ptr1, scale_data_q, w * h); } } #endif // __AVX512F__ #if !__AVX__ if (elempack == 4 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < outc; q++) { const float* ptr0 = bottom_blob.channel(q * 2); const float* ptr1 = bottom_blob.channel(q * 2 + 1); signed char* s8ptr = top_blob.channel(q); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * out_elempack, out_elempack) : scale_data; quantize_pack4to8(ptr0, ptr1, s8ptr, scale_data_q, w * h); } } #endif // !__AVX__ if (elempack == 4 && out_elempack == 1) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < channels; q++) { const float* ptr = bottom_blob.channel(q); signed char* s8ptr0 = top_blob.channel(q * 4); signed char* s8ptr1 = top_blob.channel(q * 4 + 1); signed char* s8ptr2 = top_blob.channel(q * 4 + 2); signed char* s8ptr3 = top_blob.channel(q * 4 + 3); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * elempack, elempack) : scale_data; quantize_pack4to1(ptr, s8ptr0, s8ptr1, s8ptr2, s8ptr3, scale_data_q, w * h); } } #endif // __SSE2__ if (elempack == out_elempack) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < channels; q++) { const float* ptr = bottom_blob.channel(q); signed char* s8ptr = top_blob.channel(q); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * elempack, elempack) : scale_data; quantize(ptr, s8ptr, scale_data_q, w * h, elempack); } } } return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %rbp movq %rdx, %r15 movq %rdi, 0x20(%rsp) movl 0x18(%rsi), %ecx movl 0x28(%rsi), %eax movl 0x2c(%rsi), %r12d movq %rsi, 0x10(%rsp) movl 0x30(%rsi), %edx movq %rdx, 0x8(%rsp) movslq %ecx, %rbx xorl %edx, %edx cmpl $0x3, %eax movl %ecx, 0x4(%rsp) movq %rbx, 0x30(%rsp) je 0x345275 cmpl $0x2, %eax je 0x344f2d cmpl $0x1, %eax jne 0x3455eb movl %ecx, %eax imull %r12d, %eax cmpb $0x0, 0x27(%rbp) movl $0x8, %ecx movl $0x1, %edx cmovel %edx, %ecx testb $0x7, %al cmovnel %edx, %ecx cltd idivl %ecx movq 0x8(%rbp), %r8 movq %r15, %rdi movl %eax, %esi movq %rcx, %rdx callq 0x29e6a movl $0xffffff9c, %edx # imm = 0xFFFFFF9C cmpq $0x0, (%r15) je 0x3455eb movslq 0x38(%r15), %rax imulq 0x40(%r15), %rax testq %rax, %rax movq 0x20(%rsp), %r8 je 0x3455eb movl %r12d, %eax cltd idivl 0x4(%rbp) cmpl $0x2, %eax movl $0x1, %ecx cmovgel %eax, %ecx leal (%r12,%rcx), %eax decl %eax cltd movq %rcx, 0x8(%rsp) idivl %ecx movl $0x0, %edx testl %eax, %eax jle 0x3455eb movl 0x8(%rsp), %ecx movl %eax, %r14d imulq %rcx, %rbx movq %rbx, 0x30(%rsp) leaq (,%rbx,4), %rax movq %rax, 0x18(%rsp) xorl %r13d, %r13d xorl %ebp, %ebp movq 0x10(%rsp), %rax movq (%rax), %rdi addq %rbp, %rdi movq (%r15), %rsi addq %r13, %rsi movq %r15, %rbx movq 0x8(%rsp), %rax movl %eax, %r15d subl %r12d, %r15d cmovll %eax, %r12d negl %r15d imull 0x4(%rsp), %r12d movq 0xd8(%r8), %rdx movl 0x104(%r8), %ecx movl %r12d, %r8d movl $0x1, %r9d callq 0x345849 movq 0x20(%rsp), %r8 addq 0x18(%rsp), %rbp addq 0x30(%rsp), %r13 movl %r15d, %r12d movq %rbx, %r15 decq %r14 jne 0x344ec4 xorl %edx, %edx jmp 0x3455eb movl %ecx, %eax imull 0x8(%rsp), %eax testb $0x7, %al sete %r14b andb 0x27(%rbp), %r14b movl $0x8, %ecx movl $0x1, %ebx cmovnel %ecx, %ebx cltd idivl %ebx movq 0x8(%rbp), %r9 movq %r15, %rdi movl %r12d, %esi movl %eax, %edx movq %rbx, %rcx movl %ebx, %r8d callq 0x29f78 movl $0xffffff9c, %edx # imm = 0xFFFFFF9C cmpq $0x0, (%r15) je 0x3455eb movslq 0x38(%r15), %rax imulq 0x40(%r15), %rax testq %rax, %rax movq 0x20(%rsp), %r11 je 0x3455eb movq %rbx, 0x28(%rsp) cmpl $0x10, 0x4(%rsp) sete %al cmpl $0x0, 0x8(%rsp) setg %cl andb %al, %cl andb %r14b, %cl cmpb $0x1, %cl jne 0x34513f movl $0x1, %r13d vpbroadcastd 0x160116(%rip), %zmm3 # 0x4a50d4 vpbroadcastd 0x161cbc(%rip), %zmm4 # 0x4a6c84 xorl %ebp, %ebp vpbroadcastb 0x16c971(%rip), %xmm5 # 0x4b1944 xorl %ebx, %ebx movq 0x10(%rsp), %rdx movslq 0x2c(%rdx), %rax imulq %rbx, %rax imulq 0x10(%rdx), %rax movq (%r15), %r8 movq 0x10(%r15), %rcx movslq 0x2c(%r15), %r9 addq (%rdx), %rax cmpl $0x2, 0xd0(%r11) jl 0x345020 movq 0xe8(%r11), %rsi imulq %rbx, %rsi shlq $0x4, %rsi addq 0xd8(%r11), %rsi movq 0xf8(%r11), %rdi xorl %edx, %edx jmp 0x34504a movq 0xd8(%r11), %rsi movq 0xe0(%r11), %rdx movq 0xf8(%r11), %rdi movl 0x104(%r11), %r10d testq %rdx, %rdx je 0x345044 lock incl (%rdx) cmpl $0x2, %r10d jl 0x345052 vmovups (%rsi), %zmm0 jmp 0x345058 vbroadcastss (%rsi), %zmm0 testl %r12d, %r12d jle 0x3450c0 movq %rcx, %r10 imulq %rbp, %r10 imulq %r9, %r10 addq %r8, %r10 imulq %r13, %rcx imulq %r9, %rcx addq %r8, %rcx xorl %r8d, %r8d vmulps (%rax), %zmm0, %zmm1 vmovdqa64 %zmm3, %zmm2 vpternlogd $0xf8, %zmm4, %zmm1, %zmm2 vaddps %zmm2, %zmm1, %zmm1 vcvttps2dq %zmm1, %zmm1 vpmovsdb %zmm1, %xmm1 vpmaxsb %xmm5, %xmm1, %xmm1 vmovq %xmm1, (%r10,%r8,8) vpshufd $0x4e, %xmm1, %xmm1 # xmm1 = xmm1[2,3,0,1] vmovq %xmm1, (%rcx,%r8,8) addq $0x40, %rax incq %r8 cmpl %r8d, %r12d jne 0x345079 testq %rdx, %rdx je 0x345129 lock decl (%rdx) jne 0x345129 testq %rdi, %rdi je 0x3450fc movq (%rdi), %rax vzeroupper callq *0x18(%rax) movq 0x20(%rsp), %r11 vpbroadcastd 0x15ffed(%rip), %zmm3 # 0x4a50d4 vpbroadcastd 0x161b93(%rip), %zmm4 # 0x4a6c84 vpbroadcastb 0x16c84a(%rip), %xmm5 # 0x4b1944 jmp 0x345129 movq %rsi, %rdi vzeroupper callq 0x244a0 movq 0x20(%rsp), %r11 vpbroadcastd 0x15ffbe(%rip), %zmm3 # 0x4a50d4 vpbroadcastd 0x161b64(%rip), %zmm4 # 0x4a6c84 vpbroadcastb 0x16c81b(%rip), %xmm5 # 0x4b1944 incq %rbx addq $0x2, %rbp addq $0x2, %r13 cmpq 0x8(%rsp), %rbx jne 0x344fd5 cmpl $0x4, 0x4(%rsp) setne %al orb %r14b, %al cmpl $0x0, 0x8(%rsp) setle %cl orb %al, %cl movq 0x10(%rsp), %rbp je 0x3455ff cmpl $0x0, 0x8(%rsp) setg %al movq 0x28(%rsp), %rcx cmpl %ecx, 0x4(%rsp) sete %cl andb %al, %cl movl $0x0, %edx cmpb $0x1, %cl jne 0x3455eb xorl %ebx, %ebx xorl %r14d, %r14d movq 0x10(%rsp), %rbp movslq 0x2c(%rbp), %rdi imulq %r14, %rdi imulq 0x10(%rbp), %rdi addq (%rbp), %rdi movslq 0x2c(%r15), %rsi imulq %r14, %rsi imulq 0x10(%r15), %rsi addq (%r15), %rsi cmpl $0x2, 0xd0(%r11) jl 0x3451d4 movq 0xe8(%r11), %r13 imulq %rbx, %r13 addq 0xd8(%r11), %r13 movl 0x4(%rsp), %r9d movl %r9d, %ecx jmp 0x34523b movq 0xd8(%r11), %r13 movq 0xe0(%r11), %rbp movl 0x104(%r11), %ecx testq %rbp, %rbp je 0x345231 movq 0xf8(%r11), %rax movq %rax, 0x18(%rsp) lock incl (%rbp) movq %r13, %rdx movl %r12d, %r8d movl 0x4(%rsp), %r9d vzeroupper callq 0x345849 lock decl (%rbp) movq 0x10(%rsp), %rbp jne 0x345249 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x345266 movq (%rdi), %rax movq %r13, %rsi callq *0x18(%rax) jmp 0x345249 movq 0x10(%rsp), %rbp movl 0x4(%rsp), %r9d movq %r13, %rdx movl %r12d, %r8d vzeroupper callq 0x345849 incq %r14 addq 0x30(%rsp), %rbx cmpq %r14, 0x8(%rsp) movq 0x20(%rsp), %r11 jne 0x34518d jmp 0x344f26 testq %r13, %r13 je 0x345249 movq %r13, %rdi callq 0x244a0 jmp 0x345249 movq 0x10(%rsp), %rax movl 0x38(%rax), %edx movl %ecx, %eax movq %rdx, 0x18(%rsp) imull %edx, %eax testb $0x7, %al sete %r14b andb 0x27(%rbp), %r14b movl $0x8, %ecx movl $0x1, %ebx cmovnel %ecx, %ebx cltd idivl %ebx subq $0x8, %rsp movq %r15, %rdi movl %r12d, %esi movq 0x10(%rsp), %rdx movl %eax, %ecx movq %rbx, %r8 movl %ebx, %r9d pushq 0x8(%rbp) callq 0x2a094 addq $0x10, %rsp movl $0xffffff9c, %edx # imm = 0xFFFFFF9C cmpq $0x0, (%r15) je 0x3455eb movslq 0x38(%r15), %rax imulq 0x40(%r15), %rax testq %rax, %rax movq 0x20(%rsp), %r11 je 0x3455eb movq %rbx, 0x38(%rsp) cmpl $0x10, 0x4(%rsp) sete %al cmpl $0x0, 0x18(%rsp) setg %cl andb %al, %cl movb %r14b, 0x28(%rsp) andb %r14b, %cl cmpb $0x1, %cl jne 0x3454a8 movq 0x8(%rsp), %r13 imull %r12d, %r13d movl $0x1, %ebp vpbroadcastd 0x15fdaa(%rip), %zmm3 # 0x4a50d4 vpbroadcastd 0x161950(%rip), %zmm4 # 0x4a6c84 xorl %ebx, %ebx vpbroadcastb 0x16c605(%rip), %xmm5 # 0x4b1944 xorl %r14d, %r14d movq 0x10(%rsp), %rdx movq 0x40(%rdx), %rax imulq %r14, %rax imulq 0x10(%rdx), %rax movq (%r15), %r8 movq 0x10(%r15), %r9 movq 0x40(%r15), %rcx addq (%rdx), %rax cmpl $0x2, 0xd0(%r11) jl 0x34538d movq 0xe8(%r11), %rsi imulq %r14, %rsi shlq $0x4, %rsi addq 0xd8(%r11), %rsi movq 0xf8(%r11), %rdi xorl %edx, %edx jmp 0x3453b7 movq 0xd8(%r11), %rsi movq 0xe0(%r11), %rdx movq 0xf8(%r11), %rdi movl 0x104(%r11), %r10d testq %rdx, %rdx je 0x3453b1 lock incl (%rdx) cmpl $0x2, %r10d jl 0x3453bf vmovups (%rsi), %zmm0 jmp 0x3453c5 vbroadcastss (%rsi), %zmm0 testl %r13d, %r13d jle 0x345429 imulq %r9, %rcx movq %rcx, %r9 imulq %rbx, %r9 addq %r8, %r9 imulq %rbp, %rcx addq %r8, %rcx xorl %r8d, %r8d vmulps (%rax), %zmm0, %zmm1 vmovdqa64 %zmm3, %zmm2 vpternlogd $0xf8, %zmm4, %zmm1, %zmm2 vaddps %zmm2, %zmm1, %zmm1 vcvttps2dq %zmm1, %zmm1 vpmovsdb %zmm1, %xmm1 vpmaxsb %xmm5, %xmm1, %xmm1 vmovq %xmm1, (%r9,%r8,8) vpshufd $0x4e, %xmm1, %xmm1 # xmm1 = xmm1[2,3,0,1] vmovq %xmm1, (%rcx,%r8,8) addq $0x40, %rax incq %r8 cmpl %r8d, %r13d jne 0x3453e2 testq %rdx, %rdx je 0x345492 lock decl (%rdx) jne 0x345492 testq %rdi, %rdi je 0x345465 movq (%rdi), %rax vzeroupper callq *0x18(%rax) movq 0x20(%rsp), %r11 vpbroadcastd 0x15fc84(%rip), %zmm3 # 0x4a50d4 vpbroadcastd 0x16182a(%rip), %zmm4 # 0x4a6c84 vpbroadcastb 0x16c4e1(%rip), %xmm5 # 0x4b1944 jmp 0x345492 movq %rsi, %rdi vzeroupper callq 0x244a0 movq 0x20(%rsp), %r11 vpbroadcastd 0x15fc55(%rip), %zmm3 # 0x4a50d4 vpbroadcastd 0x1617fb(%rip), %zmm4 # 0x4a6c84 vpbroadcastb 0x16c4b2(%rip), %xmm5 # 0x4b1944 incq %r14 addq $0x2, %rbx addq $0x2, %rbp cmpq 0x18(%rsp), %r14 jne 0x345342 cmpl $0x4, 0x4(%rsp) setne %al orb 0x28(%rsp), %al cmpl $0x0, 0x18(%rsp) setle %cl orb %al, %cl movq 0x10(%rsp), %rbp je 0x345709 cmpl $0x0, 0x18(%rsp) setg %al movq 0x38(%rsp), %rcx cmpl %ecx, 0x4(%rsp) sete %cl andb %al, %cl movl $0x0, %edx cmpb $0x1, %cl jne 0x3455eb movq 0x8(%rsp), %rax imull %r12d, %eax movq %rax, 0x8(%rsp) xorl %ebx, %ebx xorl %r14d, %r14d movq 0x10(%rsp), %rbp movq 0x40(%rbp), %rdi imulq %r14, %rdi imulq 0x10(%rbp), %rdi addq (%rbp), %rdi movq 0x40(%r15), %rsi imulq %r14, %rsi imulq 0x10(%r15), %rsi addq (%r15), %rsi cmpl $0x2, 0xd0(%r11) jl 0x34554c movq 0xe8(%r11), %r12 imulq %rbx, %r12 addq 0xd8(%r11), %r12 movl 0x4(%rsp), %r9d movl %r9d, %ecx jmp 0x3455af movq 0xd8(%r11), %r12 movq 0xe0(%r11), %rbp movl 0x104(%r11), %ecx testq %rbp, %rbp je 0x3455a5 movq 0xf8(%r11), %r13 lock incl (%rbp) movq %r12, %rdx movq 0x8(%rsp), %r8 movl 0x4(%rsp), %r9d vzeroupper callq 0x345849 lock decl (%rbp) movq 0x10(%rsp), %rbp jne 0x3455bf testq %r13, %r13 je 0x3455dc movq (%r13), %rax movq %r13, %rdi movq %r12, %rsi callq *0x18(%rax) jmp 0x3455bf movq 0x10(%rsp), %rbp movl 0x4(%rsp), %r9d movq %r12, %rdx movq 0x8(%rsp), %r8 vzeroupper callq 0x345849 incq %r14 addq 0x30(%rsp), %rbx cmpq %r14, 0x18(%rsp) movq 0x20(%rsp), %r11 jne 0x345505 jmp 0x344f26 testq %r12, %r12 je 0x3455bf movq %r12, %rdi callq 0x244a0 jmp 0x3455bf movl %edx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp vzeroupper retq movl $0x3, %ebx xorl %r14d, %r14d movslq 0x2c(%rbp), %rdi imulq %r14, %rdi imulq 0x10(%rbp), %rdi leaq -0x3(%rbx), %rax movq (%r15), %r9 movslq 0x2c(%r15), %r8 imulq 0x10(%r15), %r8 movq %r8, %rsi imulq %rax, %rsi addq %r9, %rsi leaq -0x2(%rbx), %rdx imulq %r8, %rdx addq %r9, %rdx leaq -0x1(%rbx), %rcx imulq %r8, %rcx addq %r9, %rcx imulq %rbx, %r8 addq %r9, %r8 movq 0xd8(%r11), %r13 addq (%rbp), %rdi cmpl $0x2, 0xd0(%r11) jl 0x345672 imulq 0xe8(%r11), %rax addq %rax, %r13 movl $0x4, %eax jmp 0x3456cc movq 0xe0(%r11), %rbp movl 0x104(%r11), %eax testq %rbp, %rbp je 0x3456c7 movq 0xf8(%r11), %r9 movq %r9, 0x18(%rsp) lock incl (%rbp) movq %r13, %r9 pushq %r12 pushq %rax vzeroupper callq 0x345a3c addq $0x10, %rsp lock decl (%rbp) movq 0x10(%rsp), %rbp jne 0x3456de movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x3456fa movq (%rdi), %rax movq %r13, %rsi callq *0x18(%rax) jmp 0x3456de movq 0x10(%rsp), %rbp movq %r13, %r9 pushq %r12 pushq %rax vzeroupper callq 0x345a3c addq $0x10, %rsp incq %r14 addq $0x4, %rbx cmpq %r14, 0x8(%rsp) movq 0x20(%rsp), %r11 jne 0x345607 jmp 0x34515f testq %r13, %r13 je 0x3456de movq %r13, %rdi callq 0x244a0 jmp 0x3456de movq 0x8(%rsp), %rax imull %r12d, %eax movq %rax, 0x28(%rsp) movl $0x3, %r14d xorl %ebx, %ebx movq 0x40(%rbp), %rdi imulq %rbx, %rdi imulq 0x10(%rbp), %rdi leaq -0x3(%r14), %rax movq 0x40(%r15), %r8 movq %r8, %rsi imulq %rax, %rsi movq (%r15), %r9 movq 0x10(%r15), %r10 imulq %r10, %rsi addq %r9, %rsi leaq -0x2(%r14), %rdx imulq %r8, %rdx imulq %r10, %rdx addq %r9, %rdx leaq -0x1(%r14), %rcx imulq %r8, %rcx imulq %r10, %rcx addq %r9, %rcx imulq %r14, %r8 imulq %r10, %r8 addq %r9, %r8 movq 0xd8(%r11), %r13 addq (%rbp), %rdi cmpl $0x2, 0xd0(%r11) jl 0x345799 imulq 0xe8(%r11), %rax addq %rax, %r13 movl $0x4, %eax jmp 0x3457f5 movq 0xe0(%r11), %rbp movl 0x104(%r11), %eax testq %rbp, %rbp je 0x3457f0 movq 0xf8(%r11), %r9 movq %r9, 0x40(%rsp) lock incl (%rbp) movq %r13, %r9 pushq 0x28(%rsp) pushq %rax vzeroupper callq 0x345a3c addq $0x10, %rsp lock decl (%rbp) movq 0x10(%rsp), %rbp jne 0x345809 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x345825 movq (%rdi), %rax movq %r13, %rsi callq *0x18(%rax) jmp 0x345809 movq 0x10(%rsp), %rbp movq %r13, %r9 pushq 0x28(%rsp) pushq %rax vzeroupper callq 0x345a3c addq $0x10, %rsp incq %rbx addq $0x4, %r14 cmpq %rbx, 0x18(%rsp) movq 0x20(%rsp), %r11 jne 0x34571f jmp 0x3454c9 testq %r13, %r13 je 0x345809 movq %r13, %rdi callq 0x244a0 jmp 0x345809 jmp 0x34583e jmp 0x34583e jmp 0x34583e jmp 0x34583e jmp 0x34583e movq %rax, %rdi vzeroupper callq 0x2953f
/Tencent[P]ncnn/build_O3/src/layer/x86/quantize_x86_avx512.cpp
ncnn::Quantize_x86_fma::forward(ncnn::Mat const&, ncnn::Mat&, ncnn::Option const&) const
int Quantize_x86_fma::forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const { const int dims = bottom_blob.dims; const int w = bottom_blob.w; const int h = bottom_blob.h; const int channels = bottom_blob.c; const int elempack = bottom_blob.elempack; if (dims == 1) { int out_elempack = 1; #if __SSE2__ if (opt.use_packing_layout) { out_elempack = w * elempack % 8 == 0 ? 8 : 1; } #endif const int outw = w * elempack / out_elempack; const size_t out_elemsize = out_elempack * 1u; top_blob.create(outw, out_elemsize, out_elempack, opt.blob_allocator); if (top_blob.empty()) return -100; const int wp = std::max(1, w / opt.num_threads); const int nn_w = (w + wp - 1) / wp; #pragma omp parallel for num_threads(opt.num_threads) for (int ii = 0; ii < nn_w; ii++) { const int i = ii * wp; const float* ptr = (const float*)bottom_blob + i * elempack; signed char* s8ptr = (signed char*)top_blob + i * elempack; // assert scale_data_size == 1 const int size = std::min(w - i, wp) * elempack; quantize(ptr, s8ptr, scale_data, size, 1); } } if (dims == 2) { int out_elempack = 1; #if __SSE2__ if (opt.use_packing_layout) { out_elempack = h * elempack % 8 == 0 ? 8 : 1; } #endif const int outh = h * elempack / out_elempack; const size_t out_elemsize = out_elempack * 1u; top_blob.create(w, outh, out_elemsize, out_elempack, opt.blob_allocator); if (top_blob.empty()) return -100; #if __SSE2__ #if __AVX512F__ if (elempack == 16 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < h; i++) { const float* ptr = bottom_blob.row(i); signed char* s8ptr0 = top_blob.row<signed char>(i * 2); signed char* s8ptr1 = top_blob.row<signed char>(i * 2 + 1); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * elempack, elempack) : scale_data; quantize_pack16to8(ptr, s8ptr0, s8ptr1, scale_data_i, w); } } #endif // __AVX512F__ #if !__AVX__ if (elempack == 4 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < outh; i++) { const float* ptr0 = bottom_blob.row(i * 2); const float* ptr1 = bottom_blob.row(i * 2 + 1); signed char* s8ptr = top_blob.row<signed char>(i); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * out_elempack, out_elempack) : scale_data; quantize_pack4to8(ptr0, ptr1, s8ptr, scale_data_i, w); } } #endif // !__AVX__ if (elempack == 4 && out_elempack == 1) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < h; i++) { const float* ptr = bottom_blob.row(i); signed char* s8ptr0 = top_blob.row<signed char>(i * 4); signed char* s8ptr1 = top_blob.row<signed char>(i * 4 + 1); signed char* s8ptr2 = top_blob.row<signed char>(i * 4 + 2); signed char* s8ptr3 = top_blob.row<signed char>(i * 4 + 3); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * elempack, elempack) : scale_data; quantize_pack4to1(ptr, s8ptr0, s8ptr1, s8ptr2, s8ptr3, scale_data_i, w); } } #endif // __SSE2__ if (elempack == out_elempack) { #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < h; i++) { const float* ptr = bottom_blob.row(i); signed char* s8ptr = top_blob.row<signed char>(i); const Mat scale_data_i = scale_data_size > 1 ? scale_data.range(i * elempack, elempack) : scale_data; quantize(ptr, s8ptr, scale_data_i, w, elempack); } } } if (dims == 3) { int out_elempack = 1; #if __SSE2__ if (opt.use_packing_layout) { out_elempack = channels * elempack % 8 == 0 ? 8 : 1; } #endif const int outc = channels * elempack / out_elempack; const size_t out_elemsize = out_elempack * 1u; top_blob.create(w, h, outc, out_elemsize, out_elempack, opt.blob_allocator); if (top_blob.empty()) return -100; #if __SSE2__ #if __AVX512F__ if (elempack == 16 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < channels; q++) { const float* ptr = bottom_blob.channel(q); signed char* s8ptr0 = top_blob.channel(q * 2); signed char* s8ptr1 = top_blob.channel(q * 2 + 1); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * elempack, elempack) : scale_data; quantize_pack16to8(ptr, s8ptr0, s8ptr1, scale_data_q, w * h); } } #endif // __AVX512F__ #if !__AVX__ if (elempack == 4 && out_elempack == 8) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < outc; q++) { const float* ptr0 = bottom_blob.channel(q * 2); const float* ptr1 = bottom_blob.channel(q * 2 + 1); signed char* s8ptr = top_blob.channel(q); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * out_elempack, out_elempack) : scale_data; quantize_pack4to8(ptr0, ptr1, s8ptr, scale_data_q, w * h); } } #endif // !__AVX__ if (elempack == 4 && out_elempack == 1) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < channels; q++) { const float* ptr = bottom_blob.channel(q); signed char* s8ptr0 = top_blob.channel(q * 4); signed char* s8ptr1 = top_blob.channel(q * 4 + 1); signed char* s8ptr2 = top_blob.channel(q * 4 + 2); signed char* s8ptr3 = top_blob.channel(q * 4 + 3); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * elempack, elempack) : scale_data; quantize_pack4to1(ptr, s8ptr0, s8ptr1, s8ptr2, s8ptr3, scale_data_q, w * h); } } #endif // __SSE2__ if (elempack == out_elempack) { #pragma omp parallel for num_threads(opt.num_threads) for (int q = 0; q < channels; q++) { const float* ptr = bottom_blob.channel(q); signed char* s8ptr = top_blob.channel(q); const Mat scale_data_q = scale_data_size > 1 ? scale_data.range(q * elempack, elempack) : scale_data; quantize(ptr, s8ptr, scale_data_q, w * h, elempack); } } } return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %rbp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, 0x28(%rsp) movl 0x18(%rsi), %r12d movl 0x28(%rsi), %eax movl 0x2c(%rsi), %esi movl 0x30(%r14), %ecx movq %rcx, (%rsp) movslq %r12d, %rbx xorl %edx, %edx cmpl $0x3, %eax movq %r14, 0x10(%rsp) movq %rbx, 0x30(%rsp) movq %rsi, 0x20(%rsp) je 0x34601a cmpl $0x2, %eax je 0x345ea5 cmpl $0x1, %eax jne 0x3461bc movl %r12d, %eax imull %esi, %eax cmpb $0x0, 0x27(%rbp) movl $0x8, %ecx movl $0x1, %edx cmovel %edx, %ecx testb $0x7, %al cmovnel %edx, %ecx cltd idivl %ecx movq 0x8(%rbp), %r8 movq %r15, %rdi movl %eax, %esi movq %rcx, %rdx callq 0x29e6a movl $0xffffff9c, %edx # imm = 0xFFFFFF9C cmpq $0x0, (%r15) je 0x3461bc movslq 0x38(%r15), %rax imulq 0x40(%r15), %rax testq %rax, %rax je 0x3461bc movq 0x20(%rsp), %rcx movl %ecx, %eax cltd idivl 0x4(%rbp) cmpl $0x2, %eax movl $0x1, %esi cmovgel %eax, %esi leal (%rcx,%rsi), %eax decl %eax cltd movq %rsi, (%rsp) idivl %esi movl $0x0, %edx testl %eax, %eax jle 0x3461bc movl (%rsp), %ecx movl %eax, %ebp imulq %rcx, %rbx movq %rbx, 0x30(%rsp) leaq (,%rbx,4), %rax movq %rax, 0x18(%rsp) xorl %r13d, %r13d xorl %r14d, %r14d movl %r12d, 0x8(%rsp) movq 0x28(%rsp), %r12 movq 0x20(%rsp), %r8 movq 0x10(%rsp), %rax movq (%rax), %rdi addq %r14, %rdi movq (%r15), %rsi addq %r13, %rsi movq %r15, %rbx movq (%rsp), %rax movl %eax, %r15d subl %r8d, %r15d cmovll %eax, %r8d negl %r15d imull 0x8(%rsp), %r8d movq 0xd8(%r12), %rdx movl 0x104(%r12), %ecx movl $0x1, %r9d callq 0x346401 addq 0x18(%rsp), %r14 addq 0x30(%rsp), %r13 movl %r15d, %r8d movq %rbx, %r15 decq %rbp jne 0x345e43 xorl %edx, %edx jmp 0x3461bc movl %r12d, %eax imull (%rsp), %eax testb $0x7, %al sete %bl andb 0x27(%rbp), %bl movl $0x8, %ecx movl $0x1, %r13d cmovnel %ecx, %r13d cltd idivl %r13d movq 0x8(%rbp), %r9 movq %r15, %rdi movl %eax, %edx movq %r13, %rcx movl %r13d, %r8d callq 0x29f78 movl $0xffffff9c, %edx # imm = 0xFFFFFF9C cmpq $0x0, (%r15) je 0x3461bc movslq 0x38(%r15), %rax imulq 0x40(%r15), %rax testq %rax, %rax je 0x3461bc movq %r13, 0x18(%rsp) cmpl $0x4, %r12d setne %al cmpl $0x0, (%rsp) setle %cl orb %al, %cl orb %bl, %cl je 0x3461cd cmpl 0x18(%rsp), %r12d sete %al cmpl $0x0, (%rsp) setg %cl andb %al, %cl movl $0x0, %edx cmpb $0x1, %cl jne 0x3461bc xorl %ebx, %ebx xorl %ebp, %ebp movq 0x28(%rsp), %rax movq 0x20(%rsp), %r8 movslq 0x2c(%r14), %rdi imulq %rbp, %rdi imulq 0x10(%r14), %rdi addq (%r14), %rdi movslq 0x2c(%r15), %rsi imulq %rbp, %rsi imulq 0x10(%r15), %rsi addq (%r15), %rsi cmpl $0x2, 0xd0(%rax) jl 0x345f86 movq 0xe8(%rax), %r13 imulq %rbx, %r13 addq 0xd8(%rax), %r13 movl %r12d, %ecx jmp 0x345fdf movq 0xd8(%rax), %r13 movq 0xe0(%rax), %r14 movl 0x104(%rax), %ecx testq %r14, %r14 je 0x345fda movq 0xf8(%rax), %rax movq %rax, 0x8(%rsp) lock incl (%r14) movq %r13, %rdx movl %r12d, %r9d callq 0x346401 lock decl (%r14) movq 0x10(%rsp), %r14 jne 0x345fea movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x34600b movq (%rdi), %rax movq %r13, %rsi callq *0x18(%rax) jmp 0x345fea movq 0x10(%rsp), %r14 movq %r13, %rdx movl %r12d, %r9d callq 0x346401 incq %rbp addq 0x30(%rsp), %rbx cmpq %rbp, (%rsp) movq 0x28(%rsp), %rax movq 0x20(%rsp), %r8 jne 0x345f46 jmp 0x345e9e testq %r13, %r13 je 0x345fea movq %r13, %rdi callq 0x244a0 jmp 0x345fea movl 0x38(%r14), %ecx movl %r12d, %eax movq %rcx, 0x18(%rsp) imull %ecx, %eax testb $0x7, %al sete %bl andb 0x27(%rbp), %bl movl $0x8, %ecx movl $0x1, %r13d cmovnel %ecx, %r13d cltd idivl %r13d subq $0x8, %rsp movq %r15, %rdi movq 0x8(%rsp), %rdx movl %eax, %ecx movq %r13, %r8 movl %r13d, %r9d pushq 0x8(%rbp) callq 0x2a094 addq $0x10, %rsp movl $0xffffff9c, %edx # imm = 0xFFFFFF9C cmpq $0x0, (%r15) je 0x3461bc movslq 0x38(%r15), %rax imulq 0x40(%r15), %rax testq %rax, %rax je 0x3461bc movq %r13, 0x40(%rsp) movl %r12d, 0x8(%rsp) cmpl $0x4, %r12d setne %al cmpl $0x0, 0x18(%rsp) setle %cl orb %al, %cl orb %bl, %cl je 0x3462d6 movl 0x8(%rsp), %eax cmpl 0x40(%rsp), %eax sete %al cmpl $0x0, 0x18(%rsp) setg %cl andb %al, %cl movl $0x0, %edx cmpb $0x1, %cl jne 0x3461bc movq (%rsp), %rax imull 0x20(%rsp), %eax movq %rax, (%rsp) xorl %ebx, %ebx xorl %ebp, %ebp movq 0x28(%rsp), %rax movq 0x40(%r14), %rdi imulq %rbp, %rdi imulq 0x10(%r14), %rdi addq (%r14), %rdi movq 0x40(%r15), %rsi imulq %rbp, %rsi imulq 0x10(%r15), %rsi addq (%r15), %rsi cmpl $0x2, 0xd0(%rax) jl 0x346126 movq 0xe8(%rax), %r12 imulq %rbx, %r12 addq 0xd8(%rax), %r12 movl 0x8(%rsp), %r9d movl %r9d, %ecx jmp 0x346184 movq 0xd8(%rax), %r12 movq 0xe0(%rax), %r14 movl 0x104(%rax), %ecx testq %r14, %r14 je 0x34617a movq 0xf8(%rax), %r13 lock incl (%r14) movq %r12, %rdx movq (%rsp), %r8 movl 0x8(%rsp), %r9d callq 0x346401 lock decl (%r14) movq 0x10(%rsp), %r14 jne 0x346190 testq %r13, %r13 je 0x3461ad movq (%r13), %rax movq %r13, %rdi movq %r12, %rsi callq *0x18(%rax) jmp 0x346190 movq 0x10(%rsp), %r14 movl 0x8(%rsp), %r9d movq %r12, %rdx movq (%rsp), %r8 callq 0x346401 incq %rbp addq 0x30(%rsp), %rbx cmpq %rbp, 0x18(%rsp) movq 0x28(%rsp), %rax jne 0x3460e1 jmp 0x345e9e testq %r12, %r12 je 0x346190 movq %r12, %rdi callq 0x244a0 jmp 0x346190 movl %edx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x3, %ebx xorl %ebp, %ebp movl %r12d, 0x8(%rsp) movslq 0x2c(%r14), %rdi imulq %rbp, %rdi imulq 0x10(%r14), %rdi leaq -0x3(%rbx), %rax movq (%r15), %r9 movslq 0x2c(%r15), %r8 imulq 0x10(%r15), %r8 movq %r8, %rsi imulq %rax, %rsi addq %r9, %rsi leaq -0x2(%rbx), %rdx imulq %r8, %rdx addq %r9, %rdx leaq -0x1(%rbx), %rcx imulq %r8, %rcx addq %r9, %rcx imulq %rbx, %r8 addq %r9, %r8 movq 0x28(%rsp), %r9 movq 0xd8(%r9), %r13 addq (%r14), %rdi cmpl $0x2, 0xd0(%r9) jl 0x346248 imulq 0xe8(%r9), %rax addq %rax, %r13 movl $0x4, %eax jmp 0x34629b movq 0xe0(%r9), %r14 movl 0x104(%r9), %eax testq %r14, %r14 je 0x346296 movq 0xf8(%r9), %r12 lock incl (%r14) movq %r13, %r9 pushq 0x20(%rsp) pushq %rax callq 0x346620 addq $0x10, %rsp lock decl (%r14) movq 0x10(%rsp), %r14 jne 0x3462ac testq %r12, %r12 je 0x3462c7 movq (%r12), %rax movq %r12, %rdi movq %r13, %rsi callq *0x18(%rax) jmp 0x3462ac movq 0x10(%rsp), %r14 movq %r13, %r9 pushq 0x20(%rsp) pushq %rax callq 0x346620 addq $0x10, %rsp incq %rbp addq $0x4, %rbx cmpq %rbp, (%rsp) movl 0x8(%rsp), %r12d jne 0x3461d9 jmp 0x345f19 testq %r13, %r13 je 0x3462ac movq %r13, %rdi callq 0x244a0 jmp 0x3462ac movq (%rsp), %rax imull 0x20(%rsp), %eax movq %rax, 0x38(%rsp) movl $0x3, %ebp xorl %ebx, %ebx movq 0x40(%r14), %rdi imulq %rbx, %rdi imulq 0x10(%r14), %rdi leaq -0x3(%rbp), %rax movq 0x40(%r15), %r8 movq %r8, %rsi imulq %rax, %rsi movq (%r15), %r9 movq 0x10(%r15), %r10 imulq %r10, %rsi addq %r9, %rsi leaq -0x2(%rbp), %rdx imulq %r8, %rdx imulq %r10, %rdx addq %r9, %rdx leaq -0x1(%rbp), %rcx imulq %r8, %rcx imulq %r10, %rcx addq %r9, %rcx imulq %rbp, %r8 imulq %r10, %r8 addq %r9, %r8 movq 0x28(%rsp), %r9 movq 0xd8(%r9), %r13 addq (%r14), %rdi cmpl $0x2, 0xd0(%r9) jl 0x346369 imulq 0xe8(%r9), %rax addq %rax, %r13 movl $0x4, %eax jmp 0x3463bc movq 0xe0(%r9), %r14 movl 0x104(%r9), %eax testq %r14, %r14 je 0x3463b7 movq 0xf8(%r9), %r12 lock incl (%r14) movq %r13, %r9 pushq 0x38(%rsp) pushq %rax callq 0x346620 addq $0x10, %rsp lock decl (%r14) movq 0x10(%rsp), %r14 jne 0x3463cd testq %r12, %r12 je 0x3463e4 movq (%r12), %rax movq %r12, %rdi movq %r13, %rsi callq *0x18(%rax) jmp 0x3463cd movq 0x10(%rsp), %r14 movq %r13, %r9 pushq 0x38(%rsp) pushq %rax callq 0x346620 addq $0x10, %rsp incq %rbx addq $0x4, %rbp cmpq %rbx, 0x18(%rsp) jne 0x3462eb jmp 0x3460a8 testq %r13, %r13 je 0x3463cd movq %r13, %rdi callq 0x244a0 jmp 0x3463cd jmp 0x3463f9 jmp 0x3463f9 jmp 0x3463f9 movq %rax, %rdi callq 0x2953f
/Tencent[P]ncnn/build_O3/src/layer/x86/quantize_x86_fma.cpp
LockSignal_SignalShouldBeLocked()
void LockSignal_SignalShouldBeLocked() { TestRunner::StartTest(MethodName); lsignal::signal<void()> sg; sg.set_lock(true); AssertHelper::VerifyValue(sg.is_locked(), true, "Signal should be locked."); }
pushq %r14 pushq %rbx pushq %rax leaq 0x98d9(%rip), %rdi # 0x14478 callq 0xa4bc movl $0x58, %edi callq 0xa1c0 movq %rax, %rbx movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbx) leaq 0xfd9a(%rip), %rax # 0x1a960 movq %rax, (%rbx) leaq 0x40(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x40(%rbx) movq $0x0, 0x50(%rbx) movb $0x1, 0x38(%rbx) leaq 0x989d(%rip), %rdx # 0x14498 movl $0x1, %edi movl $0x1, %esi callq 0xa5c6 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1043c movq %rax, %r14 movq %rbx, %rdi callq 0x1043c movq %r14, %rdi callq 0xa2d0
/balmerdx[P]lsignal/tests/test_basic.cpp
CallSignalWithoutConnections_SignalShouldBeCalled()
void CallSignalWithoutConnections_SignalShouldBeCalled() { TestRunner::StartTest(MethodName); lsignal::signal<void(int, bool)> sg; int paramOne = 7; bool paramTwo = true; sg(paramOne, paramTwo); }
pushq %r14 pushq %rbx subq $0x18, %rsp leaq 0x9809(%rip), %rdi # 0x144d5 callq 0xa4bc xorl %r14d, %r14d leaq 0x8(%rsp), %rbx movq %r14, (%rbx) movl $0x58, %edi callq 0xa1c0 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0xfcb5(%rip), %rcx # 0x1a9b0 movq %rcx, (%rax) leaq 0x10(%rax), %rcx leaq 0x40(%rax), %rdx xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movq %rdx, 0x48(%rax) movq %rdx, 0x40(%rax) movq %r14, 0x50(%rax) movq %rax, 0x8(%rbx) movq %rcx, (%rbx) movq %rbx, %rdi movl $0x7, %esi movl $0x1, %edx callq 0xf398 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xad4d callq 0x1043c addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xad67 callq 0x1043c movq %rbx, %rdi callq 0xa2d0
/balmerdx[P]lsignal/tests/test_basic.cpp
CallSignalWithSingleConnection_SignalShouldBeCalled()
void CallSignalWithSingleConnection_SignalShouldBeCalled() { TestRunner::StartTest(MethodName); lsignal::signal<void(int, bool)> sg; int paramOne = 7; bool paramTwo = true; bool receiverCalled = false; std::function<void(int, bool)> receiver = [=, &receiverCalled](int p0, bool p1) { receiverCalled = true; AssertHelper::VerifyValue(p0, paramOne, "First parameter should be as expected."); AssertHelper::VerifyValue(p1, paramTwo, "Second parameter should be as expected."); }; sg.connect(receiver, nullptr); sg(paramOne, paramTwo); AssertHelper::VerifyValue(receiverCalled, true, "Receiver should be called."); }
pushq %r14 pushq %rbx subq $0x58, %rsp leaq 0x978a(%rip), %rdi # 0x14507 callq 0xa4bc xorl %r14d, %r14d leaq 0x10(%rsp), %rbx movq %r14, (%rbx) movl $0x58, %edi callq 0xa1c0 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0xfc04(%rip), %rcx # 0x1a9b0 movq %rcx, (%rax) leaq 0x10(%rax), %rcx leaq 0x40(%rax), %rdx xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movq %rdx, 0x48(%rax) movq %rdx, 0x40(%rax) movq %r14, 0x50(%rax) movq %rax, 0x8(%rbx) movq %rcx, (%rbx) leaq 0xf(%rsp), %rax movb $0x0, (%rax) leaq 0x20(%rsp), %rdx movaps %xmm0, (%rdx) movaps %xmm0, 0x10(%rdx) movq %rax, (%rdx) movl $0x7, 0x8(%rdx) movb $0x1, 0xc(%rdx) leaq 0x402e(%rip), %rax # 0xee34 movq %rax, 0x18(%rdx) leaq 0x405b(%rip), %rax # 0xee6c movq %rax, 0x10(%rdx) leaq 0x40(%rsp), %rdi movq %rbx, %rsi xorl %ecx, %ecx callq 0xf4d2 leaq 0x40(%rsp), %rdi callq 0x13634 leaq 0x10(%rsp), %rdi movl $0x7, %esi movl $0x1, %edx callq 0xf398 movzbl 0xf(%rsp), %edi leaq 0x96ed(%rip), %rdx # 0x1453b movl $0x1, %esi callq 0xa5c6 movq 0x30(%rsp), %rax testq %rax, %rax je 0xae71 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0xae80 callq 0x1043c addq $0x58, %rsp popq %rbx popq %r14 retq jmp 0xaebd movq %rax, %rbx movq 0x30(%rsp), %rax testq %rax, %rax je 0xaea6 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0xaeb5 callq 0x1043c movq %rbx, %rdi callq 0xa2d0 movq %rax, %rdi callq 0xa98e
/balmerdx[P]lsignal/tests/test_basic.cpp
TestSignalDestroyListener()
void TestSignalDestroyListener() { TestRunner::StartTest(MethodName); std::vector<TestB*> listeners; TestA ta; const size_t count = 1000; for (size_t i = 0; i < count; i++) { TestB* pb = new TestB(); listeners.push_back(pb); ta.sigA.connect(pb, &TestB::ReceiveSigA, pb); } receiveSigACount = 0; ta.sigA(23); AssertHelper::VerifyValue(count, receiveSigACount, "Verify siga count1"); for (size_t i = 0; i < count; i += 2) { delete listeners[i]; listeners[i] = nullptr; } receiveSigACount = 0; ta.sigA(34); AssertHelper::VerifyValue(count / 2, receiveSigACount, "Verify siga count/2"); receiveSigACount = 0; ta.sigA.disconnect_all(); ta.sigA(45); AssertHelper::VerifyValue(0, receiveSigACount, "Verify disconnect_all"); for (TestB* pb : listeners) delete pb; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp leaq 0x905d(%rip), %rdi # 0x146d1 callq 0xa4bc xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) leaq 0x20(%rsp), %rdi callq 0x136ac leaq 0xf1a6(%rip), %rax # 0x1a840 movq %rax, 0x20(%rsp) movq $0x0, 0x40(%rsp) movl $0x58, %edi callq 0xa1c0 leaq 0x40(%rsp), %rsi movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0xf494(%rip), %rcx # 0x1ab60 movq %rcx, (%rax) leaq 0x10(%rax), %rcx movq %rax, %rdx addq $0x40, %rdx xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movq %rdx, 0x48(%rax) movq %rdx, 0x40(%rax) xorl %edx, %edx movq %rdx, 0x50(%rax) movq %rax, 0x8(%rsi) movq %rcx, (%rsi) leaq 0x60(%rsp), %rax movq %rax, -0x10(%rax) movq %rdx, -0x8(%rax) movb $0x0, (%rax) movl $0x3e8, %r15d # imm = 0x3E8 leaq 0xf159(%rip), %rbx # 0x1a878 leaq 0xf18a(%rip), %r14 # 0x1a8b0 leaq 0x413b(%rip), %r12 # 0xf868 leaq 0x70(%rsp), %r13 movl $0x50, %edi callq 0xa1c0 movq %rax, %rbp xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rax) movaps %xmm0, 0x30(%rax) movaps %xmm0, 0x20(%rax) movaps %xmm0, 0x10(%rax) movaps %xmm0, (%rax) movq %rax, %rdi callq 0x136ac movq %rbx, (%rbp) movq $0x0, 0x20(%rbp) movl $0x58, %edi callq 0xa1c0 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) movq %r14, (%rax) leaq 0x10(%rax), %rcx movq %rax, %rdx addq $0x40, %rdx xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movq %rdx, 0x48(%rax) movq %rdx, 0x40(%rax) movq $0x0, 0x50(%rax) movq %rax, 0x28(%rbp) movq %rcx, 0x20(%rbp) movq %rbp, %rdi addq $0x38, %rdi callq 0x135fa movq %rbp, 0x18(%rsp) movq 0x8(%rsp), %rsi cmpq 0x10(%rsp), %rsi je 0xb7e2 movq %rbp, (%rsi) addq $0x8, 0x8(%rsp) jmp 0xb7ef movq %rsp, %rdi leaq 0x18(%rsp), %rdx callq 0x11c4a movq 0x18(%rsp), %rdx movq %r13, %rdi leaq 0x40(%rsp), %rsi movq %r12, %rcx xorl %r8d, %r8d movq %rdx, %r9 callq 0xf76a movq %r13, %rdi callq 0x13634 decq %r15 jne 0xb732 movl $0x0, 0xf987(%rip) # 0x1b1ac leaq 0x40(%rsp), %rdi movl $0x17, %esi callq 0xf982 movl 0xf972(%rip), %esi # 0x1b1ac leaq 0x8eaa(%rip), %rdx # 0x146eb movl $0x3e8, %edi # imm = 0x3E8 callq 0xa4dc movq $-0x2, %rbx movq (%rsp), %rax movq 0x10(%rax,%rbx,8), %rdi testq %rdi, %rdi je 0xb866 movq (%rdi), %rax callq *0x8(%rax) movq (%rsp), %rax movq $0x0, 0x10(%rax,%rbx,8) addq $0x2, %rbx cmpq $0x3e6, %rbx # imm = 0x3E6 jb 0xb852 movl $0x0, 0xf922(%rip) # 0x1b1ac leaq 0x40(%rsp), %rdi movl $0x22, %esi callq 0xf982 movl 0xf90d(%rip), %esi # 0x1b1ac leaq 0x8e58(%rip), %rdx # 0x146fe movl $0x1f4, %edi # imm = 0x1F4 callq 0xa4dc movl $0x0, 0xf8f2(%rip) # 0x1b1ac leaq 0x40(%rsp), %rdi callq 0xfc30 leaq 0x40(%rsp), %rdi movl $0x2d, %esi callq 0xf982 movl 0xf8d3(%rip), %esi # 0x1b1ac leaq 0x8e32(%rip), %rdx # 0x14712 xorl %edi, %edi callq 0xa4dc movq (%rsp), %rbx movq 0x8(%rsp), %r14 cmpq %r14, %rbx je 0xb909 movq (%rbx), %rdi testq %rdi, %rdi je 0xb903 movq (%rdi), %rax callq *0x8(%rax) addq $0x8, %rbx jmp 0xb8f0 leaq 0xef30(%rip), %rax # 0x1a840 movq %rax, 0x20(%rsp) movq 0x50(%rsp), %rdi leaq 0x60(%rsp), %rax cmpq %rax, %rdi je 0xb931 movq 0x60(%rsp), %rsi incq %rsi callq 0xa1d0 movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0xb940 callq 0x1043c leaq 0x20(%rsp), %rdi callq 0x136c6 movq (%rsp), %rdi testq %rdi, %rdi je 0xb960 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0xa1d0 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x136c6 jmp 0xb9c7 movq %rax, %rbx jmp 0xb9c7 jmp 0xb9ba movq %rax, %rbx jmp 0xb9ab movq %rax, %rbx jmp 0xb9a3 movq %rax, %rbx movq 0x28(%rbp), %rdi testq %rdi, %rdi je 0xb9a3 callq 0x1043c movq %rbp, %rdi callq 0x136c6 movl $0x50, %esi movq %rbp, %rdi callq 0xa1d0 jmp 0xb9bd movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xfbf2 movq (%rsp), %rdi testq %rdi, %rdi je 0xb9dd movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0xa1d0 movq %rbx, %rdi callq 0xa2d0
/balmerdx[P]lsignal/tests/test_basic.cpp
TestDisconnectConnection()
void TestDisconnectConnection() { TestRunner::StartTest(MethodName); std::vector<TestB*> listeners; TestA ta; const size_t count = 1000; for (size_t i = 0; i < count; i++) { TestB* pb = new TestB(); listeners.push_back(pb); pb->explicitConnectionA = ta.sigA.connect(pb, &TestB::ReceiveSigA, pb); } receiveSigACount = 0; ta.sigA(23); AssertHelper::VerifyValue(true, receiveSigACount == count, "Verify siga count1"); for (size_t i = 0; i < count; i += 2) { ta.sigA.disconnect(listeners[i]->explicitConnectionA); } receiveSigACount = 0; ta.sigA(34); AssertHelper::VerifyValue(true, receiveSigACount == count / 2, "Verify siga count/2"); receiveSigACount = 0; for (size_t i = 0; i < count; i++) { ta.sigA.disconnect(listeners[i]->explicitConnectionA); } ta.sigA(45); AssertHelper::VerifyValue(true, receiveSigACount == 0, "Verify disconnect_all"); for (TestB* pb : listeners) delete pb; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp leaq 0x8d2b(%rip), %rdi # 0x14728 callq 0xa4bc xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) leaq 0x20(%rsp), %rdi callq 0x136ac leaq 0xee1d(%rip), %rax # 0x1a840 movq %rax, 0x20(%rsp) movq $0x0, 0x40(%rsp) movl $0x58, %edi callq 0xa1c0 leaq 0x40(%rsp), %rsi movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0xf10b(%rip), %rcx # 0x1ab60 movq %rcx, (%rax) leaq 0x10(%rax), %rcx movq %rax, %rdx addq $0x40, %rdx xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movq %rdx, 0x48(%rax) movq %rdx, 0x40(%rax) xorl %edx, %edx movq %rdx, 0x50(%rax) movq %rax, 0x8(%rsi) movq %rcx, (%rsi) leaq 0x60(%rsp), %rax movq %rax, -0x10(%rax) movq %rdx, -0x8(%rax) movb $0x0, (%rax) movl $0x3e8, %ebx # imm = 0x3E8 leaq 0xedd1(%rip), %r12 # 0x1a878 leaq 0xee02(%rip), %r14 # 0x1a8b0 leaq 0x3db3(%rip), %r13 # 0xf868 leaq 0x70(%rsp), %rbp movl $0x50, %edi callq 0xa1c0 movq %rax, %r15 xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rax) movaps %xmm0, 0x30(%rax) movaps %xmm0, 0x20(%rax) movaps %xmm0, 0x10(%rax) movaps %xmm0, (%rax) movq %rax, %rdi callq 0x136ac movq %r12, (%r15) movq $0x0, 0x20(%r15) movl $0x58, %edi callq 0xa1c0 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) movq %r14, (%rax) leaq 0x10(%rax), %rcx movq %rax, %rdx addq $0x40, %rdx xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movq %rdx, 0x48(%rax) movq %rdx, 0x40(%rax) movq $0x0, 0x50(%rax) movq %rax, 0x28(%r15) movq %rcx, 0x20(%r15) movq %r15, %rdi addq $0x38, %rdi callq 0x135fa movq %r15, 0x18(%rsp) movq 0x8(%rsp), %rsi cmpq 0x10(%rsp), %rsi je 0xbb69 movq %r15, (%rsi) addq $0x8, 0x8(%rsp) jmp 0xbb76 movq %rsp, %rdi leaq 0x18(%rsp), %rdx callq 0x11c4a movq 0x18(%rsp), %rdx movq %rbp, %rdi leaq 0x40(%rsp), %rsi movq %r13, %rcx xorl %r8d, %r8d movq %rdx, %r9 callq 0xf76a movq 0x18(%rsp), %rdi movq 0x78(%rsp), %rax movq %rax, 0x40(%rdi) addq $0x48, %rdi leaq 0x80(%rsp), %rsi callq 0x10550 movq %rbp, %rdi callq 0x13634 decq %rbx jne 0xbaba movl $0x0, 0xf5e1(%rip) # 0x1b1ac leaq 0x40(%rsp), %rdi movl $0x17, %esi callq 0xf982 xorl %esi, %esi cmpl $0x3e8, 0xf5c6(%rip) # imm = 0x3E8 sete %sil leaq 0x8afa(%rip), %rdx # 0x146eb movl $0x1, %edi callq 0xa5c6 movq $-0x2, %rbx movq (%rsp), %rax movq 0x10(%rax,%rbx,8), %rdi addq $0x38, %rdi callq 0x13686 addq $0x2, %rbx cmpq $0x3e6, %rbx # imm = 0x3E6 jb 0xbc02 movl $0x0, 0xf581(%rip) # 0x1b1ac leaq 0x40(%rsp), %rdi movl $0x22, %esi callq 0xf982 xorl %esi, %esi cmpl $0x1f4, 0xf566(%rip) # imm = 0x1F4 sete %sil leaq 0x8aad(%rip), %rdx # 0x146fe movl $0x1, %edi callq 0xa5c6 movl $0x0, 0xf547(%rip) # 0x1b1ac xorl %ebx, %ebx movq (%rsp), %rax movq (%rax,%rbx,8), %rdi addq $0x38, %rdi callq 0x13686 incq %rbx cmpq $0x3e8, %rbx # imm = 0x3E8 jne 0xbc67 leaq 0x40(%rsp), %rdi movl $0x2d, %esi callq 0xf982 xorl %esi, %esi cmpl $0x0, 0xf510(%rip) # 0x1b1ac sete %sil leaq 0x8a6b(%rip), %rdx # 0x14712 movl $0x1, %edi callq 0xa5c6 movq (%rsp), %rbx movq 0x8(%rsp), %r14 cmpq %r14, %rbx je 0xbcd3 movq (%rbx), %rdi testq %rdi, %rdi je 0xbccd movq (%rdi), %rax callq *0x8(%rax) addq $0x8, %rbx jmp 0xbcba leaq 0xeb66(%rip), %rax # 0x1a840 movq %rax, 0x20(%rsp) movq 0x50(%rsp), %rdi leaq 0x60(%rsp), %rax cmpq %rax, %rdi je 0xbcfb movq 0x60(%rsp), %rsi incq %rsi callq 0xa1d0 movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0xbd0a callq 0x1043c leaq 0x20(%rsp), %rdi callq 0x136c6 movq (%rsp), %rdi testq %rdi, %rdi je 0xbd2a movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0xa1d0 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x136c6 jmp 0xbd97 movq %rax, %rbx jmp 0xbd97 jmp 0xbd8a jmp 0xbd8a jmp 0xbd8a jmp 0xbd8a movq %rax, %rbx jmp 0xbd7b movq %rax, %rbx jmp 0xbd73 movq %rax, %rbx movq 0x28(%r15), %rdi testq %rdi, %rdi je 0xbd73 callq 0x1043c movq %r15, %rdi callq 0x136c6 movl $0x50, %esi movq %r15, %rdi callq 0xa1d0 jmp 0xbd8d movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xfbf2 movq (%rsp), %rdi testq %rdi, %rdi je 0xbdad movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0xa1d0 movq %rbx, %rdi callq 0xa2d0
/balmerdx[P]lsignal/tests/test_basic.cpp
TestSignalCopy()
void TestSignalCopy() { TestRunner::StartTest(MethodName); lsignal::signal<void(int, bool)> sg; int paramOne = 7; bool paramTwo = true; bool receiverCalled = false; std::function<void(int, bool)> receiver = [=, &receiverCalled](int p0, bool p1) { receiverCalled = true; AssertHelper::VerifyValue(paramOne, p0, "First parameter should be as expected."); AssertHelper::VerifyValue(paramTwo, p1, "Second parameter should be as expected."); }; sg.connect(receiver, nullptr); lsignal::signal<void(int, bool)> sg2; sg2 = sg; sg2(paramOne, paramTwo); AssertHelper::VerifyValue(true, receiverCalled, "Receiver2 should be called."); receiverCalled = false; lsignal::signal<void(int, bool)> sg3 = sg; sg3(paramOne, paramTwo); AssertHelper::VerifyValue(true, receiverCalled, "Receiver3 should be called."); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x78, %rsp leaq 0x8566(%rip), %rdi # 0x14768 callq 0xa4bc xorl %r12d, %r12d leaq 0x20(%rsp), %rbx movq %r12, (%rbx) movl $0x58, %edi callq 0xa1c0 movabsq $0x100000001, %r14 # imm = 0x100000001 movq %r14, 0x8(%rax) leaq 0xe77f(%rip), %r15 # 0x1a9b0 movq %r15, (%rax) leaq 0x10(%rax), %rcx leaq 0x40(%rax), %rdx xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movq %rdx, 0x48(%rax) movq %rdx, 0x40(%rax) movq %r12, 0x50(%rax) movq %rax, 0x8(%rbx) movq %rcx, (%rbx) leaq 0xf(%rsp), %rax movb $0x0, (%rax) leaq 0x40(%rsp), %rdx movaps %xmm0, (%rdx) movaps %xmm0, 0x10(%rdx) movq %rax, (%rdx) movl $0x7, 0x8(%rdx) movb $0x1, 0xc(%rdx) leaq 0x2cc5(%rip), %rax # 0xef50 movq %rax, 0x18(%rdx) leaq 0x2cf2(%rip), %rax # 0xef88 movq %rax, 0x10(%rdx) leaq 0x60(%rsp), %rdi movq %rbx, %rsi xorl %ecx, %ecx callq 0xf4d2 leaq 0x60(%rsp), %rdi callq 0x13634 movq $0x0, 0x10(%rsp) movl $0x58, %edi callq 0xa1c0 movq %r14, 0x8(%rax) movq %r15, (%rax) leaq 0x10(%rax), %rcx movq %rax, %rdx addq $0x40, %rdx xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movq %rdx, 0x48(%rax) movq %rdx, 0x40(%rax) movq $0x0, 0x50(%rax) leaq 0x10(%rsp), %rdi movq %rax, 0x8(%rdi) movq %rcx, (%rdi) leaq 0x20(%rsp), %rsi callq 0xfdfc leaq 0x10(%rsp), %rdi movl $0x7, %esi movl $0x1, %edx callq 0xf398 movzbl 0xf(%rsp), %esi leaq 0x8446(%rip), %rdx # 0x14777 movl $0x1, %edi callq 0xa5c6 movb $0x0, 0xf(%rsp) leaq 0x30(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0xfe88 leaq 0x30(%rsp), %rdi movl $0x7, %esi movl $0x1, %edx callq 0xf398 movzbl 0xf(%rsp), %esi leaq 0x8424(%rip), %rdx # 0x14793 movl $0x1, %edi callq 0xa5c6 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0xc388 callq 0x1043c movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0xc397 callq 0x1043c movq 0x50(%rsp), %rax testq %rax, %rax je 0xc3b0 leaq 0x40(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0xc3bf callq 0x1043c addq $0x78, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0xc42c jmp 0xc3ea jmp 0xc3d1 movq %rax, %rbx jmp 0xc3fc movq %rax, %rbx movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0xc3ed callq 0x1043c jmp 0xc3ed movq %rax, %rbx movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0xc3fc callq 0x1043c movq 0x50(%rsp), %rax testq %rax, %rax je 0xc415 leaq 0x40(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0xc424 callq 0x1043c movq %rbx, %rdi callq 0xa2d0 movq %rax, %rdi callq 0xa98e
/balmerdx[P]lsignal/tests/test_basic.cpp
lsignal::signal<void (int)>::delete_deffered_internal(lsignal::signal<void (int)>::internal_data*) const
void signal<R(Args...)>::delete_deffered_internal(internal_data* data) const { auto it_to_remove = std::remove_if(data->_callbacks.begin(), data->_callbacks.end(), [](const joint& jnt) { return jnt.connection->deleted; } ); data->_callbacks.erase(it_to_remove, data->_callbacks.end()); }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq 0x30(%rsi), %rdi addq $0x30, %rbx movq %rbx, %rsi callq 0x11ab8 cmpq %rbx, %rax je 0x11ab0 movq %rax, %rsi movq (%rsi), %r14 movq %rbx, %rdi callq 0x11b2e movq %r14, %rsi cmpq %rbx, %r14 jne 0x11a9d addq $0x8, %rsp popq %rbx popq %r14 retq
/balmerdx[P]lsignal/tests/../lsignal.h
lsignal::slot::disconnect()
void slot::disconnect() { decltype(_cleaners) cleaners = _cleaners; for (auto iter = cleaners.cbegin(); iter != cleaners.cend(); ++iter) { const connection_cleaner& cleaner = *iter; cleaner.data->deleted = true; } _cleaners.clear(); }
pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx addq $0x8, %rbx movq %rsp, %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x1379c movq (%r14), %rax movq 0x8(%r14), %rcx cmpq %rcx, %rax je 0x13723 movq (%rax), %rdx movb $0x1, 0x1(%rdx) addq $0x10, %rax jmp 0x13711 movq %rbx, %rdi callq 0x1383a movq %rsp, %rdi callq 0x13754 addq $0x18, %rsp popq %rbx popq %r14 retq nop
/balmerdx[P]lsignal/lsignal.cpp
common_chat_params_init_firefunction_v2(minja::chat_template const&, templates_params const&)
static common_chat_params common_chat_params_init_firefunction_v2(const common_chat_template & tmpl, const struct templates_params & inputs) { LOG_DBG("%s\n", __func__); common_chat_params data; data.prompt = apply(tmpl, inputs.messages, /* tools= */ nullptr, inputs.add_generation_prompt, { {"datetime", "Jan 29 2025 13:00:00 GMT"}, {"functions", json(inputs.tools.empty() ? "" : inputs.tools.dump(2))}, }); if (inputs.tools.is_array() && !inputs.tools.empty()) { data.grammar_lazy = inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_REQUIRED; data.grammar = build_grammar([&](const common_grammar_builder & builder) { auto schemas = json::array(); foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool.at("function"); schemas.push_back({ {"type", "object"}, {"properties", { {"name", { {"type", "string"}, {"const", function.at("name")}, }}, {"arguments", function.at("parameters")}, }}, {"required", json::array({"name", "arguments", "id"})}, }); }); auto schema = json { {"type", "array"}, {"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}}, {"minItems", 1}, }; if (!inputs.parallel_tool_calls) { schema["maxItems"] = 1; } builder.add_rule("root", "\" functools\"? " + builder.add_schema("tool_calls", schema)); }); data.grammar_triggers.push_back({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, " functools["}); data.preserved_tokens = { " functools[", }; data.format = COMMON_CHAT_FORMAT_FIREFUNCTION_V2; } else { data.format = COMMON_CHAT_FORMAT_CONTENT_ONLY; } return data; }
subq $0x3c8, %rsp # imm = 0x3C8 movq %rdi, 0x170(%rsp) movq %rdi, %rax movq %rax, 0x178(%rsp) movq %rdi, 0x3c0(%rsp) movq %rsi, 0x3b8(%rsp) movq %rdx, 0x3b0(%rsp) movl $0x1, %eax leaq 0x1ec8ca(%rip), %rcx # 0x275688 cmpl (%rcx), %eax jg 0x88de4 callq 0x1df610 movq %rax, %rdi movl $0x1, %esi leaq 0x1639c6(%rip), %rdx # 0x1ec79c leaq 0x16b61f(%rip), %rcx # 0x1f43fc movb $0x0, %al callq 0x1df700 jmp 0x88de6 movq 0x170(%rsp), %rdi movb $0x0, 0x3af(%rsp) callq 0xbaa80 movq 0x3b8(%rsp), %rax movq %rax, 0x158(%rsp) movq 0x3b0(%rsp), %rax movq %rax, 0x160(%rsp) xorl %eax, %eax movl %eax, %esi leaq 0x378(%rsp), %rdi callq 0xb9660 movq 0x3b0(%rsp), %rax movb 0x60(%rax), %al movb %al, 0x16f(%rsp) movb $0x1, 0x24c(%rsp) leaq 0x328(%rsp), %rax movq %rax, 0x320(%rsp) leaq 0x2e0(%rsp), %rdi movq %rdi, 0x2d8(%rsp) leaq 0x16b5b7(%rip), %rsi # 0x1f4424 callq 0xb96f0 jmp 0x88e74 leaq 0x2f8(%rsp), %rdi movq %rdi, 0x2d8(%rsp) leaq 0x16b5a2(%rip), %rsi # 0x1f442d callq 0x140df0 jmp 0x88e92 leaq 0x2e0(%rsp), %rax movq %rax, 0x310(%rsp) movq $0x2, 0x318(%rsp) movq 0x310(%rsp), %rsi movq 0x318(%rsp), %rdx leaq 0x328(%rsp), %rdi callq 0xb8d90 jmp 0x88ecd leaq 0x340(%rsp), %rax movq %rax, 0x150(%rsp) movq %rax, 0x320(%rsp) movb $0x1, 0x24d(%rsp) leaq 0x288(%rsp), %rdi movq %rdi, 0x280(%rsp) leaq 0x16b542(%rip), %rsi # 0x1f4446 callq 0xb9730 jmp 0x88f0b leaq 0x288(%rsp), %rax addq $0x18, %rax movq %rax, 0x148(%rsp) movq %rax, 0x280(%rsp) movq 0x3b0(%rsp), %rdi addq $0x10, %rdi callq 0xbaaf0 movb $0x0, 0x24e(%rsp) testb $0x1, %al jne 0x88f46 jmp 0x88f83 leaq 0x24f(%rsp), %rdi movq %rdi, 0x140(%rsp) callq 0x60dc0 movq 0x140(%rsp), %rdx movb $0x1, 0x24e(%rsp) leaq 0x168d04(%rip), %rsi # 0x1f1c76 leaq 0x250(%rsp), %rdi callq 0x703a0 jmp 0x88f81 jmp 0x88fb0 movq 0x3b0(%rsp), %rsi addq $0x10, %rsi leaq 0x250(%rsp), %rdi movl $0x2, %edx movl $0x20, %ecx xorl %r9d, %r9d movl %r9d, %r8d callq 0xb6950 jmp 0x88fae jmp 0x88fb0 leaq 0x270(%rsp), %rdi leaq 0x250(%rsp), %rsi callq 0xc2f00 jmp 0x88fc7 movq 0x148(%rsp), %rdi leaq 0x270(%rsp), %rsi callq 0xb9f30 jmp 0x88fde movq 0x150(%rsp), %rdi movb $0x0, 0x24d(%rsp) leaq 0x288(%rsp), %rax movq %rax, 0x2b8(%rsp) movq $0x2, 0x2c0(%rsp) movq 0x2b8(%rsp), %rsi movq 0x2c0(%rsp), %rdx callq 0xb8d90 jmp 0x89021 movb $0x0, 0x24c(%rsp) leaq 0x328(%rsp), %rax movq %rax, 0x358(%rsp) movq $0x2, 0x360(%rsp) movq 0x358(%rsp), %rsi movq 0x360(%rsp), %rdx leaq 0x368(%rsp), %rdi movl $0x1, %ecx movl $0x2, %r8d callq 0xb8df0 jmp 0x8906f movq 0x160(%rsp), %rdx movq 0x158(%rsp), %rsi movb 0x16f(%rsp), %al movzbl %al, %r8d andl $0x1, %r8d leaq 0x388(%rsp), %rdi leaq 0x378(%rsp), %rcx leaq 0x368(%rsp), %r9 callq 0x8ae20 jmp 0x890ad movq 0x170(%rsp), %rdi addq $0x8, %rdi leaq 0x388(%rsp), %rsi callq 0x607e0 leaq 0x388(%rsp), %rdi callq 0x61168 leaq 0x368(%rsp), %rdi callq 0xb9390 leaq 0x328(%rsp), %rax movq %rax, 0x130(%rsp) addq $0x30, %rax movq %rax, 0x138(%rsp) movq 0x138(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x128(%rsp) callq 0xb8d80 movq 0x130(%rsp), %rcx movq 0x128(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x138(%rsp) jne 0x890fc leaq 0x288(%rsp), %rax movq %rax, 0x118(%rsp) addq $0x30, %rax movq %rax, 0x120(%rsp) movq 0x120(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x110(%rsp) callq 0xb8d80 movq 0x118(%rsp), %rcx movq 0x110(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x120(%rsp) jne 0x8914e leaq 0x270(%rsp), %rdi callq 0xb9390 leaq 0x250(%rsp), %rdi callq 0x61168 testb $0x1, 0x24e(%rsp) jne 0x891aa jmp 0x891b7 leaq 0x24f(%rsp), %rdi callq 0x61140 leaq 0x2e0(%rsp), %rax movq %rax, 0x100(%rsp) addq $0x30, %rax movq %rax, 0x108(%rsp) movq 0x108(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0xf8(%rsp) callq 0xb8d80 movq 0x100(%rsp), %rcx movq 0xf8(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x108(%rsp) jne 0x891d3 leaq 0x378(%rsp), %rdi callq 0xb9390 movq 0x3b0(%rsp), %rdi addq $0x10, %rdi callq 0xb68e0 testb $0x1, %al jne 0x89230 jmp 0x898cd movq 0x3b0(%rsp), %rdi addq $0x10, %rdi callq 0xbaaf0 testb $0x1, %al jne 0x898cd movq 0x170(%rsp), %rax movq 0x3b0(%rsp), %rcx movl 0x20(%rcx), %ecx subl $0x1, %ecx setne 0x48(%rax) movq 0x3b0(%rsp), %rax movq %rax, 0x200(%rsp) leaq 0x208(%rsp), %rdi movq %rdi, 0xf0(%rsp) leaq 0x200(%rsp), %rsi callq 0x98fa0 movq 0xf0(%rsp), %rsi movb $0x0, 0x1ff(%rsp) leaq 0x228(%rsp), %rdi leaq 0x1ff(%rsp), %rdx callq 0x1be920 jmp 0x892b7 movq 0x170(%rsp), %rdi addq $0x28, %rdi leaq 0x228(%rsp), %rsi movq %rsi, 0xd0(%rsp) callq 0x607e0 movq 0xd0(%rsp), %rdi callq 0x61168 leaq 0x208(%rsp), %rdi callq 0xbab70 movq 0x170(%rsp), %rax addq $0x50, %rax movq %rax, 0xd8(%rsp) movl $0x1, 0x1c8(%rsp) leaq 0x1d0(%rsp), %rax movq %rax, 0xe0(%rsp) leaq 0x1c7(%rsp), %rdi movq %rdi, 0xe8(%rsp) callq 0x60dc0 movq 0xe0(%rsp), %rdi movq 0xe8(%rsp), %rdx leaq 0x1685ae(%rip), %rsi # 0x1f18fb callq 0x703a0 jmp 0x89354 movq 0xd8(%rsp), %rdi movl $0xffffffff, 0x1f0(%rsp) # imm = 0xFFFFFFFF leaq 0x1c8(%rsp), %rsi callq 0xbb330 jmp 0x89376 leaq 0x1c8(%rsp), %rdi callq 0x71c80 leaq 0x1c7(%rsp), %rdi callq 0x61140 movb $0x1, 0x186(%rsp) leaq 0x190(%rsp), %rax movq %rax, 0xc0(%rsp) movq %rax, 0x188(%rsp) leaq 0x187(%rsp), %rdi movq %rdi, 0xc8(%rsp) callq 0x60dc0 movq 0xc0(%rsp), %rdi movq 0xc8(%rsp), %rdx leaq 0x16851f(%rip), %rsi # 0x1f18fb callq 0x703a0 jmp 0x893e3 movq 0x170(%rsp), %rdi movb $0x0, 0x186(%rsp) leaq 0x190(%rsp), %rax movq %rax, 0x1b0(%rsp) movq $0x1, 0x1b8(%rsp) addq $0x68, %rdi movq 0x1b0(%rsp), %rsi movq 0x1b8(%rsp), %rdx callq 0xbb360 jmp 0x8942a leaq 0x190(%rsp), %rax movq %rax, 0xb0(%rsp) addq $0x20, %rax movq %rax, 0xb8(%rsp) movq 0xb8(%rsp), %rdi addq $-0x20, %rdi movq %rdi, 0xa8(%rsp) callq 0x61168 movq 0xb0(%rsp), %rcx movq 0xa8(%rsp), %rax cmpq %rcx, %rax movq %rax, 0xb8(%rsp) jne 0x89446 leaq 0x187(%rsp), %rdi callq 0x61140 movq 0x170(%rsp), %rax movl $0x7, (%rax) jmp 0x898db movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) movq 0x2d8(%rsp), %rax leaq 0x2e0(%rsp), %rcx cmpq %rax, %rcx movq %rax, 0xa0(%rsp) je 0x89503 movq 0xa0(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x98(%rsp) callq 0xb8d80 movq 0x98(%rsp), %rax leaq 0x2e0(%rsp), %rcx cmpq %rcx, %rax movq %rax, 0xa0(%rsp) jne 0x894cd jmp 0x89730 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) jmp 0x896f1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) jmp 0x8969d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) jmp 0x89682 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) jmp 0x89675 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) jmp 0x89668 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) jmp 0x89629 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) jmp 0x895d5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) leaq 0x368(%rsp), %rdi callq 0xb9390 leaq 0x328(%rsp), %rax movq %rax, 0x88(%rsp) addq $0x30, %rax movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x80(%rsp) callq 0xb8d80 movq 0x88(%rsp), %rcx movq 0x80(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x90(%rsp) jne 0x895f1 jmp 0x89629 leaq 0x288(%rsp), %rax movq %rax, 0x70(%rsp) addq $0x30, %rax movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x68(%rsp) callq 0xb8d80 movq 0x70(%rsp), %rcx movq 0x68(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x78(%rsp) jne 0x8963f jmp 0x89668 leaq 0x270(%rsp), %rdi callq 0xb9390 leaq 0x250(%rsp), %rdi callq 0x61168 testb $0x1, 0x24e(%rsp) jne 0x8968e jmp 0x8969b leaq 0x24f(%rsp), %rdi callq 0x61140 jmp 0x8969d testb $0x1, 0x24d(%rsp) jne 0x896a9 jmp 0x896ef movq 0x280(%rsp), %rax leaq 0x288(%rsp), %rcx cmpq %rax, %rcx movq %rax, 0x60(%rsp) je 0x896ed movq 0x60(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x58(%rsp) callq 0xb8d80 movq 0x58(%rsp), %rax leaq 0x288(%rsp), %rcx cmpq %rcx, %rax movq %rax, 0x60(%rsp) jne 0x896c3 jmp 0x896ef jmp 0x896f1 leaq 0x2e0(%rsp), %rax movq %rax, 0x48(%rsp) addq $0x30, %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x40(%rsp) callq 0xb8d80 movq 0x48(%rsp), %rcx movq 0x40(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x50(%rsp) jne 0x89707 jmp 0x89730 testb $0x1, 0x24c(%rsp) jne 0x8973c jmp 0x89782 movq 0x320(%rsp), %rax leaq 0x328(%rsp), %rcx cmpq %rax, %rcx movq %rax, 0x38(%rsp) je 0x89780 movq 0x38(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x30(%rsp) callq 0xb8d80 movq 0x30(%rsp), %rax leaq 0x328(%rsp), %rcx cmpq %rcx, %rax movq %rax, 0x38(%rsp) jne 0x89756 jmp 0x89782 leaq 0x378(%rsp), %rdi callq 0xb9390 jmp 0x8990a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) leaq 0x208(%rsp), %rdi callq 0xbab70 jmp 0x8990a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) jmp 0x897f1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) leaq 0x1c8(%rsp), %rdi callq 0x71c80 leaq 0x1c7(%rsp), %rdi callq 0x61140 jmp 0x8990a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) jmp 0x8986c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x2d0(%rsp) movl %eax, 0x2cc(%rsp) leaq 0x190(%rsp), %rax movq %rax, 0x20(%rsp) addq $0x20, %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi addq $-0x20, %rdi movq %rdi, 0x18(%rsp) callq 0x61168 movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x28(%rsp) jne 0x89843 jmp 0x8986c leaq 0x187(%rsp), %rdi callq 0x61140 testb $0x1, 0x186(%rsp) jne 0x89885 jmp 0x898cb movq 0x188(%rsp), %rax leaq 0x190(%rsp), %rcx cmpq %rax, %rcx movq %rax, 0x10(%rsp) je 0x898c9 movq 0x10(%rsp), %rdi addq $-0x20, %rdi movq %rdi, 0x8(%rsp) callq 0x61168 movq 0x8(%rsp), %rax leaq 0x190(%rsp), %rcx cmpq %rcx, %rax movq %rax, 0x10(%rsp) jne 0x8989f jmp 0x898cb jmp 0x8990a movq 0x170(%rsp), %rax movl $0x0, (%rax) movb $0x1, 0x3af(%rsp) testb $0x1, 0x3af(%rsp) jne 0x898fa movq 0x170(%rsp), %rdi callq 0x70d90 movq 0x178(%rsp), %rax addq $0x3c8, %rsp # imm = 0x3C8 retq movq 0x170(%rsp), %rdi callq 0x70d90 movq 0x2d0(%rsp), %rdi callq 0x609a0 nopw %cs:(%rax,%rax)
/ggerganov[P]llama/common/chat.cpp
common_chat_params_init_without_tools(minja::chat_template const&, templates_params const&)
static common_chat_params common_chat_params_init_without_tools(const common_chat_template & tmpl, const struct templates_params & inputs) { common_chat_params data; data.prompt = apply(tmpl, inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_CONTENT_ONLY; data.grammar_lazy = false; if (!inputs.json_schema.is_null()) { if (!inputs.grammar.empty()) { throw std::runtime_error("Either \"json_schema\" or \"grammar\" can be specified, but not both"); } data.grammar = json_schema_to_grammar(inputs.json_schema); } else { data.grammar = inputs.grammar; } return data; }
subq $0xc8, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x20(%rsp) movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq %rdx, 0xb0(%rsp) movb $0x0, 0xaf(%rsp) callq 0xbaa80 movq 0xb8(%rsp), %rax movq %rax, 0x28(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x30(%rsp) movq 0xb0(%rsp), %rdi addq $0x10, %rdi callq 0xbaaf0 testb $0x1, %al jne 0x8999a jmp 0x899aa leaq 0x78(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xb9660 jmp 0x899c4 movq 0xb0(%rsp), %rsi addq $0x10, %rsi leaq 0x78(%rsp), %rdi callq 0xbab80 jmp 0x899c2 jmp 0x899c4 movq 0xb0(%rsp), %rax movzbl 0x60(%rax), %eax movl %eax, 0xc(%rsp) xorl %eax, %eax movl %eax, %esi leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xb9660 movl 0xc(%rsp), %r8d movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movq 0x10(%rsp), %r9 andl $0x1, %r8d leaq 0x88(%rsp), %rdi leaq 0x78(%rsp), %rcx callq 0x8ae20 jmp 0x89a13 movq 0x18(%rsp), %rdi addq $0x8, %rdi leaq 0x88(%rsp), %rsi callq 0x607e0 leaq 0x88(%rsp), %rdi callq 0x61168 leaq 0x58(%rsp), %rdi callq 0xb9390 leaq 0x78(%rsp), %rdi callq 0xb9390 movq 0x18(%rsp), %rax movl $0x0, (%rax) movb $0x0, 0x48(%rax) movq 0xb0(%rsp), %rdi addq $0x28, %rdi callq 0xb77f0 testb $0x1, %al jne 0x89b58 movq 0xb0(%rsp), %rdi addq $0x40, %rdi callq 0x60400 testb $0x1, %al jne 0x89b1f movl $0x10, %edi callq 0x605a0 movq %rax, %rdi movq %rdi, %rax movq %rax, (%rsp) leaq 0x16a9b9(%rip), %rsi # 0x1f445f callq 0x60390 jmp 0x89aad movq (%rsp), %rdi movq 0x1ea4f8(%rip), %rsi # 0x273fb0 movq 0x1ea4b9(%rip), %rdx # 0x273f78 callq 0x60960 jmp 0x89bb3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) jmp 0x89b9f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x58(%rsp), %rdi callq 0xb9390 leaq 0x78(%rsp), %rdi callq 0xb9390 jmp 0x89b9f movq (%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) callq 0x60c90 jmp 0x89b9f movq 0xb0(%rsp), %rsi addq $0x28, %rsi leaq 0x38(%rsp), %rdi xorl %edx, %edx callq 0x1be880 jmp 0x89b39 movq 0x18(%rsp), %rdi addq $0x28, %rdi leaq 0x38(%rsp), %rsi callq 0x607e0 leaq 0x38(%rsp), %rdi callq 0x61168 jmp 0x89b76 movq 0x18(%rsp), %rdi movq 0xb0(%rsp), %rsi addq $0x40, %rsi addq $0x28, %rdi callq 0x61050 jmp 0x89b74 jmp 0x89b76 movb $0x1, 0xaf(%rsp) testb $0x1, 0xaf(%rsp) jne 0x89b92 movq 0x18(%rsp), %rdi callq 0x70d90 movq 0x20(%rsp), %rax addq $0xc8, %rsp retq movq 0x18(%rsp), %rdi callq 0x70d90 movq 0x70(%rsp), %rdi callq 0x609a0 nopw %cs:(%rax,%rax)
/ggerganov[P]llama/common/chat.cpp
common_chat_params_init_mistral_nemo(minja::chat_template const&, templates_params const&)
static common_chat_params common_chat_params_init_mistral_nemo(const common_chat_template & tmpl, const struct templates_params & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_REQUIRED; data.grammar = build_grammar([&](const common_grammar_builder & builder) { auto schemas = json::array(); foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool.at("function"); schemas.push_back({ {"type", "object"}, {"properties", { // Important note: the model is probably trained to take a JSON stringified arguments value. // It's hard to constrain that for now (while reusing the JSON schema conversion), so we're just expecting a plain object. {"name", { {"type", "string"}, {"const", function.at("name")}, }}, {"arguments", function.at("parameters")}, {"id", { {"type", "string"}, // Nemo's template expects a 9-character alphanumeric ID. {"pattern", "^[a-zA-Z0-9]{9}$"}, }}, }}, {"required", json::array({"name", "arguments", "id"})}, }); }); auto schema = json { {"type", "array"}, {"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}}, {"minItems", 1}, }; if (!inputs.parallel_tool_calls) { schema["maxItems"] = 1; } builder.add_rule("root", "\"[TOOL_CALLS]\" " + builder.add_schema("tool_calls", schema)); }); data.grammar_triggers.push_back({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, "[TOOL_CALLS]"}); data.preserved_tokens = { "[TOOL_CALLS]", }; data.prompt = apply(tmpl, inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_MISTRAL_NEMO; return data; }
subq $0x1e8, %rsp # imm = 0x1E8 movq %rdi, 0xa0(%rsp) movq %rdi, %rax movq %rax, 0x98(%rsp) movq %rdi, 0x1e0(%rsp) movq %rsi, 0x1d8(%rsp) movq %rdx, 0x1d0(%rsp) movb $0x0, 0x1cf(%rsp) callq 0xbaa80 movq 0xa0(%rsp), %rdi movq 0x1d0(%rsp), %rax movl 0x20(%rax), %eax subl $0x1, %eax setne 0x48(%rdi) movq 0x1d0(%rsp), %rax movq %rax, 0x180(%rsp) leaq 0x188(%rsp), %rdi movq %rdi, 0xa8(%rsp) leaq 0x180(%rsp), %rsi callq 0x9f7a0 movq 0xa8(%rsp), %rsi movb $0x0, 0x17f(%rsp) leaq 0x1a8(%rsp), %rdi leaq 0x17f(%rsp), %rdx callq 0x1be920 jmp 0x8a90d movq 0xa0(%rsp), %rdi addq $0x28, %rdi leaq 0x1a8(%rsp), %rsi movq %rsi, 0x78(%rsp) callq 0x607e0 movq 0x78(%rsp), %rdi callq 0x61168 leaq 0x188(%rsp), %rdi callq 0xbab70 movq 0xa0(%rsp), %rax addq $0x50, %rax movq %rax, 0x80(%rsp) movl $0x1, 0x138(%rsp) leaq 0x140(%rsp), %rax movq %rax, 0x88(%rsp) leaq 0x137(%rsp), %rdi movq %rdi, 0x90(%rsp) callq 0x60dc0 movq 0x88(%rsp), %rdi movq 0x90(%rsp), %rdx leaq 0x166faa(%rip), %rsi # 0x1f1947 callq 0x703a0 jmp 0x8a9a4 movq 0x80(%rsp), %rdi movl $0xffffffff, 0x160(%rsp) # imm = 0xFFFFFFFF leaq 0x138(%rsp), %rsi callq 0xbb330 jmp 0x8a9c6 leaq 0x138(%rsp), %rdi callq 0x71c80 leaq 0x137(%rsp), %rdi callq 0x61140 movb $0x1, 0xf6(%rsp) leaq 0x100(%rsp), %rax movq %rax, 0x68(%rsp) movq %rax, 0xf8(%rsp) leaq 0xf7(%rsp), %rdi movq %rdi, 0x70(%rsp) callq 0x60dc0 movq 0x68(%rsp), %rdi movq 0x70(%rsp), %rdx leaq 0x166f27(%rip), %rsi # 0x1f1947 callq 0x703a0 jmp 0x8aa27 movq 0xa0(%rsp), %rdi movb $0x0, 0xf6(%rsp) leaq 0x100(%rsp), %rax movq %rax, 0x120(%rsp) movq $0x1, 0x128(%rsp) addq $0x68, %rdi movq 0x120(%rsp), %rsi movq 0x128(%rsp), %rdx callq 0xbb360 jmp 0x8aa6e leaq 0x100(%rsp), %rax movq %rax, 0x58(%rsp) addq $0x20, %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rdi addq $-0x20, %rdi movq %rdi, 0x50(%rsp) callq 0x61168 movq 0x58(%rsp), %rcx movq 0x50(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x60(%rsp) jne 0x8aa84 leaq 0xf7(%rsp), %rdi callq 0x61140 movq 0x1d8(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x1d0(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x1d0(%rsp), %rdi addq $0x10, %rdi callq 0xbaaf0 testb $0x1, %al jne 0x8aae9 jmp 0x8aafc leaq 0xc0(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xb9660 jmp 0x8ab19 movq 0x1d0(%rsp), %rsi addq $0x10, %rsi leaq 0xc0(%rsp), %rdi callq 0xbab80 jmp 0x8ab17 jmp 0x8ab19 movq 0x1d0(%rsp), %rax movzbl 0x60(%rax), %eax movl %eax, 0x34(%rsp) xorl %eax, %eax movl %eax, %esi leaq 0xb0(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0xb9660 movl 0x34(%rsp), %r8d movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq 0x38(%rsp), %r9 andl $0x1, %r8d leaq 0xd0(%rsp), %rdi leaq 0xc0(%rsp), %rcx callq 0x8ae20 jmp 0x8ab6e movq 0xa0(%rsp), %rdi addq $0x8, %rdi leaq 0xd0(%rsp), %rsi callq 0x607e0 leaq 0xd0(%rsp), %rdi callq 0x61168 leaq 0xb0(%rsp), %rdi callq 0xb9390 leaq 0xc0(%rsp), %rdi callq 0xb9390 movq 0xa0(%rsp), %rax movl $0x2, (%rax) movb $0x1, 0x1cf(%rsp) testb $0x1, 0x1cf(%rsp) jne 0x8ad63 jmp 0x8ad56 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x170(%rsp) movl %eax, 0x16c(%rsp) leaq 0x188(%rsp), %rdi callq 0xbab70 jmp 0x8ad73 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x170(%rsp) movl %eax, 0x16c(%rsp) jmp 0x8ac34 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x170(%rsp) movl %eax, 0x16c(%rsp) leaq 0x138(%rsp), %rdi callq 0x71c80 leaq 0x137(%rsp), %rdi callq 0x61140 jmp 0x8ad73 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x170(%rsp) movl %eax, 0x16c(%rsp) jmp 0x8acaf movq %rax, %rcx movl %edx, %eax movq %rcx, 0x170(%rsp) movl %eax, 0x16c(%rsp) leaq 0x100(%rsp), %rax movq %rax, 0x20(%rsp) addq $0x20, %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi addq $-0x20, %rdi movq %rdi, 0x18(%rsp) callq 0x61168 movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x28(%rsp) jne 0x8ac86 jmp 0x8acaf leaq 0xf7(%rsp), %rdi callq 0x61140 testb $0x1, 0xf6(%rsp) jne 0x8acc8 jmp 0x8ad0e movq 0xf8(%rsp), %rax leaq 0x100(%rsp), %rcx cmpq %rax, %rcx movq %rax, 0x10(%rsp) je 0x8ad0c movq 0x10(%rsp), %rdi addq $-0x20, %rdi movq %rdi, 0x8(%rsp) callq 0x61168 movq 0x8(%rsp), %rax leaq 0x100(%rsp), %rcx cmpq %rcx, %rax movq %rax, 0x10(%rsp) jne 0x8ace2 jmp 0x8ad0e jmp 0x8ad73 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x170(%rsp) movl %eax, 0x16c(%rsp) jmp 0x8ad73 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x170(%rsp) movl %eax, 0x16c(%rsp) leaq 0xb0(%rsp), %rdi callq 0xb9390 leaq 0xc0(%rsp), %rdi callq 0xb9390 jmp 0x8ad73 movq 0xa0(%rsp), %rdi callq 0x70d90 movq 0x98(%rsp), %rax addq $0x1e8, %rsp # imm = 0x1E8 retq movq 0xa0(%rsp), %rdi callq 0x70d90 movq 0x170(%rsp), %rdi callq 0x609a0 nopl (%rax)
/ggerganov[P]llama/common/chat.cpp
foreach_function(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)> const&)
static void foreach_function(const json & tools, const std::function<void(const json &)> & fn) { for (const auto & tool : tools) { if (!tool.contains("type") || tool.at("type") != "function" || !tool.contains("function")) { LOG_INF("Skipping tool without function: %s", tool.dump(2).c_str()); continue; } fn(tool); } }
subq $0xa8, %rsp movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rsi leaq 0x70(%rsp), %rdi callq 0xb6b20 movq 0x90(%rsp), %rsi leaq 0x50(%rsp), %rdi callq 0xb6b50 leaq 0x70(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0xb6b80 testb $0x1, %al jne 0x8c023 jmp 0x8c141 leaq 0x70(%rsp), %rdi callq 0xb6bb0 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi leaq 0x168d3c(%rip), %rsi # 0x1f4d7a callq 0xb6f30 testb $0x1, %al jne 0x8c049 jmp 0x8c086 movq 0x48(%rsp), %rdi leaq 0x168d25(%rip), %rsi # 0x1f4d7a callq 0xb6fb0 movq %rax, %rdi leaq 0x16810d(%rip), %rsi # 0x1f4171 callq 0xb7640 testb $0x1, %al jne 0x8c086 movq 0x48(%rsp), %rdi leaq 0x1680f8(%rip), %rsi # 0x1f4171 callq 0xb7b40 testb $0x1, %al jne 0x8c120 jmp 0x8c088 xorl %eax, %eax leaq 0x1e95f7(%rip), %rcx # 0x275688 cmpl (%rcx), %eax jg 0x8c11c callq 0x1df610 movq %rax, 0x8(%rsp) movq 0x48(%rsp), %rsi leaq 0x28(%rsp), %rdi movq %rdi, (%rsp) movl $0x2, %edx movl %edx, 0x14(%rsp) movl $0x20, %ecx xorl %r9d, %r9d movl %r9d, 0x18(%rsp) movl %r9d, %r8d callq 0xb6950 movq (%rsp), %rdi callq 0x60180 movq 0x8(%rsp), %rdi movl 0x14(%rsp), %esi movq %rax, %rcx movl 0x18(%rsp), %eax leaq 0x165a93(%rip), %rdx # 0x1f1b82 callq 0x1df700 jmp 0x8c0f6 leaq 0x28(%rsp), %rdi callq 0x61168 jmp 0x8c11c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) leaq 0x28(%rsp), %rdi callq 0x61168 jmp 0x8c149 jmp 0x8c11e jmp 0x8c132 movq 0x98(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0xbb3c0 leaq 0x70(%rsp), %rdi callq 0xb7740 jmp 0x8c00b addq $0xa8, %rsp retq movq 0x20(%rsp), %rdi callq 0x609a0 nopw %cs:(%rax,%rax)
/ggerganov[P]llama/common/chat.cpp
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movq %rdx, 0x140(%rsp) movq %rcx, 0x138(%rsp) leaq 0x108(%rsp), %rdi callq 0xf58f0 movq $0x0, 0x100(%rsp) movq 0x140(%rsp), %rdi callq 0xbbac0 movq %rax, 0xf8(%rsp) movq 0x100(%rsp), %rax cmpq 0xf8(%rsp), %rax jae 0x8cb31 movq 0x100(%rsp), %rsi movq %rsi, 0x20(%rsp) movq 0x140(%rsp), %rdi callq 0xf59f0 movq %rax, %rsi leaq 0x108(%rsp), %rdi callq 0xf5900 movq %rax, 0x28(%rsp) jmp 0x8caf5 movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, (%rax) movq 0x100(%rsp), %rax addq $0x1, %rax movq %rax, 0x100(%rsp) jmp 0x8cab2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0x8cc8d leaq 0x40(%rsp), %rdi movq %rdi, 0x18(%rsp) movq 0x140(%rsp), %rsi callq 0xf5a10 jmp 0x8cb4a leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) movq 0x148(%rsp), %rsi callq 0x601e0 jmp 0x8cb63 leaq 0x78(%rsp), %rdi movq %rdi, 0x8(%rsp) leaq 0x108(%rsp), %rsi callq 0xf5b10 jmp 0x8cb7c leaq 0xa8(%rsp), %rdi movq 0x138(%rsp), %rsi callq 0xf5b40 jmp 0x8cb93 leaq 0xc8(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x8ccb0 jmp 0x8cba7 movq 0x30(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0xc9840 jmp 0x8cbbb leaq 0xc8(%rsp), %rdi callq 0xc9950 leaq 0x40(%rsp), %rdi callq 0x8cd60 leaq 0x108(%rsp), %rdi callq 0xf5bf0 movq 0x38(%rsp), %rax addq $0x158, %rsp # imm = 0x158 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0x8cc40 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0x8cc36 movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) callq 0xf5bf0 movq 0x10(%rsp), %rdi callq 0x61168 movq 0x18(%rsp), %rdi callq 0x718e0 jmp 0x8cc8d movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0x8cc83 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0xc8(%rsp), %rdi callq 0xc9950 leaq 0x40(%rsp), %rdi callq 0x8cd60 leaq 0x108(%rsp), %rdi callq 0xf5bf0 movq 0xf0(%rsp), %rdi callq 0x609a0 nopw (%rax,%rax)
/ggerganov[P]llama/common/minja/minja.hpp
parse_json_tool_calls(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::optional<std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>>> const&, std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, bool)
static common_chat_msg parse_json_tool_calls( const std::string& input, const std::optional<std::regex> & trigger_opt, const std::regex & function_regex, const std::regex & close_regex, bool allow_raw_python = false) { std::smatch match; common_chat_msg result; result.role = "assistant"; auto end = input.end(); auto it = input.begin(); if (trigger_opt) { if (!std::regex_search(it, end, match, *trigger_opt)) { result.content = input; return result; } result.content = match.prefix().str(); it = match.suffix().first; } while (it != end) { std::sregex_iterator rend; std::sregex_iterator rit(it, end, function_regex); if (rit == rend) { result.content += std::string(it, end); break; } auto name = rit->str(1); result.content += std::string(it, rit->prefix().second); it = rit->suffix().first; json arguments; if (parse_json(it, end, arguments)) { if (!std::regex_search(it, end, match, close_regex)) { throw std::runtime_error("Malformed input, missing closing pattern: " + input); } it = match.suffix().first; result.tool_calls.push_back({name, arguments.is_string() ? arguments.get<std::string>() : arguments.dump(), /* id= */ ""}); } else { if (allow_raw_python && name == "python") { result.tool_calls.push_back({name, json({{"code", std::string(it, end)}}).dump(), /* id= */ ""}); break; } throw std::runtime_error("Failed to parse json tool call arguments: " + input); } } if (!result.tool_calls.empty()) { if (!string_strip(result.content).empty()) { LOG_WRN("Content found with tool calls: %s\n", result.content.c_str()); } result.content = ""; } return result; }
subq $0x548, %rsp # imm = 0x548 movq %rdi, 0x158(%rsp) movb %r9b, %al movq %rdi, %r9 movq %r9, 0x150(%rsp) movq %rdi, 0x540(%rsp) movq %rsi, 0x538(%rsp) movq %rdx, 0x530(%rsp) movq %rcx, 0x528(%rsp) movq %r8, 0x520(%rsp) andb $0x1, %al movb %al, 0x51f(%rsp) leaq 0x4f8(%rsp), %rdi callq 0x117730 movq 0x158(%rsp), %rdi movb $0x0, 0x4f7(%rsp) callq 0x71190 movq 0x158(%rsp), %rdi leaq 0x14139e(%rip), %rsi # 0x1e401d callq 0x605e0 jmp 0xa2c86 movq 0x538(%rsp), %rdi callq 0x60ef0 movq %rax, 0x4d8(%rsp) movq 0x538(%rsp), %rdi callq 0x60320 movq %rax, 0x4d0(%rsp) movq 0x530(%rsp), %rdi callq 0x143960 testb $0x1, %al jne 0xa2cc6 jmp 0xa2de4 movq 0x4d0(%rsp), %rax movq %rax, 0x4c8(%rsp) movq 0x4d8(%rsp), %rax movq %rax, 0x4c0(%rsp) movq 0x530(%rsp), %rdi callq 0x143980 movq %rax, %rcx movq 0x4c8(%rsp), %rdi movq 0x4c0(%rsp), %rsi leaq 0x4f8(%rsp), %rdx xorl %r8d, %r8d callq 0x117770 movb %al, 0x14f(%rsp) jmp 0xa2d1f movb 0x14f(%rsp), %al testb $0x1, %al jne 0xa2d78 jmp 0xa2d2c movq 0x158(%rsp), %rdi movq 0x538(%rsp), %rsi addq $0x20, %rdi callq 0x61050 jmp 0xa2d47 movb $0x1, 0x4f7(%rsp) movl $0x1, 0x4bc(%rsp) jmp 0xa3c4c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3c80 leaq 0x4f8(%rsp), %rdi callq 0x116ae0 movq %rax, 0x140(%rsp) jmp 0xa2d8f movq 0x140(%rsp), %rsi leaq 0x498(%rsp), %rdi callq 0x1432d0 jmp 0xa2da6 movq 0x158(%rsp), %rdi addq $0x20, %rdi leaq 0x498(%rsp), %rsi callq 0x607e0 leaq 0x498(%rsp), %rdi callq 0x61168 leaq 0x4f8(%rsp), %rdi callq 0x117410 movq (%rax), %rax movq %rax, 0x4d0(%rsp) jmp 0xa2de6 leaq 0x4d0(%rsp), %rdi leaq 0x4d8(%rsp), %rsi callq 0xdb580 testb $0x1, %al jne 0xa2e04 jmp 0xa3b6e leaq 0x458(%rsp), %rdi callq 0x116870 jmp 0xa2e13 movq 0x4d0(%rsp), %rax movq %rax, 0x410(%rsp) movq 0x4d8(%rsp), %rax movq %rax, 0x408(%rsp) movq 0x528(%rsp), %rcx movq 0x410(%rsp), %rsi movq 0x408(%rsp), %rdx leaq 0x418(%rsp), %rdi xorl %r8d, %r8d callq 0x116730 jmp 0xa2e5d leaq 0x418(%rsp), %rdi leaq 0x458(%rsp), %rsi callq 0x1168c0 testb $0x1, %al jne 0xa2e7b jmp 0xa2f7e movq 0x4d0(%rsp), %rax movq %rax, 0x3e0(%rsp) movq 0x4d8(%rsp), %rax movq %rax, 0x3d8(%rsp) leaq 0x3d7(%rsp), %rdi movq %rdi, 0x138(%rsp) callq 0x60dc0 movq 0x138(%rsp), %rcx movq 0x3e0(%rsp), %rsi movq 0x3d8(%rsp), %rdx leaq 0x3e8(%rsp), %rdi callq 0x113430 jmp 0xa2ed7 movq 0x158(%rsp), %rdi addq $0x20, %rdi leaq 0x3e8(%rsp), %rsi callq 0x60110 jmp 0xa2ef2 leaq 0x3e8(%rsp), %rdi callq 0x61168 leaq 0x3d7(%rsp), %rdi callq 0x61140 movl $0x3, 0x4bc(%rsp) jmp 0xa3b07 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3b5c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa2f6c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) leaq 0x3e8(%rsp), %rdi callq 0x61168 leaq 0x3d7(%rsp), %rdi callq 0x61140 jmp 0xa3b4f leaq 0x418(%rsp), %rdi callq 0x116ad0 movq %rax, %rsi leaq 0x3b0(%rsp), %rdi movl $0x1, %edx callq 0x143990 jmp 0xa2fa2 movq 0x4d0(%rsp), %rax movq %rax, 0x388(%rsp) leaq 0x418(%rsp), %rdi callq 0x116ad0 movq %rax, %rdi callq 0x116ae0 movq %rax, 0x130(%rsp) jmp 0xa2fd1 movq 0x130(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x380(%rsp) leaq 0x37f(%rsp), %rdi movq %rdi, 0x128(%rsp) callq 0x60dc0 movq 0x128(%rsp), %rcx movq 0x388(%rsp), %rsi movq 0x380(%rsp), %rdx leaq 0x390(%rsp), %rdi callq 0x113430 jmp 0xa3021 movq 0x158(%rsp), %rdi addq $0x20, %rdi leaq 0x390(%rsp), %rsi callq 0x60110 jmp 0xa303c leaq 0x390(%rsp), %rdi callq 0x61168 leaq 0x37f(%rsp), %rdi callq 0x61140 leaq 0x418(%rsp), %rdi callq 0x116ad0 movq %rax, %rdi callq 0x117410 movq (%rax), %rax movq %rax, 0x4d0(%rsp) xorl %eax, %eax movl %eax, %esi leaq 0x368(%rsp), %rdi movq %rdi, 0x118(%rsp) callq 0xb9660 movq 0x118(%rsp), %rdx leaq 0x4d0(%rsp), %rdi leaq 0x4d8(%rsp), %rsi callq 0xa3cb0 movb %al, 0x127(%rsp) jmp 0xa30b5 movb 0x127(%rsp), %al testb $0x1, %al jne 0xa30c5 jmp 0xa346a movq 0x4d0(%rsp), %rax movq %rax, 0x360(%rsp) movq 0x4d8(%rsp), %rax movq %rax, 0x358(%rsp) movq 0x520(%rsp), %rcx movq 0x360(%rsp), %rdi movq 0x358(%rsp), %rsi leaq 0x4f8(%rsp), %rdx xorl %r8d, %r8d callq 0x117770 movb %al, 0x117(%rsp) jmp 0xa3116 movb 0x117(%rsp), %al testb $0x1, %al jne 0xa3287 jmp 0xa3127 movb $0x1, 0x337(%rsp) movl $0x10, %edi callq 0x605a0 movq %rax, 0x108(%rsp) movq 0x538(%rsp), %rdx leaq 0x151789(%rip), %rsi # 0x1f48d9 leaq 0x338(%rsp), %rdi callq 0xb67b0 jmp 0xa315f movq 0x108(%rsp), %rdi leaq 0x338(%rsp), %rsi callq 0x603e0 jmp 0xa3176 movq 0x108(%rsp), %rdi movb $0x0, 0x337(%rsp) movq 0x1d0e23(%rip), %rsi # 0x273fb0 movq 0x1d0de4(%rip), %rdx # 0x273f78 callq 0x60960 jmp 0xa3ca7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3b4f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3b42 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3207 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) leaq 0x390(%rsp), %rdi callq 0x61168 leaq 0x37f(%rsp), %rdi callq 0x61140 jmp 0xa3b42 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3b35 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3269 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) leaq 0x338(%rsp), %rdi callq 0x61168 testb $0x1, 0x337(%rsp) jne 0xa3275 jmp 0xa3282 movq 0x108(%rsp), %rdi callq 0x60c90 jmp 0xa3b35 leaq 0x4f8(%rsp), %rdi callq 0x117410 movq %rax, %rcx movq 0x158(%rsp), %rax movq (%rcx), %rcx movq %rcx, 0x4d0(%rsp) addq $0x58, %rax movq %rax, 0xf8(%rsp) leaq 0x2d0(%rsp), %rdi movq %rdi, 0x100(%rsp) leaq 0x3b0(%rsp), %rsi callq 0x601e0 jmp 0xa32d5 movb $0x1, 0x2cd(%rsp) leaq 0x2d0(%rsp), %rax addq $0x20, %rax movq %rax, 0xf0(%rsp) leaq 0x368(%rsp), %rdi callq 0xb7620 testb $0x1, %al jne 0xa3304 jmp 0xa331d movq 0xf0(%rsp), %rdi leaq 0x368(%rsp), %rsi callq 0xc2af0 jmp 0xa331b jmp 0xa3346 movq 0xf0(%rsp), %rdi leaq 0x368(%rsp), %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0x20, %ecx xorl %r9d, %r9d movl %r9d, %r8d callq 0xb6950 jmp 0xa3344 jmp 0xa3346 movb $0x1, 0x2ce(%rsp) leaq 0x310(%rsp), %rax movq %rax, 0xe0(%rsp) leaq 0x2cf(%rsp), %rdi movq %rdi, 0xe8(%rsp) callq 0x60dc0 movq 0xe0(%rsp), %rdi movq 0xe8(%rsp), %rdx leaq 0x14e8ec(%rip), %rsi # 0x1f1c76 callq 0x703a0 jmp 0xa3391 movq 0xf8(%rsp), %rdi movb $0x0, 0x2ce(%rsp) movb $0x0, 0x2cd(%rsp) leaq 0x2d0(%rsp), %rsi callq 0x142920 jmp 0xa33b8 leaq 0x2d0(%rsp), %rdi callq 0x71550 leaq 0x2cf(%rsp), %rdi callq 0x61140 jmp 0xa3ae2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa344c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3424 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) leaq 0x2d0(%rsp), %rdi callq 0x71550 leaq 0x2cf(%rsp), %rdi callq 0x61140 testb $0x1, 0x2ce(%rsp) jne 0xa343d jmp 0xa344a movq 0xf0(%rsp), %rdi callq 0x61168 jmp 0xa344c testb $0x1, 0x2cd(%rsp) jne 0xa3458 jmp 0xa3465 movq 0x100(%rsp), %rdi callq 0x61168 jmp 0xa3b35 testb $0x1, 0x51f(%rsp) je 0xa3a25 leaq 0x151042(%rip), %rsi # 0x1f44c1 leaq 0x3b0(%rsp), %rdi callq 0x70ec0 movb %al, 0xdf(%rsp) jmp 0xa3495 movb 0xdf(%rsp), %al testb $0x1, %al jne 0xa34a5 jmp 0xa3a25 movq 0x158(%rsp), %rax addq $0x58, %rax movq %rax, 0xc8(%rsp) leaq 0x268(%rsp), %rdi movq %rdi, 0xd0(%rsp) leaq 0x3b0(%rsp), %rsi callq 0x601e0 jmp 0xa34d8 movb $0x1, 0x1aa(%rsp) leaq 0x288(%rsp), %rax movq %rax, 0xc0(%rsp) movb $0x1, 0x1ad(%rsp) leaq 0x230(%rsp), %rax movq %rax, 0x228(%rsp) movb $0x1, 0x1ae(%rsp) leaq 0x1e8(%rsp), %rdi movq %rdi, 0x1e0(%rsp) leaq 0x151193(%rip), %rsi # 0x1f46ba callq 0xb8d00 jmp 0xa352e leaq 0x200(%rsp), %rax movq %rax, 0xb0(%rsp) movq %rax, 0x1e0(%rsp) movq 0x4d0(%rsp), %rax movq %rax, 0x1b8(%rsp) movq 0x4d8(%rsp), %rax movq %rax, 0x1b0(%rsp) leaq 0x1af(%rsp), %rdi movq %rdi, 0xb8(%rsp) callq 0x60dc0 movq 0xb8(%rsp), %rcx movq 0x1b8(%rsp), %rsi movq 0x1b0(%rsp), %rdx leaq 0x1c0(%rsp), %rdi callq 0x113430 jmp 0xa35a2 movq 0xb0(%rsp), %rdi leaq 0x1c0(%rsp), %rsi callq 0xcee10 jmp 0xa35b9 movb $0x0, 0x1ae(%rsp) leaq 0x1e8(%rsp), %rax movq %rax, 0x218(%rsp) movq $0x2, 0x220(%rsp) movq 0x218(%rsp), %rsi movq 0x220(%rsp), %rdx leaq 0x230(%rsp), %rdi callq 0xb8d90 jmp 0xa35fc movb $0x0, 0x1ad(%rsp) leaq 0x230(%rsp), %rax movq %rax, 0x248(%rsp) movq $0x1, 0x250(%rsp) movq 0x248(%rsp), %rsi movq 0x250(%rsp), %rdx leaq 0x258(%rsp), %rdi movl $0x1, %ecx movl $0x2, %r8d callq 0xb8df0 jmp 0xa364a movq 0xc0(%rsp), %rdi leaq 0x258(%rsp), %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0x20, %ecx xorl %r9d, %r9d movl %r9d, %r8d callq 0xb6950 jmp 0xa3671 movb $0x1, 0x1ab(%rsp) leaq 0x2a8(%rsp), %rax movq %rax, 0xa0(%rsp) leaq 0x1ac(%rsp), %rdi movq %rdi, 0xa8(%rsp) callq 0x60dc0 movq 0xa0(%rsp), %rdi movq 0xa8(%rsp), %rdx leaq 0x14e5c1(%rip), %rsi # 0x1f1c76 callq 0x703a0 jmp 0xa36bc movq 0xc8(%rsp), %rdi movb $0x0, 0x1ab(%rsp) movb $0x0, 0x1aa(%rsp) leaq 0x268(%rsp), %rsi callq 0x142920 jmp 0xa36e3 leaq 0x268(%rsp), %rdi callq 0x71550 leaq 0x1ac(%rsp), %rdi callq 0x61140 leaq 0x258(%rsp), %rdi callq 0xb9390 leaq 0x230(%rsp), %rax movq %rax, 0x90(%rsp) addq $0x18, %rax movq %rax, 0x98(%rsp) movq 0x98(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x88(%rsp) callq 0xb8d80 movq 0x90(%rsp), %rcx movq 0x88(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x98(%rsp) jne 0xa3726 leaq 0x1e8(%rsp), %rax movq %rax, 0x78(%rsp) addq $0x30, %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x70(%rsp) callq 0xb8d80 movq 0x78(%rsp), %rcx movq 0x70(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x80(%rsp) jne 0xa3775 leaq 0x1c0(%rsp), %rdi callq 0x61168 leaq 0x1af(%rsp), %rdi callq 0x61140 movl $0x3, 0x4bc(%rsp) jmp 0xa3aed movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3963 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3956 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3949 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa390a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa38cb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa38be movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3896 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) leaq 0x268(%rsp), %rdi callq 0x71550 leaq 0x1ac(%rsp), %rdi callq 0x61140 testb $0x1, 0x1ab(%rsp) jne 0xa38af jmp 0xa38bc movq 0xc0(%rsp), %rdi callq 0x61168 jmp 0xa38be leaq 0x258(%rsp), %rdi callq 0xb9390 leaq 0x230(%rsp), %rax movq %rax, 0x60(%rsp) addq $0x18, %rax movq %rax, 0x68(%rsp) movq 0x68(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x58(%rsp) callq 0xb8d80 movq 0x60(%rsp), %rcx movq 0x58(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x68(%rsp) jne 0xa38e1 jmp 0xa390a leaq 0x1e8(%rsp), %rax movq %rax, 0x48(%rsp) addq $0x30, %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x40(%rsp) callq 0xb8d80 movq 0x48(%rsp), %rcx movq 0x40(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x50(%rsp) jne 0xa3920 jmp 0xa3949 leaq 0x1c0(%rsp), %rdi callq 0x61168 leaq 0x1af(%rsp), %rdi callq 0x61140 testb $0x1, 0x1ae(%rsp) jne 0xa396f jmp 0xa39b5 movq 0x1e0(%rsp), %rax leaq 0x1e8(%rsp), %rcx cmpq %rax, %rcx movq %rax, 0x38(%rsp) je 0xa39b3 movq 0x38(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x30(%rsp) callq 0xb8d80 movq 0x30(%rsp), %rax leaq 0x1e8(%rsp), %rcx cmpq %rcx, %rax movq %rax, 0x38(%rsp) jne 0xa3989 jmp 0xa39b5 testb $0x1, 0x1ad(%rsp) jne 0xa39c1 jmp 0xa3a07 movq 0x228(%rsp), %rax leaq 0x230(%rsp), %rcx cmpq %rax, %rcx movq %rax, 0x28(%rsp) je 0xa3a05 movq 0x28(%rsp), %rdi addq $-0x18, %rdi movq %rdi, 0x20(%rsp) callq 0xb8d80 movq 0x20(%rsp), %rax leaq 0x230(%rsp), %rcx cmpq %rcx, %rax movq %rax, 0x28(%rsp) jne 0xa39db jmp 0xa3a07 testb $0x1, 0x1aa(%rsp) jne 0xa3a13 jmp 0xa3a20 movq 0xd0(%rsp), %rdi callq 0x61168 jmp 0xa3b35 movb $0x1, 0x187(%rsp) movl $0x10, %edi callq 0x605a0 movq %rax, 0x18(%rsp) movq 0x538(%rsp), %rdx leaq 0x150eb9(%rip), %rsi # 0x1f4904 leaq 0x188(%rsp), %rdi callq 0xb67b0 jmp 0xa3a5a movq 0x18(%rsp), %rdi leaq 0x188(%rsp), %rsi callq 0x603e0 jmp 0xa3a6e movq 0x18(%rsp), %rdi movb $0x0, 0x187(%rsp) movq 0x1d052e(%rip), %rsi # 0x273fb0 movq 0x1d04ef(%rip), %rdx # 0x273f78 callq 0x60960 jmp 0xa3ca7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) jmp 0xa3aca movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4e8(%rsp) movl %eax, 0x4e4(%rsp) leaq 0x188(%rsp), %rdi callq 0x61168 testb $0x1, 0x187(%rsp) jne 0xa3ad6 jmp 0xa3ae0 movq 0x18(%rsp), %rdi callq 0x60c90 jmp 0xa3b35 movl $0x0, 0x4bc(%rsp) leaq 0x368(%rsp), %rdi callq 0xb9390 leaq 0x3b0(%rsp), %rdi callq 0x61168 leaq 0x418(%rsp), %rdi callq 0x117710 leaq 0x458(%rsp), %rdi callq 0x117710 movl 0x4bc(%rsp), %eax testl %eax, %eax je 0xa3b30 jmp 0xa3b2e jmp 0xa3b6e jmp 0xa2de6 leaq 0x368(%rsp), %rdi callq 0xb9390 leaq 0x3b0(%rsp), %rdi callq 0x61168 leaq 0x418(%rsp), %rdi callq 0x117710 leaq 0x458(%rsp), %rdi callq 0x117710 jmp 0xa3c80 movq 0x158(%rsp), %rdi addq $0x58, %rdi callq 0xb96a0 testb $0x1, %al jne 0xa3c39 movq 0x158(%rsp), %rsi addq $0x20, %rsi leaq 0x160(%rsp), %rdi callq 0x1ab0c0 jmp 0xa3ba2 leaq 0x160(%rsp), %rdi callq 0x60400 xorb $-0x1, %al movb %al, 0x17(%rsp) leaq 0x160(%rsp), %rdi callq 0x61168 movb 0x17(%rsp), %al testb $0x1, %al jne 0xa3bcc jmp 0xa3c1d jmp 0xa3bce xorl %eax, %eax leaq 0x1d1ab1(%rip), %rcx # 0x275688 cmpl (%rcx), %eax jg 0xa3c17 callq 0x1df610 movq %rax, 0x8(%rsp) jmp 0xa3be7 movq 0x158(%rsp), %rdi addq $0x20, %rdi callq 0x60180 movq 0x8(%rsp), %rdi movq %rax, %rcx leaq 0x150d28(%rip), %rdx # 0x1f492f xorl %eax, %eax movl $0x3, %esi callq 0x1df700 jmp 0xa3c15 jmp 0xa3c17 jmp 0xa3c19 jmp 0xa3c1b jmp 0xa3c1d movq 0x158(%rsp), %rdi addq $0x20, %rdi leaq 0x14e046(%rip), %rsi # 0x1f1c76 callq 0x605e0 jmp 0xa3c37 jmp 0xa3c39 movb $0x1, 0x4f7(%rsp) movl $0x1, 0x4bc(%rsp) testb $0x1, 0x4f7(%rsp) jne 0xa3c63 movq 0x158(%rsp), %rdi callq 0x70980 leaq 0x4f8(%rsp), %rdi callq 0x117830 movq 0x150(%rsp), %rax addq $0x548, %rsp # imm = 0x548 retq movq 0x158(%rsp), %rdi callq 0x70980 leaq 0x4f8(%rsp), %rdi callq 0x117830 movq 0x4e8(%rsp), %rdi callq 0x609a0 nopw (%rax,%rax)
/ggerganov[P]llama/common/chat.cpp
nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)::json_error_locator>::get_ubjson_size_value(unsigned long&, bool&, int)
bool get_ubjson_size_value(std::size_t& result, bool& is_ndarray, char_int_type prefix = 0) { if (prefix == 0) { prefix = get_ignore_noop(); } switch (prefix) { case 'U': { std::uint8_t number{}; if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) { return false; } result = static_cast<std::size_t>(number); return true; } case 'i': { std::int8_t number{}; if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) { return false; } if (number < 0) { return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); } result = static_cast<std::size_t>(number); // NOLINT(bugprone-signed-char-misuse,cert-str34-c): number is not a char return true; } case 'I': { std::int16_t number{}; if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) { return false; } if (number < 0) { return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); } result = static_cast<std::size_t>(number); return true; } case 'l': { std::int32_t number{}; if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) { return false; } if (number < 0) { return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); } result = static_cast<std::size_t>(number); return true; } case 'L': { std::int64_t number{}; if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) { return false; } if (number < 0) { return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); } if (!value_in_range_of<std::size_t>(number)) { return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, exception_message(input_format, "integer value overflow", "size"), nullptr)); } result = static_cast<std::size_t>(number); return true; } case 'u': { if (input_format != input_format_t::bjdata) { break; } std::uint16_t number{}; if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) { return false; } result = static_cast<std::size_t>(number); return true; } case 'm': { if (input_format != input_format_t::bjdata) { break; } std::uint32_t number{}; if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) { return false; } result = conditional_static_cast<std::size_t>(number); return true; } case 'M': { if (input_format != input_format_t::bjdata) { break; } std::uint64_t number{}; if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) { return false; } if (!value_in_range_of<std::size_t>(number)) { return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, exception_message(input_format, "integer value overflow", "size"), nullptr)); } result = detail::conditional_static_cast<std::size_t>(number); return true; } case '[': { if (input_format != input_format_t::bjdata) { break; } if (is_ndarray) // ndarray dimensional vector can only contain integers, and can not embed another array { return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, exception_message(input_format, "ndarray dimensional vector is not allowed", "size"), nullptr)); } std::vector<size_t> dim; if (JSON_HEDLEY_UNLIKELY(!get_ubjson_ndarray_size(dim))) { return false; } if (dim.size() == 1 || (dim.size() == 2 && dim.at(0) == 1)) // return normal array size if 1D row vector { result = dim.at(dim.size() - 1); return true; } if (!dim.empty()) // if ndarray, convert to an object in JData annotated array format { for (auto i : dim) // test if any dimension in an ndarray is 0, if so, return a 1D empty container { if ( i == 0 ) { result = 0; return true; } } string_t key = "_ArraySize_"; if (JSON_HEDLEY_UNLIKELY(!sax->start_object(3) || !sax->key(key) || !sax->start_array(dim.size()))) { return false; } result = 1; for (auto i : dim) { result *= i; if (result == 0 || result == npos) // because dim elements shall not have zeros, result = 0 means overflow happened; it also can't be npos as it is used to initialize size in get_ubjson_size_type() { return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, exception_message(input_format, "excessive ndarray size caused overflow", "size"), nullptr)); } if (JSON_HEDLEY_UNLIKELY(!sax->number_unsigned(static_cast<number_unsigned_t>(i)))) { return false; } } is_ndarray = true; return sax->end_array(); } result = 0; return true; } default: break; } auto last_token = get_token_string(); std::string message; if (input_format != input_format_t::bjdata) { message = "expected length type specification (U, i, I, l, L) after '#'; last byte: 0x" + last_token; } else { message = "expected length type specification (U, i, u, I, m, l, M, L) after '#'; last byte: 0x" + last_token; } return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format, message, "size"), nullptr)); }
subq $0x988, %rsp # imm = 0x988 movq %rdi, 0x978(%rsp) movq %rsi, 0x970(%rsp) movq %rdx, 0x968(%rsp) movl %ecx, 0x964(%rsp) movq 0x978(%rsp), %rax movq %rax, 0x218(%rsp) cmpl $0x0, 0x964(%rsp) jne 0xb0b94 movq 0x218(%rsp), %rdi callq 0xa94f0 movl %eax, 0x964(%rsp) movl 0x964(%rsp), %eax addl $-0x49, %eax movl %eax, %ecx movq %rcx, 0x210(%rsp) subl $0x2c, %eax ja 0xb27d0 movq 0x210(%rsp), %rax leaq 0x13d8b0(%rip), %rcx # 0x1ee470 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x218(%rsp), %rdi movb $0x0, 0x963(%rsp) movl 0x24(%rdi), %esi leaq 0x963(%rsp), %rdx callq 0xaaec0 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb0bf5 jmp 0xb0c02 movb $0x0, 0x987(%rsp) jmp 0xb2a7b movzbl 0x963(%rsp), %eax movl %eax, %ecx movq 0x970(%rsp), %rax movq %rcx, (%rax) movb $0x1, 0x987(%rsp) jmp 0xb2a7b movq 0x218(%rsp), %rdi movb $0x0, 0x962(%rsp) movl 0x24(%rdi), %esi leaq 0x962(%rsp), %rdx callq 0xad6e0 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb0c50 jmp 0xb0c5d movb $0x0, 0x987(%rsp) jmp 0xb2a7b movsbl 0x962(%rsp), %eax cmpl $0x0, %eax jge 0xb0ee7 movq 0x218(%rsp), %rsi movq 0x18(%rsi), %rax movq %rax, 0x1e8(%rsp) movq 0x28(%rsi), %rax movq %rax, 0x1f0(%rsp) leaq 0x940(%rsp), %rdi callq 0xa9570 movq 0x218(%rsp), %rax movq 0x18(%rax), %rcx movq %rcx, 0x1f8(%rsp) movl 0x24(%rax), %eax movl %eax, 0x204(%rsp) leaq 0x8d7(%rsp), %rdi movq %rdi, 0x208(%rsp) callq 0x60dc0 movq 0x208(%rsp), %rdx leaq 0x143f29(%rip), %rsi # 0x1f4c06 leaq 0x8d8(%rsp), %rdi callq 0x703a0 jmp 0xb0cec leaq 0x89f(%rsp), %rdi movq %rdi, 0x1e0(%rsp) callq 0x60dc0 movq 0x1e0(%rsp), %rdx leaq 0x1491fc(%rip), %rsi # 0x1f9f0c leaq 0x8a0(%rsp), %rdi callq 0x703a0 jmp 0xb0d1f movl 0x204(%rsp), %edx movq 0x218(%rsp), %rsi leaq 0x8f8(%rsp), %rdi leaq 0x8d8(%rsp), %rcx leaq 0x8a0(%rsp), %r8 callq 0xa9650 jmp 0xb0d4d movq 0x1f8(%rsp), %rdx xorl %eax, %eax movl %eax, %r8d leaq 0x918(%rsp), %rdi movl $0x71, %esi leaq 0x8f8(%rsp), %rcx callq 0x143e80 jmp 0xb0d76 movq 0x1e8(%rsp), %rsi movq 0x1f0(%rsp), %rdi movq (%rdi), %rax movq 0x60(%rax), %rax leaq 0x940(%rsp), %rdx leaq 0x918(%rsp), %rcx callq *%rax movb %al, 0x1df(%rsp) jmp 0xb0da8 movb 0x1df(%rsp), %al andb $0x1, %al movb %al, 0x987(%rsp) leaq 0x918(%rsp), %rdi callq 0xdec10 leaq 0x8f8(%rsp), %rdi callq 0x61168 leaq 0x8a0(%rsp), %rdi callq 0x61168 leaq 0x89f(%rsp), %rdi callq 0x61140 leaq 0x8d8(%rsp), %rdi callq 0x61168 leaq 0x8d7(%rsp), %rdi callq 0x61140 leaq 0x940(%rsp), %rdi callq 0x61168 jmp 0xb2a7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb0ec8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb0eae movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb0ea1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb0e94 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) leaq 0x918(%rsp), %rdi callq 0xdec10 leaq 0x8f8(%rsp), %rdi callq 0x61168 leaq 0x8a0(%rsp), %rdi callq 0x61168 leaq 0x89f(%rsp), %rdi callq 0x61140 leaq 0x8d8(%rsp), %rdi callq 0x61168 leaq 0x8d7(%rsp), %rdi callq 0x61140 leaq 0x940(%rsp), %rdi callq 0x61168 jmp 0xb2a8c movsbq 0x962(%rsp), %rcx movq 0x970(%rsp), %rax movq %rcx, (%rax) movb $0x1, 0x987(%rsp) jmp 0xb2a7b movq 0x218(%rsp), %rdi movw $0x0, 0x89c(%rsp) movl 0x24(%rdi), %esi leaq 0x89c(%rsp), %rdx callq 0xad810 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb0f36 jmp 0xb0f43 movb $0x0, 0x987(%rsp) jmp 0xb2a7b movswl 0x89c(%rsp), %eax cmpl $0x0, %eax jge 0xb11cd movq 0x218(%rsp), %rsi movq 0x18(%rsi), %rax movq %rax, 0x1b0(%rsp) movq 0x28(%rsi), %rax movq %rax, 0x1b8(%rsp) leaq 0x878(%rsp), %rdi callq 0xa9570 movq 0x218(%rsp), %rax movq 0x18(%rax), %rcx movq %rcx, 0x1c0(%rsp) movl 0x24(%rax), %eax movl %eax, 0x1cc(%rsp) leaq 0x80f(%rsp), %rdi movq %rdi, 0x1d0(%rsp) callq 0x60dc0 movq 0x1d0(%rsp), %rdx leaq 0x143c43(%rip), %rsi # 0x1f4c06 leaq 0x810(%rsp), %rdi callq 0x703a0 jmp 0xb0fd2 leaq 0x7e7(%rsp), %rdi movq %rdi, 0x1a8(%rsp) callq 0x60dc0 movq 0x1a8(%rsp), %rdx leaq 0x148f16(%rip), %rsi # 0x1f9f0c leaq 0x7e8(%rsp), %rdi callq 0x703a0 jmp 0xb1005 movl 0x1cc(%rsp), %edx movq 0x218(%rsp), %rsi leaq 0x830(%rsp), %rdi leaq 0x810(%rsp), %rcx leaq 0x7e8(%rsp), %r8 callq 0xa9650 jmp 0xb1033 movq 0x1c0(%rsp), %rdx xorl %eax, %eax movl %eax, %r8d leaq 0x850(%rsp), %rdi movl $0x71, %esi leaq 0x830(%rsp), %rcx callq 0x143e80 jmp 0xb105c movq 0x1b0(%rsp), %rsi movq 0x1b8(%rsp), %rdi movq (%rdi), %rax movq 0x60(%rax), %rax leaq 0x878(%rsp), %rdx leaq 0x850(%rsp), %rcx callq *%rax movb %al, 0x1a7(%rsp) jmp 0xb108e movb 0x1a7(%rsp), %al andb $0x1, %al movb %al, 0x987(%rsp) leaq 0x850(%rsp), %rdi callq 0xdec10 leaq 0x830(%rsp), %rdi callq 0x61168 leaq 0x7e8(%rsp), %rdi callq 0x61168 leaq 0x7e7(%rsp), %rdi callq 0x61140 leaq 0x810(%rsp), %rdi callq 0x61168 leaq 0x80f(%rsp), %rdi callq 0x61140 leaq 0x878(%rsp), %rdi callq 0x61168 jmp 0xb2a7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb11ae movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1194 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1187 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb117a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) leaq 0x850(%rsp), %rdi callq 0xdec10 leaq 0x830(%rsp), %rdi callq 0x61168 leaq 0x7e8(%rsp), %rdi callq 0x61168 leaq 0x7e7(%rsp), %rdi callq 0x61140 leaq 0x810(%rsp), %rdi callq 0x61168 leaq 0x80f(%rsp), %rdi callq 0x61140 leaq 0x878(%rsp), %rdi callq 0x61168 jmp 0xb2a8c movswq 0x89c(%rsp), %rcx movq 0x970(%rsp), %rax movq %rcx, (%rax) movb $0x1, 0x987(%rsp) jmp 0xb2a7b movq 0x218(%rsp), %rdi movl $0x0, 0x7e0(%rsp) movl 0x24(%rdi), %esi leaq 0x7e0(%rsp), %rdx callq 0xad940 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb121d jmp 0xb122a movb $0x0, 0x987(%rsp) jmp 0xb2a7b cmpl $0x0, 0x7e0(%rsp) jge 0xb14b1 movq 0x218(%rsp), %rsi movq 0x18(%rsi), %rax movq %rax, 0x178(%rsp) movq 0x28(%rsi), %rax movq %rax, 0x180(%rsp) leaq 0x7c0(%rsp), %rdi callq 0xa9570 movq 0x218(%rsp), %rax movq 0x18(%rax), %rcx movq %rcx, 0x188(%rsp) movl 0x24(%rax), %eax movl %eax, 0x194(%rsp) leaq 0x757(%rsp), %rdi movq %rdi, 0x198(%rsp) callq 0x60dc0 movq 0x198(%rsp), %rdx leaq 0x14395f(%rip), %rsi # 0x1f4c06 leaq 0x758(%rsp), %rdi callq 0x703a0 jmp 0xb12b6 leaq 0x72f(%rsp), %rdi movq %rdi, 0x170(%rsp) callq 0x60dc0 movq 0x170(%rsp), %rdx leaq 0x148c32(%rip), %rsi # 0x1f9f0c leaq 0x730(%rsp), %rdi callq 0x703a0 jmp 0xb12e9 movl 0x194(%rsp), %edx movq 0x218(%rsp), %rsi leaq 0x778(%rsp), %rdi leaq 0x758(%rsp), %rcx leaq 0x730(%rsp), %r8 callq 0xa9650 jmp 0xb1317 movq 0x188(%rsp), %rdx xorl %eax, %eax movl %eax, %r8d leaq 0x798(%rsp), %rdi movl $0x71, %esi leaq 0x778(%rsp), %rcx callq 0x143e80 jmp 0xb1340 movq 0x178(%rsp), %rsi movq 0x180(%rsp), %rdi movq (%rdi), %rax movq 0x60(%rax), %rax leaq 0x7c0(%rsp), %rdx leaq 0x798(%rsp), %rcx callq *%rax movb %al, 0x16f(%rsp) jmp 0xb1372 movb 0x16f(%rsp), %al andb $0x1, %al movb %al, 0x987(%rsp) leaq 0x798(%rsp), %rdi callq 0xdec10 leaq 0x778(%rsp), %rdi callq 0x61168 leaq 0x730(%rsp), %rdi callq 0x61168 leaq 0x72f(%rsp), %rdi callq 0x61140 leaq 0x758(%rsp), %rdi callq 0x61168 leaq 0x757(%rsp), %rdi callq 0x61140 leaq 0x7c0(%rsp), %rdi callq 0x61168 jmp 0xb2a7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1492 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1478 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb146b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb145e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) leaq 0x798(%rsp), %rdi callq 0xdec10 leaq 0x778(%rsp), %rdi callq 0x61168 leaq 0x730(%rsp), %rdi callq 0x61168 leaq 0x72f(%rsp), %rdi callq 0x61140 leaq 0x758(%rsp), %rdi callq 0x61168 leaq 0x757(%rsp), %rdi callq 0x61140 leaq 0x7c0(%rsp), %rdi callq 0x61168 jmp 0xb2a8c movslq 0x7e0(%rsp), %rcx movq 0x970(%rsp), %rax movq %rcx, (%rax) movb $0x1, 0x987(%rsp) jmp 0xb2a7b movq 0x218(%rsp), %rdi movq $0x0, 0x720(%rsp) movl 0x24(%rdi), %esi leaq 0x720(%rsp), %rdx callq 0xada70 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb1501 jmp 0xb150e movb $0x0, 0x987(%rsp) jmp 0xb2a7b cmpq $0x0, 0x720(%rsp) jge 0xb1796 movq 0x218(%rsp), %rsi movq 0x18(%rsi), %rax movq %rax, 0x140(%rsp) movq 0x28(%rsi), %rax movq %rax, 0x148(%rsp) leaq 0x700(%rsp), %rdi callq 0xa9570 movq 0x218(%rsp), %rax movq 0x18(%rax), %rcx movq %rcx, 0x150(%rsp) movl 0x24(%rax), %eax movl %eax, 0x15c(%rsp) leaq 0x697(%rsp), %rdi movq %rdi, 0x160(%rsp) callq 0x60dc0 movq 0x160(%rsp), %rdx leaq 0x14367a(%rip), %rsi # 0x1f4c06 leaq 0x698(%rsp), %rdi callq 0x703a0 jmp 0xb159b leaq 0x66f(%rsp), %rdi movq %rdi, 0x138(%rsp) callq 0x60dc0 movq 0x138(%rsp), %rdx leaq 0x14894d(%rip), %rsi # 0x1f9f0c leaq 0x670(%rsp), %rdi callq 0x703a0 jmp 0xb15ce movl 0x15c(%rsp), %edx movq 0x218(%rsp), %rsi leaq 0x6b8(%rsp), %rdi leaq 0x698(%rsp), %rcx leaq 0x670(%rsp), %r8 callq 0xa9650 jmp 0xb15fc movq 0x150(%rsp), %rdx xorl %eax, %eax movl %eax, %r8d leaq 0x6d8(%rsp), %rdi movl $0x71, %esi leaq 0x6b8(%rsp), %rcx callq 0x143e80 jmp 0xb1625 movq 0x140(%rsp), %rsi movq 0x148(%rsp), %rdi movq (%rdi), %rax movq 0x60(%rax), %rax leaq 0x700(%rsp), %rdx leaq 0x6d8(%rsp), %rcx callq *%rax movb %al, 0x137(%rsp) jmp 0xb1657 movb 0x137(%rsp), %al andb $0x1, %al movb %al, 0x987(%rsp) leaq 0x6d8(%rsp), %rdi callq 0xdec10 leaq 0x6b8(%rsp), %rdi callq 0x61168 leaq 0x670(%rsp), %rdi callq 0x61168 leaq 0x66f(%rsp), %rdi callq 0x61140 leaq 0x698(%rsp), %rdi callq 0x61168 leaq 0x697(%rsp), %rdi callq 0x61140 leaq 0x700(%rsp), %rdi callq 0x61168 jmp 0xb2a7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1777 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb175d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1750 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1743 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) leaq 0x6d8(%rsp), %rdi callq 0xdec10 leaq 0x6b8(%rsp), %rdi callq 0x61168 leaq 0x670(%rsp), %rdi callq 0x61168 leaq 0x66f(%rsp), %rdi callq 0x61140 leaq 0x698(%rsp), %rdi callq 0x61168 leaq 0x697(%rsp), %rdi callq 0x61140 leaq 0x700(%rsp), %rdi callq 0x61168 jmp 0xb2a8c movq 0x720(%rsp), %rdi callq 0x146c50 testb $0x1, %al jne 0xb1a0f movq 0x218(%rsp), %rsi movq 0x18(%rsi), %rax movq %rax, 0x110(%rsp) movq 0x28(%rsi), %rax movq %rax, 0x118(%rsp) leaq 0x648(%rsp), %rdi callq 0xa9570 movq 0x218(%rsp), %rax movl 0x24(%rax), %eax movl %eax, 0x124(%rsp) leaq 0x5e7(%rsp), %rdi movq %rdi, 0x128(%rsp) callq 0x60dc0 movq 0x128(%rsp), %rdx leaq 0x143429(%rip), %rsi # 0x1f4c37 leaq 0x5e8(%rsp), %rdi callq 0x703a0 jmp 0xb181d leaq 0x5bf(%rsp), %rdi movq %rdi, 0x108(%rsp) callq 0x60dc0 movq 0x108(%rsp), %rdx leaq 0x1486cb(%rip), %rsi # 0x1f9f0c leaq 0x5c0(%rsp), %rdi callq 0x703a0 jmp 0xb1850 movl 0x124(%rsp), %edx movq 0x218(%rsp), %rsi leaq 0x608(%rsp), %rdi leaq 0x5e8(%rsp), %rcx leaq 0x5c0(%rsp), %r8 callq 0xa9650 jmp 0xb187e xorl %eax, %eax movl %eax, %ecx leaq 0x628(%rsp), %rdi movl $0x198, %esi # imm = 0x198 leaq 0x608(%rsp), %rdx callq 0xe3c00 jmp 0xb189e movq 0x110(%rsp), %rsi movq 0x118(%rsp), %rdi movq (%rdi), %rax movq 0x60(%rax), %rax leaq 0x648(%rsp), %rdx leaq 0x628(%rsp), %rcx callq *%rax movb %al, 0x107(%rsp) jmp 0xb18d0 movb 0x107(%rsp), %al andb $0x1, %al movb %al, 0x987(%rsp) leaq 0x628(%rsp), %rdi callq 0xd0040 leaq 0x608(%rsp), %rdi callq 0x61168 leaq 0x5c0(%rsp), %rdi callq 0x61168 leaq 0x5bf(%rsp), %rdi callq 0x61140 leaq 0x5e8(%rsp), %rdi callq 0x61168 leaq 0x5e7(%rsp), %rdi callq 0x61140 leaq 0x648(%rsp), %rdi callq 0x61168 jmp 0xb2a7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb19f0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb19d6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb19c9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb19bc movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) leaq 0x628(%rsp), %rdi callq 0xd0040 leaq 0x608(%rsp), %rdi callq 0x61168 leaq 0x5c0(%rsp), %rdi callq 0x61168 leaq 0x5bf(%rsp), %rdi callq 0x61140 leaq 0x5e8(%rsp), %rdi callq 0x61168 leaq 0x5e7(%rsp), %rdi callq 0x61140 leaq 0x648(%rsp), %rdi callq 0x61168 jmp 0xb2a8c movq 0x720(%rsp), %rcx movq 0x970(%rsp), %rax movq %rcx, (%rax) movb $0x1, 0x987(%rsp) jmp 0xb2a7b movq 0x218(%rsp), %rax cmpl $0x5, 0x24(%rax) je 0xb1a42 jmp 0xb27d2 movq 0x218(%rsp), %rdi movw $0x0, 0x5bc(%rsp) movl 0x24(%rdi), %esi leaq 0x5bc(%rsp), %rdx callq 0xab090 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb1a70 jmp 0xb1a7d movb $0x0, 0x987(%rsp) jmp 0xb2a7b movzwl 0x5bc(%rsp), %eax movl %eax, %ecx movq 0x970(%rsp), %rax movq %rcx, (%rax) movb $0x1, 0x987(%rsp) jmp 0xb2a7b movq 0x218(%rsp), %rax cmpl $0x5, 0x24(%rax) je 0xb1ab2 jmp 0xb27d2 movq 0x218(%rsp), %rdi movl $0x0, 0x5b8(%rsp) movl 0x24(%rdi), %esi leaq 0x5b8(%rsp), %rdx callq 0xab1c0 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb1ae1 jmp 0xb1aee movb $0x0, 0x987(%rsp) jmp 0xb2a7b movl 0x5b8(%rsp), %edi callq 0x144db0 movq %rax, %rcx movq 0x970(%rsp), %rax movq %rcx, (%rax) movb $0x1, 0x987(%rsp) jmp 0xb2a7b movq 0x218(%rsp), %rax cmpl $0x5, 0x24(%rax) je 0xb1b28 jmp 0xb27d2 movq 0x218(%rsp), %rdi movq $0x0, 0x5b0(%rsp) movl 0x24(%rdi), %esi leaq 0x5b0(%rsp), %rdx callq 0xab2f0 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb1b58 jmp 0xb1b65 movb $0x0, 0x987(%rsp) jmp 0xb2a7b movq 0x5b0(%rsp), %rdi callq 0x146c70 testb $0x1, %al jne 0xb1dde movq 0x218(%rsp), %rsi movq 0x18(%rsi), %rax movq %rax, 0xe0(%rsp) movq 0x28(%rsi), %rax movq %rax, 0xe8(%rsp) leaq 0x590(%rsp), %rdi callq 0xa9570 movq 0x218(%rsp), %rax movl 0x24(%rax), %eax movl %eax, 0xf4(%rsp) leaq 0x52f(%rsp), %rdi movq %rdi, 0xf8(%rsp) callq 0x60dc0 movq 0xf8(%rsp), %rdx leaq 0x14305a(%rip), %rsi # 0x1f4c37 leaq 0x530(%rsp), %rdi callq 0x703a0 jmp 0xb1bec leaq 0x507(%rsp), %rdi movq %rdi, 0xd8(%rsp) callq 0x60dc0 movq 0xd8(%rsp), %rdx leaq 0x1482fc(%rip), %rsi # 0x1f9f0c leaq 0x508(%rsp), %rdi callq 0x703a0 jmp 0xb1c1f movl 0xf4(%rsp), %edx movq 0x218(%rsp), %rsi leaq 0x550(%rsp), %rdi leaq 0x530(%rsp), %rcx leaq 0x508(%rsp), %r8 callq 0xa9650 jmp 0xb1c4d xorl %eax, %eax movl %eax, %ecx leaq 0x570(%rsp), %rdi movl $0x198, %esi # imm = 0x198 leaq 0x550(%rsp), %rdx callq 0xe3c00 jmp 0xb1c6d movq 0xe0(%rsp), %rsi movq 0xe8(%rsp), %rdi movq (%rdi), %rax movq 0x60(%rax), %rax leaq 0x590(%rsp), %rdx leaq 0x570(%rsp), %rcx callq *%rax movb %al, 0xd7(%rsp) jmp 0xb1c9f movb 0xd7(%rsp), %al andb $0x1, %al movb %al, 0x987(%rsp) leaq 0x570(%rsp), %rdi callq 0xd0040 leaq 0x550(%rsp), %rdi callq 0x61168 leaq 0x508(%rsp), %rdi callq 0x61168 leaq 0x507(%rsp), %rdi callq 0x61140 leaq 0x530(%rsp), %rdi callq 0x61168 leaq 0x52f(%rsp), %rdi callq 0x61140 leaq 0x590(%rsp), %rdi callq 0x61168 jmp 0xb2a7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1dbf movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1da5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1d98 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb1d8b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) leaq 0x570(%rsp), %rdi callq 0xd0040 leaq 0x550(%rsp), %rdi callq 0x61168 leaq 0x508(%rsp), %rdi callq 0x61168 leaq 0x507(%rsp), %rdi callq 0x61140 leaq 0x530(%rsp), %rdi callq 0x61168 leaq 0x52f(%rsp), %rdi callq 0x61140 leaq 0x590(%rsp), %rdi callq 0x61168 jmp 0xb2a8c movq 0x5b0(%rsp), %rdi callq 0x144dc0 movq %rax, %rcx movq 0x970(%rsp), %rax movq %rcx, (%rax) movb $0x1, 0x987(%rsp) jmp 0xb2a7b movq 0x218(%rsp), %rax cmpl $0x5, 0x24(%rax) je 0xb1e19 jmp 0xb27d2 movq 0x968(%rsp), %rax testb $0x1, (%rax) je 0xb20a3 movq 0x218(%rsp), %rsi movq 0x18(%rsi), %rax movq %rax, 0xa8(%rsp) movq 0x28(%rsi), %rax movq %rax, 0xb0(%rsp) leaq 0x4e0(%rsp), %rdi callq 0xa9570 movq 0x218(%rsp), %rax movq 0x18(%rax), %rcx movq %rcx, 0xb8(%rsp) movl 0x24(%rax), %eax movl %eax, 0xc4(%rsp) leaq 0x477(%rsp), %rdi movq %rdi, 0xc8(%rsp) callq 0x60dc0 movq 0xc8(%rsp), %rdx leaq 0x142db5(%rip), %rsi # 0x1f4c4e leaq 0x478(%rsp), %rdi callq 0x703a0 jmp 0xb1ea8 leaq 0x44f(%rsp), %rdi movq %rdi, 0xa0(%rsp) callq 0x60dc0 movq 0xa0(%rsp), %rdx leaq 0x148040(%rip), %rsi # 0x1f9f0c leaq 0x450(%rsp), %rdi callq 0x703a0 jmp 0xb1edb movl 0xc4(%rsp), %edx movq 0x218(%rsp), %rsi leaq 0x498(%rsp), %rdi leaq 0x478(%rsp), %rcx leaq 0x450(%rsp), %r8 callq 0xa9650 jmp 0xb1f09 movq 0xb8(%rsp), %rdx xorl %eax, %eax movl %eax, %r8d leaq 0x4b8(%rsp), %rdi movl $0x71, %esi leaq 0x498(%rsp), %rcx callq 0x143e80 jmp 0xb1f32 movq 0xa8(%rsp), %rsi movq 0xb0(%rsp), %rdi movq (%rdi), %rax movq 0x60(%rax), %rax leaq 0x4e0(%rsp), %rdx leaq 0x4b8(%rsp), %rcx callq *%rax movb %al, 0x9f(%rsp) jmp 0xb1f64 movb 0x9f(%rsp), %al andb $0x1, %al movb %al, 0x987(%rsp) leaq 0x4b8(%rsp), %rdi callq 0xdec10 leaq 0x498(%rsp), %rdi callq 0x61168 leaq 0x450(%rsp), %rdi callq 0x61168 leaq 0x44f(%rsp), %rdi callq 0x61140 leaq 0x478(%rsp), %rdi callq 0x61168 leaq 0x477(%rsp), %rdi callq 0x61140 leaq 0x4e0(%rsp), %rdi callq 0x61168 jmp 0xb2a7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb2084 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb206a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb205d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb2050 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) leaq 0x4b8(%rsp), %rdi callq 0xdec10 leaq 0x498(%rsp), %rdi callq 0x61168 leaq 0x450(%rsp), %rdi callq 0x61168 leaq 0x44f(%rsp), %rdi callq 0x61140 leaq 0x478(%rsp), %rdi callq 0x61168 leaq 0x477(%rsp), %rdi callq 0x61140 leaq 0x4e0(%rsp), %rdi callq 0x61168 jmp 0xb2a8c leaq 0x430(%rsp), %rdi movq %rdi, 0x90(%rsp) callq 0x123d70 movq 0x218(%rsp), %rdi movq 0x90(%rsp), %rsi callq 0xb2aa0 movb %al, 0x9e(%rsp) jmp 0xb20d6 movb 0x9e(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb20e9 jmp 0xb211a movb $0x0, 0x987(%rsp) movl $0x1, 0x42c(%rsp) jmp 0xb27ac movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb27be leaq 0x430(%rsp), %rdi callq 0x125330 cmpq $0x1, %rax je 0xb216d leaq 0x430(%rsp), %rdi callq 0x125330 cmpq $0x2, %rax jne 0xb21c7 xorl %eax, %eax movl %eax, %esi leaq 0x430(%rsp), %rdi callq 0x146c90 movq %rax, 0x88(%rsp) jmp 0xb215f movq 0x88(%rsp), %rax cmpq $0x1, (%rax) jne 0xb21c7 leaq 0x430(%rsp), %rdi movq %rdi, 0x78(%rsp) callq 0x125330 movq 0x78(%rsp), %rdi movq %rax, %rsi decq %rsi callq 0x146c90 movq %rax, 0x80(%rsp) jmp 0xb2199 movq 0x80(%rsp), %rax movq (%rax), %rcx movq 0x970(%rsp), %rax movq %rcx, (%rax) movb $0x1, 0x987(%rsp) movl $0x1, 0x42c(%rsp) jmp 0xb27ac leaq 0x430(%rsp), %rdi callq 0x146cd0 testb $0x1, %al jne 0xb278a leaq 0x430(%rsp), %rax movq %rax, 0x420(%rsp) movq 0x420(%rsp), %rdi callq 0x125240 movq %rax, 0x418(%rsp) movq 0x420(%rsp), %rdi callq 0x1250c0 movq %rax, 0x410(%rsp) leaq 0x418(%rsp), %rdi leaq 0x410(%rsp), %rsi callq 0x12c3c0 testb $0x1, %al jne 0xb2231 jmp 0xb228c leaq 0x418(%rsp), %rdi callq 0x12c400 movq (%rax), %rax movq %rax, 0x408(%rsp) cmpq $0x0, 0x408(%rsp) jne 0xb227b movq 0x970(%rsp), %rax movq $0x0, (%rax) movb $0x1, 0x987(%rsp) movl $0x1, 0x42c(%rsp) jmp 0xb27ac jmp 0xb227d leaq 0x418(%rsp), %rdi callq 0x12c410 jmp 0xb2216 leaq 0x3e7(%rsp), %rdi movq %rdi, 0x70(%rsp) callq 0x60dc0 movq 0x70(%rsp), %rdx leaq 0x1429ce(%rip), %rsi # 0x1f4c78 leaq 0x3e8(%rsp), %rdi callq 0x703a0 jmp 0xb22b9 leaq 0x3e7(%rsp), %rdi callq 0x61140 movq 0x218(%rsp), %rax movq 0x28(%rax), %rdi movq (%rdi), %rax movq 0x38(%rax), %rax movl $0x3, %esi callq *%rax movb %al, 0x6f(%rsp) jmp 0xb22e6 movb 0x6f(%rsp), %cl movb $0x1, %al testb $0x1, %cl movb %al, 0x6e(%rsp) jne 0xb22f7 jmp 0xb236a movq 0x218(%rsp), %rax movq 0x28(%rax), %rdi movq (%rdi), %rax movq 0x40(%rax), %rax leaq 0x3e8(%rsp), %rsi callq *%rax movb %al, 0x6d(%rsp) jmp 0xb231a movb 0x6d(%rsp), %cl movb $0x1, %al testb $0x1, %cl movb %al, 0x6e(%rsp) jne 0xb232b jmp 0xb236a movq 0x218(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0x60(%rsp) leaq 0x430(%rsp), %rdi callq 0x125330 movq 0x60(%rsp), %rdi movq %rax, %rsi movq (%rdi), %rax movq 0x50(%rax), %rax callq *%rax movb %al, 0x6c(%rsp) jmp 0xb2360 movb 0x6c(%rsp), %al xorb $-0x1, %al movb %al, 0x6e(%rsp) movb 0x6e(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb2378 jmp 0xb23cf movb $0x0, 0x987(%rsp) movl $0x1, 0x42c(%rsp) jmp 0xb276c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) leaq 0x3e7(%rsp), %rdi callq 0x61140 jmp 0xb27be movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb277b movq 0x970(%rsp), %rax movq $0x1, (%rax) leaq 0x430(%rsp), %rax movq %rax, 0x3d8(%rsp) movq 0x3d8(%rsp), %rdi callq 0x125240 movq %rax, 0x3d0(%rsp) movq 0x3d8(%rsp), %rdi callq 0x1250c0 movq %rax, 0x3c8(%rsp) leaq 0x3d0(%rsp), %rdi leaq 0x3c8(%rsp), %rsi callq 0x12c3c0 testb $0x1, %al jne 0xb2436 jmp 0xb272e leaq 0x3d0(%rsp), %rdi callq 0x12c400 movq (%rax), %rax movq %rax, 0x3c0(%rsp) movq 0x3c0(%rsp), %rcx movq 0x970(%rsp), %rax imulq (%rax), %rcx movq %rcx, (%rax) movq 0x970(%rsp), %rax cmpq $0x0, (%rax) je 0xb2485 movq 0x970(%rsp), %rax cmpq $-0x1, (%rax) jne 0xb26d2 movq 0x218(%rsp), %rsi movq 0x18(%rsi), %rax movq %rax, 0x50(%rsp) movq 0x28(%rsi), %rax movq %rax, 0x58(%rsp) leaq 0x3a0(%rsp), %rdi callq 0xa9570 jmp 0xb24ae movq 0x218(%rsp), %rax movl 0x24(%rax), %eax movl %eax, 0x44(%rsp) leaq 0x33f(%rsp), %rdi movq %rdi, 0x48(%rsp) callq 0x60dc0 movq 0x48(%rsp), %rdx leaq 0x1427a9(%rip), %rsi # 0x1f4c84 leaq 0x340(%rsp), %rdi callq 0x703a0 jmp 0xb24ea leaq 0x317(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0x60dc0 movq 0x38(%rsp), %rdx leaq 0x147a04(%rip), %rsi # 0x1f9f0c leaq 0x318(%rsp), %rdi callq 0x703a0 jmp 0xb2517 movl 0x44(%rsp), %edx movq 0x218(%rsp), %rsi leaq 0x360(%rsp), %rdi leaq 0x340(%rsp), %rcx leaq 0x318(%rsp), %r8 callq 0xa9650 jmp 0xb2542 xorl %eax, %eax movl %eax, %ecx leaq 0x380(%rsp), %rdi movl $0x198, %esi # imm = 0x198 leaq 0x360(%rsp), %rdx callq 0xe3c00 jmp 0xb2562 movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdi movq (%rdi), %rax movq 0x60(%rax), %rax leaq 0x3a0(%rsp), %rdx leaq 0x380(%rsp), %rcx callq *%rax movb %al, 0x37(%rsp) jmp 0xb258b movb 0x37(%rsp), %al andb $0x1, %al movb %al, 0x987(%rsp) leaq 0x380(%rsp), %rdi callq 0xd0040 leaq 0x360(%rsp), %rdi callq 0x61168 leaq 0x318(%rsp), %rdi callq 0x61168 leaq 0x317(%rsp), %rdi callq 0x61140 leaq 0x340(%rsp), %rdi callq 0x61168 leaq 0x33f(%rsp), %rdi callq 0x61140 leaq 0x3a0(%rsp), %rdi callq 0x61168 movl $0x1, 0x42c(%rsp) jmp 0xb276c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb26b3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb2699 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb268c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb267f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) leaq 0x380(%rsp), %rdi callq 0xd0040 leaq 0x360(%rsp), %rdi callq 0x61168 leaq 0x318(%rsp), %rdi callq 0x61168 leaq 0x317(%rsp), %rdi callq 0x61140 leaq 0x340(%rsp), %rdi callq 0x61168 leaq 0x33f(%rsp), %rdi callq 0x61140 leaq 0x3a0(%rsp), %rdi callq 0x61168 jmp 0xb277b movq 0x218(%rsp), %rax movq 0x28(%rax), %rdi movq 0x3c0(%rsp), %rsi movq (%rdi), %rax movq 0x18(%rax), %rax callq *%rax movb %al, 0x36(%rsp) jmp 0xb26f5 movb 0x36(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb2705 jmp 0xb271a movb $0x0, 0x987(%rsp) movl $0x1, 0x42c(%rsp) jmp 0xb276c jmp 0xb271c leaq 0x3d0(%rsp), %rdi callq 0x12c410 jmp 0xb2418 movq 0x218(%rsp), %rax movq 0x968(%rsp), %rcx movb $0x1, (%rcx) movq 0x28(%rax), %rdi movq (%rdi), %rax movq 0x58(%rax), %rax callq *%rax movb %al, 0x35(%rsp) jmp 0xb2754 movb 0x35(%rsp), %al andb $0x1, %al movb %al, 0x987(%rsp) movl $0x1, 0x42c(%rsp) leaq 0x3e8(%rsp), %rdi callq 0x61168 jmp 0xb27ac leaq 0x3e8(%rsp), %rdi callq 0x61168 jmp 0xb27be movq 0x970(%rsp), %rax movq $0x0, (%rax) movb $0x1, 0x987(%rsp) movl $0x1, 0x42c(%rsp) leaq 0x430(%rsp), %rdi callq 0x124120 jmp 0xb2a7b leaq 0x430(%rsp), %rdi callq 0x124120 jmp 0xb2a8c jmp 0xb27d2 movq 0x218(%rsp), %rsi leaq 0x2f0(%rsp), %rdi callq 0xa9570 leaq 0x2d0(%rsp), %rdi callq 0x60500 movq 0x218(%rsp), %rax cmpl $0x5, 0x24(%rax) je 0xb285d leaq 0x1424a2(%rip), %rsi # 0x1f4cab leaq 0x2b0(%rsp), %rdi leaq 0x2f0(%rsp), %rdx callq 0xb67b0 jmp 0xb2820 leaq 0x2d0(%rsp), %rdi leaq 0x2b0(%rsp), %rsi callq 0x607e0 leaq 0x2b0(%rsp), %rdi callq 0x61168 jmp 0xb289d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb2a5f leaq 0x142493(%rip), %rsi # 0x1f4cf7 leaq 0x290(%rsp), %rdi leaq 0x2f0(%rsp), %rdx callq 0xb67b0 jmp 0xb287b leaq 0x2d0(%rsp), %rdi leaq 0x290(%rsp), %rsi callq 0x607e0 leaq 0x290(%rsp), %rdi callq 0x61168 movq 0x218(%rsp), %rax movq 0x28(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x18(%rax), %rcx movq %rcx, 0x10(%rsp) movq %rcx, 0x18(%rsp) movl 0x24(%rax), %eax movl %eax, 0x24(%rsp) leaq 0x227(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0x60dc0 movq 0x28(%rsp), %rdx leaq 0x14762b(%rip), %rsi # 0x1f9f0c leaq 0x228(%rsp), %rdi callq 0x703a0 jmp 0xb28f0 movl 0x24(%rsp), %edx movq 0x218(%rsp), %rsi leaq 0x248(%rsp), %rdi leaq 0x2d0(%rsp), %rcx leaq 0x228(%rsp), %r8 callq 0xa9650 jmp 0xb291b movq 0x10(%rsp), %rdx xorl %eax, %eax movl %eax, %r8d leaq 0x268(%rsp), %rdi movl $0x71, %esi leaq 0x248(%rsp), %rcx callq 0x143e80 jmp 0xb2941 movq 0x18(%rsp), %rsi movq 0x8(%rsp), %rdi movq (%rdi), %rax movq 0x60(%rax), %rax leaq 0x2f0(%rsp), %rdx leaq 0x268(%rsp), %rcx callq *%rax movb %al, 0x7(%rsp) jmp 0xb296a movb 0x7(%rsp), %al andb $0x1, %al movb %al, 0x987(%rsp) leaq 0x268(%rsp), %rdi callq 0xdec10 leaq 0x248(%rsp), %rdi callq 0x61168 leaq 0x228(%rsp), %rdi callq 0x61168 leaq 0x227(%rsp), %rdi callq 0x61140 movl $0x1, 0x42c(%rsp) leaq 0x2d0(%rsp), %rdi callq 0x61168 leaq 0x2f0(%rsp), %rdi callq 0x61168 jmp 0xb2a7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb2a52 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb2a45 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) jmp 0xb2a38 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x8c8(%rsp) movl %eax, 0x8c4(%rsp) leaq 0x268(%rsp), %rdi callq 0xdec10 leaq 0x248(%rsp), %rdi callq 0x61168 leaq 0x228(%rsp), %rdi callq 0x61168 leaq 0x227(%rsp), %rdi callq 0x61140 leaq 0x2d0(%rsp), %rdi callq 0x61168 leaq 0x2f0(%rsp), %rdi callq 0x61168 jmp 0xb2a8c movb 0x987(%rsp), %al andb $0x1, %al addq $0x988, %rsp # imm = 0x988 retq movq 0x8c8(%rsp), %rdi callq 0x609a0 nopl (%rax)
/ggerganov[P]llama/common/json.hpp
bool nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)::json_error_locator>::get_string<long>(nlohmann::json_abi_v3_11_3::detail::input_format_t, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool get_string(const input_format_t format, const NumberType len, string_t& result) { bool success = true; for (NumberType i = 0; i < len; i++) { get(); if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "string"))) { success = false; break; } result.push_back(static_cast<typename string_t::value_type>(current)); } return success; }
subq $0x38, %rsp movq %rdi, 0x30(%rsp) movl %esi, 0x2c(%rsp) movq %rdx, 0x20(%rsp) movq %rcx, 0x18(%rsp) movq 0x30(%rsp), %rax movq %rax, (%rsp) movb $0x1, 0x17(%rsp) movq $0x0, 0x8(%rsp) movq 0x8(%rsp), %rax cmpq 0x20(%rsp), %rax jge 0xb39de movq (%rsp), %rdi callq 0xa9530 movq (%rsp), %rdi movl 0x2c(%rsp), %esi leaq 0x1477a9(%rip), %rdx # 0x1fb14b callq 0xa9ab0 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb39b3 jmp 0xb39ba movb $0x0, 0x17(%rsp) jmp 0xb39de movq (%rsp), %rax movq 0x18(%rsp), %rdi movl 0x10(%rax), %eax movsbl %al, %esi callq 0x610a0 movq 0x8(%rsp), %rax addq $0x1, %rax movq %rax, 0x8(%rsp) jmp 0xb397e movb 0x17(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq nopl (%rax)
/ggerganov[P]llama/common/json.hpp
handle_think_tag_prelude(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, std::function<common_chat_msg (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&)
static common_chat_msg handle_think_tag_prelude(const std::string & input, bool extract_reasoning, const std::function<common_chat_msg(const std::string &)> & rest_parser) { std::smatch match; static const std::regex reasoning_content_regex("((?:<think>)?([\\s\\S\\r\\n]*?)</think>)?([\\s\\S\\r\\n]*)"); if (std::regex_match(input, match, reasoning_content_regex)) { auto rest = match[3].str(); auto msg = rest_parser(rest); auto reasoning_content = string_strip(match[2].str()); if (extract_reasoning) { msg.reasoning_content = reasoning_content; } else if (!reasoning_content.empty()) { std::ostringstream content; content << "<think>" << reasoning_content << "</think>" << msg.content; msg.content = content.str(); } return msg; } return rest_parser(input); }
subq $0x298, %rsp # imm = 0x298 movq %rdi, 0x30(%rsp) movb %dl, %al movq %rdi, %rdx movq %rdx, 0x38(%rsp) movq %rdi, 0x290(%rsp) movq %rsi, 0x288(%rsp) andb $0x1, %al movb %al, 0x287(%rsp) movq %rcx, 0x278(%rsp) leaq 0x258(%rsp), %rdi callq 0x117730 cmpb $0x0, 0x1c1225(%rip) # 0x274dd0 jne 0xb3bfe leaq 0x1c121c(%rip), %rdi # 0x274dd0 callq 0x60510 cmpl $0x0, %eax je 0xb3bfe leaq 0x1c11eb(%rip), %rdi # 0x274db0 leaq 0x141357(%rip), %rsi # 0x1f4f23 movl $0x10, %edx callq 0xbae60 jmp 0xb3bd8 leaq 0x7331(%rip), %rdi # 0xbaf10 leaq 0x1c11ca(%rip), %rsi # 0x274db0 leaq 0x1c0ccb(%rip), %rdx # 0x2748b8 callq 0x60c70 leaq 0x1c11d7(%rip), %rdi # 0x274dd0 callq 0x60890 movq 0x288(%rsp), %rdi leaq 0x1c11a3(%rip), %rdx # 0x274db0 leaq 0x258(%rsp), %rsi xorl %ecx, %ecx callq 0x143270 movb %al, 0x2f(%rsp) jmp 0xb3c22 movb 0x2f(%rsp), %al testb $0x1, %al jne 0xb3c2f jmp 0xb3eee leaq 0x258(%rsp), %rdi movl $0x3, %esi callq 0x11f910 movq %rax, 0x20(%rsp) jmp 0xb3c48 movq 0x20(%rsp), %rsi leaq 0x228(%rsp), %rdi callq 0x1432d0 jmp 0xb3c5c movq 0x30(%rsp), %rdi movb $0x0, 0x227(%rsp) movq 0x278(%rsp), %rsi leaq 0x228(%rsp), %rdx callq 0x149980 jmp 0xb3c80 leaq 0x258(%rsp), %rdi movl $0x2, %esi callq 0x11f910 movq %rax, 0x18(%rsp) jmp 0xb3c99 movq 0x18(%rsp), %rsi leaq 0x1e0(%rsp), %rdi callq 0x1432d0 jmp 0xb3cad leaq 0x200(%rsp), %rdi leaq 0x1e0(%rsp), %rsi callq 0x1ab0c0 jmp 0xb3cc4 leaq 0x1e0(%rsp), %rdi callq 0x61168 testb $0x1, 0x287(%rsp) je 0xb3dab movq 0x30(%rsp), %rdi addq $0x70, %rdi leaq 0x200(%rsp), %rsi callq 0x61050 jmp 0xb3cf7 jmp 0xb3e84 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x250(%rsp) movl %eax, 0x24c(%rsp) leaq 0x1c10b9(%rip), %rdi # 0x274dd0 callq 0x60630 jmp 0xb3f2c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x250(%rsp) movl %eax, 0x24c(%rsp) jmp 0xb3f2c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x250(%rsp) movl %eax, 0x24c(%rsp) jmp 0xb3edf movq %rax, %rcx movl %edx, %eax movq %rcx, 0x250(%rsp) movl %eax, 0x24c(%rsp) jmp 0xb3ed5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x250(%rsp) movl %eax, 0x24c(%rsp) leaq 0x1e0(%rsp), %rdi callq 0x61168 jmp 0xb3ed5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x250(%rsp) movl %eax, 0x24c(%rsp) jmp 0xb3ead leaq 0x200(%rsp), %rdi callq 0x60400 testb $0x1, %al jne 0xb3e82 leaq 0x68(%rsp), %rdi callq 0x60d90 jmp 0xb3dcc leaq 0x13dd68(%rip), %rsi # 0x1f1b3b leaq 0x68(%rsp), %rdi callq 0x608b0 movq %rax, 0x10(%rsp) jmp 0xb3de4 movq 0x10(%rsp), %rdi leaq 0x200(%rsp), %rsi callq 0x60460 movq %rax, 0x8(%rsp) jmp 0xb3dfd movq 0x8(%rsp), %rdi leaq 0x13dd3a(%rip), %rsi # 0x1f1b43 callq 0x608b0 movq %rax, (%rsp) jmp 0xb3e14 movq (%rsp), %rdi movq 0x30(%rsp), %rsi addq $0x20, %rsi callq 0x60460 jmp 0xb3e28 leaq 0x48(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x61080 jmp 0xb3e39 movq 0x30(%rsp), %rdi addq $0x20, %rdi leaq 0x48(%rsp), %rsi callq 0x607e0 leaq 0x48(%rsp), %rdi callq 0x61168 leaq 0x68(%rsp), %rdi callq 0x60cc0 jmp 0xb3e82 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x250(%rsp) movl %eax, 0x24c(%rsp) leaq 0x68(%rsp), %rdi callq 0x60cc0 jmp 0xb3ead jmp 0xb3e84 movb $0x1, 0x227(%rsp) movl $0x1, 0x44(%rsp) leaq 0x200(%rsp), %rdi callq 0x61168 testb $0x1, 0x227(%rsp) jne 0xb3ec6 jmp 0xb3ebc leaq 0x200(%rsp), %rdi callq 0x61168 jmp 0xb3ed5 movq 0x30(%rsp), %rdi callq 0x70980 leaq 0x228(%rsp), %rdi callq 0x61168 jmp 0xb3f12 movq 0x30(%rsp), %rdi callq 0x70980 leaq 0x228(%rsp), %rdi callq 0x61168 jmp 0xb3f2c movq 0x30(%rsp), %rdi movq 0x278(%rsp), %rsi movq 0x288(%rsp), %rdx callq 0x149980 jmp 0xb3f0a movl $0x1, 0x44(%rsp) leaq 0x258(%rsp), %rdi callq 0x117830 movq 0x38(%rsp), %rax addq $0x298, %rsp # imm = 0x298 retq leaq 0x258(%rsp), %rdi callq 0x117830 movq 0x250(%rsp), %rdi callq 0x609a0 nopw %cs:(%rax,%rax)
/ggerganov[P]llama/common/chat.cpp
parse_literal(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, 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>> const&)
static bool parse_literal(std::string::const_iterator & it, const std::string::const_iterator & end, const std::string & expected) { auto expected_it = expected.begin(); auto tmp_it = it; while (tmp_it != end && expected_it != expected.end() && *tmp_it == *expected_it) { ++tmp_it; ++expected_it; } if (expected_it == expected.end()) { it = tmp_it; return true; } return false; }
subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq 0x28(%rsp), %rdi callq 0x60320 movq %rax, 0x20(%rsp) movq 0x38(%rsp), %rax movq (%rax), %rax movq %rax, 0x18(%rsp) movq 0x30(%rsp), %rsi leaq 0x18(%rsp), %rdi callq 0xdb580 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0x7(%rsp) jne 0xb46ed jmp 0xb4746 movq 0x28(%rsp), %rdi callq 0x60ef0 movq %rax, 0x10(%rsp) leaq 0x20(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xdb580 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0x7(%rsp) jne 0xb471a jmp 0xb4746 leaq 0x18(%rsp), %rdi callq 0xdb5d0 movsbl (%rax), %eax movl %eax, (%rsp) leaq 0x20(%rsp), %rdi callq 0xdb5d0 movq %rax, %rcx movl (%rsp), %eax movsbl (%rcx), %ecx cmpl %ecx, %eax sete %al movb %al, 0x7(%rsp) movb 0x7(%rsp), %al testb $0x1, %al jne 0xb4750 jmp 0xb4769 leaq 0x18(%rsp), %rdi callq 0xdb680 leaq 0x20(%rsp), %rdi callq 0xdb680 jmp 0xb46cf movq 0x28(%rsp), %rdi callq 0x60ef0 movq %rax, 0x8(%rsp) leaq 0x20(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x11a730 testb $0x1, %al jne 0xb478d jmp 0xb47a1 movq 0x38(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, (%rax) movb $0x1, 0x47(%rsp) jmp 0xb47a6 movb $0x0, 0x47(%rsp) movb 0x47(%rsp), %al andb $0x1, %al addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
/ggerganov[P]llama/common/chat.cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++()
iter_impl& operator++() { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { std::advance(m_it.object_iterator, 1); break; } case value_t::array: { std::advance(m_it.array_iterator, 1); break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { ++m_it.primitive_iterator; break; } } return *this; }
subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, (%rax) jne 0xb777a leaq 0x13a5a0(%rip), %rdi # 0x1f1d00 movl $0x33c0, %esi # imm = 0x33C0 leaq 0x139cbc(%rip), %rdx # 0x1f1428 leaq 0x13bca6(%rip), %rcx # 0x1f3419 movb $0x0, %al callq 0x60c20 movq 0x8(%rsp), %rax movq (%rax), %rax movzbl (%rax), %eax movq %rax, (%rsp) subq $0x9, %rax ja 0xb77d3 movq (%rsp), %rax leaq 0x135c96(%rip), %rcx # 0x1ed430 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rsp), %rdi addq $0x8, %rdi movl $0x1, %esi callq 0xef3a0 jmp 0xb77e5 movq 0x8(%rsp), %rdi addq $0x8, %rdi addq $0x8, %rdi movl $0x1, %esi callq 0xef3f0 jmp 0xb77e5 jmp 0xb77d3 movq 0x8(%rsp), %rdi addq $0x8, %rdi addq $0x10, %rdi callq 0xef440 movq 0x8(%rsp), %rax addq $0x18, %rsp retq nop
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xb6f10 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb7898 jmp 0xb7974 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x605a0 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xca160 movq %rax, 0x90(%rsp) leaq 0x13a69a(%rip), %rsi # 0x1f1f62 leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0xd0050 jmp 0xb78df movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xc9f00 jmp 0xb78fd movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x1ba547(%rip), %rsi # 0x271e58 leaq 0x128f8(%rip), %rdx # 0xca210 callq 0x60960 jmp 0xb7af1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xb7959 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x61168 testb $0x1, 0x83(%rsp) jne 0xb7965 jmp 0xb796f movq 0x18(%rsp), %rdi callq 0x60c90 jmp 0xb7ae4 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0xd8cb0 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xc9ec0 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xd88e0 testb $0x1, %al jne 0xb79bd jmp 0xb7ace movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x605a0 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x60dc0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x703a0 jmp 0xb7a02 leaq 0x13a7c0(%rip), %rsi # 0x1f21c9 leaq 0x13a7bf(%rip), %rcx # 0x1f21cf leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0xd8a80 jmp 0xb7a21 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0x152e30 jmp 0xb7a3b movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x1ba475(%rip), %rsi # 0x271ec0 leaq 0x185ee(%rip), %rdx # 0xd0040 callq 0x60960 jmp 0xb7af1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xb7ab0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xb7aa6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x61168 leaq 0x30(%rsp), %rdi callq 0x61168 leaq 0x2f(%rsp), %rdi callq 0x61140 testb $0x1, 0x2e(%rsp) jne 0xb7ac3 jmp 0xb7acc movq (%rsp), %rdi callq 0x60c90 jmp 0xb7ae4 leaq 0x78(%rsp), %rdi callq 0xc9ef0 addq $0x20, %rax addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x609a0 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xb6f10 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb7bf8 jmp 0xb7cd4 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x605a0 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xca160 movq %rax, 0x90(%rsp) leaq 0x13a33a(%rip), %rsi # 0x1f1f62 leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0xd0050 jmp 0xb7c3f movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xc9f00 jmp 0xb7c5d movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x1ba1e7(%rip), %rsi # 0x271e58 leaq 0x12598(%rip), %rdx # 0xca210 callq 0x60960 jmp 0xb7e51 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xb7cb9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x61168 testb $0x1, 0x83(%rsp) jne 0xb7cc5 jmp 0xb7ccf movq 0x18(%rsp), %rdi callq 0x60c90 jmp 0xb7e44 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0xd8d80 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xc9ec0 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xd88e0 testb $0x1, %al jne 0xb7d1d jmp 0xb7e2e movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x605a0 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x60dc0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x703a0 jmp 0xb7d62 leaq 0x13a460(%rip), %rsi # 0x1f21c9 leaq 0x13a45f(%rip), %rcx # 0x1f21cf leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0xd8a80 jmp 0xb7d81 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0x152e30 jmp 0xb7d9b movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x1ba115(%rip), %rsi # 0x271ec0 leaq 0x1828e(%rip), %rdx # 0xd0040 callq 0x60960 jmp 0xb7e51 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xb7e10 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xb7e06 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x61168 leaq 0x30(%rsp), %rdi callq 0x61168 leaq 0x2f(%rsp), %rdi callq 0x61140 testb $0x1, 0x2e(%rsp) jne 0xb7e23 jmp 0xb7e2c movq (%rsp), %rdi callq 0x60c90 jmp 0xb7e44 leaq 0x78(%rsp), %rdi callq 0xc9ef0 addq $0x20, %rax addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x609a0 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<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>> const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
subq $0x158, %rsp # imm = 0x158 movq %rdx, 0x8(%rsp) movq %rdi, 0x10(%rsp) movb %r8b, %al movq %rdi, %r8 movq %r8, 0x18(%rsp) movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movq %rdx, 0x140(%rsp) andb $0x1, %cl movb %cl, 0x13f(%rsp) andb $0x1, %al movb %al, 0x13e(%rsp) movb $0x0, 0x13d(%rsp) xorl %eax, %eax movl %eax, %esi callq 0xb9660 movq 0x148(%rsp), %rdi callq 0xd9000 movq %rdx, 0x20(%rsp) movq %rax, 0x28(%rsp) jmp 0xb9981 movq 0x8(%rsp), %rsi movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq %rcx, 0x60(%rsp) movq %rax, 0x68(%rsp) leaq 0x30(%rsp), %rdi callq 0xd9030 jmp 0xb99a6 movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movzbl 0x13e(%rsp), %r9d movzbl 0x13f(%rsp), %r8d andl $0x1, %r8d andl $0x1, %r9d leaq 0x70(%rsp), %rdi leaq 0x30(%rsp), %rcx callq 0xd8f20 jmp 0xb99db movq 0x10(%rsp), %rdx leaq 0x70(%rsp), %rdi movl $0x1, %esi callq 0xd90e0 jmp 0xb99f1 leaq 0x70(%rsp), %rdi callq 0xd97c0 leaq 0x30(%rsp), %rdi callq 0xb9ad0 movb $0x1, 0x13d(%rsp) testb $0x1, 0x13d(%rsp) jne 0xb9a67 jmp 0xb9a5d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xb9a74 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xb9a51 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x70(%rsp), %rdi callq 0xd97c0 leaq 0x30(%rsp), %rdi callq 0xb9ad0 jmp 0xb9a74 movq 0x10(%rsp), %rdi callq 0xb9390 movq 0x18(%rsp), %rax addq $0x158, %rsp # imm = 0x158 retq movq 0x10(%rsp), %rdi callq 0xb9390 movq 0x58(%rsp), %rdi callq 0x609a0 nopl (%rax,%rax)
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [12], 0>(char const (&) [12]) const
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xb6f10 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xb9b48 jmp 0xb9c24 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x605a0 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xca160 movq %rax, 0x90(%rsp) leaq 0x1383ea(%rip), %rsi # 0x1f1f62 leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0xd0050 jmp 0xb9b8f movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xc9f00 jmp 0xb9bad movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x1b8297(%rip), %rsi # 0x271e58 leaq 0x10648(%rip), %rdx # 0xca210 callq 0x60960 jmp 0xb9da1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xb9c09 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x61168 testb $0x1, 0x83(%rsp) jne 0xb9c15 jmp 0xb9c1f movq 0x18(%rsp), %rdi callq 0x60c90 jmp 0xb9d94 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0x140160 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xc9ec0 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xd88e0 testb $0x1, %al jne 0xb9c6d jmp 0xb9d7e movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x605a0 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x60dc0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x703a0 jmp 0xb9cb2 leaq 0x138510(%rip), %rsi # 0x1f21c9 leaq 0x13850f(%rip), %rcx # 0x1f21cf leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0xd8a80 jmp 0xb9cd1 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0x152e30 jmp 0xb9ceb movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x1b81c5(%rip), %rsi # 0x271ec0 leaq 0x1633e(%rip), %rdx # 0xd0040 callq 0x60960 jmp 0xb9da1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xb9d60 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0xb9d56 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x61168 leaq 0x30(%rsp), %rdi callq 0x61168 leaq 0x2f(%rsp), %rdi callq 0x61140 testb $0x1, 0x2e(%rsp) jne 0xb9d73 jmp 0xb9d7c movq (%rsp), %rdi callq 0x60c90 jmp 0xb9d94 leaq 0x78(%rsp), %rdi callq 0xc9ef0 addq $0x20, %rax addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x609a0 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::empty() const
bool empty() const noexcept { switch (m_data.m_type) { case value_t::null: { // null values are empty return true; } case value_t::array: { // delegate call to array_t::empty() return m_data.m_value.array->empty(); } case value_t::object: { // delegate call to object_t::empty() return m_data.m_value.object->empty(); } case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types are nonempty return false; } } }
subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movzbl (%rax), %eax movq %rax, 0x10(%rsp) subq $0x9, %rax ja 0xbab5b movq 0x10(%rsp), %rax leaq 0x134a43(%rip), %rcx # 0x1ef560 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, 0x27(%rsp) jmp 0xbab60 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0xbb040 andb $0x1, %al movb %al, 0x27(%rsp) jmp 0xbab60 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0xbb090 andb $0x1, %al movb %al, 0x27(%rsp) jmp 0xbab60 jmp 0xbab5b movb $0x0, 0x27(%rsp) movb 0x27(%rsp), %al andb $0x1, %al addq $0x28, %rsp retq nopl (%rax,%rax)
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
const_reference operator[](const typename object_t::key_type& key) const { // const operator[] only works for objects if (JSON_HEDLEY_LIKELY(is_object())) { auto it = m_data.m_value.object->find(key); JSON_ASSERT(it != m_data.m_value.object->end()); return it->second; } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this)); }
subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq 0x60(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xb6f10 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xc9ca7 jmp 0xc9d20 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi movq 0x58(%rsp), %rsi callq 0xc9de0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x50(%rsp) movq 0x8(%rax), %rdi callq 0xc9ec0 movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0xc9e80 xorb $-0x1, %al testb $0x1, %al jne 0xc9cec jmp 0xc9d0d leaq 0x12800d(%rip), %rdi # 0x1f1d00 movl $0x53ca, %esi # imm = 0x53CA leaq 0x127729(%rip), %rdx # 0x1f1428 leaq 0x12804e(%rip), %rcx # 0x1f1d54 movb $0x0, %al callq 0x60c20 leaq 0x50(%rsp), %rdi callq 0xc9ef0 addq $0x20, %rax addq $0x68, %rsp retq movb $0x1, 0x13(%rsp) movl $0x20, %edi callq 0x605a0 movq 0x8(%rsp), %rdi movq %rax, (%rsp) callq 0xca160 movq %rax, 0x20(%rsp) leaq 0x12802e(%rip), %rsi # 0x1f1d77 leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0xca0b0 jmp 0xc9d5a movq 0x8(%rsp), %rcx movq (%rsp), %rdi movl $0x131, %esi # imm = 0x131 leaq 0x28(%rsp), %rdx callq 0xc9f00 jmp 0xc9d74 movq (%rsp), %rdi movb $0x0, 0x13(%rsp) leaq 0x1a80d4(%rip), %rsi # 0x271e58 leaq 0x485(%rip), %rdx # 0xca210 callq 0x60960 jmp 0xc9dd8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0xc9dba movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x28(%rsp), %rdi callq 0x61168 testb $0x1, 0x13(%rsp) jne 0xc9dc3 jmp 0xc9dcc movq (%rsp), %rdi callq 0x60c90 jmp 0xc9dce movq 0x18(%rsp), %rdi callq 0x609a0 nopl (%rax,%rax)
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
iterator find(const key_type& key) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xca220 movq %rax, 0x30(%rsp) movq 0x10(%rsp), %rdi callq 0xc9ec0 movq %rax, 0x18(%rsp) leaq 0x30(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xc9e80 testb $0x1, %al jne 0xc9e26 jmp 0xc9e66 movq 0x10(%rsp), %rax addq $0x18, %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi callq 0xc9ef0 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x20(%rsp), %rdx callq 0xca250 testb $0x1, %al jne 0xc9e56 jmp 0xc9e58 jmp 0xc9e75 jmp 0xc9e5a leaq 0x30(%rsp), %rdi callq 0xca280 jmp 0xc9e02 movq 0x10(%rsp), %rdi callq 0xc9ec0 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::type_name() const
JSON_HEDLEY_RETURNS_NON_NULL const char* type_name() const noexcept { switch (m_data.m_type) { case value_t::null: return "null"; case value_t::object: return "object"; case value_t::array: return "array"; case value_t::string: return "string"; case value_t::boolean: return "boolean"; case value_t::binary: return "binary"; case value_t::discarded: return "discarded"; case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: default: return "number"; } }
movq %rdi, -0x10(%rsp) movq -0x10(%rsp), %rax movzbl (%rax), %eax movq %rax, -0x18(%rsp) subq $0x9, %rax ja 0xca1f1 movq -0x18(%rsp), %rax leaq 0x1254a4(%rip), %rcx # 0x1ef628 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x12c3b1(%rip), %rax # 0x1f6545 movq %rax, -0x8(%rsp) jmp 0xca1fd leaq 0x12ca00(%rip), %rax # 0x1f6ba2 movq %rax, -0x8(%rsp) jmp 0xca1fd leaq 0x12c0b4(%rip), %rax # 0x1f6264 movq %rax, -0x8(%rsp) jmp 0xca1fd leaq 0x130f8d(%rip), %rax # 0x1fb14b movq %rax, -0x8(%rsp) jmp 0xca1fd leaq 0x127bfa(%rip), %rax # 0x1f1dc6 movq %rax, -0x8(%rsp) jmp 0xca1fd leaq 0x127bf4(%rip), %rax # 0x1f1dce movq %rax, -0x8(%rsp) jmp 0xca1fd leaq 0x127bed(%rip), %rax # 0x1f1dd5 movq %rax, -0x8(%rsp) jmp 0xca1fd jmp 0xca1f1 leaq 0x12aa07(%rip), %rax # 0x1f4bff movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopw %cs:(%rax,%rax) nopl (%rax)
/ggerganov[P]llama/common/json.hpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*)
static std::string diagnostics(const BasicJsonType* leaf_element) { #if JSON_DIAGNOSTICS std::vector<std::string> tokens; for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent) { switch (current->m_parent->type()) { case value_t::array: { for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i) { if (&current->m_parent->m_data.m_value.array->operator[](i) == current) { tokens.emplace_back(std::to_string(i)); break; } } break; } case value_t::object: { for (const auto& element : *current->m_parent->m_data.m_value.object) { if (&element.second == current) { tokens.emplace_back(element.first.c_str()); break; } } break; } case value_t::null: // LCOV_EXCL_LINE case value_t::string: // LCOV_EXCL_LINE case value_t::boolean: // LCOV_EXCL_LINE case value_t::number_integer: // LCOV_EXCL_LINE case value_t::number_unsigned: // LCOV_EXCL_LINE case value_t::number_float: // LCOV_EXCL_LINE case value_t::binary: // LCOV_EXCL_LINE case value_t::discarded: // LCOV_EXCL_LINE default: // LCOV_EXCL_LINE break; // LCOV_EXCL_LINE } } if (tokens.empty()) { return ""; } auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{}, [](const std::string & a, const std::string & b) { return concat(a, '/', detail::escape(b)); }); return concat('(', str, ") "); #else static_cast<void>(leaf_element); return ""; #endif }
subq $0x48, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) leaq 0x37(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x60dc0 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rdx leaq 0x12780b(%rip), %rsi # 0x1f1c76 callq 0x703a0 jmp 0xca472 leaq 0x37(%rsp), %rdi callq 0x61140 movq 0x8(%rsp), %rax addq $0x48, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x37(%rsp), %rdi callq 0x61140 movq 0x28(%rsp), %rdi callq 0x609a0 nopl (%rax,%rax)
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::set_parents()
void set_parents() { #if JSON_DIAGNOSTICS switch (m_data.m_type) { case value_t::array: { for (auto& element : *m_data.m_value.array) { element.m_parent = this; } break; } case value_t::object: { for (auto& element : *m_data.m_value.object) { element.second.m_parent = this; } break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: break; } #endif }
movq %rdi, -0x8(%rsp) retq nopw %cs:(%rax,%rax)
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long)
reference operator[](size_type idx) { // implicitly convert null value to an empty array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(); assert_invariant(); } // operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // fill up array with null values if given idx is outside range if (idx >= m_data.m_value.array->size()) { #if JSON_DIAGNOSTICS // remember array size & capacity before resizing const auto old_size = m_data.m_value.array->size(); const auto old_capacity = m_data.m_value.array->capacity(); #endif m_data.m_value.array->resize(idx + 1); #if JSON_DIAGNOSTICS if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity)) { // capacity has changed: update all parents set_parents(); } else { // set parent for values added above set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size)); } #endif assert_invariant(); } return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq 0x60(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0xb77f0 testb $0x1, %al jne 0xce953 jmp 0xce973 movq 0x18(%rsp), %rax movb $0x2, (%rax) callq 0xcef00 movq 0x18(%rsp), %rdi movq %rax, 0x8(%rdi) movl $0x1, %esi callq 0xcc220 movq 0x18(%rsp), %rdi callq 0xb68e0 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xce987 jmp 0xce9ea movq 0x18(%rsp), %rax movq 0x58(%rsp), %rcx movq %rcx, 0x10(%rsp) movq 0x8(%rax), %rdi callq 0xcb620 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax jb 0xce9d2 movq 0x18(%rsp), %rax movq 0x8(%rax), %rdi movq 0x58(%rsp), %rsi addq $0x1, %rsi callq 0xcf000 movq 0x18(%rsp), %rdi movl $0x1, %esi callq 0xcc220 movq 0x18(%rsp), %rax movq 0x8(%rax), %rdi movq 0x58(%rsp), %rsi callq 0xcf0a0 addq $0x68, %rsp retq movb $0x1, 0x23(%rsp) movl $0x20, %edi callq 0x605a0 movq 0x18(%rsp), %rdi movq %rax, 0x8(%rsp) callq 0xca160 movq %rax, 0x30(%rsp) leaq 0x1234fc(%rip), %rsi # 0x1f1f10 leaq 0x38(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0xcf270 jmp 0xcea25 movq 0x18(%rsp), %rcx movq 0x8(%rsp), %rdi movl $0x131, %esi # imm = 0x131 leaq 0x38(%rsp), %rdx callq 0xcf0c0 jmp 0xcea40 movq 0x8(%rsp), %rdi movb $0x0, 0x23(%rsp) leaq 0x1a3407(%rip), %rsi # 0x271e58 leaq -0x4848(%rip), %rdx # 0xca210 callq 0x60960 jmp 0xceaa6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) jmp 0xcea87 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x38(%rsp), %rdi callq 0x61168 testb $0x1, 0x23(%rsp) jne 0xcea90 jmp 0xcea9a movq 0x8(%rsp), %rdi callq 0x60c90 jmp 0xcea9c movq 0x28(%rsp), %rdi callq 0x609a0 nopw %cs:(%rax,%rax)
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at(unsigned long)
reference at(size_type idx) { // at only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { JSON_TRY { return set_parent(m_data.m_value.array->at(idx)); } JSON_CATCH (std::out_of_range&) { // create better exception explanation JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this)); } }
subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xb68e0 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xceae6 jmp 0xcec6a movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0xcfc90 movq %rax, 0x18(%rsp) jmp 0xceb03 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdi movq $-0x1, %rdx callq 0xcfc70 movq %rax, 0x10(%rsp) jmp 0xceb20 movq 0x10(%rsp), %rax addq $0xc8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) movl 0xac(%rsp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0xced24 movq 0xb0(%rsp), %rdi callq 0x600b0 movq %rax, 0xa0(%rsp) movb $0x1, 0x5f(%rsp) movl $0x20, %edi callq 0x605a0 movq %rax, 0x8(%rsp) movq 0xb8(%rsp), %rsi leaq 0x60(%rsp), %rdi callq 0xcff40 jmp 0xceb92 leaq 0x1233ab(%rip), %rsi # 0x1f1f44 leaq 0x1233b1(%rip), %rcx # 0x1f1f51 leaq 0x80(%rsp), %rdi leaq 0x60(%rsp), %rdx callq 0xcfe80 jmp 0xcebb4 movq 0x20(%rsp), %rcx movq 0x8(%rsp), %rdi movl $0x191, %esi # imm = 0x191 leaq 0x80(%rsp), %rdx callq 0xcfcd0 jmp 0xcebd2 movq 0x8(%rsp), %rdi movb $0x0, 0x5f(%rsp) leaq 0x1a32dd(%rip), %rsi # 0x271ec0 leaq 0x1456(%rip), %rdx # 0xd0040 callq 0x60960 jmp 0xced39 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xcec4b movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xcec41 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) leaq 0x80(%rsp), %rdi callq 0x61168 leaq 0x60(%rsp), %rdi callq 0x61168 testb $0x1, 0x5f(%rsp) jne 0xcec54 jmp 0xcec5e movq 0x8(%rsp), %rdi callq 0x60c90 callq 0x60b20 jmp 0xcec65 jmp 0xced24 movb $0x1, 0x2f(%rsp) movl $0x20, %edi callq 0x605a0 movq 0x20(%rsp), %rdi movq %rax, (%rsp) callq 0xca160 movq %rax, 0x30(%rsp) leaq 0x1232cf(%rip), %rsi # 0x1f1f62 leaq 0x38(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0xd0050 jmp 0xceca4 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x38(%rsp), %rdx callq 0xcf0c0 jmp 0xcecbe movq (%rsp), %rdi movb $0x0, 0x2f(%rsp) leaq 0x1a318a(%rip), %rsi # 0x271e58 leaq -0x4ac5(%rip), %rdx # 0xca210 callq 0x60960 jmp 0xced39 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xced10 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) leaq 0x38(%rsp), %rdi callq 0x61168 testb $0x1, 0x2f(%rsp) jne 0xced19 jmp 0xced22 movq (%rsp), %rdi callq 0x60c90 jmp 0xced24 movq 0xb0(%rsp), %rdi callq 0x609a0 movq %rax, %rdi callq 0x70eb0 nopl (%rax)
/ggerganov[P]llama/common/json.hpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
iterator insert(const_iterator pos, const basic_json& val) { // insert only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // check if iterator pos fits to this JSON value if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } // insert to array and return iterator return insert_iterator(pos, val); } JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); }
subq $0xe8, %rsp movq %rdx, 0x20(%rsp) movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x30(%rsp) movq %rdi, 0xe0(%rsp) movq %rsi, 0xd8(%rsp) movq %rdx, 0xd0(%rsp) movq %rcx, 0xc8(%rsp) movq 0xd8(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0xb68e0 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xd1408 jmp 0xd1543 movq 0x20(%rsp), %rax movq 0x38(%rsp), %rcx cmpq %rcx, (%rax) setne %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xd1425 jmp 0xd150b movb $0x1, 0x93(%rsp) movl $0x20, %edi callq 0x605a0 movq %rax, 0x10(%rsp) leaq 0xa7(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x60dc0 movq 0x18(%rsp), %rdx leaq 0x120b75(%rip), %rsi # 0x1f1fcf leaq 0xa8(%rsp), %rdi callq 0x703a0 jmp 0xd1469 movq 0x38(%rsp), %rcx movq 0x10(%rsp), %rdi movl $0xca, %esi leaq 0xa8(%rsp), %rdx callq 0xd1650 jmp 0xd1487 movq 0x10(%rsp), %rdi movb $0x0, 0x93(%rsp) leaq 0x1a0a65(%rip), %rsi # 0x271f00 leaq 0x35e(%rip), %rdx # 0xd1800 callq 0x60960 jmp 0xd160e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) jmp 0xd14e3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) leaq 0xa8(%rsp), %rdi callq 0x61168 leaq 0xa7(%rsp), %rdi callq 0x61140 testb $0x1, 0x93(%rsp) jne 0xd14fc jmp 0xd1506 movq 0x10(%rsp), %rdi callq 0x60c90 jmp 0xd1601 movq 0x20(%rsp), %rsi leaq 0x70(%rsp), %rdi callq 0xd1610 movq 0x28(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0xc8(%rsp), %rcx leaq 0x70(%rsp), %rdx callq 0xd1810 movq 0x30(%rsp), %rax addq $0xe8, %rsp retq movb $0x1, 0x47(%rsp) movl $0x20, %edi callq 0x605a0 movq 0x38(%rsp), %rdi movq %rax, 0x8(%rsp) callq 0xca160 movq %rax, 0x48(%rsp) leaq 0x120a86(%rip), %rsi # 0x1f1ff3 leaq 0x50(%rsp), %rdi leaq 0x48(%rsp), %rdx callq 0xd1950 jmp 0xd157e movq 0x38(%rsp), %rcx movq 0x8(%rsp), %rdi movl $0x135, %esi # imm = 0x135 leaq 0x50(%rsp), %rdx callq 0xcf0c0 jmp 0xd1599 movq 0x8(%rsp), %rdi movb $0x0, 0x47(%rsp) leaq 0x1a08ae(%rip), %rsi # 0x271e58 leaq -0x73a1(%rip), %rdx # 0xca210 callq 0x60960 jmp 0xd160e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) jmp 0xd15ec movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) leaq 0x50(%rsp), %rdi callq 0x61168 testb $0x1, 0x47(%rsp) jne 0xd15f5 jmp 0xd15ff movq 0x8(%rsp), %rdi callq 0x60c90 jmp 0xd1601 movq 0x98(%rsp), %rdi callq 0x609a0 nop
/ggerganov[P]llama/common/json.hpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [10], 0>(char const (&) [10])
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xca220 movq %rax, 0x30(%rsp) movq 0x10(%rsp), %rdi callq 0xc9ec0 movq %rax, 0x18(%rsp) leaq 0x30(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xc9e80 testb $0x1, %al jne 0xd8e96 jmp 0xd8ed6 movq 0x10(%rsp), %rax addq $0x18, %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi callq 0xc9ef0 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x20(%rsp), %rdx callq 0xd8ef0 testb $0x1, %al jne 0xd8ec6 jmp 0xd8ec8 jmp 0xd8ee5 jmp 0xd8eca leaq 0x30(%rsp), %rdi callq 0xca280 jmp 0xd8e72 movq 0x10(%rsp), %rdi callq 0xc9ec0 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
/ggerganov[P]llama/common/json.hpp
minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&)
static std::shared_ptr<TemplateNode> parse(const std::string& template_str, const Options & options) { Parser parser(std::make_shared<std::string>(normalize_newlines(template_str)), options); auto tokens = parser.tokenize(); TemplateTokenIterator begin = tokens.begin(); auto it = begin; TemplateTokenIterator end = tokens.end(); return parser.parseTemplate(begin, it, end, /* fully= */ true); }
subq $0xf8, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x20(%rsp) movq %rdi, 0xf0(%rsp) movq %rsi, 0xe8(%rsp) movq %rdx, 0xe0(%rsp) movq 0xe8(%rsp), %rsi leaq 0x80(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0x162490 movq 0x28(%rsp), %rsi leaq 0xa0(%rsp), %rdi callq 0x162410 jmp 0x160c3a movq 0xe0(%rsp), %rdx leaq 0xb0(%rsp), %rdi leaq 0xa0(%rsp), %rsi callq 0x1624c0 jmp 0x160c59 leaq 0xa0(%rsp), %rdi callq 0x162630 leaq 0x80(%rsp), %rdi callq 0x61168 leaq 0x58(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x162640 jmp 0x160c87 leaq 0x58(%rsp), %rdi movq %rdi, (%rsp) callq 0x1655e0 movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rdi movq %rdi, 0x8(%rsp) leaq 0x48(%rsp), %rsi callq 0x165610 movq (%rsp), %rdi movq 0x50(%rsp), %rax movq %rax, 0x40(%rsp) callq 0x165650 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi movq %rdi, 0x10(%rsp) leaq 0x30(%rsp), %rsi callq 0x165610 movq 0x18(%rsp), %rdi movq 0x8(%rsp), %rdx movq 0x10(%rsp), %r8 leaq 0xb0(%rsp), %rsi leaq 0x40(%rsp), %rcx movl $0x1, %r9d callq 0x165680 jmp 0x160d03 leaq 0x58(%rsp), %rdi callq 0x167b10 leaq 0xb0(%rsp), %rdi callq 0x167b70 movq 0x20(%rsp), %rax addq $0xf8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) jmp 0x160d52 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) leaq 0xa0(%rsp), %rdi callq 0x162630 leaq 0x80(%rsp), %rdi callq 0x61168 jmp 0x160d96 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) jmp 0x160d89 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) leaq 0x58(%rsp), %rdi callq 0x167b10 leaq 0xb0(%rsp), %rdi callq 0x167b70 movq 0x78(%rsp), %rdi callq 0x609a0
/ggerganov[P]llama/common/minja/minja.hpp
Tiles::Tiles()
Tiles::Tiles() { //Quick Test int switchCase = rand() % 5; switch(switchCase) { case 0: data = WATER; break; case 1: data = GRASS; break; case 2: data = PATH; break; case 3: data = MOUNTAIN; break; case 4: data = FOREST; break; default: data = EMPTY; } //data = WATER; }
pushq %rbx movq %rdi, %rbx callq 0x1030 pushq $0x5 popq %rcx cltd idivl %ecx cmpl $0x5, %edx cmovbl %edx, %ecx movl %ecx, (%rbx) popq %rbx retq nop
/Axelm3sh[P]WorldGen/Tiles.cpp
oonf_class_add
void oonf_class_add(struct oonf_class *ci) { /* round up size to make block extendable */ ci->total_size = _roundup(ci->size); /* hook into tree */ ci->_node.key = ci->name; avl_insert(&_classes_tree, &ci->_node); /* add standard key generator if necessary */ if (ci->to_keystring == NULL) { ci->to_keystring = _cb_to_keystring; } /* Init list heads */ list_init_head(&ci->_free_list); list_init_head(&ci->_extensions); OONF_DEBUG(LOG_CLASS, "Class %s added: %" PRINTF_SIZE_T_SPECIFIER " bytes\n", ci->name, ci->total_size); }
pushq %rbx movq %rdi, %rbx movq (%rdi), %rax movq 0x8(%rdi), %rcx addq $0xf, %rcx andq $-0x10, %rcx movq %rcx, 0x20(%rdi) leaq 0x28(%rdi), %rsi movq %rax, 0x50(%rdi) leaq 0x48f42(%rip), %rdi # 0x5a6c8 callq 0x279af cmpq $0x0, 0x18(%rbx) jne 0x1179d leaq 0x65(%rip), %rax # 0x117fe movq %rax, 0x18(%rbx) leaq 0x60(%rbx), %rax movq %rax, 0x68(%rbx) movq %rax, 0x60(%rbx) leaq 0x70(%rbx), %rax movq %rax, 0x78(%rbx) movq %rax, 0x70(%rbx) movl 0x3ebd1(%rip), %esi # 0x5038c leaq 0x5c10e(%rip), %rax # 0x6d8d0 testb $0x1, (%rax,%rsi) je 0x117fc subq $0x8, %rsp leaq 0x258f1(%rip), %r10 # 0x370c4 leaq 0x258d4(%rip), %rdx # 0x370ae movl $0x1, %edi movl $0x83, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq 0x20(%rbx) pushq (%rbx) pushq %r10 callq 0x2efff addq $0x20, %rsp popq %rbx retq
/OLSR[P]OONF/src/base/oonf_class.c
oonf_class_remove
void oonf_class_remove(struct oonf_class *ci) { struct oonf_class_extension *ext, *iterator; /* remove memcookie from tree */ avl_remove(&_classes_tree, &ci->_node); /* remove all free memory blocks */ _free_freelist(ci); /* remove all listeners */ list_for_each_element_safe(&ci->_extensions, ext, _node, iterator) { oonf_class_extension_remove(ext); } OONF_DEBUG(LOG_CLASS, "Class %s removed\n", ci->name); }
pushq %rbx movq %rdi, %rbx leaq 0x28(%rdi), %rsi leaq 0x48e99(%rip), %rdi # 0x5a6c8 callq 0x27bcf movq %rbx, %rdi callq 0x118bf movq 0x70(%rbx), %rax movq 0x8(%rax), %rcx cmpq 0x78(%rbx), %rcx je 0x1187d xorps %xmm0, %xmm0 movq %rax, %rcx movq (%rax), %rax testq %rax, %rax je 0x11873 movq 0x8(%rcx), %rdx testq %rdx, %rdx je 0x11873 movq %rax, (%rdx) movq %rdx, 0x8(%rax) movq $0x0, -0x20(%rcx) movups %xmm0, (%rcx) movq 0x8(%rax), %rcx cmpq 0x78(%rbx), %rcx jne 0x1184d movl 0x3eb09(%rip), %esi # 0x5038c leaq 0x5c046(%rip), %rax # 0x6d8d0 testb $0x1, (%rax,%rsi) je 0x118bd leaq 0x25848(%rip), %r10 # 0x370df leaq 0x25810(%rip), %rdx # 0x370ae movl $0x1, %edi movl $0x99, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq (%rbx) pushq %r10 callq 0x2efff addq $0x10, %rsp popq %rbx retq
/OLSR[P]OONF/src/base/oonf_class.c
free_freelist
static void _free_freelist(struct oonf_class *ci) { while (!list_is_empty(&ci->_free_list)) { struct list_entity *item; item = ci->_free_list.next; list_remove(item); free(item); } ci->_free_list_size = 0; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x60(%rdi), %r14 movq (%r14), %rdi cmpq %r14, %rdi jne 0x118d8 cmpq %r14, 0x68(%rbx) je 0x118f3 movq (%rdi), %rax movq 0x8(%rdi), %rcx movq %rax, (%rcx) movq %rcx, 0x8(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rdi) callq 0x11060 jmp 0x118ca movl $0x0, 0x80(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
/OLSR[P]OONF/src/base/oonf_class.c
oonf_class_event
void oonf_class_event(struct oonf_class *c, void *ptr, enum oonf_class_event evt) { struct oonf_class_extension *ext; #ifdef OONF_LOG_DEBUG_INFO struct oonf_objectkey_str buf; #endif OONF_DEBUG(LOG_CLASS, "Fire '%s' event for %s", OONF_CLASS_EVENT_NAME[evt], c->to_keystring(&buf, c, ptr)); list_for_each_element(&c->_extensions, ext, _node) { if (evt == OONF_OBJECT_ADDED && ext->cb_add != NULL) { OONF_DEBUG(LOG_CLASS, "Fire listener %s", ext->ext_name); ext->cb_add(ptr); } else if (evt == OONF_OBJECT_REMOVED && ext->cb_remove != NULL) { OONF_DEBUG(LOG_CLASS, "Fire listener %s", ext->ext_name); ext->cb_remove(ptr); } else if (evt == OONF_OBJECT_CHANGED && ext->cb_change != NULL) { OONF_DEBUG(LOG_CLASS, "Fire listener %s", ext->ext_name); ext->cb_change(ptr); } } OONF_DEBUG(LOG_CLASS, "Fire event finished"); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movl %edx, %ebx movq %rsi, %r14 movq %rdi, %r15 movl 0x3e6c1(%rip), %r12d # 0x5038c leaq 0x5bbfe(%rip), %r13 # 0x6d8d0 testb $0x1, (%r13,%r12) je 0x11d2e movl %ebx, %eax leaq 0x3df1d(%rip), %rcx # 0x4fc00 movq (%rcx,%rax,8), %rbp leaq 0x8(%rsp), %rdi movq %r15, %rsi movq %r14, %rdx callq *0x18(%r15) movq %rax, %r10 subq $0x8, %rsp leaq 0x254de(%rip), %r11 # 0x371e2 leaq 0x253a3(%rip), %rdx # 0x370ae movl $0x1, %edi movl %r12d, %esi movl $0x143, %ecx # imm = 0x143 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq %rbp pushq %r11 callq 0x2efff addq $0x20, %rsp movq 0x70(%r15), %rbp movq 0x8(%rbp), %rax cmpq 0x78(%r15), %rax je 0x11e12 testl %ebx, %ebx je 0x11dbb cmpl $0x2, %ebx je 0x11d8b cmpl $0x1, %ebx jne 0x11e09 cmpq $0x0, -0x18(%rbp) je 0x11d82 leaq -0x18(%rbp), %r12 movl 0x3e629(%rip), %esi # 0x5038c testb $0x1, (%r13,%rsi) je 0x11e02 movl $0x1, %edi leaq 0x25333(%rip), %rdx # 0x370ae movl $0x146, %ecx # imm = 0x146 jmp 0x11de5 testl %ebx, %ebx je 0x11dbb cmpl $0x2, %ebx jne 0x11e09 cmpq $0x0, -0x8(%rbp) je 0x11db7 leaq -0x8(%rbp), %r12 movl 0x3e5f0(%rip), %esi # 0x5038c testb $0x1, (%r13,%rsi) je 0x11e02 movl $0x1, %edi leaq 0x252fe(%rip), %rdx # 0x370ae movl $0x14a, %ecx # imm = 0x14A jmp 0x11de5 testl %ebx, %ebx jne 0x11e09 cmpq $0x0, -0x10(%rbp) je 0x11e09 leaq -0x10(%rbp), %r12 movl 0x3e5c0(%rip), %esi # 0x5038c testb $0x1, (%r13,%rsi) je 0x11e02 movl $0x1, %edi leaq 0x252ce(%rip), %rdx # 0x370ae movl $0x14e, %ecx # imm = 0x14E xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq -0x38(%rbp) leaq 0x25402(%rip), %r10 # 0x371f9 pushq %r10 callq 0x2efff addq $0x10, %rsp movq %r14, %rdi callq *(%r12) movq (%rbp), %rbp jmp 0x11d32 movl 0x3e574(%rip), %esi # 0x5038c testb $0x1, (%r13,%rsi) je 0x11e4f subq $0x8, %rsp leaq 0x253df(%rip), %r10 # 0x3720a leaq 0x2527c(%rip), %rdx # 0x370ae movl $0x1, %edi movl $0x152, %ecx # imm = 0x152 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 callq 0x2efff addq $0x10, %rsp addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/OLSR[P]OONF/src/base/oonf_class.c
oonf_clock_toClockString
const char * oonf_clock_toClockString(struct isonumber_str *buf, uint64_t clk) { uint64_t msec = clk % MSEC_PER_SEC; uint64_t sec = clk / MSEC_PER_SEC; snprintf(buf->buf, sizeof(*buf), "%" PRIu64 ":%02" PRIu64 ":%02" PRIu64 ".%03" PRIu64 "", sec / 3600, (sec % 3600) / 60, (sec % 60), msec); return buf->buf; }
pushq %rbx subq $0x10, %rsp movq %rsi, %rax shrq $0x3, %rax movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF mulq %rcx movq %rdx, %r9 movq %rdi, %rbx shrq $0x4, %r9 imulq $0x3e8, %r9, %rax # imm = 0x3E8 movq %rsi, %rdi subq %rax, %rdi movabsq $0x4a90be587de6e565, %rcx # imm = 0x4A90BE587DE6E565 movq %rsi, %rax mulq %rcx movq %rdx, %rcx movabsq $0x91a2b3c4d5e6f9, %rdx # imm = 0x91A2B3C4D5E6F9 movq %r9, %rax mulq %rdx shrq $0x3, %rdx imulq $0xe10, %rdx, %rdx # imm = 0xE10 movq %r9, %rax subq %rdx, %rax movabsq $0x444444444444445, %rsi # imm = 0x444444444444445 mulq %rsi movq %rdx, %r8 movq %r9, %rax mulq %rsi shrq $0x14, %rcx imulq $0x3c, %rdx, %rax subq %rax, %r9 movq %rdi, (%rsp) leaq 0x252af(%rip), %rdx # 0x372b2 movl $0x30, %esi movq %rbx, %rdi xorl %eax, %eax callq 0x111e0 movq %rbx, %rax addq $0x10, %rsp popq %rbx retq
/OLSR[P]OONF/src/base/oonf_clock.c
oonf_layer2_origin_remove
void oonf_layer2_origin_remove(struct oonf_layer2_origin *origin) { struct oonf_layer2_net *l2net, *l2net_it; if (!avl_is_node_added(&origin->_node)) { return; } avl_for_each_element_safe(&_oonf_layer2_net_tree, l2net, _node, l2net_it) { oonf_layer2_net_remove(l2net, origin); } avl_remove(&_oonf_originator_tree, &origin->_node); }
pushq %r15 pushq %r14 pushq %rbx cmpq $0x0, 0x18(%rdi) je 0x12135 movq %rdi, %rbx cmpq $0x0, 0x20(%rdi) je 0x12135 leaq 0x18(%rbx), %r14 movq 0x48623(%rip), %rdi # 0x5a730 movq 0x8(%rdi), %rax cmpq 0x48620(%rip), %rax # 0x5a738 je 0x1213b movq (%rdi), %r15 addq $-0x7a0, %rdi # imm = 0xF860 movq %rbx, %rsi callq 0x1214f movq 0x8(%r15), %rax movq %r15, %rdi jmp 0x12111 popq %rbx popq %r14 popq %r15 retq leaq 0x485be(%rip), %rdi # 0x5a700 movq %r14, %rsi popq %rbx popq %r14 popq %r15 jmp 0x27bcf
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_data_parse_string
int oonf_layer2_data_parse_string( union oonf_layer2_value *value, const struct oonf_layer2_metadata *meta, const char *input) { memset(value, 0, sizeof(*value)); switch (meta->type) { case OONF_LAYER2_INTEGER_DATA: return isonumber_to_s64(&value->integer, input, meta->scaling); case OONF_LAYER2_BOOLEAN_DATA: if (!cfg_is_bool(input)) { return -1; } value->boolean = cfg_get_bool(input); return 0; default: return -1; } }
pushq %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movl 0x10(%rsi), %eax movl $0xffffffff, %ebp # imm = 0xFFFFFFFF cmpl $0x1, %eax je 0x12264 testl %eax, %eax jne 0x122a5 movq 0x20(%rsi), %rdx movq %rbx, %rdi movq %r14, %rsi popq %rbx popq %r14 popq %rbp jmp 0x28433 leaq 0x1bebe(%rip), %rsi # 0x2e129 leaq 0x46ece(%rip), %rcx # 0x59140 movl $0x8, %edx movq %r14, %rdi callq 0x2e12e testl %eax, %eax js 0x122a5 leaq 0x1be9f(%rip), %rsi # 0x2e129 leaq 0x46e8f(%rip), %rcx # 0x59120 movl $0x4, %edx movq %r14, %rdi callq 0x2e12e testl %eax, %eax setns (%rbx) xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_data_set
bool oonf_layer2_data_set(struct oonf_layer2_data *l2data, const struct oonf_layer2_origin *origin, const struct oonf_layer2_metadata *meta, const union oonf_layer2_value *input) { bool changed = false; if (meta == NULL) { OONF_ASSERT(l2data->_meta != NULL, LOG_LAYER2, "Tried to set layer2 data without metadata (origin: %s)", origin->name); meta = l2data->_meta; } if (l2data->_meta == NULL || l2data->_origin == NULL || l2data->_origin == origin || l2data->_origin->priority < origin->priority) { changed = l2data->_meta != meta || memcmp(&l2data->_value, input, sizeof(*input)) != 0; memcpy(&l2data->_value, input, sizeof(*input)); l2data->_meta = meta; l2data->_origin = origin; } return changed; }
movq %rsi, %r10 testq %rdx, %rdx jne 0x12341 movq 0x18(%rdi), %rdx testq %rdx, %rdx jne 0x12341 movl 0x3e1b0(%rip), %esi # 0x504e4 leaq 0x5b595(%rip), %rax # 0x6d8d0 testb $0x8, (%rax,%rsi) jne 0x123b5 movq 0x18(%rdi), %rsi testq %rsi, %rsi je 0x1236a movq 0x20(%rdi), %rax testq %rax, %rax sete %r8b cmpq %r10, %rax sete %r9b orb %r8b, %r9b jne 0x1236a movl 0xc(%rax), %eax cmpl 0xc(%r10), %eax jae 0x123b2 movb $0x1, %al cmpq %rdx, %rsi jne 0x1239b movdqu (%rdi), %xmm0 movdqu (%rcx), %xmm1 pcmpeqb %xmm0, %xmm1 movq 0x10(%rdi), %xmm0 movq 0x10(%rcx), %xmm2 pcmpeqb %xmm0, %xmm2 pand %xmm1, %xmm2 pmovmskb %xmm2, %eax cmpl $0xffff, %eax # imm = 0xFFFF setne %al movq 0x10(%rcx), %rsi movq %rsi, 0x10(%rdi) movups (%rcx), %xmm0 movups %xmm0, (%rdi) movq %rdx, 0x18(%rdi) movq %r10, 0x20(%rdi) retq xorl %eax, %eax retq pushq %rax leaq 0x25660(%rip), %r11 # 0x37a1d leaq 0x25642(%rip), %rdx # 0x37a06 movl $0x8, %edi movl $0x15b, %ecx # imm = 0x15B xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq (%r10) pushq %r11 callq 0x2efff addq $0x10, %rsp callq 0x110b0
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_data_compare
bool oonf_layer2_data_compare(const union oonf_layer2_value *left, const union oonf_layer2_value *right, enum oonf_layer2_data_comparator_type comparator, enum oonf_layer2_data_type data_type) { int result; switch (data_type) { case OONF_LAYER2_INTEGER_DATA: if (left->integer > right->integer) { result = 1; } else if (left->integer < right->integer) { result = -1; } else { result = 0; } break; case OONF_LAYER2_BOOLEAN_DATA: result = memcmp(&left->boolean, &right->boolean, sizeof(left->boolean)); break; case OONF_LAYER2_NETWORK_DATA: result = memcmp(&left->addr, &right->addr, sizeof(left->addr)); break; default: return false; } switch (comparator) { case OONF_LAYER2_DATA_CMP_EQUALS: return result == 0; case OONF_LAYER2_DATA_CMP_NOT_EQUALS: return result != 0; case OONF_LAYER2_DATA_CMP_LESSER: return result < 0; case OONF_LAYER2_DATA_CMP_LESSER_OR_EQUALS: return result <= 0; case OONF_LAYER2_DATA_CMP_GREATER: return result > 0; case OONF_LAYER2_DATA_CMP_GREATER_OR_EQUALS: return result >= 0; default: return false; } }
pushq %rbx movl %edx, %ebx cmpl $0x2, %ecx je 0x124d5 cmpl $0x1, %ecx je 0x124cb testl %ecx, %ecx jne 0x124fd movq (%rsi), %rcx movl $0x1, %eax cmpq %rcx, (%rdi) jg 0x124df setl %al movzbl %al, %eax negl %eax jmp 0x124df movzbl (%rdi), %eax movzbl (%rsi), %ecx subl %ecx, %eax jmp 0x124df movl $0x12, %edx callq 0x11300 cmpl $0x5, %ebx ja 0x124fd movl %ebx, %ecx leaq 0x24df3(%rip), %rdx # 0x372e0 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx testl %eax, %eax sete %al jmp 0x12520 xorl %eax, %eax jmp 0x12520 testl %eax, %eax setg %al jmp 0x12520 shrl $0x1f, %eax jmp 0x12520 testl %eax, %eax setle %al jmp 0x12520 testl %eax, %eax setne %al jmp 0x12520 testl %eax, %eax setns %al popq %rbx retq
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_net_cleanup
bool oonf_layer2_net_cleanup(struct oonf_layer2_net *l2net, const struct oonf_layer2_origin *origin, bool cleanup_neigh) { struct oonf_layer2_neigh *l2neigh; bool changed = false; int i; for (i = 0; i < OONF_LAYER2_NET_COUNT; i++) { if (l2net->data[i]._origin == origin) { oonf_layer2_data_reset(&l2net->data[i]); changed = true; } } for (i = 0; i < OONF_LAYER2_NEIGH_COUNT; i++) { if (l2net->neighdata[i]._origin == origin) { oonf_layer2_data_reset(&l2net->neighdata[i]); changed = true; } } if (cleanup_neigh) { avl_for_each_element(&l2net->neighbors, l2neigh, _node) { changed |= oonf_layer2_neigh_cleanup(l2neigh, origin); } } return changed; }
movl $0x130, %ecx # imm = 0x130 xorl %eax, %eax xorps %xmm0, %xmm0 cmpq %rsi, (%rdi,%rcx) jne 0x126fb movups %xmm0, -0x8(%rdi,%rcx) movb $0x1, %al addq $0x28, %rcx cmpq $0x3b0, %rcx # imm = 0x3B0 jne 0x126ee movl $0x3b0, %ecx # imm = 0x3B0 xorps %xmm0, %xmm0 cmpq %rsi, (%rdi,%rcx) jne 0x1271d movups %xmm0, -0x8(%rdi,%rcx) movb $0x1, %al addq $0x28, %rcx cmpq $0x7c0, %rcx # imm = 0x7C0 jne 0x12710 testb %dl, %dl je 0x12777 movq 0x90(%rdi), %rcx movq 0x8(%rcx), %rdx cmpq 0x98(%rdi), %rdx je 0x12777 xorps %xmm0, %xmm0 movq $-0x410, %rdx # imm = 0xFBF0 xorl %r8d, %r8d cmpq %rsi, 0x20(%rcx,%rdx) jne 0x1275e movups %xmm0, 0x18(%rcx,%rdx) movb $0x1, %r8b addq $0x28, %rdx jne 0x1274f orb %r8b, %al movq (%rcx), %rcx movq 0x8(%rcx), %rdx cmpq 0x98(%rdi), %rdx jne 0x12745 andb $0x1, %al retq
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_neigh_remove
static INLINE bool list_is_node_added(const struct list_entity *node) { return node->next != NULL && node->prev != NULL; }
cmpq $0x0, 0x4c0(%rdi) je 0x127f7 pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpq $0x0, 0x4c8(%rdi) je 0x127fe movq %rsi, %r14 movq 0x58(%rbx), %rdi movq 0x8(%rdi), %rax cmpq 0x60(%rbx), %rax je 0x12802 xorl %ebp, %ebp movq (%rdi), %r15 cmpq %r14, -0x8(%rdi) jne 0x127e8 addq $-0x28, %rdi callq 0x12e3a movb $0x1, %bpl movq 0x8(%r15), %rax movq %r15, %rdi cmpq 0x60(%rbx), %rax jne 0x127d3 jmp 0x12804 xorl %eax, %eax jmp 0x12885 xorl %eax, %eax jmp 0x1287d xorl %ebp, %ebp movq 0x80(%rbx), %rdi movq 0x8(%rdi), %rax cmpq 0x88(%rbx), %rax je 0x12848 movl $0x1, %r15d movq (%rdi), %r12 addq $-0x60, %rdi movq %r14, %rsi callq 0x12e91 testl %eax, %eax movzbl %bpl, %ebp cmovel %r15d, %ebp movq 0x8(%r12), %rax movq %r12, %rdi cmpq 0x88(%rbx), %rax jne 0x1281e movl $0xd0, %ecx xorl %eax, %eax xorps %xmm0, %xmm0 cmpq %r14, (%rbx,%rcx) jne 0x1285f movups %xmm0, -0x8(%rbx,%rcx) movb $0x1, %al addq $0x28, %rcx cmpq $0x4e0, %rcx # imm = 0x4E0 jne 0x12852 orb %bpl, %al testb $0x1, %al je 0x1287d movq %rbx, %rdi callq 0x12ef7 movb $0x1, %al popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp andb $0x1, %al retq
/OLSR[P]OONF/include/oonf/libcommon/list.h
oonf_layer2_neigh_relabel
void oonf_layer2_neigh_relabel(struct oonf_layer2_neigh *l2neigh, const struct oonf_layer2_origin *new_origin, const struct oonf_layer2_origin *old_origin) { struct oonf_layer2_neighbor_address *neigh_ip; struct oonf_layer2_destination *l2dst; size_t i; for (i = 0; i < OONF_LAYER2_NEIGH_COUNT; i++) { if (oonf_layer2_data_get_origin(&l2neigh->data[i]) == old_origin) { oonf_layer2_data_set_origin(&l2neigh->data[i], new_origin); } } avl_for_each_element(&l2neigh->remote_neighbor_ips, neigh_ip, _neigh_node) { if (neigh_ip->origin == old_origin) { neigh_ip->origin = new_origin; } } avl_for_each_element(&l2neigh->destinations, l2dst, _node) { if (l2dst->origin == old_origin) { l2dst->origin = new_origin; } } }
movl $0xd0, %eax cmpq %rdx, (%rdi,%rax) jne 0x12a46 movq %rsi, (%rdi,%rax) addq $0x28, %rax cmpq $0x4e0, %rax # imm = 0x4E0 jne 0x12a3c movq 0x80(%rdi), %rax movq 0x8(%rax), %rcx cmpq 0x88(%rdi), %rcx je 0x12a75 cmpq %rdx, -0x40(%rax) jne 0x12a70 movq %rsi, -0x40(%rax) movq (%rax), %rax jmp 0x12a59 movq 0x58(%rdi), %rax movq 0x8(%rax), %rcx cmpq 0x60(%rdi), %rcx je 0x12a92 cmpq %rdx, -0x8(%rax) jne 0x12a8d movq %rsi, -0x8(%rax) movq (%rax), %rax jmp 0x12a79 retq
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_net_remove_ip
int oonf_layer2_net_remove_ip(struct oonf_layer2_peer_address *ip, const struct oonf_layer2_origin *origin) { if (ip->origin != origin) { return -1; } oonf_class_event(&_l2net_addr_class, ip, OONF_OBJECT_REMOVED); avl_remove(&ip->l2net->local_peer_ips, &ip->_net_node); avl_remove(&_local_peer_ips_tree, &ip->_global_node); oonf_class_free(&_l2net_addr_class, ip); return 0; }
movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rsi, 0x20(%rdi) je 0x12b52 retq pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x3da68(%rip), %r14 # 0x505c8 movq %r14, %rdi movq %rbx, %rsi movl $0x2, %edx callq 0x11cab movl $0xb8, %edi addq 0x18(%rbx), %rdi leaq 0x60(%rbx), %rsi callq 0x27bcf leaq 0x28(%rbx), %rsi leaq 0x47bcb(%rip), %rdi # 0x5a758 callq 0x27bcf movq %r14, %rdi movq %rbx, %rsi callq 0x11a5f xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_neigh_generate_lid
int oonf_layer2_neigh_generate_lid(struct oonf_layer2_neigh_key *key, struct oonf_layer2_origin *origin, const struct netaddr *mac) { struct oonf_layer2_lid *lid; uint32_t u32; if (!origin->lid) { return -1; } if (netaddr_get_address_family(mac) != AF_MAC48 && netaddr_get_address_family(mac) != AF_EUI64) { return -1; } if (!(lid = avl_find_element(&_lid_tree, mac, lid, _node))) { lid = oonf_class_malloc(&_lid_class); if (!lid) { return -1; } memcpy(&lid->mac, mac, sizeof(*mac)); lid->_node.key = &lid->mac; avl_insert(&_lid_tree, &lid->_node); lid->next_id = 1; } memset(key, 0, sizeof(*key)); /* copy mac */ memcpy(&key->addr, mac, sizeof(*mac)); /* TODO: make LID length configurable */ /* generate new link-id */ u32 = htonl(lid->next_id); memcpy(&key->link_id[0], &u32, 4); key->link_id_length = 4; /* keep track which originator orderer this LID */ key->link_id[0] = origin->lid_index & 0xff; lid->next_id++; return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl $0xffffffff, %ebp # imm = 0xFFFFFFFF cmpb $0x1, 0x10(%rsi) jne 0x12d36 movq %rdx, %r15 movb 0x10(%rdx), %al addb $-0x2f, %al cmpb $0x1, %al ja 0x12d36 movq %rsi, %r14 movq %rdi, %rbx leaq 0x47ae5(%rip), %rdi # 0x5a780 movq %r15, %rsi callq 0x2780e leaq -0x18(%rax), %r12 testq %rax, %rax cmoveq %rax, %r12 jne 0x12cf9 leaq 0x3d9a1(%rip), %rdi # 0x50658 callq 0x11933 testq %rax, %rax je 0x12d36 movq %rax, %r12 movzwl 0x10(%r15), %eax movw %ax, 0x10(%r12) movups (%r15), %xmm0 movups %xmm0, (%r12) movq %r12, %rsi addq $0x18, %rsi movq %r12, 0x40(%r12) leaq 0x47a95(%rip), %rdi # 0x5a780 callq 0x279af movl $0x1, 0x14(%r12) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rbx) movups %xmm0, (%rbx) movl $0x0, 0x1f(%rbx) movups (%r15), %xmm0 movups %xmm0, (%rbx) movzwl 0x10(%r15), %eax movw %ax, 0x10(%rbx) movl 0x14(%r12), %eax bswapl %eax movl %eax, 0x13(%rbx) movb $0x4, 0x12(%rbx) movb 0x14(%r14), %al movb %al, 0x13(%rbx) incl 0x14(%r12) xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_destination_remove
void oonf_layer2_destination_remove(struct oonf_layer2_destination *l2dst) { if (!avl_is_node_added(&l2dst->_node)) { return; } oonf_class_event(&_l2dst_class, l2dst, OONF_OBJECT_REMOVED); avl_remove(&l2dst->neighbor->destinations, &l2dst->_node); oonf_class_free(&_l2dst_class, l2dst); }
pushq %r15 pushq %r14 pushq %rbx cmpq $0x0, 0x28(%rdi) je 0x12e8b movq %rdi, %rbx cmpq $0x0, 0x30(%rdi) je 0x12e8b leaq 0x28(%rbx), %r14 leaq 0x3d9ad(%rip), %r15 # 0x50808 movq %r15, %rdi movq %rbx, %rsi movl $0x2, %edx callq 0x11cab movq 0x18(%rbx), %rdi addq $0x58, %rdi movq %r14, %rsi callq 0x27bcf movq %r15, %rdi movq %rbx, %rsi popq %rbx popq %r14 popq %r15 jmp 0x11a5f popq %rbx popq %r14 popq %r15 retq
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_neigh_add_ip
struct oonf_layer2_neighbor_address * oonf_layer2_neigh_add_ip( struct oonf_layer2_neigh *l2neigh, const struct oonf_layer2_origin *origin, const struct netaddr *ip) { struct oonf_layer2_neighbor_address *l2addr; l2addr = oonf_layer2_neigh_get_remote_ip(l2neigh, ip); if (l2addr) { l2addr->origin = origin; return l2addr; } l2addr = oonf_class_malloc(&_l2neigh_addr_class); if (!l2addr) { return NULL; } /* copy data */ memcpy(&l2addr->ip, ip, sizeof(*ip)); /* set back reference */ l2addr->l2neigh = l2neigh; /* add to tree */ l2addr->_neigh_node.key = &l2addr->ip; avl_insert(&l2neigh->remote_neighbor_ips, &l2addr->_neigh_node); l2addr->_net_node.key = &l2addr->ip; avl_insert(&l2neigh->network->remote_neighbor_ips, &l2addr->_net_node); /* remember originator */ l2addr->origin = origin; oonf_class_event(&_l2neigh_addr_class, l2addr, OONF_OBJECT_ADDED); return l2addr; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r13 movq %rsi, %rbx movq %rdi, %r15 leaq 0x80(%rdi), %r12 movq %r12, %rdi movq %rdx, %rsi callq 0x2780e testq %rax, %rax je 0x1309a movq %rax, %r14 addq $-0x60, %r14 movq %rbx, -0x40(%rax) jmp 0x1310e leaq 0x3d6d7(%rip), %rdi # 0x50778 callq 0x11933 testq %rax, %rax je 0x1310b movq %rax, %r14 movzwl 0x10(%r13), %eax movw %ax, 0x10(%r14) movups (%r13), %xmm0 movups %xmm0, (%r14) movq %r15, 0x18(%r14) leaq 0x60(%r14), %rsi movq %r14, 0x88(%r14) movq %r12, %rdi callq 0x279af movq %r14, %rsi addq $0x28, %rsi movq %r14, 0x50(%r14) movl $0xe0, %edi addq 0x28(%r15), %rdi callq 0x279af movq %rbx, 0x20(%r14) leaq 0x3d67c(%rip), %rdi # 0x50778 movq %r14, %rsi movl $0x1, %edx callq 0x11cab jmp 0x1310e xorl %r14d, %r14d movq %r14, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_neigh_query
struct oonf_layer2_data * oonf_layer2_neigh_query(const char *ifname, const struct netaddr *l2neigh_addr, enum oonf_layer2_neighbor_index idx, bool get_default) { struct oonf_layer2_net *l2net; struct oonf_layer2_neigh *l2neigh; struct oonf_layer2_data *data; /* query layer2 database about neighbor */ l2net = oonf_layer2_net_get(ifname); if (l2net == NULL) { return NULL; } /* look for neighbor specific data */ l2neigh = oonf_layer2_neigh_get(l2net, l2neigh_addr); if (l2neigh != NULL) { data = &l2neigh->data[idx]; if (oonf_layer2_data_has_value(data)) { return data; } } if (!get_default) { return NULL; } /* look for network specific default */ data = &l2net->neighdata[idx]; if (oonf_layer2_data_has_value(data)) { return data; } return NULL; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movl %ecx, %ebx movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rsi leaq 0x47567(%rip), %rdi # 0x5a730 callq 0x2780e leaq -0x7a0(%rax), %r15 testq %rax, %rax cmoveq %rax, %r15 je 0x13279 xorps %xmm0, %xmm0 movq %rsp, %rsi movups %xmm0, 0x12(%rsi) movb $0x0, 0x22(%rsi) movups (%r14), %xmm0 movaps %xmm0, (%rsi) movzwl 0x10(%r14), %eax movw %ax, 0x10(%rsi) leaq 0x90(%r15), %rdi callq 0x2780e movl %ebp, %ecx testq %rax, %rax je 0x13238 leaq (%rcx,%rcx,4), %rsi leaq (%rax,%rsi,8), %rdx addq $-0x410, %rdx # imm = 0xFBF0 cmpq $0x0, -0x3f0(%rax,%rsi,8) je 0x1323e cmpq $0x0, 0x18(%rdx) setne %sil jmp 0x13240 testb %bl, %bl jne 0x13253 jmp 0x13279 xorl %esi, %esi xorb $0x1, %bl orb %sil, %bl xorl %eax, %eax testb %sil, %sil cmovneq %rdx, %rax testb %bl, %bl jne 0x1327b leaq (%rcx,%rcx,4), %rax cmpq $0x0, 0x3b0(%r15,%rax,8) je 0x13279 leaq (%r15,%rax,8), %rax addq $0x390, %rax # imm = 0x390 movq 0x18(%rax), %rcx testq %rcx, %rcx cmoveq %rcx, %rax jmp 0x1327b xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_layer2_neigh_key_from_string
int oonf_layer2_neigh_key_from_string(struct oonf_layer2_neigh_key *key, const char *string) { struct netaddr_str nbuf; const char *split, *addr; ssize_t len; memset(key, 0, sizeof(*key)); split = strchr(string, ','); if (!split) { addr = string; } else { len = split - string; if (len > (ssize_t)(sizeof(nbuf))) { return -1; } strscpy(nbuf.buf, string, len+1); addr = nbuf.buf; split++; len = strhex_to_bin(key->link_id, sizeof(key->link_id), split); if (len < 0) { return -2; } key->link_id_length = len; } if (netaddr_from_string(&key->addr, addr)) { netaddr_invalidate(&key->addr); return -3; } if (netaddr_get_address_family(&key->addr) != AF_MAC48 && netaddr_get_address_family(&key->addr) != AF_EUI64) { netaddr_invalidate(&key->addr); return -4; } return 0; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movl $0x0, 0x1f(%rdi) movq %rsi, %rdi movl $0x2c, %esi callq 0x111d0 testq %rax, %rax je 0x13437 movq %rax, %r12 movq %rax, %rdx subq %r15, %rdx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq $0x3e, %rdx jg 0x13475 incq %rdx leaq 0xa(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x29d98 incq %r12 leaq 0x13(%rbx), %rdi movl $0x10, %esi movq %r12, %rdx callq 0x2a158 testq %rax, %rax js 0x13470 movb %al, 0x12(%rbx) jmp 0x1343a movq %r15, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x290a3 movl $0xfffffffd, %ecx # imm = 0xFFFFFFFD testl %eax, %eax jne 0x13460 movb 0x10(%rbx), %dl addb $-0x2f, %dl movl $0xfffffffc, %ecx # imm = 0xFFFFFFFC xorl %eax, %eax cmpb $0x2, %dl jb 0x13475 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movw $0x0, 0x10(%rbx) movl %ecx, %eax jmp 0x13475 movl $0xfffffffe, %eax # imm = 0xFFFFFFFE addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/OLSR[P]OONF/src/base/oonf_layer2.c
init
static int _init(void) { oonf_class_add(&_l2network_class); oonf_class_add(&_l2neighbor_class); oonf_class_add(&_l2dst_class); oonf_class_add(&_l2net_addr_class); oonf_class_add(&_l2neigh_addr_class); oonf_class_add(&_lid_class); avl_init(&_oonf_layer2_net_tree, avl_comp_strcasecmp, false); avl_init(&_oonf_originator_tree, avl_comp_strcasecmp, false); avl_init(&_local_peer_ips_tree, avl_comp_netaddr, true); avl_init(&_lid_tree, avl_comp_netaddr, false); _lid_originator_count = 0; return 0; }
pushq %rbx leaq 0x3cfcd(%rip), %rdi # 0x50538 callq 0x11760 leaq 0x3d171(%rip), %rdi # 0x506e8 callq 0x11760 leaq 0x3d285(%rip), %rdi # 0x50808 callq 0x11760 leaq 0x3d039(%rip), %rdi # 0x505c8 callq 0x11760 leaq 0x3d1dd(%rip), %rdi # 0x50778 callq 0x11760 leaq 0x3d0b1(%rip), %rdi # 0x50658 callq 0x11760 leaq 0x4717d(%rip), %rdi # 0x5a730 leaq 0x14231(%rip), %rbx # 0x277eb movq %rbx, %rsi xorl %edx, %edx callq 0x277f0 leaq 0x47135(%rip), %rdi # 0x5a700 movq %rbx, %rsi xorl %edx, %edx callq 0x277f0 leaq 0x4717c(%rip), %rdi # 0x5a758 leaq 0x141f4(%rip), %rbx # 0x277d7 movq %rbx, %rsi movl $0x1, %edx callq 0x277f0 leaq 0x47189(%rip), %rdi # 0x5a780 movq %rbx, %rsi xorl %edx, %edx callq 0x277f0 movl $0x0, 0x4711d(%rip) # 0x5a728 xorl %eax, %eax popq %rbx retq
/OLSR[P]OONF/src/base/oonf_layer2.c
oonf_packet_remove
void oonf_packet_remove(struct oonf_packet_socket *pktsocket, bool force __attribute__((unused))) { // TODO: implement non-force behavior for UDP sockets if (list_is_node_added(&pktsocket->node)) { oonf_socket_remove(&pktsocket->scheduler_entry); os_fd_close(&pktsocket->scheduler_entry.fd); abuf_free(&pktsocket->out); list_remove(&pktsocket->node); } }
pushq %rbx cmpq $0x0, (%rdi) je 0x138c4 movq %rdi, %rbx cmpq $0x0, 0x8(%rdi) je 0x138c4 leaq 0x10(%rbx), %rdi callq 0x14c60 movl 0x18(%rbx), %edi cmpl $-0x1, %edi je 0x138a4 callq 0x11290 movl $0xffffffff, 0x18(%rbx) # imm = 0xFFFFFFFF leaq 0xd8(%rbx), %rdi callq 0x27214 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rax, (%rcx) movq %rcx, 0x8(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) popq %rbx retq
/OLSR[P]OONF/src/base/oonf_packet_socket.c
oonf_packet_add_managed
void oonf_packet_add_managed(struct oonf_packet_managed *managed) { if (managed->config.input_buffer_length == 0) { managed->config.input_buffer = _input_buffer; managed->config.input_buffer_length = sizeof(_input_buffer); } managed->_if_listener.if_changed = _cb_interface_listener; managed->_if_listener.name = managed->_managed_config.interface; managed->_if_listener.mesh = managed->_managed_config.mesh; }
cmpq $0x0, 0x608(%rdi) jne 0x13c8f leaq 0x46b33(%rip), %rax # 0x5a7b0 movq %rax, 0x600(%rdi) movq $0x10000, 0x608(%rdi) # imm = 0x10000 leaq 0x22(%rip), %rax # 0x13cb8 movq %rax, 0x6e0(%rdi) leaq 0x658(%rdi), %rax movq %rax, 0x6d0(%rdi) movb 0x6c8(%rdi), %al movb %al, 0x6d8(%rdi) retq
/OLSR[P]OONF/src/base/oonf_packet_socket.c
oonf_packet_remove_managed
void oonf_packet_remove_managed(struct oonf_packet_managed *managed, bool forced) { oonf_packet_remove(&managed->socket_v4, forced); oonf_packet_remove(&managed->socket_v6, forced); oonf_packet_remove(&managed->multicast_v4, forced); oonf_packet_remove(&managed->multicast_v6, forced); os_interface_remove(&managed->_if_listener); oonf_packet_free_managed_config(&managed->_managed_config); }
pushq %rbx movq %rdi, %rbx xorl %esi, %esi callq 0x13876 leaq 0x300(%rbx), %rdi xorl %esi, %esi callq 0x13876 leaq 0x180(%rbx), %rdi xorl %esi, %esi callq 0x13876 leaq 0x480(%rbx), %rdi xorl %esi, %esi callq 0x13876 leaq 0x6d0(%rbx), %rdi callq 0x1950e leaq 0x630(%rbx), %rdi callq 0x29957 addq $0x668, %rbx # imm = 0x668 movq %rbx, %rdi popq %rbx jmp 0x29957
/OLSR[P]OONF/src/base/oonf_packet_socket.c
apply_managed_socket
static int _apply_managed_socket(struct oonf_packet_managed *managed, struct oonf_packet_socket *packet, const struct netaddr *bindto, int port, uint8_t dscp, int protocol, struct os_interface *data) { union netaddr_socket sock; struct netaddr_str buf; /* create binding socket */ if (netaddr_socket_init(&sock, bindto, port, data == NULL ? 0 : data->index)) { OONF_WARN(LOG_PACKET, "Cannot create managed socket address: %s/%u", netaddr_to_string(&buf, bindto), port); return -1; } if (list_is_node_added(&packet->node)) { if (data == packet->os_if && memcmp(&sock, &packet->local_socket, sizeof(sock)) == 0 && protocol == packet->protocol) { /* nothing changed */ return 1; } } else { if (data != NULL && !data->flags.up) { /* nothing changed */ return 1; } } /* remove old socket */ oonf_packet_remove(packet, true); if (data != NULL && !data->flags.up) { OONF_DEBUG(LOG_PACKET, "Interface %s of socket is down", data->name); return 0; } /* copy configuration */ memcpy(&packet->config, &managed->config, sizeof(packet->config)); if (packet->config.user == NULL) { packet->config.user = managed; } /* create new socket */ if (protocol) { if (oonf_packet_raw_add(packet, protocol, &sock, data)) { return -1; } } else { if (oonf_packet_add(packet, &sock, data)) { return -1; } } if (os_fd_set_dscp(&packet->scheduler_entry.fd, dscp, netaddr_get_address_family(bindto) == AF_INET6)) { OONF_WARN(LOG_PACKET, "Could not set DSCP value for socket: %s (%d)", strerror(errno), errno); oonf_packet_remove(packet, true); return -1; } packet->os_if = data; OONF_DEBUG(LOG_PACKET, "Opened new socket and bound it to %s (if %s)", netaddr_to_string(&buf, bindto), data != NULL ? data->name : "any"); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movl %r9d, 0x4(%rsp) movl %r8d, %r12d movl %ecx, %r13d movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %rbp movq 0x100(%rsp), %r14 testq %r14, %r14 je 0x148ce movl 0x1c(%r14), %ecx jmp 0x148d0 xorl %ecx, %ecx movzwl %r13w, %edx leaq 0x48(%rsp), %rdi movq %r15, %rsi callq 0x28dca testl %eax, %eax je 0x1494e movl 0x3c019(%rip), %ebx # 0x50904 leaq 0x58fde(%rip), %rax # 0x6d8d0 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testb $0x4, (%rax,%rbx) je 0x14b33 leaq 0xa(%rsp), %rdi movq %r15, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %r10 subq $0x8, %rsp leaq 0x23609(%rip), %r11 # 0x37f28 leaq 0x233c8(%rip), %rdx # 0x37cee movl $0x4, %edi movl %ebx, %esi movl $0x2a1, %ecx # imm = 0x2A1 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r13 pushq %r10 pushq %r11 callq 0x2efff addq $0x20, %rsp jmp 0x14b33 movl %r12d, %r13d cmpq $0x0, (%rbx) je 0x14995 cmpq $0x0, 0x8(%rbx) je 0x14995 cmpq %r14, 0xf8(%rbx) jne 0x149ab leaq 0x50(%rbx), %rsi leaq 0x48(%rsp), %rdi movl $0x80, %edx callq 0x11410 testl %eax, %eax jne 0x149ab movl $0x1, %r12d movl 0x4(%rsp), %eax cmpl %eax, 0xd0(%rbx) jne 0x149ab jmp 0x14b33 testq %r14, %r14 je 0x14a11 movl $0x1, %r12d cmpb $0x1, 0x24(%r14) jne 0x14b33 movq %rbx, %rdi xorl %esi, %esi callq 0x13876 testq %r14, %r14 je 0x14a1b cmpb $0x0, 0x24(%r14) jne 0x14a1b movl 0x3bf3d(%rip), %esi # 0x50904 leaq 0x58f02(%rip), %rax # 0x6d8d0 testb $0x1, (%rax,%rsi) je 0x14b30 addq $0xc, %r14 leaq 0x23571(%rip), %r10 # 0x37f54 leaq 0x23304(%rip), %rdx # 0x37cee xorl %r12d, %r12d movl $0x1, %edi movl $0x2b7, %ecx # imm = 0x2B7 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r14 pushq %r10 callq 0x2efff addq $0x10, %rsp jmp 0x14b33 movq %rbx, %rdi xorl %esi, %esi callq 0x13876 movq 0x620(%rbp), %rax movq %rax, 0x120(%rbx) movups 0x600(%rbp), %xmm0 movups 0x610(%rbp), %xmm1 movups %xmm1, 0x110(%rbx) movups %xmm0, 0x100(%rbx) testq %rax, %rax jne 0x14a51 movq %rbp, 0x120(%rbx) movl 0x4(%rsp), %esi testl %esi, %esi je 0x14a6b leaq 0x48(%rsp), %rdx movq %rbx, %rdi movq %r14, %rcx callq 0x1381b jmp 0x14a7b leaq 0x48(%rsp), %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x136f0 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testl %eax, %eax jne 0x14b33 leaq 0x18(%rbx), %rdi movzbl %r13b, %esi xorl %edx, %edx cmpb $0xa, 0x10(%r15) sete %dl callq 0x18ef4 testl %eax, %eax je 0x14b16 movl 0x3be59(%rip), %r14d # 0x50904 leaq 0x58e1e(%rip), %rax # 0x6d8d0 testb $0x4, (%rax,%r14) je 0x14b04 callq 0x110c0 movq %rax, %r15 movl (%rax), %edi callq 0x11560 movq %rax, %r10 movl (%r15), %r11d subq $0x8, %rsp leaq 0x2349a(%rip), %r15 # 0x37f73 leaq 0x2320e(%rip), %rdx # 0x37cee movl $0x4, %edi movl %r14d, %esi movl $0x2ce, %ecx # imm = 0x2CE xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r11 pushq %r10 pushq %r15 callq 0x2efff addq $0x20, %rsp movq %rbx, %rdi xorl %esi, %esi callq 0x13876 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF jmp 0x14b33 movq %r14, 0xf8(%rbx) movl 0x3bde1(%rip), %ebx # 0x50904 leaq 0x58da6(%rip), %rax # 0x6d8d0 testb $0x1, (%rax,%rbx) jne 0x14b48 xorl %r12d, %r12d movl %r12d, %eax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xa(%rsp), %rdi xorl %r12d, %r12d movq %r15, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %r10 leaq 0xc(%r14), %rax testq %r14, %r14 leaq 0x26184(%rip), %r11 # 0x3acef cmovneq %rax, %r11 subq $0x8, %rsp leaq 0x23426(%rip), %r14 # 0x37fa0 leaq 0x2316d(%rip), %rdx # 0x37cee movl $0x1, %edi movl %ebx, %esi movl $0x2d5, %ecx # imm = 0x2D5 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r11 pushq %r10 pushq %r14 jmp 0x14940
/OLSR[P]OONF/src/base/oonf_packet_socket.c
oonf_stream_add
int oonf_stream_add(struct oonf_stream_socket *stream_socket, const union netaddr_socket *local) { struct netaddr_str buf; /* server socket not necessary for outgoing connections */ if (netaddr_socket_get_port(local) != 0) { /* Init socket */ if (os_fd_getsocket(&stream_socket->scheduler_entry.fd, local, true, 0, NULL, LOG_STREAM)) { goto add_stream_error; } /* show that we are willing to listen */ if (os_fd_listen(&stream_socket->scheduler_entry.fd, 1) == -1) { OONF_WARN(LOG_STREAM, "tcp socket listen failed for %s: %s (%d)\n", netaddr_socket_to_string(&buf, local), strerror(errno), errno); goto add_stream_error; } stream_socket->scheduler_entry.name = stream_socket->socket_name; stream_socket->scheduler_entry.process = _cb_parse_request; snprintf(stream_socket->socket_name, sizeof(stream_socket->socket_name), "tcp-server: %s", netaddr_socket_to_string(&buf, local)); oonf_socket_add(&stream_socket->scheduler_entry); oonf_socket_set_read(&stream_socket->scheduler_entry, true); } memcpy(&stream_socket->local_socket, local, sizeof(stream_socket->local_socket)); if (stream_socket->config.memcookie == NULL) { stream_socket->config.memcookie = &_connection_cookie; } if (stream_socket->config.allowed_sessions == 0) { stream_socket->config.allowed_sessions = 10; } if (stream_socket->config.maximum_input_buffer == 0) { stream_socket->config.maximum_input_buffer = 65536; } list_init_head(&stream_socket->session); list_add_tail(&_stream_head, &stream_socket->_node); return 0; add_stream_error: oonf_socket_remove(&stream_socket->scheduler_entry); os_fd_close(&stream_socket->scheduler_entry.fd); return -1; }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rsi, %r12 movq %rdi, %r14 movq %rsi, %rdi callq 0x28e2d testw %ax, %ax je 0x1521e leaq 0xa0(%r14), %rbx leaq 0xa8(%r14), %r15 movl 0x3b926(%rip), %r9d # 0x50a94 movq %r15, %rdi movq %r12, %rsi movl $0x1, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x184f8 testl %eax, %eax je 0x151b1 movq %rbx, %rdi callq 0x14c60 movl (%r15), %edi movl $0xffffffff, %ebx # imm = 0xFFFFFFFF cmpl $-0x1, %edi je 0x152a5 callq 0x11290 movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF jmp 0x152a5 movl (%r15), %edi movl $0x1, %esi callq 0x113e0 cmpl $-0x1, %eax je 0x152b5 leaq 0x148(%r14), %r15 movq %r15, 0xa0(%r14) leaq 0x151(%rip), %rax # 0x1532d movq %rax, 0xb8(%r14) leaq 0x2(%rsp), %rdi movq %r12, %rsi callq 0x2967a leaq 0x22fc6(%rip), %rdx # 0x381bd movl $0x4c, %esi movq %r15, %rdi movq %rax, %rcx xorl %eax, %eax callq 0x111e0 movq %rbx, %rdi callq 0x14bb8 movq %rbx, %rdi movl $0x1, %esi callq 0x14d0d leaq 0x10(%r14), %rdi movl $0x10, %ecx movq %r12, %rsi rep movsq (%rsi), %es:(%rdi) cmpq $0x0, 0xe0(%r14) jne 0x15245 leaq 0x3b8aa(%rip), %rax # 0x50ae8 movq %rax, 0xe0(%r14) cmpl $0x0, 0xe8(%r14) jne 0x1525a movl $0xa, 0xe8(%r14) cmpq $0x0, 0xf8(%r14) jne 0x1526f movq $0x10000, 0xf8(%r14) # imm = 0x10000 leaq 0x90(%r14), %rax movq %rax, 0x98(%r14) movq %rax, 0x90(%r14) movq 0x55625(%rip), %rax # 0x6a8b0 leaq 0x55616(%rip), %rcx # 0x6a8a8 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, 0x55610(%rip) # 0x6a8b0 movq %r14, (%rax) xorl %ebx, %ebx movl %ebx, %eax addq $0x40, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl 0x3b7d8(%rip), %r14d # 0x50a94 leaq 0x5860d(%rip), %rax # 0x6d8d0 testb $0x4, (%rax,%r14) je 0x15187 leaq 0x2(%rsp), %rdi movq %r12, %rsi callq 0x2967a movq %rax, %r12 callq 0x110c0 movq %rax, %r13 movl (%rax), %edi callq 0x11560 movq %rax, %r10 movl (%r13), %r11d leaq 0x22e98(%rip), %r13 # 0x38193 leaq 0x22e73(%rip), %rdx # 0x38175 movl $0x4, %edi movl %r14d, %esi movl $0xac, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r11 pushq %r10 pushq %r12 pushq %r13 callq 0x2efff addq $0x20, %rsp jmp 0x15187
/OLSR[P]OONF/src/base/oonf_stream_socket.c
oonf_stream_remove
void oonf_stream_remove(struct oonf_stream_socket *stream_socket, bool force) { if (stream_socket->busy && !force) { stream_socket->remove = true; return; } if (!list_is_node_added(&stream_socket->_node)) { return; } oonf_stream_close_all_sessions(stream_socket); list_remove(&stream_socket->_node); oonf_socket_remove(&stream_socket->scheduler_entry); os_fd_close(&stream_socket->scheduler_entry.fd); if (stream_socket->config.cleanup_socket) { stream_socket->config.cleanup_socket(stream_socket); } }
pushq %rbx movq %rdi, %rbx movb 0x198(%rdi), %al xorb $0x1, %al orb %sil, %al je 0x1552f cmpq $0x0, (%rbx) je 0x15536 cmpq $0x0, 0x8(%rbx) je 0x15536 movq %rbx, %rdi callq 0x15538 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rax, (%rcx) movq %rcx, 0x8(%rax) leaq 0xa0(%rbx), %rdi xorps %xmm0, %xmm0 movups %xmm0, (%rbx) callq 0x14c60 movl 0xa8(%rbx), %edi cmpl $-0x1, %edi je 0x1551d callq 0x11290 movl $0xffffffff, 0xa8(%rbx) # imm = 0xFFFFFFFF movq 0x120(%rbx), %rax testq %rax, %rax je 0x15536 movq %rbx, %rdi popq %rbx jmpq *%rax movb $0x1, 0x199(%rbx) popq %rbx retq
/OLSR[P]OONF/src/base/oonf_stream_socket.c
stream_close
static void _stream_close(struct oonf_stream_session *session) { if (session->stream_socket->config.cleanup_session) { session->stream_socket->config.cleanup_session(session); } oonf_timer_stop(&session->timeout); session->stream_socket->session_counter--; list_remove(&session->node); oonf_socket_remove(&session->scheduler_entry); os_fd_close(&session->scheduler_entry.fd); abuf_free(&session->in); abuf_free(&session->out); oonf_class_free(session->stream_socket->config.memcookie, session); }
pushq %rbx movq %rdi, %rbx movq 0x170(%rdi), %rax movq 0x118(%rax), %rax testq %rax, %rax je 0x15b97 movq %rbx, %rdi callq *%rax leaq 0x1b8(%rbx), %rdi callq 0x1758b movq 0x170(%rbx), %rax decl 0x194(%rax) movq 0x160(%rbx), %rax movq 0x168(%rbx), %rcx movq %rax, (%rcx) movq %rcx, 0x8(%rax) leaq 0x178(%rbx), %rdi xorps %xmm0, %xmm0 movups %xmm0, 0x160(%rbx) callq 0x14c60 movl 0x180(%rbx), %edi cmpl $-0x1, %edi je 0x15bf5 callq 0x11290 movl $0xffffffff, 0x180(%rbx) # imm = 0xFFFFFFFF leaq 0x218(%rbx), %rdi callq 0x27214 leaq 0x98(%rbx), %rdi callq 0x27214 movq 0x170(%rbx), %rax movq 0xe0(%rax), %rdi movq %rbx, %rsi popq %rbx jmp 0x11a5f
/OLSR[P]OONF/src/base/oonf_stream_socket.c
cb_interface_listener
static int _cb_interface_listener(struct os_interface_listener *interf) { struct oonf_stream_managed *managed; int result; /* calculate managed socket for this event */ managed = container_of(interf, struct oonf_stream_managed, _if_listener); result = _apply_managed(managed); OONF_DEBUG(LOG_STREAM, "Result from interface %s triggered socket reconfiguration: %d", interf->name, result); return result; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 addq $-0x408, %rdi # imm = 0xFBF8 callq 0x15e6d movl %eax, %ebx movl 0x3adfb(%rip), %esi # 0x50a94 leaq 0x57c30(%rip), %rax # 0x6d8d0 testb $0x1, (%rax,%rsi) je 0x15cd9 subq $0x8, %rsp leaq 0x2231c(%rip), %r10 # 0x37fcd leaq 0x224bd(%rip), %rdx # 0x38175 movl $0x1, %edi movl $0x378, %ecx # imm = 0x378 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %rbx pushq (%r14) pushq %r10 callq 0x2efff addq $0x20, %rsp movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
/OLSR[P]OONF/src/base/oonf_stream_socket.c
cb_telnet_help
static enum oonf_telnet_result _cb_telnet_help(struct oonf_telnet_data *data) { struct oonf_telnet_command *cmd; if (data->parameter != NULL && data->parameter[0] != 0) { cmd = avl_find_element(&_telnet_cmd_tree, data->parameter, cmd, _node); if (cmd) { cmd = _check_telnet_command_acl(data, cmd); } if (cmd == NULL) { abuf_appendf(data->out, "No help text found for command: %s\n", data->parameter); return TELNET_RESULT_ACTIVE; } if (cmd->help_handler) { cmd->help_handler(data); } else { abuf_appendf(data->out, "%s", cmd->help); } return TELNET_RESULT_ACTIVE; } abuf_puts(data->out, "Known commands:\n"); avl_for_each_element(&_telnet_cmd_tree, cmd, _node) { if (_check_telnet_command_acl(data, cmd)) { abuf_appendf(data->out, " %s\n", cmd->command); } } abuf_puts(data->out, "Use 'help <command> to see a help text for one command\n"); return TELNET_RESULT_ACTIVE; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x18(%rdi), %rsi testq %rsi, %rsi je 0x17208 cmpb $0x0, (%rsi) je 0x17208 leaq 0x536cf(%rip), %rdi # 0x6a8b8 callq 0x2780e testq %rax, %rax je 0x1727e addq $-0x28, %rax movq %rbx, %rdi movq %rax, %rsi callq 0x17444 jmp 0x17280 movq 0x8(%rbx), %rdi leaq 0x21742(%rip), %rsi # 0x38955 callq 0x27362 movq 0x53699(%rip), %r12 # 0x6a8b8 movq 0x8(%r12), %rax cmpq 0x53695(%rip), %rax # 0x6a8c0 je 0x1726c leaq 0x27244(%rip), %r14 # 0x3e478 leaq -0x28(%r12), %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x17444 testq %rax, %rax je 0x1725a movq 0x8(%rbx), %rdi movq (%r15), %rdx movq %r14, %rsi xorl %eax, %eax callq 0x272d1 movq (%r12), %r12 movq 0x8(%r12), %rax cmpq 0x53656(%rip), %rax # 0x6a8c0 jne 0x17234 movq 0x8(%rbx), %rdi leaq 0x216ef(%rip), %rsi # 0x38966 callq 0x27362 jmp 0x172bc xorl %eax, %eax testq %rax, %rax je 0x17295 movq 0x20(%rax), %rcx testq %rcx, %rcx je 0x172a6 movq %rbx, %rdi callq *%rcx jmp 0x172bc movq 0x8(%rbx), %rdi movq 0x18(%rbx), %rdx leaq 0x2168d(%rip), %rsi # 0x38931 jmp 0x172b5 movq 0x8(%rbx), %rdi movq 0x8(%rax), %rdx leaq 0x28475(%rip), %rsi # 0x3f72a xorl %eax, %eax callq 0x272d1 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/OLSR[P]OONF/src/base/oonf_telnet.c
cb_telnet_repeat
static enum oonf_telnet_result _cb_telnet_repeat(struct oonf_telnet_data *data) { int interval = 0; char *ptr = NULL; if (data->stop_handler) { abuf_puts(data->out, "Error, you cannot stack continous output commands\n"); return TELNET_RESULT_ACTIVE; } if (data->parameter == NULL || (ptr = strchr(data->parameter, ' ')) == NULL) { abuf_puts(data->out, "Missing parameters for repeat\n"); return TELNET_RESULT_ACTIVE; } ptr++; interval = atoi(data->parameter); if (interval < 1) { abuf_puts(data->out, "Please specify an interval >= 1\n"); return TELNET_RESULT_ACTIVE; } data->stop_timer.class = &_telnet_repeat_timerinfo; oonf_timer_start(&data->stop_timer, (uint64_t)MSEC_PER_SEC * interval); data->stop_handler = _cb_telnet_repeat_stophandler; data->stop_data[1] = strdup(ptr); data->stop_data[2] = NULL; /* split command/parameter and remember it */ ptr = strchr(data->stop_data[1], ' '); if (ptr != NULL) { /* found a parameter */ *ptr++ = 0; data->stop_data[2] = ptr; } /* start command the first time */ data->command = data->stop_data[1]; data->parameter = data->stop_data[2]; if (_telnet_handle_command(data) != TELNET_RESULT_ACTIVE) { _call_stop_handler(data); } return TELNET_RESULT_CONTINOUS; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpq $0x0, 0x28(%rdi) je 0x1731b movq 0x8(%rbx), %rdi leaq 0x216bb(%rip), %rsi # 0x389d1 jmp 0x173f9 movq 0x18(%rbx), %r15 testq %r15, %r15 je 0x173ee movq %r15, %rdi movl $0x20, %esi callq 0x111d0 testq %rax, %rax je 0x173ee movq %rax, %r14 movq %r15, %rdi callq 0x11500 testl %eax, %eax jle 0x1740d incq %r14 leaq 0x50(%rbx), %rdi leaq 0x3a2c9(%rip), %rcx # 0x51628 movq %rcx, 0x88(%rbx) movl %eax, %eax imulq $0x3e8, %rax, %rdx # imm = 0x3E8 movq %rdx, %rsi callq 0x17611 leaq 0x161(%rip), %rax # 0x174df movq %rax, 0x28(%rbx) movq %r14, %rdi callq 0x11550 movq %rax, 0x38(%rbx) movq $0x0, 0x40(%rbx) movq %rax, %rdi movl $0x20, %esi callq 0x111d0 testq %rax, %rax je 0x173b5 movq %rax, %rcx incq %rcx movb $0x0, (%rax) movq %rcx, 0x40(%rbx) movq 0x38(%rbx), %rax movq %rax, 0x10(%rbx) movq 0x40(%rbx), %rax movq %rax, 0x18(%rbx) movq %rbx, %rdi callq 0x16aef movl $0x1, %ebp testl %eax, %eax je 0x17400 movq 0x28(%rbx), %rax testq %rax, %rax je 0x17400 movq $0x0, 0x28(%rbx) movq %rbx, %rdi callq *%rax jmp 0x17400 movq 0x8(%rbx), %rdi leaq 0x2160b(%rip), %rsi # 0x38a04 callq 0x27362 xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x8(%rbx), %rdi leaq 0x2160b(%rip), %rsi # 0x38a23 jmp 0x173f9
/OLSR[P]OONF/src/base/oonf_telnet.c
oonf_timer_remove
void oonf_timer_remove(struct oonf_timer_class *info) { struct oonf_timer_instance *timer, *iterator; if (!list_is_node_added(&info->_node)) { /* only free node if its hooked to the timer core */ return; } avl_for_each_element_safe(&_timer_tree, timer, _node, iterator) { if (timer->class == info) { oonf_timer_stop(timer); } } list_remove(&info->_node); }
pushq %r14 pushq %rbx pushq %rax cmpq $0x0, (%rdi) je 0x17583 movq %rdi, %rbx cmpq $0x0, 0x8(%rdi) je 0x17583 movq 0x533a5(%rip), %rdi # 0x6a8f0 movq 0x8(%rdi), %rax cmpq 0x533a2(%rip), %rax # 0x6a8f8 je 0x1756f movq (%rdi), %r14 cmpq %rbx, 0x38(%rdi) jne 0x17566 callq 0x1758b movq 0x8(%r14), %rax movq %r14, %rdi jmp 0x1754f movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rax, (%rcx) movq %rcx, 0x8(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
/OLSR[P]OONF/src/base/oonf_timer.c
avlcomp_timer
static int _avlcomp_timer(const void *p1, const void *p2) { const struct oonf_timer_instance *t1, *t2; t1 = p1; t2 = p2; if (t1->_clock > t2->_clock) { return 1; } if (t1->_clock < t2->_clock) { return -1; } return 0; }
movq 0x58(%rdi), %rax movq 0x58(%rsi), %rcx xorl %edx, %edx cmpq %rcx, %rax sbbl %edx, %edx cmpq %rcx, %rax movl $0x1, %eax cmovbel %edx, %eax retq nop
/OLSR[P]OONF/src/base/oonf_timer.c
os_clock_linux_gettime64_ns
int os_clock_linux_gettime64_ns(uint64_t *t64) { int error; #if defined(CLOCK_MONOTONIC_RAW) || defined(CLOCK_MONOTONIC) if (_clock_source) { struct timespec ts; if ((error = clock_gettime(_clock_source, &ts)) != 0) { return error; } *t64 = 1000000000ull * ts.tv_sec + ts.tv_nsec; return 0; } #endif return -1; }
pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl 0x5294a(%rip), %edi # 0x6a918 testl %edi, %edi je 0x17ff2 movq %rsp, %rsi callq 0x11150 testl %eax, %eax jne 0x17ff7 imulq $0x3b9aca00, (%rsp), %rax # imm = 0x3B9ACA00 addq 0x8(%rsp), %rax movq %rax, (%rbx) xorl %eax, %eax jmp 0x17ff7 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x10, %rsp popq %rbx retq
/OLSR[P]OONF/src/base/os_linux/os_clock_linux.c
os_fd_generic_join_mcast_send
int os_fd_generic_join_mcast_send(struct os_fd *sock, const struct netaddr *multicast, const struct os_interface *os_if, bool loop, uint8_t ttl, enum oonf_log_source log_src __attribute__((unused))) { struct netaddr_str buf1, buf2; unsigned i; if (netaddr_get_address_family(multicast) == AF_INET) { OONF_DEBUG(log_src, "Socket on interface %s joining sending multicast %s (src %s)\n", os_if->name, netaddr_to_string(&buf2, multicast), netaddr_to_string(&buf1, os_if->if_v4)); if (setsockopt(sock->fd, IPPROTO_IP, IP_MULTICAST_IF, netaddr_get_binptr(os_if->if_v4), 4) < 0) { OONF_WARN(log_src, "Cannot set multicast %s on interface %s (src %s): %s (%d)\n", netaddr_to_string(&buf2, multicast), os_if->name, netaddr_to_string(&buf1, os_if->if_v4), strerror(errno), errno); return -1; } i = loop ? 1 : 0; if (setsockopt(sock->fd, IPPROTO_IP, IP_MULTICAST_LOOP, (char *)&i, sizeof(i)) < 0) { OONF_WARN(log_src, "Cannot %sactivate local loop of multicast interface: %s (%d)\n", loop ? "" : "de", strerror(errno), errno); return -1; } i = ttl > 0 ? ttl : 1; if (setsockopt(sock->fd, IPPROTO_IP, IP_MULTICAST_TTL, &i, sizeof(i)) < 0) { OONF_WARN(log_src, "Cannot set multicast TTL to %u: %s (%d)", i, strerror(errno), errno); return -1; } } else { OONF_DEBUG(log_src, "Socket on interface %s (%d) joining sending multicast %s (src %s)\n", os_if->name, os_if->index, netaddr_to_string(&buf2, multicast), netaddr_to_string(&buf1, os_if->if_linklocal_v6)); if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, &os_if->index, sizeof(os_if->index)) < 0) { OONF_WARN(log_src, "Cannot set multicast %s on interface %s (src %s): %s (%d)\n", netaddr_to_string(&buf2, multicast), os_if->name, netaddr_to_string(&buf1, os_if->if_linklocal_v6), strerror(errno), errno); return -1; } i = loop ? 1 : 0; if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &i, sizeof(i)) < 0) { OONF_WARN(log_src, "Cannot deactivate local loop of multicast interface: %s (%d)\n", strerror(errno), errno); return -1; } i = ttl > 0 ? ttl : 1; if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &i, sizeof(i)) < 0) { OONF_WARN(log_src, "Cannot set multicast TTL to %u: %s (%d)", i, strerror(errno), errno); return -1; } } return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movl %r8d, 0x14(%rsp) movl %ecx, %r13d movq %rdx, %r14 movq %rsi, %rbp cmpb $0x2, 0x10(%rsi) movq %rdi, %r15 movl %r9d, 0xc(%rsp) movl %r9d, %r12d leaq 0x54e9b(%rip), %rbx # 0x6d8d0 movb (%rbx,%r12), %al jne 0x18b82 testb $0x1, %al je 0x18aae leaq 0xc(%r14), %rax movq %rax, 0x18(%rsp) leaq 0x2c(%rsp), %rdi movq %rbp, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %rbx movq 0x40(%r14), %rsi leaq 0x6a(%rsp), %rdi xorl %edx, %edx callq 0x28e44 movq %rax, %r10 leaq 0x20856(%rip), %r11 # 0x392ce leaq 0x20726(%rip), %rdx # 0x391a5 movl $0x1, %edi movl 0xc(%rsp), %esi movl $0x8e, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq %rbx leaq 0x54e31(%rip), %rbx # 0x6d8d0 pushq 0x28(%rsp) pushq %r11 callq 0x2efff addq $0x20, %rsp movl (%r15), %edi movq 0x40(%r14), %rcx xorl %esi, %esi movl $0x20, %edx movl $0x4, %r8d callq 0x11130 testl %eax, %eax js 0x18ce7 movzbl %r13b, %eax leaq 0x10(%rsp), %rcx movl %eax, (%rcx) movl (%r15), %edi xorl %esi, %esi movl $0x22, %edx movl $0x4, %r8d callq 0x11130 testl %eax, %eax js 0x18de2 movl 0x14(%rsp), %ecx movzbl %cl, %eax cmpb $0x2, %cl movl $0x1, %ecx cmovael %eax, %ecx movzbl %cl, %eax leaq 0x10(%rsp), %rcx movl %eax, (%rcx) movl (%r15), %edi xorl %esi, %esi movl $0x21, %edx movl $0x4, %r8d callq 0x11130 testl %eax, %eax movl $0x0, %r13d jns 0x18ea7 movl $0xffffffff, %r13d # imm = 0xFFFFFFFF testb $0x4, (%rbx,%r12) je 0x18ea7 movl 0x10(%rsp), %r14d callq 0x110c0 movq %rax, %rbx movl (%rax), %edi callq 0x11560 movq %rax, %r10 movl (%rbx), %r11d leaq 0x2081d(%rip), %rbx # 0x39385 leaq 0x20636(%rip), %rdx # 0x391a5 movl $0x4, %edi movl 0xc(%rsp), %esi movl $0xa0, %ecx jmp 0x18cd4 testb $0x1, %al je 0x18c02 leaq 0xc(%r14), %rax movq %rax, 0x18(%rsp) movl 0x1c(%r14), %eax movq %rax, 0x20(%rsp) leaq 0x2c(%rsp), %rdi movq %rbp, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %rbx movq 0x58(%r14), %rsi leaq 0x6a(%rsp), %rdi xorl %edx, %edx callq 0x28e44 movq %rax, %r10 subq $0x8, %rsp leaq 0x207e5(%rip), %r11 # 0x393ad leaq 0x205d6(%rip), %rdx # 0x391a5 movl $0x1, %edi movl 0x14(%rsp), %esi movl $0xa6, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq %rbx leaq 0x54ce1(%rip), %rbx # 0x6d8d0 pushq 0x38(%rsp) pushq 0x38(%rsp) pushq %r11 callq 0x2efff addq $0x30, %rsp movl (%r15), %edi leaq 0x1c(%r14), %rcx movl $0x29, %esi movl $0x11, %edx movl $0x4, %r8d callq 0x11130 testl %eax, %eax js 0x18d55 movzbl %r13b, %eax leaq 0x10(%rsp), %rcx movl %eax, (%rcx) movl (%r15), %edi movl $0x29, %esi movl $0x13, %edx movl $0x4, %r8d callq 0x11130 testl %eax, %eax js 0x18e4f movzbl 0x14(%rsp), %eax cmpb $0x2, %al movl $0x1, %ecx cmovael %eax, %ecx movzbl %cl, %eax leaq 0x10(%rsp), %rcx movl %eax, (%rcx) movl (%r15), %edi movl $0x29, %esi movl $0x12, %edx movl $0x4, %r8d callq 0x11130 xorl %r13d, %r13d testl %eax, %eax jns 0x18ea7 movl $0xffffffff, %r13d # imm = 0xFFFFFFFF testb $0x4, (%rbx,%r12) je 0x18ea7 movl 0x10(%rsp), %r14d callq 0x110c0 movq %rax, %rbx movl (%rax), %edi callq 0x11560 movq %rax, %r10 movl (%rbx), %r11d leaq 0x206c6(%rip), %rbx # 0x39385 leaq 0x204df(%rip), %rdx # 0x391a5 movl $0x4, %edi movl 0xc(%rsp), %esi movl $0xb7, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r11 pushq %r10 pushq %r14 jmp 0x18e9d movl $0xffffffff, %r13d # imm = 0xFFFFFFFF testb $0x4, (%rbx,%r12) je 0x18ea7 leaq 0x2c(%rsp), %rdi movq %rbp, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %r15 movq 0x40(%r14), %rsi addq $0xc, %r14 leaq 0x6a(%rsp), %rdi xorl %edx, %edx callq 0x28e44 movq %rax, %rbx callq 0x110c0 movq %rax, %r12 movl (%rax), %edi callq 0x11560 movq %rax, %r10 movl (%r12), %r11d leaq 0x205ce(%rip), %r12 # 0x3930c leaq 0x20460(%rip), %rdx # 0x391a5 movl $0x4, %edi movl 0xc(%rsp), %esi movl $0x93, %ecx jmp 0x18dc1 movl $0xffffffff, %r13d # imm = 0xFFFFFFFF testb $0x4, (%rbx,%r12) je 0x18ea7 leaq 0x2c(%rsp), %rdi movq %rbp, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %r15 movq 0x58(%r14), %rsi addq $0xc, %r14 leaq 0x6a(%rsp), %rdi xorl %edx, %edx callq 0x28e44 movq %rax, %rbx callq 0x110c0 movq %rax, %r12 movl (%rax), %edi callq 0x11560 movq %rax, %r10 movl (%r12), %r11d leaq 0x20560(%rip), %r12 # 0x3930c leaq 0x203f2(%rip), %rdx # 0x391a5 movl $0x4, %edi movl 0xc(%rsp), %esi movl $0xab, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r11 pushq %r10 pushq %rbx pushq %r14 pushq %r15 pushq %r12 callq 0x2efff addq $0x30, %rsp jmp 0x18ea7 testb $0x4, (%rbx,%r12) je 0x18e47 leaq 0x2565a(%rip), %rax # 0x3e44a leaq 0x2439a(%rip), %r14 # 0x3d191 testb %r13b, %r13b cmovneq %rax, %r14 callq 0x110c0 movq %rax, %rbx movl (%rax), %edi callq 0x11560 movq %rax, %r10 movl (%rbx), %r11d leaq 0x2052d(%rip), %rbx # 0x39347 leaq 0x20384(%rip), %rdx # 0x391a5 movl $0x4, %edi movl 0xc(%rsp), %esi movl $0x9a, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r11 pushq %r10 pushq %r14 pushq %rbx callq 0x2efff addq $0x20, %rsp movl $0xffffffff, %r13d # imm = 0xFFFFFFFF jmp 0x18ea7 movl $0xffffffff, %r13d # imm = 0xFFFFFFFF testb $0x4, (%rbx,%r12) je 0x18ea7 callq 0x110c0 movq %rax, %rbx movl (%rax), %edi callq 0x11560 movq %rax, %r10 movl (%rbx), %r11d subq $0x8, %rsp leaq 0x20574(%rip), %rbx # 0x393f0 leaq 0x20322(%rip), %rdx # 0x391a5 movl $0x4, %edi movl 0x14(%rsp), %esi movl $0xb1, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r11 pushq %r10 pushq %rbx callq 0x2efff addq $0x20, %rsp movl %r13d, %eax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/OLSR[P]OONF/src/base/os_generic/os_fd_generic_join_mcast.c
os_fd_linux_skip_rawsocket_prefix
uint8_t * os_fd_linux_skip_rawsocket_prefix(uint8_t *ptr, ssize_t *len, int af_type) { int header_size; if (af_type != AF_INET) { return ptr; } /* skip IPv4 header */ header_size = (ptr[0] & 0x0f) << 2; *len -= header_size; return ptr + header_size; }
movq %rdi, %rax cmpl $0x2, %edx jne 0x190fc movzbl (%rax), %ecx shll $0x2, %ecx andl $0x3c, %ecx subq %rcx, (%rsi) addq %rcx, %rax retq
/OLSR[P]OONF/src/base/os_linux/os_fd_linux.c
remove_interface
static void _remove_interface(struct os_interface *data) { struct os_interface_ip *ip, *ip_iter; if (!list_is_empty(&data->_listeners) || data->_internal.configured) { return; } if (data->flags.mesh) { _cleanup_mesh(data); } /* remove all addresses */ avl_for_each_element_safe(&data->addresses, ip, _node, ip_iter) { avl_remove(&data->addresses, &ip->_node); oonf_class_free(&_interface_ip_class, ip); } avl_for_each_element_safe(&data->peers, ip, _node, ip_iter) { avl_remove(&data->peers, &ip->_node); oonf_class_free(&_interface_ip_class, ip); } /* stop change timer */ oonf_timer_stop(&data->_change_timer); /* remove interface */ avl_remove(&_interface_data_tree, &data->_node); oonf_class_free(&_interface_data_class, data); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx leaq 0xb0(%rdi), %rax cmpq %rax, 0xb0(%rdi) jne 0x198db movq %rdi, %rbx cmpq %rax, 0xb8(%rdi) jne 0x198db cmpb $0x0, 0xa(%rbx) je 0x198e5 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq cmpb $0x1, 0x2a(%rbx) jne 0x198f3 movq %rbx, %rdi callq 0x195a2 movq 0x60(%rbx), %r14 movq 0x8(%r14), %rax cmpq 0x68(%rbx), %rax je 0x19932 leaq 0x60(%rbx), %r15 leaq 0x3875c(%rip), %r12 # 0x52068 movq (%r14), %r13 movq %r15, %rdi movq %r14, %rsi callq 0x27bcf movq %r12, %rdi movq %r14, %rsi callq 0x11a5f movq 0x8(%r13), %rax movq %r13, %r14 cmpq 0x68(%rbx), %rax jne 0x1990c movq 0x88(%rbx), %r14 movq 0x8(%r14), %rax cmpq 0x90(%rbx), %rax je 0x1997d leaq 0x88(%rbx), %r15 leaq 0x38714(%rip), %r12 # 0x52068 movq (%r14), %r13 movq %r15, %rdi movq %r14, %rsi callq 0x27bcf movq %r12, %rdi movq %r14, %rsi callq 0x11a5f movq 0x8(%r13), %rax movq %r13, %r14 cmpq 0x90(%rbx), %rax jne 0x19954 leaq 0x100(%rbx), %rdi callq 0x1758b leaq 0xc8(%rbx), %rsi leaq 0x50f99(%rip), %rdi # 0x6a930 callq 0x27bcf leaq 0x38635(%rip), %rdi # 0x51fd8 movq %rbx, %rsi popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x11a5f
/OLSR[P]OONF/src/base/os_linux/os_interface_linux.c
os_interface_linux_address_set
int os_interface_linux_address_set(struct os_interface_ip_change *addr) { uint8_t buffer[UIO_MAXIOV]; struct nlmsghdr *msg; struct ifaddrmsg *ifaddrreq; int seq; #if defined(OONF_LOG_DEBUG_INFO) struct netaddr_str nbuf; #endif memset(buffer, 0, sizeof(buffer)); /* get pointers for netlink message */ msg = (void *)&buffer[0]; if (addr->set) { msg->nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE | NLM_F_ACK; msg->nlmsg_type = RTM_NEWADDR; } else { msg->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; msg->nlmsg_type = RTM_DELADDR; } /* set length of netlink message with ifaddrmsg payload */ msg->nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); OONF_DEBUG(LOG_OS_INTERFACE, "%sset address on if %d: %s", addr->set ? "" : "re", addr->if_index, netaddr_to_string(&nbuf, &addr->address)); ifaddrreq = NLMSG_DATA(msg); ifaddrreq->ifa_family = netaddr_get_address_family(&addr->address); ifaddrreq->ifa_prefixlen = netaddr_get_prefix_length(&addr->address); ifaddrreq->ifa_index = addr->if_index; ifaddrreq->ifa_scope = addr->scope; if (os_system_linux_netlink_addnetaddr(&_rtnetlink_receiver, msg, IFA_LOCAL, &addr->address)) { return -1; } /* cannot fail */ seq = os_system_linux_netlink_send(&_rtnetlink_receiver, msg); if (addr->cb_finished) { list_add_tail(&_rtnetlink_feedback, &addr->_internal._node); addr->_internal.nl_seq = seq; } return 0; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x448, %rsp # imm = 0x448 movq %rdi, %rbx leaq 0x40(%rsp), %r14 movl $0x400, %edx # imm = 0x400 movq %r14, %rdi xorl %esi, %esi callq 0x11250 movzbl 0x34(%rbx), %eax testw %ax, %ax movl $0x505, %ecx # imm = 0x505 movl $0x5, %edx cmovnel %ecx, %edx movl %eax, %ecx xorl $0x15, %ecx movw %dx, 0x6(%r14) movw %cx, 0x4(%r14) movl $0x18, (%r14) movl 0x37fe1(%rip), %r14d # 0x51bb4 leaq 0x53cf6(%rip), %rcx # 0x6d8d0 testb $0x1, (%rcx,%r14) je 0x19c40 leaq 0x24862(%rip), %rcx # 0x3e44a leaq 0x21077(%rip), %r15 # 0x3ac66 testb %al, %al cmovneq %rcx, %r15 movl 0x2c(%rbx), %r12d leaq 0x18(%rbx), %rsi leaq 0x2(%rsp), %rdi xorl %edx, %edx callq 0x28e44 movq %rax, %r10 leaq 0x1f9c8(%rip), %r11 # 0x395db leaq 0x1f8fc(%rip), %rdx # 0x39516 movl $0x1, %edi movl %r14d, %esi movl $0x1d2, %ecx # imm = 0x1D2 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq %r12 pushq %r15 pushq %r11 callq 0x2efff addq $0x20, %rsp leaq 0x18(%rbx), %r14 movzbl 0x28(%rbx), %edi leaq 0x40(%rsp), %r15 movb %dil, 0x10(%r15) movb 0x29(%rbx), %al movb %al, 0x11(%r15) movl 0x2c(%rbx), %eax movl %eax, 0x14(%r15) movb 0x30(%rbx), %al movb %al, 0x13(%r15) callq 0x28d15 shrb $0x3, %al movzbl %al, %r8d leaq 0x37f8f(%rip), %rdi # 0x51c08 movq %r15, %rsi movl $0x2, %edx movq %r14, %rcx callq 0x1c9a3 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x19cd2 leaq 0x37f6d(%rip), %rdi # 0x51c08 leaq 0x40(%rsp), %rsi callq 0x1c6e7 movl %eax, %ecx xorl %eax, %eax cmpq $0x0, 0x38(%rbx) je 0x19cd2 movq 0x50ca9(%rip), %rdx # 0x6a960 leaq 0x50c9a(%rip), %rsi # 0x6a958 movq %rsi, (%rbx) movq %rdx, 0x8(%rbx) movq %rbx, 0x50c94(%rip) # 0x6a960 movq %rbx, (%rdx) movl %ecx, 0x10(%rbx) addq $0x448, %rsp # imm = 0x448 popq %rbx popq %r12 popq %r14 popq %r15 retq
/OLSR[P]OONF/src/base/os_linux/os_interface_linux.c
remove_address
static void _remove_address(struct os_interface *os_if, struct netaddr *prefixed_addr, bool peer) { struct os_interface_ip *ip; struct avl_tree *tree; #if defined(OONF_LOG_INFO) struct netaddr_str nbuf; #endif tree = peer ? &os_if->peers : &os_if->addresses; ip = avl_find_element(tree, prefixed_addr, ip, _node); if (!ip) { return; } OONF_INFO(LOG_OS_INTERFACE, "Remove address from %s%s: %s", os_if->name, peer ? " (peer)" : "", netaddr_to_string(&nbuf, prefixed_addr)); avl_remove(tree, &ip->_node); oonf_class_free(&_interface_ip_class, ip); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %edx, %ebp movq %rsi, %r12 movq %rdi, %r15 leaq 0x60(%rdi), %rbx leaq 0x88(%rdi), %rax testl %edx, %edx cmovneq %rax, %rbx movq %rbx, %rdi callq 0x2780e testq %rax, %rax je 0x1b347 movq %rax, %r14 movl 0x368f6(%rip), %r13d # 0x51bb4 leaq 0x5260b(%rip), %rax # 0x6d8d0 testb $0x2, (%rax,%r13) je 0x1b32d addq $0xc, %r15 leaq 0x1e736(%rip), %rax # 0x39a0d leaq 0x2316c(%rip), %rcx # 0x3e44a testb %bpl, %bpl cmovneq %rax, %rcx movq %rcx, %rbp leaq 0xa(%rsp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %r10 leaq 0x1e714(%rip), %r11 # 0x39a15 leaq 0x1e20e(%rip), %rdx # 0x39516 movl $0x2, %edi movl %r13d, %esi movl $0x467, %ecx # imm = 0x467 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq %rbp pushq %r15 pushq %r11 callq 0x2efff addq $0x20, %rsp movq %rbx, %rdi movq %r14, %rsi callq 0x27bcf leaq 0x36d29(%rip), %rdi # 0x52068 movq %r14, %rsi callq 0x11a5f addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/OLSR[P]OONF/src/base/os_linux/os_interface_linux.c
os_system_linux_is_minimal_kernel
bool os_system_linux_is_minimal_kernel(int v1, int v2, int v3) { struct utsname uts; char *next; int first = 0, second = 0, third = 0; memset(&uts, 0, sizeof(uts)); if (uname(&uts)) { OONF_WARN(LOG_OS_SYSTEM, "Error, could not read kernel version: %s (%d)\n", strerror(errno), errno); return false; } first = strtol(uts.release, &next, 10); /* check for linux 3.x */ if (first > v1) { return true; } else if (first < v1) { return false; } if (*next != '.') { goto kernel_parse_error; } second = strtol(next + 1, &next, 10); if (second > v2) { return true; } if (second < v2) { return false; } if (*next != '.') { goto kernel_parse_error; } third = strtol(next + 1, NULL, 10); return third >= v3; kernel_parse_error: OONF_WARN(LOG_OS_SYSTEM, "Error, cannot parse kernel version: %s\n", uts.release); return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x190, %rsp # imm = 0x190 movl %edx, %ebp movl %esi, %r15d movl %edi, %r12d leaq 0xa(%rsp), %rbx movl $0x186, %edx # imm = 0x186 movq %rbx, %rdi xorl %esi, %esi callq 0x11250 movq %rbx, %rdi callq 0x11200 testl %eax, %eax je 0x1bc02 movl 0x36683(%rip), %r14d # 0x52224 leaq 0x51d28(%rip), %rax # 0x6d8d0 testb $0x4, (%rax,%r14) je 0x1bc75 callq 0x110c0 movq %rax, %rbx movl (%rax), %edi callq 0x11560 movq %rax, %r10 movl (%rbx), %r11d subq $0x8, %rsp leaq 0x1e3e3(%rip), %r15 # 0x39fb6 leaq 0x1e3b8(%rip), %rdx # 0x39f92 xorl %ebx, %ebx movl $0x4, %edi movl %r14d, %esi movl $0xc0, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r11 pushq %r10 pushq %r15 callq 0x2efff addq $0x20, %rsp jmp 0x1bc77 leaq 0x8c(%rsp), %r14 movq %rsp, %rsi movq %r14, %rdi movl $0xa, %edx callq 0x11370 movb $0x1, %bl cmpl %r12d, %eax jg 0x1bc77 jl 0x1bc75 movq (%rsp), %rdi cmpb $0x2e, (%rdi) jne 0x1bc62 incq %rdi movq %rsp, %rsi movl $0xa, %edx callq 0x11370 cmpl %r15d, %eax jg 0x1bc77 jl 0x1bc75 movq (%rsp), %rdi cmpb $0x2e, (%rdi) jne 0x1bc62 incq %rdi xorl %esi, %esi movl $0xa, %edx callq 0x11370 cmpl %ebp, %eax setge %bl jmp 0x1bc77 movl 0x365bc(%rip), %esi # 0x52224 leaq 0x51c61(%rip), %rax # 0x6d8d0 testb $0x4, (%rax,%rsi) jne 0x1bc89 xorl %ebx, %ebx movl %ebx, %eax addq $0x190, %rsp # imm = 0x190 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x1e355(%rip), %r10 # 0x39fe5 leaq 0x1e2fb(%rip), %rdx # 0x39f92 xorl %ebx, %ebx movl $0x4, %edi movl $0xe0, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r14 pushq %r10 callq 0x2efff addq $0x10, %rsp jmp 0x1bc77
/OLSR[P]OONF/src/base/os_linux/os_system_linux.c
os_system_linux_netlink_add_mc
int os_system_linux_netlink_add_mc(struct os_system_netlink *nl, const uint32_t *groups, size_t groupcount) { size_t i; for (i = 0; i < groupcount; i++) { if (setsockopt(os_fd_get_fd(&nl->socket.fd), SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &groups[i], sizeof(groups[i]))) { OONF_WARN(nl->used_by->logging, "Could not join netlink '%s' mc group: %x", nl->name, groups[i]); return -1; } } return 0; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax xorl %ebx, %ebx testq %rdx, %rdx je 0x1c8ed movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %r14 movl 0x10(%r14), %edi movl $0x10e, %esi # imm = 0x10E movl $0x1, %edx movq %r15, %rcx movl $0x4, %r8d callq 0x11130 testl %eax, %eax jne 0x1c89a addq $0x4, %r15 decq %r12 jne 0x1c86f jmp 0x1c8ed movq 0x80(%r14), %rax movl 0x54(%rax), %esi leaq 0x51025(%rip), %rax # 0x6d8d0 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testb $0x4, (%rax,%rsi) je 0x1c8ed movl (%r15), %r10d subq $0x8, %rsp leaq 0x1d8a5(%rip), %r11 # 0x3a169 leaq 0x1d6c7(%rip), %rdx # 0x39f92 movl $0x4, %edi movl $0x193, %ecx # imm = 0x193 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq (%r14) pushq %r11 callq 0x2efff addq $0x20, %rsp movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/OLSR[P]OONF/src/base/os_linux/os_system_linux.c
os_routing_linux_query
int os_routing_linux_query(struct os_route *route) { uint8_t buffer[UIO_MAXIOV]; struct nlmsghdr *msg; struct rtgenmsg *rt_gen; int seq; OONF_ASSERT(route->cb_finished != NULL && route->cb_get != NULL, LOG_OS_ROUTING, "illegal route query"); memset(buffer, 0, sizeof(buffer)); /* get pointers for netlink message */ msg = (void *)&buffer[0]; rt_gen = NLMSG_DATA(msg); msg->nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP; /* set length of netlink message with rtmsg payload */ msg->nlmsg_len = NLMSG_LENGTH(sizeof(*rt_gen)); msg->nlmsg_type = RTM_GETROUTE; rt_gen->rtgen_family = route->p.family; seq = os_system_linux_netlink_send(&_rtnetlink_socket, msg); if (seq < 0) { return -1; } route->_internal.nl_seq = seq; route->_internal._node.key = &route->_internal.nl_seq; avl_insert(&_rtnetlink_feedback, &route->_internal._node); return 0; }
pushq %rbp pushq %r14 pushq %rbx subq $0x410, %rsp # imm = 0x410 movq %rdi, %rbx cmpq $0x0, 0xa0(%rdi) je 0x1d21c cmpq $0x0, 0xa8(%rbx) jne 0x1d22f movl 0x351aa(%rip), %esi # 0x523cc leaq 0x506a7(%rip), %rax # 0x6d8d0 testb $0x8, (%rax,%rsi) jne 0x1d2a4 leaq 0x10(%rsp), %r14 xorl %ebp, %ebp movl $0x400, %edx # imm = 0x400 movq %r14, %rdi xorl %esi, %esi callq 0x11250 movabsq $0x301001a00000011, %rax # imm = 0x301001A00000011 movq %rax, (%r14) movb (%rbx), %al movb %al, 0x10(%r14) leaq 0x351c1(%rip), %rdi # 0x52420 movq %r14, %rsi callq 0x1c6e7 testl %eax, %eax js 0x1d291 leaq 0x60(%rbx), %rsi leaq 0x98(%rbx), %rcx movl %eax, 0x98(%rbx) movq %rcx, 0x88(%rbx) leaq 0x4d72e(%rip), %rdi # 0x6a9b8 callq 0x279af jmp 0x1d296 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF movl %ebp, %eax addq $0x410, %rsp # imm = 0x410 popq %rbx popq %r14 popq %rbp retq leaq 0x1d376(%rip), %rax # 0x3a621 movq %rax, (%rsp) leaq 0x1d310(%rip), %rdx # 0x3a5c6 movl $0x8, %edi movl $0x11d, %ecx # imm = 0x11D xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax callq 0x2efff callq 0x110b0
/OLSR[P]OONF/src/base/os_linux/os_routing_linux.c
init
static int _init(void) { if (os_system_linux_netlink_add(&_rtnetlink_socket, NETLINK_ROUTE)) { return -1; } if (os_system_linux_netlink_add_mc(&_rtnetlink_socket, _rtnetlink_mcast, ARRAYSIZE(_rtnetlink_mcast))) { os_system_linux_netlink_remove(&_rtnetlink_socket); return -1; } avl_init(&_rtnetlink_feedback, avl_comp_uint32, false); list_init_head(&_rtnetlink_listener); _is_kernel_3_11_0_or_better = os_system_linux_is_minimal_kernel(3, 11, 0); return 0; }
pushq %rbx leaq 0x3508d(%rip), %rdi # 0x52420 xorl %esi, %esi callq 0x1bcd7 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testl %eax, %eax jne 0x1d410 leaq 0x35076(%rip), %rdi # 0x52420 leaq 0x1d187(%rip), %rsi # 0x3a538 movl $0x2, %edx callq 0x1c853 testl %eax, %eax je 0x1d3cd leaq 0x3505a(%rip), %rdi # 0x52420 callq 0x1c6a6 jmp 0x1d410 leaq 0x4d5e4(%rip), %rdi # 0x6a9b8 leaq 0xa3a1(%rip), %rsi # 0x2777c xorl %ebx, %ebx xorl %edx, %edx callq 0x277f0 leaq 0x4d5f5(%rip), %rax # 0x6a9e0 movq %rax, 0x4d5f6(%rip) # 0x6a9e8 movq %rax, 0x4d5e7(%rip) # 0x6a9e0 movl $0x3, %edi movl $0xb, %esi xorl %edx, %edx callq 0x1bb63 movb %al, 0x4d5a0(%rip) # 0x6a9b0 movl %ebx, %eax popq %rbx retq
/OLSR[P]OONF/src/base/os_linux/os_routing_linux.c
cb_rtnetlink_timeout
static void _cb_rtnetlink_timeout(void) { struct os_route *route, *rt_it; OONF_WARN(LOG_OS_ROUTING, "Netlink timeout for routing"); avl_for_each_element_safe(&_rtnetlink_feedback, route, _internal._node, rt_it) { _routing_finished(route, -1); } }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movl 0x348a1(%rip), %esi # 0x523cc leaq 0x4fd9e(%rip), %rax # 0x6d8d0 testb $0x4, (%rax,%rsi) je 0x1db61 leaq 0x1cbf4(%rip), %rax # 0x3a733 movq %rax, (%rsp) leaq 0x1ca7c(%rip), %rdx # 0x3a5c6 movl $0x4, %edi movl $0x2b3, %ecx # imm = 0x2B3 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax callq 0x2efff movq 0x4ce50(%rip), %r14 # 0x6a9b8 movq 0x8(%r14), %rax cmpq 0x4ce4d(%rip), %rax # 0x6a9c0 je 0x1dbb1 leaq 0x4ce3c(%rip), %rbx # 0x6a9b8 movq (%r14), %r15 movq %rbx, %rdi movq %r14, %rsi callq 0x27bcf movq 0x40(%r14), %rax testq %rax, %rax je 0x1dba1 addq $-0x60, %r14 movq %r14, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq *%rax movq 0x8(%r15), %rax movq %r15, %r14 cmpq 0x4ce11(%rip), %rax # 0x6a9c0 jne 0x1db7c addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
/OLSR[P]OONF/src/base/os_linux/os_routing_linux.c
cb_compact_save
static int _cb_compact_save(const char *param, struct cfg_db *src_db, struct autobuf *log) { int fd = 0; ssize_t bytes; size_t total; struct autobuf abuf; if (abuf_init(&abuf)) { cfg_append_printable_line(log, "Out of memory error while allocating io buffer"); return -1; } if (_compact_serialize(&abuf, src_db, log)) { abuf_free(&abuf); return -1; } fd = open(param, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); if (fd == -1) { cfg_append_printable_line( log, "Cannot open file '%s' for writing configuration: %s (%d)", param, strerror(errno), errno); return -1; } total = 0; while (total < abuf_getlen(&abuf)) { bytes = write(fd, abuf_getptr(&abuf) + total, abuf_getlen(&abuf) - total); if (bytes <= 0 && errno != EINTR) { cfg_append_printable_line(log, "Error while writing to file '%s': %s (%d)", param, strerror(errno), errno); close(fd); return -1; } if (bytes > 0) { total += (size_t)bytes; } } close(fd); abuf_free(&abuf); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 leaq 0x38(%rsp), %rdi callq 0x271cc testl %eax, %eax je 0x1e264 leaq 0x1c612(%rip), %rsi # 0x3a858 movq %rbx, %rdi xorl %eax, %eax callq 0x2dfe9 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, 0x10(%rsp) movq %rbx, 0x8(%rsp) movq (%r15), %rcx movq 0x8(%rcx), %rax cmpq 0x8(%r15), %rax je 0x1e36e leaq 0x38(%rsp), %r13 leaq 0x1c78d(%rip), %rbp # 0x3aa18 movq %r15, 0x18(%rsp) movq %rcx, %rdx movq (%rcx), %rax movq %rax, 0x20(%rsp) movq 0x48(%rcx), %r12 movq 0x8(%r12), %rax cmpq 0x50(%rcx), %rax movq %rcx, 0x28(%rsp) je 0x1e356 movq (%r12), %rax movq %rax, 0x30(%rsp) movq 0x38(%r12), %rcx movq 0x38(%rdx), %rdx movq %r13, %rdi testq %rcx, %rcx je 0x1e2dd leaq 0x1c735(%rip), %rsi # 0x3aa09 xorl %eax, %eax callq 0x272d1 jmp 0x1e2eb leaq 0x1c72e(%rip), %rsi # 0x3aa12 xorl %eax, %eax callq 0x272d1 movq 0x48(%r12), %r14 movq 0x8(%r14), %rax cmpq 0x50(%r12), %rax je 0x1e33d movq %r14, %r15 movq (%r14), %r14 movq 0x40(%r15), %rbx testq %rbx, %rbx jne 0x1e32e jmp 0x1e2f0 movq 0x38(%r15), %rdx movq %r13, %rdi movq %rbp, %rsi movq %rbx, %rcx xorl %eax, %eax callq 0x272d1 movq %rbx, %rdi callq 0x111a0 addq %rax, %rbx incq %rbx movq 0x48(%r15), %rax addq 0x40(%r15), %rax cmpq %rbx, %rax ja 0x1e30c jmp 0x1e2f0 movq 0x30(%rsp), %r12 movq 0x8(%r12), %rax movq 0x28(%rsp), %rdx cmpq 0x50(%rdx), %rax jne 0x1e2b3 movq 0x20(%rsp), %rcx movq 0x8(%rcx), %rax movq 0x18(%rsp), %r15 cmpq 0x8(%r15), %rax jne 0x1e290 movq 0x10(%rsp), %r13 movq %r13, %rdi movl $0x241, %esi # imm = 0x241 movl $0x180, %edx # imm = 0x180 xorl %eax, %eax callq 0x114b0 cmpl $-0x1, %eax je 0x1e3f0 movl %eax, %ebp movq 0x40(%rsp), %rdx testq %rdx, %rdx je 0x1e3d8 xorl %r15d, %r15d xorl %r12d, %r12d movq 0x48(%rsp), %rsi addq %r12, %rsi subq %r12, %rdx movl %ebp, %edi callq 0x11160 movq %rax, %rbx testq %rax, %rax jg 0x1e3c4 callq 0x110c0 movl (%rax), %edi cmpl $0x4, %edi jne 0x1e420 testq %rbx, %rbx cmovleq %r15, %rbx addq %rbx, %r12 movq 0x40(%rsp), %rdx cmpq %rdx, %r12 jb 0x1e39e movl %ebp, %edi callq 0x11290 leaq 0x38(%rsp), %rdi callq 0x27214 xorl %eax, %eax jmp 0x1e255 callq 0x110c0 movq %rax, %rbx movl (%rax), %edi callq 0x11560 movl (%rbx), %r8d leaq 0x1c59d(%rip), %rsi # 0x3a9a6 movq 0x8(%rsp), %rdi movq %r13, %rdx movq %rax, %rcx xorl %eax, %eax callq 0x2dfe9 jmp 0x1e250 movq %rax, %r14 callq 0x11560 movl (%r14), %r8d leaq 0x1c5ad(%rip), %rsi # 0x3a9df movq 0x8(%rsp), %rdi movq %r13, %rdx movq %rax, %rcx xorl %eax, %eax callq 0x2dfe9 movl %ebp, %edi callq 0x11290 jmp 0x1e250
/OLSR[P]OONF/src/generic/cfg_compact/cfg_compact.c
cb_create_text_default
static int _cb_create_text_default(struct oonf_viewer_template *template) { struct oonf_layer2_net *net; avl_for_each_element(oonf_layer2_get_net_tree(), net, _node) { _initialize_if_values(net); _initialize_neigh_data_values(template, net->neighdata); _initialize_neigh_origin_values(net->neighdata); /* generate template output */ oonf_viewer_output_print_line(template); } return 0; }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x134d9 movq (%rax), %r15 movq 0x8(%r15), %r14 callq 0x134d9 cmpq 0x8(%rax), %r14 je 0x1ea8e leaq -0x7a0(%r15), %rdi callq 0x1eb70 leaq -0x410(%r15), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x1ed0c movq %r14, %rdi callq 0x1ed70 movq %rbx, %rdi callq 0x17b21 movq (%r15), %r15 jmp 0x1ea4c xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq
/OLSR[P]OONF/src/generic/layer2info/layer2info.c
cb_create_text_dst
static int _cb_create_text_dst(struct oonf_viewer_template *template) { struct oonf_layer2_destination *l2dst; struct oonf_layer2_neigh *neigh; struct oonf_layer2_net *net; avl_for_each_element(oonf_layer2_get_net_tree(), net, _node) { _initialize_if_values(net); avl_for_each_element(&net->neighbors, neigh, _node) { _initialize_neigh_values(neigh); avl_for_each_element(&neigh->destinations, l2dst, _node) { _initialize_destination_values(l2dst); /* generate template output */ oonf_viewer_output_print_line(template); } } } return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x134d9 movq (%rax), %r12 movq 0x8(%r12), %r14 callq 0x134d9 cmpq 0x8(%rax), %r14 je 0x1eb5f leaq 0x4dd99(%rip), %r14 # 0x6c860 leaq 0x4ddd2(%rip), %r15 # 0x6c8a0 leaq -0x7a0(%r12), %rdi callq 0x1eb70 movq -0x710(%r12), %r13 movq 0x8(%r13), %rax cmpq -0x708(%r12), %rax je 0x1eb47 leaq -0x4c0(%r13), %rdi callq 0x1ec65 movq -0x468(%r13), %rbp movq 0x8(%rbp), %rax cmpq -0x460(%r13), %rax je 0x1eb41 leaq -0x28(%rbp), %rsi movq %r14, %rdi xorl %edx, %edx callq 0x28e44 movq -0x8(%rbp), %rax movq (%rax), %rsi movl $0x10, %edx movq %r15, %rdi callq 0x29d98 movq %rbx, %rdi callq 0x17b21 movq (%rbp), %rbp jmp 0x1eb04 movq (%r13), %r13 jmp 0x1eae3 movq (%r12), %r12 movq 0x8(%r12), %r13 callq 0x134d9 cmpq 0x8(%rax), %r13 jne 0x1eace xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/OLSR[P]OONF/src/generic/layer2info/layer2info.c
initialize_neigh_values
static void _initialize_neigh_values(struct oonf_layer2_neigh *neigh) { netaddr_to_string(&_value_neigh_addr, &neigh->key.addr); oonf_layer2_neigh_key_to_string(&_value_neigh_key, &neigh->key, false); snprintf(_value_neigh_key_length, sizeof(_value_neigh_key_length), "%u", neigh->key.link_id_length); netaddr_to_string(&_value_neigh_nexthop_v4, oonf_layer2_neigh_get_nexthop(neigh, AF_INET)); netaddr_to_string(&_value_neigh_nexthop_v6, oonf_layer2_neigh_get_nexthop(neigh, AF_INET6)); if (oonf_layer2_neigh_get_lastseen(neigh)) { oonf_clock_toIntervalString(&_value_neigh_lastseen, -oonf_clock_get_relative(oonf_layer2_neigh_get_lastseen(neigh))); } else { _value_neigh_lastseen.buf[0] = 0; } }
pushq %rbx movq %rdi, %rbx leaq 0x4da10(%rip), %rdi # 0x6c680 movq %rbx, %rsi xorl %edx, %edx callq 0x28e44 leaq 0x4da3d(%rip), %rdi # 0x6c6be movq %rbx, %rsi xorl %edx, %edx callq 0x134e9 movzbl 0x12(%rbx), %ecx leaq 0x4da8b(%rip), %rdi # 0x6c721 leaq 0x228b6(%rip), %rdx # 0x41553 movl $0x6, %esi xorl %eax, %eax callq 0x111e0 leaq 0x34(%rbx), %rsi leaq 0x4da73(%rip), %rdi # 0x6c727 xorl %edx, %edx callq 0x28e44 leaq 0x46(%rbx), %rsi leaq 0x4da9f(%rip), %rdi # 0x6c765 xorl %edx, %edx callq 0x28e44 movq 0xa8(%rbx), %rbx testq %rbx, %rbx je 0x1ed03 callq 0x11f6b subq %rbx, %rax leaq 0x4dabb(%rip), %rdi # 0x6c7a3 leaq 0x1f75b(%rip), %rdx # 0x3e44a movl $0x3e8, %ecx # imm = 0x3E8 movq %rax, %rsi movl $0x1, %r8d popq %rbx jmp 0x283d5 movb $0x0, 0x4da99(%rip) # 0x6c7a3 popq %rbx retq
/OLSR[P]OONF/src/generic/layer2info/layer2info.c
cb_create_text_ifpeer
static int _cb_create_text_ifpeer(struct oonf_viewer_template *template) { struct os_interface *interf; struct os_interface_ip *ip; avl_for_each_element(os_interface_get_tree(), interf, _node) { _initialize_interface_key_values(template, interf); avl_for_each_element(&interf->peers, ip, _node) { _initialize_ifaddr_data_values(template, ip); /* generate template output */ oonf_viewer_output_print_line(template); } } return 0; }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x199b4 movq (%rax), %r15 movq 0x8(%r15), %r14 callq 0x199b4 cmpq 0x8(%rax), %r14 je 0x1f457 leaq -0xc8(%r15), %rdi callq 0x1f45f movq -0x40(%r15), %r14 movq 0x8(%r14), %rax cmpq -0x38(%r15), %rax je 0x1f452 movq %r14, %rdi callq 0x1f4bb movq %rbx, %rdi callq 0x17b21 movq (%r14), %r14 jmp 0x1f433 movq (%r15), %r15 jmp 0x1f414 xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq
/OLSR[P]OONF/src/generic/systeminfo/systeminfo.c
cb_neigh_value_tobin
static int _cb_neigh_value_tobin(struct cfg_schema_entry *entries __attribute__((unused)), size_t entry_count __attribute__((unused)), const char *value __attribute__((unused)), void *ptr) { struct l2_config_data *l2_data; const struct oonf_layer2_metadata *meta; l2_data = ptr; meta = oonf_layer2_neigh_metadata_get(l2_data->data_idx); if (oonf_layer2_data_parse_string(&l2_data->data, meta, l2_data->txt_value)) { return -1; } l2_data->data_type = meta->type; return 0; }
pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movl 0x28(%rcx), %edi callq 0x126d2 movq %rax, %r14 leaq 0x30(%rbx), %rdi leaq 0x48(%rbx), %rdx movq %rax, %rsi callq 0x12228 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x1fcd6 movl 0x10(%r14), %eax movl %eax, 0x2c(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
/OLSR[P]OONF/src/generic/layer2_config/layer2_config.c
reset_if_data
static void _reset_if_data(struct oonf_layer2_net *l2net, struct l2_config_data *entry, struct oonf_layer2_origin *origin) { struct oonf_layer2_neighbor_address *l2_remote_ip; struct oonf_layer2_peer_address *l2_local_peer; struct oonf_layer2_destination *l2_neigh_dest; struct oonf_layer2_neigh *l2neigh; switch (entry->config_type) { case L2_NET: oonf_layer2_data_reset(&l2net->data[entry->data_idx]); break; case L2_NET_IP: l2_local_peer = oonf_layer2_net_get_local_ip(l2net, &entry->data.addr); if (l2_local_peer) { oonf_layer2_net_remove_ip(l2_local_peer, origin); } break; case L2_DEF: oonf_layer2_data_reset(&l2net->neighdata[entry->data_idx]); break; case L2_NEIGH: l2neigh = oonf_layer2_neigh_get_lid(l2net, &entry->key); if (l2neigh) { oonf_layer2_data_reset(&l2neigh->data[entry->data_idx]); } break; case L2_NEIGH_IP: l2neigh = oonf_layer2_neigh_get_lid(l2net, &entry->key); if (l2neigh) { l2_remote_ip = oonf_layer2_neigh_get_remote_ip(l2neigh, &entry->data.addr); if (l2_remote_ip) { oonf_layer2_neigh_remove_ip(l2_remote_ip, origin); } } break; case L2_DST: l2neigh = oonf_layer2_neigh_get_lid(l2net, &entry->key); if (l2neigh) { l2_neigh_dest = oonf_layer2_destination_get(l2neigh, &entry->data.addr); if (l2_neigh_dest) { oonf_layer2_destination_remove(l2_neigh_dest); } } break; default: break; } }
pushq %r14 pushq %rbx pushq %rax movl (%rsi), %eax cmpq $0x5, %rax ja 0x20267 movq %rdx, %r14 movq %rsi, %rbx leaq 0x1ac5d(%rip), %rcx # 0x3ada0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movslq 0x28(%rbx), %rax leaq (%rax,%rax,4), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x128(%rdi,%rax,8) jmp 0x20267 leaq 0x4(%rbx), %rsi addq $0x90, %rdi callq 0x2780e testq %rax, %rax je 0x20267 addq $0x30, %rbx addq $-0x440, %rax # imm = 0xFBC0 movq %rax, %rdi movq %rbx, %rsi callq 0x2780e testq %rax, %rax je 0x20267 addq $-0x60, %rax movq %rax, %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x12e91 movslq 0x28(%rbx), %rax leaq (%rax,%rax,4), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x3a8(%rdi,%rax,8) jmp 0x20267 leaq 0x4(%rbx), %rsi addq $0x90, %rdi callq 0x2780e testq %rax, %rax je 0x20267 movslq 0x28(%rbx), %rcx leaq (%rcx,%rcx,4), %rcx xorps %xmm0, %xmm0 movups %xmm0, -0x3f8(%rax,%rcx,8) jmp 0x20267 addq $0x30, %rbx addq $0xb8, %rdi movq %rbx, %rsi callq 0x2780e testq %rax, %rax je 0x20267 addq $-0x60, %rax movq %rax, %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x12b46 leaq 0x4(%rbx), %rsi addq $0x90, %rdi callq 0x2780e testq %rax, %rax je 0x20267 addq $0x30, %rbx addq $-0x468, %rax # imm = 0xFB98 movq %rax, %rdi movq %rbx, %rsi callq 0x2780e testq %rax, %rax je 0x20267 addq $-0x28, %rax movq %rax, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x12e3a addq $0x8, %rsp popq %rbx popq %r14 retq nop
/OLSR[P]OONF/src/generic/layer2_config/layer2_config.c
radio_write_session_update
static int _radio_write_session_update(struct dlep_extension *ext __attribute__((unused)), struct dlep_session *session, const struct oonf_layer2_neigh_key *neigh __attribute__((unused))) { struct _prefix_storage *storage, *storage_it; struct dlep_radio_session *radio_session; struct oonf_layer2_peer_address *peer_ip; struct oonf_layer2_net *l2net; struct os_interface *os_if; struct netaddr_str nbuf; /* first make sure defaults are set correctly */ l2net = oonf_layer2_net_get(session->l2_listener.name); /* announce newly added interface prefixes */ if (l2net) { avl_for_each_element(&l2net->local_peer_ips, peer_ip, _net_node) { if (avl_find(&session->_ext_ip.prefix_modification, &peer_ip->ip)) { /* prefix already known to session */ continue; } OONF_INFO(session->log_source, "New prefix '%s' for session update", netaddr_to_string(&nbuf, &peer_ip->ip)); if (dlep_writer_add_ip_tlv(&session->writer, &peer_ip->ip, true)) { OONF_WARN(session->log_source, "Cannot add TLV for '%s' to session update", netaddr_to_string(&nbuf, &peer_ip->ip)); return -1; } _add_prefix(&session->_ext_ip.prefix_modification, &peer_ip->ip); } } /* remove missing interface prefixes */ avl_for_each_element_safe(&session->_ext_ip.prefix_modification, storage, _node, storage_it) { if (l2net && avl_find(&l2net->local_peer_ips, &storage->prefix)) { /* prefix is still on interface */ continue; } OONF_INFO(session->log_source, "Removed prefix '%s' for session update", netaddr_to_string(&nbuf, &storage->prefix)); if (dlep_writer_add_ip_tlv(&session->writer, &storage->prefix, false)) { OONF_WARN(session->log_source, "Cannot add TLV for '%s' to session update", netaddr_to_string(&nbuf, &storage->prefix)); return -1; } avl_remove(&session->_ext_ip.prefix_modification, &storage->_node); oonf_class_free(&_prefix_class, storage); } /* also transmit IP interface addresses */ radio_session = dlep_radio_get_session(session); if (radio_session) { os_if = radio_session->interface->interf.udp._if_listener.data; _handle_if_ip(session, &session->_ext_ip.if_ip_v4, os_if->if_linklocal_v4, os_if->if_v4); _handle_if_ip(session, &session->_ext_ip.if_ip_v6, os_if->if_linklocal_v6, os_if->if_v6); } return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %rbx movq 0x138(%rsi), %r14 callq 0x134d9 movq %rax, %rdi movq %r14, %rsi callq 0x2780e leaq -0x7a0(%rax), %r15 testq %rax, %rax movq %rax, 0x10(%rsp) cmoveq %rax, %r15 je 0x2139e movq 0xb8(%r15), %r14 movq 0x8(%r14), %rax cmpq 0xc0(%r15), %rax je 0x2139e leaq 0x320(%rbx), %r12 leaq 0xc8(%rbx), %rax movq %rax, (%rsp) leaq -0x60(%r14), %rbp movq %r12, %rdi movq %rbp, %rsi callq 0x2780e testq %rax, %rax jne 0x2138a movl 0x130(%rbx), %r13d leaq 0x4c5b3(%rip), %rax # 0x6d8d0 testb $0x2, (%rax,%r13) je 0x21366 leaq 0x1a(%rsp), %rdi movq %rbp, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %r10 movl $0x2, %edi movl %r13d, %esi leaq 0x1ab8d(%rip), %rdx # 0x3bed2 movl $0xf8, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 leaq 0x1ab99(%rip), %r10 # 0x3bef4 pushq %r10 callq 0x2efff addq $0x10, %rsp movq (%rsp), %rdi movq %rbp, %rsi movl $0x1, %edx callq 0x25b18 testl %eax, %eax jne 0x2152a movq %r12, %rdi movq %rbp, %rsi callq 0x21b50 movq (%r14), %r14 movq 0x8(%r14), %rax cmpq 0xc0(%r15), %rax jne 0x212fb movq 0x320(%rbx), %rbp movq 0x8(%rbp), %rax cmpq 0x328(%rbx), %rax je 0x21491 leaq 0x320(%rbx), %rax movq %rax, 0x8(%rsp) addq $0xb8, %r15 leaq 0xc8(%rbx), %rax movq %rax, (%rsp) leaq -0x18(%rbp), %r12 movq (%rbp), %r14 cmpq $0x0, 0x10(%rsp) je 0x213f8 movq %r15, %rdi movq %r12, %rsi callq 0x2780e testq %rax, %rax jne 0x2147d movl 0x130(%rbx), %r13d leaq 0x4c4ca(%rip), %rax # 0x6d8d0 testb $0x2, (%rax,%r13) je 0x2144f leaq 0x1a(%rsp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %r10 movl $0x2, %edi movl %r13d, %esi leaq 0x1aaa4(%rip), %rdx # 0x3bed2 movl $0x10c, %ecx # imm = 0x10C xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 leaq 0x1aafd(%rip), %r10 # 0x3bf41 pushq %r10 callq 0x2efff addq $0x10, %rsp movq (%rsp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x25b18 testl %eax, %eax jne 0x214df movq 0x8(%rsp), %rdi movq %rbp, %rsi callq 0x27bcf leaq 0x35093(%rip), %rdi # 0x56508 movq %r12, %rsi callq 0x11a5f movq 0x8(%r14), %rax movq %r14, %rbp cmpq 0x328(%rbx), %rax jne 0x213d4 xorl %r14d, %r14d cmpb $0x1, 0x28(%rbx) jne 0x21584 movq 0x370(%rbx), %rax movq 0xa68(%rax), %r15 leaq 0x348(%rbx), %rsi movq 0x40(%r15), %rcx movq 0x50(%r15), %rdx movq %rbx, %rdi callq 0x21ba7 leaq 0x35a(%rbx), %rsi movq 0x48(%r15), %rcx movq 0x58(%r15), %rdx movq %rbx, %rdi callq 0x21ba7 jmp 0x21584 movl 0x130(%rbx), %ebx movl $0xffffffff, %r14d # imm = 0xFFFFFFFF leaq 0x4c3de(%rip), %rax # 0x6d8d0 testb $0x4, (%rax,%rbx) je 0x21584 leaq 0x1a(%rsp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %r10 leaq 0x1aa02(%rip), %r11 # 0x3bf17 leaq 0x1a9b6(%rip), %rdx # 0x3bed2 movl $0x4, %edi movl %ebx, %esi movl $0x110, %ecx # imm = 0x110 jmp 0x2156f movl 0x130(%rbx), %ebx movl $0xffffffff, %r14d # imm = 0xFFFFFFFF leaq 0x4c393(%rip), %rax # 0x6d8d0 testb $0x4, (%rax,%rbx) je 0x21584 leaq 0x1a(%rsp), %rdi movq %rbp, %rsi xorl %edx, %edx callq 0x28e44 movq %rax, %r10 leaq 0x1a9bb(%rip), %r11 # 0x3bf17 leaq 0x1a96f(%rip), %rdx # 0x3bed2 movl $0x4, %edi movl %ebx, %esi movl $0xfc, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq %r11 callq 0x2efff addq $0x10, %rsp movl %r14d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/OLSR[P]OONF/src/generic/dlep/ext_base_ip/ip.c
router_process_destination_update
static enum dlep_parser_error _router_process_destination_update(struct dlep_extension *ext __attribute((unused)), struct dlep_session *session) { struct oonf_layer2_neigh *l2neigh; struct netaddr ip; struct dlep_parser_value *value; bool add_ip; l2neigh = dlep_extension_get_l2_neighbor(session); if (!l2neigh) { return 0; } /* ipv4 address */ value = dlep_session_get_tlv_value(session, DLEP_IPV4_ADDRESS_TLV); while (value) { if (dlep_reader_ipv4_tlv(&ip, &add_ip, session, value)) { return -1; } _process_destination_ip_tlv(session->l2_origin, l2neigh, &ip, add_ip); value = dlep_session_get_next_tlv_value(session, value); } /* ipv6 address */ value = dlep_session_get_tlv_value(session, DLEP_IPV6_ADDRESS_TLV); while (value) { if (dlep_reader_ipv6_tlv(&ip, &add_ip, session, value)) { return -1; } _process_destination_ip_tlv(session->l2_origin, l2neigh, &ip, add_ip); value = dlep_session_get_next_tlv_value(session, value); } /* ipv4 subnet */ value = dlep_session_get_tlv_value(session, DLEP_IPV4_SUBNET_TLV); while (value) { if (dlep_reader_ipv4_subnet_tlv(&ip, &add_ip, session, value)) { return -1; } _process_destination_ip_tlv(session->l2_origin, l2neigh, &ip, add_ip); value = dlep_session_get_next_tlv_value(session, value); } /* ipv6 subnet */ value = dlep_session_get_tlv_value(session, DLEP_IPV6_SUBNET_TLV); while (value) { if (dlep_reader_ipv6_subnet_tlv(&ip, &add_ip, session, value)) { return -1; } _process_destination_ip_tlv(session->l2_origin, l2neigh, &ip, add_ip); value = dlep_session_get_next_tlv_value(session, value); } return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rsi, %rdi callq 0x226fc xorl %ebp, %ebp testq %rax, %rax je 0x2176a movq %rax, %r14 movq %rbx, %rdi movl $0x8, %esi callq 0x24eaf testq %rax, %rax je 0x21627 movq %rax, %r15 leaq 0x6(%rsp), %r12 leaq 0x5(%rsp), %r13 movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x251bf testl %eax, %eax jne 0x21765 movq 0x108(%rbx), %rdi movzbl 0x5(%rsp), %ecx movq %r14, %rsi movq %r12, %rdx callq 0x21c4a movslq (%r15), %r15 cmpq $-0x1, %r15 je 0x2161f shlq $0x3, %r15 addq 0x58(%rbx), %r15 jmp 0x21622 xorl %r15d, %r15d testq %r15, %r15 jne 0x215dc movq %rbx, %rdi movl $0x9, %esi callq 0x24eaf testq %rax, %rax je 0x21691 movq %rax, %r15 leaq 0x6(%rsp), %r12 leaq 0x5(%rsp), %r13 movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x25229 testl %eax, %eax jne 0x21765 movq 0x108(%rbx), %rdi movzbl 0x5(%rsp), %ecx movq %r14, %rsi movq %r12, %rdx callq 0x21c4a movslq (%r15), %r15 cmpq $-0x1, %r15 je 0x21689 shlq $0x3, %r15 addq 0x58(%rbx), %r15 jmp 0x2168c xorl %r15d, %r15d testq %r15, %r15 jne 0x21646 movq %rbx, %rdi movl $0xa, %esi callq 0x24eaf testq %rax, %rax je 0x216fb movq %rax, %r15 leaq 0x6(%rsp), %r12 leaq 0x5(%rsp), %r13 movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x25293 testl %eax, %eax jne 0x21765 movq 0x108(%rbx), %rdi movzbl 0x5(%rsp), %ecx movq %r14, %rsi movq %r12, %rdx callq 0x21c4a movslq (%r15), %r15 cmpq $-0x1, %r15 je 0x216f3 shlq $0x3, %r15 addq 0x58(%rbx), %r15 jmp 0x216f6 xorl %r15d, %r15d testq %r15, %r15 jne 0x216b0 movq %rbx, %rdi movl $0xb, %esi callq 0x24eaf testq %rax, %rax je 0x2176a movq %rax, %r15 leaq 0x6(%rsp), %r12 leaq 0x5(%rsp), %r13 movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x252fc testl %eax, %eax jne 0x21765 movq 0x108(%rbx), %rdi movzbl 0x5(%rsp), %ecx movq %r14, %rsi movq %r12, %rdx callq 0x21c4a movslq (%r15), %r15 cmpq $-0x1, %r15 je 0x21759 shlq $0x3, %r15 addq 0x58(%rbx), %r15 jmp 0x2175c xorl %r15d, %r15d testq %r15, %r15 jne 0x2171a xorl %ebp, %ebp jmp 0x2176a movl $0xffffffff, %ebp # imm = 0xFFFFFFFF movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/OLSR[P]OONF/src/generic/dlep/ext_base_ip/ip.c
add_prefix
static void _add_prefix(struct avl_tree *tree, struct netaddr *addr) { struct _prefix_storage *storage; storage = avl_find_element(tree, addr, storage, _node); if (storage) { return; } storage = oonf_class_malloc(&_prefix_class); if (!storage) { return; } /* copy key and put into tree */ memcpy(&storage->prefix, addr, sizeof(*addr)); storage->_node.key = &storage->prefix; avl_insert(tree, &storage->_node); }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x2780e testq %rax, %rax je 0x21b6c addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x34995(%rip), %rdi # 0x56508 callq 0x11933 testq %rax, %rax je 0x21b64 movzwl 0x10(%r14), %ecx movw %cx, 0x10(%rax) movups (%r14), %xmm0 movups %xmm0, (%rax) movq %rax, %rsi addq $0x18, %rsi movq %rax, 0x40(%rax) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x279af
/OLSR[P]OONF/src/generic/dlep/ext_base_ip/ip.c
dlep_extension_router_process_destination
enum dlep_parser_error dlep_extension_router_process_destination(struct dlep_extension *ext, struct dlep_session *session) { struct oonf_layer2_neigh *l2neigh; enum dlep_parser_error result; if (session->restrict_signal != DLEP_ALL_SIGNALS) { /* ignore unless we have an established session */ return DLEP_NEW_PARSER_OKAY; } l2neigh = dlep_extension_get_l2_neighbor(session); if (!l2neigh) { return DLEP_NEW_PARSER_OKAY; } result = dlep_reader_map_l2neigh_data(l2neigh->data, session, ext); if (result) { OONF_INFO(session->log_source, "tlv mapping for extension %d failed: %d", ext->id, result); return DLEP_NEW_PARSER_UNSUPPORTED_TLV; } return DLEP_NEW_PARSER_OKAY; }
pushq %r15 pushq %r14 pushq %rbx xorl %ebx, %ebx cmpl $-0x1, 0x20(%rsi) je 0x22773 movl %ebx, %eax popq %rbx popq %r14 popq %r15 retq movq %rsi, %r15 movq %rdi, %r14 movq %rsi, %rdi callq 0x226fc testq %rax, %rax je 0x2276b addq $0xb0, %rax movq %rax, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x256cb testl %eax, %eax je 0x2276b movl %eax, %r10d movl 0x130(%r15), %esi leaq 0x4b121(%rip), %rax # 0x6d8d0 movl $0xfffffffc, %ebx # imm = 0xFFFFFFFC testb $0x2, (%rax,%rsi) je 0x2276b movl (%r14), %r11d subq $0x8, %rsp leaq 0x19ba1(%rip), %r14 # 0x3c369 leaq 0x19b21(%rip), %rdx # 0x3c2f0 movl $0x2, %edi movl $0x103, %ecx # imm = 0x103 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq %r11 pushq %r14 callq 0x2efff addq $0x20, %rsp jmp 0x2276b
/OLSR[P]OONF/src/generic/dlep/dlep_extension.c
dlep_extension_radio_write_destination
int dlep_extension_radio_write_destination( struct dlep_extension *ext, struct dlep_session *session, const struct oonf_layer2_neigh_key *neigh) { struct oonf_layer2_neigh *l2neigh; union oonf_layer2_neigh_key_str nbuf; int result; l2neigh = dlep_session_get_local_l2_neighbor(session, neigh); if (!l2neigh) { OONF_WARN(session->log_source, "Could not find l2neigh " "for neighbor %s", oonf_layer2_neigh_key_to_string(&nbuf, neigh, true)); return -1; } result = dlep_writer_map_l2neigh_data(&session->writer, ext, l2neigh->data, l2neigh->network->neighdata); if (result) { OONF_WARN(session->log_source, "tlv mapping for extension %d and neighbor %s failed: %d", ext->id, oonf_layer2_neigh_key_to_string(&nbuf, neigh, true), result); return result; } return 0; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movq %rsi, %rdi movq %rdx, %rsi callq 0x2490a testq %rax, %rax je 0x22cc2 leaq 0xc8(%r12), %rdi movq %rax, %rdx addq $0xb0, %rdx movl $0x390, %ecx # imm = 0x390 addq 0x28(%rax), %rcx movq %r15, %rsi callq 0x25df0 testl %eax, %eax je 0x22d24 movl %eax, %ebx movl 0x130(%r12), %r12d leaq 0x4ac66(%rip), %rax # 0x6d8d0 testb $0x4, (%rax,%r12) je 0x22d26 movl (%r15), %r15d leaq 0x5(%rsp), %rdi movq %r14, %rsi movl $0x1, %edx callq 0x134e9 movq %rax, %r10 leaq 0x197b9(%rip), %r11 # 0x3c44d leaq 0x19655(%rip), %rdx # 0x3c2f0 movl $0x4, %edi movl %r12d, %esi movl $0x191, %ecx # imm = 0x191 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %rbx pushq %r10 pushq %r15 pushq %r11 callq 0x2efff addq $0x20, %rsp jmp 0x22d26 movl 0x130(%r12), %r15d leaq 0x4abff(%rip), %rax # 0x6d8d0 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testb $0x4, (%rax,%r15) je 0x22d26 leaq 0x5(%rsp), %rdi movq %r14, %rsi movl $0x1, %edx callq 0x134e9 movq %rax, %r10 leaq 0x1972d(%rip), %r11 # 0x3c426 leaq 0x195f0(%rip), %rdx # 0x3c2f0 movl $0x4, %edi movl %r15d, %esi movl $0x189, %ecx # imm = 0x189 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq %r11 callq 0x2efff addq $0x10, %rsp jmp 0x22d26 xorl %ebx, %ebx movl %ebx, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/OLSR[P]OONF/src/generic/dlep/dlep_extension.c
dlep_session_add_local_neighbor
struct dlep_local_neighbor * dlep_session_add_local_neighbor(struct dlep_session *session, const struct oonf_layer2_neigh_key *key) { struct dlep_local_neighbor *local; if ((local = dlep_session_get_local_neighbor(session, key))) { return local; } if (key->link_id_length != 0 && key->link_id_length != session->cfg.lid_length) { /* LIDs not allowed */ return NULL; } local = oonf_class_malloc(&_local_neighbor_class); if (!local) { return NULL; } /* hook into tree */ memcpy(&local->key, key, sizeof(*key)); local->_node.key = &local->key; avl_insert(&session->local_neighbor_tree, &local->_node); /* initialize timer */ local->_ack_timeout.class = &_destination_ack_class; /* initialize backpointer */ local->session = session; avl_init(&local->_ip_prefix_modification, avl_comp_netaddr, false); return local; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r12 movq %rdi, %rbx leaq 0xe0(%rdi), %r15 movq %r15, %rdi callq 0x2780e movq %rax, %r14 addq $-0xe0, %rax testq %r14, %r14 cmovneq %rax, %r14 jne 0x248ce movzbl 0x12(%r12), %eax testl %eax, %eax je 0x24858 cmpl %eax, 0x1c(%rbx) jne 0x248cb leaq 0x337f1(%rip), %rdi # 0x58050 callq 0x11933 testq %rax, %rax je 0x248cb movq %rax, %r14 movl 0x1f(%r12), %eax movl %eax, 0x1f(%r14) movups (%r12), %xmm0 movups 0x10(%r12), %xmm1 movups %xmm1, 0x10(%r14) movups %xmm0, (%r14) leaq 0xe0(%r14), %rsi movq %r14, 0x108(%r14) movq %r15, %rdi callq 0x279af leaq 0x3383a(%rip), %rax # 0x580e0 movq %rax, 0x90(%r14) movq %rbx, 0x50(%r14) movq %r14, %rdi addq $0xb8, %rdi leaq 0x2f15(%rip), %rsi # 0x277d7 xorl %edx, %edx callq 0x277f0 jmp 0x248ce xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/OLSR[P]OONF/src/generic/dlep/dlep_session.c
dlep_session_get_local_l2_neighbor
struct oonf_layer2_neigh * dlep_session_get_local_l2_neighbor(struct dlep_session *session, const struct oonf_layer2_neigh_key *key) { struct dlep_local_neighbor *dlep_neigh; struct oonf_layer2_neigh *l2neigh; struct oonf_layer2_net *l2net; #ifdef OONF_LOG_INFO union oonf_layer2_neigh_key_str nbuf1, nbuf2; #endif dlep_neigh = dlep_session_get_local_neighbor(session, key); if (!dlep_neigh) { OONF_INFO(session->log_source, "Could not find local neighbor for %s", oonf_layer2_neigh_key_to_string(&nbuf1, key, true)); return NULL; } l2net = oonf_layer2_net_get(session->l2_listener.name); if (!l2net) { OONF_DEBUG(session->log_source, "Could not find l2net %s for new neighbor", session->l2_listener.name); return NULL; } l2neigh = oonf_layer2_neigh_get_lid(l2net, &dlep_neigh->neigh_key); if (!l2neigh) { OONF_INFO(session->log_source, "Could not find l2neigh for neighbor %s (%s)", oonf_layer2_neigh_key_to_string(&nbuf1, key, true), oonf_layer2_neigh_key_to_string(&nbuf2, &dlep_neigh->neigh_key, true)); return NULL; } return l2neigh; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rsi, %r14 movq %rdi, %r15 addq $0xe0, %rdi callq 0x2780e movq %rax, %r12 addq $-0xe0, %rax testq %r12, %r12 cmovneq %rax, %r12 je 0x24a09 movq 0x138(%r15), %rbx callq 0x134d9 movq %rax, %rdi movq %rbx, %rsi callq 0x2780e testq %rax, %rax je 0x24a5e addq $0x2a, %r12 addq $-0x710, %rax # imm = 0xF8F0 movq %rax, %rdi movq %r12, %rsi callq 0x2780e leaq -0x4c0(%rax), %rbx testq %rax, %rax cmoveq %rax, %rbx jne 0x24aaa movl 0x130(%r15), %r15d leaq 0x48f39(%rip), %rax # 0x6d8d0 testb $0x2, (%rax,%r15) je 0x24a72 leaq 0x2(%rsp), %rdi movq %r14, %rsi movl $0x1, %edx callq 0x134e9 movq %rax, %r14 leaq 0x65(%rsp), %rdi movq %r12, %rsi movl $0x1, %edx callq 0x134e9 movq %rax, %r10 subq $0x8, %rsp leaq 0x17ec2(%rip), %r11 # 0x3c899 leaq 0x17bd3(%rip), %rdx # 0x3c5b1 xorl %ebx, %ebx movl $0x2, %edi movl %r15d, %esi movl $0x213, %ecx # imm = 0x213 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq %r14 pushq %r11 callq 0x2efff addq $0x20, %rsp jmp 0x24aaa movl 0x130(%r15), %r15d leaq 0x48eb9(%rip), %rax # 0x6d8d0 testb $0x2, (%rax,%r15) je 0x24a72 leaq 0x2(%rsp), %rdi movq %r14, %rsi movl $0x1, %edx callq 0x134e9 movq %rax, %r10 leaq 0x17e11(%rip), %r11 # 0x3c84b leaq 0x17b70(%rip), %rdx # 0x3c5b1 xorl %ebx, %ebx movl $0x2, %edi movl %r15d, %esi movl $0x204, %ecx # imm = 0x204 xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %r10 pushq %r11 jmp 0x24aa1 movl 0x130(%r15), %esi leaq 0x48e64(%rip), %rax # 0x6d8d0 testb $0x1, (%rax,%rsi) jne 0x24a76 xorl %ebx, %ebx jmp 0x24aaa leaq 0x17df3(%rip), %r10 # 0x3c870 leaq 0x17b2d(%rip), %rdx # 0x3c5b1 xorl %ebx, %ebx movl $0x1, %edi movl $0x20a, %ecx # imm = 0x20A xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq 0x138(%r15) pushq %r10 callq 0x2efff addq $0x10, %rsp movq %rbx, %rax addq $0xc8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/OLSR[P]OONF/src/generic/dlep/dlep_session.c
dlep_reader_heartbeat_tlv
int dlep_reader_heartbeat_tlv(uint64_t *interval, struct dlep_session *session, struct dlep_parser_value *value) { uint32_t tmp; const uint8_t *ptr; if (!value) { value = dlep_session_get_tlv_value(session, DLEP_HEARTBEAT_INTERVAL_TLV); if (!value) { return -1; } } ptr = dlep_session_get_tlv_binary(session, value); memcpy(&tmp, ptr, sizeof(tmp)); *interval = ntohl(tmp); return 0; }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx testq %rdx, %rdx jne 0x24fdc movq %r14, %rdi movl $0x5, %esi callq 0x24eaf movq %rax, %rdx testq %rax, %rax je 0x24ff9 movq 0xa8(%r14), %rax movzwl 0x4(%rdx), %ecx movl (%rax,%rcx), %eax bswapl %eax movq %rax, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x24ff1
/OLSR[P]OONF/src/generic/dlep/dlep_reader.c
dlep_reader_ipv6_subnet_tlv
int dlep_reader_ipv6_subnet_tlv( struct netaddr *ipv6, bool *add, struct dlep_session *session, struct dlep_parser_value *value) { const uint8_t *ptr; if (!value) { value = dlep_session_get_tlv_value(session, DLEP_IPV6_SUBNET_TLV); if (!value) { return -1; } } ptr = dlep_session_get_tlv_binary(session, value); *add = (ptr[0] & DLEP_IP_ADD) == DLEP_IP_ADD; return netaddr_from_binary_prefix(ipv6, &ptr[1], 16, AF_INET6, ptr[17]); }
pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx testq %rcx, %rcx jne 0x25324 movq %r15, %rdi movl $0xb, %esi callq 0x24eaf movq %rax, %rcx testq %rax, %rax je 0x2535a movq 0xa8(%r15), %rax movzwl 0x4(%rcx), %ecx leaq (%rax,%rcx), %rsi incq %rsi movb -0x1(%rsi), %al andb $0x1, %al movb %al, (%r14) movzbl 0x10(%rsi), %r8d movl $0x10, %edx movq %rbx, %rdi movl $0xa, %ecx popq %rbx popq %r14 popq %r15 jmp 0x28944 movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbx popq %r14 popq %r15 retq
/OLSR[P]OONF/src/generic/dlep/dlep_reader.c
dlep_reader_ipv4_conpoint_tlv
int dlep_reader_ipv4_conpoint_tlv( struct netaddr *addr, uint16_t *port, bool *tls, struct dlep_session *session, struct dlep_parser_value *value) { uint16_t tmp; const uint8_t *ptr; if (!value) { value = dlep_session_get_tlv_value(session, DLEP_IPV4_CONPOINT_TLV); if (!value) { return -1; } } if (value->length != 5 && value->length != 7) { return -1; } ptr = dlep_session_get_tlv_binary(session, value); /* handle TLS flag */ *tls = (ptr[0] & DLEP_CONNECTION_TLS) == DLEP_CONNECTION_TLS; /* handle port */ if (value->length == 7) { memcpy(&tmp, &ptr[5], sizeof(tmp)); *port = ntohs(tmp); } else { *port = DLEP_PORT; } /* handle IP */ return netaddr_from_binary(addr, &ptr[1], 4, AF_INET); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r12 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx testq %r8, %r8 jne 0x25393 movq %r12, %rdi movl $0x2, %esi callq 0x24eaf movq %rax, %r8 testq %rax, %rax je 0x253f7 movzwl 0x6(%r8), %eax orl $0x2, %eax cmpl $0x7, %eax jne 0x253f7 movq 0xa8(%r12), %rax movzwl 0x4(%r8), %ecx leaq (%rax,%rcx), %rsi movb (%rax,%rcx), %al andb $0x1, %al movb %al, (%r15) movw $0x356, %ax # imm = 0x356 cmpw $0x7, 0x6(%r8) jne 0x253cd movzwl 0x5(%rsi), %eax rolw $0x8, %ax movw %ax, (%r14) incq %rsi movl $0x4, %edx movq %rbx, %rdi movl $0x2, %ecx movl $0xff, %r8d addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x28944 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/OLSR[P]OONF/src/generic/dlep/dlep_reader.c
dlep_reader_uint64
int dlep_reader_uint64(uint64_t *number, uint16_t tlv_id, struct dlep_session *session, struct dlep_parser_value *value) { uint64_t tmp; const uint8_t *ptr; if (!value) { value = dlep_session_get_tlv_value(session, tlv_id); if (!value) { return -1; } } ptr = dlep_session_get_tlv_binary(session, value); memcpy(&tmp, ptr, sizeof(tmp)); *number = be64toh(tmp); return 0; }
pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx testq %rcx, %rcx jne 0x254cd movzwl %si, %esi movq %r14, %rdi callq 0x24eaf movq %rax, %rcx testq %rax, %rax je 0x254ec movq 0xa8(%r14), %rax movzwl 0x4(%rcx), %ecx movq (%rax,%rcx), %rax bswapq %rax movq %rax, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x254e4
/OLSR[P]OONF/src/generic/dlep/dlep_reader.c
dlep_writer_add_ip_tlv
int dlep_writer_add_ip_tlv(struct dlep_writer *writer, const struct netaddr *ip, bool add) { uint8_t value[18]; value[0] = add ? DLEP_IP_ADD : DLEP_IP_REMOVE; netaddr_to_binary(&value[1], ip, 16); switch (netaddr_get_address_family(ip)) { case AF_INET: value[5] = netaddr_get_prefix_length(ip); if (value[5] != 32) { dlep_writer_add_tlv(writer, DLEP_IPV4_SUBNET_TLV, value, 6); } else { dlep_writer_add_tlv(writer, DLEP_IPV4_ADDRESS_TLV, value, 5); } break; case AF_INET6: value[17] = netaddr_get_prefix_length(ip); if (value[17] != 128) { dlep_writer_add_tlv(writer, DLEP_IPV6_SUBNET_TLV, value, 18); } else { dlep_writer_add_tlv(writer, DLEP_IPV6_ADDRESS_TLV, value, 17); } break; default: return -1; } return 0; }
pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x1(%rsp), %rdi movb %dl, -0x1(%rdi) movl $0x10, %edx callq 0x289c7 movzbl 0x10(%r14), %ecx cmpl $0xa, %ecx je 0x25b69 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0x2, %ecx jne 0x25ba4 movb 0x11(%r14), %al movb %al, 0x5(%rsp) movq %rsp, %rdx movq %rbx, %rdi cmpb $0x20, %al jne 0x25b87 movl $0x8, %esi movl $0x5, %ecx jmp 0x25b9d movb 0x11(%r14), %al movb %al, 0x11(%rsp) movq %rsp, %rdx movq %rbx, %rdi cmpb $-0x80, %al jne 0x25b93 movl $0x9, %esi movl $0x11, %ecx jmp 0x25b9d movl $0xa, %esi movl $0x6, %ecx jmp 0x25b9d movl $0xb, %esi movl $0x12, %ecx callq 0x25825 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r14 retq
/OLSR[P]OONF/src/generic/dlep/dlep_writer.c