name
stringlengths 1
473k
| code
stringlengths 7
647k
| asm
stringlengths 4
3.39M
| file
stringlengths 8
196
|
---|---|---|---|
main
|
int main(int argc, char ** argv) {
std::string model_path;
int ngl = 99;
int n_ctx = 2048;
// parse command line arguments
for (int i = 1; i < argc; i++) {
try {
if (strcmp(argv[i], "-m") == 0) {
if (i + 1 < argc) {
model_path = argv[++i];
} else {
print_usage(argc, argv);
return 1;
}
} else if (strcmp(argv[i], "-c") == 0) {
if (i + 1 < argc) {
n_ctx = std::stoi(argv[++i]);
} else {
print_usage(argc, argv);
return 1;
}
} else if (strcmp(argv[i], "-ngl") == 0) {
if (i + 1 < argc) {
ngl = std::stoi(argv[++i]);
} else {
print_usage(argc, argv);
return 1;
}
} else {
print_usage(argc, argv);
return 1;
}
} catch (std::exception & e) {
fprintf(stderr, "error: %s\n", e.what());
print_usage(argc, argv);
return 1;
}
}
if (model_path.empty()) {
print_usage(argc, argv);
return 1;
}
// only print errors
llama_log_set([](enum ggml_log_level level, const char * text, void * /* user_data */) {
if (level >= GGML_LOG_LEVEL_ERROR) {
fprintf(stderr, "%s", text);
}
}, nullptr);
// load dynamic backends
ggml_backend_load_all();
// initialize the model
llama_model_params model_params = llama_model_default_params();
model_params.n_gpu_layers = ngl;
llama_model * model = llama_model_load_from_file(model_path.c_str(), model_params);
if (!model) {
fprintf(stderr , "%s: error: unable to load model\n" , __func__);
return 1;
}
const llama_vocab * vocab = llama_model_get_vocab(model);
// initialize the context
llama_context_params ctx_params = llama_context_default_params();
ctx_params.n_ctx = n_ctx;
ctx_params.n_batch = n_ctx;
llama_context * ctx = llama_init_from_model(model, ctx_params);
if (!ctx) {
fprintf(stderr , "%s: error: failed to create the llama_context\n" , __func__);
return 1;
}
// initialize the sampler
llama_sampler * smpl = llama_sampler_chain_init(llama_sampler_chain_default_params());
llama_sampler_chain_add(smpl, llama_sampler_init_min_p(0.05f, 1));
llama_sampler_chain_add(smpl, llama_sampler_init_temp(0.8f));
llama_sampler_chain_add(smpl, llama_sampler_init_dist(LLAMA_DEFAULT_SEED));
// helper function to evaluate a prompt and generate a response
auto generate = [&](const std::string & prompt) {
std::string response;
const bool is_first = llama_kv_self_used_cells(ctx) == 0;
// tokenize the prompt
const int n_prompt_tokens = -llama_tokenize(vocab, prompt.c_str(), prompt.size(), NULL, 0, is_first, true);
std::vector<llama_token> prompt_tokens(n_prompt_tokens);
if (llama_tokenize(vocab, prompt.c_str(), prompt.size(), prompt_tokens.data(), prompt_tokens.size(), is_first, true) < 0) {
GGML_ABORT("failed to tokenize the prompt\n");
}
// prepare a batch for the prompt
llama_batch batch = llama_batch_get_one(prompt_tokens.data(), prompt_tokens.size());
llama_token new_token_id;
while (true) {
// check if we have enough space in the context to evaluate this batch
int n_ctx = llama_n_ctx(ctx);
int n_ctx_used = llama_kv_self_used_cells(ctx);
if (n_ctx_used + batch.n_tokens > n_ctx) {
printf("\033[0m\n");
fprintf(stderr, "context size exceeded\n");
exit(0);
}
if (llama_decode(ctx, batch)) {
GGML_ABORT("failed to decode\n");
}
// sample the next token
new_token_id = llama_sampler_sample(smpl, ctx, -1);
// is it an end of generation?
if (llama_vocab_is_eog(vocab, new_token_id)) {
break;
}
// convert the token to a string, print it and add it to the response
char buf[256];
int n = llama_token_to_piece(vocab, new_token_id, buf, sizeof(buf), 0, true);
if (n < 0) {
GGML_ABORT("failed to convert token to piece\n");
}
std::string piece(buf, n);
printf("%s", piece.c_str());
fflush(stdout);
response += piece;
// prepare the next batch with the sampled token
batch = llama_batch_get_one(&new_token_id, 1);
}
return response;
};
std::vector<llama_chat_message> messages;
std::vector<char> formatted(llama_n_ctx(ctx));
int prev_len = 0;
while (true) {
// get user input
printf("\033[32m> \033[0m");
std::string user;
std::getline(std::cin, user);
if (user.empty()) {
break;
}
const char * tmpl = llama_model_chat_template(model, /* name */ nullptr);
// add the user input to the message list and format it
messages.push_back({"user", strdup(user.c_str())});
int new_len = llama_chat_apply_template(tmpl, messages.data(), messages.size(), true, formatted.data(), formatted.size());
if (new_len > (int)formatted.size()) {
formatted.resize(new_len);
new_len = llama_chat_apply_template(tmpl, messages.data(), messages.size(), true, formatted.data(), formatted.size());
}
if (new_len < 0) {
fprintf(stderr, "failed to apply the chat template\n");
return 1;
}
// remove previous messages to obtain the prompt to generate the response
std::string prompt(formatted.begin() + prev_len, formatted.begin() + new_len);
// generate a response
printf("\033[33m");
std::string response = generate(prompt);
printf("\n\033[0m");
// add the response to the messages
messages.push_back({"assistant", strdup(response.c_str())});
prev_len = llama_chat_apply_template(tmpl, messages.data(), messages.size(), false, nullptr, 0);
if (prev_len < 0) {
fprintf(stderr, "failed to apply the chat template\n");
return 1;
}
}
// free resources
for (auto & msg : messages) {
free(const_cast<char *>(msg.content));
}
llama_sampler_free(smpl);
llama_free(ctx);
llama_model_free(model);
return 0;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3c8, %rsp # imm = 0x3C8
movq %rsi, %r14
leaq 0x160(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
cmpl $0x2, %edi
setge %al
jl 0x28a1
movl %edi, %ebp
movl $0x1, %ebx
movl $0x800, 0x7c(%rsp) # imm = 0x800
movl $0x63, 0xa0(%rsp)
movq %r14, 0xa8(%rsp)
movb %al, 0xb0(%rsp)
movslq %ebx, %rax
movq (%r14,%rax,8), %r15
movq %r15, %rdi
leaq 0x197f(%rip), %rsi # 0x400c
callq 0x2280
testl %eax, %eax
je 0x278b
movq %r15, %rdi
leaq 0x196b(%rip), %rsi # 0x400f
callq 0x2280
testl %eax, %eax
je 0x27c9
movq %r15, %rdi
leaq 0x1957(%rip), %rsi # 0x4012
callq 0x2280
testl %eax, %eax
jne 0x28b5
incl %ebx
cmpl %ebp, %ebx
jge 0x28b5
movslq %ebx, %rax
movq (%r14,%rax,8), %rsi
leaq 0x1d0(%rsp), %rdi
leaq 0x308(%rsp), %rdx
callq 0x33c0
movq 0x1d0(%rsp), %r12
callq 0x2030
movq %rax, %r15
movl (%rax), %r14d
movl $0x0, (%rax)
movq %r12, %rdi
leaq 0x350(%rsp), %rsi
movl $0xa, %edx
callq 0x2290
cmpq %r12, 0x350(%rsp)
je 0x3126
movq %rax, %r13
addq $-0x80000000, %rax # imm = 0x80000000
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x311a
movl (%r15), %eax
cmpl $0x22, %eax
je 0x311a
testl %eax, %eax
jne 0x2759
movl %r14d, (%r15)
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x277e
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x21f0
movl %r13d, 0xa0(%rsp)
jmp 0x2884
incl %ebx
cmpl %ebp, %ebx
jge 0x28b5
movslq %ebx, %rax
movq (%r14,%rax,8), %r15
movq 0x158(%rsp), %r13
movq %r15, %rdi
callq 0x20e0
leaq 0x150(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x2310
jmp 0x288c
incl %ebx
cmpl %ebp, %ebx
jge 0x28b5
movslq %ebx, %rax
movq (%r14,%rax,8), %rsi
leaq 0x1d0(%rsp), %rdi
leaq 0x308(%rsp), %rdx
callq 0x33c0
movq 0x1d0(%rsp), %r12
callq 0x2030
movq %rax, %r15
movl (%rax), %r14d
movl $0x0, (%rax)
movq %r12, %rdi
leaq 0x350(%rsp), %rsi
movl $0xa, %edx
callq 0x2290
cmpq %r12, 0x350(%rsp)
je 0x313e
movq %rax, %r13
addq $-0x80000000, %rax # imm = 0x80000000
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x3132
movl (%r15), %eax
cmpl $0x22, %eax
je 0x3132
testl %eax, %eax
jne 0x285a
movl %r14d, (%r15)
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x287f
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x21f0
movl %r13d, 0x7c(%rsp)
movq 0xa8(%rsp), %r14
incl %ebx
cmpl %ebp, %ebx
setl %al
jl 0x2675
xorl %ebx, %ebx
movl 0x7c(%rsp), %ebp
jmp 0x28cd
xorl %ebx, %ebx
movl $0x63, 0xa0(%rsp)
movl $0x800, %ebp # imm = 0x800
jmp 0x28cd
movq %r14, %rdi
callq 0x3378
movl $0x1, %ebx
movl 0x7c(%rsp), %ebp
movb 0xb0(%rsp), %al
testb $0x1, %al
jne 0x307a
cmpq $0x0, 0x158(%rsp)
je 0x300c
leaq 0xab9(%rip), %rdi # 0x33a4
xorl %esi, %esi
callq 0x23a0
callq 0x21d0
leaq 0x308(%rsp), %rdi
callq 0x2350
leaq 0x308(%rsp), %rsi
movl 0xa0(%rsp), %eax
movl %eax, 0x10(%rsi)
movq 0x150(%rsp), %rax
movl $0x9, %ecx
movq %rsp, %rdi
rep movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
callq 0x2060
movq %rax, %r14
testq %rax, %rax
je 0x30b3
movq %r14, %rdi
callq 0x2400
movq %rax, %r12
leaq 0x350(%rsp), %rdi
callq 0x2050
leaq 0x350(%rsp), %rsi
movl %ebp, (%rsi)
movl %ebp, 0x4(%rsi)
movl $0xf, %ecx
movq %rsp, %rdi
rep movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
callq 0x2140
movq %rax, %r15
testq %rax, %rax
je 0x30bd
callq 0x22d0
movzbl %al, %edi
callq 0x2100
movq %rax, %r13
movss 0x166b(%rip), %xmm0 # 0x4004
movl $0x1, %edi
callq 0x2260
movq %r13, %rdi
movq %rax, %rsi
callq 0x2200
movss 0x1652(%rip), %xmm0 # 0x4008
callq 0x2120
movq %r13, %rdi
movq %rax, %rsi
callq 0x2200
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x22f0
movq %r13, %rdi
movq %rax, %rsi
callq 0x2200
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movq %r15, %rdi
callq 0x2370
movq %r14, 0xa0(%rsp)
movl %ebx, 0x7c(%rsp)
movl %eax, %esi
leaq 0xc0(%rsp), %rdi
leaq 0x1d0(%rsp), %rdx
callq 0x33fe
leaq 0x180(%rsp), %r14
leaq 0x1d0(%rsp), %rbp
movl $0x0, 0xa8(%rsp)
leaq 0x1638(%rip), %rdi # 0x4077
xorl %eax, %eax
callq 0x2040
leaq 0x128(%rsp), %rax
movq %rax, 0x118(%rsp)
movq $0x0, 0x120(%rsp)
movb $0x0, 0x128(%rsp)
movq 0x356f(%rip), %rbx # 0x5fe0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %edx
movq %rbx, %rdi
leaq 0x118(%rsp), %rsi
callq 0x23e0
cmpq $0x0, 0x120(%rsp)
je 0x2b06
movq 0xa0(%rsp), %rdi
xorl %esi, %esi
callq 0x20d0
movq %rax, 0xb0(%rsp)
leaq 0x15c2(%rip), %rax # 0x4083
movq %rax, 0x1d0(%rsp)
movq 0x118(%rsp), %rdi
callq 0x23d0
movq %rax, 0x1d8(%rsp)
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x2b10
movups 0x1d0(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x88(%rsp)
jmp 0x2b20
movl $0x6, %ebx
jmp 0x2f89
leaq 0x80(%rsp), %rdi
movq %rbp, %rdx
callq 0x35f8
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
movq 0xc0(%rsp), %r8
movl 0xc8(%rsp), %r9d
subl %r8d, %r9d
movq 0xb0(%rsp), %rdi
movl $0x1, %ecx
callq 0x22c0
movl 0xc8(%rsp), %ecx
subl 0xc0(%rsp), %ecx
cmpl %ecx, %eax
jle 0x2bba
movslq %eax, %rsi
leaq 0xc0(%rsp), %rdi
callq 0x345e
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
movq 0xc0(%rsp), %r8
movl 0xc8(%rsp), %r9d
subl %r8d, %r9d
movq 0xb0(%rsp), %rdi
movl $0x1, %ecx
callq 0x22c0
testl %eax, %eax
js 0x2fb8
movq 0xc0(%rsp), %rcx
movslq 0xa8(%rsp), %rsi
addq %rcx, %rsi
movl %eax, %edx
addq %rcx, %rdx
leaq 0x108(%rsp), %rax
movq %rax, 0xf8(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x384a
leaq 0x14ad(%rip), %rdi # 0x40ab
xorl %eax, %eax
callq 0x2040
leaq 0xe8(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq $0x0, 0xe0(%rsp)
movb $0x0, 0xe8(%rsp)
movq %r15, %rdi
callq 0x23c0
movl %eax, %ebx
xorl %r9d, %r9d
testl %eax, %eax
sete %r9b
movq 0xf8(%rsp), %rsi
movl 0x100(%rsp), %edx
movl $0x1, (%rsp)
movq %r12, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x23b0
negl %eax
movslq %eax, %rsi
leaq 0x138(%rsp), %rdi
movq %rbp, %rdx
callq 0x348a
xorl %r9d, %r9d
testl %ebx, %ebx
sete %r9b
movq 0xf8(%rsp), %rsi
movl 0x100(%rsp), %edx
movq 0x138(%rsp), %rcx
movq 0x140(%rsp), %r8
subq %rcx, %r8
shrq $0x2, %r8
movl $0x1, (%rsp)
movq %r12, %rdi
callq 0x23b0
testl %eax, %eax
js 0x3100
movq 0x138(%rsp), %rsi
movq 0x140(%rsp), %rdx
subq %rsi, %rdx
shrq $0x2, %rdx
leaq 0x190(%rsp), %rdi
callq 0x2250
movq %r15, %rdi
callq 0x2370
movl %eax, %ebx
movq %r15, %rdi
callq 0x23c0
addl 0x190(%rsp), %eax
cmpl %ebx, %eax
jg 0x30c7
movq 0x1c0(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x190(%rsp), %xmm0
movups 0x1a0(%rsp), %xmm1
movups 0x1b0(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
callq 0x2320
testl %eax, %eax
jne 0x30cc
movq %r13, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x21b0
movl %eax, 0xbc(%rsp)
movq %r12, %rdi
movl %eax, %esi
callq 0x20a0
movl %eax, %ebx
testb %al, %al
jne 0x2e7b
movl 0xbc(%rsp), %esi
movq %r12, %rdi
movq %rbp, %rdx
movl $0x100, %ecx # imm = 0x100
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x21a0
testl %eax, %eax
js 0x30e6
movl %eax, %eax
movq %r14, 0x170(%rsp)
leaq (%rsp,%rax), %rdx
addq $0x1d0, %rdx # imm = 0x1D0
leaq 0x170(%rsp), %rdi
movq %rbp, %rsi
callq 0x3530
movq 0x170(%rsp), %rsi
leaq 0x133a(%rip), %rdi # 0x4103
xorl %eax, %eax
callq 0x2040
movq 0x31e1(%rip), %rax # 0x5fb8
movq (%rax), %rdi
callq 0x2220
movq 0x170(%rsp), %rsi
movq 0x178(%rsp), %rdx
leaq 0xd8(%rsp), %rdi
callq 0x2070
leaq 0x2d0(%rsp), %rdi
leaq 0xbc(%rsp), %rsi
movl $0x1, %edx
callq 0x2250
movq 0x300(%rsp), %rax
movq %rax, 0x1c0(%rsp)
movups 0x2d0(%rsp), %xmm0
movups 0x2e0(%rsp), %xmm1
movups 0x2f0(%rsp), %xmm2
movaps %xmm2, 0x1b0(%rsp)
movaps %xmm1, 0x1a0(%rsp)
movaps %xmm0, 0x190(%rsp)
movq 0x170(%rsp), %rdi
cmpq %r14, %rdi
je 0x2e73
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x21f0
testb %bl, %bl
je 0x2cde
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x2e98
movq 0x148(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
leaq 0x1212(%rip), %rdi # 0x40b1
xorl %eax, %eax
callq 0x2040
leaq 0x120a(%rip), %rax # 0x40b7
movq %rax, 0x1d0(%rsp)
movq 0xd8(%rsp), %rdi
callq 0x23d0
movq %rax, 0x1d8(%rsp)
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x2ef2
movups 0x1d0(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x88(%rsp)
jmp 0x2f02
leaq 0x80(%rsp), %rdi
movq %rbp, %rdx
callq 0x35f8
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
movq 0xb0(%rsp), %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x22c0
xorl %ebx, %ebx
movl %eax, 0xa8(%rsp)
testl %eax, %eax
js 0x2fcc
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x2f64
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x2f89
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x2fae
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x21f0
testl %ebx, %ebx
je 0x2a38
jmp 0x2fe3
callq 0x2472
movl $0x1, %ebx
movl $0x1, 0x7c(%rsp)
jmp 0x2f89
callq 0x2420
movl $0x1, %ebx
movl $0x1, 0x7c(%rsp)
jmp 0x2f3f
cmpl $0x6, %ebx
jne 0x301b
movq 0x80(%rsp), %rbx
movq 0x88(%rsp), %r14
cmpq %r14, %rbx
je 0x3021
movq 0x8(%rbx), %rdi
callq 0x2230
addq $0x10, %rbx
jmp 0x2ff8
movq %r14, %rdi
callq 0x3378
movl $0x1, %ebx
jmp 0x307a
movl 0x7c(%rsp), %ebx
jmp 0x3040
movq %r13, %rdi
callq 0x2180
movq %r15, %rdi
callq 0x20c0
xorl %ebx, %ebx
movq 0xa0(%rsp), %rdi
callq 0x2080
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x305d
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x307a
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0x309f
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x21f0
movl %ebx, %eax
addq $0x3c8, %rsp # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24b9
jmp 0x3014
callq 0x2494
jmp 0x3014
callq 0x2442
leaq 0x1033(%rip), %rdi # 0x4106
leaq 0x10cb(%rip), %rdx # 0x41a5
movl $0x7c, %esi
xorl %eax, %eax
callq 0x2360
leaq 0x1019(%rip), %rdi # 0x4106
leaq 0x10c3(%rip), %rdx # 0x41b7
movl $0x8b, %esi
xorl %eax, %eax
callq 0x2360
leaq 0xfff(%rip), %rdi # 0x4106
leaq 0x1061(%rip), %rdx # 0x416f
movl $0x6b, %esi
xorl %eax, %eax
callq 0x2360
leaq 0xfdd(%rip), %rdi # 0x40fe
callq 0x22b0
leaq 0xfd1(%rip), %rdi # 0x40fe
callq 0x2130
leaq 0xfc5(%rip), %rdi # 0x40fe
callq 0x22b0
leaq 0xfb9(%rip), %rdi # 0x40fe
callq 0x2130
jmp 0x314c
movq %rax, %r13
jmp 0x332e
jmp 0x3173
jmp 0x3173
jmp 0x3173
jmp 0x3173
jmp 0x3173
jmp 0x3173
jmp 0x3173
movq %rax, %r13
jmp 0x3311
jmp 0x3190
jmp 0x324c
jmp 0x317d
movq %rax, %r13
jmp 0x334b
jmp 0x317d
movq %rdx, %r12
movq %rax, %r13
jmp 0x31e2
jmp 0x3190
jmp 0x3282
jmp 0x3190
jmp 0x3190
movq %rax, %r13
jmp 0x32a2
jmp 0x324c
jmp 0x3282
jmp 0x3282
jmp 0x324c
jmp 0x31ae
movq %rdx, %r12
movq %rax, %r13
cmpl $0x0, (%r15)
jne 0x31bd
movl %r14d, (%r15)
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x31e2
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x21f0
cmpl $0x1, %r12d
jne 0x334b
movq %r13, %rdi
callq 0x20b0
movq 0x2dd5(%rip), %rcx # 0x5fd0
movq (%rcx), %r15
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0xe09(%rip), %rsi # 0x4017
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22a0
movq 0xa8(%rsp), %r14
movq %r14, %rdi
callq 0x3378
movl $0x1, %ebx
callq 0x2340
movl 0x7c(%rsp), %ebp
movb 0xb0(%rsp), %al
jmp 0x28cd
jmp 0x3173
jmp 0x324c
movq %rax, %r13
jmp 0x32ec
jmp 0x3282
jmp 0x325a
jmp 0x3282
movq %rax, %r13
movq 0x170(%rsp), %rdi
cmpq %r14, %rdi
je 0x3285
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x3285
jmp 0x3282
jmp 0x3282
jmp 0x3282
movq %rax, %r13
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0x32a2
movq 0x148(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x32c7
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x32ec
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x3311
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x332e
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x334b
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0x3370
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %r13, %rdi
callq 0x2380
|
/ggerganov[P]llama/examples/simple-chat/simple-chat.cpp
|
void Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, Eigen::PartialReduxExpr<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::internal::member_mean<double>, 1> const, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1, 0, -1, 1> const> const>, Eigen::internal::assign_op<double, double>>(Eigen::Matrix<double, -1, -1, 0, -1, -1>&, Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, Eigen::PartialReduxExpr<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::internal::member_mean<double>, 1> const, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1, 0, -1, 1> const> const> const&, Eigen::internal::assign_op<double, double> const&)
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_dense_assignment_loop(DstXprType& dst, const SrcXprType& src, const Functor &func)
{
typedef evaluator<DstXprType> DstEvaluatorType;
typedef evaluator<SrcXprType> SrcEvaluatorType;
SrcEvaluatorType srcEvaluator(src);
// NOTE To properly handle A = (A*A.transpose())/s with A rectangular,
// we need to resize the destination after the source evaluator has been created.
resize_if_allowed(dst, src, func);
DstEvaluatorType dstEvaluator(dst);
typedef generic_dense_assignment_kernel<DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
dense_assignment_loop<Kernel>::run(kernel);
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %r15
movq 0x18(%rsi), %r14
movsd 0x28(%rsi), %xmm2
cmpq %r14, 0x8(%rdi)
jne 0x1278e
cmpq $0x1, 0x10(%rbx)
je 0x127b6
movsd %xmm2, 0x8(%rsp)
testq %r14, %r14
js 0x128dc
movl $0x1, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0xcc7e
movsd 0x8(%rsp), %xmm2
movq 0x8(%rbx), %rcx
cmpq %r14, %rcx
jne 0x1289e
movq 0x10(%rbx), %rax
cmpq $0x1, %rax
jne 0x1289e
imulq %rcx, %rax
testq %rax, %rax
jle 0x12856
movq (%r15), %rcx
movq 0x10(%r15), %rdx
testq %rcx, %rcx
setne %sil
testq %rdx, %rdx
sets %dil
testb %dil, %sil
jne 0x128bd
cvtsi2sd %rdx, %xmm0
movq (%rbx), %rsi
leaq -0x1(%rdx), %rdi
xorl %r8d, %r8d
movq %rcx, %r9
movq 0x8(%r15), %r10
cmpq %r8, %r10
jle 0x1287f
testq %rdx, %rdx
jle 0x12860
movsd (%rcx,%r8,8), %xmm1
cmpq $0x1, %rdx
je 0x1283c
leaq (%r9,%r10,8), %r11
shlq $0x3, %r10
movq %rdi, %rbx
addsd (%r11), %xmm1
addq %r10, %r11
decq %rbx
jne 0x1282f
divsd %xmm0, %xmm1
mulsd %xmm2, %xmm1
movsd %xmm1, (%rsi,%r8,8)
incq %r8
addq $0x8, %r9
cmpq %rax, %r8
jne 0x1280a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x746e(%rip), %rdi # 0x19cd5
leaq 0x74ab(%rip), %rsi # 0x19d19
leaq 0xa293(%rip), %rcx # 0x1cb08
movl $0x19d, %edx # imm = 0x19D
callq 0xa190
leaq 0x6d55(%rip), %rdi # 0x195db
leaq 0x6df5(%rip), %rsi # 0x19682
leaq 0x6e53(%rip), %rcx # 0x196e7
movl $0x7a, %edx
callq 0xa190
leaq 0x5f16(%rip), %rdi # 0x187bb
leaq 0x5f3e(%rip), %rsi # 0x187ea
leaq 0xa07b(%rip), %rcx # 0x1c92e
movl $0x2d1, %edx # imm = 0x2D1
callq 0xa190
leaq 0x6ed4(%rip), %rdi # 0x19798
leaq 0x6f77(%rip), %rsi # 0x19842
leaq 0x6fd7(%rip), %rcx # 0x198a9
movl $0xb0, %edx
callq 0xa190
leaq 0x5c5f(%rip), %rdi # 0x18542
leaq 0x5de7(%rip), %rsi # 0x186d1
leaq 0x5e4f(%rip), %rcx # 0x18740
movl $0x11d, %edx # imm = 0x11D
callq 0xa190
|
/haukri[P]MasterProject/Eigen/src/Core/AssignEvaluator.h
|
ArtificialPopulation::update()
|
void ArtificialPopulation::update() {
while(current_time < clock->getCurrentTime()) {
resetOutput();
annOutput = ann->predict(annInput);
for(int i = 0; i < numberOfOutputNeurons; i++) {
output[i] = new ValueEvent(annOutput(0, i));
logger->logValue((long)this, i, EventType::Value, annOutput(0, i));
}
current_time += clock->getDt();
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movsd 0x48(%rdi), %xmm0
movsd %xmm0, (%rsp)
movq 0x50(%rdi), %rdi
callq 0x15972
ucomisd (%rsp), %xmm0
jbe 0x148c5
leaq 0x68(%rbx), %r14
leaq 0x20(%rsp), %r15
leaq 0xf463(%rip), %r12 # 0x23bc8
movq %rbx, %rdi
callq 0xbc18
movq 0x60(%rbx), %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0xcab0
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xc840
movq 0x8(%rsp), %rax
movq 0x80(%rbx), %rdi
movq %rdi, 0x8(%rsp)
movq %rax, 0x80(%rbx)
movupd 0x88(%rbx), %xmm0
movups 0x10(%rsp), %xmm1
movupd %xmm0, 0x10(%rsp)
movups %xmm1, 0x88(%rbx)
callq 0xa300
movq 0x20(%rsp), %rdi
callq 0xa300
cmpl $0x0, 0x28(%rbx)
jle 0x14899
xorl %r13d, %r13d
movl $0x20, %edi
callq 0xa2a0
movq %rax, %rbp
movq 0x88(%rbx), %rax
testq %rax, %rax
jle 0x148d4
cmpq %r13, 0x90(%rbx)
jle 0x148d4
movq 0x80(%rbx), %rcx
imulq %r13, %rax
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rsp)
movq %r12, (%rbp)
movq $0x0, 0x18(%rbp)
movl $0x3, 0x8(%rbp)
callq 0x1593c
movq %rax, %rdi
callq 0x15972
movsd %xmm0, 0x10(%rbp)
movsd (%rsp), %xmm0
movsd %xmm0, 0x18(%rbp)
movq 0x8(%rbx), %rax
movq %rbp, (%rax,%r13,8)
movq 0x88(%rbx), %rax
testq %rax, %rax
jle 0x148d4
cmpq %r13, 0x90(%rbx)
jle 0x148d4
movq 0x58(%rbx), %rdi
movq 0x80(%rbx), %rcx
imulq %r13, %rax
movsd (%rcx,%rax,8), %xmm0
movq %rbx, %rsi
movl %r13d, %edx
movl $0x3, %ecx
callq 0x15af6
incq %r13
movslq 0x28(%rbx), %rax
cmpq %rax, %r13
jl 0x147da
movq 0x50(%rbx), %rdi
callq 0x15996
addsd 0x48(%rbx), %xmm0
movsd %xmm0, (%rsp)
movsd %xmm0, 0x48(%rbx)
movq 0x50(%rbx), %rdi
callq 0x15972
ucomisd (%rsp), %xmm0
ja 0x14765
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4720(%rip), %rdi # 0x18ffb
leaq 0x474e(%rip), %rsi # 0x19030
leaq 0x47b6(%rip), %rcx # 0x1909f
movl $0x16d, %edx # imm = 0x16D
callq 0xa190
movq %rax, %rbx
movq 0x20(%rsp), %rdi
callq 0xa300
jmp 0x14912
movq %rax, %rbx
movl $0x20, %esi
movq %rbp, %rdi
callq 0xa2b0
movq %rbx, %rdi
callq 0xa420
|
/haukri[P]MasterProject/Network/Population/ArtificialPopulation.cpp
|
Precond
|
static int Precond(sunrealtype t, N_Vector c, N_Vector fc, sunbooleantype jok,
sunbooleantype* jcurPtr, sunrealtype gamma, void* user_data)
{
sunrealtype*** P;
sunindextype ier;
sunindextype** pivot;
int i, if0, if00, ig, igx, igy, j, jj, jx, jy;
int *jxr, *jyr, ngrp, ngx, ngy, mxmp, mp, flag;
sunrealtype uround, fac, r, r0, save, srur;
sunrealtype *f1, *fsave, *cdata, *rewtdata;
WebData wdata;
void* arkode_mem;
N_Vector rewt;
wdata = (WebData)user_data;
arkode_mem = wdata->arkode_mem;
cdata = N_VGetArrayPointer(c);
rewt = wdata->rewt;
flag = ARKodeGetErrWeights(arkode_mem, rewt);
if (check_flag(&flag, "ARKodeGetErrWeights", 1)) { return (1); }
rewtdata = N_VGetArrayPointer(rewt);
uround = SUN_UNIT_ROUNDOFF;
P = wdata->P;
pivot = wdata->pivot;
jxr = wdata->jxr;
jyr = wdata->jyr;
mp = wdata->mp;
srur = wdata->srur;
ngrp = wdata->ngrp;
ngx = wdata->ngx;
ngy = wdata->ngy;
mxmp = wdata->mxmp;
fsave = wdata->fsave;
/* Make mp calls to fblock to approximate each diagonal block of Jacobian.
Here, fsave contains the base value of the rate vector and
r0 is a minimum increment factor for the difference quotient. */
f1 = N_VGetArrayPointer(wdata->tmp);
fac = N_VWrmsNorm(fc, rewt);
r0 = SUN_RCONST(1000.0) * fabs(gamma) * uround * NEQ * fac;
if (r0 == ZERO) { r0 = ONE; }
for (igy = 0; igy < ngy; igy++)
{
jy = jyr[igy];
if00 = jy * mxmp;
for (igx = 0; igx < ngx; igx++)
{
jx = jxr[igx];
if0 = if00 + jx * mp;
ig = igx + igy * ngx;
/* Generate ig-th diagonal block */
for (j = 0; j < mp; j++)
{
/* Generate the jth column as a difference quotient */
jj = if0 + j;
save = cdata[jj];
r = MAX(srur * fabs(save), r0 / rewtdata[jj]);
cdata[jj] += r;
fac = -gamma / r;
fblock(t, cdata, jx, jy, f1, wdata);
for (i = 0; i < mp; i++)
{
P[ig][j][i] = (f1[i] - fsave[if0 + i]) * fac;
}
cdata[jj] = save;
}
}
}
/* Add identity matrix and do LU decompositions on blocks. */
for (ig = 0; ig < ngrp; ig++)
{
SUNDlsMat_denseAddIdentity(P[ig], mp);
ier = SUNDlsMat_denseGETRF(P[ig], mp, mp, pivot[ig]);
if (ier != 0) { return (1); }
}
*jcurPtr = SUNTRUE;
return (0);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r8, %rbx
movapd %xmm1, 0x30(%rsp)
movq %rcx, %r14
movq %rsi, %r15
movq 0x988(%r8), %r12
callq 0x2370
movq %rax, 0x28(%rsp)
movq 0x980(%rbx), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x2200
testl %eax, %eax
js 0x3c16
movq %r14, 0x48(%rsp)
movq %r13, %rdi
callq 0x2370
movq %rax, 0x70(%rsp)
movl 0x48(%rbx), %ebp
movl 0x58(%rbx), %eax
movq %rax, 0x50(%rsp)
movsd 0x2b0(%rbx), %xmm0
movsd %xmm0, 0x68(%rsp)
movl 0x5c(%rbx), %eax
movq %rax, 0x10(%rsp)
movslq 0x60(%rbx), %r14
movl 0x64(%rbx), %eax
movl %eax, 0x18(%rsp)
movq 0x978(%rbx), %rdi
callq 0x2370
movq %r13, %rsi
movq %rax, %r13
movq %r15, %rdi
callq 0x2320
movq %r14, 0x58(%rsp)
testq %r14, %r14
movq 0x28(%rsp), %rdx
jle 0x3bca
leaq 0x2b8(%rbx), %rax
movq %rax, 0x60(%rsp)
movapd 0x16e2(%rip), %xmm1 # 0x5080
movapd 0x30(%rsp), %xmm2
andpd %xmm2, %xmm1
mulsd 0x1750(%rip), %xmm1 # 0x5100
mulsd 0x1750(%rip), %xmm1 # 0x5108
mulsd 0x1750(%rip), %xmm1 # 0x5110
mulsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
cmpeqsd %xmm1, %xmm0
movsd 0x16cb(%rip), %xmm3 # 0x50a0
andpd %xmm0, %xmm3
andnpd %xmm1, %xmm0
orpd %xmm0, %xmm3
movapd %xmm3, 0xa0(%rsp)
xorpd 0x169e(%rip), %xmm2 # 0x5090
movapd %xmm2, 0x30(%rsp)
movq $0x0, 0x8(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x3bb2
movq 0x8(%rsp), %rax
movl 0xb8(%rbx,%rax,4), %ecx
movl %ecx, %esi
imull 0x18(%rsp), %esi
movl %esi, 0x1c(%rsp)
imulq 0x10(%rsp), %rax
movl %ecx, 0x20(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0x80(%rsp)
leaq (%rbx,%rax,8), %rax
movq %rax, 0x78(%rsp)
movq $0x0, (%rsp)
testl %ebp, %ebp
jle 0x3b9c
movq (%rsp), %rax
movl 0xb0(%rbx,%rax,4), %ecx
movl %ebp, %eax
imull %ecx, %eax
movl %ecx, 0x24(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0x90(%rsp)
addl 0x1c(%rsp), %eax
movslq %eax, %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x88(%rsp)
leaq (%rax,%rcx,8), %r12
xorl %r14d, %r14d
movq 0x88(%rsp), %rax
leaq (%r14,%rax), %r15
movsd (%rdx,%r15,8), %xmm2
movapd %xmm2, %xmm0
andpd 0x15cd(%rip), %xmm0 # 0x5080
mulsd 0x68(%rsp), %xmm0
movapd 0xa0(%rsp), %xmm1
movq 0x70(%rsp), %rax
divsd (%rax,%r15,8), %xmm1
maxsd %xmm1, %xmm0
movapd %xmm2, 0xb0(%rsp)
movapd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rdx,%r15,8)
movapd 0x30(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x98(%rsp)
movl 0x50(%rbx), %eax
imull 0x20(%rsp), %eax
addl 0x24(%rsp), %eax
movsd 0x2a8(%rbx), %xmm1
mulsd 0x80(%rsp), %xmm1
movsd 0x2a0(%rbx), %xmm0
mulsd 0x90(%rsp), %xmm0
movslq 0x40(%rbx), %rcx
cltq
imulq %rcx, %rax
leaq (%rdx,%rax,8), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x473b
movsd 0x98(%rsp), %xmm1
movq 0x78(%rsp), %rax
movq (%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax,%r14,8), %rax
xorl %ecx, %ecx
movsd (%r13,%rcx,8), %xmm0
subsd (%r12,%rcx,8), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %rbp
jne 0x3b5e
movq 0x28(%rsp), %rdx
movapd 0xb0(%rsp), %xmm0
movsd %xmm0, (%rdx,%r15,8)
incq %r14
cmpq %rbp, %r14
jne 0x3a95
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
cmpq 0x10(%rsp), %rcx
jne 0x3a4e
movq 0x8(%rsp), %rcx
incq %rcx
movq %rcx, 0x8(%rsp)
cmpq 0x58(%rsp), %rcx
jne 0x3a01
movq 0x50(%rsp), %r12
testl %r12d, %r12d
jle 0x3c07
movslq %ebp, %r14
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
movq %r14, %rsi
callq 0x2360
movq (%rbx,%r15,8), %rdi
movq 0x20(%rbx,%r15,8), %rcx
movq %r14, %rsi
movq %r14, %rdx
callq 0x2150
testq %rax, %rax
jne 0x3c37
incq %r15
cmpq %r15, %r12
jne 0x3bda
movq 0x48(%rsp), %rax
movl $0x1, (%rax)
xorl %eax, %eax
jmp 0x3c3c
movq 0x43d3(%rip), %rcx # 0x7ff0
movq (%rcx), %rdi
leaq 0x1eab(%rip), %rsi # 0x5ad2
leaq 0x1e59(%rip), %rdx # 0x5a87
movl %eax, %ecx
xorl %eax, %eax
callq 0x2380
movl $0x1, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/opencor[P]sundials/examples/arkode/C_serial/ark_KrylovDemo_prec.c
|
higan::Logger::~Logger()
|
Logger::~Logger()
{
*buffer_.WriteBegin() = '\n';
buffer_.AddWriteIndex(1);
g_output_func(buffer_.ReadBegin(), buffer_.ReadableSize());
if (level_ == FATAL)
{
g_flush_func();
abort();
}
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x121f0
movq -0x10(%rbp), %rdi
movb $0xa, (%rax)
movl $0x1, %esi
callq 0x12260
jmp 0x128ec
movq -0x10(%rbp), %rdi
callq 0x121d0
movq -0x10(%rbp), %rdi
movq %rax, -0x18(%rbp)
callq 0x122b0
movq -0x18(%rbp), %rsi
movq %rax, %rdx
leaq 0xea18(%rip), %rdi # 0x21328
callq 0x12fb0
jmp 0x12917
movq -0x10(%rbp), %rax
cmpl $0x4, 0x210(%rax)
jne 0x12937
leaq 0xea1d(%rip), %rdi # 0x21348
callq 0x13000
jmp 0x12932
callq 0x11170
movq -0x10(%rbp), %rdi
callq 0x121c0
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x12140
nop
|
/HiganFish[P]higan/higan/base/Logger.cpp
|
higan::System::MakeDirIfNotExist(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
|
bool System::MakeDirIfNotExist(const std::string& dir_path, bool loop_create)
{
if (dir_path.empty())
{
return false;
}
int result = mkdir(dir_path.c_str(), S_IRWXU | S_IRGRP | S_IROTH);
if (result == -1)
{
if (errno == EEXIST)
{
return true;
}
else if (errno == ENOENT)
{
if (!loop_create)
{
return false;
}
std::string parent_path = dir_path.substr(0, dir_path.find_last_of('/'));
if (MakeDirIfNotExist(parent_path, false))
{
return MakeDirIfNotExist(dir_path, false);
}
}
else
{
return false;
}
}
return true;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
callq 0x114c0
testb $0x1, %al
jne 0x160c3
jmp 0x160cc
movb $0x0, -0x1(%rbp)
jmp 0x161d0
movq -0x10(%rbp), %rdi
callq 0x11110
movq %rax, %rdi
movl $0x1e4, %esi # imm = 0x1E4
callq 0x11140
movl %eax, -0x18(%rbp)
cmpl $-0x1, -0x18(%rbp)
jne 0x161cc
callq 0x11030
cmpl $0x11, (%rax)
jne 0x16102
movb $0x1, -0x1(%rbp)
jmp 0x161d0
callq 0x11030
cmpl $0x2, (%rax)
jne 0x161c2
testb $0x1, -0x11(%rbp)
jne 0x1611f
movb $0x0, -0x1(%rbp)
jmp 0x161d0
movq -0x10(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0x11520
movq -0x60(%rbp), %rsi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, -0x50(%rbp)
movl %eax, %edx
leaq -0x38(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x11300
movq -0x58(%rbp), %rdi
movl -0x50(%rbp), %esi
callq 0x160a0
movb %al, -0x49(%rbp)
jmp 0x16164
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x1616d
jmp 0x161a5
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x160a0
movb %al, -0x61(%rbp)
jmp 0x1617d
movb -0x61(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movl $0x1, -0x48(%rbp)
jmp 0x161ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x111a0
jmp 0x161db
movl $0x0, -0x48(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x111a0
movl -0x48(%rbp), %eax
testl %eax, %eax
je 0x161c0
jmp 0x161be
jmp 0x161d0
jmp 0x161c8
movb $0x0, -0x1(%rbp)
jmp 0x161d0
jmp 0x161ca
jmp 0x161cc
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x114d0
nopw %cs:(%rax,%rax)
|
/HiganFish[P]higan/higan/base/System.cpp
|
higan::LogFile::GetFileName[abi:cxx11]()
|
std::string LogFile::GetFileName()
{
time_t now = time(nullptr);
struct tm* tm_now = localtime(&now);
char buffer[32];
strftime(buffer, sizeof buffer, ".%Y%m%d-%H%M%S.", tm_now);
std::string result_name = log_dir_ + "/" + log_prefix_;
result_name.append(buffer);
result_name += "log";
return result_name;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
movq %rax, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x11290
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x11210
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
leaq 0x399b(%rip), %rdx # 0x1a41f
leaq -0x40(%rbp), %rdi
movl $0x20, %esi
callq 0x11250
movq -0x90(%rbp), %rsi
movb $0x0, -0x41(%rbp)
addq $0x8, %rsi
leaq 0x3987(%rip), %rdx # 0x1a42f
leaq -0x68(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x16e90
movq -0x90(%rbp), %rdx
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
addq $0x28, %rdx
callq 0x16e40
jmp 0x16ad2
leaq -0x68(%rbp), %rdi
callq 0x111a0
movq -0x88(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x11510
jmp 0x16aed
movq -0x88(%rbp), %rdi
leaq 0x3936(%rip), %rsi # 0x1a431
callq 0x112c0
jmp 0x16b02
movb $0x1, -0x41(%rbp)
testb $0x1, -0x41(%rbp)
jne 0x16b4b
jmp 0x16b3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x111a0
jmp 0x16b5b
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
callq 0x111a0
jmp 0x16b5b
movq -0x88(%rbp), %rdi
callq 0x111a0
movq -0x98(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x114d0
nopw %cs:(%rax,%rax)
nop
|
/HiganFish[P]higan/higan/base/LogFile.cpp
|
higan::FileForRead::ReadFileToBuffer(higan::Buffer*)
|
ssize_t FileForRead::ReadFileToBuffer(Buffer* buffer)
{
if (!buffer)
{
return -1;
}
size_t result = -1;
if (file_status_ == FileStatus::OPEN_SUCCESS)
{
result = buffer->ReadFromFd(read_fd_);
}
else
{
result = -1;
}
return result;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x17a29
movq $-0x1, -0x8(%rbp)
jmp 0x17a67
movq -0x28(%rbp), %rax
movq $-0x1, -0x20(%rbp)
cmpl $0x2, 0xb0(%rax)
jne 0x17a57
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rdi
movl 0xb4(%rax), %esi
callq 0x17f00
movq %rax, -0x20(%rbp)
jmp 0x17a5f
movq $-0x1, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/HiganFish[P]higan/higan/base/File.cpp
|
higan::Buffer::CopyExDataToBuffer(char const*, unsigned long)
|
void Buffer::CopyExDataToBuffer(const char* exbuffer, size_t ex_len)
{
size_t drop_len = read_idx_ - DEFAULT_READ_INDEX;
/**
* 可以将已读的内容丢弃来 从远buffer_中得到足够的空间
* 无法得到则扩容
*/
if (drop_len >= ex_len)
{
std::copy(ReadBegin(), ReadBegin() + ReadableSize(), &buffer_[DEFAULT_READ_INDEX]);
write_idx_ -= drop_len;
read_idx_ = DEFAULT_READ_INDEX;
}
else
{
buffer_.resize(buffer_.size() + ex_len);
}
std::copy(exbuffer, exbuffer + ex_len, WriteBegin());
AddWriteIndex(ex_len);
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x18(%rax), %rax
subq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x181ee
movq -0x28(%rbp), %rdi
callq 0x18250
movq -0x28(%rbp), %rdi
movq %rax, -0x38(%rbp)
callq 0x18250
movq -0x28(%rbp), %rdi
movq %rax, -0x40(%rbp)
callq 0x18270
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x8, %esi
callq 0x18820
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rax, %rdx
callq 0x187e0
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdx
movq 0x20(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x20(%rax)
movq $0x8, 0x18(%rax)
jmp 0x18207
movq -0x28(%rbp), %rdi
callq 0x188d0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
addq -0x18(%rbp), %rsi
callq 0x18840
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
callq 0x18090
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
callq 0x188f0
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x180e0
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
/HiganFish[P]higan/higan/base/Buffer.cpp
|
KDReports::TableBreakingSettingsDialog::qt_metacall(QMetaObject::Call, int, void**)
|
int KDReports::TableBreakingSettingsDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 2)
qt_static_metacall(this, _c, _id, _a);
_id -= 2;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 2)
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
_id -= 2;
}
return _id;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x26200
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x27afe
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x27b6c
cmpl $0x0, -0x14(%rbp)
jne 0x27b28
cmpl $0x2, -0x18(%rbp)
jge 0x27b1d
movq -0x30(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x27980
movl -0x18(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x18(%rbp)
jmp 0x27b66
cmpl $0x7, -0x14(%rbp)
jne 0x27b64
cmpl $0x2, -0x18(%rbp)
jge 0x27b5b
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x23750
leaq -0x28(%rbp), %rdi
callq 0x27ba0
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq %rcx, (%rax)
movl -0x18(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x18(%rbp)
jmp 0x27b66
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
/KDAB[P]KDReports/build_O0/src/kdreports_autogen/NRD2APHKSC/moc_KDReportsTableBreakingSettingsDialog.cpp
|
KDReports::ChartElement::setChart(KDChart::Chart*)
|
void KDReports::ChartElement::setChart(KDChart::Chart *chart)
{
#ifdef HAVE_KDCHART
if (d->m_deleteChart)
delete d->m_chart;
d->m_chart = chart;
d->m_deleteChart = false;
#else
Q_UNUSED(chart);
#endif
}
|
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
popq %rbp
retq
nop
|
/KDAB[P]KDReports/src/KDReports/KDReportsChartElement.cpp
|
KDReports::TableLayout::decorationSize(QVariant const&) const
|
QSize KDReports::TableLayout::decorationSize(const QVariant &cellDecoration) const
{
QImage img = qvariant_cast<QImage>(cellDecoration);
if (!img.isNull()) {
return img.size();
}
QPixmap pix = qvariant_cast<QPixmap>(cellDecoration);
if (!pix.isNull()) {
return pix.size();
}
return m_iconSize;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x463b0
movq -0x68(%rbp), %rdi
callq 0x24000
movb %al, -0x59(%rbp)
jmp 0x92c0a
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x92c47
jmp 0x92c13
leaq -0x30(%rbp), %rdi
callq 0x25d00
movq %rax, -0x78(%rbp)
jmp 0x92c22
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0x92cc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x92cdf
movq -0x18(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x4f6e0
jmp 0x92c56
leaq -0x58(%rbp), %rdi
callq 0x241f0
movb %al, -0x79(%rbp)
jmp 0x92c64
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x92caa
jmp 0x92c6d
leaq -0x58(%rbp), %rdi
callq 0x244f0
movq %rax, -0x88(%rbp)
jmp 0x92c7f
movq -0x88(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0x92cc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x23dc0
jmp 0x92cdf
movq -0x70(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x40(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x23dc0
leaq -0x30(%rbp), %rdi
callq 0x26540
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x26540
movq -0x38(%rbp), %rdi
callq 0x23f90
nopw %cs:(%rax,%rax)
|
/KDAB[P]KDReports/src/KDReports/KDReportsTableLayout.cpp
|
ImGuiIO::ImGuiIO()
|
ImGuiIO::ImGuiIO()
{
// Most fields are initialized with zero
memset(this, 0, sizeof(*this));
// Settings
ConfigFlags = ImGuiConfigFlags_None;
BackendFlags = ImGuiBackendFlags_None;
DisplaySize = ImVec2(-1.0f, -1.0f);
DeltaTime = 1.0f/60.0f;
IniSavingRate = 5.0f;
IniFilename = "imgui.ini";
LogFilename = "imgui_log.txt";
MouseDoubleClickTime = 0.30f;
MouseDoubleClickMaxDist = 6.0f;
for (int i = 0; i < ImGuiKey_COUNT; i++)
KeyMap[i] = -1;
KeyRepeatDelay = 0.250f;
KeyRepeatRate = 0.050f;
UserData = NULL;
Fonts = NULL;
FontGlobalScale = 1.0f;
FontDefault = NULL;
FontAllowUserScaling = false;
DisplayFramebufferScale = ImVec2(1.0f, 1.0f);
// Miscellaneous options
MouseDrawCursor = false;
#ifdef __APPLE__
ConfigMacOSXBehaviors = true; // Set Mac OS X style defaults based on __APPLE__ compile time flag
#else
ConfigMacOSXBehaviors = false;
#endif
ConfigInputTextCursorBlink = true;
ConfigWindowsResizeFromEdges = true;
ConfigWindowsMoveFromTitleBarOnly = false;
// Platform Functions
BackendPlatformName = BackendRendererName = NULL;
BackendPlatformUserData = BackendRendererUserData = BackendLanguageUserData = NULL;
GetClipboardTextFn = GetClipboardTextFn_DefaultImpl; // Platform dependent default implementations
SetClipboardTextFn = SetClipboardTextFn_DefaultImpl;
ClipboardUserData = NULL;
ImeSetInputScreenPosFn = ImeSetInputScreenPosFn_DefaultImpl;
ImeWindowHandle = NULL;
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
RenderDrawListsFn = NULL;
#endif
// Input (NB: we already have memset zero the entire structure!)
MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
MousePosPrev = ImVec2(-FLT_MAX, -FLT_MAX);
MouseDragThreshold = 6.0f;
for (int i = 0; i < IM_ARRAYSIZE(MouseDownDuration); i++) MouseDownDuration[i] = MouseDownDurationPrev[i] = -1.0f;
for (int i = 0; i < IM_ARRAYSIZE(KeysDownDuration); i++) KeysDownDuration[i] = KeysDownDurationPrev[i] = -1.0f;
for (int i = 0; i < IM_ARRAYSIZE(NavInputsDownDuration); i++) NavInputsDownDuration[i] = -1.0f;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
addq $0x8, %rdi
callq 0x2c260
movq -0x60(%rbp), %rdi
addq $0xb0, %rdi
callq 0x2c260
movq -0x60(%rbp), %rdi
addq $0x118, %rdi # imm = 0x118
callq 0x2c260
movq -0x60(%rbp), %rdi
addq $0x3ac, %rdi # imm = 0x3AC
callq 0x2c260
movq -0x60(%rbp), %rdi
addq $0x3b4, %rdi # imm = 0x3B4
callq 0x2c260
movq -0x60(%rbp), %rax
addq $0x3bc, %rax # imm = 0x3BC
movq %rax, %rcx
addq $0x28, %rcx
movq %rcx, -0x58(%rbp)
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x2c260
movq -0x68(%rbp), %rax
movq -0x58(%rbp), %rcx
addq $0x8, %rax
cmpq %rcx, %rax
movq %rax, -0x50(%rbp)
jne 0xb9d9
movq -0x60(%rbp), %rax
addq $0x454, %rax # imm = 0x454
movq %rax, %rcx
addq $0x28, %rcx
movq %rcx, -0x78(%rbp)
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x2c260
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
addq $0x8, %rax
cmpq %rcx, %rax
movq %rax, -0x70(%rbp)
jne 0xba14
movq -0x60(%rbp), %rdi
addq $0x1540, %rdi # imm = 0x1540
movq %rdi, -0x88(%rbp)
callq 0x2c280
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x1550, %edx # imm = 0x1550
callq 0x73b0
movq -0x60(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, 0x4(%rax)
leaq -0x10(%rbp), %rdi
movss 0xad5fe(%rip), %xmm1 # 0xb9078
movaps %xmm1, %xmm0
callq 0x8930
jmp 0xba84
movq -0x60(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movss 0xade78(%rip), %xmm0 # 0xb9910
movss %xmm0, 0x10(%rax)
movss 0xae3a3(%rip), %xmm0 # 0xb9e48
movss %xmm0, 0x14(%rax)
leaq 0xaeacf(%rip), %rcx # 0xba580
movq %rcx, 0x18(%rax)
leaq 0xaeace(%rip), %rcx # 0xba58a
movq %rcx, 0x20(%rax)
movss 0xae37c(%rip), %xmm0 # 0xb9e44
movss %xmm0, 0x28(%rax)
movss 0xae35b(%rip), %xmm0 # 0xb9e30
movss %xmm0, 0x2c(%rax)
movl $0x0, -0x20(%rbp)
cmpl $0x15, -0x20(%rbp)
jge 0xbb1f
movq -0x60(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl $0xffffffff, 0x34(%rax,%rcx,4) # imm = 0xFFFFFFFF
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xbae1
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x2c2b0
jmp 0xbd48
movq -0x60(%rbp), %rax
movl $0x3e800000, 0x88(%rax) # imm = 0x3E800000
movl $0x3d4ccccd, 0x8c(%rax) # imm = 0x3D4CCCCD
movq $0x0, 0x90(%rax)
movq $0x0, 0x98(%rax)
movl $0x3f800000, 0xa0(%rax) # imm = 0x3F800000
movq $0x0, 0xa8(%rax)
movb $0x0, 0xa4(%rax)
leaq -0x28(%rbp), %rdi
movss 0xad49b(%rip), %xmm1 # 0xb9010
movaps %xmm1, %xmm0
callq 0x8930
jmp 0xbb7f
movq -0x60(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0xb0(%rax)
movb $0x0, 0xb8(%rax)
movb $0x0, 0xb9(%rax)
movb $0x1, 0xba(%rax)
movb $0x1, 0xbb(%rax)
movb $0x0, 0xbc(%rax)
movq $0x0, 0xc8(%rax)
movq $0x0, 0xc0(%rax)
movq $0x0, 0xe0(%rax)
movq $0x0, 0xd8(%rax)
movq $0x0, 0xd0(%rax)
leaq 0x171(%rip), %rcx # 0xbd60
movq %rcx, 0xe8(%rax)
leaq 0x1c3(%rip), %rcx # 0xbdc0
movq %rcx, 0xf0(%rax)
movq $0x0, 0xf8(%rax)
leaq 0x26a(%rip), %rcx # 0xbe80
movq %rcx, 0x100(%rax)
movq $0x0, 0x108(%rax)
leaq -0x30(%rbp), %rdi
movss 0xadce0(%rip), %xmm1 # 0xb9914
movaps %xmm1, %xmm0
callq 0x8930
jmp 0xbc3e
movq -0x60(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x118(%rax)
leaq -0x38(%rbp), %rdi
movss 0xadcbb(%rip), %xmm1 # 0xb9914
movaps %xmm1, %xmm0
callq 0x8930
jmp 0xbc63
movq -0x60(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x3b4(%rax)
movss 0xae1b6(%rip), %xmm0 # 0xb9e30
movss %xmm0, 0x30(%rax)
movl $0x0, -0x3c(%rbp)
cmpl $0x5, -0x3c(%rbp)
jge 0xbcc5
movq -0x60(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss 0xad3dc(%rip), %xmm0 # 0xb9078
movss %xmm0, 0x440(%rax,%rcx,4)
movslq -0x3c(%rbp), %rcx
movss 0xad3c7(%rip), %xmm0 # 0xb9078
movss %xmm0, 0x42c(%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xbc86
movl $0x0, -0x40(%rbp)
cmpl $0x200, -0x40(%rbp) # imm = 0x200
jge 0xbd0e
movq -0x60(%rbp), %rax
movslq -0x40(%rbp), %rcx
movss 0xad393(%rip), %xmm0 # 0xb9078
movss %xmm0, 0xc90(%rax,%rcx,4)
movslq -0x40(%rbp), %rcx
movss 0xad37e(%rip), %xmm0 # 0xb9078
movss %xmm0, 0x490(%rax,%rcx,4)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0xbccc
movl $0x0, -0x44(%rbp)
cmpl $0x16, -0x44(%rbp)
jge 0xbd3f
movq -0x60(%rbp), %rax
movslq -0x44(%rbp), %rcx
movss 0xad34d(%rip), %xmm0 # 0xb9078
movss %xmm0, 0x1490(%rax,%rcx,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xbd15
addq $0x90, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x7740
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImTextCharFromUtf8(unsigned int*, char const*, char const*)
|
int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end)
{
unsigned int c = (unsigned int)-1;
const unsigned char* str = (const unsigned char*)in_text;
if (!(*str & 0x80))
{
c = (unsigned int)(*str++);
*out_char = c;
return 1;
}
if ((*str & 0xe0) == 0xc0)
{
*out_char = 0xFFFD; // will be invalid but not end of string
if (in_text_end && in_text_end - (const char*)str < 2) return 1;
if (*str < 0xc2) return 2;
c = (unsigned int)((*str++ & 0x1f) << 6);
if ((*str & 0xc0) != 0x80) return 2;
c += (*str++ & 0x3f);
*out_char = c;
return 2;
}
if ((*str & 0xf0) == 0xe0)
{
*out_char = 0xFFFD; // will be invalid but not end of string
if (in_text_end && in_text_end - (const char*)str < 3) return 1;
if (*str == 0xe0 && (str[1] < 0xa0 || str[1] > 0xbf)) return 3;
if (*str == 0xed && str[1] > 0x9f) return 3; // str[1] < 0x80 is checked below
c = (unsigned int)((*str++ & 0x0f) << 12);
if ((*str & 0xc0) != 0x80) return 3;
c += (unsigned int)((*str++ & 0x3f) << 6);
if ((*str & 0xc0) != 0x80) return 3;
c += (*str++ & 0x3f);
*out_char = c;
return 3;
}
if ((*str & 0xf8) == 0xf0)
{
*out_char = 0xFFFD; // will be invalid but not end of string
if (in_text_end && in_text_end - (const char*)str < 4) return 1;
if (*str > 0xf4) return 4;
if (*str == 0xf0 && (str[1] < 0x90 || str[1] > 0xbf)) return 4;
if (*str == 0xf4 && str[1] > 0x8f) return 4; // str[1] < 0x80 is checked below
c = (unsigned int)((*str++ & 0x07) << 18);
if ((*str & 0xc0) != 0x80) return 4;
c += (unsigned int)((*str++ & 0x3f) << 12);
if ((*str & 0xc0) != 0x80) return 4;
c += (unsigned int)((*str++ & 0x3f) << 6);
if ((*str & 0xc0) != 0x80) return 4;
c += (*str++ & 0x3f);
// utf-8 encodings of values used in surrogate pairs are invalid
if ((c & 0xFFFFF800) == 0xD800) return 4;
*out_char = c;
return 4;
}
*out_char = 0;
return 0;
}
|
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0xbf9a
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xe0, %eax
cmpl $0xc0, %eax
jne 0xc063
movq -0x10(%rbp), %rax
movl $0xfffd, (%rax) # imm = 0xFFFD
cmpq $0x0, -0x20(%rbp)
je 0xbfdf
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jge 0xbfdf
movl $0x1, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xc2, %eax
jge 0xbff9
movl $0x2, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
andl $0x1f, %eax
shll $0x6, %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
je 0xc033
movl $0x2, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
andl $0x3f, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xf0, %eax
cmpl $0xe0, %eax
jne 0xc1b0
movq -0x10(%rbp), %rax
movl $0xfffd, (%rax) # imm = 0xFFFD
cmpq $0x0, -0x20(%rbp)
je 0xc0a8
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jge 0xc0a8
movl $0x1, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xe0, %eax
jne 0xc0e0
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jl 0xc0d4
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xbf, %eax
jle 0xc0e0
movl $0x3, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xed, %eax
jne 0xc109
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x9f, %eax
jle 0xc109
movl $0x3, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
andl $0xf, %eax
shll $0xc, %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
je 0xc143
movl $0x3, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
andl $0x3f, %eax
shll $0x6, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
je 0xc180
movl $0x3, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
andl $0x3f, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xf8, %eax
cmpl $0xf0, %eax
jne 0xc366
movq -0x10(%rbp), %rax
movl $0xfffd, (%rax) # imm = 0xFFFD
cmpq $0x0, -0x20(%rbp)
je 0xc1f5
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0xc1f5
movl $0x1, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xf4, %eax
jle 0xc20f
movl $0x4, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xf0, %eax
jne 0xc247
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0xc23b
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xbf, %eax
jle 0xc247
movl $0x4, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xf4, %eax
jne 0xc270
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0xc270
movl $0x4, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
andl $0x7, %eax
shll $0x12, %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
je 0xc2aa
movl $0x4, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
andl $0x3f, %eax
shll $0xc, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
je 0xc2e7
movl $0x4, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
andl $0x3f, %eax
shll $0x6, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
je 0xc321
movl $0x4, -0x4(%rbp)
jmp 0xc377
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
andl $0x3f, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
andl $0xfffff800, %eax # imm = 0xFFFFF800
cmpl $0xd800, %eax # imm = 0xD800
jne 0xc354
movl $0x4, -0x4(%rbp)
jmp 0xc377
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0xc377
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImTriangleBarycentricCoords(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, float&, float&, float&)
|
void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p, float& out_u, float& out_v, float& out_w)
{
ImVec2 v0 = b - a;
ImVec2 v1 = c - a;
ImVec2 v2 = p - a;
const float denom = v0.x * v1.y - v1.x * v0.y;
out_v = (v2.x * v1.y - v1.x * v2.y) / denom;
out_w = (v0.x * v2.y - v2.x * v0.y) / denom;
out_u = 1.0f - out_v - out_w;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xc4b0
movlpd %xmm0, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xc4b0
movlpd %xmm0, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xc4b0
movlpd %xmm0, -0x48(%rbp)
movss -0x38(%rbp), %xmm0
movss -0x3c(%rbp), %xmm2
movss -0x40(%rbp), %xmm1
mulss -0x34(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x48(%rbp), %xmm0
movss -0x3c(%rbp), %xmm2
movss -0x40(%rbp), %xmm1
mulss -0x44(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
divss -0x4c(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, (%rax)
movss -0x38(%rbp), %xmm0
movss -0x44(%rbp), %xmm2
movss -0x48(%rbp), %xmm1
mulss -0x34(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
divss -0x4c(%rbp), %xmm0
movq 0x10(%rbp), %rax
movss %xmm0, (%rax)
movq -0x30(%rbp), %rax
movss 0xac7f0(%rip), %xmm0 # 0xb9010
subss (%rax), %xmm0
movq 0x10(%rbp), %rax
subss (%rax), %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImStrdupcpy(char*, unsigned long*, char const*)
|
char* ImStrdupcpy(char* dst, size_t* p_dst_size, const char* src)
{
size_t dst_buf_size = p_dst_size ? *p_dst_size : strlen(dst) + 1;
size_t src_size = strlen(src) + 1;
if (dst_buf_size < src_size)
{
IM_FREE(dst);
dst = (char*)IM_ALLOC(src_size);
if (p_dst_size)
*p_dst_size = src_size;
}
return (char*)memcpy(dst, (const void*)src, src_size);
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xcc28
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xcc39
movq -0x8(%rbp), %rdi
callq 0x7490
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7490
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xcc86
movq -0x8(%rbp), %rdi
callq 0xccb0
movq -0x28(%rbp), %rdi
callq 0xcbb0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xcc84
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0xcc86
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x70c0
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImStrTrimBlanks(char*)
|
void ImStrTrimBlanks(char* buf)
{
char* p = buf;
while (p[0] == ' ' || p[0] == '\t') // Leading blanks
p++;
char* p_start = p;
while (*p != 0) // Find end of string
p++;
while (p > p_start && (p[-1] == ' ' || p[-1] == '\t')) // Trailing blanks
p--;
if (p_start != buf) // Copy memory if we had leading blanks
memmove(buf, p_start, p - p_start);
buf[p - p_start] = 0; // Zero terminate
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x19(%rbp)
je 0xcfa5
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xcfae
jmp 0xcfbc
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xcf84
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xcfde
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xcfc4
jmp 0xcfe0
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x1a(%rbp)
jbe 0xd018
movq -0x10(%rbp), %rax
movsbl -0x1(%rax), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x1b(%rbp)
je 0xd012
movq -0x10(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x1b(%rbp)
movb -0x1b(%rbp), %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
testb $0x1, %al
jne 0xd021
jmp 0xd02f
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xcfe0
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0xd051
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
callq 0x71d0
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
subq %rdx, %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImHashData(void const*, unsigned long, unsigned int)
|
ImU32 ImHashData(const void* data_p, size_t data_size, ImU32 seed)
{
ImU32 crc = ~seed;
const unsigned char* data = (const unsigned char*)data_p;
const ImU32* crc32_lut = GCrc32LookupTable;
while (data_size-- != 0)
crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ *data++];
return ~crc;
}
|
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0xace09(%rip), %rax # 0xba010
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
je 0xd251
movl -0x18(%rbp), %eax
shrl $0x8, %eax
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %edx
andl $0xff, %edx
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x1, %rdi
movq %rdi, -0x20(%rbp)
movzbl (%rsi), %esi
xorl %esi, %edx
movl %edx, %edx
xorl (%rcx,%rdx,4), %eax
movl %eax, -0x18(%rbp)
jmp 0xd20b
movl -0x18(%rbp), %eax
xorl $-0x1, %eax
popq %rbp
retq
nopl (%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImTextCountUtf8BytesFromStr(unsigned short const*, unsigned short const*)
|
int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end)
{
int bytes_count = 0;
while ((!in_text_end || in_text < in_text_end) && *in_text)
{
unsigned int c = (unsigned int)(*in_text++);
if (c < 0x80)
bytes_count++;
else
bytes_count += ImTextCountUtf8BytesFromChar(c);
}
return bytes_count;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xd9cd
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x19(%rbp)
jae 0xd9db
movq -0x8(%rbp), %rax
cmpw $0x0, (%rax)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xd9e4
jmp 0xda1d
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x8(%rbp)
movzwl (%rax), %eax
movl %eax, -0x18(%rbp)
cmpl $0x80, -0x18(%rbp)
jae 0xda0d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xda1b
movl -0x18(%rbp), %edi
callq 0xda30
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xd9b7
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGuiStorage::BuildSortByKey()
|
void ImGuiStorage::BuildSortByKey()
{
struct StaticFunc
{
static int IMGUI_CDECL PairCompareByID(const void* lhs, const void* rhs)
{
// We can't just do a subtraction because qsort uses signed integers and subtracting our ID doesn't play well with that.
if (((const Pair*)lhs)->key > ((const Pair*)rhs)->key) return +1;
if (((const Pair*)lhs)->key < ((const Pair*)rhs)->key) return -1;
return 0;
}
};
if (Data.Size > 1)
ImQsort(Data.Data, (size_t)Data.Size, sizeof(Pair), StaticFunc::PairCompareByID);
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x1, (%rax)
jle 0xe1f5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movslq (%rax), %rsi
movl $0x10, %edx
leaq 0x10(%rip), %rcx # 0xe200
callq 0x7800
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGuiTextFilter::Build()
|
void ImGuiTextFilter::Build()
{
Filters.resize(0);
TextRange input_range(InputBuf, InputBuf+strlen(InputBuf));
input_range.split(',', &Filters);
CountGrep = 0;
for (int i = 0; i != Filters.Size; i++)
{
TextRange& f = Filters[i];
while (f.b < f.e && ImCharIsBlankA(f.b[0]))
f.b++;
while (f.e > f.b && ImCharIsBlankA(f.e[-1]))
f.e--;
if (f.empty())
continue;
if (Filters[i].b[0] != '-')
CountGrep += 1;
}
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x100, %rdi # imm = 0x100
xorl %esi, %esi
callq 0x2c670
movq -0x30(%rbp), %rdi
callq 0x7490
movq -0x30(%rbp), %rsi
movq %rsi, %rdx
addq %rax, %rdx
leaq -0x18(%rbp), %rdi
callq 0x2c730
movq -0x30(%rbp), %rdx
addq $0x100, %rdx # imm = 0x100
leaq -0x18(%rbp), %rdi
movl $0x2c, %esi
callq 0xeba0
movq -0x30(%rbp), %rax
movl $0x0, 0x110(%rax)
movl $0x0, -0x1c(%rbp)
movq -0x30(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x100(%rcx), %eax
je 0xeae0
movq -0x30(%rbp), %rdi
addq $0x100, %rdi # imm = 0x100
movl -0x1c(%rbp), %esi
callq 0x2c760
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rdx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x31(%rbp)
jae 0xea2e
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %edi
callq 0xec70
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xea37
jmp 0xea47
movq -0x28(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0xea06
jmp 0xea49
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0x32(%rbp)
jbe 0xea73
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsbl -0x1(%rax), %edi
callq 0xec70
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0xea7c
jmp 0xea8e
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0xea49
movq -0x28(%rbp), %rdi
callq 0x2c7c0
testb $0x1, %al
jne 0xea9d
jmp 0xea9f
jmp 0xead2
movq -0x30(%rbp), %rdi
addq $0x100, %rdi # imm = 0x100
movl -0x1c(%rbp), %esi
callq 0x2c760
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0xead0
movq -0x30(%rbp), %rax
movl 0x110(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x110(%rax)
jmp 0xead2
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xe9dc
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGuiTextBuffer::appendfv(char const*, __va_list_tag*)
|
void ImGuiTextBuffer::appendfv(const char* fmt, va_list args)
{
va_list args_copy;
va_copy(args_copy, args);
int len = ImFormatStringV(NULL, 0, fmt, args); // FIXME-OPT: could do a first pass write attempt, likely successful on first pass.
if (len <= 0)
{
va_end(args_copy);
return;
}
// Add zero-terminator the first time
const int write_off = (Buf.Size != 0) ? Buf.Size : 1;
const int needed_sz = write_off + len;
if (write_off + len >= Buf.Capacity)
{
int new_capacity = Buf.Capacity * 2;
Buf.reserve(needed_sz > new_capacity ? needed_sz : new_capacity);
}
Buf.resize(needed_sz);
ImFormatStringV(&Buf[write_off - 1], (size_t)len + 1, fmt, args_copy);
va_end(args_copy);
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0xd160
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jg 0xf008
leaq -0x30(%rbp), %rax
jmp 0xf0a9
movq -0x48(%rbp), %rax
cmpl $0x0, (%rax)
je 0xf01c
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0xf026
movl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xf026
movq -0x48(%rbp), %rcx
movl -0x4c(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
addl -0x34(%rbp), %eax
cmpl 0x4(%rcx), %eax
jl 0xf072
movq -0x48(%rbp), %rax
movl 0x4(%rax), %eax
shll %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jle 0xf060
movl -0x3c(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0xf066
movl -0x40(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movl -0x50(%rbp), %esi
callq 0x9e10
movq -0x48(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x9d60
movq -0x48(%rbp), %rdi
movl -0x38(%rbp), %esi
subl $0x1, %esi
callq 0x2c8a0
movq %rax, %rdi
movslq -0x34(%rbp), %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0xd160
leaq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::CalcListClipping(int, float, int*, int*)
|
void ImGui::CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end)
{
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
if (g.LogEnabled)
{
// If logging is active, do not perform any clipping
*out_items_display_start = 0;
*out_items_display_end = items_count;
return;
}
if (window->SkipItems)
{
*out_items_display_start = *out_items_display_end = 0;
return;
}
// We create the union of the ClipRect and the NavScoringRect which at worst should be 1 page away from ClipRect
ImRect unclipped_rect = window->ClipRect;
if (g.NavMoveRequest)
unclipped_rect.Add(g.NavScoringRectScreen);
const ImVec2 pos = window->DC.CursorPos;
int start = (int)((unclipped_rect.Min.y - pos.y) / items_height);
int end = (int)((unclipped_rect.Max.y - pos.y) / items_height);
// When performing a navigation request, ensure we have one item extra in the direction we are moving to
if (g.NavMoveRequest && g.NavMoveClipDir == ImGuiDir_Up)
start--;
if (g.NavMoveRequest && g.NavMoveClipDir == ImGuiDir_Down)
end++;
start = ImClamp(start, 0, items_count);
end = ImClamp(end + 1, start, items_count);
*out_items_display_start = start;
*out_items_display_end = end;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movss %xmm0, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0xeeb91(%rip), %rax # 0xfdd60
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x1a08(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x2ee0(%rax)
je 0xf207
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0xf31f
movq -0x28(%rbp), %rax
testb $0x1, 0x83(%rax)
je 0xf22d
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
jmp 0xf31f
movq -0x28(%rbp), %rax
movq 0x200(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x208(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x1be9(%rax)
je 0xf268
movq -0x20(%rbp), %rsi
addq $0x1b88, %rsi # imm = 0x1B88
leaq -0x38(%rbp), %rdi
callq 0x2eda0
movq -0x28(%rbp), %rax
movq 0xd0(%rax), %rax
movq %rax, -0x40(%rbp)
movss -0x34(%rbp), %xmm0
subss -0x3c(%rbp), %xmm0
divss -0x8(%rbp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x44(%rbp)
movss -0x2c(%rbp), %xmm0
subss -0x3c(%rbp), %xmm0
divss -0x8(%rbp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x48(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x1be9(%rax)
je 0xf2c6
movq -0x20(%rbp), %rax
cmpl $0x2, 0x1bfc(%rax)
jne 0xf2c6
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x1be9(%rax)
je 0xf2e9
movq -0x20(%rbp), %rax
cmpl $0x3, 0x1bfc(%rax)
jne 0xf2e9
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %edi
movl -0x4(%rbp), %edx
xorl %esi, %esi
callq 0x1c5c0
movl %eax, -0x44(%rbp)
movl -0x48(%rbp), %edi
addl $0x1, %edi
movl -0x44(%rbp), %esi
movl -0x4(%rbp), %edx
callq 0x1c5c0
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x48(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGuiListClipper::Step()
|
bool ImGuiListClipper::Step()
{
if (ItemsCount == 0 || ImGui::GetCurrentWindowRead()->SkipItems)
{
ItemsCount = -1;
return false;
}
if (StepNo == 0) // Step 0: the clipper let you process the first element, regardless of it being visible or not, so we can measure the element height.
{
DisplayStart = 0;
DisplayEnd = 1;
StartPosY = ImGui::GetCursorPosY();
StepNo = 1;
return true;
}
if (StepNo == 1) // Step 1: the clipper infer height from first element, calculate the actual range of elements to display, and position the cursor before the first element.
{
if (ItemsCount == 1) { ItemsCount = -1; return false; }
float items_height = ImGui::GetCursorPosY() - StartPosY;
IM_ASSERT(items_height > 0.0f); // If this triggers, it means Item 0 hasn't moved the cursor vertically
Begin(ItemsCount-1, items_height);
DisplayStart++;
DisplayEnd++;
StepNo = 3;
return true;
}
if (StepNo == 2) // Step 2: dummy step only required if an explicit items_height was passed to constructor or Begin() and user still call Step(). Does nothing and switch to Step 3.
{
IM_ASSERT(DisplayStart >= 0 && DisplayEnd >= 0);
StepNo = 3;
return true;
}
if (StepNo == 3) // Step 3: the clipper validate that we have reached the expected Y position (corresponding to element DisplayEnd), advance the cursor to the end of the list and then returns 'false' to end the loop.
End();
return false;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, 0x8(%rax)
je 0xf468
callq 0x2c900
testb $0x1, 0x83(%rax)
je 0xf47c
movq -0x20(%rbp), %rax
movl $0xffffffff, 0x8(%rax) # imm = 0xFFFFFFFF
movb $0x0, -0x1(%rbp)
jmp 0xf5d1
movq -0x20(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0xf4b5
movq -0x20(%rbp), %rax
movl $0x0, 0x10(%rax)
movl $0x1, 0x14(%rax)
callq 0xf170
movq -0x20(%rbp), %rax
movss %xmm0, (%rax)
movl $0x1, 0xc(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xf5d1
movq -0x20(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0xf558
movq -0x20(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0xf4e1
movq -0x20(%rbp), %rax
movl $0xffffffff, 0x8(%rax) # imm = 0xFFFFFFFF
movb $0x0, -0x1(%rbp)
jmp 0xf5d1
callq 0xf170
movq -0x20(%rbp), %rax
subss (%rax), %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xf502
jmp 0xf521
leaq 0xab14b(%rip), %rdi # 0xba654
leaq 0xab0a3(%rip), %rsi # 0xba5b3
movl $0x8f3, %edx # imm = 0x8F3
leaq 0xab14c(%rip), %rcx # 0xba668
callq 0x71e0
movq -0x20(%rbp), %rdi
movl 0x8(%rdi), %esi
subl $0x1, %esi
movss -0x14(%rbp), %xmm0
callq 0xf0b0
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movl $0x3, 0xc(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xf5d1
movq -0x20(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jne 0xf5ba
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x10(%rcx)
movb %al, -0x21(%rbp)
jl 0xf57f
movq -0x20(%rbp), %rax
cmpl $0x0, 0x14(%rax)
setge %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xf588
jmp 0xf58a
jmp 0xf5a9
leaq 0xab0f5(%rip), %rdi # 0xba686
leaq 0xab01b(%rip), %rsi # 0xba5b3
movl $0x8fc, %edx # imm = 0x8FC
leaq 0xab0c4(%rip), %rcx # 0xba668
callq 0x71e0
movq -0x20(%rbp), %rax
movl $0x3, 0xc(%rax)
movb $0x1, -0x1(%rbp)
jmp 0xf5d1
movq -0x20(%rbp), %rax
cmpl $0x3, 0xc(%rax)
jne 0xf5cd
movq -0x20(%rbp), %rdi
callq 0xf3d0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::LogRenderedText(ImVec2 const*, char const*, char const*)
|
void ImGui::LogRenderedText(const ImVec2* ref_pos, const char* text, const char* text_end)
{
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
if (!text_end)
text_end = FindRenderedTextEnd(text, text_end);
const bool log_new_line = ref_pos && (ref_pos->y > g.LogLinePosY + 1);
if (ref_pos)
g.LogLinePosY = ref_pos->y;
if (log_new_line)
g.LogLineFirstItem = true;
const char* text_remaining = text;
if (g.LogDepthRef > window->DC.TreeDepth) // Re-adjust padding if we have popped out of our starting depth
g.LogDepthRef = window->DC.TreeDepth;
const int tree_depth = (window->DC.TreeDepth - g.LogDepthRef);
for (;;)
{
// Split the string. Each new line (after a '\n') is followed by spacing corresponding to the current depth of our log entry.
// We don't add a trailing \n to allow a subsequent item on the same line to be captured.
const char* line_start = text_remaining;
const char* line_end = ImStreolRange(line_start, text_end);
const bool is_first_line = (line_start == text);
const bool is_last_line = (line_end == text_end);
if (!is_last_line || (line_start != line_end))
{
const int char_count = (int)(line_end - line_start);
if (log_new_line || !is_first_line)
LogText(IM_NEWLINE "%*s%.*s", tree_depth * 4, "", char_count, line_start);
else if (g.LogLineFirstItem)
LogText("%*s%.*s", tree_depth * 4, "", char_count, line_start);
else
LogText(" %.*s", char_count, line_start);
g.LogLineFirstItem = false;
}
else if (log_new_line)
{
// An empty "" string at a different Y position should output a carriage return.
LogText(IM_NEWLINE);
break;
}
if (is_last_line)
break;
text_remaining = line_end + 1;
}
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0xee5b5(%rip), %rax # 0xfdd60
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x1a08(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xf7d6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf5e0
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x8(%rbp)
movb %al, -0x59(%rbp)
je 0xf808
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x20(%rbp), %rax
movss 0xa9819(%rip), %xmm1 # 0xb9010
addss 0x2f00(%rax), %xmm1
ucomiss %xmm1, %xmm0
seta %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xf82c
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x20(%rbp), %rax
movss %xmm0, 0x2f00(%rax)
testb $0x1, -0x29(%rbp)
je 0xf83d
movq -0x20(%rbp), %rax
movb $0x1, 0x2f04(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movl 0x2f08(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x108(%rcx), %eax
jle 0xf86f
movq -0x28(%rbp), %rax
movl 0x108(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x2f08(%rax)
movq -0x28(%rbp), %rax
movl 0x108(%rax), %eax
movq -0x20(%rbp), %rcx
subl 0x2f08(%rcx), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xcd90
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x10(%rbp), %rax
sete %al
andb $0x1, %al
movb %al, -0x51(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
sete %al
andb $0x1, %al
movb %al, -0x52(%rbp)
testb $0x1, -0x52(%rbp)
je 0xf8d3
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0xf966
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x58(%rbp)
testb $0x1, -0x29(%rbp)
jne 0xf8ed
testb $0x1, -0x51(%rbp)
jne 0xf911
movl -0x3c(%rbp), %esi
shll $0x2, %esi
movl -0x58(%rbp), %ecx
movq -0x48(%rbp), %r8
leaq 0xad308(%rip), %rdi # 0xbcc09
leaq 0xa9768(%rip), %rdx # 0xb9070
movb $0x0, %al
callq 0x27a80
jmp 0xf959
movq -0x20(%rbp), %rax
testb $0x1, 0x2f04(%rax)
je 0xf942
movl -0x3c(%rbp), %esi
shll $0x2, %esi
movl -0x58(%rbp), %ecx
movq -0x48(%rbp), %r8
leaq 0xad2d8(%rip), %rdi # 0xbcc0a
leaq 0xa9737(%rip), %rdx # 0xb9070
movb $0x0, %al
callq 0x27a80
jmp 0xf957
movl -0x58(%rbp), %esi
movq -0x48(%rbp), %rdx
leaq 0xad2c2(%rip), %rdi # 0xbcc12
movb $0x0, %al
callq 0x27a80
jmp 0xf959
movq -0x20(%rbp), %rax
movb $0x0, 0x2f04(%rax)
jmp 0xf97e
testb $0x1, -0x29(%rbp)
je 0xf97c
leaq 0xa96fc(%rip), %rdi # 0xb906f
movb $0x0, %al
callq 0x27a80
jmp 0xf997
jmp 0xf97e
testb $0x1, -0x52(%rbp)
je 0xf986
jmp 0xf997
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xf886
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::CalcTextSize(char const*, char const*, bool, float)
|
ImVec2 ImGui::CalcTextSize(const char* text, const char* text_end, bool hide_text_after_double_hash, float wrap_width)
{
ImGuiContext& g = *GImGui;
const char* text_display_end;
if (hide_text_after_double_hash)
text_display_end = FindRenderedTextEnd(text, text_end); // Hide anything after a '##' string
else
text_display_end = text_end;
ImFont* font = g.Font;
const float font_size = g.FontSize;
if (text == text_display_end)
return ImVec2(0.0f, font_size);
ImVec2 text_size = font->CalcTextSizeA(font_size, FLT_MAX, wrap_width, text, text_display_end, NULL);
// Round
text_size.x = (float)(int)(text_size.x + 0.95f);
return text_size;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movss %xmm0, -0x20(%rbp)
movq 0xee00d(%rip), %rax # 0xfdd60
movq %rax, -0x28(%rbp)
testb $0x1, -0x19(%rbp)
je 0xfd70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf5e0
movq %rax, -0x30(%rbp)
jmp 0xfd78
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x1900(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movss 0x1908(%rax), %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0xfdb5
movss -0x3c(%rbp), %xmm1
leaq -0x8(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x8930
jmp 0xfdfb
movq -0x38(%rbp), %rdi
movss -0x3c(%rbp), %xmm0
movss -0x20(%rbp), %xmm2
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
movss 0xaa089(%rip), %xmm1 # 0xb9e60
callq 0x41f50
movlpd %xmm0, -0x8(%rbp)
movss 0xaa073(%rip), %xmm0 # 0xb9e5c
addss -0x8(%rbp), %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::RenderCheckMark(ImVec2, unsigned int, float)
|
void ImGui::RenderCheckMark(ImVec2 pos, ImU32 col, float sz)
{
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
float thickness = ImMax(sz / 5.0f, 1.0f);
sz -= thickness*0.5f;
pos += ImVec2(thickness*0.25f, thickness*0.25f);
float third = sz / 3.0f;
float bx = pos.x + third;
float by = pos.y + sz - third*0.5f;
window->DrawList->PathLineTo(ImVec2(bx - third, by - third));
window->DrawList->PathLineTo(ImVec2(bx, by));
window->DrawList->PathLineTo(ImVec2(bx + third*2, by - third*2));
window->DrawList->PathStroke(col, false, thickness);
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movlpd %xmm0, -0x8(%rbp)
movl %edi, -0xc(%rbp)
movss %xmm1, -0x10(%rbp)
movq 0xed764(%rip), %rax # 0xfdd60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x1a08(%rax), %rax
movq %rax, -0x20(%rbp)
movss -0x10(%rbp), %xmm0
movss 0xa982c(%rip), %xmm1 # 0xb9e48
divss %xmm1, %xmm0
movss 0xa89e8(%rip), %xmm1 # 0xb9010
callq 0xfe10
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
movd %xmm0, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm0
movss 0xa97cb(%rip), %xmm2 # 0xb9e1c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x10(%rbp)
movss 0xa9816(%rip), %xmm0 # 0xb9e7c
mulss -0x24(%rbp), %xmm0
movss 0xa9809(%rip), %xmm1 # 0xb9e7c
mulss -0x24(%rbp), %xmm1
leaq -0x2c(%rbp), %rdi
callq 0x8930
leaq -0x8(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x107d0
movss -0x10(%rbp), %xmm0
movss 0xa9779(%rip), %xmm1 # 0xb9e14
divss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x8(%rbp), %xmm0
addss -0x30(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x4(%rbp), %xmm1
addss -0x10(%rbp), %xmm1
movss -0x30(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm0
movss 0xa9745(%rip), %xmm2 # 0xb9e1c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x2a8(%rax), %rax
movq %rax, -0x68(%rbp)
movss -0x34(%rbp), %xmm0
subss -0x30(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
subss -0x30(%rbp), %xmm1
leaq -0x40(%rbp), %rdi
callq 0x8930
movq -0x68(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2c920
movq -0x20(%rbp), %rax
movq 0x2a8(%rax), %rax
movq %rax, -0x60(%rbp)
movss -0x34(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
leaq -0x48(%rbp), %rdi
callq 0x8930
movq -0x60(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2c920
movq -0x20(%rbp), %rax
movq 0x2a8(%rax), %rax
movq %rax, -0x58(%rbp)
movss -0x34(%rbp), %xmm1
movss -0x30(%rbp), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss -0x38(%rbp), %xmm2
movss -0x30(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
addss %xmm1, %xmm1
addss %xmm2, %xmm1
leaq -0x50(%rbp), %rdi
callq 0x8930
movq -0x58(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2c920
movq -0x20(%rbp), %rax
movq 0x2a8(%rax), %rdi
movl -0xc(%rbp), %esi
movss -0x24(%rbp), %xmm0
xorl %edx, %edx
callq 0x2c950
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGuiWindow::ImGuiWindow(ImGuiContext*, char const*)
|
ImGuiWindow::ImGuiWindow(ImGuiContext* context, const char* name)
: DrawListInst(&context->DrawListSharedData)
{
Name = ImStrdup(name);
ID = ImHashStr(name);
IDStack.push_back(ID);
Flags = ImGuiWindowFlags_None;
Pos = ImVec2(0.0f, 0.0f);
Size = SizeFull = ImVec2(0.0f, 0.0f);
SizeContents = SizeContentsExplicit = ImVec2(0.0f, 0.0f);
WindowPadding = ImVec2(0.0f, 0.0f);
WindowRounding = 0.0f;
WindowBorderSize = 0.0f;
NameBufLen = (int)strlen(name) + 1;
MoveId = GetID("#MOVE");
ChildId = 0;
Scroll = ImVec2(0.0f, 0.0f);
ScrollTarget = ImVec2(FLT_MAX, FLT_MAX);
ScrollTargetCenterRatio = ImVec2(0.5f, 0.5f);
ScrollbarSizes = ImVec2(0.0f, 0.0f);
ScrollbarX = ScrollbarY = false;
Active = WasActive = false;
WriteAccessed = false;
Collapsed = false;
WantCollapseToggle = false;
SkipItems = false;
Appearing = false;
Hidden = false;
HasCloseButton = false;
ResizeBorderHeld = -1;
BeginCount = 0;
BeginOrderWithinParent = -1;
BeginOrderWithinContext = -1;
PopupId = 0;
AutoFitFramesX = AutoFitFramesY = -1;
AutoFitOnlyGrows = false;
AutoFitChildAxises = 0x00;
AutoPosLastDirection = ImGuiDir_None;
HiddenFramesCanSkipItems = HiddenFramesCannotSkipItems = 0;
SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = ImGuiCond_Always | ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing;
SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX);
LastFrameActive = -1;
ItemWidthDefault = 0.0f;
FontWindowScale = 1.0f;
SettingsIdx = -1;
DrawList = &DrawListInst;
DrawList->_OwnerName = Name;
ParentWindow = NULL;
RootWindow = NULL;
RootWindowForTitleBarHighlight = NULL;
RootWindowForNav = NULL;
NavLastIds[0] = NavLastIds[1] = 0;
NavRectRel[0] = NavRectRel[1] = ImRect();
NavLastChildNavWindow = NULL;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x90(%rbp)
addq $0x10, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0x18, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0x28, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0x30, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0x38, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0x40, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0x5c, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0x64, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0x6c, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0x74, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0xbc, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0xc4, %rdi
callq 0x2c260
movq -0x90(%rbp), %rdi
addq $0xd0, %rdi
movq %rdi, -0x98(%rbp)
callq 0x2cb00
movq -0x90(%rbp), %rdi
addq $0x1f0, %rdi # imm = 0x1F0
movq %rdi, -0x88(%rbp)
callq 0x2ce60
jmp 0x10bf7
movq -0x90(%rbp), %rdi
addq $0x200, %rdi # imm = 0x200
callq 0x2ce90
jmp 0x10c0c
movq -0x90(%rbp), %rdi
addq $0x210, %rdi # imm = 0x210
callq 0x2ce90
jmp 0x10c21
movq -0x90(%rbp), %rdi
addq $0x220, %rdi # imm = 0x220
callq 0x2ce90
jmp 0x10c36
movq -0x90(%rbp), %rdi
addq $0x230, %rdi # imm = 0x230
callq 0x2ce90
jmp 0x10c4b
movq -0x90(%rbp), %rdi
addq $0x240, %rdi # imm = 0x240
callq 0x2ce90
jmp 0x10c60
movq -0x90(%rbp), %rdi
addq $0x258, %rdi # imm = 0x258
callq 0x66e90
jmp 0x10c75
movq -0x90(%rbp), %rdi
addq $0x280, %rdi # imm = 0x280
movq %rdi, -0xa0(%rbp)
callq 0x2cee0
jmp 0x10c91
movq -0x90(%rbp), %rdi
addq $0x290, %rdi # imm = 0x290
movq %rdi, -0xa8(%rbp)
callq 0x2cf00
jmp 0x10cad
movq -0x90(%rbp), %rdi
addq $0x2b0, %rdi # imm = 0x2B0
movq %rdi, -0xb0(%rbp)
movq -0x10(%rbp), %rsi
addq $0x1910, %rsi # imm = 0x1910
callq 0x2cf30
jmp 0x10cd4
movq -0x90(%rbp), %rax
addq $0x388, %rax # imm = 0x388
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, -0xc0(%rbp)
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x2ce90
jmp 0x10d0b
movq -0xc0(%rbp), %rcx
movq -0xc8(%rbp), %rax
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, -0xb8(%rbp)
jne 0x10cf6
movq -0x18(%rbp), %rdi
callq 0xcb60
movq %rax, -0xd0(%rbp)
jmp 0x10d3b
movq -0x90(%rbp), %rax
movq -0xd0(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0xd260
movq -0x90(%rbp), %rdi
movq %rdi, %rsi
addq $0x8, %rsi
movl %eax, 0x8(%rdi)
addq $0x1f0, %rdi # imm = 0x1F0
callq 0x2d0a0
jmp 0x10d78
movq -0x90(%rbp), %rax
movl $0x0, 0xc(%rax)
leaq -0x2c(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x8930
jmp 0x10d97
movq -0x90(%rbp), %rax
movq -0x2c(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq -0x34(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x8930
jmp 0x10db7
movq -0x90(%rbp), %rax
movq -0x34(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq 0x20(%rax), %rcx
movq %rcx, 0x18(%rax)
leaq -0x3c(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x8930
jmp 0x10ddf
movq -0x90(%rbp), %rax
movq -0x3c(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq 0x38(%rax), %rcx
movq %rcx, 0x30(%rax)
leaq -0x44(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x8930
jmp 0x10e07
movq -0x90(%rbp), %rax
movq -0x44(%rbp), %rcx
movq %rcx, 0x40(%rax)
movl $0x0, 0x48(%rax)
movl $0x0, 0x4c(%rax)
movq -0x18(%rbp), %rdi
callq 0x7490
movq -0x90(%rbp), %rdi
incl %eax
movl %eax, 0x50(%rdi)
leaq 0xa989c(%rip), %rsi # 0xba6dc
xorl %eax, %eax
movl %eax, %edx
callq 0x11160
movl %eax, -0xd4(%rbp)
jmp 0x10e51
movq -0x90(%rbp), %rax
movl -0xd4(%rbp), %ecx
movl %ecx, 0x54(%rax)
movl $0x0, 0x58(%rax)
leaq -0x4c(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x8930
jmp 0x10e79
movq -0x90(%rbp), %rax
movq -0x4c(%rbp), %rcx
movq %rcx, 0x5c(%rax)
leaq -0x54(%rbp), %rdi
movss 0xa8fcc(%rip), %xmm1 # 0xb9e60
movaps %xmm1, %xmm0
callq 0x8930
jmp 0x10e9e
movq -0x90(%rbp), %rax
movq -0x54(%rbp), %rcx
movq %rcx, 0x64(%rax)
leaq -0x5c(%rbp), %rdi
movss 0xa8f63(%rip), %xmm1 # 0xb9e1c
movaps %xmm1, %xmm0
callq 0x8930
jmp 0x10ec3
movq -0x90(%rbp), %rax
movq -0x5c(%rbp), %rcx
movq %rcx, 0x6c(%rax)
leaq -0x64(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x8930
jmp 0x10ee3
movq -0x90(%rbp), %rax
movq -0x64(%rbp), %rcx
movq %rcx, 0x74(%rax)
movb $0x0, 0x7d(%rax)
movb $0x0, 0x7c(%rax)
movb $0x0, 0x7f(%rax)
movb $0x0, 0x7e(%rax)
movb $0x0, 0x80(%rax)
movb $0x0, 0x81(%rax)
movb $0x0, 0x82(%rax)
movb $0x0, 0x83(%rax)
movb $0x0, 0x84(%rax)
movb $0x0, 0x85(%rax)
movb $0x0, 0x86(%rax)
movb $-0x1, 0x87(%rax)
movw $0x0, 0x88(%rax)
movw $0xffff, 0x8a(%rax) # imm = 0xFFFF
movw $0xffff, 0x8c(%rax) # imm = 0xFFFF
movl $0x0, 0x90(%rax)
movl $0xffffffff, 0x98(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x94(%rax) # imm = 0xFFFFFFFF
movb $0x0, 0x9c(%rax)
movl $0x0, 0xa0(%rax)
movl $0xffffffff, 0xa4(%rax) # imm = 0xFFFFFFFF
movl $0x0, 0xac(%rax)
movl $0x0, 0xa8(%rax)
movl $0xf, 0xb8(%rax)
movl $0xf, 0xb4(%rax)
movl $0xf, 0xb0(%rax)
leaq -0x6c(%rbp), %rdi
movss 0xa8e94(%rip), %xmm1 # 0xb9e60
movaps %xmm1, %xmm0
callq 0x8930
jmp 0x10fd6
movq -0x90(%rbp), %rax
movq -0x6c(%rbp), %rcx
movq %rcx, 0xc4(%rax)
movq 0xc4(%rax), %rcx
movq %rcx, 0xbc(%rax)
movl $0xffffffff, 0x250(%rax) # imm = 0xFFFFFFFF
movl $0x0, 0x254(%rax)
movl $0x3f800000, 0x2a0(%rax) # imm = 0x3F800000
movl $0xffffffff, 0x2a4(%rax) # imm = 0xFFFFFFFF
movq %rax, %rcx
addq $0x2b0, %rcx # imm = 0x2B0
movq %rcx, 0x2a8(%rax)
movq (%rax), %rdx
movq 0x2a8(%rax), %rcx
movq %rdx, 0x40(%rcx)
movq $0x0, 0x358(%rax)
movq $0x0, 0x360(%rax)
movq $0x0, 0x368(%rax)
movq $0x0, 0x370(%rax)
movl $0x0, 0x384(%rax)
movl $0x0, 0x380(%rax)
leaq -0x7c(%rbp), %rdi
callq 0x2ce90
jmp 0x11088
movq -0x90(%rbp), %rax
movq -0x7c(%rbp), %rcx
movq %rcx, 0x398(%rax)
movq -0x74(%rbp), %rcx
movq %rcx, 0x3a0(%rax)
movq 0x398(%rax), %rcx
movq %rcx, 0x388(%rax)
movq 0x3a0(%rax), %rcx
movq %rcx, 0x390(%rax)
movq $0x0, 0x378(%rax)
addq $0xe0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x11149
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1113d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x11131
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x11125
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2d100
movq -0xa8(%rbp), %rdi
callq 0x2d190
movq -0xa0(%rbp), %rdi
callq 0x2d1d0
movq -0x88(%rbp), %rdi
callq 0x2d1f0
movq -0x98(%rbp), %rdi
callq 0x2d230
movq -0x20(%rbp), %rdi
callq 0x7740
nop
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::ItemAdd(ImRect const&, unsigned int, ImRect const*)
|
bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg)
{
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
if (id != 0)
{
// Navigation processing runs prior to clipping early-out
// (a) So that NavInitRequest can be honored, for newly opened windows to select a default widget
// (b) So that we can scroll up/down past clipped items. This adds a small O(N) cost to regular navigation requests unfortunately, but it is still limited to one window.
// it may not scale very well for windows with ten of thousands of item, but at least NavMoveRequest is only set on user interaction, aka maximum once a frame.
// We could early out with "if (is_clipped && !g.NavInitRequest) return false;" but when we wouldn't be able to reach unclipped widgets. This would work if user had explicit scrolling control (e.g. mapped on a stick)
window->DC.NavLayerActiveMaskNext |= window->DC.NavLayerCurrentMask;
if (g.NavId == id || g.NavAnyRequest)
if (g.NavWindow->RootWindowForNav == window->RootWindowForNav)
if (window == g.NavWindow || ((window->Flags | g.NavWindow->Flags) & ImGuiWindowFlags_NavFlattened))
NavProcessItem(window, nav_bb_arg ? *nav_bb_arg : bb, id);
}
window->DC.LastItemId = id;
window->DC.LastItemRect = bb;
window->DC.LastItemStatusFlags = ImGuiItemStatusFlags_None;
#ifdef IMGUI_ENABLE_TEST_ENGINE
if (id != 0)
IMGUI_TEST_ENGINE_ITEM_ADD(nav_bb_arg ? *nav_bb_arg : bb, id);
#endif
// Clipping test
const bool is_clipped = IsClippedEx(bb, id, false);
if (is_clipped)
return false;
//if (g.IO.KeyAlt) window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255,255,0,120)); // [DEBUG]
// We need to calculate this now to take account of the current clipping rectangle (as items like Selectable may change them)
if (IsMouseHoveringRect(bb.Min, bb.Max))
window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_HoveredRect;
return true;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq 0xebfc6(%rip), %rax # 0xfdd60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x1a08(%rax), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x11e77
movq -0x30(%rbp), %rax
movl 0x13c(%rax), %ecx
movq -0x30(%rbp), %rax
orl 0x144(%rax), %ecx
movl %ecx, 0x144(%rax)
movq -0x28(%rbp), %rax
movl 0x1b60(%rax), %eax
cmpl -0x14(%rbp), %eax
je 0x11df1
movq -0x28(%rbp), %rax
testb $0x1, 0x1bd0(%rax)
je 0x11e75
movq -0x28(%rbp), %rax
movq 0x1b58(%rax), %rax
movq 0x370(%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x370(%rcx), %rax
jne 0x11e73
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x1b58(%rcx), %rax
je 0x11e40
movq -0x30(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x28(%rbp), %rcx
movq 0x1b58(%rcx), %rcx
orl 0xc(%rcx), %eax
andl $0x800000, %eax # imm = 0x800000
cmpl $0x0, %eax
je 0x11e71
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x11e59
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x11e61
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x11f10
jmp 0x11e73
jmp 0x11e75
jmp 0x11e77
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x110(%rax)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, 0x118(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x120(%rax)
movq -0x30(%rbp), %rax
movl $0x0, 0x114(%rax)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
xorl %edx, %edx
callq 0x122d0
andb $0x1, %al
movb %al, -0x31(%rbp)
testb $0x1, -0x31(%rbp)
je 0x11ece
movb $0x0, -0x1(%rbp)
jmp 0x11f01
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movl $0x1, %edx
callq 0x12360
testb $0x1, %al
jne 0x11eea
jmp 0x11efd
movq -0x30(%rbp), %rax
movl 0x114(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x114(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::CalcWrapWidthForPos(ImVec2 const&, float)
|
float ImGui::CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x)
{
if (wrap_pos_x < 0.0f)
return 0.0f;
ImGuiWindow* window = GImGui->CurrentWindow;
if (wrap_pos_x == 0.0f)
wrap_pos_x = GetWorkRectMax().x;
else if (wrap_pos_x > 0.0f)
wrap_pos_x += window->Pos.x - window->Scroll.x; // wrap_pos_x is provided is window local space
return ImMax(wrap_pos_x - pos.x, 1.0f);
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x14(%rbp), %xmm0
jbe 0x129c7
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x12a48
movq 0xeb392(%rip), %rax # 0xfdd60
movq 0x1a08(%rax), %rax
movq %rax, -0x20(%rbp)
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x129fe
jp 0x129fe
callq 0x12a60
movlpd %xmm0, -0x28(%rbp)
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x14(%rbp)
jmp 0x12a29
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x12a27
movq -0x20(%rbp), %rax
movss 0x10(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0x5c(%rax), %xmm0
addss -0x14(%rbp), %xmm0
movss %xmm0, -0x14(%rbp)
jmp 0x12a29
movss -0x14(%rbp), %xmm0
movq -0x10(%rbp), %rax
subss (%rax), %xmm0
movss 0xa65d2(%rip), %xmm1 # 0xb9010
callq 0xfe10
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::FocusTopMostWindowUnderOne(ImGuiWindow*, ImGuiWindow*)
|
void ImGui::FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWindow* ignore_window)
{
ImGuiContext& g = *GImGui;
int start_idx = g.WindowsFocusOrder.Size - 1;
if (under_this_window != NULL)
{
int under_this_window_idx = FindWindowFocusIndex(under_this_window);
if (under_this_window_idx != -1)
start_idx = under_this_window_idx - 1;
}
for (int i = start_idx; i >= 0; i--)
{
// We may later decide to test for different NoXXXInputs based on the active navigation input (mouse vs nav) but that may feel more confusing to the user.
ImGuiWindow* window = g.WindowsFocusOrder[i];
if (window != ignore_window && window->WasActive && !(window->Flags & ImGuiWindowFlags_ChildWindow))
if ((window->Flags & (ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs)) != (ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs))
{
ImGuiWindow* focus_window = NavRestoreLastChildNavWindow(window);
FocusWindow(focus_window);
return;
}
}
FocusWindow(NULL);
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0xe64f9(%rip), %rax # 0xfdd60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x19c0(%rax), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1789f
movq -0x8(%rbp), %rdi
callq 0x211f0
movl %eax, -0x20(%rbp)
cmpl $-0x1, -0x20(%rbp)
je 0x1789d
movl -0x20(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1789f
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x17924
movq -0x18(%rbp), %rdi
addq $0x19c0, %rdi # imm = 0x19C0
movl -0x24(%rbp), %esi
callq 0x2e2e0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x17917
movq -0x30(%rbp), %rax
testb $0x1, 0x7f(%rax)
je 0x17917
movq -0x30(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x1000000, %eax # imm = 0x1000000
cmpl $0x0, %eax
jne 0x17917
movq -0x30(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x40200, %eax # imm = 0x40200
cmpl $0x40200, %eax # imm = 0x40200
je 0x17915
movq -0x30(%rbp), %rdi
callq 0x21260
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x135a0
jmp 0x1792d
jmp 0x17917
jmp 0x17919
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x178a5
xorl %eax, %eax
movl %eax, %edi
callq 0x135a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::SetNextWindowSize(ImVec2 const&, int)
|
void ImGui::SetNextWindowSize(const ImVec2& size, ImGuiCond cond)
{
ImGuiContext& g = *GImGui;
IM_ASSERT(cond == 0 || ImIsPowerOfTwo(cond)); // Make sure the user doesn't attempt to combine multiple condition flags.
g.NextWindowData.SizeVal = size;
g.NextWindowData.SizeCond = cond ? cond : ImGuiCond_Always;
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq 0xe640a(%rip), %rax # 0xfdd60
movq %rax, -0x18(%rbp)
movb $0x1, %al
cmpl $0x0, -0xc(%rbp)
movb %al, -0x19(%rbp)
je 0x17970
movl -0xc(%rbp), %edi
callq 0x223f0
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x17979
jmp 0x1797b
jmp 0x1799a
leaq 0xa4746(%rip), %rdi # 0xbc0c8
leaq 0xa2c2a(%rip), %rsi # 0xba5b3
movl $0x18f0, %edx # imm = 0x18F0
leaq 0xa4824(%rip), %rcx # 0xbc1b9
callq 0x71e0
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, 0x1b0c(%rax)
cmpl $0x0, -0xc(%rbp)
je 0x179ba
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x179c4
movl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x179c4
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1ae4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
SettingsHandlerWindow_ReadLine(ImGuiContext*, ImGuiSettingsHandler*, void*, char const*)
|
static void SettingsHandlerWindow_ReadLine(ImGuiContext* ctx, ImGuiSettingsHandler*, void* entry, const char* line)
{
ImGuiContext& g = *ctx;
ImGuiWindowSettings* settings = (ImGuiWindowSettings*)entry;
float x, y;
int i;
if (sscanf(line, "Pos=%f,%f", &x, &y) == 2) settings->Pos = ImVec2(x, y);
else if (sscanf(line, "Size=%f,%f", &x, &y) == 2) settings->Size = ImMax(ImVec2(x, y), g.Style.WindowMinSize);
else if (sscanf(line, "Collapsed=%d", &i) == 1) settings->Collapsed = (i != 0);
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
leaq 0xa2d04(%rip), %rsi # 0xbdc07
leaq -0x34(%rbp), %rdx
leaq -0x38(%rbp), %rcx
movb $0x0, %al
callq 0x7110
cmpl $0x2, %eax
jne 0x1af3b
movss -0x34(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
leaq -0x44(%rbp), %rdi
callq 0x8930
movq -0x30(%rbp), %rax
movq -0x44(%rbp), %rcx
movq %rcx, 0xc(%rax)
jmp 0x1afc8
movq -0x20(%rbp), %rdi
leaq 0xa2ccb(%rip), %rsi # 0xbdc11
leaq -0x34(%rbp), %rdx
leaq -0x38(%rbp), %rcx
movb $0x0, %al
callq 0x7110
cmpl $0x2, %eax
jne 0x1af98
movss -0x34(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
leaq -0x54(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x8930
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x156c, %rsi # imm = 0x156C
callq 0x1eed0
movlpd %xmm0, -0x4c(%rbp)
movq -0x30(%rbp), %rax
movq -0x4c(%rbp), %rcx
movq %rcx, 0x14(%rax)
jmp 0x1afc6
movq -0x20(%rbp), %rdi
leaq 0xa2c79(%rip), %rsi # 0xbdc1c
leaq -0x3c(%rbp), %rdx
movb $0x0, %al
callq 0x7110
cmpl $0x1, %eax
jne 0x1afc4
cmpl $0x0, -0x3c(%rbp)
setne %cl
movq -0x30(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x1c(%rax)
jmp 0x1afc6
jmp 0x1afc8
addq $0x60, %rsp
popq %rbp
retq
nop
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::End()
|
void ImGui::End()
{
ImGuiContext& g = *GImGui;
if (g.CurrentWindowStack.Size <= 1 && g.FrameScopePushedImplicitWindow)
{
IM_ASSERT(g.CurrentWindowStack.Size > 1 && "Calling End() too many times!");
return; // FIXME-ERRORHANDLING
}
IM_ASSERT(g.CurrentWindowStack.Size > 0);
ImGuiWindow* window = g.CurrentWindow;
if (window->DC.CurrentColumns != NULL)
EndColumns();
PopClipRect(); // Inner window clip rectangle
// Stop logging
if (!(window->Flags & ImGuiWindowFlags_ChildWindow)) // FIXME: add more options for scope of logging
LogFinish();
// Pop from window stack
g.CurrentWindowStack.pop_back();
if (window->Flags & ImGuiWindowFlags_Popup)
g.BeginPopupStack.pop_back();
CheckStacksSize(window, false);
SetCurrentWindow(g.CurrentWindowStack.empty() ? NULL : g.CurrentWindowStack.back());
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0xe2421(%rip), %rax # 0xfdd60
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x19e0(%rax)
jg 0x1b9a2
movq -0x8(%rbp), %rax
testb $0x1, 0x2(%rax)
je 0x1b9a2
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x1, 0x19e0(%rcx)
movb %al, -0x11(%rbp)
jle 0x1b973
movb $0x1, %al
movb %al, -0x11(%rbp)
jmp 0x1b973
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x1b97c
jmp 0x1b97e
jmp 0x1b99d
leaq 0xa024c(%rip), %rdi # 0xbbbd1
leaq 0x9ec27(%rip), %rsi # 0xba5b3
movl $0x1609, %edx # imm = 0x1609
leaq 0xa027a(%rip), %rcx # 0xbbc12
callq 0x71e0
jmp 0x1ba87
movq -0x8(%rbp), %rax
cmpl $0x0, 0x19e0(%rax)
jle 0x1b9b1
jmp 0x1b9d0
leaq 0xa026c(%rip), %rdi # 0xbbc24
leaq 0x9ebf4(%rip), %rsi # 0xba5b3
movl $0x160c, %edx # imm = 0x160C
leaq 0xa0247(%rip), %rcx # 0xbbc12
callq 0x71e0
movq -0x8(%rbp), %rax
movq 0x1a08(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1e8(%rax)
je 0x1b9f2
callq 0x20960
callq 0x1b410
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x1000000, %eax # imm = 0x1000000
cmpl $0x0, %eax
jne 0x1ba0d
callq 0x20dd0
movq -0x8(%rbp), %rdi
addq $0x19e0, %rdi # imm = 0x19E0
callq 0x2f540
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x4000000, %eax # imm = 0x4000000
cmpl $0x0, %eax
je 0x1ba3e
movq -0x8(%rbp), %rdi
addq $0x1ad0, %rdi # imm = 0x1AD0
callq 0x2f590
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x1e9b0
movq -0x8(%rbp), %rdi
addq $0x19e0, %rdi # imm = 0x19E0
callq 0x2eeb0
testb $0x1, %al
jne 0x1ba5f
jmp 0x1ba67
xorl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0x1ba7e
movq -0x8(%rbp), %rdi
addq $0x19e0, %rdi # imm = 0x19E0
callq 0x2eed0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1ee70
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::NavUpdateWindowingList()
|
void ImGui::NavUpdateWindowingList()
{
ImGuiContext& g = *GImGui;
IM_ASSERT(g.NavWindowingTarget != NULL);
if (g.NavWindowingTimer < NAV_WINDOWING_LIST_APPEAR_DELAY)
return;
if (g.NavWindowingList == NULL)
g.NavWindowingList = FindWindowByName("###NavWindowingList");
SetNextWindowSizeConstraints(ImVec2(g.IO.DisplaySize.x * 0.20f, g.IO.DisplaySize.y * 0.20f), ImVec2(FLT_MAX, FLT_MAX));
SetNextWindowPos(g.IO.DisplaySize * 0.5f, ImGuiCond_Always, ImVec2(0.5f, 0.5f));
PushStyleVar(ImGuiStyleVar_WindowPadding, g.Style.WindowPadding * 2.0f);
Begin("###NavWindowingList", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings);
for (int n = g.WindowsFocusOrder.Size - 1; n >= 0; n--)
{
ImGuiWindow* window = g.WindowsFocusOrder[n];
if (!IsWindowNavFocusable(window))
continue;
const char* label = window->Name;
if (label == FindRenderedTextEnd(label))
label = GetFallbackWindowNameForWindowingList(window);
Selectable(label, g.NavWindowingTarget == window);
}
End();
PopStyleVar();
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq 0xe22be(%rip), %rax # 0xfdd60
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1ba0(%rax)
je 0x1bab6
jmp 0x1bad5
leaq 0xa201a(%rip), %rdi # 0xbdad7
leaq 0x9eaef(%rip), %rsi # 0xba5b3
movl $0x209d, %edx # imm = 0x209D
leaq 0xa2026(%rip), %rcx # 0xbdaf6
callq 0x71e0
movq -0x8(%rbp), %rax
movss 0x9e3d3(%rip), %xmm0 # 0xb9eb4
ucomiss 0x1bb8(%rax), %xmm0
jbe 0x1baef
jmp 0x1bcda
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1bb0(%rax)
jne 0x1bb17
leaq 0xa2017(%rip), %rdi # 0xbdb1b
callq 0x1de60
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x1bb0(%rax)
movq -0x8(%rbp), %rax
movss 0x10(%rax), %xmm0
movss 0x14(%rax), %xmm1
movss 0x9e34b(%rip), %xmm2 # 0xb9e78
mulss %xmm2, %xmm0
mulss %xmm2, %xmm1
leaq -0x10(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x8930
leaq -0x18(%rbp), %rdi
movq %rdi, -0x68(%rbp)
movss 0x9e30e(%rip), %xmm1 # 0xb9e60
movaps %xmm1, %xmm0
callq 0x8930
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x22740
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movss 0x9e29e(%rip), %xmm0 # 0xb9e1c
movss %xmm0, -0x5c(%rbp)
callq 0xb900
movss -0x5c(%rbp), %xmm1
movlpd %xmm0, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0x58(%rbp)
movaps %xmm1, %xmm0
callq 0x8930
movq -0x58(%rbp), %rdx
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x22690
movq -0x8(%rbp), %rdi
addq $0x155c, %rdi # imm = 0x155C
movss 0x9d4b5(%rip), %xmm0 # 0xb907c
callq 0xb900
movlpd %xmm0, -0x30(%rbp)
movl $0x1, %edi
leaq -0x30(%rbp), %rsi
callq 0x1dbf0
leaq 0xa1f35(%rip), %rdi # 0xbdb1b
xorl %eax, %eax
movl %eax, %esi
movl $0xc1347, %edx # imm = 0xC1347
callq 0x179e0
movq -0x8(%rbp), %rax
movl 0x19c0(%rax), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jl 0x1bccb
movq -0x8(%rbp), %rdi
addq $0x19c0, %rdi # imm = 0x19C0
movl -0x34(%rbp), %esi
callq 0x2e2e0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x22240
testb $0x1, %al
jne 0x1bc3a
jmp 0x1bcbd
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf5e0
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jne 0x1bc73
movq -0x40(%rbp), %rdi
callq 0x2bb60
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rax
movq 0x1ba0(%rax), %rax
cmpq -0x40(%rbp), %rax
sete %al
movb %al, -0x81(%rbp)
leaq -0x50(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x8930
movb -0x81(%rbp), %al
movq -0x80(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
xorl %edx, %edx
leaq -0x50(%rbp), %rcx
callq 0x54190
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1bc04
callq 0x1b930
movl $0x1, %edi
callq 0x1dcb0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
ImGui::Render()
|
void ImGui::Render()
{
ImGuiContext& g = *GImGui;
IM_ASSERT(g.Initialized);
if (g.FrameCountEnded != g.FrameCount)
EndFrame();
g.FrameCountRendered = g.FrameCount;
// Gather ImDrawList to render (for each active window)
g.IO.MetricsRenderVertices = g.IO.MetricsRenderIndices = g.IO.MetricsRenderWindows = 0;
g.DrawDataBuilder.Clear();
if (!g.BackgroundDrawList.VtxBuffer.empty())
AddDrawListToDrawData(&g.DrawDataBuilder.Layers[0], &g.BackgroundDrawList);
ImGuiWindow* windows_to_render_front_most[2];
windows_to_render_front_most[0] = (g.NavWindowingTarget && !(g.NavWindowingTarget->Flags & ImGuiWindowFlags_NoBringToFrontOnFocus)) ? g.NavWindowingTarget->RootWindow : NULL;
windows_to_render_front_most[1] = g.NavWindowingTarget ? g.NavWindowingList : NULL;
for (int n = 0; n != g.Windows.Size; n++)
{
ImGuiWindow* window = g.Windows[n];
if (IsWindowActiveAndVisible(window) && (window->Flags & ImGuiWindowFlags_ChildWindow) == 0 && window != windows_to_render_front_most[0] && window != windows_to_render_front_most[1])
AddRootWindowToDrawData(window);
}
for (int n = 0; n < IM_ARRAYSIZE(windows_to_render_front_most); n++)
if (windows_to_render_front_most[n] && IsWindowActiveAndVisible(windows_to_render_front_most[n])) // NavWindowingTarget is always temporarily displayed as the front-most window
AddRootWindowToDrawData(windows_to_render_front_most[n]);
g.DrawDataBuilder.FlattenIntoSingleLayer();
// Draw software mouse cursor if requested
if (g.IO.MouseDrawCursor)
RenderMouseCursor(&g.ForegroundDrawList, g.IO.MousePos, g.Style.MouseCursorScale, g.MouseCursor);
if (!g.ForegroundDrawList.VtxBuffer.empty())
AddDrawListToDrawData(&g.DrawDataBuilder.Layers[0], &g.ForegroundDrawList);
// Setup ImDrawData structure for end-user
SetupDrawData(&g.DrawDataBuilder.Layers[0], &g.DrawData);
g.IO.MetricsRenderVertices = g.DrawData.TotalVtxCount;
g.IO.MetricsRenderIndices = g.DrawData.TotalIdxCount;
// (Legacy) Call the Render callback function. The current prefer way is to let the user retrieve GetDrawData() and call the render function themselves.
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
if (g.DrawData.CmdListsCount > 0 && g.IO.RenderDrawListsFn != NULL)
g.IO.RenderDrawListsFn(&g.DrawData);
#endif
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0xe1dd1(%rip), %rax # 0xfdd60
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, (%rax)
je 0x1bf9e
jmp 0x1bfbd
leaq 0x9ec66(%rip), %rdi # 0xbac0b
leaq 0x9e607(%rip), %rsi # 0xba5b3
movl $0xf6c, %edx # imm = 0xF6C
leaq 0x9f5e8(%rip), %rcx # 0xbb5a0
callq 0x71e0
movq -0x8(%rbp), %rax
movl 0x19a4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x19a0(%rcx), %eax
je 0x1bfd8
callq 0x1b480
movq -0x8(%rbp), %rax
movl 0x19a0(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x19a8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x3a8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x3a4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x3a0(%rax)
movq -0x8(%rbp), %rdi
addq $0x1cf0, %rdi # imm = 0x1CF0
callq 0x2ed30
movq -0x8(%rbp), %rdi
addq $0x1d18, %rdi # imm = 0x1D18
addq $0x20, %rdi
callq 0x2ed80
testb $0x1, %al
jne 0x1c059
movq -0x8(%rbp), %rdi
addq $0x1cf0, %rdi # imm = 0x1CF0
movq -0x8(%rbp), %rsi
addq $0x1d18, %rsi # imm = 0x1D18
callq 0x1c270
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1ba0(%rax)
je 0x1c097
movq -0x8(%rbp), %rax
movq 0x1ba0(%rax), %rax
movl 0xc(%rax), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
jne 0x1c097
movq -0x8(%rbp), %rax
movq 0x1ba0(%rax), %rax
movq 0x360(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x1c09f
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x1c09f
movq -0x48(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1ba0(%rax)
je 0x1c0c6
movq -0x8(%rbp), %rax
movq 0x1bb0(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x1c0ce
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0x1c0ce
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x19b0(%rcx), %eax
je 0x1c150
movq -0x8(%rbp), %rdi
addq $0x19b0, %rdi # imm = 0x19B0
movl -0x24(%rbp), %esi
callq 0x2e2e0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x1c420
testb $0x1, %al
jne 0x1c115
jmp 0x1c143
movq -0x30(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x1000000, %eax # imm = 0x1000000
cmpl $0x0, %eax
jne 0x1c143
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x1c143
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x1c143
movq -0x30(%rbp), %rdi
callq 0x1c450
jmp 0x1c145
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1c0dd
movl $0x0, -0x34(%rbp)
cmpl $0x2, -0x34(%rbp)
jge 0x1c198
movslq -0x34(%rbp), %rax
cmpq $0x0, -0x20(%rbp,%rax,8)
je 0x1c18b
movslq -0x34(%rbp), %rax
movq -0x20(%rbp,%rax,8), %rdi
callq 0x1c420
testb $0x1, %al
jne 0x1c17d
jmp 0x1c18b
movslq -0x34(%rbp), %rax
movq -0x20(%rbp,%rax,8), %rdi
callq 0x1c450
jmp 0x1c18d
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1c157
movq -0x8(%rbp), %rdi
addq $0x1cf0, %rdi # imm = 0x1CF0
callq 0x1b280
movq -0x8(%rbp), %rax
testb $0x1, 0xc0(%rax)
je 0x1c1ea
movq -0x8(%rbp), %rax
movq %rax, %rdi
addq $0x1dc0, %rdi # imm = 0x1DC0
movq 0x120(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movss 0x15f4(%rax), %xmm1
movl 0x1e68(%rax), %esi
movsd -0x40(%rbp), %xmm0
callq 0x42470
movq -0x8(%rbp), %rdi
addq $0x1dc0, %rdi # imm = 0x1DC0
addq $0x20, %rdi
callq 0x2ed80
testb $0x1, %al
jne 0x1c21d
movq -0x8(%rbp), %rdi
addq $0x1cf0, %rdi # imm = 0x1CF0
movq -0x8(%rbp), %rsi
addq $0x1dc0, %rsi # imm = 0x1DC0
callq 0x1c270
movq -0x8(%rbp), %rdi
addq $0x1cf0, %rdi # imm = 0x1CF0
movq -0x8(%rbp), %rsi
addq $0x1cb8, %rsi # imm = 0x1CB8
callq 0x1c4b0
movq -0x8(%rbp), %rax
movl 0x1cd0(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x3a0(%rax)
movq -0x8(%rbp), %rax
movl 0x1ccc(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x3a4(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui.cpp
|
stbtt_GetGlyphBitmapBoxSubpixel(stbtt_fontinfo const*, int, float, float, float, float, int*, int*, int*, int*)
|
STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1)
{
int x0=0,y0=0,x1,y1; // =0 suppresses compiler warning
if (!stbtt_GetGlyphBox(font, glyph, &x0,&y0,&x1,&y1)) {
// e.g. space character
if (ix0) *ix0 = 0;
if (iy0) *iy0 = 0;
if (ix1) *ix1 = 0;
if (iy1) *iy1 = 0;
} else {
// move to integral bboxes (treating pixels as little squares, what pixels get touched)?
if (ix0) *ix0 = STBTT_ifloor( x0 * scale_x + shift_x);
if (iy0) *iy0 = STBTT_ifloor(-y1 * scale_y + shift_y);
if (ix1) *ix1 = STBTT_iceil ( x1 * scale_x + shift_x);
if (iy1) *iy1 = STBTT_iceil (-y0 * scale_y + shift_y);
}
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movss %xmm1, -0x14(%rbp)
movss %xmm2, -0x18(%rbp)
movss %xmm3, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x44(%rbp), %rdx
leaq -0x48(%rbp), %rcx
leaq -0x4c(%rbp), %r8
leaq -0x50(%rbp), %r9
callq 0x44880
cmpl $0x0, %eax
jne 0x3f85b
cmpq $0x0, -0x28(%rbp)
je 0x3f823
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x3f834
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x0, -0x38(%rbp)
je 0x3f845
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x0, -0x40(%rbp)
je 0x3f856
movq -0x40(%rbp), %rax
movl $0x0, (%rax)
jmp 0x3f919
cmpq $0x0, -0x28(%rbp)
je 0x3f888
cvtsi2ssl -0x44(%rbp), %xmm0
movss -0x10(%rbp), %xmm2
movss -0x18(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0x449a0
cvttss2si %xmm0, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x3f8b9
xorl %eax, %eax
subl -0x50(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss -0x14(%rbp), %xmm2
movss -0x1c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0x449a0
cvttss2si %xmm0, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x38(%rbp)
je 0x3f8e6
cvtsi2ssl -0x4c(%rbp), %xmm0
movss -0x10(%rbp), %xmm2
movss -0x18(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0x449c0
cvttss2si %xmm0, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x40(%rbp)
je 0x3f917
xorl %eax, %eax
subl -0x48(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss -0x14(%rbp), %xmm2
movss -0x1c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0x449c0
cvttss2si %xmm0, %ecx
movq -0x40(%rbp), %rax
movl %ecx, (%rax)
jmp 0x3f919
addq $0x50, %rsp
popq %rbp
retq
nop
|
/kidanger[P]vpe/imgui-1.70/imstb_truetype.h
|
ImFont::AddGlyph(unsigned short, float, float, float, float, float, float, float, float, float)
|
void ImFont::AddGlyph(ImWchar codepoint, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x)
{
Glyphs.resize(Glyphs.Size + 1);
ImFontGlyph& glyph = Glyphs.back();
glyph.Codepoint = (ImWchar)codepoint;
glyph.X0 = x0;
glyph.Y0 = y0;
glyph.X1 = x1;
glyph.Y1 = y1;
glyph.U0 = u0;
glyph.V0 = v0;
glyph.U1 = u1;
glyph.V1 = v1;
glyph.AdvanceX = advance_x + ConfigData->GlyphExtraSpacing.x; // Bake spacing into AdvanceX
if (ConfigData->PixelSnapH)
glyph.AdvanceX = (float)(int)(glyph.AdvanceX + 0.5f);
// Compute rough surface usage metrics (+1 to account for average padding, +0.99 to round)
DirtyLookupTables = true;
MetricsTotalSurface += (int)((glyph.U1 - glyph.U0) * ContainerAtlas->TexWidth + 1.99f) * (int)((glyph.V1 - glyph.V0) * ContainerAtlas->TexHeight + 1.99f);
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movss 0x10(%rbp), %xmm8
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movss %xmm0, -0x10(%rbp)
movss %xmm1, -0x14(%rbp)
movss %xmm2, -0x18(%rbp)
movss %xmm3, -0x1c(%rbp)
movss %xmm4, -0x20(%rbp)
movss %xmm5, -0x24(%rbp)
movss %xmm6, -0x28(%rbp)
movss %xmm7, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rax, %rdi
addq $0x28, %rdi
movl 0x28(%rax), %esi
addl $0x1, %esi
callq 0x4d470
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
callq 0x4d410
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x38(%rbp)
movw -0xa(%rbp), %dx
movq -0x38(%rbp), %rcx
movw %dx, (%rcx)
movss -0x10(%rbp), %xmm0
movq -0x38(%rbp), %rcx
movss %xmm0, 0x8(%rcx)
movss -0x14(%rbp), %xmm0
movq -0x38(%rbp), %rcx
movss %xmm0, 0xc(%rcx)
movss -0x18(%rbp), %xmm0
movq -0x38(%rbp), %rcx
movss %xmm0, 0x10(%rcx)
movss -0x1c(%rbp), %xmm0
movq -0x38(%rbp), %rcx
movss %xmm0, 0x14(%rcx)
movss -0x20(%rbp), %xmm0
movq -0x38(%rbp), %rcx
movss %xmm0, 0x18(%rcx)
movss -0x24(%rbp), %xmm0
movq -0x38(%rbp), %rcx
movss %xmm0, 0x1c(%rcx)
movss -0x28(%rbp), %xmm0
movq -0x38(%rbp), %rcx
movss %xmm0, 0x20(%rcx)
movss -0x2c(%rbp), %xmm0
movq -0x38(%rbp), %rcx
movss %xmm0, 0x24(%rcx)
movss 0x10(%rbp), %xmm0
movq 0x50(%rax), %rcx
addss 0x24(%rcx), %xmm0
movq -0x38(%rbp), %rcx
movss %xmm0, 0x4(%rcx)
movq 0x50(%rax), %rax
testb $0x1, 0x20(%rax)
je 0x40b91
movq -0x38(%rbp), %rax
movss 0x792a1(%rip), %xmm0 # 0xb9e1c
addss 0x4(%rax), %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movq -0x38(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x40(%rbp), %rax
movb $0x1, 0x6c(%rax)
movq -0x38(%rbp), %rcx
movss 0x20(%rcx), %xmm0
movq -0x38(%rbp), %rcx
subss 0x18(%rcx), %xmm0
movq 0x48(%rax), %rcx
cvtsi2ssl 0x28(%rcx), %xmm1
mulss %xmm1, %xmm0
movss 0x7defc(%rip), %xmm1 # 0xbeabc
addss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movq -0x38(%rbp), %rdx
movss 0x24(%rdx), %xmm0
movq -0x38(%rbp), %rdx
subss 0x1c(%rdx), %xmm0
movq 0x48(%rax), %rdx
cvtsi2ssl 0x2c(%rdx), %xmm1
mulss %xmm1, %xmm0
movss 0x7decd(%rip), %xmm1 # 0xbeabc
addss %xmm1, %xmm0
cvttss2si %xmm0, %edx
imull %edx, %ecx
addl 0x68(%rax), %ecx
movl %ecx, 0x68(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui_draw.cpp
|
ImFontAtlasBuildFinish(ImFontAtlas*)
|
void ImFontAtlasBuildFinish(ImFontAtlas* atlas)
{
// Render into our custom data block
ImFontAtlasBuildRenderDefaultTexData(atlas);
// Register custom rectangle glyphs
for (int i = 0; i < atlas->CustomRects.Size; i++)
{
const ImFontAtlas::CustomRect& r = atlas->CustomRects[i];
if (r.Font == NULL || r.ID > 0x10000)
continue;
IM_ASSERT(r.Font->ContainerAtlas == atlas);
ImVec2 uv0, uv1;
atlas->CalcCustomRectUV(&r, &uv0, &uv1);
r.Font->AddGlyph((ImWchar)r.ID, r.GlyphOffset.x, r.GlyphOffset.y, r.GlyphOffset.x + r.Width, r.GlyphOffset.y + r.Height, uv0.x, uv0.y, uv1.x, uv1.y, r.GlyphAdvanceX);
}
// Build all fonts lookup tables
for (int i = 0; i < atlas->Fonts.Size; i++)
if (atlas->Fonts[i]->DirtyLookupTables)
atlas->Fonts[i]->BuildLookupTable();
}
|
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x40e30
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jge 0x40d52
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
movl -0xc(%rbp), %esi
callq 0x4c9e0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x40c67
movq -0x18(%rbp), %rax
cmpl $0x10000, (%rax) # imm = 0x10000
jbe 0x40c6c
jmp 0x40d44
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x48(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x40c80
jmp 0x40c9f
leaq 0x84748(%rip), %rdi # 0xc53cf
leaq 0x83d28(%rip), %rsi # 0xc49b6
movl $0x858, %edx # imm = 0x858
leaq 0x84755(%rip), %rcx # 0xc53ef
callq 0x71e0
leaq -0x20(%rbp), %rdi
callq 0x2c260
leaq -0x28(%rbp), %rdi
callq 0x2c260
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x3d270
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
movss 0x10(%rcx), %xmm0
movq -0x18(%rbp), %rcx
movss 0x14(%rcx), %xmm1
movq -0x18(%rbp), %rcx
movss 0x10(%rcx), %xmm2
movq -0x18(%rbp), %rcx
movzwl 0x4(%rcx), %ecx
cvtsi2ss %ecx, %xmm3
addss %xmm3, %xmm2
movq -0x18(%rbp), %rcx
movss 0x14(%rcx), %xmm3
movq -0x18(%rbp), %rcx
movzwl 0x6(%rcx), %ecx
cvtsi2ss %ecx, %xmm4
addss %xmm4, %xmm3
movss -0x20(%rbp), %xmm4
movss -0x1c(%rbp), %xmm5
movss -0x28(%rbp), %xmm6
movss -0x24(%rbp), %xmm7
movq -0x18(%rbp), %rcx
movss 0xc(%rcx), %xmm8
movzwl %ax, %esi
movss %xmm8, (%rsp)
callq 0x40a60
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x40c2c
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jge 0x40da3
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
movl -0x2c(%rbp), %esi
callq 0x2e360
movq (%rax), %rax
testb $0x1, 0x6c(%rax)
je 0x40d96
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
movl -0x2c(%rbp), %esi
callq 0x2e360
movq (%rax), %rdi
callq 0x41170
jmp 0x40d98
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x40d59
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui_draw.cpp
|
ImFontAtlas::GetGlyphRangesChineseFull()
|
const ImWchar* ImFontAtlas::GetGlyphRangesChineseFull()
{
static const ImWchar ranges[] =
{
0x0020, 0x00FF, // Basic Latin + Latin Supplement
0x2000, 0x206F, // General Punctuation
0x3000, 0x30FF, // CJK Symbols and Punctuations, Hiragana, Katakana
0x31F0, 0x31FF, // Katakana Phonetic Extensions
0xFF00, 0xFFEF, // Half-width characters
0x4e00, 0x9FAF, // CJK Ideograms
0,
};
return &ranges[0];
}
|
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
leaq 0x7d761(%rip), %rax # 0xbebc0
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui_draw.cpp
|
ImFontAtlas::GetGlyphRangesCyrillic()
|
const ImWchar* ImFontAtlas::GetGlyphRangesCyrillic()
{
static const ImWchar ranges[] =
{
0x0020, 0x00FF, // Basic Latin + Latin Supplement
0x0400, 0x052F, // Cyrillic + Cyrillic Supplement
0x2DE0, 0x2DFF, // Cyrillic Extended-A
0xA640, 0xA69F, // Cyrillic Extended-B
0,
};
return &ranges[0];
}
|
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
leaq 0x7f8e1(%rip), %rax # 0xc0eb0
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
/kidanger[P]vpe/imgui-1.70/imgui_draw.cpp
|
clipp::parameter clipp::required<char const (&) [3], char const (&) [11]>(char const (&) [3], char const (&) [11])
|
inline parameter
required(String&& flag, Strings&&... flags)
{
return parameter{std::forward<String>(flag), std::forward<Strings>(flags)...}
.required(true).blocking(false).repeatable(false);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x120, %rsp # imm = 0x120
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rsi, %rdi
callq 0x30f0
leaq (%rax,%r15), %rdx
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xf978
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1860a
leaq 0x20(%rsp), %rsi
movb $0x1, 0xf8(%rsi)
movw $0x0, 0x20(%rsi)
movq %rbx, %rdi
callq 0x627e
leaq 0x20(%rsp), %rdi
callq 0x6e58
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6507
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rax
addq $0x120, %rsp # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6e58
jmp 0x652d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6543
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33d0
|
/openglobus[P]openglobusddm/include/clipp.h
|
clipp::parameter clipp::option<char const (&) [3], char const (&) [8]>(char const (&) [3], char const (&) [8])
|
inline parameter
option(String&& flag, Strings&&... flags)
{
return parameter{std::forward<String>(flag), std::forward<Strings>(flags)...}
.required(false).blocking(false).repeatable(false);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x120, %rsp # imm = 0x120
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rsi, %rdi
callq 0x30f0
leaq (%rax,%r15), %rdx
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xf978
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x189d8
leaq 0x20(%rsp), %rsi
movb $0x0, 0xf8(%rsi)
movw $0x0, 0x20(%rsi)
movq %rbx, %rdi
callq 0x627e
leaq 0x20(%rsp), %rdi
callq 0x6e58
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6b6a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rax
addq $0x120, %rsp # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6e58
jmp 0x6b90
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6ba6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33d0
|
/openglobus[P]openglobusddm/include/clipp.h
|
clipp::parameter clipp::option<char const (&) [3], char const (&) [11]>(char const (&) [3], char const (&) [11])
|
inline parameter
option(String&& flag, Strings&&... flags)
{
return parameter{std::forward<String>(flag), std::forward<Strings>(flags)...}
.required(false).blocking(false).repeatable(false);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x120, %rsp # imm = 0x120
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rsi, %rdi
callq 0x30f0
leaq (%rax,%r15), %rdx
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xf978
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1860a
leaq 0x20(%rsp), %rsi
movb $0x0, 0xf8(%rsi)
movw $0x0, 0x20(%rsi)
movq %rbx, %rdi
callq 0x627e
leaq 0x20(%rsp), %rdi
callq 0x6e58
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6deb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rax
addq $0x120, %rsp # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6e58
jmp 0x6e11
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6e27
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33d0
nop
|
/openglobus[P]openglobusddm/include/clipp.h
|
clipp::make_man_page(clipp::group const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, clipp::doc_formatting const&)
|
inline man_page
make_man_page(const group& cli,
doc_string progname = "",
const doc_formatting& fmt = doc_formatting{})
{
man_page man;
man.append_section("SYNOPSIS", usage_lines(cli,progname,fmt).str());
man.append_section("OPTIONS", documentation(cli,fmt).str());
return man;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x668, %rsp # imm = 0x668
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movl $0x1, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x18(%rdi)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb $0x0, 0x30(%rdi)
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x12fe5(%rip), %rsi # 0x1a4b5
leaq 0x12fe6(%rip), %rdx # 0x1a4bd
leaq 0x48(%rsp), %rdi
callq 0xf978
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x178e0
leaq 0xf0(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r15, %rsi
movq %r14, %rcx
callq 0x12258
leaq 0xa8(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x12320
leaq 0x8(%rbx), %r12
leaq 0x48(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
movq %r12, %rdi
callq 0x125ac
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7567
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x3b0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7588
movq 0x3b0(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0xf8(%rsp), %rdi
callq 0x7f78
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x75ac
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x75c3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x12eeb(%rip), %rsi # 0x1a4be
leaq 0x12eeb(%rip), %rdx # 0x1a4c5
leaq 0x8(%rsp), %rdi
callq 0xf978
leaq 0xd8(%rsp), %rbp
xorl %eax, %eax
movq %rax, 0x10(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbp)
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movl $0x1020202, 0x10(%rbp) # imm = 0x1020202
leaq 0x68(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x123d8
leaq 0xf0(%rsp), %rdi
leaq 0x68(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0x12436
leaq 0x88(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x124e2
leaq 0x8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %r12, %rdi
callq 0x125ac
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x767d
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x658(%rsp), %rax
testq %rax, %rax
je 0x769c
leaq 0x648(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x3a0(%rsp), %rdi
callq 0x7f78
leaq 0xf8(%rsp), %rdi
callq 0x7f78
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x76cf
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x76ec
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7703
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rax
addq $0x668, %rsp # imm = 0x668
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7772
jmp 0x7772
movq %rax, %r14
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7745
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x7745
movq %rax, %r14
leaq 0xf0(%rsp), %rdi
callq 0x1256a
jmp 0x7757
movq %rax, %r14
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x777d
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x777d
movq %rax, %rdi
callq 0x8367
movq %rax, %r14
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x779a
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7820
movq 0x18(%rsp), %rsi
jmp 0x7813
jmp 0x781d
movq %rax, %r14
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x77d6
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x77d6
movq %rax, %r14
leaq 0xf0(%rsp), %rdi
callq 0x123a8
jmp 0x77e8
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7804
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x7804
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x7820
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x7820
movq %rax, %r14
movq %rbx, %rdi
callq 0x7f4e
movq %r14, %rdi
callq 0x33d0
|
/openglobus[P]openglobusddm/include/clipp.h
|
clipp::group::group<clipp::parameter>(clipp::group, clipp::parameter)
|
explicit
group(group p1, P2 p2, Ps... ps):
children_{}, exclusive_{false}, joinable_{false}, scoped_{true}
{
push_back(std::move(p1), std::move(p2), std::move(ps)...);
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movw $0x0, 0x20(%rdi)
leaq 0x28(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x32(%rdi)
movb $0x1, 0x42(%rdi)
callq 0x9634
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x8a0e
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x962b
movq (%r12), %rsi
incq %rsi
callq 0x3230
movq %r14, %rdi
callq 0x33d0
nop
|
/openglobus[P]openglobusddm/include/clipp.h
|
clipp::group& clipp::group::push_back<clipp::group, clipp::parameter>(clipp::group&&, clipp::parameter&&)
|
group&
push_back(Param1&& param1, Param2&& param2, Params&&... params)
{
children_.reserve(children_.size() + 2 + sizeof...(params));
push_back(std::forward<Param1>(param1));
push_back(std::forward<Param2>(param2), std::forward<Params>(params)...);
return *this;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rdi), %r12
movq 0x30(%rdi), %rax
subq 0x28(%rdi), %rax
sarq $0x3, %rax
movabsq $0xf83e0f83e0f83e1, %rsi # imm = 0xF83E0F83E0F83E1
imulq %rax, %rsi
addq $0x2, %rsi
movq %r12, %rdi
callq 0x8a58
movq %r12, %rdi
movq %r14, %rsi
callq 0x8596
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8d74
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/openglobus[P]openglobusddm/include/clipp.h
|
clipp::parser::missed() const
|
missing_events missed() const {
missing_events misses;
misses.reserve(missCand_.size());
for(auto i = missCand_.begin(); i != missCand_.end(); ++i) {
misses.emplace_back(&(i->pos->as_param()), i->index);
}
return misses;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0xd0(%rsi), %rsi
subq 0xc8(%r14), %rsi
sarq $0x5, %rsi
callq 0x11b36
movq 0xc8(%r14), %r12
cmpq 0xd0(%r14), %r12
je 0x9c2e
movq %rsp, %r15
movq 0x8(%r12), %rax
movq -0x10(%rax), %rax
movq %rax, (%rsp)
leaq 0x18(%r12), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11bde
addq $0x20, %r12
cmpq 0xd0(%r14), %r12
jne 0x9c04
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x9c3f
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x9c56
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq %r14, %rdi
callq 0x33d0
|
/openglobus[P]openglobusddm/include/clipp.h
|
clipp::detail::match_t::match_t(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, clipp::detail::scoped_dfs_traverser)
|
match_t(arg_string s, scoped_dfs_traverser p):
str_{std::move(s)}, pos_{std::move(p)}
{}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq (%rsi), %rcx
leaq 0x10(%rsi), %rax
cmpq %rax, %rcx
je 0xb222
movq %rcx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0xb229
movups (%rax), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%rsi)
xorl %eax, %eax
movq %rax, 0x8(%rsi)
movb $0x0, 0x10(%rsi)
movups (%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movq 0x10(%r14), %rcx
movq %rcx, 0x30(%rbx)
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movups 0x18(%r14), %xmm1
movups %xmm1, 0x38(%rbx)
movq 0x28(%r14), %rcx
movq %rcx, 0x48(%rbx)
movq %rax, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movups 0x30(%r14), %xmm1
movups %xmm1, 0x50(%rbx)
movq 0x40(%r14), %rcx
movq %rcx, 0x60(%rbx)
movq %rax, 0x40(%r14)
movups %xmm0, 0x30(%r14)
leaq 0x68(%rbx), %rdi
leaq 0x48(%r14), %rsi
callq 0xe2ee
movb 0x9a(%r14), %al
movb %al, 0xba(%rbx)
movzwl 0x98(%r14), %eax
movw %ax, 0xb8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0xb2d4
movq 0x60(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0xb2e9
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xb2fe
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xb311
movq (%r15), %rsi
incq %rsi
callq 0x3230
movq %r14, %rdi
callq 0x33d0
nop
|
/openglobus[P]openglobusddm/include/clipp.h
|
bool clipp::parser::try_match_full<clipp::detail::select_values>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, clipp::detail::select_values const&)
|
bool try_match_full(const arg_string& arg, const ParamSelector& select)
{
auto match = detail::full_match(pos_, arg, select);
if(!match) return false;
add_match(match);
return true;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x168, %rsp # imm = 0x168
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rdi), %rsi
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
callq 0xb13e
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x105bf
leaq 0x110(%rsp), %r14
movq %r14, %rdi
callq 0xa902
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0xba7d
movq 0x108(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0xba9a
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0xbab7
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x28(%rsp), %r14
movq 0x30(%rsp), %r15
cmpq %r15, %r14
je 0xbad3
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xaf52
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0xa902
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xbaf6
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xbb0d
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xbb24
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbb3f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
cmpq %r15, %r14
setne %al
addq $0x168, %rsp # imm = 0x168
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb31a
jmp 0xbb73
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x9f46
movq %rbx, %rdi
callq 0x33d0
nop
|
/openglobus[P]openglobusddm/include/clipp.h
|
main
|
int main(int argc, char* argv[])
{
sx_tm_init();
uint64_t start_tm = sx_tm_now();
puts("Calculating fibonacci sequence ...");
uint32_t a = 0;
uint32_t b = 1;
int N = 100000;
for (int i = 0; i < N; i++) {
uint32_t f = a + b;
a = b;
b = f;
}
uint64_t delta_tm = sx_tm_since(start_tm);
printf("Took %lf us (%lf secs)\n", sx_tm_us(delta_tm), sx_tm_sec(delta_tm));
return 0;
}
|
pushq %rbx
subq $0x10, %rsp
callq 0x11cc
callq 0x120d
movq %rax, %rbx
leaq 0xe7f(%rip), %rdi # 0x2004
callq 0x1030
movq %rbx, %rdi
callq 0x1272
movq %rax, %rbx
movq %rax, %rdi
callq 0x1423
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x13cf
movaps %xmm0, %xmm1
leaq 0xe72(%rip), %rdi # 0x2027
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0x1050
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
|
/septag[P]sx/tests/test-timer.c
|
sx_tm_since
|
uint64_t sx_tm_since(uint64_t start_ticks)
{
return stm_since(start_ticks);
}
|
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpl $0xabcdabcd, 0x2dcd(%rip) # imm = 0xABCDABCD
jne 0x12c0
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movl $0x1, %edi
movq %r14, %rsi
callq 0x1040
imulq $0x3b9aca00, (%r14), %rcx # imm = 0x3B9ACA00
addq 0x8(%r14), %rcx
subq 0x2dac(%rip), %rcx # 0x4058
subq %rbx, %rcx
movl $0x1, %eax
cmovaq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0xdb1(%rip), %rdi # 0x2078
leaq 0xdc9(%rip), %rsi # 0x2097
leaq 0xe23(%rip), %rcx # 0x20f8
movl $0xe2, %edx
callq 0x1060
|
/septag[P]sx/src/timer.c
|
sx_tm_laptime
|
uint64_t sx_tm_laptime(uint64_t* last_ticks)
{
return stm_laptime(last_ticks);
}
|
pushq %r14
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x1342
cmpl $0xabcdabcd, 0x2d5b(%rip) # imm = 0xABCDABCD
jne 0x1361
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movl $0x1, %edi
movq %r14, %rsi
callq 0x1040
imulq $0x3b9aca00, (%r14), %rax # imm = 0x3B9ACA00
addq 0x8(%r14), %rax
subq 0x2d3a(%rip), %rax # 0x4058
movq (%rbx), %rcx
movq %rax, (%rbx)
movq %rax, %rdx
subq %rcx, %rdx
movl $0x1, %eax
cmovaq %rdx, %rax
testq %rcx, %rcx
cmoveq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0xdc6(%rip), %rdi # 0x210f
leaq 0xd47(%rip), %rsi # 0x2097
leaq 0xdc2(%rip), %rcx # 0x2119
movl $0x105, %edx # imm = 0x105
callq 0x1060
leaq 0xd10(%rip), %rdi # 0x2078
leaq 0xd28(%rip), %rsi # 0x2097
leaq 0xd82(%rip), %rcx # 0x20f8
movl $0xe2, %edx
callq 0x1060
|
/septag[P]sx/src/timer.c
|
sx_tm_round_to_common_refresh_rate
|
uint64_t sx_tm_round_to_common_refresh_rate(uint64_t duration)
{
return stm_round_to_common_refresh_rate(duration);
}
|
xorl %ecx, %ecx
leaq 0xdb7(%rip), %rdx # 0x2140
movl %ecx, %r8d
shlq $0x4, %r8
movq (%r8,%rdx), %rsi
testq %rsi, %rsi
je 0x13cb
addq %rdx, %r8
movq 0x8(%r8), %r8
movq %rsi, %r9
subq %r8, %r9
cmpq %rdi, %r9
setae %r9b
addq %rsi, %r8
cmpq %rdi, %r8
setbe %r8b
orb %r9b, %r8b
movzbl %r8b, %r8d
addl %r8d, %ecx
testb %r8b, %r8b
cmoveq %rsi, %rax
jne 0x1389
retq
movq %rdi, %rax
retq
|
/septag[P]sx/src/timer.c
|
curlx_ultouc
|
unsigned char curlx_ultouc(unsigned long ulnum)
{
#ifdef __INTEL_COMPILER
# pragma warning(push)
# pragma warning(disable:810) /* conversion may lose significant bits */
#endif
DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_UCHAR);
return (unsigned char)(ulnum & (unsigned long) CURL_MASK_UCHAR);
#ifdef __INTEL_COMPILER
# pragma warning(pop)
#endif
}
|
movq %rdi, %rax
retq
|
/devkitPro[P]curl/lib/warnless.c
|
curlx_uztoso
|
curl_off_t curlx_uztoso(size_t uznum)
{
#ifdef __INTEL_COMPILER
# pragma warning(push)
# pragma warning(disable:810) /* conversion may lose significant bits */
#elif defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable:4310) /* cast truncates constant value */
#endif
DEBUGASSERT(uznum <= (size_t) CURL_MASK_SCOFFT);
return (curl_off_t)(uznum & (size_t) CURL_MASK_SCOFFT);
#if defined(__INTEL_COMPILER) || defined(_MSC_VER)
# pragma warning(pop)
#endif
}
|
movq %rdi, %rax
btrq $0x3f, %rax
retq
|
/devkitPro[P]curl/lib/warnless.c
|
curlx_uztoul
|
unsigned long curlx_uztoul(size_t uznum)
{
#ifdef __INTEL_COMPILER
# pragma warning(push)
# pragma warning(disable:810) /* conversion may lose significant bits */
#endif
#if (SIZEOF_LONG < SIZEOF_SIZE_T)
DEBUGASSERT(uznum <= (size_t) CURL_MASK_ULONG);
#endif
return (unsigned long)(uznum & (size_t) CURL_MASK_ULONG);
#ifdef __INTEL_COMPILER
# pragma warning(pop)
#endif
}
|
movq %rdi, %rax
retq
|
/devkitPro[P]curl/lib/warnless.c
|
curlx_sltoui
|
unsigned int curlx_sltoui(long slnum)
{
#ifdef __INTEL_COMPILER
# pragma warning(push)
# pragma warning(disable:810) /* conversion may lose significant bits */
#endif
DEBUGASSERT(slnum >= 0);
#if (SIZEOF_INT < SIZEOF_LONG)
DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_UINT);
#endif
return (unsigned int)(slnum & (long) CURL_MASK_UINT);
#ifdef __INTEL_COMPILER
# pragma warning(pop)
#endif
}
|
movq %rdi, %rax
retq
|
/devkitPro[P]curl/lib/warnless.c
|
npf_vpprintf
|
int npf_vpprintf(npf_putc pc, void *pc_ctx, char const *format, va_list args) {
npf_format_spec_t fs;
char const *cur = format;
npf_cnt_putc_ctx_t pc_cnt;
pc_cnt.pc = pc;
pc_cnt.ctx = pc_ctx;
pc_cnt.n = 0;
while (*cur) {
int const fs_len = (*cur != '%') ? 0 : npf_parse_format_spec(cur, &fs);
if (!fs_len) { NPF_PUTC(*cur++); continue; }
cur += fs_len;
// Extract star-args immediately
#if NANOPRINTF_USE_FIELD_WIDTH_FORMAT_SPECIFIERS == 1
if (fs.field_width_opt == NPF_FMT_SPEC_OPT_STAR) {
fs.field_width = va_arg(args, int);
if (fs.field_width < 0) {
fs.field_width = -fs.field_width;
fs.left_justified = 1;
}
}
#endif
#if NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS == 1
if (fs.prec_opt == NPF_FMT_SPEC_OPT_STAR) {
fs.prec = va_arg(args, int);
if (fs.prec < 0) { fs.prec_opt = NPF_FMT_SPEC_OPT_NONE; }
}
#endif
union { char cbuf_mem[NANOPRINTF_CONVERSION_BUFFER_SIZE]; npf_uint_t binval; } u;
char *cbuf = u.cbuf_mem, sign_c = 0;
int cbuf_len = 0, need_0x = 0;
#if NANOPRINTF_USE_FIELD_WIDTH_FORMAT_SPECIFIERS == 1
int field_pad = 0;
char pad_c = 0;
#endif
#if NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS == 1
int prec_pad = 0;
#if NANOPRINTF_USE_FIELD_WIDTH_FORMAT_SPECIFIERS == 1
int zero = 0;
#endif
#endif
// Extract and convert the argument to string, point cbuf at the text.
switch (fs.conv_spec) {
case NPF_FMT_SPEC_CONV_PERCENT:
*cbuf = '%';
cbuf_len = 1;
break;
case NPF_FMT_SPEC_CONV_CHAR:
*cbuf = (char)va_arg(args, int);
cbuf_len = 1;
break;
case NPF_FMT_SPEC_CONV_STRING: {
cbuf = va_arg(args, char *);
#if NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS == 1
for (char const *s = cbuf;
((fs.prec_opt == NPF_FMT_SPEC_OPT_NONE) || (cbuf_len < fs.prec)) && cbuf && *s;
++s, ++cbuf_len);
#else
for (char const *s = cbuf; cbuf && *s; ++s, ++cbuf_len); // strlen
#endif
} break;
case NPF_FMT_SPEC_CONV_SIGNED_INT: {
npf_int_t val = 0;
switch (fs.length_modifier) {
NPF_EXTRACT(NONE, int, int);
NPF_EXTRACT(SHORT, short, int);
NPF_EXTRACT(LONG_DOUBLE, int, int);
NPF_EXTRACT(CHAR, signed char, int);
NPF_EXTRACT(LONG, long, long);
#if NANOPRINTF_USE_LARGE_FORMAT_SPECIFIERS == 1
NPF_EXTRACT(LARGE_LONG_LONG, long long, long long);
NPF_EXTRACT(LARGE_INTMAX, intmax_t, intmax_t);
NPF_EXTRACT(LARGE_SIZET, npf_ssize_t, npf_ssize_t);
NPF_EXTRACT(LARGE_PTRDIFFT, ptrdiff_t, ptrdiff_t);
#endif
default: break;
}
sign_c = (val < 0) ? '-' : fs.prepend;
#if NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS == 1
#if NANOPRINTF_USE_FIELD_WIDTH_FORMAT_SPECIFIERS == 1
zero = !val;
#endif
// special case, if prec and value are 0, skip
if (!val && (fs.prec_opt != NPF_FMT_SPEC_OPT_NONE) && !fs.prec) {
cbuf_len = 0;
} else
#endif
{
npf_uint_t uval = (npf_uint_t)val;
if (val < 0) { uval = 0 - uval; }
cbuf_len = npf_utoa_rev(uval, cbuf, 10, fs.case_adjust);
}
} break;
#if NANOPRINTF_USE_BINARY_FORMAT_SPECIFIERS == 1
case NPF_FMT_SPEC_CONV_BINARY:
#endif
case NPF_FMT_SPEC_CONV_OCTAL:
case NPF_FMT_SPEC_CONV_HEX_INT:
case NPF_FMT_SPEC_CONV_UNSIGNED_INT: {
npf_uint_t val = 0;
switch (fs.length_modifier) {
NPF_EXTRACT(NONE, unsigned, unsigned);
NPF_EXTRACT(SHORT, unsigned short, unsigned);
NPF_EXTRACT(LONG_DOUBLE, unsigned, unsigned);
NPF_EXTRACT(CHAR, unsigned char, unsigned);
NPF_EXTRACT(LONG, unsigned long, unsigned long);
#if NANOPRINTF_USE_LARGE_FORMAT_SPECIFIERS == 1
NPF_EXTRACT(LARGE_LONG_LONG, unsigned long long, unsigned long long);
NPF_EXTRACT(LARGE_INTMAX, uintmax_t, uintmax_t);
NPF_EXTRACT(LARGE_SIZET, size_t, size_t);
NPF_EXTRACT(LARGE_PTRDIFFT, size_t, size_t);
#endif
default: break;
}
#if NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS == 1
#if NANOPRINTF_USE_FIELD_WIDTH_FORMAT_SPECIFIERS == 1
zero = !val;
#endif
if (!val && (fs.prec_opt != NPF_FMT_SPEC_OPT_NONE) && !fs.prec) {
// Zero value and explicitly-requested zero precision means "print nothing".
if ((fs.conv_spec == NPF_FMT_SPEC_CONV_OCTAL) && fs.alt_form) {
fs.prec = 1; // octal special case, print a single '0'
}
} else
#endif
#if NANOPRINTF_USE_BINARY_FORMAT_SPECIFIERS == 1
if (fs.conv_spec == NPF_FMT_SPEC_CONV_BINARY) {
cbuf_len = npf_bin_len(val); u.binval = val;
} else
#endif
{
uint_fast8_t const base = (fs.conv_spec == NPF_FMT_SPEC_CONV_OCTAL) ?
8u : ((fs.conv_spec == NPF_FMT_SPEC_CONV_HEX_INT) ? 16u : 10u);
cbuf_len = npf_utoa_rev(val, cbuf, base, fs.case_adjust);
}
if (val && fs.alt_form && (fs.conv_spec == NPF_FMT_SPEC_CONV_OCTAL)) {
cbuf[cbuf_len++] = '0'; // OK to add leading octal '0' immediately.
}
if (val && fs.alt_form) { // 0x or 0b but can't write it yet.
if (fs.conv_spec == NPF_FMT_SPEC_CONV_HEX_INT) { need_0x = 'X'; }
#if NANOPRINTF_USE_BINARY_FORMAT_SPECIFIERS == 1
else if (fs.conv_spec == NPF_FMT_SPEC_CONV_BINARY) { need_0x = 'B'; }
#endif
if (need_0x) { need_0x += fs.case_adjust; }
}
} break;
case NPF_FMT_SPEC_CONV_POINTER: {
cbuf_len =
npf_utoa_rev((npf_uint_t)(uintptr_t)va_arg(args, void *), cbuf, 16, 'a' - 'A');
need_0x = 'x';
} break;
#if NANOPRINTF_USE_WRITEBACK_FORMAT_SPECIFIERS == 1
case NPF_FMT_SPEC_CONV_WRITEBACK:
switch (fs.length_modifier) {
NPF_WRITEBACK(NONE, int);
NPF_WRITEBACK(SHORT, short);
NPF_WRITEBACK(LONG, long);
NPF_WRITEBACK(LONG_DOUBLE, double);
NPF_WRITEBACK(CHAR, signed char);
#if NANOPRINTF_USE_LARGE_FORMAT_SPECIFIERS == 1
NPF_WRITEBACK(LARGE_LONG_LONG, long long);
NPF_WRITEBACK(LARGE_INTMAX, intmax_t);
NPF_WRITEBACK(LARGE_SIZET, size_t);
NPF_WRITEBACK(LARGE_PTRDIFFT, ptrdiff_t);
#endif
default: break;
} break;
#endif
#if NANOPRINTF_USE_FLOAT_FORMAT_SPECIFIERS == 1
case NPF_FMT_SPEC_CONV_FLOAT_DEC:
case NPF_FMT_SPEC_CONV_FLOAT_SCI:
case NPF_FMT_SPEC_CONV_FLOAT_SHORTEST:
case NPF_FMT_SPEC_CONV_FLOAT_HEX: {
double val;
if (fs.length_modifier == NPF_FMT_SPEC_LEN_MOD_LONG_DOUBLE) {
val = (double)va_arg(args, long double);
} else {
val = va_arg(args, double);
}
sign_c = (val < 0.) ? '-' : fs.prepend;
#if NANOPRINTF_USE_FIELD_WIDTH_FORMAT_SPECIFIERS == 1
zero = (val == 0.);
#endif
cbuf_len = npf_ftoa_rev(cbuf, &fs, val);
} break;
#endif
default: break;
}
#if NANOPRINTF_USE_FIELD_WIDTH_FORMAT_SPECIFIERS == 1
// Compute the field width pad character
if (fs.field_width_opt != NPF_FMT_SPEC_OPT_NONE) {
if (fs.leading_zero_pad) { // '0' flag is only legal with numeric types
if ((fs.conv_spec != NPF_FMT_SPEC_CONV_STRING) &&
(fs.conv_spec != NPF_FMT_SPEC_CONV_CHAR) &&
(fs.conv_spec != NPF_FMT_SPEC_CONV_PERCENT)) {
#if NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS == 1
if ((fs.prec_opt != NPF_FMT_SPEC_OPT_NONE) && !fs.prec && zero) {
pad_c = ' ';
} else
#endif
{ pad_c = '0'; }
}
} else { pad_c = ' '; }
}
#endif
// Compute the number of bytes to truncate or '0'-pad.
#if NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS == 1
if (fs.conv_spec != NPF_FMT_SPEC_CONV_STRING) {
#if NANOPRINTF_USE_FLOAT_FORMAT_SPECIFIERS == 1
// float precision is after the decimal point
if ((fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_DEC) &&
(fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_SCI) &&
(fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_SHORTEST) &&
(fs.conv_spec != NPF_FMT_SPEC_CONV_FLOAT_HEX))
#endif
{ prec_pad = npf_max(0, fs.prec - cbuf_len); }
}
#endif
#if NANOPRINTF_USE_FIELD_WIDTH_FORMAT_SPECIFIERS == 1
// Given the full converted length, how many pad bytes?
field_pad = fs.field_width - cbuf_len - !!sign_c;
if (need_0x) { field_pad -= 2; }
#if NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS == 1
field_pad -= prec_pad;
#endif
field_pad = npf_max(0, field_pad);
// Apply right-justified field width if requested
if (!fs.left_justified && pad_c) { // If leading zeros pad, sign goes first.
if (pad_c == '0') {
if (sign_c) { NPF_PUTC(sign_c); sign_c = 0; }
// Pad byte is '0', write '0x' before '0' pad chars.
if (need_0x) { NPF_PUTC('0'); NPF_PUTC(need_0x); }
}
while (field_pad-- > 0) { NPF_PUTC(pad_c); }
// Pad byte is ' ', write '0x' after ' ' pad chars but before number.
if ((pad_c != '0') && need_0x) { NPF_PUTC('0'); NPF_PUTC(need_0x); }
} else
#endif
{ if (need_0x) { NPF_PUTC('0'); NPF_PUTC(need_0x); } } // no pad, '0x' requested.
// Write the converted payload
if (fs.conv_spec == NPF_FMT_SPEC_CONV_STRING) {
for (int i = 0; cbuf && (i < cbuf_len); ++i) { NPF_PUTC(cbuf[i]); }
} else {
if (sign_c) { NPF_PUTC(sign_c); }
#if NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS == 1
while (prec_pad-- > 0) { NPF_PUTC('0'); } // int precision leads.
#endif
#if NANOPRINTF_USE_BINARY_FORMAT_SPECIFIERS == 1
if (fs.conv_spec == NPF_FMT_SPEC_CONV_BINARY) {
while (cbuf_len) { NPF_PUTC('0' + ((u.binval >> --cbuf_len) & 1)); }
} else
#endif
{ while (cbuf_len-- > 0) { NPF_PUTC(cbuf[cbuf_len]); } } // payload is reversed
}
#if NANOPRINTF_USE_FIELD_WIDTH_FORMAT_SPECIFIERS == 1
if (fs.left_justified && pad_c) { // Apply left-justified field width
while (field_pad-- > 0) { NPF_PUTC(pad_c); }
}
#endif
}
return pc_cnt.n;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %r12
xorl %r13d, %r13d
movl $0x20, %edi
movl %eax, 0x24(%rsp)
movl %eax, 0x14(%rsp)
movl %eax, 0x10(%rsp)
movq %rcx, 0x48(%rsp)
movzbl (%rbp), %eax
cmpl $0x25, %eax
je 0x4dfb
movl $0x0, %r9d
testl %eax, %eax
jne 0x4f43
jmp 0x5490
movl $0x0, 0x24(%rsp)
xorl %r14d, %r14d
movq %rbp, %rdx
addq $0x3, %rdx
movzbl -0x2(%rdx), %ecx
cmpl $0x20, %ecx
je 0x4e1d
cmpl $0x2b, %ecx
je 0x4e27
jmp 0x4e2f
testb %r14b, %r14b
movzbl %r14b, %ecx
cmovel %edi, %ecx
incq %rdx
movl %ecx, %r14d
jmp 0x4e0d
cmpl $0x23, %ecx
jne 0x4e40
addq $-0x2, %rdx
movb $0x23, %cl
movl %ecx, 0x24(%rsp)
jmp 0x4e09
movsbl %cl, %esi
addl $-0x68, %esi
rorl %esi
cmpl $0x9, %esi
ja 0x4e75
leaq -0x1(%rdx), %rcx
leaq 0x151ac(%rip), %r8 # 0x1a004
movslq (%r8,%rsi,4), %rsi
addq %r8, %rsi
jmpq *%rsi
cmpb $0x68, -0x1(%rdx)
sete %sil
cmoveq %rdx, %rcx
addb %sil, %sil
incb %sil
jmp 0x4e96
addq $-0x2, %rdx
movl $0x0, 0x10(%rsp)
movq %rdx, %rcx
jmp 0x4eaa
cmpb $0x6c, -0x1(%rdx)
sete %sil
cmoveq %rdx, %rcx
orb $0x4, %sil
movl %esi, 0x10(%rsp)
jmp 0x4eaa
movb $0x6, %dl
jmp 0x4ea6
movb $0x8, %dl
jmp 0x4ea6
movb $0x7, %dl
movl %edx, 0x10(%rsp)
movzbl (%rcx), %edx
xorl %r9d, %r9d
movb $0x20, %sil
movl %esi, 0x14(%rsp)
cmpl $0x61, %edx
jle 0x4edb
leal -0x62(%rdx), %esi
cmpl $0x13, %esi
ja 0x4ef1
leaq 0x15161(%rip), %r8 # 0x1a02c
movslq (%r8,%rsi,4), %rdx
addq %r8, %rdx
jmpq *%rdx
movb $0x4, 0xb(%rsp)
jmp 0x4f3b
cmpl $0x25, %edx
je 0x4f27
cmpl $0x42, %edx
je 0x4f2e
cmpl $0x58, %edx
jne 0x4f43
movb $0x7, 0xb(%rsp)
jmp 0x4f33
cmpl $0x78, %edx
jne 0x4f43
movb $0x7, 0xb(%rsp)
jmp 0x4f3b
movb $0x8, 0xb(%rsp)
jmp 0x4f3b
movb $0x3, 0xb(%rsp)
jmp 0x4f3b
movb $0x5, 0xb(%rsp)
jmp 0x4f3b
movb $0x6, 0xb(%rsp)
jmp 0x4f3b
movb $0x2, 0xb(%rsp)
jmp 0x4f3b
movb $0x9, 0xb(%rsp)
jmp 0x4f3b
movb $0x1, 0xb(%rsp)
jmp 0x4f3b
movb $0x5, 0xb(%rsp)
movl $0x0, 0x14(%rsp)
incq %rcx
subl %ebp, %ecx
movl %ecx, %r9d
testl %r9d, %r9d
je 0x4faf
movzbl 0xb(%rsp), %edx
xorl %ecx, %ecx
leal -0x1(%rdx), %eax
cmpl $0x8, %eax
movl %r9d, 0xc(%rsp)
movq %rbp, 0x28(%rsp)
movq %r13, 0x18(%rsp)
ja 0x5079
leaq 0x1510b(%rip), %rcx # 0x1a07c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x10(%rsp), %eax
cmpb $0x8, %al
ja 0x5170
movzbl %al, %eax
leaq 0x15110(%rip), %rcx # 0x1a0a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x4fc8
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x4fd4
movsbl %al, %edi
incq %rbp
incl %r13d
movq %r15, %rsi
callq *%r12
movl $0x20, %edi
jmp 0x4ddf
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rbp
jmp 0x51b2
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x50a5
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x50b1
movl 0x10(%rsp), %eax
cmpb $0x8, %al
ja 0x5428
movzbl %al, %eax
leaq 0x150b5(%rip), %rcx # 0x1a0c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x517e
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x518a
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x50d6
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x50e2
movb $0x25, 0x30(%rsp)
jmp 0x5127
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x5115
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x5121
leaq 0x30(%rsp), %rbx
xorl %ebp, %ebp
xorl %r13d, %r13d
jmp 0x527f
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x5160
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x516c
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rbx
testq %rbx, %rbx
je 0x5174
xorl %r13d, %r13d
cmpb $0x0, (%rbx,%r13)
je 0x50cf
incq %r13
testq %rbx, %rbx
jne 0x50c0
xorl %ebp, %ebp
jmp 0x527d
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rdi
leaq 0x30(%rsp), %rbx
movq %rbx, %rsi
movl $0x10, %edx
movl $0x20, %ecx
callq 0x54a2
movl %eax, %r13d
movl $0x78, %ecx
xorl %ebp, %ebp
movl $0x20, %edi
movl 0xc(%rsp), %r9d
jmp 0x527f
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movb (%rax), %al
movb %al, 0x30(%rsp)
xorl %ebp, %ebp
movl $0x1, %r13d
jmp 0x5278
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x5192
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x519e
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x51a3
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x51af
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movl (%rax), %ebp
jmp 0x51b2
xorl %ebp, %ebp
jmp 0x51b2
xorl %ebp, %ebp
xorl %r13d, %r13d
jmp 0x527d
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rax
jmp 0x544e
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movzwl (%rax), %ebp
jmp 0x51b2
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movzbl (%rax), %ebp
cmpb $0x6, 0xb(%rsp)
je 0x51dd
cmpl $0x5, %edx
jne 0x51e4
bsrq %rbp, %r13
xorl $-0x40, %r13d
addl $0x41, %r13d
testq %rbp, %rbp
movl $0x1, %eax
cmovel %eax, %r13d
movq %rbp, 0x30(%rsp)
jmp 0x521e
movq %rdx, %rbx
movb $0x8, %al
jmp 0x51f9
movq %rdx, %rbx
cmpb $0x7, 0xb(%rsp)
movl $0xa, %eax
movl $0x10, %ecx
cmovel %ecx, %eax
movzbl %al, %edx
movsbl 0x14(%rsp), %ecx
movq %rbp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x54a2
movl %eax, %r13d
movl $0x20, %edi
movl 0xc(%rsp), %r9d
movq %rbx, %rdx
testq %rbp, %rbp
setne %cl
cmpb $0x0, 0x24(%rsp)
setne %al
andb %cl, %al
cmpb $0x6, 0xb(%rsp)
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x5248
movl %r13d, %ecx
incl %r13d
movb $0x30, 0x30(%rsp,%rcx)
xorl %ebp, %ebp
testb %al, %al
je 0x5278
xorl %ebp, %ebp
cmpb $0x7, 0xb(%rsp)
je 0x5263
cmpl $0x5, %edx
jne 0x526c
movl $0x42, %ecx
jmp 0x5268
movl $0x58, %ecx
xorl %eax, %eax
jmp 0x5270
xorl %ecx, %ecx
movb $0x1, %al
testb %al, %al
je 0x53a3
leaq 0x30(%rsp), %rbx
xorl %ecx, %ecx
testl %ecx, %ecx
je 0x52c5
movl $0x30, %edi
movq %r15, %rsi
movq %r13, 0x50(%rsp)
movq %r15, %r13
movl %ebp, %r15d
movl %ecx, %ebp
callq *%r12
movq 0x18(%rsp), %rax
addl $0x2, %eax
movq %rax, 0x18(%rsp)
movl %ebp, %edi
movl %r15d, %ebp
movq %r13, %r15
movq 0x50(%rsp), %r13
movq %r15, %rsi
callq *%r12
movl 0xc(%rsp), %r9d
movl $0x20, %edi
cmpb $0x3, 0xb(%rsp)
jne 0x530c
testq %rbx, %rbx
je 0x5367
testl %r13d, %r13d
jle 0x5367
movl %r13d, %ebp
xorl %r13d, %r13d
movsbl (%rbx,%r13), %edi
movq %r15, %rsi
callq *%r12
incq %r13
testq %rbx, %rbx
je 0x52fc
cmpq %rbp, %r13
jb 0x52e4
movq 0x18(%rsp), %rax
addl %r13d, %eax
movq %rax, %r13
jmp 0x5397
testb %bpl, %bpl
je 0x532c
movsbl %bpl, %edi
movq 0x18(%rsp), %rax
incl %eax
movq %rax, 0x18(%rsp)
movq %r15, %rsi
callq *%r12
movl $0x20, %edi
cmpb $0x5, 0xb(%rsp)
jne 0x5373
testl %r13d, %r13d
movq 0x28(%rsp), %rbp
je 0x53bb
movl %r13d, %ebx
decq %rbx
movq 0x30(%rsp), %rax
btq %rbx, %rax
movl $0x0, %edi
adcl $0x30, %edi
movq %r15, %rsi
callq *%r12
addq $-0x1, %rbx
jb 0x5343
addl 0x18(%rsp), %r13d
jmp 0x539c
movq 0x28(%rsp), %rbp
movq 0x18(%rsp), %r13
jmp 0x53c5
testl %r13d, %r13d
jle 0x53b6
movl %r13d, %ebp
incq %rbp
movsbl -0x2(%rbx,%rbp), %edi
movq %r15, %rsi
callq *%r12
decq %rbp
cmpq $0x1, %rbp
jg 0x537e
addl 0x18(%rsp), %r13d
movq 0x28(%rsp), %rbp
movl $0x20, %edi
jmp 0x53c0
movsbl 0x14(%rsp), %eax
addl %eax, %ecx
xorl %ebp, %ebp
leaq 0x30(%rsp), %rbx
jmp 0x527f
movq 0x28(%rsp), %rbp
movq 0x18(%rsp), %r13
movl 0xc(%rsp), %r9d
movslq %r9d, %rax
addq %rax, %rbp
movq 0x48(%rsp), %rbx
jmp 0x4ddf
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x5417
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x5423
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x542c
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x5438
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x543e
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x544a
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movslq (%rax), %rax
jmp 0x544e
xorl %eax, %eax
jmp 0x544e
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movswq (%rax), %rax
jmp 0x544e
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movsbq (%rax), %rax
testq %rax, %rax
movzbl %r14b, %ebp
movl $0x2d, %ecx
cmovsl %ecx, %ebp
movq %rax, %rdi
negq %rdi
cmovsq %rax, %rdi
movsbl 0x14(%rsp), %ecx
leaq 0x30(%rsp), %rbx
movq %rbx, %rsi
movl $0xa, %edx
callq 0x54a2
movl %eax, %r13d
movl $0x20, %edi
movl 0xc(%rsp), %r9d
jmp 0x527d
movl %r13d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/charlesnicholson[P]nanoprintf/tests/../nanoprintf.h
|
npf_vsnprintf
|
int npf_vsnprintf(char *buffer, size_t bufsz, char const *format, va_list vlist) {
npf_bufputc_ctx_t bufputc_ctx;
bufputc_ctx.dst = buffer;
bufputc_ctx.len = bufsz;
bufputc_ctx.cur = 0;
npf_putc const pc = buffer ? npf_bufputc : npf_bufputc_nop;
int const n = npf_vpprintf(pc, &bufputc_ctx, format, vlist);
pc('\0', &bufputc_ctx);
if (buffer && bufsz) {
#ifdef NANOPRINTF_SNPRINTF_SAFE_EMPTY_STRING_ON_OVERFLOW
if (n >= (int)bufsz) { buffer[0] = '\0'; }
#else
buffer[bufsz - 1] = '\0';
#endif
}
return n;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %rdi, (%r15)
movq %rsi, 0x8(%r15)
movq $0x0, 0x10(%r15)
testq %rdi, %rdi
sete %r13b
leaq 0x42(%rip), %rax # 0x5654
leaq 0x55(%rip), %r12 # 0x566e
cmovneq %rax, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x4dac
movl %eax, %ebp
xorl %edi, %edi
movq %r15, %rsi
callq *%r12
testq %rbx, %rbx
sete %al
orb %r13b, %al
jne 0x5643
movb $0x0, -0x1(%r14,%rbx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/charlesnicholson[P]nanoprintf/tests/../nanoprintf.h
|
(anonymous namespace)::require_conform(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*, ...)
|
void require_conform(const std::string& expected, char const *fmt, ...) {
char buf[256];
std::string sys_printf_result; {
va_list args;
va_start(args, fmt);
vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
buf[sizeof(buf)-1] = '\0';
sys_printf_result = buf;
}
std::string npf_result; {
va_list args;
va_start(args, fmt);
npf_vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
buf[sizeof(buf)-1] = '\0';
npf_result = buf;
}
REQUIRE(sys_printf_result == expected);
REQUIRE(npf_result == expected);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp # imm = 0x248
movq %rsi, %r15
movq %rdi, 0x48(%rsp)
leaq 0x90(%rsp), %rbp
movq %rdx, 0x10(%rbp)
movq %rcx, 0x18(%rbp)
movq %r8, 0x20(%rbp)
movq %r9, 0x28(%rbp)
testb %al, %al
je 0x6c29
movaps %xmm0, 0xc0(%rsp)
movaps %xmm1, 0xd0(%rsp)
movaps %xmm2, 0xe0(%rsp)
movaps %xmm3, 0xf0(%rsp)
movaps %xmm4, 0x100(%rsp)
movaps %xmm5, 0x110(%rsp)
movaps %xmm6, 0x120(%rsp)
movaps %xmm7, 0x130(%rsp)
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
xorl %r13d, %r13d
movb %r13b, (%r14)
leaq 0x50(%rsp), %rcx
movq %rbp, 0x10(%rcx)
leaq 0x280(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rbx # imm = 0x3000000010
movq %rbx, (%rcx)
leaq 0x140(%rsp), %r12
movl $0x100, %esi # imm = 0x100
movq %r12, %rdi
movq %r15, %rdx
callq 0x41e0
movb %r13b, 0xff(%r12)
movq -0x8(%r14), %r13
movq %r12, %rdi
callq 0x4150
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x4520
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x70(%rsp), %rcx
movq %rbp, 0x10(%rcx)
leaq 0x280(%rsp), %rdx
movq %rdx, 0x8(%rcx)
movq %rbx, (%rcx)
leaq 0x8(%rsp), %rsi
movq %r12, (%rsi)
movq $0x100, 0x8(%rsi) # imm = 0x100
movq %rax, 0x10(%rsi)
leaq -0x1695(%rip), %rdi # 0x5654
movq %r15, %rdx
callq 0x4dac
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jae 0x6d0f
movq 0x8(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x18(%rsp)
movb $0x0, (%rcx,%rax)
leaq 0x140(%rsp), %r12
movb $0x0, 0xff(%r12)
leaq 0x50(%rsp), %r15
movq 0x8(%r15), %r13
movq %r12, %rdi
callq 0x4150
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x4520
leaq 0x4(%rsp), %rdi
movl $0xc, %esi
callq 0x9352
movq 0x48(%rsp), %rbx
movl 0x4(%rsp), %eax
leaq 0x70(%rsp), %rsi
leaq 0x28(%rsp), %rcx
movq %rcx, (%rsi)
movl %eax, 0x8(%rsi)
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x6eba
leaq 0x13368(%rip), %rsi # 0x1a0e8
leaq 0x135bd(%rip), %rcx # 0x1a344
leaq 0x8(%rsp), %r8
movl $0xc, %edi
movl $0x3b, %edx
callq 0xa3e0
leaq 0x10(%rsp), %rdi
callq 0x7392
leaq 0x4(%rsp), %rdi
movl $0xc, %esi
callq 0x9352
movl 0x4(%rsp), %eax
leaq 0x70(%rsp), %rsi
movq %r15, (%rsi)
movl %eax, 0x8(%rsi)
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x6eba
leaq 0x13311(%rip), %rsi # 0x1a0e8
leaq 0x13584(%rip), %rcx # 0x1a362
leaq 0x8(%rsp), %r8
movl $0xc, %edi
movl $0x3c, %edx
callq 0xa3e0
leaq 0x10(%rsp), %rdi
callq 0x7392
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x6e13
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6e2f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4390
addq $0x248, %rsp # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6e43
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7392
jmp 0x6e5e
movq %rax, %rbx
jmp 0x6e75
jmp 0x6e5b
jmp 0x6e5b
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x6e75
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6e91
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x45f0
nop
|
/charlesnicholson[P]nanoprintf/tests/conformance.cc
|
doctest::String doctest::detail::stringifyBinaryExpr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
String stringifyBinaryExpr(const DOCTEST_REF_WRAP(L) lhs, const char* op,
const DOCTEST_REF_WRAP(R) rhs) {
return (DOCTEST_STRINGIFY(lhs)) + op + (DOCTEST_STRINGIFY(rhs));
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x30(%rsp), %rdi
callq 0x704b
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x73a6
leaq 0x48(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0x78ca
movq %rsp, %rdi
movq %r14, %rsi
callq 0x704b
leaq 0x48(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x78ca
movq %rsp, %rdi
callq 0x7392
leaq 0x48(%rsp), %rdi
callq 0x7392
leaq 0x18(%rsp), %rdi
callq 0x7392
leaq 0x30(%rsp), %rdi
callq 0x7392
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7392
jmp 0x701b
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x7392
jmp 0x702a
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x7392
jmp 0x7039
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x7392
movq %rbx, %rdi
callq 0x45f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::skipPathFromFilename(char const*)
|
const char* skipPathFromFilename(const char* file) {
#ifndef DOCTEST_CONFIG_DISABLE
if(getContextOptions()->no_path_in_filenames) {
auto back = std::strrchr(file, '\\');
auto forward = std::strrchr(file, '/');
if(back || forward) {
if(back > forward)
forward = back;
return forward + 1;
}
}
#endif // DOCTEST_CONFIG_DISABLE
return file;
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x1d17d(%rip), %rax # 0x25398
cmpb $0x1, 0x7c(%rax)
jne 0x8253
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x43d0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x43d0
cmpq %rax, %r14
movq %rax, %rcx
cmovaq %r14, %rcx
orq %rax, %r14
je 0x8253
incq %rcx
movq %rcx, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::operator<(doctest::Approx const&, double)
|
bool operator<(const Approx& lhs, double rhs) { return lhs.m_value < rhs && lhs != rhs; }
|
movsd 0x10(%rdi), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x88d6
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
movapd 0x11c9b(%rip), %xmm3 # 0x1a550
andpd %xmm3, %xmm2
andpd %xmm3, %xmm0
andpd %xmm3, %xmm1
maxsd %xmm0, %xmm1
addsd 0x8(%rdi), %xmm1
mulsd (%rdi), %xmm1
ucomisd %xmm2, %xmm1
setbe %al
retq
xorl %eax, %eax
retq
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::TestCase::TestCase(void (*)(), char const*, unsigned int, doctest::detail::TestSuite const&, doctest::String const&, int)
|
TestCase::TestCase(funcType test, const char* file, unsigned line, const TestSuite& test_suite,
const String& type, int template_id) {
m_file = file;
m_line = line;
m_name = nullptr; // will be later overridden in operator*
m_test_suite = test_suite.m_test_suite;
m_description = test_suite.m_description;
m_skip = test_suite.m_skip;
m_no_breaks = test_suite.m_no_breaks;
m_no_output = test_suite.m_no_output;
m_may_fail = test_suite.m_may_fail;
m_should_fail = test_suite.m_should_fail;
m_expected_failures = test_suite.m_expected_failures;
m_timeout = test_suite.m_timeout;
m_test = test;
m_type = type;
m_template_id = template_id;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x30(%rsp)
movq %r8, %r12
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, 0x28(%rsp)
movq %rdi, %rbx
xorl %eax, %eax
movb %al, (%rdi)
movb $0x17, %cl
movb %cl, 0x17(%rdi)
leaq 0x58(%rdi), %rdx
movq %rdx, 0x8(%rsp)
movb %al, 0x58(%rdi)
movb %cl, 0x6f(%rdi)
movb %al, 0x78(%rdi)
movb %cl, 0x8f(%rdi)
movq %r14, %rdi
callq 0x4150
movq %rax, %r13
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %r13d, %esi
callq 0x72de
movl %r13d, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
cmpq %rbx, %r15
movq 0x8(%rsp), %r14
je 0x93fb
cmpb $0x0, 0x17(%rbx)
jns 0x93e0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x93e0
callq 0x4450
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
movb $0x0, 0x10(%rsp)
movb $0x17, 0x27(%rsp)
cmpb $0x0, 0x27(%rsp)
jns 0x9411
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9411
callq 0x4450
movl %ebp, 0x18(%rbx)
movq $0x0, 0x20(%rbx)
movq (%r12), %rax
movq %rax, 0x28(%rbx)
movq 0x8(%r12), %rax
movq %rax, 0x30(%rbx)
movb 0x10(%r12), %al
movb %al, 0x38(%rbx)
movb 0x11(%r12), %al
movb %al, 0x39(%rbx)
movb 0x12(%r12), %al
movb %al, 0x3a(%rbx)
movb 0x13(%r12), %al
movb %al, 0x3b(%rbx)
movb 0x14(%r12), %al
movb %al, 0x3c(%rbx)
movl 0x18(%r12), %eax
movl %eax, 0x40(%rbx)
movsd 0x20(%r12), %xmm0
movsd %xmm0, 0x48(%rbx)
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rbx)
movq %r14, %rdi
movq 0x30(%rsp), %rsi
callq 0x7454
movl 0x70(%rsp), %eax
movl %eax, 0x70(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9497
movq %rax, %r15
cmpb $0x0, 0x8f(%rbx)
jns 0x94b1
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x94b1
callq 0x4450
cmpb $0x0, 0x6f(%rbx)
jns 0x94c9
movq 0x8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x94c9
callq 0x4450
cmpb $0x0, 0x17(%rbx)
jns 0x94dc
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x94dc
callq 0x4450
movq %r15, %rdi
callq 0x45f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::TestCase::TestCase(doctest::detail::TestCase const&)
|
TestCase::TestCase(const TestCase& other)
: TestCaseData() {
*this = other;
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x17(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, (%rdi)
movb $0x17, %al
movb %al, 0x17(%rdi)
leaq 0x58(%rdi), %r15
xorl %ecx, %ecx
movb %cl, 0x58(%rdi)
leaq 0x6f(%rdi), %r12
movb %al, 0x6f(%rdi)
movb %cl, 0x78(%rdi)
movb %al, 0x8f(%rdi)
callq 0x956a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r13
cmpb $0x0, 0x8f(%rbx)
jns 0x9551
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x9551
callq 0x4450
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x46a2
movq %r13, %rdi
callq 0x45f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::TestCase::operator=(doctest::detail::TestCase const&)
|
TestCase& TestCase::operator=(const TestCase& other) {
TestCaseData::operator=(other);
m_test = other.m_test;
m_type = other.m_type;
m_template_id = other.m_template_id;
m_full_name = other.m_full_name;
if(m_template_id != -1)
m_name = m_full_name.c_str();
return *this;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x7454
movups 0x18(%r14), %xmm0
movups 0x28(%r14), %xmm1
movups 0x38(%r14), %xmm2
movups %xmm0, 0x18(%rbx)
movups %xmm1, 0x28(%rbx)
movups %xmm2, 0x38(%rbx)
movq 0x48(%r14), %rax
movq %rax, 0x48(%rbx)
movq 0x50(%r14), %rax
movq %rax, 0x50(%rbx)
leaq 0x58(%r14), %rsi
leaq 0x58(%rbx), %rdi
callq 0x7454
movl 0x70(%r14), %eax
movl %eax, 0x70(%rbx)
addq $0x78, %r14
leaq 0x78(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7454
cmpl $-0x1, 0x70(%rbx)
je 0x95e3
cmpb $0x0, 0x8f(%rbx)
jns 0x95df
movq 0x78(%rbx), %r15
movq %r15, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::TestCase::operator<(doctest::detail::TestCase const&) const
|
bool TestCase::operator<(const TestCase& other) const {
// this will be used only to differentiate between test cases - not relevant for sorting
if(m_line != other.m_line)
return m_line < other.m_line;
const int name_cmp = strcmp(m_name, other.m_name);
if(name_cmp != 0)
return name_cmp < 0;
const int file_cmp = m_file.compare(other.m_file);
if(file_cmp != 0)
return file_cmp < 0;
return m_template_id < other.m_template_id;
}
|
movl 0x18(%rsi), %eax
cmpl %eax, 0x18(%rdi)
jne 0x982a
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
movq 0x20(%rsi), %rsi
callq 0x44a0
testl %eax, %eax
je 0x982e
shrl $0x1f, %eax
jmp 0x9864
setb %al
retq
cmpb $0x0, 0x17(%rbx)
movq %rbx, %rsi
jns 0x983a
movq (%rbx), %rsi
cmpb $0x0, 0x17(%r14)
movq %r14, %rdi
jns 0x9847
movq (%r14), %rdi
callq 0x44a0
movl %eax, %ecx
movl 0x70(%r14), %edx
xorl %eax, %eax
cmpl 0x70(%rbx), %edx
setl %al
xorl %edx, %edx
testl %ecx, %ecx
sets %dl
cmovnel %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::isDebuggerActive()
|
~ErrnoGuard() { errno = m_oldErrno; }
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
callq 0x4050
movq %rax, %rbx
movl (%rax), %ebp
leaq 0x11091(%rip), %rsi # 0x1a959
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x4620
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq %rsp, %r15
leaq 0x11071(%rip), %r12 # 0x1a96b
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4350
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4630
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x995b
movl $0xb, %edx
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rcx
callq 0x4470
testl %eax, %eax
jne 0x98fa
movl %ebp, %r14d
cmpq $0xc, 0x8(%rsp)
jb 0x995e
movq (%rsp), %rax
cmpb $0x30, 0xb(%rax)
setne %bpl
jmp 0x9960
movl %ebp, %r14d
xorl %ebp, %ebp
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x9976
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x20(%rsp), %rdi
callq 0x40c0
movl %r14d, (%rbx)
movl %ebp, %eax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x99bf
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x99b5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x20(%rsp), %rdi
callq 0x40c0
movl %ebp, (%rbx)
movq %r14, %rdi
callq 0x45f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::registerExceptionTranslatorImpl(doctest::detail::IExceptionTranslator const*)
|
void registerExceptionTranslatorImpl(const IExceptionTranslator* et) {
if(std::find(getExceptionTranslators().begin(), getExceptionTranslators().end(), et) ==
getExceptionTranslators().end())
getExceptionTranslators().push_back(et);
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rsp, %rbx
movq %rdi, (%rbx)
callq 0x9a44
movq 0x1bf89(%rip), %r14 # 0x25968
callq 0x9a44
movq 0x1bf85(%rip), %rsi # 0x25970
movq %r14, %rdi
movq %rbx, %rdx
callq 0x17a32
movq %rax, %rbx
callq 0x9a44
cmpq 0x1bf6b(%rip), %rbx # 0x25970
jne 0x9a3c
callq 0x9a44
movq 0x1bf5d(%rip), %rsi # 0x25970
cmpq 0x1bf5e(%rip), %rsi # 0x25978
je 0x9a2d
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x1bf45(%rip) # 0x25970
jmp 0x9a3c
leaq 0x1bf34(%rip), %rdi # 0x25968
movq %rsp, %rdx
callq 0x17ad2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::ContextScopeBase::ContextScopeBase(doctest::detail::ContextScopeBase&&)
|
ContextScopeBase::ContextScopeBase(ContextScopeBase&& other) noexcept {
if (other.need_to_destroy) {
other.destroy();
}
other.need_to_destroy = false;
g_infoContexts.push_back(this);
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1ae17(%rip), %rax # 0x248c0
movq %rax, (%rdi)
movb $0x1, 0x8(%rdi)
cmpb $0x1, 0x8(%rsi)
jne 0x9abe
movq %r14, %rdi
callq 0x9af4
movb $0x0, 0x8(%r14)
callq 0x15c12
movq %fs:0x0, %rax
leaq -0x30(%rax), %rdi
movq %rsp, %rsi
movq %rbx, (%rsi)
callq 0x17c0e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x163f0
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::ContextScopeBase::destroy()
|
void ContextScopeBase::destroy() {
#if defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411L && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
if(std::uncaught_exceptions() > 0) {
#else
if(std::uncaught_exception()) {
#endif
std::ostringstream s;
this->stringify(&s);
g_cs->stringifiedContexts.push_back(s.str().c_str());
}
g_infoContexts.pop_back();
}
DOCTEST_CLANG_SUPPRESS_WARNING_POP
DOCTEST_GCC_SUPPRESS_WARNING_POP
DOCTEST_MSVC_SUPPRESS_WARNING_POP
} // namespace detail
namespace {
using namespace detail;
#if !defined(DOCTEST_CONFIG_POSIX_SIGNALS) && !defined(DOCTEST_CONFIG_WINDOWS_SEH)
struct FatalConditionHandler
{
static void reset() {}
static void allocateAltStackMem() {}
static void freeAltStackMem() {}
};
#else // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH
void reportFatal(const std::string&);
#ifdef DOCTEST_PLATFORM_WINDOWS
struct SignalDefs
{
DWORD id;
const char* name;
};
// There is no 1-1 mapping between signals and windows exceptions.
// Windows can easily distinguish between SO and SigSegV,
// but SigInt, SigTerm, etc are handled differently.
SignalDefs signalDefs[] = {
{static_cast<DWORD>(EXCEPTION_ILLEGAL_INSTRUCTION),
"SIGILL - Illegal instruction signal"},
{static_cast<DWORD>(EXCEPTION_STACK_OVERFLOW), "SIGSEGV - Stack overflow"},
{static_cast<DWORD>(EXCEPTION_ACCESS_VIOLATION),
"SIGSEGV - Segmentation violation signal"},
{static_cast<DWORD>(EXCEPTION_INT_DIVIDE_BY_ZERO), "Divide by zero error"},
};
struct FatalConditionHandler
{
static LONG CALLBACK handleException(PEXCEPTION_POINTERS ExceptionInfo) {
// Multiple threads may enter this filter/handler at once. We want the error message to be printed on the
// console just once no matter how many threads have crashed.
DOCTEST_DECLARE_STATIC_MUTEX(mutex)
static bool execute = true;
{
DOCTEST_LOCK_MUTEX(mutex)
if(execute) {
bool reported = false;
for(size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {
if(ExceptionInfo->ExceptionRecord->ExceptionCode == signalDefs[i].id) {
reportFatal(signalDefs[i].name);
reported = true;
break;
}
}
if(reported == false)
reportFatal("Unhandled SEH exception caught");
if(isDebuggerActive() && !g_cs->no_breaks)
DOCTEST_BREAK_INTO_DEBUGGER();
}
execute = false;
}
std::exit(EXIT_FAILURE);
}
static void allocateAltStackMem() {}
static void freeAltStackMem() {}
FatalConditionHandler() {
isSet = true;
// 32k seems enough for doctest to handle stack overflow,
// but the value was found experimentally, so there is no strong guarantee
guaranteeSize = 32 * 1024;
// Register an unhandled exception filter
previousTop = SetUnhandledExceptionFilter(handleException);
// Pass in guarantee size to be filled
SetThreadStackGuarantee(&guaranteeSize);
// On Windows uncaught exceptions from another thread, exceptions from
// destructors, or calls to std::terminate are not a SEH exception
// The terminal handler gets called when:
// - std::terminate is called FROM THE TEST RUNNER THREAD
// - an exception is thrown from a destructor FROM THE TEST RUNNER THREAD
original_terminate_handler = std::get_terminate();
std::set_terminate([]() DOCTEST_NOEXCEPT {
reportFatal("Terminate handler called");
if(isDebuggerActive() && !g_cs->no_breaks)
DOCTEST_BREAK_INTO_DEBUGGER();
std::exit(EXIT_FAILURE); // explicitly exit - otherwise the SIGABRT handler may be called as well
});
// SIGABRT is raised when:
// - std::terminate is called FROM A DIFFERENT THREAD
// - an exception is thrown from a destructor FROM A DIFFERENT THREAD
// - an uncaught exception is thrown FROM A DIFFERENT THREAD
prev_sigabrt_handler = std::signal(SIGABRT, [](int signal) DOCTEST_NOEXCEPT {
if(signal == SIGABRT) {
reportFatal("SIGABRT - Abort (abnormal termination) signal");
if(isDebuggerActive() && !g_cs->no_breaks)
DOCTEST_BREAK_INTO_DEBUGGER();
std::exit(EXIT_FAILURE);
}
});
// The following settings are taken from google test, and more
// specifically from UnitTest::Run() inside of gtest.cc
// the user does not want to see pop-up dialogs about crashes
prev_error_mode_1 = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT |
SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
// This forces the abort message to go to stderr in all circumstances.
prev_error_mode_2 = _set_error_mode(_OUT_TO_STDERR);
// In the debug version, Visual Studio pops up a separate dialog
// offering a choice to debug the aborted program - we want to disable that.
prev_abort_behavior = _set_abort_behavior(0x0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
// In debug mode, the Windows CRT can crash with an assertion over invalid
// input (e.g. passing an invalid file descriptor). The default handling
// for these assertions is to pop up a dialog and wait for user input.
// Instead ask the CRT to dump such assertions to stderr non-interactively.
prev_report_mode = _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
prev_report_file = _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
}
static void reset() {
if(isSet) {
// Unregister handler and restore the old guarantee
SetUnhandledExceptionFilter(previousTop);
SetThreadStackGuarantee(&guaranteeSize);
std::set_terminate(original_terminate_handler);
std::signal(SIGABRT, prev_sigabrt_handler);
SetErrorMode(prev_error_mode_1);
_set_error_mode(prev_error_mode_2);
_set_abort_behavior(prev_abort_behavior, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
static_cast<void>(_CrtSetReportMode(_CRT_ASSERT, prev_report_mode));
static_cast<void>(_CrtSetReportFile(_CRT_ASSERT, prev_report_file));
isSet = false;
}
}
~FatalConditionHandler() { reset(); }
private:
static UINT prev_error_mode_1;
static int prev_error_mode_2;
static unsigned int prev_abort_behavior;
static int prev_report_mode;
static _HFILE prev_report_file;
static void (DOCTEST_CDECL *prev_sigabrt_handler)(int);
static std::terminate_handler original_terminate_handler;
static bool isSet;
static ULONG guaranteeSize;
static LPTOP_LEVEL_EXCEPTION_FILTER previousTop;
};
UINT FatalConditionHandler::prev_error_mode_1;
int FatalConditionHandler::prev_error_mode_2;
unsigned int FatalConditionHandler::prev_abort_behavior;
int FatalConditionHandler::prev_report_mode;
_HFILE FatalConditionHandler::prev_report_file;
void (DOCTEST_CDECL *FatalConditionHandler::prev_sigabrt_handler)(int);
std::terminate_handler FatalConditionHandler::original_terminate_handler;
bool FatalConditionHandler::isSet = false;
ULONG FatalConditionHandler::guaranteeSize = 0;
LPTOP_LEVEL_EXCEPTION_FILTER FatalConditionHandler::previousTop = nullptr;
#else // DOCTEST_PLATFORM_WINDOWS
struct SignalDefs
{
int id;
const char* name;
};
SignalDefs signalDefs[] = {{SIGINT, "SIGINT - Terminal interrupt signal"},
{SIGILL, "SIGILL - Illegal instruction signal"},
{SIGFPE, "SIGFPE - Floating point error signal"},
{SIGSEGV, "SIGSEGV - Segmentation violation signal"},
{SIGTERM, "SIGTERM - Termination request signal"},
{SIGABRT, "SIGABRT - Abort (abnormal termination) signal"}};
struct FatalConditionHandler
{
static bool isSet;
static struct sigaction oldSigActions[DOCTEST_COUNTOF(signalDefs)];
static stack_t oldSigStack;
static size_t altStackSize;
static char* altStackMem;
static void handleSignal(int sig) {
const char* name = "<unknown signal>";
for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {
SignalDefs& def = signalDefs[i];
if(sig == def.id) {
name = def.name;
break;
}
}
reset();
reportFatal(name);
raise(sig);
}
static void allocateAltStackMem() {
altStackMem = new char[altStackSize];
}
static void freeAltStackMem() {
delete[] altStackMem;
}
FatalConditionHandler() {
isSet = true;
stack_t sigStack;
sigStack.ss_sp = altStackMem;
sigStack.ss_size = altStackSize;
sigStack.ss_flags = 0;
sigaltstack(&sigStack, &oldSigStack);
struct sigaction sa = {};
sa.sa_handler = handleSignal;
sa.sa_flags = SA_ONSTACK;
for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {
sigaction(signalDefs[i].id, &sa, &oldSigActions[i]);
}
}
~FatalConditionHandler() { reset(); }
static void reset() {
if(isSet) {
// Set signals back to previous values -- hopefully nobody overwrote them in the meantime
for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {
sigaction(signalDefs[i].id, &oldSigActions[i], nullptr);
}
// Return the old stack
sigaltstack(&oldSigStack, nullptr);
isSet = false;
}
}
};
bool FatalConditionHandler::isSet = false;
struct sigaction FatalConditionHandler::oldSigActions[DOCTEST_COUNTOF(signalDefs)] = {};
stack_t FatalConditionHandler::oldSigStack = {};
size_t FatalConditionHandler::altStackSize = 4 * SIGSTKSZ;
char* FatalConditionHandler::altStackMem = nullptr;
#endif // DOCTEST_PLATFORM_WINDOWS
#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH
} // namespace
namespace {
using namespace detail;
#ifdef DOCTEST_PLATFORM_WINDOWS
#define DOCTEST_OUTPUT_DEBUG_STRING(text) ::OutputDebugStringA(text)
#else
// TODO: integration with XCode and other IDEs
#define DOCTEST_OUTPUT_DEBUG_STRING(text)
#endif // Platform
void addAssert(assertType::Enum at) {
if((at & assertType::is_warn) == 0) //!OCLINT bitwise operator in conditional
g_cs->numAssertsCurrentTest_atomic++;
}
void addFailedAssert(assertType::Enum at) {
if((at & assertType::is_warn) == 0) //!OCLINT bitwise operator in conditional
g_cs->numAssertsFailedCurrentTest_atomic++;
}
#if defined(DOCTEST_CONFIG_POSIX_SIGNALS) || defined(DOCTEST_CONFIG_WINDOWS_SEH)
void reportFatal(const std::string& message) {
g_cs->failure_flags |= TestCaseFailureReason::Crash;
DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_exception, {message.c_str(), true});
while (g_cs->subcaseStack.size()) {
g_cs->subcaseStack.pop_back();
DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_end, DOCTEST_EMPTY);
}
g_cs->finalizeTestCaseData();
DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_end, *g_cs);
DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_end, *g_cs);
}
#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH
} // namespace
AssertData::AssertData(assertType::Enum at, const char* file, int line, const char* expr,
const char* exception_type, const StringContains& exception_string)
: m_test_case(g_cs->currentTest), m_at(at), m_file(file), m_line(line), m_expr(expr),
m_failed(true), m_threw(false), m_threw_as(false), m_exception_type(exception_type),
m_exception_string(exception_string) {
#if DOCTEST_MSVC
if (m_expr[0] == ' ') // this happens when variadic macros are disabled under MSVC
++m_expr;
#endif // MSVC
}
namespace detail {
ResultBuilder::ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr,
const char* exception_type, const String& exception_string)
: AssertData(at, file, line, expr, exception_type, exception_string) { }
ResultBuilder::ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr,
const char* exception_type, const Contains& exception_string)
: AssertData(at, file, line, expr, exception_type, exception_string) { }
void ResultBuilder::setResult(const Result& res) {
m_decomp = res.m_decomp;
m_failed = !res.m_passed;
}
void ResultBuilder::translateException() {
m_threw = true;
m_exception = translateActiveException();
}
bool ResultBuilder::log() {
if(m_at & assertType::is_throws) { //!OCLINT bitwise operator in conditional
m_failed = !m_threw;
} else if((m_at & assertType::is_throws_as) && (m_at & assertType::is_throws_with)) { //!OCLINT
m_failed = !m_threw_as || !m_exception_string.check(m_exception);
} else if(m_at & assertType::is_throws_as) { //!OCLINT bitwise operator in conditional
m_failed = !m_threw_as;
} else if(m_at & assertType::is_throws_with) { //!OCLINT bitwise operator in conditional
m_failed = !m_exception_string.check(m_exception);
} else if(m_at & assertType::is_nothrow) { //!OCLINT bitwise operator in conditional
m_failed = m_threw;
}
if(m_exception.size())
m_exception = "\"" + m_exception + "\"";
if(is_running_in_test) {
addAssert(m_at);
DOCTEST_ITERATE_THROUGH_REPORTERS(log_assert, *this);
if(m_failed)
addFailedAssert(m_at);
} else if(m_failed) {
failed_out_of_a_testing_context(*this);
}
return m_failed && isDebuggerActive() && !getContextOptions()->no_breaks &&
(g_cs->currentTest == nullptr || !g_cs->currentTest->m_no_breaks); // break into debugger
}
void ResultBuilder::react() const {
if(m_failed && checkIfShouldThrow(m_at))
throwException();
}
void failed_out_of_a_testing_context(const AssertData& ad) {
if(g_cs->ah)
g_cs->ah(ad);
else
std::abort();
}
bool decomp_assert(assertType::Enum at, const char* file, int line, const char* expr,
const Result& result) {
bool failed = !result.m_passed;
// ###################################################################################
// IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT
// THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED
// ###################################################################################
DOCTEST_ASSERT_OUT_OF_TESTS(result.m_decomp);
DOCTEST_ASSERT_IN_TESTS(result.m_decomp);
return !failed;
}
MessageBuilder::MessageBuilder(const char* file, int line, assertType::Enum severity) {
m_stream = tlssPush();
m_file = file;
m_line = line;
m_severity = severity;
}
MessageBuilder::~MessageBuilder() {
if (!logged)
tlssPop();
}
DOCTEST_DEFINE_INTERFACE(IExceptionTranslator)
bool MessageBuilder::log() {
if (!logged) {
m_string = tlssPop();
logged = true;
}
DOCTEST_ITERATE_THROUGH_REPORTERS(log_message, *this);
const bool isWarn = m_severity & assertType::is_warn;
// warn is just a message in this context so we don't treat it as an assert
if(!isWarn) {
addAssert(m_severity);
addFailedAssert(m_severity);
}
return isDebuggerActive() && !getContextOptions()->no_breaks && !isWarn &&
(g_cs->currentTest == nullptr || !g_cs->currentTest->m_no_breaks); // break into debugger
}
void MessageBuilder::react() {
if(m_severity & assertType::is_require) //!OCLINT bitwise operator in conditional
throwException();
}
} // namespace detail
namespace {
using namespace detail;
// clang-format off
// =================================================================================================
// The following code has been taken verbatim from Catch2/include/internal/catch_xmlwriter.h/cpp
// This is done so cherry-picking bug fixes is trivial - even the style/formatting is untouched.
// =================================================================================================
class XmlEncode {
public:
enum ForWhat { ForTextNodes, ForAttributes };
XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes );
void encodeTo( std::ostream& os ) const;
friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode );
private:
std::string m_str;
ForWhat m_forWhat;
};
class XmlWriter {
public:
class ScopedElement {
public:
ScopedElement( XmlWriter* writer );
ScopedElement( ScopedElement&& other ) DOCTEST_NOEXCEPT;
ScopedElement& operator=( ScopedElement&& other ) DOCTEST_NOEXCEPT;
~ScopedElement();
ScopedElement& writeText( std::string const& text, bool indent = true );
template<typename T>
ScopedElement& writeAttribute( std::string const& name, T const& attribute ) {
m_writer->writeAttribute( name, attribute );
return *this;
}
private:
mutable XmlWriter* m_writer = nullptr;
};
XmlWriter( std::ostream& os = std::cout );
~XmlWriter();
XmlWriter( XmlWriter const& ) = delete;
XmlWriter& operator=( XmlWriter const& ) = delete;
XmlWriter& startElement( std::string const& name );
ScopedElement scopedElement( std::string const& name );
XmlWriter& endElement();
XmlWriter& writeAttribute( std::string const& name, std::string const& attribute );
XmlWriter& writeAttribute( std::string const& name, const char* attribute );
XmlWriter& writeAttribute( std::string const& name, bool attribute );
template<typename T>
XmlWriter& writeAttribute( std::string const& name, T const& attribute ) {
std::stringstream rss;
rss << attribute;
return writeAttribute( name, rss.str() );
}
XmlWriter& writeText( std::string const& text, bool indent = true );
//XmlWriter& writeComment( std::string const& text );
//void writeStylesheetRef( std::string const& url );
//XmlWriter& writeBlankLine();
void ensureTagClosed();
void writeDeclaration();
private:
void newlineIfNecessary();
bool m_tagIsOpen = false;
bool m_needsNewline = false;
std::vector<std::string> m_tags;
std::string m_indent;
std::ostream& m_os;
};
// =================================================================================================
// The following code has been taken verbatim from Catch2/include/internal/catch_xmlwriter.h/cpp
// This is done so cherry-picking bug fixes is trivial - even the style/formatting is untouched.
// =================================================================================================
using uchar = unsigned char;
namespace {
size_t trailingBytes(unsigned char c) {
if ((c & 0xE0) == 0xC0) {
return 2;
}
if ((c & 0xF0) == 0xE0) {
return 3;
}
if ((c & 0xF8) == 0xF0) {
return 4;
}
DOCTEST_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered");
}
uint32_t headerValue(unsigned char c) {
if ((c & 0xE0) == 0xC0) {
return c & 0x1F;
}
if ((c & 0xF0) == 0xE0) {
return c & 0x0F;
}
if ((c & 0xF8) == 0xF0) {
return c & 0x07;
}
DOCTEST_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered");
}
void hexEscapeChar(std::ostream& os, unsigned char c) {
std::ios_base::fmtflags f(os.flags());
os << "\\x"
<< std::uppercase << std::hex << std::setfill('0') << std::setw(2)
<< static_cast<int>(c);
os.flags(f);
}
} // anonymous namespace
XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat )
: m_str( str ),
m_forWhat( forWhat )
{}
void XmlEncode::encodeTo( std::ostream& os ) const {
// Apostrophe escaping not necessary if we always use " to write attributes
// (see: https://www.w3.org/TR/xml/#syntax)
for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) {
uchar c = m_str[idx];
switch (c) {
case '<': os << "<"; break;
case '&': os << "&"; break;
case '>':
// See: https://www.w3.org/TR/xml/#syntax
if (idx > 2 && m_str[idx - 1] == ']' && m_str[idx - 2] == ']')
os << ">";
else
os << c;
break;
case '\"':
if (m_forWhat == ForAttributes)
os << """;
else
os << c;
break;
default:
// Check for control characters and invalid utf-8
// Escape control characters in standard ascii
// see https://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0
if (c < 0x09 || (c > 0x0D && c < 0x20) || c == 0x7F) {
hexEscapeChar(os, c);
break;
}
// Plain ASCII: Write it to stream
if (c < 0x7F) {
os << c;
break;
}
// UTF-8 territory
// Check if the encoding is valid and if it is not, hex escape bytes.
// Important: We do not check the exact decoded values for validity, only the encoding format
// First check that this bytes is a valid lead byte:
// This means that it is not encoded as 1111 1XXX
// Or as 10XX XXXX
if (c < 0xC0 ||
c >= 0xF8) {
hexEscapeChar(os, c);
break;
}
auto encBytes = trailingBytes(c);
// Are there enough bytes left to avoid accessing out-of-bounds memory?
if (idx + encBytes - 1 >= m_str.size()) {
hexEscapeChar(os, c);
break;
}
// The header is valid, check data
// The next encBytes bytes must together be a valid utf-8
// This means: bitpattern 10XX XXXX and the extracted value is sane (ish)
bool valid = true;
uint32_t value = headerValue(c);
for (std::size_t n = 1; n < encBytes; ++n) {
uchar nc = m_str[idx + n];
valid &= ((nc & 0xC0) == 0x80);
value = (value << 6) | (nc & 0x3F);
}
if (
// Wrong bit pattern of following bytes
(!valid) ||
// Overlong encodings
(value < 0x80) ||
( value < 0x800 && encBytes > 2) || // removed "0x80 <= value &&" because redundant
(0x800 < value && value < 0x10000 && encBytes > 3) ||
// Encoded value out of range
(value >= 0x110000)
) {
hexEscapeChar(os, c);
break;
}
// If we got here, this is in fact a valid(ish) utf-8 sequence
for (std::size_t n = 0; n < encBytes; ++n) {
os << m_str[idx + n];
}
idx += encBytes - 1;
break;
}
}
}
std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) {
xmlEncode.encodeTo( os );
return os;
}
XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer )
: m_writer( writer )
{}
XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) DOCTEST_NOEXCEPT
: m_writer( other.m_writer ){
other.m_writer = nullptr;
}
XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) DOCTEST_NOEXCEPT {
if ( m_writer ) {
m_writer->endElement();
}
m_writer = other.m_writer;
other.m_writer = nullptr;
return *this;
}
XmlWriter::ScopedElement::~ScopedElement() {
if( m_writer )
m_writer->endElement();
}
XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, bool indent ) {
m_writer->writeText( text, indent );
return *this;
}
XmlWriter::XmlWriter( std::ostream& os ) : m_os( os )
{
// writeDeclaration(); // called explicitly by the reporters that use the writer class - see issue #627
}
XmlWriter::~XmlWriter() {
while( !m_tags.empty() )
endElement();
}
XmlWriter& XmlWriter::startElement( std::string const& name ) {
ensureTagClosed();
newlineIfNecessary();
m_os << m_indent << '<' << name;
m_tags.push_back( name );
m_indent += " ";
m_tagIsOpen = true;
return *this;
}
XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name ) {
ScopedElement scoped( this );
startElement( name );
return scoped;
}
XmlWriter& XmlWriter::endElement() {
newlineIfNecessary();
m_indent = m_indent.substr( 0, m_indent.size()-2 );
if( m_tagIsOpen ) {
m_os << "/>";
m_tagIsOpen = false;
}
else {
m_os << m_indent << "</" << m_tags.back() << ">";
}
m_os << std::endl;
m_tags.pop_back();
return *this;
}
XmlWriter& XmlWriter::writeAttribute( std::string const& name, std::string const& attribute ) {
if( !name.empty() && !attribute.empty() )
m_os << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"';
return *this;
}
XmlWriter& XmlWriter::writeAttribute( std::string const& name, const char* attribute ) {
if( !name.empty() && attribute && attribute[0] != '\0' )
m_os << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"';
return *this;
}
XmlWriter& XmlWriter::writeAttribute( std::string const& name, bool attribute ) {
m_os << ' ' << name << "=\"" << ( attribute ? "true" : "false" ) << '"';
return *this;
}
XmlWriter& XmlWriter::writeText( std::string const& text, bool indent ) {
if( !text.empty() ){
bool tagWasOpen = m_tagIsOpen;
ensureTagClosed();
if( tagWasOpen && indent )
m_os << m_indent;
m_os << XmlEncode( text );
m_needsNewline = true;
}
return *this;
}
//XmlWriter& XmlWriter::writeComment( std::string const& text ) {
// ensureTagClosed();
// m_os << m_indent << "<!--" << text << "-->";
// m_needsNewline = true;
// return *this;
//}
//void XmlWriter::writeStylesheetRef( std::string const& url ) {
// m_os << "<?xml-stylesheet type=\"text/xsl\" href=\"" << url << "\"?>\n";
//}
//XmlWriter& XmlWriter::writeBlankLine() {
// ensureTagClosed();
// m_os << '\n';
// return *this;
//}
void XmlWriter::ensureTagClosed() {
if( m_tagIsOpen ) {
m_os << ">" << std::endl;
m_tagIsOpen = false;
}
}
void XmlWriter::writeDeclaration() {
m_os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
}
void XmlWriter::newlineIfNecessary() {
if( m_needsNewline ) {
m_os << std::endl;
m_needsNewline = false;
}
}
// =================================================================================================
// End of copy-pasted code from Catch
// =================================================================================================
// clang-format on
struct XmlReporter : public IReporter
{
XmlWriter xml;
DOCTEST_DECLARE_MUTEX(mutex)
// caching pointers/references to objects of these types - safe to do
const ContextOptions& opt;
const TestCaseData* tc = nullptr;
XmlReporter(const ContextOptions& co)
: xml(*co.cout)
, opt(co) {}
void log_contexts() {
int num_contexts = get_num_active_contexts();
if(num_contexts) {
auto contexts = get_active_contexts();
std::stringstream ss;
for(int i = 0; i < num_contexts; ++i) {
contexts[i]->stringify(&ss);
xml.scopedElement("Info").writeText(ss.str());
ss.str("");
}
}
}
unsigned line(unsigned l) const { return opt.no_line_numbers ? 0 : l; }
void test_case_start_impl(const TestCaseData& in) {
bool open_ts_tag = false;
if(tc != nullptr) { // we have already opened a test suite
if(std::strcmp(tc->m_test_suite, in.m_test_suite) != 0) {
xml.endElement();
open_ts_tag = true;
}
}
else {
open_ts_tag = true; // first test case ==> first test suite
}
if(open_ts_tag) {
xml.startElement("TestSuite");
xml.writeAttribute("name", in.m_test_suite);
}
tc = ∈
xml.startElement("TestCase")
.writeAttribute("name", in.m_name)
.writeAttribute("filename", skipPathFromFilename(in.m_file.c_str()))
.writeAttribute("line", line(in.m_line))
.writeAttribute("description", in.m_description);
if(Approx(in.m_timeout) != 0)
xml.writeAttribute("timeout", in.m_timeout);
if(in.m_may_fail)
xml.writeAttribute("may_fail", true);
if(in.m_should_fail)
xml.writeAttribute("should_fail", true);
}
// =========================================================================================
// WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE
// =========================================================================================
void report_query(const QueryData& in) override {
test_run_start();
if(opt.list_reporters) {
for(auto& curr : getListeners())
xml.scopedElement("Listener")
.writeAttribute("priority", curr.first.first)
.writeAttribute("name", curr.first.second);
for(auto& curr : getReporters())
xml.scopedElement("Reporter")
.writeAttribute("priority", curr.first.first)
.writeAttribute("name", curr.first.second);
} else if(opt.count || opt.list_test_cases) {
for(unsigned i = 0; i < in.num_data; ++i) {
xml.scopedElement("TestCase").writeAttribute("name", in.data[i]->m_name)
.writeAttribute("testsuite", in.data[i]->m_test_suite)
.writeAttribute("filename", skipPathFromFilename(in.data[i]->m_file.c_str()))
.writeAttribute("line", line(in.data[i]->m_line))
.writeAttribute("skipped", in.data[i]->m_skip);
}
xml.scopedElement("OverallResultsTestCases")
.writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters);
} else if(opt.list_test_suites) {
for(unsigned i = 0; i < in.num_data; ++i)
xml.scopedElement("TestSuite").writeAttribute("name", in.data[i]->m_test_suite);
xml.scopedElement("OverallResultsTestCases")
.writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters);
xml.scopedElement("OverallResultsTestSuites")
.writeAttribute("unskipped", in.run_stats->numTestSuitesPassingFilters);
}
xml.endElement();
}
void test_run_start() override {
xml.writeDeclaration();
// remove .exe extension - mainly to have the same output on UNIX and Windows
std::string binary_name = skipPathFromFilename(opt.binary_name.c_str());
#ifdef DOCTEST_PLATFORM_WINDOWS
if(binary_name.rfind(".exe") != std::string::npos)
binary_name = binary_name.substr(0, binary_name.length() - 4);
#endif // DOCTEST_PLATFORM_WINDOWS
xml.startElement("doctest").writeAttribute("binary", binary_name);
if(opt.no_version == false)
xml.writeAttribute("version", DOCTEST_VERSION_STR);
// only the consequential ones (TODO: filters)
xml.scopedElement("Options")
.writeAttribute("order_by", opt.order_by.c_str())
.writeAttribute("rand_seed", opt.rand_seed)
.writeAttribute("first", opt.first)
.writeAttribute("last", opt.last)
.writeAttribute("abort_after", opt.abort_after)
.writeAttribute("subcase_filter_levels", opt.subcase_filter_levels)
.writeAttribute("case_sensitive", opt.case_sensitive)
.writeAttribute("no_throw", opt.no_throw)
.writeAttribute("no_skip", opt.no_skip);
}
void test_run_end(const TestRunStats& p) override {
if(tc) // the TestSuite tag - only if there has been at least 1 test case
xml.endElement();
xml.scopedElement("OverallResultsAsserts")
.writeAttribute("successes", p.numAsserts - p.numAssertsFailed)
.writeAttribute("failures", p.numAssertsFailed);
xml.startElement("OverallResultsTestCases")
.writeAttribute("successes",
p.numTestCasesPassingFilters - p.numTestCasesFailed)
.writeAttribute("failures", p.numTestCasesFailed);
if(opt.no_skipped_summary == false)
xml.writeAttribute("skipped", p.numTestCases - p.numTestCasesPassingFilters);
xml.endElement();
xml.endElement();
}
void test_case_start(const TestCaseData& in) override {
test_case_start_impl(in);
xml.ensureTagClosed();
}
void test_case_reenter(const TestCaseData&) override {}
void test_case_end(const CurrentTestCaseStats& st) override {
xml.startElement("OverallResultsAsserts")
.writeAttribute("successes",
st.numAssertsCurrentTest - st.numAssertsFailedCurrentTest)
.writeAttribute("failures", st.numAssertsFailedCurrentTest)
.writeAttribute("test_case_success", st.testCaseSuccess);
if(opt.duration)
xml.writeAttribute("duration", st.seconds);
if(tc->m_expected_failures)
xml.writeAttribute("expected_failures", tc->m_expected_failures);
xml.endElement();
xml.endElement();
}
void test_case_exception(const TestCaseException& e) override {
DOCTEST_LOCK_MUTEX(mutex)
xml.scopedElement("Exception")
.writeAttribute("crash", e.is_crash)
.writeText(e.error_string.c_str());
}
void subcase_start(const SubcaseSignature& in) override {
xml.startElement("SubCase")
.writeAttribute("name", in.m_name)
.writeAttribute("filename", skipPathFromFilename(in.m_file))
.writeAttribute("line", line(in.m_line));
xml.ensureTagClosed();
}
void subcase_end() override { xml.endElement(); }
void log_assert(const AssertData& rb) override {
if(!rb.m_failed && !opt.success)
return;
DOCTEST_LOCK_MUTEX(mutex)
xml.startElement("Expression")
.writeAttribute("success", !rb.m_failed)
.writeAttribute("type", assertString(rb.m_at))
.writeAttribute("filename", skipPathFromFilename(rb.m_file))
.writeAttribute("line", line(rb.m_line));
xml.scopedElement("Original").writeText(rb.m_expr);
if(rb.m_threw)
xml.scopedElement("Exception").writeText(rb.m_exception.c_str());
if(rb.m_at & assertType::is_throws_as)
xml.scopedElement("ExpectedException").writeText(rb.m_exception_type);
if(rb.m_at & assertType::is_throws_with)
xml.scopedElement("ExpectedExceptionString").writeText(rb.m_exception_string.c_str());
if((rb.m_at & assertType::is_normal) && !rb.m_threw)
xml.scopedElement("Expanded").writeText(rb.m_decomp.c_str());
log_contexts();
xml.endElement();
}
void log_message(const MessageData& mb) override {
DOCTEST_LOCK_MUTEX(mutex)
xml.startElement("Message")
.writeAttribute("type", failureString(mb.m_severity))
.writeAttribute("filename", skipPathFromFilename(mb.m_file))
.writeAttribute("line", line(mb.m_line));
xml.scopedElement("Text").writeText(mb.m_string.c_str());
log_contexts();
xml.endElement();
}
void test_case_skipped(const TestCaseData& in) override {
if(opt.no_skipped_summary == false) {
test_case_start_impl(in);
xml.writeAttribute("skipped", "true");
xml.endElement();
}
}
};
DOCTEST_REGISTER_REPORTER("xml", 0, XmlReporter);
void fulltext_log_assert_to_stream(std::ostream& s, const AssertData& rb) {
if((rb.m_at & (assertType::is_throws_as | assertType::is_throws_with)) ==
0) //!OCLINT bitwise operator in conditional
s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << " ) "
<< Color::None;
if(rb.m_at & assertType::is_throws) { //!OCLINT bitwise operator in conditional
s << (rb.m_threw ? "threw as expected!" : "did NOT throw at all!") << "\n";
} else if((rb.m_at & assertType::is_throws_as) &&
(rb.m_at & assertType::is_throws_with)) { //!OCLINT
s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << ", \""
<< rb.m_exception_string.c_str()
<< "\", " << rb.m_exception_type << " ) " << Color::None;
if(rb.m_threw) {
if(!rb.m_failed) {
s << "threw as expected!\n";
} else {
s << "threw a DIFFERENT exception! (contents: " << rb.m_exception << ")\n";
}
} else {
s << "did NOT throw at all!\n";
}
} else if(rb.m_at &
assertType::is_throws_as) { //!OCLINT bitwise operator in conditional
s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << ", "
<< rb.m_exception_type << " ) " << Color::None
<< (rb.m_threw ? (rb.m_threw_as ? "threw as expected!" :
"threw a DIFFERENT exception: ") :
"did NOT throw at all!")
<< Color::Cyan << rb.m_exception << "\n";
} else if(rb.m_at &
assertType::is_throws_with) { //!OCLINT bitwise operator in conditional
s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << ", \""
<< rb.m_exception_string.c_str()
<< "\" ) " << Color::None
<< (rb.m_threw ? (!rb.m_failed ? "threw as expected!" :
"threw a DIFFERENT exception: ") :
"did NOT throw at all!")
<< Color::Cyan << rb.m_exception << "\n";
} else if(rb.m_at & assertType::is_nothrow) { //!OCLINT bitwise operator in conditional
s << (rb.m_threw ? "THREW exception: " : "didn't throw!") << Color::Cyan
<< rb.m_exception << "\n";
} else {
s << (rb.m_threw ? "THREW exception: " :
(!rb.m_failed ? "is correct!\n" : "is NOT correct!\n"));
if(rb.m_threw)
s << rb.m_exception << "\n";
else
s << " values: " << assertString(rb.m_at) << "( " << rb.m_decomp << " )\n";
}
}
// TODO:
// - log_message()
// - respond to queries
// - honor remaining options
// - more attributes in tags
struct JUnitReporter : public IReporter
{
XmlWriter xml;
DOCTEST_DECLARE_MUTEX(mutex)
Timer timer;
std::vector<String> deepestSubcaseStackNames;
struct JUnitTestCaseData
{
static std::string getCurrentTimestamp() {
// Beware, this is not reentrant because of backward compatibility issues
// Also, UTC only, again because of backward compatibility (%z is C++11)
time_t rawtime;
std::time(&rawtime);
auto const timeStampSize = sizeof("2017-01-16T17:06:45Z");
std::tm timeInfo;
#ifdef DOCTEST_PLATFORM_WINDOWS
gmtime_s(&timeInfo, &rawtime);
#else // DOCTEST_PLATFORM_WINDOWS
gmtime_r(&rawtime, &timeInfo);
#endif // DOCTEST_PLATFORM_WINDOWS
char timeStamp[timeStampSize];
const char* const fmt = "%Y-%m-%dT%H:%M:%SZ";
std::strftime(timeStamp, timeStampSize, fmt, &timeInfo);
return std::string(timeStamp);
}
struct JUnitTestMessage
{
JUnitTestMessage(const std::string& _message, const std::string& _type, const std::string& _details)
: message(_message), type(_type), details(_details) {}
JUnitTestMessage(const std::string& _message, const std::string& _details)
: message(_message), type(), details(_details) {}
std::string message, type, details;
};
struct JUnitTestCase
{
JUnitTestCase(const std::string& _classname, const std::string& _name)
: classname(_classname), name(_name), time(0), failures() {}
std::string classname, name;
double time;
std::vector<JUnitTestMessage> failures, errors;
};
void add(const std::string& classname, const std::string& name) {
testcases.emplace_back(classname, name);
}
void appendSubcaseNamesToLastTestcase(std::vector<String> nameStack) {
for(auto& curr: nameStack)
if(curr.size())
testcases.back().name += std::string("/") + curr.c_str();
}
void addTime(double time) {
if(time < 1e-4)
time = 0;
testcases.back().time = time;
totalSeconds += time;
}
void addFailure(const std::string& message, const std::string& type, const std::string& details) {
testcases.back().failures.emplace_back(message, type, details);
++totalFailures;
}
void addError(const std::string& message, const std::string& details) {
testcases.back().errors.emplace_back(message, details);
++totalErrors;
}
std::vector<JUnitTestCase> testcases;
double totalSeconds = 0;
int totalErrors = 0, totalFailures = 0;
};
JUnitTestCaseData testCaseData;
// caching pointers/references to objects of these types - safe to do
const ContextOptions& opt;
const TestCaseData* tc = nullptr;
JUnitReporter(const ContextOptions& co)
: xml(*co.cout)
, opt(co) {}
unsigned line(unsigned l) const { return opt.no_line_numbers ? 0 : l; }
// =========================================================================================
// WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE
// =========================================================================================
void report_query(const QueryData&) override {
xml.writeDeclaration();
}
void test_run_start() override {
xml.writeDeclaration();
}
void test_run_end(const TestRunStats& p) override {
// remove .exe extension - mainly to have the same output on UNIX and Windows
std::string binary_name = skipPathFromFilename(opt.binary_name.c_str());
#ifdef DOCTEST_PLATFORM_WINDOWS
if(binary_name.rfind(".exe") != std::string::npos)
binary_name = binary_name.substr(0, binary_name.length() - 4);
#endif // DOCTEST_PLATFORM_WINDOWS
xml.startElement("testsuites");
xml.startElement("testsuite").writeAttribute("name", binary_name)
.writeAttribute("errors", testCaseData.totalErrors)
.writeAttribute("failures", testCaseData.totalFailures)
.writeAttribute("tests", p.numAsserts);
if(opt.no_time_in_output == false) {
xml.writeAttribute("time", testCaseData.totalSeconds);
xml.writeAttribute("timestamp", JUnitTestCaseData::getCurrentTimestamp());
}
if(opt.no_version == false)
xml.writeAttribute("doctest_version", DOCTEST_VERSION_STR);
for(const auto& testCase : testCaseData.testcases) {
xml.startElement("testcase")
.writeAttribute("classname", testCase.classname)
.writeAttribute("name", testCase.name);
if(opt.no_time_in_output == false)
xml.writeAttribute("time", testCase.time);
// This is not ideal, but it should be enough to mimic gtest's junit output.
xml.writeAttribute("status", "run");
for(const auto& failure : testCase.failures) {
xml.scopedElement("failure")
.writeAttribute("message", failure.message)
.writeAttribute("type", failure.type)
.writeText(failure.details, false);
}
for(const auto& error : testCase.errors) {
xml.scopedElement("error")
.writeAttribute("message", error.message)
.writeText(error.details);
}
xml.endElement();
}
xml.endElement();
xml.endElement();
}
void test_case_start(const TestCaseData& in) override {
testCaseData.add(skipPathFromFilename(in.m_file.c_str()), in.m_name);
timer.start();
}
void test_case_reenter(const TestCaseData& in) override {
testCaseData.addTime(timer.getElapsedSeconds());
testCaseData.appendSubcaseNamesToLastTestcase(deepestSubcaseStackNames);
deepestSubcaseStackNames.clear();
timer.start();
testCaseData.add(skipPathFromFilename(in.m_file.c_str()), in.m_name);
}
void test_case_end(const CurrentTestCaseStats&) override {
testCaseData.addTime(timer.getElapsedSeconds());
testCaseData.appendSubcaseNamesToLastTestcase(deepestSubcaseStackNames);
deepestSubcaseStackNames.clear();
}
void test_case_exception(const TestCaseException& e) override {
DOCTEST_LOCK_MUTEX(mutex)
testCaseData.addError("exception", e.error_string.c_str());
}
void subcase_start(const SubcaseSignature& in) override {
deepestSubcaseStackNames.push_back(in.m_name);
}
void subcase_end() override {}
void log_assert(const AssertData& rb) override {
if(!rb.m_failed) // report only failures & ignore the `success` option
return;
DOCTEST_LOCK_MUTEX(mutex)
std::ostringstream os;
os << skipPathFromFilename(rb.m_file) << (opt.gnu_file_line ? ":" : "(")
<< line(rb.m_line) << (opt.gnu_file_line ? ":" : "):") << std::endl;
fulltext_log_assert_to_stream(os, rb);
log_contexts(os);
testCaseData.addFailure(rb.m_decomp.c_str(), assertString(rb.m_at), os.str());
}
void log_message(const MessageData&) override {}
void test_case_skipped(const TestCaseData&) override {}
void log_contexts(std::ostringstream& s) {
int num_contexts = get_num_active_contexts();
if(num_contexts) {
auto contexts = get_active_contexts();
s << " logged: ";
for(int i = 0; i < num_contexts; ++i) {
s << (i == 0 ? "" : " ");
contexts[i]->stringify(&s);
s << std::endl;
}
}
}
};
DOCTEST_REGISTER_REPORTER("junit", 0, JUnitReporter);
struct Whitespace
{
int nrSpaces;
explicit Whitespace(int nr)
: nrSpaces(nr) {}
};
std::ostream& operator<<(std::ostream& out, const Whitespace& ws) {
if(ws.nrSpaces != 0)
out << std::setw(ws.nrSpaces) << ' ';
return out;
}
struct ConsoleReporter : public IReporter
{
std::ostream& s;
bool hasLoggedCurrentTestStart;
std::vector<SubcaseSignature> subcasesStack;
size_t currentSubcaseLevel;
DOCTEST_DECLARE_MUTEX(mutex)
// caching pointers/references to objects of these types - safe to do
const ContextOptions& opt;
const TestCaseData* tc;
ConsoleReporter(const ContextOptions& co)
: s(*co.cout)
, opt(co) {}
ConsoleReporter(const ContextOptions& co, std::ostream& ostr)
: s(ostr)
, opt(co) {}
// =========================================================================================
// WHAT FOLLOWS ARE HELPERS USED BY THE OVERRIDES OF THE VIRTUAL METHODS OF THE INTERFACE
// =========================================================================================
void separator_to_stream() {
s << Color::Yellow
<< "==============================================================================="
"\n";
}
const char* getSuccessOrFailString(bool success, assertType::Enum at,
const char* success_str) {
if(success)
return success_str;
return failureString(at);
}
Color::Enum getSuccessOrFailColor(bool success, assertType::Enum at) {
return success ? Color::BrightGreen :
(at & assertType::is_warn) ? Color::Yellow : Color::Red;
}
void successOrFailColoredStringToStream(bool success, assertType::Enum at,
const char* success_str = "SUCCESS") {
s << getSuccessOrFailColor(success, at)
<< getSuccessOrFailString(success, at, success_str) << ": ";
}
void log_contexts() {
int num_contexts = get_num_active_contexts();
if(num_contexts) {
auto contexts = get_active_contexts();
s << Color::None << " logged: ";
for(int i = 0; i < num_contexts; ++i) {
s << (i == 0 ? "" : " ");
contexts[i]->stringify(&s);
s << "\n";
}
}
s << "\n";
}
// this was requested to be made virtual so users could override it
virtual void file_line_to_stream(const char* file, int line,
const char* tail = "") {
s << Color::LightGrey << skipPathFromFilename(file) << (opt.gnu_file_line ? ":" : "(")
<< (opt.no_line_numbers ? 0 : line) // 0 or the real num depending on the option
<< (opt.gnu_file_line ? ":" : "):") << tail;
}
void logTestStart() {
if(hasLoggedCurrentTestStart)
return;
separator_to_stream();
file_line_to_stream(tc->m_file.c_str(), tc->m_line, "\n");
if(tc->m_description)
s << Color::Yellow << "DESCRIPTION: " << Color::None << tc->m_description << "\n";
if(tc->m_test_suite && tc->m_test_suite[0] != '\0')
s << Color::Yellow << "TEST SUITE: " << Color::None << tc->m_test_suite << "\n";
if(strncmp(tc->m_name, " Scenario:", 11) != 0)
s << Color::Yellow << "TEST CASE: ";
s << Color::None << tc->m_name << "\n";
for(size_t i = 0; i < currentSubcaseLevel; ++i) {
if(subcasesStack[i].m_name[0] != '\0')
s << " " << subcasesStack[i].m_name << "\n";
}
if(currentSubcaseLevel != subcasesStack.size()) {
s << Color::Yellow << "\nDEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):\n" << Color::None;
for(size_t i = 0; i < subcasesStack.size(); ++i) {
if(subcasesStack[i].m_name[0] != '\0')
s << " " << subcasesStack[i].m_name << "\n";
}
}
s << "\n";
hasLoggedCurrentTestStart = true;
}
void printVersion() {
if(opt.no_version == false)
s << Color::Cyan << "[doctest] " << Color::None << "doctest version is \""
<< DOCTEST_VERSION_STR << "\"\n";
}
void printIntro() {
if(opt.no_intro == false) {
printVersion();
s << Color::Cyan << "[doctest] " << Color::None
<< "run with \"--" DOCTEST_OPTIONS_PREFIX_DISPLAY "help\" for options\n";
}
}
void printHelp() {
int sizePrefixDisplay = static_cast<int>(strlen(DOCTEST_OPTIONS_PREFIX_DISPLAY));
printVersion();
// clang-format off
s << Color::Cyan << "[doctest]\n" << Color::None;
s << Color::Cyan << "[doctest] " << Color::None;
s << "boolean values: \"1/on/yes/true\" or \"0/off/no/false\"\n";
s << Color::Cyan << "[doctest] " << Color::None;
s << "filter values: \"str1,str2,str3\" (comma separated strings)\n";
s << Color::Cyan << "[doctest]\n" << Color::None;
s << Color::Cyan << "[doctest] " << Color::None;
s << "filters use wildcards for matching strings\n";
s << Color::Cyan << "[doctest] " << Color::None;
s << "something passes a filter if any of the strings in a filter matches\n";
#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS
s << Color::Cyan << "[doctest]\n" << Color::None;
s << Color::Cyan << "[doctest] " << Color::None;
s << "ALL FLAGS, OPTIONS AND FILTERS ALSO AVAILABLE WITH A \"" DOCTEST_CONFIG_OPTIONS_PREFIX "\" PREFIX!!!\n";
#endif
s << Color::Cyan << "[doctest]\n" << Color::None;
s << Color::Cyan << "[doctest] " << Color::None;
s << "Query flags - the program quits after them. Available:\n\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "?, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "help, -" DOCTEST_OPTIONS_PREFIX_DISPLAY "h "
<< Whitespace(sizePrefixDisplay*0) << "prints this message\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "v, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "version "
<< Whitespace(sizePrefixDisplay*1) << "prints the version\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "c, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "count "
<< Whitespace(sizePrefixDisplay*1) << "prints the number of matching tests\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ltc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-test-cases "
<< Whitespace(sizePrefixDisplay*1) << "lists all matching tests by name\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "lts, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-test-suites "
<< Whitespace(sizePrefixDisplay*1) << "lists all matching test suites\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "lr, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-reporters "
<< Whitespace(sizePrefixDisplay*1) << "lists all registered reporters\n\n";
// ================================================================================== << 79
s << Color::Cyan << "[doctest] " << Color::None;
s << "The available <int>/<string> options/filters are:\n\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-case=<filters> "
<< Whitespace(sizePrefixDisplay*1) << "filters tests by their name\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tce, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-case-exclude=<filters> "
<< Whitespace(sizePrefixDisplay*1) << "filters OUT tests by their name\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sf, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "source-file=<filters> "
<< Whitespace(sizePrefixDisplay*1) << "filters tests by their file\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sfe, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "source-file-exclude=<filters> "
<< Whitespace(sizePrefixDisplay*1) << "filters OUT tests by their file\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ts, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-suite=<filters> "
<< Whitespace(sizePrefixDisplay*1) << "filters tests by their test suite\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tse, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-suite-exclude=<filters> "
<< Whitespace(sizePrefixDisplay*1) << "filters OUT tests by their test suite\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase=<filters> "
<< Whitespace(sizePrefixDisplay*1) << "filters subcases by their name\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sce, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase-exclude=<filters> "
<< Whitespace(sizePrefixDisplay*1) << "filters OUT subcases by their name\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "r, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "reporters=<filters> "
<< Whitespace(sizePrefixDisplay*1) << "reporters to use (console is default)\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "o, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "out=<string> "
<< Whitespace(sizePrefixDisplay*1) << "output filename\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ob, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "order-by=<string> "
<< Whitespace(sizePrefixDisplay*1) << "how the tests should be ordered\n";
s << Whitespace(sizePrefixDisplay*3) << " <string> - [file/suite/name/rand/none]\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "rs, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "rand-seed=<int> "
<< Whitespace(sizePrefixDisplay*1) << "seed for random ordering\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "f, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "first=<int> "
<< Whitespace(sizePrefixDisplay*1) << "the first test passing the filters to\n";
s << Whitespace(sizePrefixDisplay*3) << " execute - for range-based execution\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "l, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "last=<int> "
<< Whitespace(sizePrefixDisplay*1) << "the last test passing the filters to\n";
s << Whitespace(sizePrefixDisplay*3) << " execute - for range-based execution\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "aa, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "abort-after=<int> "
<< Whitespace(sizePrefixDisplay*1) << "stop after <int> failed assertions\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "scfl,--" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase-filter-levels=<int> "
<< Whitespace(sizePrefixDisplay*1) << "apply filters for the first <int> levels\n";
s << Color::Cyan << "\n[doctest] " << Color::None;
s << "Bool options - can be used like flags and true is assumed. Available:\n\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "s, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "success=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "include successful assertions in output\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "cs, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "case-sensitive=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "filters being treated as case sensitive\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "e, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "exit=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "exits after the tests finish\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "d, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "duration=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "prints the time duration of each test\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "m, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "minimal=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "minimal console output (only failures)\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "q, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "quiet=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "no console output\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nt, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-throw=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "skips exceptions-related assert checks\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ne, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-exitcode=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "returns (or exits) always with success\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nr, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-run=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "skips all runtime doctest operations\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ni, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-intro=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "omit the framework intro in the output\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nv, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-version=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "omit the framework version in the output\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-colors=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "disables colors in output\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "fc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "force-colors=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "use colors even when not in a tty\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nb, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-breaks=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "disables breakpoints in debuggers\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ns, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-skip=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "don't skip test cases marked as skip\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "gfl, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "gnu-file-line=<bool> "
<< Whitespace(sizePrefixDisplay*1) << ":n: vs (n): for line numbers in output\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "npf, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-path-filenames=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "only filenames and no paths in output\n";
s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nln, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-line-numbers=<bool> "
<< Whitespace(sizePrefixDisplay*1) << "0 instead of real line numbers in output\n";
// ================================================================================== << 79
// clang-format on
s << Color::Cyan << "\n[doctest] " << Color::None;
s << "for more information visit the project documentation\n\n";
}
void printRegisteredReporters() {
printVersion();
auto printReporters = [this] (const reporterMap& reporters, const char* type) {
if(reporters.size()) {
s << Color::Cyan << "[doctest] " << Color::None << "listing all registered " << type << "\n";
for(auto& curr : reporters)
s << "priority: " << std::setw(5) << curr.first.first
<< " name: " << curr.first.second << "\n";
}
};
printReporters(getListeners(), "listeners");
printReporters(getReporters(), "reporters");
}
// =========================================================================================
// WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE
// =========================================================================================
void report_query(const QueryData& in) override {
if(opt.version) {
printVersion();
} else if(opt.help) {
printHelp();
} else if(opt.list_reporters) {
printRegisteredReporters();
} else if(opt.count || opt.list_test_cases) {
if(opt.list_test_cases) {
s << Color::Cyan << "[doctest] " << Color::None
<< "listing all test case names\n";
separator_to_stream();
}
for(unsigned i = 0; i < in.num_data; ++i)
s << Color::None << in.data[i]->m_name << "\n";
separator_to_stream();
s << Color::Cyan << "[doctest] " << Color::None
<< "unskipped test cases passing the current filters: "
<< g_cs->numTestCasesPassingFilters << "\n";
} else if(opt.list_test_suites) {
s << Color::Cyan << "[doctest] " << Color::None << "listing all test suites\n";
separator_to_stream();
for(unsigned i = 0; i < in.num_data; ++i)
s << Color::None << in.data[i]->m_test_suite << "\n";
separator_to_stream();
s << Color::Cyan << "[doctest] " << Color::None
<< "unskipped test cases passing the current filters: "
<< g_cs->numTestCasesPassingFilters << "\n";
s << Color::Cyan << "[doctest] " << Color::None
<< "test suites with unskipped test cases passing the current filters: "
<< g_cs->numTestSuitesPassingFilters << "\n";
}
}
void test_run_start() override {
if(!opt.minimal)
printIntro();
}
void test_run_end(const TestRunStats& p) override {
if(opt.minimal && p.numTestCasesFailed == 0)
return;
separator_to_stream();
s << std::dec;
auto totwidth = int(std::ceil(log10((std::max(p.numTestCasesPassingFilters, static_cast<unsigned>(p.numAsserts))) + 1)));
auto passwidth = int(std::ceil(log10((std::max(p.numTestCasesPassingFilters - p.numTestCasesFailed, static_cast<unsigned>(p.numAsserts - p.numAssertsFailed))) + 1)));
auto failwidth = int(std::ceil(log10((std::max(p.numTestCasesFailed, static_cast<unsigned>(p.numAssertsFailed))) + 1)));
const bool anythingFailed = p.numTestCasesFailed > 0 || p.numAssertsFailed > 0;
s << Color::Cyan << "[doctest] " << Color::None << "test cases: " << std::setw(totwidth)
<< p.numTestCasesPassingFilters << " | "
<< ((p.numTestCasesPassingFilters == 0 || anythingFailed) ? Color::None :
Color::Green)
<< std::setw(passwidth) << p.numTestCasesPassingFilters - p.numTestCasesFailed << " passed"
<< Color::None << " | " << (p.numTestCasesFailed > 0 ? Color::Red : Color::None)
<< std::setw(failwidth) << p.numTestCasesFailed << " failed" << Color::None << " |";
if(opt.no_skipped_summary == false) {
const int numSkipped = p.numTestCases - p.numTestCasesPassingFilters;
s << " " << (numSkipped == 0 ? Color::None : Color::Yellow) << numSkipped
<< " skipped" << Color::None;
}
s << "\n";
s << Color::Cyan << "[doctest] " << Color::None << "assertions: " << std::setw(totwidth)
<< p.numAsserts << " | "
<< ((p.numAsserts == 0 || anythingFailed) ? Color::None : Color::Green)
<< std::setw(passwidth) << (p.numAsserts - p.numAssertsFailed) << " passed" << Color::None
<< " | " << (p.numAssertsFailed > 0 ? Color::Red : Color::None) << std::setw(failwidth)
<< p.numAssertsFailed << " failed" << Color::None << " |\n";
s << Color::Cyan << "[doctest] " << Color::None
<< "Status: " << (p.numTestCasesFailed > 0 ? Color::Red : Color::Green)
<< ((p.numTestCasesFailed > 0) ? "FAILURE!" : "SUCCESS!") << Color::None << std::endl;
}
void test_case_start(const TestCaseData& in) override {
hasLoggedCurrentTestStart = false;
tc = ∈
subcasesStack.clear();
currentSubcaseLevel = 0;
}
void test_case_reenter(const TestCaseData&) override {
subcasesStack.clear();
}
void test_case_end(const CurrentTestCaseStats& st) override {
if(tc->m_no_output)
return;
// log the preamble of the test case only if there is something
// else to print - something other than that an assert has failed
if(opt.duration ||
(st.failure_flags && st.failure_flags != static_cast<int>(TestCaseFailureReason::AssertFailure)))
logTestStart();
if(opt.duration)
s << Color::None << std::setprecision(6) << std::fixed << st.seconds
<< " s: " << tc->m_name << "\n";
if(st.failure_flags & TestCaseFailureReason::Timeout)
s << Color::Red << "Test case exceeded time limit of " << std::setprecision(6)
<< std::fixed << tc->m_timeout << "!\n";
if(st.failure_flags & TestCaseFailureReason::ShouldHaveFailedButDidnt) {
s << Color::Red << "Should have failed but didn't! Marking it as failed!\n";
} else if(st.failure_flags & TestCaseFailureReason::ShouldHaveFailedAndDid) {
s << Color::Yellow << "Failed as expected so marking it as not failed\n";
} else if(st.failure_flags & TestCaseFailureReason::CouldHaveFailedAndDid) {
s << Color::Yellow << "Allowed to fail so marking it as not failed\n";
} else if(st.failure_flags & TestCaseFailureReason::DidntFailExactlyNumTimes) {
s << Color::Red << "Didn't fail exactly " << tc->m_expected_failures
<< " times so marking it as failed!\n";
} else if(st.failure_flags & TestCaseFailureReason::FailedExactlyNumTimes) {
s << Color::Yellow << "Failed exactly " << tc->m_expected_failures
<< " times as expected so marking it as not failed!\n";
}
if(st.failure_flags & TestCaseFailureReason::TooManyFailedAsserts) {
s << Color::Red << "Aborting - too many failed asserts!\n";
}
s << Color::None; // lgtm [cpp/useless-expression]
}
void test_case_exception(const TestCaseException& e) override {
DOCTEST_LOCK_MUTEX(mutex)
if(tc->m_no_output)
return;
logTestStart();
file_line_to_stream(tc->m_file.c_str(), tc->m_line, " ");
successOrFailColoredStringToStream(false, e.is_crash ? assertType::is_require :
assertType::is_check);
s << Color::Red << (e.is_crash ? "test case CRASHED: " : "test case THREW exception: ")
<< Color::Cyan << e.error_string << "\n";
int num_stringified_contexts = get_num_stringified_contexts();
if(num_stringified_contexts) {
auto stringified_contexts = get_stringified_contexts();
s << Color::None << " logged: ";
for(int i = num_stringified_contexts; i > 0; --i) {
s << (i == num_stringified_contexts ? "" : " ")
<< stringified_contexts[i - 1] << "\n";
}
}
s << "\n" << Color::None;
}
void subcase_start(const SubcaseSignature& subc) override {
subcasesStack.push_back(subc);
++currentSubcaseLevel;
hasLoggedCurrentTestStart = false;
}
void subcase_end() override {
--currentSubcaseLevel;
hasLoggedCurrentTestStart = false;
}
void log_assert(const AssertData& rb) override {
if((!rb.m_failed && !opt.success) || tc->m_no_output)
return;
DOCTEST_LOCK_MUTEX(mutex)
logTestStart();
file_line_to_stream(rb.m_file, rb.m_line, " ");
successOrFailColoredStringToStream(!rb.m_failed, rb.m_at);
fulltext_log_assert_to_stream(s, rb);
log_contexts();
}
void log_message(const MessageData& mb) override {
if(tc->m_no_output)
return;
DOCTEST_LOCK_MUTEX(mutex)
logTestStart();
file_line_to_stream(mb.m_file, mb.m_line, " ");
s << getSuccessOrFailColor(false, mb.m_severity)
<< getSuccessOrFailString(mb.m_severity & assertType::is_warn, mb.m_severity,
"MESSAGE") << ": ";
s << Color::None << mb.m_string << "\n";
log_contexts();
}
void test_case_skipped(const TestCaseData&) override {}
};
DOCTEST_REGISTER_REPORTER("console", 0, ConsoleReporter);
#ifdef DOCTEST_PLATFORM_WINDOWS
struct DebugOutputWindowReporter : public ConsoleReporter
{
DOCTEST_THREAD_LOCAL static std::ostringstream oss;
DebugOutputWindowReporter(const ContextOptions& co)
: ConsoleReporter(co, oss) {}
#define DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(func, type, arg) \
void func(type arg) override { \
bool with_col = g_no_colors; \
g_no_colors = false; \
ConsoleReporter::func(arg); \
if(oss.tellp() != std::streampos{}) { \
DOCTEST_OUTPUT_DEBUG_STRING(oss.str().c_str()); \
oss.str(""); \
} \
g_no_colors = with_col; \
}
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_start, DOCTEST_EMPTY, DOCTEST_EMPTY)
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_end, const TestRunStats&, in)
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_start, const TestCaseData&, in)
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_reenter, const TestCaseData&, in)
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_end, const CurrentTestCaseStats&, in)
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_exception, const TestCaseException&, in)
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_start, const SubcaseSignature&, in)
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_end, DOCTEST_EMPTY, DOCTEST_EMPTY)
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_assert, const AssertData&, in)
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_message, const MessageData&, in)
DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_skipped, const TestCaseData&, in)
};
DOCTEST_THREAD_LOCAL std::ostringstream DebugOutputWindowReporter::oss;
#endif // DOCTEST_PLATFORM_WINDOWS
// the implementation of parseOption()
bool parseOptionImpl(int argc, const char* const* argv, const char* pattern, String* value) {
// going from the end to the beginning and stopping on the first occurrence from the end
for(int i = argc; i > 0; --i) {
auto index = i - 1;
auto temp = std::strstr(argv[index], pattern);
if(temp && (value || strlen(temp) == strlen(pattern))) { //!OCLINT prefer early exits and continue
// eliminate matches in which the chars before the option are not '-'
bool noBadCharsFound = true;
auto curr = argv[index];
while(curr != temp) {
if(*curr++ != '-') {
noBadCharsFound = false;
break;
}
}
if(noBadCharsFound && argv[index][0] == '-') {
if(value) {
// parsing the value of an option
temp += strlen(pattern);
const unsigned len = strlen(temp);
if(len) {
*value = temp;
return true;
}
} else {
// just a flag - no value
return true;
}
}
}
}
return false;
}
// parses an option and returns the string after the '=' character
bool parseOption(int argc, const char* const* argv, const char* pattern, String* value = nullptr,
const String& defaultVal = String()) {
if(value)
*value = defaultVal;
#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS
// offset (normally 3 for "dt-") to skip prefix
if(parseOptionImpl(argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value))
return true;
#endif // DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS
return parseOptionImpl(argc, argv, pattern, value);
}
// locates a flag on the command line
bool parseFlag(int argc, const char* const* argv, const char* pattern) {
return parseOption(argc, argv, pattern);
}
// parses a comma separated list of words after a pattern in one of the arguments in argv
bool parseCommaSepArgs(int argc, const char* const* argv, const char* pattern,
std::vector<String>& res) {
String filtersString;
if(parseOption(argc, argv, pattern, &filtersString)) {
// tokenize with "," as a separator, unless escaped with backslash
std::ostringstream s;
auto flush = [&s, &res]() {
auto string = s.str();
if(string.size() > 0) {
res.push_back(string.c_str());
}
s.str("");
};
bool seenBackslash = false;
const char* current = filtersString.c_str();
const char* end = current + strlen(current);
while(current != end) {
char character = *current++;
if(seenBackslash) {
seenBackslash = false;
if(character == ',' || character == '\\') {
s.put(character);
continue;
}
s.put('\\');
}
if(character == '\\') {
seenBackslash = true;
} else if(character == ',') {
flush();
} else {
s.put(character);
}
}
if(seenBackslash) {
s.put('\\');
}
flush();
return true;
}
return false;
}
enum optionType
{
option_bool,
option_int
};
// parses an int/bool option from the command line
bool parseIntOption(int argc, const char* const* argv, const char* pattern, optionType type,
int& res) {
String parsedValue;
if(!parseOption(argc, argv, pattern, &parsedValue))
return false;
if(type) {
// integer
// TODO: change this to use std::stoi or something else! currently it uses undefined behavior - assumes '0' on failed parse...
int theInt = std::atoi(parsedValue.c_str());
if (theInt != 0) {
res = theInt; //!OCLINT parameter reassignment
return true;
}
} else {
// boolean
const char positive[][5] = { "1", "true", "on", "yes" }; // 5 - strlen("true") + 1
const char negative[][6] = { "0", "false", "off", "no" }; // 6 - strlen("false") + 1
// if the value matches any of the positive/negative possibilities
for (unsigned i = 0; i < 4; i++) {
if (parsedValue.compare(positive[i], true) == 0) {
res = 1; //!OCLINT parameter reassignment
return true;
}
if (parsedValue.compare(negative[i], true) == 0) {
res = 0; //!OCLINT parameter reassignment
return true;
}
}
}
return false;
}
} // namespace
Context::Context(int argc, const char* const* argv)
: p(new detail::ContextState) {
parseArgs(argc, argv, true);
if(argc)
p->binary_name = argv[0];
}
Context::~Context() {
if(g_cs == p)
g_cs = nullptr;
delete p;
}
void Context::applyCommandLine(int argc, const char* const* argv) {
parseArgs(argc, argv);
if(argc)
p->binary_name = argv[0];
}
// parses args
void Context::parseArgs(int argc, const char* const* argv, bool withDefaults) {
using namespace detail;
// clang-format off
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "source-file=", p->filters[0]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sf=", p->filters[0]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "source-file-exclude=",p->filters[1]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sfe=", p->filters[1]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-suite=", p->filters[2]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "ts=", p->filters[2]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-suite-exclude=", p->filters[3]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "tse=", p->filters[3]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-case=", p->filters[4]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "tc=", p->filters[4]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-case-exclude=", p->filters[5]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "tce=", p->filters[5]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "subcase=", p->filters[6]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sc=", p->filters[6]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "subcase-exclude=", p->filters[7]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sce=", p->filters[7]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "reporters=", p->filters[8]);
parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "r=", p->filters[8]);
// clang-format on
int intRes = 0;
String strRes;
#define DOCTEST_PARSE_AS_BOOL_OR_FLAG(name, sname, var, default) \
if(parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name "=", option_bool, intRes) || \
parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname "=", option_bool, intRes)) \
p->var = static_cast<bool>(intRes); \
else if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name) || \
parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname)) \
p->var = true; \
else if(withDefaults) \
p->var = default
#define DOCTEST_PARSE_INT_OPTION(name, sname, var, default) \
if(parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name "=", option_int, intRes) || \
parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname "=", option_int, intRes)) \
p->var = intRes; \
else if(withDefaults) \
p->var = default
#define DOCTEST_PARSE_STR_OPTION(name, sname, var, default) \
if(parseOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name "=", &strRes, default) || \
parseOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname "=", &strRes, default) || \
withDefaults) \
p->var = strRes
// clang-format off
DOCTEST_PARSE_STR_OPTION("out", "o", out, "");
DOCTEST_PARSE_STR_OPTION("order-by", "ob", order_by, "file");
DOCTEST_PARSE_INT_OPTION("rand-seed", "rs", rand_seed, 0);
DOCTEST_PARSE_INT_OPTION("first", "f", first, 0);
DOCTEST_PARSE_INT_OPTION("last", "l", last, UINT_MAX);
DOCTEST_PARSE_INT_OPTION("abort-after", "aa", abort_after, 0);
DOCTEST_PARSE_INT_OPTION("subcase-filter-levels", "scfl", subcase_filter_levels, INT_MAX);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("success", "s", success, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("case-sensitive", "cs", case_sensitive, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("exit", "e", exit, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("duration", "d", duration, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("minimal", "m", minimal, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("quiet", "q", quiet, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-throw", "nt", no_throw, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-exitcode", "ne", no_exitcode, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-run", "nr", no_run, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-intro", "ni", no_intro, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-version", "nv", no_version, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-colors", "nc", no_colors, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("force-colors", "fc", force_colors, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-breaks", "nb", no_breaks, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-skip", "ns", no_skip, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("gnu-file-line", "gfl", gnu_file_line, !bool(DOCTEST_MSVC));
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-path-filenames", "npf", no_path_in_filenames, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-line-numbers", "nln", no_line_numbers, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-debug-output", "ndo", no_debug_output, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-skipped-summary", "nss", no_skipped_summary, false);
DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-time-in-output", "ntio", no_time_in_output, false);
// clang-format on
if(withDefaults) {
p->help = false;
p->version = false;
p->count = false;
p->list_test_cases = false;
p->list_test_suites = false;
p->list_reporters = false;
}
if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "help") ||
parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "h") ||
parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "?")) {
p->help = true;
p->exit = true;
}
if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "version") ||
parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "v")) {
p->version = true;
p->exit = true;
}
if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "count") ||
parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "c")) {
p->count = true;
p->exit = true;
}
if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "list-test-cases") ||
parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "ltc")) {
p->list_test_cases = true;
p->exit = true;
}
if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "list-test-suites") ||
parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "lts")) {
p->list_test_suites = true;
p->exit = true;
}
if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "list-reporters") ||
parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "lr")) {
p->list_reporters = true;
p->exit = true;
}
}
// allows the user to add procedurally to the filters from the command line
void Context::addFilter(const char* filter, const char* value) { setOption(filter, value); }
// allows the user to clear all filters from the command line
void Context::clearFilters() {
for(auto& curr : p->filters)
curr.clear();
}
// allows the user to override procedurally the bool options from the command line
void Context::setOption(const char* option, bool value) {
setOption(option, value ? "true" : "false");
}
// allows the user to override procedurally the int options from the command line
void Context::setOption(const char* option, int value) {
setOption(option, toString(value).c_str());
}
// allows the user to override procedurally the string options from the command line
void Context::setOption(const char* option, const char* value) {
auto argv = String("-") + option + "=" + value;
auto lvalue = argv.c_str();
parseArgs(1, &lvalue);
}
// users should query this in their main() and exit the program if true
bool Context::shouldExit() { return p->exit; }
void Context::setAsDefaultForAssertsOutOfTestCases() { g_cs = p; }
void Context::setAssertHandler(detail::assert_handler ah) { p->ah = ah; }
void Context::setCout(std::ostream* out) { p->cout = out; }
static class DiscardOStream : public std::ostream
{
private:
class : public std::streambuf
{
private:
// allowing some buffering decreases the amount of calls to overflow
char buf[1024];
protected:
std::streamsize xsputn(const char_type*, std::streamsize count) override { return count; }
int_type overflow(int_type ch) override {
setp(std::begin(buf), std::end(buf));
return traits_type::not_eof(ch);
}
} discardBuf;
public:
DiscardOStream()
: std::ostream(&discardBuf) {}
} discardOut;
// the main function that does all the filtering and test running
int Context::run() {
using namespace detail;
// save the old context state in case such was setup - for using asserts out of a testing context
auto old_cs = g_cs;
// this is the current contest
g_cs = p;
is_running_in_test = true;
g_no_colors = p->no_colors;
p->resetRunData();
std::fstream fstr;
if(p->cout == nullptr) {
if(p->quiet) {
p->cout = &discardOut;
} else if(p->out.size()) {
// to a file if specified
fstr.open(p->out.c_str(), std::fstream::out);
p->cout = &fstr;
} else {
// stdout by default
p->cout = &std::cout;
}
}
FatalConditionHandler::allocateAltStackMem();
auto cleanup_and_return = [&]() {
FatalConditionHandler::freeAltStackMem();
if(fstr.is_open())
fstr.close();
// restore context
g_cs = old_cs;
is_running_in_test = false;
// we have to free the reporters which were allocated when the run started
for(auto& curr : p->reporters_currently_used)
delete curr;
p->reporters_currently_used.clear();
if(p->numTestCasesFailed && !p->no_exitcode)
return EXIT_FAILURE;
return EXIT_SUCCESS;
};
// setup default reporter if none is given through the command line
if(p->filters[8].empty())
p->filters[8].push_back("console");
// check to see if any of the registered reporters has been selected
for(auto& curr : getReporters()) {
if(matchesAny(curr.first.second.c_str(), p->filters[8], false, p->case_sensitive))
p->reporters_currently_used.push_back(curr.second(*g_cs));
}
// TODO: check if there is nothing in reporters_currently_used
// prepend all listeners
for(auto& curr : getListeners())
p->reporters_currently_used.insert(p->reporters_currently_used.begin(), curr.second(*g_cs));
#ifdef DOCTEST_PLATFORM_WINDOWS
if(isDebuggerActive() && p->no_debug_output == false)
p->reporters_currently_used.push_back(new DebugOutputWindowReporter(*g_cs));
#endif // DOCTEST_PLATFORM_WINDOWS
// handle version, help and no_run
if(p->no_run || p->version || p->help || p->list_reporters) {
DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, QueryData());
return cleanup_and_return();
}
std::vector<const TestCase*> testArray;
for(auto& curr : getRegisteredTests())
testArray.push_back(&curr);
p->numTestCases = testArray.size();
// sort the collected records
if(!testArray.empty()) {
if(p->order_by.compare("file", true) == 0) {
std::sort(testArray.begin(), testArray.end(), fileOrderComparator);
} else if(p->order_by.compare("suite", true) == 0) {
std::sort(testArray.begin(), testArray.end(), suiteOrderComparator);
} else if(p->order_by.compare("name", true) == 0) {
std::sort(testArray.begin(), testArray.end(), nameOrderComparator);
} else if(p->order_by.compare("rand", true) == 0) {
std::srand(p->rand_seed);
// random_shuffle implementation
const auto first = &testArray[0];
for(size_t i = testArray.size() - 1; i > 0; --i) {
int idxToSwap = std::rand() % (i + 1);
const auto temp = first[i];
first[i] = first[idxToSwap];
first[idxToSwap] = temp;
}
} else if(p->order_by.compare("none", true) == 0) {
// means no sorting - beneficial for death tests which call into the executable
// with a specific test case in mind - we don't want to slow down the startup times
}
}
std::set<String> testSuitesPassingFilt;
bool query_mode = p->count || p->list_test_cases || p->list_test_suites;
std::vector<const TestCaseData*> queryResults;
if(!query_mode)
DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_start, DOCTEST_EMPTY);
// invoke the registered functions if they match the filter criteria (or just count them)
for(auto& curr : testArray) {
const auto& tc = *curr;
bool skip_me = false;
if(tc.m_skip && !p->no_skip)
skip_me = true;
if(!matchesAny(tc.m_file.c_str(), p->filters[0], true, p->case_sensitive))
skip_me = true;
if(matchesAny(tc.m_file.c_str(), p->filters[1], false, p->case_sensitive))
skip_me = true;
if(!matchesAny(tc.m_test_suite, p->filters[2], true, p->case_sensitive))
skip_me = true;
if(matchesAny(tc.m_test_suite, p->filters[3], false, p->case_sensitive))
skip_me = true;
if(!matchesAny(tc.m_name, p->filters[4], true, p->case_sensitive))
skip_me = true;
if(matchesAny(tc.m_name, p->filters[5], false, p->case_sensitive))
skip_me = true;
if(!skip_me)
p->numTestCasesPassingFilters++;
// skip the test if it is not in the execution range
if((p->last < p->numTestCasesPassingFilters && p->first <= p->last) ||
(p->first > p->numTestCasesPassingFilters))
skip_me = true;
if(skip_me) {
if(!query_mode)
DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_skipped, tc);
continue;
}
// do not execute the test if we are to only count the number of filter passing tests
if(p->count)
continue;
// print the name of the test and don't execute it
if(p->list_test_cases) {
queryResults.push_back(&tc);
continue;
}
// print the name of the test suite if not done already and don't execute it
if(p->list_test_suites) {
if((testSuitesPassingFilt.count(tc.m_test_suite) == 0) && tc.m_test_suite[0] != '\0') {
queryResults.push_back(&tc);
testSuitesPassingFilt.insert(tc.m_test_suite);
p->numTestSuitesPassingFilters++;
}
continue;
}
// execute the test if it passes all the filtering
{
p->currentTest = &tc;
p->failure_flags = TestCaseFailureReason::None;
p->seconds = 0;
// reset atomic counters
p->numAssertsFailedCurrentTest_atomic = 0;
p->numAssertsCurrentTest_atomic = 0;
p->fullyTraversedSubcases.clear();
DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_start, tc);
p->timer.start();
bool run_test = true;
do {
// reset some of the fields for subcases (except for the set of fully passed ones)
p->reachedLeaf = false;
// May not be empty if previous subcase exited via exception.
p->subcaseStack.clear();
p->currentSubcaseDepth = 0;
p->shouldLogCurrentException = true;
// reset stuff for logging with INFO()
p->stringifiedContexts.clear();
#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS
try {
#endif // DOCTEST_CONFIG_NO_EXCEPTIONS
// MSVC 2015 diagnoses fatalConditionHandler as unused (because reset() is a static method)
DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4101) // unreferenced local variable
FatalConditionHandler fatalConditionHandler; // Handle signals
// execute the test
tc.m_test();
fatalConditionHandler.reset();
DOCTEST_MSVC_SUPPRESS_WARNING_POP
#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS
} catch(const TestFailureException&) {
p->failure_flags |= TestCaseFailureReason::AssertFailure;
} catch(...) {
DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_exception,
{translateActiveException(), false});
p->failure_flags |= TestCaseFailureReason::Exception;
}
#endif // DOCTEST_CONFIG_NO_EXCEPTIONS
// exit this loop if enough assertions have failed - even if there are more subcases
if(p->abort_after > 0 &&
p->numAssertsFailed + p->numAssertsFailedCurrentTest_atomic >= p->abort_after) {
run_test = false;
p->failure_flags |= TestCaseFailureReason::TooManyFailedAsserts;
}
if(!p->nextSubcaseStack.empty() && run_test)
DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_reenter, tc);
if(p->nextSubcaseStack.empty())
run_test = false;
} while(run_test);
p->finalizeTestCaseData();
DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_end, *g_cs);
p->currentTest = nullptr;
// stop executing tests if enough assertions have failed
if(p->abort_after > 0 && p->numAssertsFailed >= p->abort_after)
break;
}
}
if(!query_mode) {
DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_end, *g_cs);
} else {
QueryData qdata;
qdata.run_stats = g_cs;
qdata.data = queryResults.data();
qdata.num_data = unsigned(queryResults.size());
DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, qdata);
}
return cleanup_and_return();
}
DOCTEST_DEFINE_INTERFACE(IReporter)
int IReporter::get_num_active_contexts() { return detail::g_infoContexts.size(); }
const IContextScope* const* IReporter::get_active_contexts() {
return get_num_active_contexts() ? &detail::g_infoContexts[0] : nullptr;
}
int IReporter::get_num_stringified_contexts() { return detail::g_cs->stringifiedContexts.size(); }
const String* IReporter::get_stringified_contexts() {
return get_num_stringified_contexts() ? &detail::g_cs->stringifiedContexts[0] : nullptr;
}
namespace detail {
void registerReporterImpl(const char* name, int priority, reporterCreatorFunc c, bool isReporter) {
if(isReporter)
getReporters().insert(reporterMap::value_type(reporterMap::key_type(priority, name), c));
else
getListeners().insert(reporterMap::value_type(reporterMap::key_type(priority, name), c));
}
} // namespace detail
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
movq %rdi, %rbx
callq 0x4410
testl %eax, %eax
jle 0x9bc6
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x4490
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rax)
movl $0x10f8, %ebx # imm = 0x10F8
addq 0x1b863(%rip), %rbx # 0x25398
leaq 0x40(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x4540
movq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x4150
movq %rax, %r15
movq %rsp, %rdi
movl %r15d, %esi
callq 0x72de
movl %r15d, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x17d7a
cmpb $0x0, 0x17(%rsp)
jns 0x9b8d
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x9b8d
callq 0x4450
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9ba8
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x1b409(%rip), %rsi # 0x24fb8
leaq 0x38(%rsp), %rdi
callq 0x41b0
leaq 0xa8(%rsp), %rdi
callq 0x4110
callq 0x15c12
addq $-0x8, %fs:-0x28
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
cmpb $0x0, 0x17(%rsp)
jns 0x9bff
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x9bff
callq 0x4450
jmp 0x9bff
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9c21
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0x9c21
jmp 0x9c1e
movq %rax, %rbx
movq 0x1b390(%rip), %rsi # 0x24fb8
leaq 0x38(%rsp), %rdi
callq 0x41b0
leaq 0xa8(%rsp), %rdi
callq 0x4110
movq %rbx, %rdi
callq 0x45f0
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::IExceptionTranslator::~IExceptionTranslator()
|
bool MessageBuilder::log() {
if (!logged) {
m_string = tlssPop();
logged = true;
}
DOCTEST_ITERATE_THROUGH_REPORTERS(log_message, *this);
const bool isWarn = m_severity & assertType::is_warn;
// warn is just a message in this context so we don't treat it as an assert
if(!isWarn) {
addAssert(m_severity);
addFailedAssert(m_severity);
}
return isDebuggerActive() && !getContextOptions()->no_breaks && !isWarn &&
(g_cs->currentTest == nullptr || !g_cs->currentTest->m_no_breaks); // break into debugger
}
|
retq
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::IExceptionTranslator::~IExceptionTranslator()
|
bool MessageBuilder::log() {
if (!logged) {
m_string = tlssPop();
logged = true;
}
DOCTEST_ITERATE_THROUGH_REPORTERS(log_message, *this);
const bool isWarn = m_severity & assertType::is_warn;
// warn is just a message in this context so we don't treat it as an assert
if(!isWarn) {
addAssert(m_severity);
addFailedAssert(m_severity);
}
return isDebuggerActive() && !getContextOptions()->no_breaks && !isWarn &&
(g_cs->currentTest == nullptr || !g_cs->currentTest->m_no_breaks); // break into debugger
}
|
ud2
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::Context::Context(int, char const* const*)
|
Context::Context(int argc, const char* const* argv)
: p(new detail::ContextState) {
parseArgs(argc, argv, true);
if(argc)
p->binary_name = argv[0];
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movl $0x1190, %edi # imm = 0x1190
callq 0x4370
movq %rax, %r15
xorl %eax, %eax
movq %rax, (%r15)
movb %al, 0x8(%r15)
movb $0x17, %cl
movb %cl, 0x1f(%r15)
movq %rax, 0x20(%r15)
movb %al, 0x28(%r15)
movw $0x17, 0x3f(%r15)
movb %cl, 0x57(%r15)
movl $0xb8, %eax
movl $0x0, (%r15,%rax)
addq $0x40, %rax
cmpq $0x8b8, %rax # imm = 0x8B8
jne 0xa860
movl $0x8b8, %eax # imm = 0x8B8
movl $0x0, (%r15,%rax)
addq $0x40, %rax
cmpq $0x10b8, %rax # imm = 0x10B8
jne 0xa879
xorps %xmm0, %xmm0
movups %xmm0, 0x10b8(%r15)
movq $0x0, 0x10c8(%r15)
movl $0xd8, %edi
callq 0x4370
movq %rax, 0x10b8(%r15)
movq %rax, 0x10c0(%r15)
movq %rax, %r12
addq $0xd8, %r12
movq %r12, 0x10c8(%r15)
movl $0xd8, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x41c0
movq %r12, 0x10c0(%r15)
movq %r15, %rax
addq $0x1178, %rax # imm = 0x1178
xorps %xmm0, %xmm0
movups %xmm0, 0x10d0(%r15)
movups %xmm0, 0x10e0(%r15)
movups %xmm0, 0x10f0(%r15)
movups %xmm0, 0x1100(%r15)
movups %xmm0, 0x1118(%r15)
movups %xmm0, 0x1128(%r15)
movups %xmm0, 0x1138(%r15)
movq %rax, 0x1148(%r15)
movq $0x1, 0x1150(%r15)
movups %xmm0, 0x1158(%r15)
movl $0x3f800000, 0x1168(%r15) # imm = 0x3F800000
movups %xmm0, 0x1170(%r15)
movq %r15, (%rbx)
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
movl $0x1, %ecx
callq 0xaa16
testl %ebp, %ebp
je 0xa9e8
movq (%r14), %r14
movq %r14, %rdi
callq 0x4150
movq %rax, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl %r15d, %esi
callq 0x72de
movl %r15d, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
movq (%rbx), %rax
leaq 0x8(%rax), %rbx
cmpq %r12, %rbx
je 0xa9d2
cmpb $0x0, 0x1f(%rax)
jns 0xa9b7
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xa9b7
callq 0x4450
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rbx)
movb $0x0, 0x8(%rsp)
movb $0x17, 0x1f(%rsp)
cmpb $0x0, 0x1f(%rsp)
jns 0xa9e8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xa9e8
callq 0x4450
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x16a34
movl $0x1190, %esi # imm = 0x1190
movq %r15, %rdi
callq 0x4390
movq %rbx, %rdi
callq 0x45f0
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::parseOption(int, char const* const*, char const*, doctest::String*, doctest::String const&)
|
bool parseOption(int argc, const char* const* argv, const char* pattern, String* value = nullptr,
const String& defaultVal = String()) {
if(value)
*value = defaultVal;
#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS
// offset (normally 3 for "dt-") to skip prefix
if(parseOptionImpl(argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value))
return true;
#endif // DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS
return parseOptionImpl(argc, argv, pattern, value);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
testq %rcx, %rcx
je 0xc0d7
movq %rbx, %rdi
movq %r8, %rsi
callq 0x7454
leaq 0x3(%r14), %rdx
movl %ebp, %edi
movq %r15, %rsi
movq %rbx, %rcx
callq 0xd8d9
testb %al, %al
je 0xc0f9
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xd8d9
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::Context::setOption(char const*, char const*)
|
void Context::setOption(const char* option, const char* value) {
auto argv = String("-") + option + "=" + value;
auto lvalue = argv.c_str();
parseArgs(1, &lvalue);
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x78(%rsp), %rdi
movl $0x1, %esi
callq 0x72de
movb $0x2d, (%rax)
movq %r15, %rdi
callq 0x4150
movq %rax, %r12
leaq 0x60(%rsp), %rdi
movl %r12d, %esi
callq 0x72de
movl %r12d, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42d0
leaq 0x90(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x78ca
leaq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0x72de
movb $0x3d, (%rax)
movq %rsp, %rdi
leaq 0x90(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x78ca
movq %r14, %rdi
callq 0x4150
movq %rax, %r15
leaq 0x30(%rsp), %rdi
movl %r15d, %esi
callq 0x72de
movl %r15d, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0x18(%rsp), %r14
movq %rsp, %rsi
leaq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x78ca
cmpb $0x0, 0x47(%rsp)
jns 0xc382
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc382
callq 0x4450
cmpb $0x0, 0x17(%rsp)
jns 0xc397
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xc397
callq 0x4450
cmpb $0x0, 0x5f(%rsp)
jns 0xc3ad
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0xc3ad
callq 0x4450
cmpb $0x0, 0xa7(%rsp)
jns 0xc3c9
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0xc3c9
callq 0x4450
cmpb $0x0, 0x77(%rsp)
jns 0xc3df
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xc3df
callq 0x4450
cmpb $0x0, 0x8f(%rsp)
jns 0xc3f8
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xc3f8
callq 0x4450
cmpb $0x0, 0x2f(%rsp)
jns 0xc404
movq 0x18(%rsp), %r14
movq %rsp, %rdx
movq %r14, (%rdx)
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xaa16
cmpb $0x0, 0x2f(%rsp)
jns 0xc42f
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xc42f
callq 0x4450
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
cmpb $0x0, 0x2f(%rsp)
jns 0xc4fe
movq 0x18(%rsp), %rdi
jmp 0xc4f4
movq %rax, %rbx
cmpb $0x0, 0x47(%rsp)
jns 0xc474
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc474
callq 0x4450
jmp 0xc474
movq %rax, %rbx
cmpb $0x0, 0x17(%rsp)
jns 0xc48e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xc48e
callq 0x4450
jmp 0xc48e
movq %rax, %rbx
cmpb $0x0, 0x5f(%rsp)
jns 0xc4a9
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0xc4a9
callq 0x4450
jmp 0xc4a9
movq %rax, %rbx
cmpb $0x0, 0xa7(%rsp)
jns 0xc4ca
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0xc4ca
callq 0x4450
jmp 0xc4ca
movq %rax, %rbx
cmpb $0x0, 0x77(%rsp)
jns 0xc4e5
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xc4e5
callq 0x4450
jmp 0xc4e5
movq %rax, %rbx
cmpb $0x0, 0x8f(%rsp)
jns 0xc4fe
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xc4fe
callq 0x4450
movq %rbx, %rdi
callq 0x45f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::FatalConditionHandler::reset()
|
static void reset() {
if(isSet) {
// Set signals back to previous values -- hopefully nobody overwrote them in the meantime
for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {
sigaction(signalDefs[i].id, &oldSigActions[i], nullptr);
}
// Return the old stack
sigaltstack(&oldSigStack, nullptr);
isSet = false;
}
}
|
cmpb $0x1, 0x18507(%rip) # 0x25a00
jne 0xd54a
pushq %r15
pushq %r14
pushq %rbx
leaq 0x18519(%rip), %rbx # 0x25a20
xorl %r14d, %r14d
leaq 0x174cf(%rip), %r15 # 0x249e0
movl (%r14,%r15), %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4430
addq $0x10, %r14
addq $0x98, %rbx
cmpq $0x60, %r14
jne 0xd511
leaq 0x184d1(%rip), %rdi # 0x25a08
xorl %esi, %esi
callq 0x4650
movb $0x0, 0x184bb(%rip) # 0x25a00
popq %rbx
popq %r14
popq %r15
retq
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::detail::registerReporterImpl(char const*, int, doctest::IReporter* (*)(doctest::ContextOptions const&), bool)
|
void registerReporterImpl(const char* name, int priority, reporterCreatorFunc c, bool isReporter) {
if(isReporter)
getReporters().insert(reporterMap::value_type(reporterMap::key_type(priority, name), c));
else
getListeners().insert(reporterMap::value_type(reporterMap::key_type(priority, name), c));
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
testl %ecx, %ecx
je 0xd66d
callq 0xd40b
leaq 0x10(%rsp), %r15
movl %ebp, -0x8(%r15)
movq %r14, %rdi
callq 0x4150
movq %rax, %r12
movq %r15, %rdi
movl %r12d, %esi
callq 0x72de
movl %r12d, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
movl -0x8(%r15), %eax
leaq 0x28(%rsp), %rsi
movl %eax, (%rsi)
movups (%r15), %xmm0
movups %xmm0, 0x8(%rsi)
movq 0x10(%r15), %rax
movq %rax, 0x18(%rsi)
movb $0x0, (%r15)
movb $0x17, 0x17(%r15)
movq %rbx, 0x20(%rsi)
leaq 0x1832a(%rip), %rdi # 0x25990
callq 0x1922c
jmp 0xd6d3
callq 0xd421
leaq 0x10(%rsp), %r15
movl %ebp, -0x8(%r15)
movq %r14, %rdi
callq 0x4150
movq %rax, %r12
movq %r15, %rdi
movl %r12d, %esi
callq 0x72de
movl %r12d, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
movl -0x8(%r15), %eax
leaq 0x28(%rsp), %rsi
movl %eax, (%rsi)
movups (%r15), %xmm0
movups %xmm0, 0x8(%rsi)
movq 0x10(%r15), %rax
movq %rax, 0x18(%rsi)
movb $0x0, (%r15)
movb $0x17, 0x17(%r15)
movq %rbx, 0x20(%rsi)
leaq 0x182fa(%rip), %rdi # 0x259c8
callq 0x1922c
cmpb $0x0, 0x47(%rsp)
jns 0xd6e9
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xd6e9
callq 0x4450
cmpb $0x0, 0x27(%rsp)
jns 0xd6ff
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xd6ff
callq 0x4450
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd70e
movq %rax, %rbx
cmpb $0x0, 0x47(%rsp)
jns 0xd727
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xd727
callq 0x4450
cmpb $0x0, 0x27(%rsp)
jns 0xd73d
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xd73d
callq 0x4450
movq %rbx, %rdi
callq 0x45f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::parseOptionImpl(int, char const* const*, char const*, doctest::String*)
|
bool parseOptionImpl(int argc, const char* const* argv, const char* pattern, String* value) {
// going from the end to the beginning and stopping on the first occurrence from the end
for(int i = argc; i > 0; --i) {
auto index = i - 1;
auto temp = std::strstr(argv[index], pattern);
if(temp && (value || strlen(temp) == strlen(pattern))) { //!OCLINT prefer early exits and continue
// eliminate matches in which the chars before the option are not '-'
bool noBadCharsFound = true;
auto curr = argv[index];
while(curr != temp) {
if(*curr++ != '-') {
noBadCharsFound = false;
break;
}
}
if(noBadCharsFound && argv[index][0] == '-') {
if(value) {
// parsing the value of an option
temp += strlen(pattern);
const unsigned len = strlen(temp);
if(len) {
*value = temp;
return true;
}
} else {
// just a flag - no value
return true;
}
}
}
}
return false;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x20(%rsp)
testl %edi, %edi
setg %bl
jle 0xd98c
movq %rcx, %r14
movq %rdx, %r15
movl %edi, %r12d
movq %rcx, (%rsp)
movq 0x20(%rsp), %rax
movq -0x8(%rax,%r12,8), %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x4090
testq %rax, %rax
je 0xd977
movq %rax, %r13
testq %r14, %r14
jne 0xd942
movq %r13, %rdi
callq 0x4150
movq %rax, %r14
movq %r15, %rdi
callq 0x4150
cmpq %rax, %r14
movq (%rsp), %r14
jne 0xd977
movq %rbp, %rax
cmpq %r13, %rax
je 0xd955
cmpb $0x2d, (%rax)
leaq 0x1(%rax), %rax
je 0xd945
jmp 0xd977
cmpb $0x2d, (%rbp)
jne 0xd977
testq %r14, %r14
je 0xd98c
movq %r15, %rdi
callq 0x4150
addq %rax, %r13
movq %r13, %rdi
callq 0x4150
testl %eax, %eax
jne 0xd9a0
leaq -0x1(%r12), %rax
cmpq $0x2, %r12
setge %bl
movq %rax, %r12
jge 0xd904
andb $0x1, %bl
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x4150
movq %rax, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
callq 0x72de
movl %r14d, %edx
movq (%rsp), %r14
movq %rax, %rdi
movq %r13, %rsi
callq 0x42d0
cmpq %r14, %r15
je 0xda02
cmpb $0x0, 0x17(%r14)
jns 0xd9e6
movq (%r14), %rdi
testq %rdi, %rdi
je 0xd9e6
callq 0x4450
movq 0x18(%rsp), %rax
movq %rax, 0x10(%r14)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%r14)
movb $0x0, 0x8(%rsp)
movb $0x17, 0x1f(%rsp)
cmpb $0x0, 0x1f(%rsp)
jns 0xd98c
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xd98c
callq 0x4450
jmp 0xd98c
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::FatalConditionHandler::handleSignal(int)
|
static void handleSignal(int sig) {
const char* name = "<unknown signal>";
for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {
SignalDefs& def = signalDefs[i];
if(sig == def.id) {
name = def.name;
break;
}
}
reset();
reportFatal(name);
raise(sig);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0xd5ee(%rip), %r14 # 0x1b025
movl $0x8, %ecx
leaq 0x16f9d(%rip), %rax # 0x249e0
movl -0x8(%rcx,%rax), %edx
cmpl %edi, %edx
jne 0xda4f
movq (%rcx,%rax), %r14
cmpl %edi, %edx
je 0xda60
leaq 0x10(%rcx), %rdx
cmpq $0x58, %rcx
movq %rdx, %rcx
jne 0xda43
movl %edi, 0x4(%rsp)
callq 0xd4f2
leaq 0x8(%rsp), %rdi
leaq 0x3(%rsp), %rdx
movq %r14, %rsi
callq 0x16c2e
movq 0x17916(%rip), %rax # 0x25398
orl $0x4, 0xb0(%rax)
movq 0x10d0(%rax), %rbp
movq 0x10d8(%rax), %rbx
cmpq %rbx, %rbp
je 0xdafe
leaq 0x28(%rsp), %r14
movq (%rbp), %r15
movq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x4150
movq %rax, %r13
movq %r14, %rdi
movl %r13d, %esi
callq 0x72de
movl %r13d, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x42d0
movb $0x1, 0x40(%rsp)
movq (%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
callq *0x30(%rax)
cmpb $0x0, 0x3f(%rsp)
jns 0xdaf5
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xdaf5
callq 0x4450
addq $0x8, %rbp
cmpq %rbx, %rbp
jne 0xdaa1
movq 0x17893(%rip), %rdi # 0x25398
movq 0x1120(%rdi), %rax
cmpq 0x1118(%rdi), %rax
je 0xdb80
addq $0x1120, %rdi # imm = 0x1120
movq %rdi, %rcx
leaq -0x28(%rax), %rdx
movq %rdx, (%rcx)
cmpb $0x0, -0x11(%rax)
jns 0xdb39
movq (%rdx), %rdi
testq %rdi, %rdi
je 0xdb39
callq 0x4450
movq 0x17858(%rip), %rax # 0x25398
movq 0x10d0(%rax), %rbx
movq 0x10d8(%rax), %r14
cmpq %r14, %rbx
je 0xdb62
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
addq $0x8, %rbx
jmp 0xdb4e
movq 0x1782f(%rip), %rdi # 0x25398
leaq 0x1120(%rdi), %rcx
movq 0x1120(%rdi), %rax
cmpq 0x1118(%rdi), %rax
jne 0xdb1f
callq 0x1669e
movq 0x1780c(%rip), %rax # 0x25398
movq 0x10d0(%rax), %rbx
movq 0x10d8(%rax), %r14
cmpq %r14, %rbx
je 0xdbc1
movl $0xa0, %r15d
movq (%rbx), %rdi
movq 0x177e9(%rip), %rsi # 0x25398
addq %r15, %rsi
movq (%rdi), %rax
callq *0x28(%rax)
addq $0x8, %rbx
cmpq %r14, %rbx
jne 0xdba5
movq 0x177d0(%rip), %rax # 0x25398
movq 0x10d0(%rax), %rbx
movq 0x10d8(%rax), %r14
cmpq %r14, %rbx
je 0xdbfd
movl $0x88, %r15d
movq (%rbx), %rdi
movq 0x177ad(%rip), %rsi # 0x25398
addq %r15, %rsi
movq (%rdi), %rax
callq *0x10(%rax)
addq $0x8, %rbx
cmpq %r14, %rbx
jne 0xdbe1
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdc18
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
movl 0x4(%rsp), %edi
callq 0x4380
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xdc53
jmp 0xdc53
jmp 0xdc53
jmp 0xdc53
movq %rax, %rbx
cmpb $0x0, 0x3f(%rsp)
jns 0xdc56
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xdc56
callq 0x4450
jmp 0xdc56
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdc71
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x45f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::XmlReporter::report_query(doctest::QueryData const&)
|
void report_query(const QueryData& in) override {
test_run_start();
if(opt.list_reporters) {
for(auto& curr : getListeners())
xml.scopedElement("Listener")
.writeAttribute("priority", curr.first.first)
.writeAttribute("name", curr.first.second);
for(auto& curr : getReporters())
xml.scopedElement("Reporter")
.writeAttribute("priority", curr.first.first)
.writeAttribute("name", curr.first.second);
} else if(opt.count || opt.list_test_cases) {
for(unsigned i = 0; i < in.num_data; ++i) {
xml.scopedElement("TestCase").writeAttribute("name", in.data[i]->m_name)
.writeAttribute("testsuite", in.data[i]->m_test_suite)
.writeAttribute("filename", skipPathFromFilename(in.data[i]->m_file.c_str()))
.writeAttribute("line", line(in.data[i]->m_line))
.writeAttribute("skipped", in.data[i]->m_skip);
}
xml.scopedElement("OverallResultsTestCases")
.writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters);
} else if(opt.list_test_suites) {
for(unsigned i = 0; i < in.num_data; ++i)
xml.scopedElement("TestSuite").writeAttribute("name", in.data[i]->m_test_suite);
xml.scopedElement("OverallResultsTestCases")
.writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters);
xml.scopedElement("OverallResultsTestSuites")
.writeAttribute("unskipped", in.run_stats->numTestSuitesPassingFilters);
}
xml.endElement();
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, 0x40(%rsp)
movq 0x78(%rbx), %rax
cmpb $0x1, 0x86(%rax)
jne 0xdf70
callq 0xd421
movq 0x17ccd(%rip), %rbx # 0x259e0
leaq 0x17cb6(%rip), %rax # 0x259d0
cmpq %rax, %rbx
je 0xde39
movq 0x40(%rsp), %rax
leaq 0x8(%rax), %r14
leaq 0x58(%rsp), %r15
movq %rsp, %r13
leaq 0x20(%rsp), %r12
leaq 0x48(%rsp), %rbp
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
leaq 0xd3ef(%rip), %rsi # 0x1b140
leaq 0xd3f0(%rip), %rdx # 0x1b148
callq 0x707c
movq %r14, 0x70(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x1028a
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r12, %rdi
leaq 0xd3c8(%rip), %rsi # 0x1b149
leaq 0xd3c9(%rip), %rdx # 0x1b151
callq 0x707c
leaq 0x20(%rbx), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x103a4
movq %r15, 0x48(%rsp)
movq %rbp, %rdi
leaq 0xd3c7(%rip), %rsi # 0x1b172
leaq 0xd3c4(%rip), %rdx # 0x1b176
callq 0x707c
leaq 0x28(%rbx), %rdx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x108e6
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0xdddd
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xddf9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x70(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xde1e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x4250
movq %rax, %rbx
leaq 0x17ba0(%rip), %rax # 0x259d0
cmpq %rax, %rbx
jne 0xdd3e
callq 0xd40b
movq 0x17b63(%rip), %rbx # 0x259a8
leaq 0x17b4c(%rip), %rax # 0x25998
cmpq %rax, %rbx
je 0xe2c6
movq 0x40(%rsp), %rax
leaq 0x8(%rax), %r14
leaq 0x58(%rsp), %r15
movq %rsp, %r13
leaq 0x20(%rsp), %r12
leaq 0x48(%rsp), %rbp
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
leaq 0xd2cf(%rip), %rsi # 0x1b152
leaq 0xd2d0(%rip), %rdx # 0x1b15a
callq 0x707c
movq %r14, 0x70(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x1028a
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r12, %rdi
leaq 0xd296(%rip), %rsi # 0x1b149
leaq 0xd297(%rip), %rdx # 0x1b151
callq 0x707c
leaq 0x20(%rbx), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x103a4
movq %r15, 0x48(%rsp)
movq %rbp, %rdi
leaq 0xd295(%rip), %rsi # 0x1b172
leaq 0xd292(%rip), %rdx # 0x1b176
callq 0x707c
leaq 0x28(%rbx), %rdx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x108e6
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0xdf0f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xdf2b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x70(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xdf50
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x4250
movq %rax, %rbx
leaq 0x17a36(%rip), %rax # 0x25998
cmpq %rax, %rbx
jne 0xde70
jmp 0xe2c6
cmpb $0x0, 0x83(%rax)
jne 0xdf86
cmpb $0x1, 0x84(%rax)
jne 0xe2e6
cmpl $0x0, 0x10(%r14)
je 0xe221
movq 0x40(%rsp), %rax
leaq 0x8(%rax), %r15
xorl %r13d, %r13d
movq %rsp, %rbp
leaq 0x20(%rsp), %rbx
movq %rbx, %r12
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rbp, %rbx
movq %rbp, %rdi
leaq 0xd19d(%rip), %rsi # 0x1b15b
leaq 0xd19e(%rip), %rdx # 0x1b163
callq 0x707c
movq %r15, %rdi
movq %r15, 0x90(%rsp)
movq %rbx, %rbp
movq %rbx, %rsi
callq 0x1028a
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r12, %rbx
movq %r12, %rdi
leaq 0xd17b(%rip), %rsi # 0x1b172
leaq 0xd178(%rip), %rdx # 0x1b176
callq 0x707c
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rax
movq 0x20(%rax), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x109c6
leaq 0x48(%rsp), %r12
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq %r12, %rdi
leaq 0xd131(%rip), %rsi # 0x1b164
leaq 0xd133(%rip), %rdx # 0x1b16d
callq 0x707c
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rax
movq 0x28(%rax), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x109c6
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %r12
movq %r12, %rdi
leaq 0xd0fc(%rip), %rsi # 0x1b16e
leaq 0xd0fd(%rip), %rdx # 0x1b176
callq 0x707c
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rdi
cmpb $0x0, 0x17(%rdi)
jns 0xe08f
movq (%rdi), %rdi
callq 0x820d
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x109c6
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0xb8(%rsp), %r12
movq %r12, %rdi
leaq 0xcc9c(%rip), %rsi # 0x1ad60
leaq 0xcc99(%rip), %rdx # 0x1ad64
callq 0x707c
movq 0x40(%rsp), %rax
movq 0x78(%rax), %rcx
xorl %eax, %eax
cmpb $0x0, 0x7d(%rcx)
jne 0xe0ec
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rax
movl 0x18(%rax), %eax
movl %eax, 0x6c(%rsp)
movq %r15, %rdi
movq %r12, %rsi
leaq 0x6c(%rsp), %rdx
callq 0x10b20
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x98(%rsp), %r12
movq %r12, %rdi
leaq 0xe4cd(%rip), %rsi # 0x1c5ef
leaq 0xe4cd(%rip), %rdx # 0x1c5f6
callq 0x707c
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rax
movzbl 0x38(%rax), %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x10c00
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xe16a
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0xe18f
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xe1b1
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xe1cd
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xe1e9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x90(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xe211
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
incq %r13
movl 0x10(%r14), %eax
cmpq %rax, %r13
jb 0xdfa5
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xcf46(%rip), %rsi # 0x1b177
leaq 0xcf56(%rip), %rdx # 0x1b18e
movq %rsp, %rdi
callq 0x707c
movq 0x40(%rsp), %rax
leaq 0x8(%rax), %rbx
movq %rbx, 0x48(%rsp)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1028a
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xcf25(%rip), %rsi # 0x1b18f
leaq 0xcf27(%rip), %rdx # 0x1b198
leaq 0x20(%rsp), %rdi
callq 0x707c
movq (%r14), %rdx
addq $0x4, %rdx
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x10b20
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xe2a6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x48(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xe2c6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0x10170
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, 0x85(%rax)
jne 0xe2c6
cmpl $0x0, 0x10(%r14)
je 0xe3c0
movq 0x40(%rsp), %rax
leaq 0x8(%rax), %rbx
leaq 0x30(%rsp), %rbp
xorl %r15d, %r15d
movq %rsp, %r13
leaq 0x20(%rsp), %r12
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
leaq 0xce73(%rip), %rsi # 0x1b199
leaq 0xce75(%rip), %rdx # 0x1b1a2
callq 0x707c
movq %rbx, 0x48(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1028a
movq %rbp, 0x20(%rsp)
movq %r12, %rdi
leaq 0xce21(%rip), %rsi # 0x1b172
leaq 0xce1e(%rip), %rdx # 0x1b176
callq 0x707c
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rax
movq 0x28(%rax), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x109c6
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0xe38b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x48(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xe3b0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
incq %r15
movl 0x10(%r14), %eax
cmpq %rax, %r15
jb 0xe313
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xcda7(%rip), %rsi # 0x1b177
leaq 0xcdb7(%rip), %rdx # 0x1b18e
movq %rsp, %rdi
callq 0x707c
movq 0x40(%rsp), %rax
leaq 0x8(%rax), %rbx
movq %rbx, 0x48(%rsp)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1028a
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xcd86(%rip), %rsi # 0x1b18f
leaq 0xcd88(%rip), %rdx # 0x1b198
leaq 0x20(%rsp), %rdi
callq 0x707c
movq (%r14), %rdx
addq $0x4, %rdx
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x10b20
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xe445
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x48(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xe465
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0xcd31(%rip), %rsi # 0x1b1a3
leaq 0xcd42(%rip), %rdx # 0x1b1bb
callq 0x707c
movq %rbx, 0x48(%rsp)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1028a
leaq 0x20(%rsp), %rdi
movq %r12, (%rdi)
leaq 0xccf2(%rip), %rsi # 0x1b18f
leaq 0xccf4(%rip), %rdx # 0x1b198
callq 0x707c
movq (%r14), %rdx
addq $0x8, %rdx
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x10b20
jmp 0xe28f
jmp 0xe4d8
jmp 0xe4f6
jmp 0xe4f6
jmp 0xe635
jmp 0xe4d8
jmp 0xe4f6
jmp 0xe4f6
jmp 0xe635
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xe4f9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xe4f9
jmp 0xe4f6
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0xe696
jmp 0xe6a3
jmp 0xe635
jmp 0xe635
jmp 0xe521
movq %rax, %rbx
jmp 0xe540
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0xe540
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x48(%rsp), %rdi
jmp 0xe683
jmp 0xe635
jmp 0xe551
movq %rax, %rbx
jmp 0xe61f
jmp 0xe55b
movq %rax, %rbx
jmp 0xe603
jmp 0xe565
movq %rax, %rbx
jmp 0xe5e7
jmp 0xe56c
movq %rax, %rbx
jmp 0xe5c5
jmp 0xe573
movq %rax, %rbx
jmp 0xe5a0
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xe5a0
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0xe5c5
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xe5e7
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xe603
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xe61f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x90(%rsp), %rdi
jmp 0xe683
jmp 0xe635
jmp 0xe63c
jmp 0xe63c
jmp 0xe643
jmp 0xe643
jmp 0xe648
movq %rax, %rbx
jmp 0xe6a3
jmp 0xe63c
movq %rax, %rbx
jmp 0xe67e
jmp 0xe643
movq %rax, %rbx
jmp 0xe662
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0xe662
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xe67e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x70(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xe6a3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x45f0
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::XmlReporter::test_run_start()
|
void test_run_start() override {
xml.writeDeclaration();
// remove .exe extension - mainly to have the same output on UNIX and Windows
std::string binary_name = skipPathFromFilename(opt.binary_name.c_str());
#ifdef DOCTEST_PLATFORM_WINDOWS
if(binary_name.rfind(".exe") != std::string::npos)
binary_name = binary_name.substr(0, binary_name.length() - 4);
#endif // DOCTEST_PLATFORM_WINDOWS
xml.startElement("doctest").writeAttribute("binary", binary_name);
if(opt.no_version == false)
xml.writeAttribute("version", DOCTEST_VERSION_STR);
// only the consequential ones (TODO: filters)
xml.scopedElement("Options")
.writeAttribute("order_by", opt.order_by.c_str())
.writeAttribute("rand_seed", opt.rand_seed)
.writeAttribute("first", opt.first)
.writeAttribute("last", opt.last)
.writeAttribute("abort_after", opt.abort_after)
.writeAttribute("subcase_filter_levels", opt.subcase_filter_levels)
.writeAttribute("case_sensitive", opt.case_sensitive)
.writeAttribute("no_throw", opt.no_throw)
.writeAttribute("no_skip", opt.no_skip);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp # imm = 0x168
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
leaq 0xcceb(%rip), %rsi # 0x1b3b6
movl $0x27, %edx
callq 0x43e0
movq 0x78(%rbx), %rdi
cmpb $0x0, 0x1f(%rdi)
jns 0xe6e5
movq 0x8(%rdi), %rdi
jmp 0xe6e9
addq $0x8, %rdi
callq 0x820d
leaq 0x148(%rsp), %rdi
movq %rsp, %rdx
movq %rax, %rsi
callq 0x16c2e
leaq 0x10(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xcc28(%rip), %rsi # 0x1b339
leaq 0xcc28(%rip), %rdx # 0x1b340
movq %rsp, %rdi
callq 0x707c
leaq 0x8(%rbx), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x1028a
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xcc02(%rip), %rsi # 0x1b341
leaq 0xcc01(%rip), %rdx # 0x1b347
leaq 0x20(%rsp), %rdi
callq 0x707c
leaq 0x20(%rsp), %rsi
leaq 0x148(%rsp), %rdx
movq %r14, %rdi
callq 0x10484
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xe77c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0xe792
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x78(%rbx), %rax
cmpb $0x0, 0x76(%rax)
jne 0xe7dd
movq %rsp, %rdi
movq %rbp, (%rdi)
leaq 0xc4e1(%rip), %rsi # 0x1ac8a
leaq 0xc4e1(%rip), %rdx # 0x1ac91
callq 0x707c
leaq 0xcb8c(%rip), %rdx # 0x1b348
movq %rsp, %rsi
movq %r14, %rdi
callq 0x109c6
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0xe7dd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rsp, %rdi
movq %rbp, (%rdi)
leaq 0xcb64(%rip), %rsi # 0x1b34e
leaq 0xcb64(%rip), %rdx # 0x1b355
callq 0x707c
movq %r14, 0x40(%rsp)
movq %rsp, %rsi
movq %r14, %rdi
callq 0x1028a
leaq 0x20(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xcb41(%rip), %rsi # 0x1b356
leaq 0xcb42(%rip), %rdx # 0x1b35e
callq 0x707c
movq 0x78(%rbx), %rdx
cmpb $0x0, 0x57(%rdx)
jns 0xe831
movq 0x40(%rdx), %rdx
jmp 0xe835
addq $0x40, %rdx
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x109c6
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xcb0a(%rip), %rsi # 0x1b35f
leaq 0xcb0c(%rip), %rdx # 0x1b368
leaq 0xa8(%rsp), %rdi
callq 0x707c
movq 0x78(%rbx), %rdx
addq $0x58, %rdx
leaq 0xa8(%rsp), %rsi
movq %r14, %rdi
callq 0x10b20
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xcad5(%rip), %rsi # 0x1b369
leaq 0xcad3(%rip), %rdx # 0x1b36e
leaq 0x88(%rsp), %rdi
callq 0x707c
movq 0x78(%rbx), %rdx
addq $0x5c, %rdx
leaq 0x88(%rsp), %rsi
movq %r14, %rdi
callq 0x10b20
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xca9f(%rip), %rsi # 0x1b36f
leaq 0xca9c(%rip), %rdx # 0x1b373
leaq 0x68(%rsp), %rdi
callq 0x707c
movq 0x78(%rbx), %rdx
addq $0x60, %rdx
leaq 0x68(%rsp), %rsi
movq %r14, %rdi
callq 0x10b20
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xca6e(%rip), %rsi # 0x1b374
leaq 0xca72(%rip), %rdx # 0x1b37f
leaq 0x48(%rsp), %rdi
callq 0x707c
movq 0x78(%rbx), %rdx
addq $0x64, %rdx
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x103a4
leaq 0x138(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xca41(%rip), %rsi # 0x1b380
leaq 0xca4f(%rip), %rdx # 0x1b395
leaq 0x128(%rsp), %rdi
callq 0x707c
movq 0x78(%rbx), %rdx
addq $0x68, %rdx
leaq 0x128(%rsp), %rsi
movq %r14, %rdi
callq 0x103a4
leaq 0x118(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xca17(%rip), %rsi # 0x1b396
leaq 0xca1e(%rip), %rdx # 0x1b3a4
leaq 0x108(%rsp), %rdi
callq 0x707c
movq 0x78(%rbx), %rax
movzbl 0x6d(%rax), %edx
leaq 0x108(%rsp), %rsi
movq %r14, %rdi
callq 0x10c00
leaq 0xf8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xc9e7(%rip), %rsi # 0x1b3a5
leaq 0xc9e8(%rip), %rdx # 0x1b3ad
leaq 0xe8(%rsp), %rdi
callq 0x707c
movq 0x78(%rbx), %rax
movzbl 0x72(%rax), %edx
leaq 0xe8(%rsp), %rsi
movq %r14, %rdi
callq 0x10c00
leaq 0xd8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xc9b1(%rip), %rsi # 0x1b3ae
leaq 0xc9b1(%rip), %rdx # 0x1b3b5
leaq 0xc8(%rsp), %rdi
callq 0x707c
movq 0x78(%rbx), %rax
movzbl 0x7a(%rax), %edx
leaq 0xc8(%rsp), %rsi
movq %r14, %rdi
callq 0x10c00
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xea46
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
leaq 0x10(%rsp), %rbp
je 0xea68
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
leaq 0x30(%rsp), %rbx
leaq 0xb8(%rsp), %r14
leaq 0x98(%rsp), %r12
leaq 0x78(%rsp), %r13
je 0xea9f
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0xeabc
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xead8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0xeaef
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0xeb0c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0xeb29
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0xeb40
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x40(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0xeb60
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xeb81
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x4390
addq $0x168, %rsp # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xed5f
jmp 0xed6d
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xebc4
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xebc4
jmp 0xebc1
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0xebe8
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xebe8
jmp 0xebe5
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0xec0c
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xec0c
jmp 0xec09
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0xec30
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xec30
jmp 0xec2d
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xec53
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xec53
jmp 0xec50
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xec76
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xec76
jmp 0xec73
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xeca2
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xeca2
jmp 0xec9f
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xecce
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xecce
jmp 0xeccb
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xecea
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x40(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xed0f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xed30
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x45f0
jmp 0xed3a
movq %rax, %rbx
jmp 0xecea
jmp 0xed6d
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xed62
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xed62
jmp 0xed5f
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
jne 0xed02
jmp 0xed0f
movq %rax, %rbx
jmp 0xed0f
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::XmlReporter::test_run_end(doctest::TestRunStats const&)
|
void test_run_end(const TestRunStats& p) override {
if(tc) // the TestSuite tag - only if there has been at least 1 test case
xml.endElement();
xml.scopedElement("OverallResultsAsserts")
.writeAttribute("successes", p.numAsserts - p.numAssertsFailed)
.writeAttribute("failures", p.numAssertsFailed);
xml.startElement("OverallResultsTestCases")
.writeAttribute("successes",
p.numTestCasesPassingFilters - p.numTestCasesFailed)
.writeAttribute("failures", p.numTestCasesFailed);
if(opt.no_skipped_summary == false)
xml.writeAttribute("skipped", p.numTestCases - p.numTestCasesPassingFilters);
xml.endElement();
xml.endElement();
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x80(%rdi)
je 0xed99
leaq 0x8(%r15), %rdi
callq 0x10170
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc634(%rip), %rsi # 0x1b3de
leaq 0xc642(%rip), %rdx # 0x1b3f3
leaq 0x8(%rsp), %rdi
callq 0x707c
leaq 0x8(%r15), %rbx
movq %rbx, 0x28(%rsp)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1028a
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xc613(%rip), %rsi # 0x1b3f4
leaq 0xc615(%rip), %rdx # 0x1b3fd
leaq 0x30(%rsp), %rdi
callq 0x707c
movl 0x10(%r14), %eax
subl 0x14(%r14), %eax
leaq 0x74(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x103a4
leaq 0x60(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xc624(%rip), %rsi # 0x1b442
leaq 0xc625(%rip), %rdx # 0x1b44a
leaq 0x50(%rsp), %rdi
callq 0x707c
leaq 0x14(%r14), %rdx
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x103a4
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0xee57
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0xee6e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x28(%rsp), %rdi
callq 0x10158
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xee8f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0xc2d9(%rip), %rsi # 0x1b177
leaq 0xc2e9(%rip), %rdx # 0x1b18e
callq 0x707c
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1028a
leaq 0x30(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xc52e(%rip), %rsi # 0x1b3f4
leaq 0xc530(%rip), %rdx # 0x1b3fd
callq 0x707c
movl 0x4(%r14), %eax
subl 0xc(%r14), %eax
leaq 0x28(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x10b20
leaq 0x50(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0xc545(%rip), %rsi # 0x1b442
leaq 0xc546(%rip), %rdx # 0x1b44a
callq 0x707c
leaq 0xc(%r14), %rdx
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x10b20
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0xef31
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0xef48
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xef5f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x78(%r15), %rax
cmpb $0x0, 0x7f(%rax)
jne 0xefb6
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0xd677(%rip), %rsi # 0x1c5ef
leaq 0xd677(%rip), %rdx # 0x1c5f6
callq 0x707c
movl (%r14), %eax
subl 0x4(%r14), %eax
leaq 0x30(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x10b20
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xefb6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x10170
movq %rbx, %rdi
callq 0x10170
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf018
jmp 0xf081
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0xeffd
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xeffd
jmp 0xeffa
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0xf068
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf068
jmp 0xf018
movq %rax, %rbx
jmp 0xf068
jmp 0xf081
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0xf040
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf040
jmp 0xf03d
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0xf05e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf05e
jmp 0xf05b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x10158
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf084
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf084
movq %rax, %rbx
movq %rbx, %rdi
callq 0x45f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::XmlReporter::test_case_end(doctest::CurrentTestCaseStats const&)
|
void test_case_end(const CurrentTestCaseStats& st) override {
xml.startElement("OverallResultsAsserts")
.writeAttribute("successes",
st.numAssertsCurrentTest - st.numAssertsFailedCurrentTest)
.writeAttribute("failures", st.numAssertsFailedCurrentTest)
.writeAttribute("test_case_success", st.testCaseSuccess);
if(opt.duration)
xml.writeAttribute("duration", st.seconds);
if(tc->m_expected_failures)
xml.writeAttribute("expected_failures", tc->m_expected_failures);
xml.endElement();
xml.endElement();
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xc313(%rip), %rsi # 0x1b3de
leaq 0xc321(%rip), %rdx # 0x1b3f3
movq %rsp, %rdi
callq 0x707c
leaq 0x8(%r14), %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1028a
leaq 0x78(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xc2fb(%rip), %rsi # 0x1b3f4
leaq 0xc2fd(%rip), %rdx # 0x1b3fd
leaq 0x68(%rsp), %rdi
callq 0x707c
movl (%r15), %eax
subl 0x4(%r15), %eax
leaq 0x44(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x103a4
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xc30d(%rip), %rsi # 0x1b442
leaq 0xc30e(%rip), %rdx # 0x1b44a
leaq 0x20(%rsp), %rdi
callq 0x707c
leaq 0x4(%r15), %rdx
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x103a4
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc2bf(%rip), %rsi # 0x1b427
leaq 0xc2c9(%rip), %rdx # 0x1b438
leaq 0x48(%rsp), %rdi
callq 0x707c
movzbl 0x14(%r15), %edx
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x10c00
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0xf1a2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xf1be
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0xf1d5
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4390
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xf1eb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x78(%r14), %rax
cmpb $0x1, 0x6f(%rax)
jne 0xf236
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0xb984(%rip), %rsi # 0x1ab86
leaq 0xb985(%rip), %rdx # 0x1ab8e
callq 0x707c
addq $0x8, %r15
movq %rsp, %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x110f8
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xf236
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x80(%r14), %rax
cmpl $0x0, 0x40(%rax)
je 0xf288
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0xc1e9(%rip), %rsi # 0x1b439
leaq 0xc1f3(%rip), %rdx # 0x1b44a
callq 0x707c
movq 0x80(%r14), %rdx
addq $0x40, %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x103a4
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xf288
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x10170
movq %rbx, %rdi
callq 0x10170
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf311
jmp 0xf32c
jmp 0xf311
jmp 0xf32c
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0xf2d3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf2d3
jmp 0xf2d0
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xf2f6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf2f6
jmp 0xf2f3
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0xf314
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf314
jmp 0xf311
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xf32f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf32f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x45f0
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::XmlReporter::test_case_exception(doctest::TestCaseException const&)
|
void test_case_exception(const TestCaseException& e) override {
DOCTEST_LOCK_MUTEX(mutex)
xml.scopedElement("Exception")
.writeAttribute("crash", e.is_crash)
.writeText(e.error_string.c_str());
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x50(%rdi), %rbx
movq %rbx, %rdi
callq 0x44f0
testl %eax, %eax
jne 0xf461
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc10c(%rip), %rsi # 0x1b47a
leaq 0xc10e(%rip), %rdx # 0x1b483
leaq 0x38(%rsp), %rdi
callq 0x707c
addq $0x8, %r15
movq %r15, 0x10(%rsp)
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x1028a
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc0a6(%rip), %rsi # 0x1b44b
leaq 0xc0a4(%rip), %rdx # 0x1b450
leaq 0x18(%rsp), %rdi
callq 0x707c
movq 0x10(%rsp), %rdi
movzbl 0x18(%r14), %edx
leaq 0x18(%rsp), %rsi
callq 0x10c00
cmpb $0x0, 0x17(%r14)
jns 0xf3d4
movq (%r14), %r14
leaq 0x58(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r14, %rsi
callq 0x16c2e
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl $0x1, %edx
callq 0x111da
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf415
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0xf42c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x10(%rsp), %rdi
callq 0x10158
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0xf44d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x4290
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x4210
movq %rax, %r14
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf48d
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf48d
jmp 0xf48a
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0xf4ab
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf4ab
jmp 0xf4a8
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x10158
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0xf4d1
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xf4d1
movq %rax, %r14
movq %rbx, %rdi
callq 0x4290
movq %r14, %rdi
callq 0x45f0
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::XmlReporter::log_assert(doctest::AssertData const&)
|
void log_assert(const AssertData& rb) override {
if(!rb.m_failed && !opt.success)
return;
DOCTEST_LOCK_MUTEX(mutex)
xml.startElement("Expression")
.writeAttribute("success", !rb.m_failed)
.writeAttribute("type", assertString(rb.m_at))
.writeAttribute("filename", skipPathFromFilename(rb.m_file))
.writeAttribute("line", line(rb.m_line));
xml.scopedElement("Original").writeText(rb.m_expr);
if(rb.m_threw)
xml.scopedElement("Exception").writeText(rb.m_exception.c_str());
if(rb.m_at & assertType::is_throws_as)
xml.scopedElement("ExpectedException").writeText(rb.m_exception_type);
if(rb.m_at & assertType::is_throws_with)
xml.scopedElement("ExpectedExceptionString").writeText(rb.m_exception_string.c_str());
if((rb.m_at & assertType::is_normal) && !rb.m_threw)
xml.scopedElement("Expanded").writeText(rb.m_decomp.c_str());
log_contexts();
xml.endElement();
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r12
movq %rdi, %r13
cmpb $0x0, 0x28(%rsi)
jne 0xf711
movq 0x78(%r13), %rax
cmpb $0x1, 0x6c(%rax)
jne 0xfc16
leaq 0x50(%r13), %rdi
movq %rdi, 0x60(%rsp)
callq 0x44f0
testl %eax, %eax
jne 0xfc28
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xbd22(%rip), %rsi # 0x1b459
leaq 0xbd25(%rip), %rdx # 0x1b463
movq %rsp, %rdi
callq 0x707c
leaq 0x8(%r13), %r15
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1028a
leaq 0x30(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0xb3b0(%rip), %rsi # 0x1ab15
leaq 0xb3b0(%rip), %rdx # 0x1ab1c
leaq 0x20(%rsp), %rdi
callq 0x707c
movzbl 0x28(%r12), %edx
xorl $0x1, %edx
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x10c00
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xbcc8(%rip), %rsi # 0x1b464
leaq 0xbcc5(%rip), %rdx # 0x1b468
leaq 0x40(%rsp), %rdi
callq 0x707c
movl 0x8(%r12), %edi
callq 0x7d1b
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
movq %rax, %rdx
callq 0x109c6
leaq 0x80(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xb994(%rip), %rsi # 0x1b16e
leaq 0xb995(%rip), %rdx # 0x1b176
leaq 0x70(%rsp), %rdi
callq 0x707c
movq %r13, 0x68(%rsp)
movq 0x10(%r12), %rdi
callq 0x820d
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
movq %rax, %rdx
callq 0x109c6
leaq 0xa8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xb543(%rip), %rsi # 0x1ad60
leaq 0xb540(%rip), %rdx # 0x1ad64
leaq 0x98(%rsp), %rdi
callq 0x707c
movq 0x68(%rsp), %rax
movq 0x78(%rax), %rcx
xorl %eax, %eax
cmpb $0x0, 0x7d(%rcx)
jne 0xf847
movl 0x18(%r12), %eax
leaq 0x94(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x98(%rsp), %rsi
movq %r15, %rdi
callq 0x10b20
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0xf87e
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
movq %rbx, %r13
je 0xf89b
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0xf8b2
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
leaq 0x10(%rsp), %rbx
je 0xf8ce
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0xf8e4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rsp, %rdi
movq %rbx, (%rdi)
leaq 0xbb78(%rip), %rsi # 0x1b469
leaq 0xbb79(%rip), %rdx # 0x1b471
callq 0x707c
movq %r15, 0x40(%rsp)
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1028a
movq 0x20(%r12), %rsi
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x16c2e
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x111da
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0xf94c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x40(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0xf96c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
cmpb $0x1, 0x29(%r12)
jne 0xfa0f
movq %rsp, %rdi
movq %rbx, (%rdi)
leaq 0xbaf5(%rip), %rsi # 0x1b47a
leaq 0xbaf7(%rip), %rdx # 0x1b483
callq 0x707c
movq %r15, 0x40(%rsp)
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1028a
cmpb $0x0, 0x47(%r12)
jns 0xf9b0
movq 0x30(%r12), %rsi
jmp 0xf9b5
leaq 0x30(%r12), %rsi
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x16c2e
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x111da
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0xf9ef
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x40(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0xfa0f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
testb $0x20, 0x8(%r12)
je 0xfaa3
movq %rsp, %rdi
movq %rbx, (%rdi)
leaq 0xba4a(%rip), %rsi # 0x1b472
leaq 0xba54(%rip), %rdx # 0x1b483
callq 0x707c
movq %r15, 0x40(%rsp)
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1028a
movq 0x68(%r12), %rsi
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x16c2e
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x111da
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0xfa83
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x40(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0xfaa3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
testb $0x40, 0x8(%r12)
je 0xfb49
movq %rsp, %rdi
movq %rbx, (%rdi)
leaq 0xb9c8(%rip), %rsi # 0x1b484
leaq 0xb9d8(%rip), %rdx # 0x1b49b
callq 0x707c
movq %r15, 0x40(%rsp)
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1028a
cmpb $0x0, 0x87(%r12)
jns 0xfaea
movq 0x70(%r12), %rsi
jmp 0xfaef
leaq 0x70(%r12), %rsi
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x16c2e
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x111da
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0xfb29
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x40(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0xfb49
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
testb $0x8, 0x8(%r12)
je 0xfbfa
cmpb $0x0, 0x29(%r12)
jne 0xfbfa
movq %rsp, %rdi
movq %rbx, (%rdi)
leaq 0xb92e(%rip), %rsi # 0x1b49c
leaq 0xb92f(%rip), %rdx # 0x1b4a4
callq 0x707c
movq %r15, 0x40(%rsp)
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1028a
cmpb $0x0, 0x5f(%r12)
jns 0xfb99
movq 0x48(%r12), %r12
jmp 0xfb9d
addq $0x48, %r12
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rdx
movq %r12, %rsi
callq 0x16c2e
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x1, %edx
callq 0x111da
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0xfbda
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x40(%rsp), %rdi
callq 0x10158
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0xfbfa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x68(%rsp), %rdi
callq 0x112a0
movq %r15, %rdi
callq 0x10170
movq 0x60(%rsp), %rdi
callq 0x4290
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x4210
jmp 0xfc5b
jmp 0xfc79
jmp 0xfc79
jmp 0xfce2
jmp 0xfc5b
jmp 0xfc79
jmp 0xfc79
jmp 0xfc5b
jmp 0xfce2
jmp 0xfc79
jmp 0xfc79
jmp 0xfc5b
jmp 0xfce2
jmp 0xfc79
jmp 0xfc79
jmp 0xfce2
movq %rax, %r15
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0xfc7c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xfc7c
jmp 0xfc79
movq %rax, %r15
leaq 0x40(%rsp), %rdi
callq 0x10158
jmp 0xfd18
jmp 0xfce2
movq %rax, %r15
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0xfcb4
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xfcb4
jmp 0xfcb1
movq %rax, %r15
movq 0x70(%rsp), %rdi
cmpq %rbp, %rdi
je 0xfcea
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xfcea
jmp 0xfce7
jmp 0xfcd4
movq %rax, %r15
jmp 0xfd01
jmp 0xfcdb
movq %rax, %r15
jmp 0xfd18
jmp 0xfce2
movq %rax, %r15
jmp 0xfd33
movq %rax, %r15
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0xfd01
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0xfd18
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xfd33
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x60(%rsp), %rdi
callq 0x4290
movq %r15, %rdi
callq 0x45f0
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::XmlReporter::log_message(doctest::MessageData const&)
|
void log_message(const MessageData& mb) override {
DOCTEST_LOCK_MUTEX(mutex)
xml.startElement("Message")
.writeAttribute("type", failureString(mb.m_severity))
.writeAttribute("filename", skipPathFromFilename(mb.m_file))
.writeAttribute("line", line(mb.m_line));
xml.scopedElement("Text").writeText(mb.m_string.c_str());
log_contexts();
xml.endElement();
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r12
movq %rdi, %r14
addq $0x50, %rdi
movq %rdi, 0x48(%rsp)
callq 0x44f0
testl %eax, %eax
jne 0xffb4
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xb727(%rip), %rsi # 0x1b4aa
leaq 0xb727(%rip), %rdx # 0x1b4b1
leaq 0x8(%rsp), %rdi
callq 0x707c
leaq 0x8(%r14), %r15
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x1028a
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xb6af(%rip), %rsi # 0x1b464
leaq 0xb6ac(%rip), %rdx # 0x1b468
leaq 0x28(%rsp), %rdi
callq 0x707c
movl 0x24(%r12), %eax
testb $0x1, %al
jne 0xfde9
testb $0x2, %al
jne 0xfdf2
testb $0x4, %al
leaq 0xab9a(%rip), %rax # 0x1a976
leaq 0xaac5(%rip), %rdx # 0x1a8a8
cmoveq %rax, %rdx
jmp 0xfdf9
leaq 0xaab0(%rip), %rdx # 0x1a8a0
jmp 0xfdf9
leaq 0xaab5(%rip), %rdx # 0x1a8ae
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x109c6
leaq 0x60(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0xb358(%rip), %rsi # 0x1b16e
leaq 0xb359(%rip), %rdx # 0x1b176
leaq 0x50(%rsp), %rdi
callq 0x707c
movq 0x18(%r12), %rdi
callq 0x820d
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
movq %rax, %rdx
callq 0x109c6
leaq 0x80(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xaf0c(%rip), %rsi # 0x1ad60
leaq 0xaf09(%rip), %rdx # 0x1ad64
leaq 0x70(%rsp), %rdi
callq 0x707c
movq 0x78(%r14), %rcx
xorl %eax, %eax
cmpb $0x0, 0x7d(%rcx)
jne 0xfe76
movl 0x20(%r12), %eax
leaq 0x94(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x10b20
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0xfea7
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0xfebe
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x18(%rsp), %rbx
je 0xfeda
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0xfef1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x8(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0xb5b2(%rip), %rsi # 0x1b4b2
leaq 0xb5af(%rip), %rdx # 0x1b4b6
callq 0x707c
movq %r15, 0x50(%rsp)
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x1028a
cmpb $0x0, 0x17(%r12)
jns 0xff2a
movq (%r12), %r12
leaq 0x28(%rsp), %rdi
leaq 0x70(%rsp), %rdx
movq %r12, %rsi
callq 0x16c2e
leaq 0x50(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0x1, %edx
callq 0x111da
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0xff67
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x50(%rsp), %rdi
callq 0x10158
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0xff88
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
movq %r14, %rdi
callq 0x112a0
movq %r15, %rdi
callq 0x10170
movq 0x48(%rsp), %rdi
callq 0x4290
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x4210
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0xffdc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0xffdc
jmp 0xffd9
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x10158
jmp 0x1004d
jmp 0x1006d
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x10011
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0x10011
jmp 0x1000e
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1002f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0x1002f
jmp 0x1002c
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1004d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0x1004d
jmp 0x1004a
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x10070
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0x10070
jmp 0x1006d
movq %rax, %r14
movq 0x48(%rsp), %rdi
callq 0x4290
movq %r14, %rdi
callq 0x45f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::XmlReporter::log_contexts()
|
void log_contexts() {
int num_contexts = get_num_active_contexts();
if(num_contexts) {
auto contexts = get_active_contexts();
std::stringstream ss;
for(int i = 0; i < num_contexts; ++i) {
contexts[i]->stringify(&ss);
xml.scopedElement("Info").writeText(ss.str());
ss.str("");
}
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp # imm = 0x1D8
movq %rdi, %rbx
callq 0x15c12
movq %fs:-0x28, %r13
subq %fs:-0x30, %r13
shrq $0x3, %r13
testl %r13d, %r13d
je 0x1140c
callq 0xd56e
movq %rax, 0x28(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x4260
testl %r13d, %r13d
jle 0x113ee
leaq 0x18(%rsp), %r12
addq $0x8, %rbx
andl $0x7fffffff, %r13d # imm = 0x7FFFFFFF
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
movq 0x28(%rsp), %rax
movq (%rax,%rbp,8), %rdi
movq (%rdi), %rax
leaq 0x60(%rsp), %rsi
callq *0x10(%rax)
movq %r12, 0x8(%rsp)
movq %r15, %rdi
leaq 0xa176(%rip), %rsi # 0x1b4a5
leaq 0xa173(%rip), %rdx # 0x1b4a9
callq 0x707c
movq %rbx, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1028a
leaq 0x30(%rsp), %r14
movq %r14, %rdi
leaq 0x68(%rsp), %rsi
callq 0x4540
movq %rsp, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x111da
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x11388
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rsp, %rdi
callq 0x10158
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x113a7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
movq %r12, 0x8(%rsp)
movq %r15, %rdi
leaq 0x95c0(%rip), %rdx # 0x1a976
movq %rdx, %rsi
callq 0x707c
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0x4500
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x113e2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
incq %rbp
cmpq %rbp, %r13
jne 0x1130c
movq 0x13ba3(%rip), %rsi # 0x24f98
leaq 0x50(%rsp), %rdi
callq 0x4280
leaq 0xd0(%rsp), %rdi
callq 0x4110
addq $0x1d8, %rsp # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11452
jmp 0x11452
jmp 0x11424
movq %rax, %rbx
jmp 0x11448
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x11448
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rsp, %rdi
callq 0x10158
jmp 0x1145a
movq %rax, %rbx
jmp 0x11471
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x11471
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x13b20(%rip), %rsi # 0x24f98
leaq 0x50(%rsp), %rdi
callq 0x4280
leaq 0xd0(%rsp), %rdi
callq 0x4110
movq %rbx, %rdi
callq 0x45f0
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::XmlWriter::~XmlWriter()
|
XmlWriter::~XmlWriter() {
while( !m_tags.empty() )
endElement();
}
|
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
je 0x114b0
movq %rbx, %rdi
callq 0x10170
jmp 0x1149c
movq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0x114c8
movq (%rax), %rsi
incq %rsi
callq 0x4390
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x1826e
movq %rax, %rdi
callq 0x163f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::JUnitReporter::test_case_start(doctest::TestCaseData const&)
|
void test_case_start(const TestCaseData& in) override {
testCaseData.add(skipPathFromFilename(in.m_file.c_str()), in.m_name);
timer.start();
}
|
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x0, 0x17(%rsi)
movq %rsi, %rdi
jns 0x11f81
movq (%r14), %rdi
callq 0x820d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0x16c2e
movq 0x20(%r14), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x16c2e
leaq 0x98(%rbx), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x12ad2
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11fdc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11ff7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x4570
imulq $0xf4240, (%r14), %rax # imm = 0xF4240
addq 0x8(%r14), %rax
movq %rax, 0x78(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12040
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0x12040
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1205b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4390
movq %rbx, %rdi
callq 0x45f0
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::JUnitReporter::log_assert(doctest::AssertData const&)
|
void log_assert(const AssertData& rb) override {
if(!rb.m_failed) // report only failures & ignore the `success` option
return;
DOCTEST_LOCK_MUTEX(mutex)
std::ostringstream os;
os << skipPathFromFilename(rb.m_file) << (opt.gnu_file_line ? ":" : "(")
<< line(rb.m_line) << (opt.gnu_file_line ? ":" : "):") << std::endl;
fulltext_log_assert_to_stream(os, rb);
log_contexts(os);
testCaseData.addFailure(rb.m_decomp.c_str(), assertString(rb.m_at), os.str());
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp # imm = 0x1F8
cmpb $0x1, 0x28(%rsi)
jne 0x12908
movq %rsi, %r15
movq %rdi, %r14
leaq 0x50(%rdi), %rbx
movq %rbx, %rdi
callq 0x44f0
testl %eax, %eax
jne 0x1291a
leaq 0x80(%rsp), %rdi
movq %rbx, 0x10(%rsp)
callq 0x4490
movq 0x10(%r15), %rdi
callq 0x820d
testq %rax, %rax
je 0x125c3
movq %rax, %rbx
movq %rax, %rdi
callq 0x4150
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x43e0
jmp 0x125e5
movq 0x80(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x80, %rdi
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0x45a0
movq 0xc0(%r14), %rax
leaq 0x8f3a(%rip), %rbx # 0x1b52d
leaq 0x8f30(%rip), %rsi # 0x1b52a
cmpb $0x0, 0x7b(%rax)
cmovneq %rbx, %rsi
leaq 0x80(%rsp), %rdi
movl $0x1, %edx
callq 0x43e0
movl 0x18(%r15), %eax
movq 0xc0(%r14), %rcx
xorl %esi, %esi
cmpb $0x0, 0x7d(%rcx)
cmoveq %rax, %rsi
leaq 0x80(%rsp), %rdi
callq 0x4230
movq %rax, %r12
movq 0xc0(%r14), %rax
movzbl 0x7b(%rax), %eax
leaq 0x8ee1(%rip), %rsi # 0x1b52c
testq %rax, %rax
cmovneq %rbx, %rsi
movl $0x2, %edx
subq %rax, %rdx
movq %r12, %rdi
callq 0x43e0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x4350
movsbl %al, %esi
movq %r12, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4240
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
callq 0x13278
callq 0x15c12
movq %r15, 0x8(%rsp)
movq %r14, 0x18(%rsp)
movq %fs:-0x28, %rbx
subq %fs:-0x30, %rbx
shrq $0x3, %rbx
testl %ebx, %ebx
je 0x12762
callq 0xd56e
movq %rax, %r12
leaq 0x8f3c(%rip), %rsi # 0x1b612
leaq 0x80(%rsp), %r13
movl $0xa, %edx
movq %r13, %rdi
callq 0x43e0
testl %ebx, %ebx
jle 0x12762
andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF
xorl %r14d, %r14d
leaq 0x8277(%rip), %rbp # 0x1a976
leaq 0x91a8(%rip), %r15 # 0x1b8ae
testq %r14, %r14
movq %r15, %rsi
cmoveq %rbp, %rsi
movl $0xa, %edx
cmoveq %r14, %rdx
movq %r13, %rdi
callq 0x43e0
movq (%r12,%r14,8), %rdi
movq (%rdi), %rax
movq %r13, %rsi
callq *0x10(%rax)
movq 0x80(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4350
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4240
incq %r14
cmpq %r14, %rbx
jne 0x12706
movq 0x8(%rsp), %rbx
cmpb $0x0, 0x5f(%rbx)
jns 0x12773
movq 0x48(%rbx), %rsi
jmp 0x12777
leaq 0x48(%rbx), %rsi
leaq 0x60(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x16c2e
movl 0x8(%rbx), %edi
callq 0x7d1b
movq 0x18(%rsp), %r15
leaq 0x40(%rsp), %rdi
leaq 0x6(%rsp), %rdx
movq %rax, %rsi
callq 0x16c2e
leaq 0x88(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x4540
movq 0xa0(%r15), %r14
movq -0x28(%r14), %r13
cmpq -0x20(%r14), %r13
je 0x127e9
leaq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r13, %rdi
callq 0x13878
addq $0x60, -0x28(%r14)
jmp 0x12882
leaq -0x30(%r14), %rdi
callq 0x13074
movq %rax, %r15
movq -0x30(%r14), %rbp
movq -0x28(%r14), %rbx
movq %rax, %rdi
callq 0x130d8
movq %rax, %r12
movq %r15, 0x8(%rsp)
movq %r13, %r15
subq %rbp, %r15
addq %rax, %r15
leaq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r15, %rdi
callq 0x13878
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x13102
leaq 0x60(%rax), %rdx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x13102
movq %rax, %rbx
testq %rbp, %rbp
movq 0x18(%rsp), %r15
je 0x12866
movq -0x20(%r14), %rsi
subq %rbp, %rsi
movq %rbp, %rdi
callq 0x4390
movq %r12, -0x30(%r14)
movq %rbx, -0x28(%r14)
movq 0x8(%rsp), %rax
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq %rax, %r12
movq %r12, -0x20(%r14)
incl 0xbc(%r15)
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq 0x10(%rsp), %rbx
je 0x128a9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x128c4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x128df
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4390
movq 0x126d2(%rip), %rsi # 0x24fb8
leaq 0x80(%rsp), %rdi
callq 0x41b0
leaq 0xf0(%rsp), %rdi
callq 0x4110
movq %rbx, %rdi
callq 0x4290
addq $0x1f8, %rsp # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x4210
movq %rax, %rdi
callq 0x4140
testq %r12, %r12
jne 0x12938
movq %r15, %rdi
callq 0x1322a
jmp 0x1294d
movq 0x8(%rsp), %rax
shlq $0x5, %rax
leaq (%rax,%rax,2), %rsi
movq %r12, %rdi
callq 0x4390
callq 0x44e0
movq %rax, %r14
callq 0x4590
jmp 0x1297a
movq %rax, %rdi
callq 0x163f0
movq %rax, %r14
jmp 0x12995
jmp 0x1296b
movq %rax, %r14
jmp 0x129b0
jmp 0x129cf
movq %rax, %r14
jmp 0x129f3
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12995
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x129b0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4390
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x129d2
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4390
jmp 0x129d2
jmp 0x129cf
movq %rax, %r14
movq 0x125df(%rip), %rsi # 0x24fb8
leaq 0x80(%rsp), %rdi
callq 0x41b0
leaq 0xf0(%rsp), %rdi
callq 0x4110
movq 0x10(%rsp), %rdi
callq 0x4290
movq %r14, %rdi
callq 0x45f0
nop
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::ConsoleReporter::log_assert(doctest::AssertData const&)
|
void log_assert(const AssertData& rb) override {
if((!rb.m_failed && !opt.success) || tc->m_no_output)
return;
DOCTEST_LOCK_MUTEX(mutex)
logTestStart();
file_line_to_stream(rb.m_file, rb.m_line, " ");
successOrFailColoredStringToStream(!rb.m_failed, rb.m_at);
fulltext_log_assert_to_stream(s, rb);
log_contexts();
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
cmpb $0x0, 0x28(%rsi)
jne 0x151f5
movq 0x60(%rbx), %rax
cmpb $0x1, 0x6c(%rax)
jne 0x151ff
movq 0x68(%rbx), %rax
cmpb $0x0, 0x3a(%rax)
je 0x15205
popq %rbx
popq %r14
popq %r15
retq
leaq 0x38(%rbx), %r14
movq %r14, %rdi
callq 0x44f0
testl %eax, %eax
jne 0x1526a
movq %rbx, %rdi
callq 0x156ec
movq 0x10(%r15), %rsi
movl 0x18(%r15), %edx
movq (%rbx), %rax
leaq 0x6688(%rip), %rcx # 0x1b8b7
movq %rbx, %rdi
callq *0x70(%rax)
movzbl 0x28(%r15), %esi
movl 0x8(%r15), %edx
xorl $0x1, %esi
movq %rbx, %rdi
callq 0x15a8a
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x13278
movq %rbx, %rdi
callq 0x15b2c
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4290
movl %eax, %edi
callq 0x4210
movq %rax, %rbx
movq %r14, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x45f0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
doctest::(anonymous namespace)::ConsoleReporter::file_line_to_stream(char const*, int, char const*)
|
virtual void file_line_to_stream(const char* file, int line,
const char* tail = "") {
s << Color::LightGrey << skipPathFromFilename(file) << (opt.gnu_file_line ? ":" : "(")
<< (opt.no_line_numbers ? 0 : line) // 0 or the real num depending on the option
<< (opt.gnu_file_line ? ":" : "):") << tail;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r14
movq 0x8(%rdi), %r15
movq %r15, %rdi
movl $0x17, %esi
callq 0x7c99
movq %r12, %rdi
callq 0x820d
testq %rax, %rax
je 0x1543a
movq %rax, %r12
movq %rax, %rdi
callq 0x4150
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x43e0
jmp 0x15452
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x45a0
movq 0x60(%r14), %rax
leaq 0x60d0(%rip), %r12 # 0x1b52d
leaq 0x60c6(%rip), %rsi # 0x1b52a
cmpb $0x0, 0x7b(%rax)
cmovneq %r12, %rsi
movl $0x1, %edx
movq %r15, %rdi
callq 0x43e0
movq 0x60(%r14), %rax
xorl %ecx, %ecx
cmpb $0x0, 0x7d(%rax)
cmovnel %ecx, %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x45c0
movq %rax, %r15
movq 0x60(%r14), %rax
movzbl 0x7b(%rax), %eax
leaq 0x608a(%rip), %rsi # 0x1b52c
testq %rax, %rax
cmovneq %r12, %rsi
movl $0x2, %edx
subq %rax, %rdx
movq %r15, %rdi
callq 0x43e0
testq %rbx, %rbx
je 0x154dc
movq %rbx, %rdi
callq 0x4150
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x43e0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x45a0
|
/charlesnicholson[P]nanoprintf/tests/doctest.h
|
float Eigen::internal::redux_impl<Eigen::internal::scalar_sum_op<float, float>, Eigen::internal::redux_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs2_op<float>, Eigen::Map<Eigen::Matrix<float, 1, -1, 1, 1, -1>, 0, Eigen::Stride<0, 0>> const>>, 3, 0>::run<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs2_op<float>, Eigen::Map<Eigen::Matrix<float, 1, -1, 1, 1, -1>, 0, Eigen::Stride<0, 0>> const>>(Eigen::internal::redux_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs2_op<float>, Eigen::Map<Eigen::Matrix<float, 1, -1, 1, 1, -1>, 0, Eigen::Stride<0, 0>> const>> const&, Eigen::internal::scalar_sum_op<float, float> const&, Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs2_op<float>, Eigen::Map<Eigen::Matrix<float, 1, -1, 1, 1, -1>, 0, Eigen::Stride<0, 0>> const> const&)
|
explicit variable_if_dynamic(T value = 0) EIGEN_NO_THROW : m_value(value) {}
|
movq 0x10(%rdx), %rax
leaq 0x7(%rax), %rsi
leaq 0x3(%rax), %r8
testq %rax, %rax
cmovnsq %rax, %rsi
movq %rax, %rdx
cmovsq %r8, %rdx
movq 0x8(%rdi), %rcx
cmpq $0x7, %r8
jae 0x49e2f
movss (%rcx), %xmm0
mulss %xmm0, %xmm0
cmpq $0x2, %rax
jl 0x49eba
movl $0x1, %edx
movss (%rcx,%rdx,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm1, %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x49e15
jmp 0x49eba
andq $-0x4, %rdx
movups (%rcx), %xmm0
mulps %xmm0, %xmm0
cmpq $0x8, %rax
jl 0x49e8b
andq $-0x8, %rsi
movups 0x10(%rcx), %xmm1
mulps %xmm1, %xmm1
cmpq $0x10, %rax
jb 0x49e73
movl $0x8, %edi
movups (%rcx,%rdi,4), %xmm2
movups 0x10(%rcx,%rdi,4), %xmm3
mulps %xmm2, %xmm2
addps %xmm2, %xmm0
mulps %xmm3, %xmm3
addps %xmm3, %xmm1
addq $0x8, %rdi
cmpq %rsi, %rdi
jl 0x49e55
movaps %xmm0, %xmm2
movaps %xmm1, %xmm0
addps %xmm2, %xmm0
cmpq %rsi, %rdx
jle 0x49e8b
movups (%rcx,%rsi,4), %xmm1
mulps %xmm1, %xmm1
addps %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
addps %xmm0, %xmm1
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0 # xmm0 = xmm0[1,1],xmm1[1,1]
addss %xmm1, %xmm0
cmpq %rax, %rdx
jge 0x49eba
movss (%rcx,%rdx,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm1, %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x49ea5
retq
nop
|
/ebu[P]libear/submodules/eigen/Eigen/src/Core/util/XprHelper.h
|
ear::get_polar_extent_core()
|
std::unique_ptr<PolarExtentCore> get_polar_extent_core() {
auto dispatcher = xsimd::dispatch<arch_list>(GetPolarExtentCore{});
return dispatcher();
}
|
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc6cf5(%rip), %rax # 0x110bc0
movb (%rax), %al
testb %al, %al
je 0x49f11
leaq 0xc6ce0(%rip), %rax # 0x110bb8
movq (%rax), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movl %ecx, 0x8(%rsp)
shrq $0x26, %rax
cmpl $0x1db, %eax # imm = 0x1DB
jae 0x49f00
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4a2da
jmp 0x49f08
movq %rbx, %rdi
callq 0x4b544
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
callq 0x14d64
jmp 0x49ed1
movq %rax, %rdi
callq 0x36754
|
/ebu[P]libear/src/object_based/polar_extent_simd.cpp
|
xsimd::detail::supported_arch::supported_arch()
|
inline supported_arch() noexcept
{
memset(this, 0, sizeof(supported_arch));
#if defined(__aarch64__) || defined(_M_ARM64)
neon = 1;
neon64 = 1;
best = neon64::version();
#elif defined(__ARM_NEON) || defined(_M_ARM)
#if defined(__linux__) && (!defined(__ANDROID_API__) || __ANDROID_API__ >= 18)
neon = bool(getauxval(AT_HWCAP) & HWCAP_NEON);
#else
// that's very conservative :-/
neon = 0;
#endif
neon64 = 0;
best = neon::version() * neon;
#elif defined(__ARM_FEATURE_SVE) && defined(__ARM_FEATURE_SVE_BITS) && __ARM_FEATURE_SVE_BITS > 0
#if defined(__linux__) && (!defined(__ANDROID_API__) || __ANDROID_API__ >= 18)
sve = bool(getauxval(AT_HWCAP) & HWCAP_SVE);
#else
sve = 0;
#endif
best = sve::version() * sve;
#elif defined(__riscv_vector) && defined(__riscv_v_fixed_vlen) && __riscv_v_fixed_vlen > 0
#if defined(__linux__) && (!defined(__ANDROID_API__) || __ANDROID_API__ >= 18)
#ifndef HWCAP_V
#define HWCAP_V (1 << ('V' - 'A'))
#endif
rvv = bool(getauxval(AT_HWCAP) & HWCAP_V);
#else
rvv = 0;
#endif
best = ::xsimd::rvv::version() * rvv;
#elif defined(__x86_64__) || defined(__i386__) || defined(_M_AMD64) || defined(_M_IX86)
auto get_cpuid = [](int reg[4], int level, int count = 0) noexcept
{
#if defined(_MSC_VER)
__cpuidex(reg, level, count);
#elif defined(__INTEL_COMPILER)
__cpuid(reg, level);
#elif defined(__GNUC__) || defined(__clang__)
#if defined(__i386__) && defined(__PIC__)
// %ebx may be the PIC register
__asm__("xchg{l}\t{%%}ebx, %1\n\t"
"cpuid\n\t"
"xchg{l}\t{%%}ebx, %1\n\t"
: "=a"(reg[0]), "=r"(reg[1]), "=c"(reg[2]),
"=d"(reg[3])
: "0"(level), "2"(count));
#else
__asm__("cpuid\n\t"
: "=a"(reg[0]), "=b"(reg[1]), "=c"(reg[2]),
"=d"(reg[3])
: "0"(level), "2"(count));
#endif
#else
#error "Unsupported configuration"
#endif
};
int regs1[4];
get_cpuid(regs1, 0x1);
sse2 = regs1[3] >> 26 & 1;
best = std::max(best, sse2::version() * sse2);
sse3 = regs1[2] >> 0 & 1;
best = std::max(best, sse3::version() * sse3);
ssse3 = regs1[2] >> 9 & 1;
best = std::max(best, ssse3::version() * ssse3);
sse4_1 = regs1[2] >> 19 & 1;
best = std::max(best, sse4_1::version() * sse4_1);
sse4_2 = regs1[2] >> 20 & 1;
best = std::max(best, sse4_2::version() * sse4_2);
fma3_sse = regs1[2] >> 12 & 1;
if (sse4_2)
best = std::max(best, fma3<xsimd::sse4_2>::version() * fma3_sse);
avx = regs1[2] >> 28 & 1;
best = std::max(best, avx::version() * avx);
fma3_avx = avx && fma3_sse;
best = std::max(best, fma3<xsimd::avx>::version() * fma3_avx);
int regs8[4];
get_cpuid(regs8, 0x80000001);
fma4 = regs8[2] >> 16 & 1;
best = std::max(best, fma4::version() * fma4);
// sse4a = regs[2] >> 6 & 1;
// best = std::max(best, XSIMD_X86_AMD_SSE4A_VERSION * sse4a);
// xop = regs[2] >> 11 & 1;
// best = std::max(best, XSIMD_X86_AMD_XOP_VERSION * xop);
int regs7[4];
get_cpuid(regs7, 0x7);
avx2 = regs7[1] >> 5 & 1;
best = std::max(best, avx2::version() * avx2);
int regs7a[4];
get_cpuid(regs7a, 0x7, 0x1);
avxvnni = regs7a[0] >> 4 & 1;
best = std::max(best, avxvnni::version() * avxvnni * avx2);
fma3_avx2 = avx2 && fma3_sse;
best = std::max(best, fma3<xsimd::avx2>::version() * fma3_avx2);
avx512f = regs7[1] >> 16 & 1;
best = std::max(best, avx512f::version() * avx512f);
avx512cd = regs7[1] >> 28 & 1;
best = std::max(best, avx512cd::version() * avx512cd * avx512f);
avx512dq = regs7[1] >> 17 & 1;
best = std::max(best, avx512dq::version() * avx512dq * avx512cd * avx512f);
avx512bw = regs7[1] >> 30 & 1;
best = std::max(best, avx512bw::version() * avx512bw * avx512dq * avx512cd * avx512f);
avx512er = regs7[1] >> 27 & 1;
best = std::max(best, avx512er::version() * avx512er * avx512cd * avx512f);
avx512pf = regs7[1] >> 26 & 1;
best = std::max(best, avx512pf::version() * avx512pf * avx512er * avx512cd * avx512f);
avx512ifma = regs7[1] >> 21 & 1;
best = std::max(best, avx512ifma::version() * avx512ifma * avx512bw * avx512dq * avx512cd * avx512f);
avx512vbmi = regs7[2] >> 1 & 1;
best = std::max(best, avx512vbmi::version() * avx512vbmi * avx512ifma * avx512bw * avx512dq * avx512cd * avx512f);
avx512vnni_bw = regs7[2] >> 11 & 1;
best = std::max(best, avx512vnni<xsimd::avx512bw>::version() * avx512vnni_bw * avx512bw * avx512dq * avx512cd * avx512f);
avx512vnni_vbmi = avx512vbmi && avx512vnni_bw;
best = std::max(best, avx512vnni<xsimd::avx512vbmi>::version() * avx512vnni_vbmi);
#endif
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %ebp, %ebp
xorl %ecx, %ecx
movl $0x1, %eax
cpuid
movl %edx, %eax
shrl $0x1a, %eax
btl $0x1a, %edx
movl $0x27d8, %esi # imm = 0x27D8
cmovael %ebp, %esi
leal (%rcx,%rcx), %edx
andl $0x2, %edx
movl %ecx, %r8d
andl $0x1, %r8d
negl %r8d
andl $0x283c, %r8d # imm = 0x283C
cmpl %r8d, %esi
cmoval %esi, %r8d
movq %rdi, -0x8(%rsp)
movl %ecx, %esi
shrl $0x7, %esi
andl $0x4, %esi
movl %ecx, %edi
shll $0x16, %edi
sarl $0x1f, %edi
andl $0x283d, %edi # imm = 0x283D
cmpl %edi, %r8d
cmoval %r8d, %edi
movl %ecx, %r11d
shrl $0x10, %r11d
movl %r11d, %r9d
andl $0x8, %r9d
movl %ecx, %r10d
shll $0xc, %r10d
sarl $0x1f, %r10d
andl $0x28a1, %r10d # imm = 0x28A1
cmpl %r10d, %edi
cmoval %edi, %r10d
movl %ecx, %r8d
shll $0xb, %r8d
sarl $0x1f, %r8d
andl $0x28a2, %r8d # imm = 0x28A2
cmpl %r8d, %r10d
cmoval %r10d, %r8d
movl %ecx, %edi
shrl $0x6, %edi
andl $0x40, %edi
andl $0x10, %r11d
je 0x49fe7
testl %edi, %edi
movl $0x28a3, %r10d # imm = 0x28A3
cmovel %edi, %r10d
cmpl %r10d, %r8d
cmovbel %r10d, %r8d
andl $0x1, %eax
orl %edx, %eax
orl %r9d, %esi
orl %eax, %esi
orl %edi, %r11d
orl %esi, %r11d
movl %ecx, %eax
shrl $0x13, %eax
andl $0x200, %eax # imm = 0x200
movl %eax, -0x10(%rsp)
movl %ecx, %eax
shrl $0x12, %eax
shll $0x3, %ecx
sarl $0x1f, %ecx
andl $0x4e84, %ecx # imm = 0x4E84
cmpl %ecx, %r8d
cmoval %r8d, %ecx
movl %r11d, %esi
shll $0x4, %esi
andl %eax, %esi
movl %esi, %eax
andl $0x400, %eax # imm = 0x400
movl %eax, -0x14(%rsp)
shll $0x15, %esi
sarl $0x1f, %esi
andl $0x4e85, %esi # imm = 0x4E85
cmpl %esi, %ecx
cmoval %ecx, %esi
movl $0x80000001, %eax # imm = 0x80000001
xorl %ecx, %ecx
cpuid
movl %ecx, %r9d
movl %ecx, %edi
shrl $0x9, %edi
andl $0x80, %edi
shll $0xf, %r9d
sarl $0x1f, %r9d
andl $0x28a4, %r9d # imm = 0x28A4
cmpl %r9d, %esi
cmoval %esi, %r9d
xorl %ecx, %ecx
movl $0x7, %eax
cpuid
movl %ecx, -0xc(%rsp)
movl %ebx, %r8d
movl %ebx, %r13d
shll $0x8, %r13d
movl %ebx, %r12d
andl $0x20, %r12d
shll $0x6, %r12d
movl %ebx, %r10d
shll $0x1a, %r10d
sarl $0x1f, %r10d
andl $0x4ee8, %r10d # imm = 0x4EE8
cmpl %r10d, %r9d
cmoval %r9d, %r10d
movl $0x7, %eax
movl $0x1, %ecx
cpuid
andl $0x10, %eax
shll $0x8, %eax
leal (%rax,%r12), %ecx
cmpl $0x1800, %ecx # imm = 0x1800
movl $0x4f4c, %ecx # imm = 0x4F4C
cmovnel %ebp, %ecx
cmpl %ecx, %r10d
cmoval %r10d, %ecx
movl %r11d, %r9d
shll $0x7, %r9d
andl %r13d, %r9d
movl %r9d, %esi
andl $0x2000, %esi # imm = 0x2000
shll $0x12, %r9d
sarl $0x1f, %r9d
andl $0x4ee9, %r9d # imm = 0x4EE9
cmpl %r9d, %ecx
cmoval %ecx, %r9d
movl %r8d, %ecx
shrl $0x2, %ecx
andl $0x4000, %ecx # imm = 0x4000
movl %r8d, %ebx
shll $0xf, %ebx
sarl $0x1f, %ebx
movl %ebx, %r10d
andl $0x7594, %r10d # imm = 0x7594
cmpl %r10d, %r9d
cmoval %r9d, %r10d
movl %r8d, %r13d
shrl $0xd, %r13d
movl %r13d, %r14d
andl $0x8000, %r14d # imm = 0x8000
leal (%rcx,%r14), %r9d
cmpl $0xc000, %r9d # imm = 0xC000
movl $0x0, %edx
movl $0x75f8, %ebp # imm = 0x75F8
cmovnel %edx, %ebp
cmpl %ebp, %r10d
cmoval %r10d, %ebp
movl %r8d, %r15d
shrl %r15d
movl %r15d, %r9d
andl $0x10000, %r9d # imm = 0x10000
orl %r14d, %r9d
cmpl $0x18000, %r9d # imm = 0x18000
movl $0x765c, %r10d # imm = 0x765C
cmovnel %edx, %r10d
andl %ebx, %r10d
cmpl %r10d, %ebp
cmoval %ebp, %r10d
andl $0x20000, %r13d # imm = 0x20000
orl %r11d, %r13d
addl -0x10(%rsp), %r13d
addl -0x14(%rsp), %r13d
orl %edi, %r13d
orl %r12d, %r13d
orl %eax, %r13d
orl %esi, %ecx
orl %r9d, %ecx
orl %r13d, %ecx
movl %ecx, %eax
notl %eax
testl $0x3c000, %eax # imm = 0x3C000
movl $0x76c0, %eax # imm = 0x76C0
cmovnel %edx, %eax
cmpl %eax, %r10d
cmoval %r10d, %eax
movl %r8d, %edi
shrl $0x9, %edi
andl $0x40000, %edi # imm = 0x40000
andl $0xfffbffff, %ecx # imm = 0xFFFBFFFF
orl %edi, %ecx
movl %ecx, %edi
notl %edi
testl $0x48000, %edi # imm = 0x48000
movl $0x765d, %edi # imm = 0x765D
cmovnel %edx, %edi
andl %ebx, %edi
cmpl %edi, %eax
cmoval %eax, %edi
shrl $0x7, %r8d
andl $0x80000, %r8d # imm = 0x80000
andl $0xfff7ffff, %ecx # imm = 0xFFF7FFFF
orl %r8d, %ecx
movl %ecx, %eax
notl %eax
testl $0xcc000, %eax # imm = 0xCC000
movl $0x76c1, %eax # imm = 0x76C1
movl $0x0, %r8d
cmovel %eax, %r8d
cmpl %r8d, %edi
cmoval %edi, %r8d
andl $0x100000, %r15d # imm = 0x100000
andl $0xffefffff, %ecx # imm = 0xFFEFFFFF
orl %r15d, %ecx
movl %ecx, %edi
notl %edi
testl $0x138000, %edi # imm = 0x138000
movl $0x7724, %edi # imm = 0x7724
cmovnel %edx, %edi
andl %ebx, %edi
cmpl %edi, %r8d
cmoval %r8d, %edi
movl -0xc(%rsp), %esi
movl %esi, %r9d
shll $0x16, %r9d
movl %esi, %r10d
shll $0xb, %r10d
andl $0x400000, %r10d # imm = 0x400000
leal (%r10,%r10), %r8d
andl %r9d, %r8d
andl $0x2, %esi
shll $0x14, %esi
andl $0xffdfffff, %ecx # imm = 0xFFDFFFFF
orl %esi, %ecx
movl %ecx, %esi
notl %esi
testl $0x33c000, %esi # imm = 0x33C000
movl $0x7788, %esi # imm = 0x7788
cmovnel %edx, %esi
cmpl %esi, %edi
cmoval %edi, %esi
andl $0xffbfffff, %ecx # imm = 0xFFBFFFFF
orl %r10d, %ecx
movl %ecx, %edi
notl %edi
testl $0x438000, %edi # imm = 0x438000
cmovel %eax, %edx
andl %ebx, %edx
cmpl %edx, %esi
cmoval %esi, %edx
andl $0xff7fffff, %ecx # imm = 0xFF7FFFFF
orl %r8d, %ecx
movq -0x8(%rsp), %rsi
movl %ecx, (%rsi)
testl %r8d, %r8d
movl $0x7789, %eax # imm = 0x7789
cmovel %r8d, %eax
cmpl %eax, %edx
cmoval %edx, %eax
movl %eax, 0x4(%rsi)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/ebu[P]libear/submodules/xsimd/include/xsimd/memory/../config/./xsimd_cpuid.hpp
|
ear::GainCalculatorObjectsImpl::GainCalculatorObjectsImpl(ear::Layout const&)
|
GainCalculatorObjectsImpl::GainCalculatorObjectsImpl(const Layout& layout)
: _layout(layout),
_pointSourcePanner(configurePolarPanner(_layout.withoutLfe())),
_polarExtentPanner(_pointSourcePanner),
_isLfe(copy_vector<decltype(_isLfe)>(layout.isLfe())),
_pvTmp(_pointSourcePanner->numberOfOutputChannels()){}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq (%rsi), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
callq 0x36894
leaq 0x20(%rbx), %r14
leaq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0x36f84
movb $0x0, 0x38(%rbx)
cmpb $0x1, 0x38(%r15)
jne 0x4a399
leaq 0x40(%r15), %rsi
leaq 0x40(%rbx), %rdi
callq 0x3715a
movb $0x1, 0x38(%rbx)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x4513e
leaq 0x70(%rbx), %r12
movq %rsp, %rsi
movq %r12, %rdi
callq 0x54792
cmpb $0x1, 0x38(%rsp)
jne 0x4a3cc
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x36866
movb $0x0, -0x8(%r14)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x36ef6
movq -0x20(%r14), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4a3f4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x145f0
leaq 0x80(%rbx), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x46f64
movq %rsp, %rdi
movq %r15, %rsi
callq 0x4537c
leaq 0x150(%rbx), %r13
movq %rsp, %rsi
movq %r13, %rdi
callq 0x4a9f7
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4a439
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x145f0
movq (%r12), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x160(%rbx)
testl %eax, %eax
js 0x4a478
leaq 0x160(%rbx), %r12
movl %eax, %edx
movl $0x1, %ecx
movq %r12, %rdi
movq %rdx, %rsi
callq 0x4476c
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x691fe(%rip), %rdi # 0xb367d
leaq 0x66899(%rip), %rsi # 0xb0d1f
leaq 0x6a248(%rip), %rcx # 0xb46d5
movl $0x130, %edx # imm = 0x130
callq 0x143c0
movq %rax, %r15
movq %r14, %rdi
callq 0x36ef6
jmp 0x4a519
movq %rax, %r15
movq (%r12), %rdi
callq 0x14720
jmp 0x4a4b5
movq %rax, %r15
movq (%r13), %rdi
callq 0x14720
jmp 0x4a4d9
movq %rax, %r15
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x4a4d9
movq %rsp, %rdi
callq 0x14d90
jmp 0x4a4d9
movq %rax, %r15
movq %r14, %rdi
callq 0x47d4e
jmp 0x4a4e6
movq %rax, %r15
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x4a506
callq 0x39030
jmp 0x4a506
movq %rax, %r15
movq %rsp, %rdi
callq 0x369a2
jmp 0x4a506
movq %rax, %r15
movq %rbx, %rdi
callq 0x369a2
movq %r15, %rdi
callq 0x14ad0
movq %rax, %r15
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x4a50e
movq (%r12), %rsi
incq %rsi
callq 0x145f0
jmp 0x4a50e
nop
|
/ebu[P]libear/src/object_based/gain_calculator_objects.cpp
|
ear::GainCalculatorObjectsImpl::calculate(ear::ObjectsTypeMetadata const&, ear::OutputGains&, ear::OutputGains&, std::function<void (ear::Warning const&)> const&)
|
void GainCalculatorObjectsImpl::calculate(const ObjectsTypeMetadata& metadata,
OutputGains& direct,
OutputGains& diffuse,
const WarningCB&) {
if (metadata.cartesian) throw not_implemented("cartesian");
boost::apply_visitor(throw_if_not_implemented(), metadata.position);
boost::apply_visitor(throw_if_not_implemented(), metadata.objectDivergence);
if (metadata.channelLock.flag) throw not_implemented("channelLock");
if (metadata.zoneExclusion.zones.size())
throw not_implemented("zoneExclusion");
if (metadata.screenRef) throw not_implemented("screenRef");
Eigen::Vector3d position =
toCartesianVector3d(boost::get<PolarPosition>(metadata.position));
_polarExtentPanner.handle(position, metadata.width, metadata.height,
metadata.depth, _pvTmp);
_pvTmp *= metadata.gain;
Eigen::VectorXd pv_full = Eigen::VectorXd::Zero(_isLfe.size());
mask_write(pv_full, !_isLfe, _pvTmp);
// apply diffuse split
direct.write_vector(pv_full * std::sqrt(1.0 - metadata.diffuse));
diffuse.write_vector(pv_full * std::sqrt(metadata.diffuse));
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
cmpb $0x1, 0x38(%rsi)
je 0x4a7f2
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x4ad84
leaq 0x68(%r14), %rdi
leaq 0x20(%rsp), %rsi
callq 0x4ae52
cmpb $0x1, 0x50(%r14)
je 0x4a84d
movq 0x88(%r14), %rax
cmpq 0x80(%r14), %rax
jne 0x4a8a8
cmpb $0x1, 0x98(%r14)
je 0x4a900
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0x4b04a
testq %rax, %rax
je 0x4a956
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x4e07c
movq 0x10(%r13), %rax
movq %rax, 0x80(%rsp)
movups (%r13), %xmm0
movaps %xmm0, 0x70(%rsp)
movsd 0x20(%r14), %xmm0
movsd 0x28(%r14), %xmm1
movsd 0x30(%r14), %xmm2
movq 0x160(%r12), %rax
movq 0x168(%r12), %rcx
movq %rax, 0x90(%rsp)
movq %rcx, 0x98(%rsp)
testq %rax, %rax
sete %al
testq %rcx, %rcx
setns %cl
orb %al, %cl
je 0x4a96e
leaq 0x80(%r12), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x489c4
movq 0x168(%r12), %rax
testq %rax, %rax
js 0x4a7bc
leaq 0x160(%r12), %rbp
movsd 0x40(%r14), %xmm0
movq (%rbp), %rcx
movabsq $0x7ffffffffffffffe, %rdx # imm = 0x7FFFFFFFFFFFFFFE
andq %rax, %rdx
cmpq $0x2, %rax
jb 0x4a69f
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0]
xorl %esi, %esi
movapd (%rcx,%rsi,8), %xmm2
mulpd %xmm1, %xmm2
movapd %xmm2, (%rcx,%rsi,8)
addq $0x2, %rsi
cmpq %rdx, %rsi
jb 0x4a688
movq %r15, 0x40(%rsp)
cmpq %rax, %rdx
jge 0x4a6bf
movsd (%rcx,%rdx,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x4a6a9
movq 0x158(%r12), %rax
movq %rax, 0x58(%rsp)
movq $0x0, 0x68(%rsp)
testq %rax, %rax
js 0x4a7bc
movq %rbx, %r15
addq $0x150, %r12 # imm = 0x150
leaq 0x48(%rsp), %r13
leaq 0x58(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4b398
movq %r12, (%rbx)
leaq 0x58(%rsp), %rsi
movq %r13, %rdi
movq %rbp, %rdx
callq 0x4ab5d
movsd 0x648f0(%rip), %xmm0 # 0xaf008
subsd 0x48(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4a72e
sqrtsd %xmm0, %xmm0
jmp 0x4a733
callq 0x144a0
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rax
testq %rax, %rax
js 0x4a7d3
leaq 0xd0(%rsp), %rsi
movq %r13, (%rsi)
movq %rax, 0x8(%rsi)
movsd %xmm0, 0x18(%rsi)
callq 0x4acf8
movsd 0x48(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4a775
sqrtsd %xmm0, %xmm0
jmp 0x4a77a
callq 0x144a0
movq 0x50(%rsp), %rax
testq %rax, %rax
js 0x4a7d3
leaq 0xa8(%rsp), %rsi
movq %r13, (%rsi)
movq %rax, 0x8(%rsi)
movsd %xmm0, 0x18(%rsi)
movq %r15, %rdi
callq 0x4acf8
movq 0x48(%rsp), %rdi
callq 0x14720
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x67509(%rip), %rdi # 0xb1ccc
leaq 0x67597(%rip), %rsi # 0xb1d61
leaq 0x6c6f4(%rip), %rcx # 0xb6ec5
jmp 0x4a7e8
leaq 0x674f2(%rip), %rdi # 0xb1ccc
leaq 0x67580(%rip), %rsi # 0xb1d61
leaq 0x6d61c(%rip), %rcx # 0xb7e04
movl $0x4a, %edx
callq 0x143c0
movl $0x10, %edi
callq 0x14290
movq %rax, %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x65128(%rip), %rsi # 0xaf937
leaq 0x6512a(%rip), %rdx # 0xaf940
leaq 0x20(%rsp), %rdi
callq 0x37fd8
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x4aada
xorl %ebp, %ebp
leaq 0xc08f7(%rip), %rsi # 0x10b130
movq 0xc5738(%rip), %rdx # 0x10ff78
movq %r14, %rdi
callq 0x14a60
jmp 0x4a956
movl $0x10, %edi
callq 0x14290
movq %rax, %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x65151(%rip), %rsi # 0xaf9bb
leaq 0x65155(%rip), %rdx # 0xaf9c6
leaq 0x20(%rsp), %rdi
callq 0x37fd8
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x4aada
xorl %ebp, %ebp
leaq 0xc089c(%rip), %rsi # 0x10b130
movq 0xc56dd(%rip), %rdx # 0x10ff78
movq %r14, %rdi
callq 0x14a60
jmp 0x4a956
movl $0x10, %edi
callq 0x14290
movq %rax, %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6d257(%rip), %rsi # 0xb7b1c
leaq 0x6d25d(%rip), %rdx # 0xb7b29
leaq 0x20(%rsp), %rdi
callq 0x37fd8
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x4aada
xorl %ebp, %ebp
leaq 0xc0841(%rip), %rsi # 0x10b130
movq 0xc5682(%rip), %rdx # 0x10ff78
movq %r14, %rdi
callq 0x14a60
jmp 0x4a956
movl $0x10, %edi
callq 0x14290
movq %rax, %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x650af(%rip), %rsi # 0xaf9cc
leaq 0x650b1(%rip), %rdx # 0xaf9d5
leaq 0x20(%rsp), %rdi
callq 0x37fd8
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x4aada
xorl %ebp, %ebp
leaq 0xc07e9(%rip), %rsi # 0x10b130
movq 0xc562a(%rip), %rdx # 0x10ff78
movq %r14, %rdi
callq 0x14a60
leaq 0xc0eb3(%rip), %rax # 0x10b810
addq $0x10, %rax
leaq 0x58(%rsp), %rdi
movq %rax, (%rdi)
callq 0x4aff5
leaq 0x66964(%rip), %rdi # 0xb12d9
leaq 0x66a07(%rip), %rsi # 0xb1383
leaq 0x6cd3c(%rip), %rcx # 0xb76bf
movl $0xb2, %edx
callq 0x143c0
jmp 0x4a999
jmp 0x4a9ba
jmp 0x4a999
jmp 0x4a9ba
jmp 0x4a999
jmp 0x4a9ba
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x4a9b3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x145f0
testb %bpl, %bpl
jne 0x4a9bd
jmp 0x4a9e7
movq %rax, %rbx
movq %r14, %rdi
callq 0x14460
jmp 0x4a9e7
jmp 0x4a9cb
jmp 0x4a9cb
movq %rax, %rbx
movq 0x48(%rsp), %rdi
callq 0x14720
jmp 0x4a9e7
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x14b10
movq %rbx, %rdi
callq 0x14ad0
movq %rax, %rdi
callq 0x36754
|
/ebu[P]libear/src/object_based/gain_calculator_objects.cpp
|
ear::throw_if_not_implemented::operator()(ear::CartesianPosition const&) const
|
void operator()(const CartesianPosition&) const {
throw not_implemented("cartesian");
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl $0x10, %edi
callq 0x14290
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x64b52(%rip), %rsi # 0xaf937
leaq 0x64b54(%rip), %rdx # 0xaf940
leaq 0x8(%rsp), %rdi
callq 0x37fd8
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4aada
xorl %ebp, %ebp
leaq 0xc0321(%rip), %rsi # 0x10b130
movq 0xc5162(%rip), %rdx # 0x10ff78
movq %rbx, %rdi
callq 0x14a60
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ae38
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x145f0
testb %bpl, %bpl
jne 0x4ae42
jmp 0x4ae4a
movq %rax, %r14
movq %rbx, %rdi
callq 0x14460
movq %r14, %rdi
callq 0x14ad0
|
/ebu[P]libear/src/object_based/gain_calculator_objects.cpp
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.