name
string | code
string | asm
string | file
string |
|---|---|---|---|
ImStb::stb_textedit_delete_selection(ImGuiInputTextState*, ImStb::STB_TexteditState*)
|
static void stb_textedit_delete_selection(STB_TEXTEDIT_STRING *str, STB_TexteditState *state)
{
stb_textedit_clamp(str, state);
if (STB_TEXT_HAS_SELECTION(state)) {
if (state->select_start < state->select_end) {
stb_textedit_delete(str, state, state->select_start, state->select_end - state->select_start);
state->select_end = state->cursor = state->select_start;
} else {
stb_textedit_delete(str, state, state->select_end, state->select_start - state->select_end);
state->select_start = state->cursor = state->select_end;
}
state->has_preferred_x = 0;
}
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0xfd168
leaq 0x4(%rbx), %r12
movl 0x4(%rbx), %edx
movl 0x8(%rbx), %ecx
leaq 0x8(%rbx), %r15
movl %edx, %eax
subl %ecx, %eax
je 0xfd108
jge 0xfd0e8
subl %edx, %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xfd3f4
movq %r12, %rax
jmp 0xfd0fd
movq %r14, %rdi
movq %rbx, %rsi
movl %ecx, %edx
movl %eax, %ecx
callq 0xfd3f4
movq %r15, %rax
movq %r12, %r15
movl (%rax), %eax
movl %eax, (%r15)
movl %eax, (%rbx)
movb $0x0, 0xf(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/abel0b[P]shadow/external/imgui/imstb_textedit.h
|
main
|
int main(int argc, char **argv) {
char buffer[512];
short listen_port;
SOCKET listen_sock;
int rs;
struct sockaddr_in addr;
socklen_t addrlen;
struct pollfd pfd[2];
struct conn_t server;
struct conn_t client;
struct addrinfo *ai;
struct addrinfo hints;
/* initialize Winsock */
#if defined(_WIN32)
WSADATA wsd;
WSAStartup(MAKEWORD(2, 2), &wsd);
#endif
/* check usage */
if (argc != 4) {
fprintf(stderr, "Usage:\n ./telnet-proxy <remote ip> <remote port> "
"<local port>\n");
return 1;
}
/* parse listening port */
listen_port = (short)strtol(argv[3], 0, 10);
/* loop forever, until user kills process */
for (;;) {
/* create listening socket */
if ((listen_sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
fprintf(stderr, "socket() failed: %s\n", strerror(errno));
return 1;
}
/* reuse address option */
rs = 1;
setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, (char*)&rs, sizeof(rs));
/* bind to listening addr/port */
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_port = htons(listen_port);
if (bind(listen_sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
fprintf(stderr, "bind() failed: %s\n", strerror(errno));
close(listen_sock);
return 1;
}
printf("LISTENING ON PORT %d\n", listen_port);
/* wait for client */
if (listen(listen_sock, 1) == -1) {
fprintf(stderr, "listen() failed: %s\n", strerror(errno));
close(listen_sock);
return 1;
}
addrlen = sizeof(addr);
if ((client.sock = accept(listen_sock, (struct sockaddr *)&addr,
&addrlen)) == -1) {
fprintf(stderr, "accept() failed: %s\n", strerror(errno));
close(listen_sock);
return 1;
}
printf("CLIENT CONNECTION RECEIVED\n");
/* stop listening now that we have a client */
close(listen_sock);
/* look up server host */
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
if ((rs = getaddrinfo(argv[1], argv[2], &hints, &ai)) != 0) {
fprintf(stderr, "getaddrinfo() failed for %s: %s\n", argv[1],
gai_strerror(rs));
close(client.sock);
return 1;
}
/* create server socket */
if ((server.sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
fprintf(stderr, "socket() failed: %s\n", strerror(errno));
close(server.sock);
return 1;
}
/* bind server socket */
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
if (bind(server.sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
fprintf(stderr, "bind() failed: %s\n", strerror(errno));
close(server.sock);
return 1;
}
/* connect */
if (connect(server.sock, ai->ai_addr, (int)ai->ai_addrlen) == -1) {
fprintf(stderr, "server() failed: %s\n", strerror(errno));
close(server.sock);
return 1;
}
/* free address lookup info */
freeaddrinfo(ai);
printf("SERVER CONNECTION ESTABLISHED\n");
/* initialize connection structs */
server.name = COLOR_SERVER "SERVER";
server.remote = &client;
client.name = COLOR_CLIENT "CLIENT";
client.remote = &server;
/* initialize telnet boxes */
server.telnet = telnet_init(0, _event_handler, TELNET_FLAG_PROXY,
&server);
client.telnet = telnet_init(0, _event_handler, TELNET_FLAG_PROXY,
&client);
/* initialize poll descriptors */
memset(pfd, 0, sizeof(pfd));
pfd[0].fd = server.sock;
pfd[0].events = POLLIN;
pfd[1].fd = client.sock;
pfd[1].events = POLLIN;
/* loop while both connections are open */
while (poll(pfd, 2, -1) != -1) {
/* read from server */
if (pfd[0].revents & (POLLIN | POLLERR | POLLHUP)) {
if ((rs = recv(server.sock, buffer, sizeof(buffer), 0)) > 0) {
telnet_recv(server.telnet, buffer, rs);
} else if (rs == 0) {
printf("%s DISCONNECTED" COLOR_NORMAL "\n", server.name);
break;
} else {
if (errno != EINTR && errno != ECONNRESET) {
fprintf(stderr, "recv(server) failed: %s\n",
strerror(errno));
exit(1);
}
}
}
/* read from client */
if (pfd[1].revents & (POLLIN | POLLERR | POLLHUP)) {
if ((rs = recv(client.sock, buffer, sizeof(buffer), 0)) > 0) {
telnet_recv(client.telnet, buffer, rs);
} else if (rs == 0) {
printf("%s DISCONNECTED" COLOR_NORMAL "\n", client.name);
break;
} else {
if (errno != EINTR && errno != ECONNRESET) {
fprintf(stderr, "recv(server) failed: %s\n",
strerror(errno));
exit(1);
}
}
}
}
/* clean up */
telnet_free(server.telnet);
telnet_free(client.telnet);
close(server.sock);
close(client.sock);
/* all done */
printf("BOTH CONNECTIONS CLOSED\n");
}
/* not that we can reach this, but GCC will cry if it's not here */
return 0;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp # imm = 0x2C8
cmpl $0x4, %edi
jne 0x169f
movq %rsi, 0x88(%rsp)
movq 0x18(%rsi), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x1120
movswl %ax, %ecx
movl %ecx, 0x38(%rsp)
rolw $0x8, %ax
movw %ax, 0xe(%rsp)
pushq $0x2
popq %rbx
pushq $0x1
popq %r15
pushq $0x10
popq %r13
leaq 0xc0(%rsp), %r12
movl %ebx, %edi
movl %r15d, %esi
xorl %edx, %edx
callq 0x1200
cmpl $-0x1, %eax
je 0x16c0
movl %ebx, %edx
movl %eax, %ebx
movl $0x1, 0x8(%rsp)
movl %eax, %edi
movl %r15d, %esi
movl %edx, %ebp
leaq 0x8(%rsp), %rcx
pushq $0x4
popq %r8
callq 0x1090
andq $0x0, 0x18(%rsp)
movw $0x2, 0x10(%rsp)
andl $0x0, 0x14(%rsp)
movzwl 0xe(%rsp), %eax
movw %ax, 0x12(%rsp)
movl %ebx, %edi
leaq 0x10(%rsp), %rsi
movl %r13d, %edx
callq 0x1180
cmpl $-0x1, %eax
je 0x16ef
movl %r13d, %r14d
leaq 0x2ebc(%rip), %rdi # 0x428f
movl 0x38(%rsp), %esi
xorl %eax, %eax
callq 0x10c0
movl %ebx, %edi
movl %r15d, %r13d
movl %r15d, %esi
callq 0x1150
cmpl $-0x1, %eax
je 0x170e
movl $0x10, 0x3c(%rsp)
movl %ebx, %edi
leaq 0x10(%rsp), %rsi
leaq 0x3c(%rsp), %rdx
callq 0x1190
movl %eax, 0x70(%rsp)
cmpl $-0x1, %eax
je 0x172d
leaq 0x3218(%rip), %rdi # 0x4639
callq 0x1070
movl %ebx, %edi
callq 0x10f0
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movl $0x1, 0x98(%rsp)
movq 0x88(%rsp), %rbx
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
leaq 0x90(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x11d0
movl %eax, 0x8(%rsp)
testl %eax, %eax
jne 0x175e
movl %ebp, %ebx
movl %ebp, %edi
movl %r13d, %r15d
movl %r13d, %esi
xorl %edx, %edx
callq 0x1200
movl %eax, 0x48(%rsp)
cmpl $-0x1, %eax
je 0x1793
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movw $0x2, 0x10(%rsp)
movl %eax, %edi
leaq 0x10(%rsp), %rsi
movl %r14d, %r13d
movl %r14d, %edx
callq 0x1180
cmpl $-0x1, %eax
je 0x17b2
movl 0x48(%rsp), %edi
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rsi
movl 0x10(%rax), %edx
callq 0x11b0
cmpl $-0x1, %eax
je 0x17d1
movq 0x60(%rsp), %rdi
callq 0x11f0
leaq 0x315c(%rip), %rdi # 0x4654
callq 0x1070
leaq 0x2e01(%rip), %rax # 0x4305
movq %rax, 0x40(%rsp)
leaq 0x68(%rsp), %r14
movq %r14, 0x58(%rsp)
leaq 0x2df2(%rip), %rax # 0x430c
movq %rax, 0x68(%rsp)
leaq 0x40(%rsp), %rcx
movq %rcx, 0x80(%rsp)
xorl %edi, %edi
leaq 0x30f(%rip), %rbp # 0x1844
movq %rbp, %rsi
movl %r15d, %edx
callq 0x1e84
movq %rax, 0x50(%rsp)
xorl %edi, %edi
movq %rbp, %rsi
movl %r15d, %edx
movq %r14, %rcx
callq 0x1e84
movq %rax, 0x78(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x20(%rsp)
movw $0x1, %cx
movw %cx, 0x24(%rsp)
movl 0x70(%rsp), %eax
movl %eax, 0x28(%rsp)
movw %cx, 0x2c(%rsp)
leaq 0x20(%rsp), %r14
pushq $0x2
popq %rbp
movq %r14, %rdi
movq %rbp, %rsi
pushq $-0x1
popq %rdx
callq 0x1170
cmpl $-0x1, %eax
je 0x1668
testb $0x19, 0x26(%rsp)
je 0x15ef
movl 0x48(%rsp), %edi
movl $0x200, %edx # imm = 0x200
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x1040
movl %eax, 0x8(%rsp)
testl %eax, %eax
jle 0x15d8
movq 0x50(%rsp), %rdi
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq %r12, %rsi
movq %rax, %rdx
callq 0x1efe
jmp 0x15ef
je 0x164b
callq 0x1060
movl (%rax), %edi
cmpl $0x4, %edi
je 0x15ef
cmpl $0x68, %edi
jne 0x1819
testb $0x19, 0x2e(%rsp)
je 0x1588
movl 0x70(%rsp), %edi
movl $0x200, %edx # imm = 0x200
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x1040
movl %eax, 0x8(%rsp)
testl %eax, %eax
jle 0x162b
movq 0x78(%rsp), %rdi
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq %r12, %rsi
movq %rax, %rdx
callq 0x1efe
jmp 0x1588
je 0x1652
callq 0x1060
movl (%rax), %edi
cmpl $0x4, %edi
je 0x1588
cmpl $0x68, %edi
je 0x1588
jmp 0x1819
leaq 0x40(%rsp), %rax
jmp 0x1657
leaq 0x68(%rsp), %rax
movq (%rax), %rsi
leaq 0x2cb2(%rip), %rdi # 0x4313
xorl %eax, %eax
callq 0x10c0
movq 0x50(%rsp), %rdi
callq 0x1ec1
movq 0x78(%rsp), %rdi
callq 0x1ec1
movl 0x48(%rsp), %edi
callq 0x10f0
movl 0x70(%rsp), %edi
callq 0x10f0
leaq 0x2fdd(%rip), %rdi # 0x4672
callq 0x1070
jmp 0x135f
movq 0x5952(%rip), %rax # 0x6ff8
movq (%rax), %rcx
leaq 0x2b78(%rip), %rdi # 0x4228
pushq $0x3e
popq %rsi
pushq $0x1
popq %rdx
callq 0x11c0
jmp 0x1804
movq 0x5931(%rip), %rax # 0x6ff8
movq (%rax), %rbx
callq 0x1060
movl (%rax), %edi
callq 0x11e0
leaq 0x2b8a(%rip), %rsi # 0x4267
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1110
jmp 0x1804
movq 0x5902(%rip), %rax # 0x6ff8
movq (%rax), %r14
callq 0x1060
movl (%rax), %edi
callq 0x11e0
leaq 0x2b70(%rip), %rsi # 0x427c
jmp 0x174a
movq 0x58e3(%rip), %rax # 0x6ff8
movq (%rax), %r14
callq 0x1060
movl (%rax), %edi
callq 0x11e0
leaq 0x2b7a(%rip), %rsi # 0x42a5
jmp 0x174a
movq 0x58c4(%rip), %rax # 0x6ff8
movq (%rax), %r14
callq 0x1060
movl (%rax), %edi
callq 0x11e0
leaq 0x2b70(%rip), %rsi # 0x42ba
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1110
movl %ebx, %edi
jmp 0x17ff
movq 0x5893(%rip), %rcx # 0x6ff8
movq %rbx, %rdx
movq (%rcx), %rbx
movq 0x8(%rdx), %r14
movl %eax, %edi
callq 0x10e0
leaq 0x2b52(%rip), %rsi # 0x42cf
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1110
movl 0x70(%rsp), %edi
jmp 0x17ff
movq 0x585e(%rip), %rax # 0x6ff8
movq (%rax), %rbx
callq 0x1060
movl (%rax), %edi
callq 0x11e0
leaq 0x2ab7(%rip), %rsi # 0x4267
jmp 0x17ee
movq 0x583f(%rip), %rax # 0x6ff8
movq (%rax), %rbx
callq 0x1060
movl (%rax), %edi
callq 0x11e0
leaq 0x2aad(%rip), %rsi # 0x427c
jmp 0x17ee
movq 0x5820(%rip), %rax # 0x6ff8
movq (%rax), %rbx
callq 0x1060
movl (%rax), %edi
callq 0x11e0
leaq 0x2b02(%rip), %rsi # 0x42f0
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1110
movl 0x48(%rsp), %edi
callq 0x10f0
pushq $0x1
popq %rax
addq $0x2c8, %rsp # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x57d8(%rip), %rax # 0x6ff8
movq (%rax), %rbx
callq 0x11e0
leaq 0x2af5(%rip), %rsi # 0x4324
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1110
pushq $0x1
popq %rdi
callq 0x11a0
|
/seanmiddleditch[P]libtelnet/util/telnet-proxy.c
|
event_handler
|
static void _event_handler(telnet_t *telnet, telnet_event_t *ev,
void *user_data) {
struct conn_t *conn = (struct conn_t*)user_data;
(void)telnet;
switch (ev->type) {
/* data received */
case TELNET_EV_DATA:
printf("%s DATA: ", conn->name);
print_buffer(ev->data.buffer, ev->data.size);
printf(COLOR_NORMAL "\n");
telnet_send(conn->remote->telnet, ev->data.buffer, ev->data.size);
break;
/* data must be sent */
case TELNET_EV_SEND:
/* DONT SPAM
printf("%s SEND: ", conn->name);
print_buffer(ev->buffer, ev->size);
printf(COLOR_BOLD "\n");
*/
_send(conn->sock, ev->data.buffer, ev->data.size);
break;
/* IAC command */
case TELNET_EV_IAC:
printf("%s IAC %s" COLOR_NORMAL "\n", conn->name,
get_cmd(ev->iac.cmd));
telnet_iac(conn->remote->telnet, ev->iac.cmd);
break;
/* negotiation, WILL */
case TELNET_EV_WILL:
printf("%s IAC WILL %d (%s)" COLOR_NORMAL "\n", conn->name,
(int)ev->neg.telopt, get_opt(ev->neg.telopt));
telnet_negotiate(conn->remote->telnet, TELNET_WILL,
ev->neg.telopt);
break;
/* negotiation, WONT */
case TELNET_EV_WONT:
printf("%s IAC WONT %d (%s)" COLOR_NORMAL "\n", conn->name,
(int)ev->neg.telopt, get_opt(ev->neg.telopt));
telnet_negotiate(conn->remote->telnet, TELNET_WONT,
ev->neg.telopt);
break;
/* negotiation, DO */
case TELNET_EV_DO:
printf("%s IAC DO %d (%s)" COLOR_NORMAL "\n", conn->name,
(int)ev->neg.telopt, get_opt(ev->neg.telopt));
telnet_negotiate(conn->remote->telnet, TELNET_DO,
ev->neg.telopt);
break;
case TELNET_EV_DONT:
printf("%s IAC DONT %d (%s)" COLOR_NORMAL "\n", conn->name,
(int)ev->neg.telopt, get_opt(ev->neg.telopt));
telnet_negotiate(conn->remote->telnet, TELNET_DONT,
ev->neg.telopt);
break;
/* generic subnegotiation */
case TELNET_EV_SUBNEGOTIATION:
printf("%s SUB %d (%s)", conn->name, (int)ev->sub.telopt,
get_opt(ev->sub.telopt));
if (ev->sub.size > 0) {
printf(" [%ld bytes]: ", (long)ev->sub.size);
print_buffer(ev->sub.buffer, ev->sub.size);
}
printf(COLOR_NORMAL "\n");
/* forward */
telnet_subnegotiation(conn->remote->telnet, ev->sub.telopt,
ev->sub.buffer, ev->sub.size);
break;
/* ZMP command */
case TELNET_EV_ZMP:
if (ev->zmp.argc != 0) {
size_t i;
printf("%s ZMP [%ld params]", conn->name, (long)ev->zmp.argc);
for (i = 0; i != ev->zmp.argc; ++i) {
printf(" \"");
print_buffer(ev->zmp.argv[i], strlen(ev->zmp.argv[i]));
printf("\"");
}
printf(COLOR_NORMAL "\n");
}
break;
/* TERMINAL-TYPE command */
case TELNET_EV_TTYPE:
printf("%s TTYPE %s %s", conn->name, ev->ttype.cmd ? "SEND" : "IS",
ev->ttype.name ? ev->ttype.name : "");
break;
/* ENVIRON/NEW-ENVIRON commands */
case TELNET_EV_ENVIRON: {
size_t i;
printf("%s ENVIRON (%s) [%ld parts]", conn->name, ev->environ.cmd == TELNET_ENVIRON_IS ? "IS" : ev->environ.cmd == TELNET_ENVIRON_SEND ? "SEND" : "INFO", (long)ev->environ.size);
for (i = 0; i != ev->environ.size; ++i) {
printf(" %s \"", ev->environ.values[i].type == TELNET_ENVIRON_VAR ? "VAR" : "USERVAR");
if (ev->environ.values[i].var != 0) {
print_buffer(ev->environ.values[i].var, strlen(ev->environ.values[i].var));
}
if (ev->environ.cmd != TELNET_ENVIRON_SEND) {
printf("\"=\"");
if (ev->environ.values[i].value != 0) {
print_buffer(ev->environ.values[i].value, strlen(ev->environ.values[i].value));
}
printf("\"");
}
}
printf(COLOR_NORMAL "\n");
break;
}
case TELNET_EV_MSSP: {
size_t i;
printf("%s MSSP [%ld parts]", conn->name, (long)ev->mssp.size);
for (i = 0; i != ev->mssp.size; ++i) {
printf(" \"");
print_buffer(ev->mssp.values[i].var, strlen(ev->mssp.values[i].var));
printf("\"=\"");
print_buffer(ev->mssp.values[i].value, strlen(ev->mssp.values[i].value));
printf("\"");
}
printf(COLOR_NORMAL "\n");
break;
}
/* compression notification */
case TELNET_EV_COMPRESS:
printf("%s COMPRESSION %s" COLOR_NORMAL "\n", conn->name,
ev->compress.state ? "ON" : "OFF");
break;
/* warning */
case TELNET_EV_WARNING:
printf("%s WARNING: %s in %s,%d: %s" COLOR_NORMAL "\n", conn->name,
ev->error.func, ev->error.file, ev->error.line, ev->error.msg);
break;
/* error */
case TELNET_EV_ERROR:
printf("%s ERROR: %s in %s,%d: %s" COLOR_NORMAL "\n", conn->name,
ev->error.func, ev->error.file, ev->error.line, ev->error.msg);
exit(1);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rsi), %eax
cmpq $0xe, %rax
ja 0x1d7f
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x27b8(%rip), %rcx # 0x4020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r14), %rsi
leaq 0x2ac2(%rip), %rdi # 0x433d
xorl %eax, %eax
callq 0x10c0
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x1dfa
pushq $0xa
popq %rdi
callq 0x1050
movq 0x18(%r14), %rax
movq 0x10(%rax), %rdi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x297f
movq (%r14), %rsi
movb 0x18(%rbx), %al
cmpb $0x1, %al
leaq 0x2b1c(%rip), %rcx # 0x43e5
leaq 0x2b39(%rip), %rdi # 0x4409
cmoveq %rcx, %rdi
testb %al, %al
leaq 0x2b0d(%rip), %rdx # 0x43ea
cmovneq %rdi, %rdx
movq 0x10(%rbx), %rcx
leaq 0x2b01(%rip), %rdi # 0x43ed
xorl %eax, %eax
callq 0x10c0
leaq 0x2b1a(%rip), %r15 # 0x4414
leaq 0x2b0d(%rip), %r14 # 0x440e
xorl %ebp, %ebp
xorl %r13d, %r13d
cmpq 0x10(%rbx), %r13
je 0x1ac5
movq 0x8(%rbx), %rax
cmpb $0x0, (%rax,%rbp)
movq %r15, %rsi
leaq 0x2af6(%rip), %rax # 0x4418
cmoveq %rax, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10c0
movq 0x8(%rbx), %rax
movq 0x8(%rax,%rbp), %r12
testq %r12, %r12
je 0x1951
movq %r12, %rdi
callq 0x10a0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1dfa
cmpb $0x1, 0x18(%rbx)
je 0x198e
leaq 0x2abe(%rip), %rdi # 0x441c
xorl %eax, %eax
callq 0x10c0
movq 0x8(%rbx), %rax
movq 0x10(%rax,%rbp), %r12
testq %r12, %r12
je 0x1986
movq %r12, %rdi
callq 0x10a0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1dfa
pushq $0x22
popq %rdi
callq 0x1050
incq %r13
addq $0x18, %rbp
jmp 0x1906
movq (%r14), %r15
movzbl 0x4(%rbx), %ebp
movl %ebp, %edi
callq 0x1e5d
leaq 0x29b8(%rip), %rdi # 0x4367
movq %r15, %rsi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x10c0
movq 0x18(%r14), %rax
movq 0x10(%rax), %rdi
movzbl 0x4(%rbx), %edx
movl $0xfc, %esi
jmp 0x1c91
movq (%r14), %rsi
movq 0x10(%rbx), %rdx
leaq 0x2a3e(%rip), %rdi # 0x4420
xorl %eax, %eax
callq 0x10c0
leaq 0x2a2c(%rip), %r15 # 0x441c
pushq $0x22
popq %rbp
xorl %r13d, %r13d
xorl %r14d, %r14d
cmpq 0x10(%rbx), %r14
je 0x1ac5
leaq 0x2a07(%rip), %rdi # 0x4411
xorl %eax, %eax
callq 0x10c0
movq 0x8(%rbx), %rax
movq 0x8(%rax,%r13), %r12
movq %r12, %rdi
callq 0x10a0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1dfa
movq %r15, %rdi
xorl %eax, %eax
callq 0x10c0
movq 0x8(%rbx), %rax
movq 0x10(%rax,%r13), %r12
movq %r12, %rdi
callq 0x10a0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1dfa
movl %ebp, %edi
callq 0x1050
incq %r14
addq $0x18, %r13
jmp 0x19f9
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x1d7f
movq (%r14), %rsi
leaq 0x2948(%rip), %rdi # 0x43c2
xorl %eax, %eax
callq 0x10c0
leaq 0x2989(%rip), %r14 # 0x4411
pushq $0x22
popq %rbp
xorl %r12d, %r12d
cmpq 0x10(%rbx), %r12
je 0x1ac5
movq %r14, %rdi
xorl %eax, %eax
callq 0x10c0
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %r15
movq %r15, %rdi
callq 0x10a0
movq %r15, %rdi
movq %rax, %rsi
callq 0x1dfa
movl %ebp, %edi
callq 0x1050
incq %r12
jmp 0x1a8e
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1050
movq (%r14), %r15
movzbl 0x4(%rbx), %ecx
cmpl $0xeb, %ecx
jbe 0x1d20
movsbq %cl, %rax
leaq 0x2563(%rip), %rcx # 0x405c
movslq 0x50(%rcx,%rax,4), %r12
addq %rcx, %r12
jmp 0x1d3b
movq (%r14), %r15
movzbl 0x4(%rbx), %ebp
movl %ebp, %edi
callq 0x1e5d
leaq 0x2837(%rip), %rdi # 0x4352
movq %r15, %rsi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x10c0
movq 0x18(%r14), %rax
movq 0x10(%rax), %rdi
movzbl 0x4(%rbx), %edx
movl $0xfb, %esi
jmp 0x1c91
movq (%r14), %r15
movzbl 0x18(%rbx), %ebp
movl %ebp, %edi
callq 0x1e5d
leaq 0x284f(%rip), %rdi # 0x43a4
movq %r15, %rsi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x10c0
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x1b88
leaq 0x283f(%rip), %rdi # 0x43b3
xorl %eax, %eax
callq 0x10c0
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x1dfa
pushq $0xa
popq %rdi
callq 0x1050
movq 0x18(%r14), %rax
movq 0x10(%rax), %rdi
movzbl 0x18(%rbx), %esi
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b0f
movl 0x8(%r14), %ebp
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
je 0x1d7f
movslq %ebx, %rdx
movl %ebp, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x10b0
cmpl $-0x1, %eax
je 0x1d6e
testl %eax, %eax
je 0x1d8e
cltq
addq %rax, %r14
subq %rax, %rbx
jmp 0x1bc3
movq (%r14), %r15
movzbl 0x4(%rbx), %ebp
movl %ebp, %edi
callq 0x1e5d
leaq 0x2771(%rip), %rdi # 0x437c
movq %r15, %rsi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x10c0
movq 0x18(%r14), %rax
movq 0x10(%rax), %rdi
movzbl 0x4(%rbx), %edx
movl $0xfd, %esi
jmp 0x1c91
movq (%r14), %rsi
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rdx
movl 0x20(%rbx), %r8d
movq 0x18(%rbx), %r9
leaq 0x2804(%rip), %rdi # 0x444b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
movq (%r14), %r15
movzbl 0x4(%rbx), %ebp
movl %ebp, %edi
callq 0x1e5d
leaq 0x271e(%rip), %rdi # 0x438f
movq %r15, %rsi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x10c0
movq 0x18(%r14), %rax
movq 0x10(%rax), %rdi
movzbl 0x4(%rbx), %edx
movl $0xfe, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26bf
cmpb $0x0, 0x4(%rbx)
leaq 0x273b(%rip), %rax # 0x43ea
leaq 0x272f(%rip), %rdx # 0x43e5
cmoveq %rax, %rdx
movq (%r14), %rsi
movq 0x8(%rbx), %rax
testq %rax, %rax
leaq 0x269b(%rip), %rcx # 0x4366
cmovneq %rax, %rcx
leaq 0x2700(%rip), %rdi # 0x43d6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
movq (%r14), %rsi
cmpb $0x0, 0x4(%rbx)
leaq 0x274e(%rip), %rax # 0x4447
leaq 0x28f8(%rip), %rdx # 0x45f8
cmoveq %rax, %rdx
leaq 0x2729(%rip), %rdi # 0x4434
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
leaq 0x53f2(%rip), %r12 # 0x7119
leaq 0x2ad2(%rip), %rdx # 0x4800
pushq $0x4
popq %rsi
movq %r12, %rdi
xorl %eax, %eax
callq 0x10d0
leaq 0x2605(%rip), %rdi # 0x4347
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10c0
movq 0x18(%r14), %rax
movq 0x10(%rax), %rdi
movzbl 0x4(%rbx), %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2682
callq 0x1060
movl (%rax), %edi
cmpl $0x4, %edi
je 0x1d7f
cmpl $0x68, %edi
jne 0x1dd5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5263(%rip), %rax # 0x6ff8
movq (%rax), %rcx
leaq 0x2707(%rip), %rdi # 0x44a6
pushq $0x1f
popq %rsi
pushq $0x1
popq %rdx
callq 0x11c0
pushq $0x1
popq %rdi
callq 0x11a0
movq (%r14), %rsi
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rdx
movl 0x20(%rbx), %r8d
movq 0x18(%rbx), %r9
leaq 0x269c(%rip), %rdi # 0x4468
xorl %eax, %eax
callq 0x10c0
jmp 0x1daa
movq 0x521c(%rip), %rax # 0x6ff8
movq (%rax), %rbx
callq 0x11e0
leaq 0x26a8(%rip), %rsi # 0x4493
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1110
jmp 0x1daa
|
/seanmiddleditch[P]libtelnet/util/telnet-proxy.c
|
telnet_init
|
telnet_t *telnet_init(const telnet_telopt_t *telopts,
telnet_event_handler_t eh, unsigned char flags, void *user_data) {
/* allocate structure */
struct telnet_t *telnet = (telnet_t*)calloc(1, sizeof(telnet_t));
if (telnet == 0)
return 0;
/* initialize data */
telnet->ud = user_data;
telnet->telopts = telopts;
telnet->eh = eh;
telnet->flags = flags;
return telnet;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
pushq $0x1
popq %rdi
pushq $0x48
popq %rsi
callq 0x1100
testq %rax, %rax
je 0x1eb5
movq %r15, (%rax)
movq %r12, 0x8(%rax)
movq %r14, 0x10(%rax)
movb %bl, 0x3c(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/seanmiddleditch[P]libtelnet/libtelnet.c
|
telnet_free
|
void telnet_free(telnet_t *telnet) {
/* free sub-request buffer */
if (telnet->buffer != 0) {
free(telnet->buffer);
telnet->buffer = 0;
telnet->buffer_size = 0;
telnet->buffer_pos = 0;
}
#if defined(HAVE_ZLIB)
/* free zlib box */
if (telnet->z != 0) {
if (telnet->flags & TELNET_PFLAG_DEFLATE)
deflateEnd(telnet->z);
else
inflateEnd(telnet->z);
free(telnet->z);
telnet->z = 0;
}
#endif /* defined(HAVE_ZLIB) */
/* free RFC1143 queue */
if (telnet->q) {
free(telnet->q);
telnet->q = NULL;
telnet->q_size = 0;
telnet->q_cnt = 0;
}
/* free the telnet structure itself */
free(telnet);
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x1ee6
leaq 0x20(%rbx), %r14
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movq 0x18(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
|
/seanmiddleditch[P]libtelnet/libtelnet.c
|
telnet_recv
|
void telnet_recv(telnet_t *telnet, const char *buffer,
size_t size) {
#if defined(HAVE_ZLIB)
/* if we have an inflate (decompression) zlib stream, use it */
if (telnet->z != 0 && !(telnet->flags & TELNET_PFLAG_DEFLATE)) {
char inflate_buffer[1024];
int rs;
/* initialize zlib state */
telnet->z->next_in = (unsigned char*)buffer;
telnet->z->avail_in = (unsigned int)size;
telnet->z->next_out = (unsigned char *)inflate_buffer;
telnet->z->avail_out = sizeof(inflate_buffer);
/* inflate until buffer exhausted and all output is produced */
while (telnet->z->avail_in > 0 || telnet->z->avail_out == 0) {
/* reset output buffer */
/* decompress */
rs = inflate(telnet->z, Z_SYNC_FLUSH);
/* process the decompressed bytes on success */
if (rs == Z_OK || rs == Z_STREAM_END)
_process(telnet, inflate_buffer, sizeof(inflate_buffer) -
telnet->z->avail_out);
else
_error(telnet, __LINE__, __func__, TELNET_ECOMPRESS, 1,
"inflate() failed: %s", zError(rs));
/* prepare output buffer for next run */
telnet->z->next_out = (unsigned char *)inflate_buffer;
telnet->z->avail_out = sizeof(inflate_buffer);
/* on error (or on end of stream) disable further inflation */
if (rs != Z_OK) {
telnet_event_t ev;
/* disable compression */
inflateEnd(telnet->z);
free(telnet->z);
telnet->z = 0;
/* send event */
ev.type = TELNET_EV_COMPRESS;
ev.compress.state = 0;
telnet->eh(telnet, &ev, telnet->ud);
break;
}
}
/* COMPRESS2 is not negotiated, just process */
} else
#endif /* defined(HAVE_ZLIB) */
_process(telnet, buffer, size);
}
|
jmp 0x1f00
|
/seanmiddleditch[P]libtelnet/libtelnet.c
|
process
|
static void _process(telnet_t *telnet, const char *buffer, size_t size) {
telnet_event_t ev;
unsigned char byte;
size_t i, start;
for (i = start = 0; i != size; ++i) {
byte = buffer[i];
switch (telnet->state) {
/* regular data */
case TELNET_STATE_DATA:
/* on an IAC byte, pass through all pending bytes and
* switch states */
if (byte == TELNET_IAC) {
if (i != start) {
ev.type = TELNET_EV_DATA;
ev.data.buffer = buffer + start;
ev.data.size = i - start;
telnet->eh(telnet, &ev, telnet->ud);
}
telnet->state = TELNET_STATE_IAC;
} else if (byte == '\r' &&
(telnet->flags & TELNET_FLAG_NVT_EOL) &&
!(telnet->flags & TELNET_FLAG_RECEIVE_BINARY)) {
if (i != start) {
ev.type = TELNET_EV_DATA;
ev.data.buffer = buffer + start;
ev.data.size = i - start;
telnet->eh(telnet, &ev, telnet->ud);
}
telnet->state = TELNET_STATE_EOL;
}
break;
/* NVT EOL to be translated */
case TELNET_STATE_EOL:
if (byte != '\n') {
byte = '\r';
ev.type = TELNET_EV_DATA;
ev.data.buffer = (char*)&byte;
ev.data.size = 1;
telnet->eh(telnet, &ev, telnet->ud);
byte = buffer[i];
}
/* any byte following '\r' other than '\n' or '\0' is invalid,
* so pass both \r and the byte */
start = i;
if (byte == '\0')
++start;
/* state update */
telnet->state = TELNET_STATE_DATA;
break;
/* IAC command */
case TELNET_STATE_IAC:
switch (byte) {
/* subnegotiation */
case TELNET_SB:
telnet->state = TELNET_STATE_SB;
break;
/* negotiation commands */
case TELNET_WILL:
telnet->state = TELNET_STATE_WILL;
break;
case TELNET_WONT:
telnet->state = TELNET_STATE_WONT;
break;
case TELNET_DO:
telnet->state = TELNET_STATE_DO;
break;
case TELNET_DONT:
telnet->state = TELNET_STATE_DONT;
break;
/* IAC escaping */
case TELNET_IAC:
/* event */
ev.type = TELNET_EV_DATA;
ev.data.buffer = (char*)&byte;
ev.data.size = 1;
telnet->eh(telnet, &ev, telnet->ud);
/* state update */
start = i + 1;
telnet->state = TELNET_STATE_DATA;
break;
/* some other command */
default:
/* event */
ev.type = TELNET_EV_IAC;
ev.iac.cmd = byte;
telnet->eh(telnet, &ev, telnet->ud);
/* state update */
start = i + 1;
telnet->state = TELNET_STATE_DATA;
}
break;
/* negotiation commands */
case TELNET_STATE_WILL:
case TELNET_STATE_WONT:
case TELNET_STATE_DO:
case TELNET_STATE_DONT:
_negotiate(telnet, byte);
start = i + 1;
telnet->state = TELNET_STATE_DATA;
break;
/* subnegotiation -- determine subnegotiation telopt */
case TELNET_STATE_SB:
telnet->sb_telopt = byte;
telnet->buffer_pos = 0;
telnet->state = TELNET_STATE_SB_DATA;
break;
/* subnegotiation -- buffer bytes until end request */
case TELNET_STATE_SB_DATA:
/* IAC command in subnegotiation -- either IAC SE or IAC IAC */
if (byte == TELNET_IAC) {
telnet->state = TELNET_STATE_SB_DATA_IAC;
} else if (telnet->sb_telopt == TELNET_TELOPT_COMPRESS && byte == TELNET_WILL) {
/* In 1998 MCCP used TELOPT 85 and the protocol defined an invalid
* subnegotiation sequence (IAC SB 85 WILL SE) to start compression.
* Subsequently MCCP version 2 was created in 2000 using TELOPT 86
* and a valid subnegotiation (IAC SB 86 IAC SE). libtelnet for now
* just captures and discards MCCPv1 sequences.
*/
start = i + 2;
telnet->state = TELNET_STATE_DATA;
/* buffer the byte, or bail if we can't */
} else if (_buffer_byte(telnet, byte) != TELNET_EOK) {
start = i + 1;
telnet->state = TELNET_STATE_DATA;
}
break;
/* IAC escaping inside a subnegotiation */
case TELNET_STATE_SB_DATA_IAC:
switch (byte) {
/* end subnegotiation */
case TELNET_SE:
/* return to default state */
start = i + 1;
telnet->state = TELNET_STATE_DATA;
/* process subnegotiation */
if (_subnegotiate(telnet) != 0) {
/* any remaining bytes in the buffer are compressed.
* we have to re-invoke telnet_recv to get those
* bytes inflated and abort trying to process the
* remaining compressed bytes in the current _process
* buffer argument
*/
telnet_recv(telnet, &buffer[start], size - start);
return;
}
break;
/* escaped IAC byte */
case TELNET_IAC:
/* push IAC into buffer */
if (_buffer_byte(telnet, TELNET_IAC) !=
TELNET_EOK) {
start = i + 1;
telnet->state = TELNET_STATE_DATA;
} else {
telnet->state = TELNET_STATE_SB_DATA;
}
break;
/* something else -- protocol error. attempt to process
* content in subnegotiation buffer, then evaluate the
* given command as an IAC code.
*/
default:
_error(telnet, __LINE__, __func__, TELNET_EPROTOCOL, 0,
"unexpected byte after IAC inside SB: %d",
byte);
/* enter IAC state */
start = i + 1;
telnet->state = TELNET_STATE_IAC;
/* process subnegotiation; see comment in
* TELNET_STATE_SB_DATA_IAC about invoking telnet_recv()
*/
if (_subnegotiate(telnet) != 0) {
telnet_recv(telnet, &buffer[start], size - start);
return;
} else {
/* recursive call to get the current input byte processed
* as a regular IAC command. we could use a goto, but
* that would be gross.
*/
_process(telnet, (char *)&byte, 1);
}
break;
}
break;
}
}
/* pass through any remaining bytes */
if (telnet->state == TELNET_STATE_DATA && i != start) {
ev.type = TELNET_EV_DATA;
ev.data.buffer = buffer + start;
ev.data.size = i - start;
telnet->eh(telnet, &ev, telnet->ud);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdi, %rbp
xorl %r14d, %r14d
xorl %r12d, %r12d
movq %rdi, 0x10(%rsp)
cmpq %r14, 0x48(%rsp)
je 0x263f
movq 0x40(%rsp), %rax
movb (%rax,%r14), %r15b
movb %r15b, 0xf(%rsp)
movl 0x38(%rbp), %ebx
cmpq $0x9, %rbx
ja 0x261b
movzbl %r15b, %r13d
leaq 0x2739(%rip), %rcx # 0x4690
movslq (%rcx,%rbx,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x1, 0x3c(%rbp)
jne 0x1fee
movq %rbp, %rdi
movl %r13d, %esi
callq 0x2850
movzwl %ax, %r12d
movl %r12d, %ebp
shrl $0x8, %ebp
addl $-0x3, %ebx
leaq 0x273f(%rip), %rax # 0x46c8
movslq (%rax,%rbx,4), %rcx
addq %rax, %rcx
movzwl %bp, %eax
jmpq *%rcx
shrl $0xc, %r12d
cmpw $0x5, %r12w
ja 0x260e
leaq 0x276d(%rip), %rcx # 0x4718
movslq (%rcx,%r12,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
xorl %edx, %edx
callq 0x388d
testl %eax, %eax
je 0x262d
andl $0xf, %ebp
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
pushq $0x1
popq %rcx
callq 0x287c
movq %rbx, %rdi
movl $0xfd, %esi
jmp 0x25eb
addl $-0x3, %ebx
leaq 0x26c0(%rip), %rcx # 0x46b8
movslq (%rcx,%rbx,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x3, 0x18(%rsp)
jmp 0x2236
cmpl $0xff, %r13d
je 0x225b
cmpl $0xf0, %r13d
jne 0x22bc
leaq 0x1(%r14), %r12
andl $0x0, 0x38(%rbp)
movq %rbp, %rdi
callq 0x32c7
jmp 0x261b
addl $0xffffff06, %r13d # imm = 0xFFFFFF06
cmpl $0x5, %r13d
ja 0x2366
leaq 0x26db(%rip), %rcx # 0x4730
movslq (%rcx,%r13,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x7, 0x38(%rbp)
jmp 0x261b
movb %r15b, 0x3d(%rbp)
andq $0x0, 0x30(%rbp)
movl $0x8, 0x38(%rbp)
jmp 0x261b
cmpl $0xd, %r13d
je 0x2275
cmpl $0xff, %r13d
jne 0x261b
movq %r14, %rax
subq %r12, %rax
je 0x20c4
andl $0x0, 0x50(%rsp)
movq 0x40(%rsp), %rcx
addq %r12, %rcx
movq %rcx, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq (%rbp), %rdx
movq %rbp, %rdi
leaq 0x50(%rsp), %rsi
callq *0x10(%rbp)
movl $0x2, 0x38(%rbp)
jmp 0x261b
cmpb $0xa, %r15b
jne 0x216f
xorl %r12d, %r12d
jmp 0x21b1
cmpb $-0x1, %r15b
je 0x224f
movb 0x3d(%rbp), %al
xorb $0x55, %al
xorb $-0x5, %r15b
orb %al, %r15b
jne 0x2308
leaq 0x2(%r14), %r12
jmp 0x2617
andl $0xf, %eax
cmpw $0x5, %ax
ja 0x260e
leaq 0x25d1(%rip), %rcx # 0x46ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
pushq $0x1
popq %rbp
movl %ebp, %edx
callq 0x388d
testl %eax, %eax
je 0x2623
shrl $0xc, %r12d
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x287c
movq %rbx, %rdi
movl $0xfb, %esi
jmp 0x257f
movl $0x5, 0x18(%rsp)
jmp 0x2236
andl $0x0, 0x50(%rsp)
movb $0xd, 0xf(%rsp)
leaq 0xf(%rsp), %rax
movq %rax, 0x58(%rsp)
movq $0x1, 0x60(%rsp)
movq (%rbp), %rdx
movq %rbp, %rdi
leaq 0x50(%rsp), %rsi
callq *0x10(%rbp)
movq 0x40(%rsp), %rax
movb (%rax,%r14), %al
movb %al, 0xf(%rsp)
xorl %r12d, %r12d
testb %al, %al
sete %r12b
addq %r14, %r12
jmp 0x2617
andl $0xf, %eax
decl %eax
cmpl $0x4, %eax
ja 0x260e
leaq 0x250a(%rip), %rcx # 0x46d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0xc, %r12d
movq 0x10(%rsp), %rdi
movl %r13d, %esi
xorl %edx, %edx
movl %r12d, %ecx
jmp 0x2224
movl $0x6, 0x18(%rsp)
jmp 0x2236
shrl $0xc, %r12d
decl %r12d
cmpl $0x4, %r12d
ja 0x260e
leaq 0x24f8(%rip), %rcx # 0x4704
movslq (%rcx,%r12,4), %rax
addq %rcx, %rax
jmpq *%rax
andl $0xf, %ebp
movq 0x10(%rsp), %rdi
movl %r13d, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x287c
jmp 0x260e
movl $0x4, 0x18(%rsp)
movb %r15b, 0x1c(%rsp)
movq (%rbp), %rdx
movq %rbp, %rdi
leaq 0x18(%rsp), %rsi
callq *0x10(%rbp)
jmp 0x260e
movl $0x9, 0x38(%rbp)
jmp 0x261b
movq %rbp, %rdi
movl $0xff, %esi
callq 0x3218
testl %eax, %eax
jne 0x2382
jmp 0x2073
movb 0x3c(%rbp), %al
andb $0x42, %al
cmpb $0x2, %al
jne 0x261b
movq %r14, %rax
subq %r12, %rax
je 0x22b0
andl $0x0, 0x50(%rsp)
movq 0x40(%rsp), %rcx
addq %r12, %rcx
movq %rcx, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq (%rbp), %rdx
movq %rbp, %rdi
leaq 0x50(%rsp), %rsi
callq *0x10(%rbp)
movl $0x1, 0x38(%rbp)
jmp 0x261b
movl %r13d, (%rsp)
movq %rbp, %rdi
movl $0x472, %esi # imm = 0x472
leaq 0x2503(%rip), %rdx # 0x47d2
pushq $0x4
popq %rcx
leaq 0x2502(%rip), %r9 # 0x47db
xorl %eax, %eax
callq 0x2d06
movl $0x2, 0x38(%rbp)
movq %rbp, %rdi
callq 0x32c7
leaq 0x1(%r14), %r12
movq %rbp, %rdi
leaq 0xf(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x1f00
jmp 0x261b
movq %rbp, %rdi
movl %r13d, %esi
callq 0x3218
testl %eax, %eax
jne 0x2382
jmp 0x261b
movl $0x6, 0x38(%rbp)
jmp 0x261b
movl $0x4, 0x38(%rbp)
jmp 0x261b
movl $0x5, 0x38(%rbp)
jmp 0x261b
movl $0x3, 0x38(%rbp)
jmp 0x261b
andl $0x0, 0x50(%rsp)
leaq 0xf(%rsp), %rax
movq %rax, 0x58(%rsp)
movq $0x1, 0x60(%rsp)
jmp 0x2373
movl $0x2, 0x50(%rsp)
movb %r15b, 0x54(%rsp)
movq (%rbp), %rdx
movq %rbp, %rdi
leaq 0x50(%rsp), %rsi
callq *0x10(%rbp)
leaq 0x1(%r14), %r12
jmp 0x2617
shrl $0xc, %r12d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
pushq $0x1
popq %rdx
movl %r12d, %ecx
callq 0x287c
jmp 0x2587
shrl $0xc, %r12d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
pushq $0x3
popq %rdx
movl %r12d, %ecx
callq 0x287c
movq %rbx, %rdi
movl $0xfb, %esi
jmp 0x23ef
shrl $0xc, %r12d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
xorl %edx, %edx
movl %r12d, %ecx
callq 0x287c
movq %rbx, %rdi
movl $0xfc, %esi
movl %r13d, %edx
callq 0x2962
jmp 0x2412
shrl $0xc, %r12d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
xorl %edx, %edx
movl %r12d, %ecx
callq 0x287c
movl $0x6, 0x18(%rsp)
jmp 0x25fb
andl $0xf, %ebp
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
pushq $0x3
popq %rcx
callq 0x287c
movq %rbx, %rdi
movl $0xfd, %esi
jmp 0x247d
andl $0xf, %ebp
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
pushq $0x1
popq %rcx
callq 0x287c
jmp 0x25f3
andl $0xf, %ebp
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x287c
movq %rbx, %rdi
movl $0xfe, %esi
movl %r13d, %edx
callq 0x2962
jmp 0x249e
andl $0xf, %ebp
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x287c
movl $0x4, 0x18(%rsp)
jmp 0x25fb
shrl $0xc, %r12d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
xorl %edx, %edx
movl %r12d, %ecx
callq 0x287c
movl $0x6, 0x18(%rsp)
movb %r15b, 0x1c(%rsp)
movq (%rbx), %rdx
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq *0x10(%rbx)
movq %rbx, %rdi
movl $0x1cf, %esi # imm = 0x1CF
jmp 0x250b
shrl $0xc, %r12d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
pushq $0x1
popq %rdx
movl %r12d, %ecx
callq 0x287c
movq %rbx, %rdi
movl $0x1d4, %esi # imm = 0x1D4
leaq 0x22f1(%rip), %rdx # 0x4803
pushq $0x4
popq %rcx
leaq 0x2308(%rip), %r9 # 0x4824
jmp 0x25c2
andl $0xf, %ebp
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x287c
movl $0x4, 0x18(%rsp)
movb %r15b, 0x1c(%rsp)
movq (%rbx), %rdx
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq *0x10(%rbx)
movq %rbx, %rdi
movl $0x195, %esi # imm = 0x195
jmp 0x25b1
shrl $0xc, %r12d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
pushq $0x2
popq %rdx
movl %r12d, %ecx
callq 0x287c
movq %rbx, %rdi
movl $0xfc, %esi
movl %r13d, %edx
callq 0x2962
movl $0x5, 0x18(%rsp)
jmp 0x25fb
andl $0xf, %ebp
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
pushq $0x1
popq %rcx
callq 0x287c
movq %rbx, %rdi
movl $0x19a, %esi # imm = 0x19A
leaq 0x224b(%rip), %rdx # 0x4803
pushq $0x4
popq %rcx
leaq 0x224c(%rip), %r9 # 0x480e
xorl %eax, %eax
callq 0x2d06
jmp 0x260e
andl $0xf, %ebp
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
pushq $0x2
popq %rcx
callq 0x287c
movq %rbx, %rdi
movl $0xfe, %esi
movl %r13d, %edx
callq 0x2962
movl $0x3, 0x18(%rsp)
movb %r15b, 0x1c(%rsp)
movq (%rbx), %rdx
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq *0x10(%rbx)
leaq 0x1(%r14), %r12
movq 0x10(%rsp), %rbp
andl $0x0, 0x38(%rbp)
incq %r14
jmp 0x1f26
movq %rbx, %rdi
movl $0xfc, %esi
jmp 0x2635
movq %rbx, %rdi
movl $0xfe, %esi
movl %r13d, %edx
callq 0x2962
jmp 0x260e
cmpl $0x0, 0x38(%rbp)
jne 0x2673
subq %r12, 0x48(%rsp)
je 0x2673
leaq 0x50(%rsp), %rsi
andl $0x0, (%rsi)
movq 0x40(%rsp), %rax
addq %r12, %rax
movq %rax, 0x8(%rsi)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsi)
movq (%rbp), %rdx
movq %rbp, %rdi
callq *0x10(%rbp)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/seanmiddleditch[P]libtelnet/libtelnet.c
|
telnet_negotiate
|
void telnet_negotiate(telnet_t *telnet, unsigned char cmd,
unsigned char telopt) {
telnet_rfc1143_t q;
/* if we're in proxy mode, just send it now */
if (telnet->flags & TELNET_FLAG_PROXY) {
unsigned char bytes[3];
bytes[0] = TELNET_IAC;
bytes[1] = cmd;
bytes[2] = telopt;
_sendu(telnet, bytes, 3);
return;
}
/* get current option states */
q = _get_rfc1143(telnet, telopt);
switch (cmd) {
/* advertise willingess to support an option */
case TELNET_WILL:
switch (Q_US(q)) {
case Q_NO:
_set_rfc1143(telnet, telopt, Q_WANTYES, Q_HIM(q));
_send_negotiate(telnet, TELNET_WILL, telopt);
break;
case Q_WANTNO:
_set_rfc1143(telnet, telopt, Q_WANTNO_OP, Q_HIM(q));
break;
case Q_WANTYES_OP:
_set_rfc1143(telnet, telopt, Q_WANTYES, Q_HIM(q));
break;
}
break;
/* force turn-off of locally enabled option */
case TELNET_WONT:
switch (Q_US(q)) {
case Q_YES:
_set_rfc1143(telnet, telopt, Q_WANTNO, Q_HIM(q));
_send_negotiate(telnet, TELNET_WONT, telopt);
break;
case Q_WANTYES:
_set_rfc1143(telnet, telopt, Q_WANTYES_OP, Q_HIM(q));
break;
case Q_WANTNO_OP:
_set_rfc1143(telnet, telopt, Q_WANTNO, Q_HIM(q));
break;
}
break;
/* ask remote end to enable an option */
case TELNET_DO:
switch (Q_HIM(q)) {
case Q_NO:
_set_rfc1143(telnet, telopt, Q_US(q), Q_WANTYES);
_send_negotiate(telnet, TELNET_DO, telopt);
break;
case Q_WANTNO:
_set_rfc1143(telnet, telopt, Q_US(q), Q_WANTNO_OP);
break;
case Q_WANTYES_OP:
_set_rfc1143(telnet, telopt, Q_US(q), Q_WANTYES);
break;
}
break;
/* demand remote end disable an option */
case TELNET_DONT:
switch (Q_HIM(q)) {
case Q_YES:
_set_rfc1143(telnet, telopt, Q_US(q), Q_WANTNO);
_send_negotiate(telnet, TELNET_DONT, telopt);
break;
case Q_WANTYES:
_set_rfc1143(telnet, telopt, Q_US(q), Q_WANTYES_OP);
break;
case Q_WANTNO_OP:
_set_rfc1143(telnet, telopt, Q_US(q), Q_WANTNO);
break;
}
break;
}
}
|
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %r14
testb $0x1, 0x3c(%rdi)
jne 0x2740
movzbl %dl, %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x2850
movzbl %bpl, %esi
addl $0xffffff05, %esi # imm = 0xFFFFFF05
cmpl $0x3, %esi
ja 0x275a
movzwl %ax, %ecx
movl %ecx, %edx
shrl $0x8, %edx
leaq 0x204b(%rip), %rax # 0x4748
movslq (%rax,%rsi,4), %rsi
addq %rax, %rsi
jmpq *%rsi
movzwl %dx, %eax
andl $0xf, %eax
cmpw $0x5, %ax
je 0x2834
cmpl $0x2, %eax
je 0x281e
testl %eax, %eax
jne 0x275a
shrl $0xc, %ecx
pushq $0x3
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x287c
movq %r14, %rdi
movl $0xfb, %esi
jmp 0x27fa
leaq 0xd(%rsp), %rsi
movb $-0x1, (%rsi)
movb %bpl, 0x1(%rsi)
movb %dl, 0x2(%rsi)
pushq $0x3
popq %rdx
movq %r14, %rdi
callq 0x269c
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
shrl $0xc, %ecx
cmpw $0x5, %cx
je 0x2810
cmpl $0x2, %ecx
je 0x2809
testl %ecx, %ecx
jne 0x275a
andl $0xf, %edx
pushq $0x3
popq %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x287c
movq %r14, %rdi
movl $0xfd, %esi
jmp 0x27fa
shrl $0xc, %ecx
cmpw $0x4, %cx
je 0x282c
cmpl $0x3, %ecx
je 0x2817
cmpl $0x1, %ecx
jne 0x275a
andl $0xf, %edx
pushq $0x2
popq %rcx
movq %r14, %rdi
movl %ebx, %esi
callq 0x287c
movq %r14, %rdi
movl $0xfe, %esi
jmp 0x27fa
movzwl %dx, %eax
andl $0xf, %eax
cmpw $0x4, %ax
je 0x283b
cmpl $0x3, %eax
je 0x2825
cmpl $0x1, %eax
jne 0x275a
shrl $0xc, %ecx
pushq $0x2
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x287c
movq %r14, %rdi
movl $0xfc, %esi
movl %ebx, %edx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2962
andl $0xf, %edx
pushq $0x4
jmp 0x2831
andl $0xf, %edx
pushq $0x3
jmp 0x2831
andl $0xf, %edx
pushq $0x5
jmp 0x2831
shrl $0xc, %ecx
pushq $0x4
jmp 0x2840
shrl $0xc, %ecx
pushq $0x5
jmp 0x2840
andl $0xf, %edx
pushq $0x2
popq %rcx
jmp 0x2841
shrl $0xc, %ecx
pushq $0x3
jmp 0x2840
shrl $0xc, %ecx
pushq $0x2
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x287c
|
/seanmiddleditch[P]libtelnet/libtelnet.c
|
get_rfc1143
|
static INLINE telnet_rfc1143_t _get_rfc1143(telnet_t *telnet,
unsigned char telopt) {
telnet_rfc1143_t empty;
unsigned int i;
/* search for entry */
for (i = 0; i != telnet->q_cnt; ++i) {
if (telnet->q[i].telopt == telopt) {
return telnet->q[i];
}
}
/* not found, return empty value */
empty.telopt = telopt;
empty.state = 0;
return empty;
}
|
movl 0x44(%rdi), %eax
xorl %ecx, %ecx
cmpl %ecx, %eax
je 0x2873
movq 0x18(%rdi), %rdx
movl %ecx, %r8d
incl %ecx
cmpb %sil, (%rdx,%r8,2)
jne 0x2855
movzbl 0x1(%rdx,%r8,2), %eax
shll $0x8, %eax
jmp 0x2875
xorl %eax, %eax
movzbl %sil, %ecx
orl %ecx, %eax
retq
|
/seanmiddleditch[P]libtelnet/libtelnet.c
|
set_rfc1143
|
static INLINE void _set_rfc1143(telnet_t *telnet, unsigned char telopt,
char us, char him) {
telnet_rfc1143_t *qtmp;
unsigned int i;
/* search for entry */
for (i = 0; i != telnet->q_cnt; ++i) {
if (telnet->q[i].telopt == telopt) {
telnet->q[i].state = Q_MAKE(us,him);
if (telopt != TELNET_TELOPT_BINARY)
return;
telnet->flags &= ~(TELNET_FLAG_TRANSMIT_BINARY |
TELNET_FLAG_RECEIVE_BINARY);
if (us == Q_YES)
telnet->flags |= TELNET_FLAG_TRANSMIT_BINARY;
if (him == Q_YES)
telnet->flags |= TELNET_FLAG_RECEIVE_BINARY;
return;
}
}
/* we're going to need to track state for it, so grow the queue
* by 4 (four) elements and put the telopt into it; bail on allocation
* error. we go by four because it seems like a reasonable guess as
* to the number of enabled options for most simple code, and it
* allows for an acceptable number of reallocations for complex code.
*/
/* Did we reach the end of the table? */
if (telnet->q_cnt >= telnet->q_size) {
/* Expand the size */
if ((qtmp = (telnet_rfc1143_t *)realloc(telnet->q,
sizeof(telnet_rfc1143_t) *
(telnet->q_size + Q_BUFFER_GROWTH_QUANTUM))) == 0) {
_error(telnet, __LINE__, __func__, TELNET_ENOMEM, 0,
"realloc() failed: %s", strerror(errno));
return;
}
memset(&qtmp[telnet->q_size], 0, sizeof(telnet_rfc1143_t) *
Q_BUFFER_GROWTH_QUANTUM);
telnet->q = qtmp;
telnet->q_size += Q_BUFFER_GROWTH_QUANTUM;
}
/* Add entry to end of table */
telnet->q[telnet->q_cnt].telopt = telopt;
telnet->q[telnet->q_cnt].state = Q_MAKE(us, him);
++telnet->q_cnt;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movl 0x44(%rdi), %ecx
xorl %eax, %eax
cmpl %eax, %ecx
je 0x28db
movq 0x18(%rbx), %rdx
movl %eax, %esi
incl %eax
cmpb %r15b, (%rdx,%rsi,2)
jne 0x2893
movl %ebp, %eax
shlb $0x4, %al
orb %r14b, %al
movb %al, 0x1(%rdx,%rsi,2)
testb %r15b, %r15b
jne 0x2925
movb 0x3c(%rbx), %al
andb $-0x61, %al
leal 0x20(%rax), %ecx
cmpb $0x1, %r14b
movzbl %al, %edx
movzbl %cl, %eax
cmovnel %edx, %eax
movb %al, 0x3c(%rbx)
cmpb $0x1, %bpl
jne 0x2925
orb $0x40, %al
movb %al, 0x3c(%rbx)
jmp 0x2925
movl 0x40(%rbx), %esi
movq 0x18(%rbx), %rax
cmpl %esi, %ecx
jb 0x290e
addl $0x4, %esi
addq %rsi, %rsi
movq %rax, %rdi
callq 0x1160
testq %rax, %rax
je 0x2930
movl 0x40(%rbx), %ecx
andq $0x0, (%rax,%rcx,2)
movq %rax, 0x18(%rbx)
addl $0x4, %ecx
movl %ecx, 0x40(%rbx)
movl 0x44(%rbx), %ecx
movl %ecx, %edx
movb %r15b, (%rax,%rdx,2)
shlb $0x4, %bpl
orb %r14b, %bpl
movb %bpl, 0x1(%rax,%rdx,2)
incl %ecx
movl %ecx, 0x44(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x1060
movl (%rax), %edi
callq 0x11e0
movq %rax, (%rsp)
leaq 0x2091(%rip), %rdx # 0x49d8
leaq 0x2097(%rip), %r9 # 0x49e5
pushq $0x2
popq %rcx
movq %rbx, %rdi
movl $0x151, %esi # imm = 0x151
xorl %eax, %eax
callq 0x2d06
jmp 0x2925
|
/seanmiddleditch[P]libtelnet/libtelnet.c
|
error
|
static telnet_error_t _error(telnet_t *telnet, unsigned line,
const char* func, telnet_error_t err, int fatal, const char *fmt,
...) {
telnet_event_t ev;
char buffer[512];
va_list va;
/* format informational text */
va_start(va, fmt);
vsnprintf(buffer, sizeof(buffer), fmt, va);
va_end(va);
/* send error event to the user */
ev.type = fatal ? TELNET_EV_ERROR : TELNET_EV_WARNING;
ev.error.file = __FILE__;
ev.error.func = func;
ev.error.line = line;
ev.error.msg = buffer;
telnet->eh(telnet, &ev, telnet->ud);
return err;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2f0, %rsp # imm = 0x2F0
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
testb %al, %al
je 0x2d60
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
leaq 0x40(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x320(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000030, %rax # imm = 0x3000000030
movq %rax, (%rcx)
leaq 0xf0(%rsp), %r12
movl $0x200, %esi # imm = 0x200
movq %r12, %rdi
movq %r9, %rdx
callq 0x1080
leaq 0x18(%rsp), %rsi
movl $0xd, (%rsi)
leaq 0x1c4b(%rip), %rax # 0x49fa
movq %rax, 0x8(%rsi)
movq %r14, 0x10(%rsi)
movl %ebp, 0x20(%rsi)
movq %r12, 0x18(%rsi)
movq (%r15), %rdx
movq %r15, %rdi
callq *0x10(%r15)
movl %ebx, %eax
addq $0x2f0, %rsp # imm = 0x2F0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
/seanmiddleditch[P]libtelnet/libtelnet.c
|
telnet_printf
|
int telnet_printf(telnet_t *telnet, const char *fmt, ...) {
va_list va;
int rs;
va_start(va, fmt);
rs = telnet_vprintf(telnet, fmt, va);
va_end(va);
return rs;
}
|
subq $0xd8, %rsp
leaq 0x20(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x2e31
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %r10, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rdx)
callq 0x2b6f
addq $0xd8, %rsp
retq
|
/seanmiddleditch[P]libtelnet/libtelnet.c
|
Kandinsky::BaseExpression::differentiate(Kandinsky::Variable const&) const
|
Expression BaseExpression::differentiate(const Variable& variable) const
{
return Expression(derivative(variable.getVariableExpressionPtr()));
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdx), %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x10f04
movq (%r14), %rax
movq %rsp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x8(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x10edc
leaq 0x8(%rsp), %rdi
callq 0x1022c
leaq 0x18(%rsp), %rdi
callq 0x1022c
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1022c
jmp 0x10dd3
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1022c
movq %rbx, %rdi
callq 0xf220
nop
|
/lgpasquale[P]kandinsky/src/Kandinsky/expressions/BaseExpression.cpp
|
std::shared_ptr<Kandinsky::BaseExpression> Kandinsky::BaseExpression::makePtr<Kandinsky::Variable>(Kandinsky::Variable const&)
|
std::shared_ptr<BaseExpression> BaseExpression::makePtr<Variable>(const Variable& arg)
{
return arg.getVariableExpressionPtr();
}
|
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x8, %rsi
movq %rsp, %rdi
callq 0x10f04
leaq 0x8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x1022c
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
nop
|
/lgpasquale[P]kandinsky/src/Kandinsky/expressions/BaseExpression.cpp
|
Kandinsky::VariableExpression::derivative(std::shared_ptr<Kandinsky::VariableExpression> const&) const
|
BaseExpressionPtr VariableExpression::derivative(const VariableExpressionPtr& variable) const
{
return makePtr(Constant(variable.get() == this));
}
|
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
cmpq %rsi, (%rdx)
je 0x111c2
xorps %xmm0, %xmm0
jmp 0x111ca
movsd 0x2e5e(%rip), %xmm0 # 0x14028
leaq 0x8617(%rip), %rax # 0x197e8
addq $0x10, %rax
movq %rsp, %rsi
movq %rax, (%rsi)
movsd %xmm0, 0x8(%rsi)
andq $0x0, 0x18(%rsi)
leaq -0x500(%rip), %rax # 0x10cec
movq %rax, 0x10(%rsi)
leaq -0x11b1(%rip), %rax # 0x10046
movq %rax, 0x28(%rsi)
leaq -0x11ac(%rip), %rax # 0x10056
movq %rax, 0x20(%rsi)
movq %rbx, %rdi
callq 0x1103d
movq %rsp, %rdi
callq 0x10598
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x10598
movq %rbx, %rdi
callq 0xf220
|
/lgpasquale[P]kandinsky/src/Kandinsky/expressions/VariableExpression.cpp
|
Kandinsky::Expression Kandinsky::operator*<std::shared_ptr<Kandinsky::BaseExpression>, std::shared_ptr<Kandinsky::BaseExpression>, (void*)0>(std::shared_ptr<Kandinsky::BaseExpression> const&, std::shared_ptr<Kandinsky::BaseExpression> const&)
|
Expression
operator*(const Arg1T& arg1, const Arg2T& arg2)
{
BaseExpressionPtr arg1Ptr = BaseExpression::makePtr(arg1);
BaseExpressionPtr arg2Ptr = BaseExpression::makePtr(arg2);
if (arg1Ptr->isConstant() && arg2Ptr->isConstant())
return Expression(arg1Ptr->evaluate() * arg2Ptr->evaluate());
if (arg1Ptr->isConstant() && arg1Ptr->evaluate() == 1)
return Expression(arg2);
if (arg2Ptr->isConstant() && arg2Ptr->evaluate() == 1)
return Expression(arg1);
if ((arg1Ptr->isConstant() && arg1Ptr->evaluate() == 0) ||
(arg2Ptr->isConstant() && arg2Ptr->evaluate() == 0))
return Expression(Constant(0));
return Expression(MultiplicationExpression(arg1Ptr, arg2Ptr));
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x106c0
movq %rsp, %rdi
movq %r15, %rsi
callq 0x106c0
movq (%r12), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testb %al, %al
je 0x11fec
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testb %al, %al
je 0x11fec
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *(%rax)
movsd %xmm0, 0x20(%rsp)
movq (%rsp), %rdi
movq (%rdi), %rax
callq *(%rax)
movsd 0x20(%rsp), %xmm1
mulsd %xmm0, %xmm1
leaq 0x28(%rsp), %rsi
movsd %xmm1, (%rsi)
movq %rbx, %rdi
callq 0x10340
jmp 0x1210b
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testb %al, %al
je 0x12011
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *(%rax)
ucomisd 0x201b(%rip), %xmm0 # 0x14028
jne 0x12011
jnp 0x12037
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testb %al, %al
je 0x12047
movq (%rsp), %rdi
movq (%rdi), %rax
callq *(%rax)
ucomisd 0x1ff8(%rip), %xmm0 # 0x14028
movq %r14, %r15
jne 0x12047
jp 0x12047
movq %rbx, %rdi
movq %r15, %rsi
callq 0x122cc
jmp 0x1210b
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testb %al, %al
je 0x1206c
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *(%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1206c
jnp 0x1208f
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testb %al, %al
je 0x120e1
movq (%rsp), %rdi
movq (%rdi), %rax
callq *(%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x120e1
jp 0x120e1
leaq 0x7752(%rip), %rax # 0x197e8
addq $0x10, %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
andq $0x0, 0x18(%rsi)
leaq -0x13c7(%rip), %rax # 0x10cec
movq %rax, 0x10(%rsi)
leaq -0x2078(%rip), %rax # 0x10046
movq %rax, 0x28(%rsi)
leaq -0x2073(%rip), %rax # 0x10056
movq %rax, 0x20(%rsi)
movq %rbx, %rdi
callq 0x122e4
leaq 0x28(%rsp), %rdi
callq 0x10598
jmp 0x1210b
leaq 0x28(%rsp), %r14
leaq 0x10(%rsp), %rsi
movq %rsp, %rdx
movq %r14, %rdi
callq 0x122fe
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12318
leaq 0x28(%rsp), %rdi
callq 0x1038e
leaq 0x8(%rsp), %rdi
callq 0x1022c
leaq 0x18(%rsp), %rdi
callq 0x1022c
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1038e
jmp 0x12151
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x10598
jmp 0x12151
jmp 0x1214e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1022c
leaq 0x18(%rsp), %rdi
callq 0x1022c
movq %rbx, %rdi
callq 0xf220
nop
|
/lgpasquale[P]kandinsky/src/Kandinsky/expressions/MultiplicationExpression.hpp
|
Kandinsky::MinusExpression::derivative(std::shared_ptr<Kandinsky::VariableExpression> const&) const
|
BaseExpressionPtr MinusExpression::derivative(const VariableExpressionPtr& variable) const
{
return makePtr(- m_arg->derivative(variable));
}
|
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
movq (%rsi), %rax
movq %rsp, %r14
movq %r14, %rdi
callq *0x8(%rax)
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x12a2b
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1261a
leaq 0x10(%rsp), %rdi
callq 0x1255a
leaq 0x8(%rsp), %rdi
callq 0x1022c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1255a
jmp 0x12a19
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1022c
movq %rbx, %rdi
callq 0xf220
|
/lgpasquale[P]kandinsky/src/Kandinsky/expressions/MinusExpression.cpp
|
MPXTableSet::~MPXTableSet()
|
bool DoExecute(lldb::SBDebugger debugger, char **command,
lldb::SBCommandReturnObject &result) override {
if (command) {
int arg_c = 0;
char *arg[3];
while (*command) {
arg[arg_c] = *command;
command++;
arg_c++;
}
if (arg_c != 3) {
result.SetError("Wrong arguments. See help.");
return false;
}
if (!debugger.IsValid()) {
result.SetError("Invalid debugger.");
return false;
}
lldb::SBTarget target;
llvm::Triple::ArchType arch;
lldb::SBError error;
uint64_t bndcfgu;
uint64_t ptr;
if (!GetInitInfo(debugger, target, arch, bndcfgu, arg[0], ptr, result,
error))
return false;
char *endptr;
errno = 0;
uint64_t lbound = std::strtoul(arg[1], &endptr, 16);
if (endptr == arg[1] || errno == ERANGE) {
result.SetError("Lower Bound: bad argument format.");
errno = 0;
return false;
}
uint64_t ubound = std::strtoul(arg[2], &endptr, 16);
if (endptr == arg[1] || errno == ERANGE) {
result.SetError("Upper Bound: bad argument format.");
errno = 0;
return false;
}
return SetBTEntry(bndcfgu, ptr, lbound, ubound, target, arch, result,
error);
}
result.SetError("Too few arguments. See help.");
return false;
}
|
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x7c0c0
movq 0x8(%rsp), %rdi
movl $0x8, %esi
callq 0x72950
addq $0x18, %rsp
retq
nopl (%rax)
|
/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp
|
void* llvm::StringMapEntryBase::allocateWithKey<llvm::MallocAllocator>(unsigned long, unsigned long, llvm::StringRef, llvm::MallocAllocator&)
|
void *StringMapEntryBase::allocateWithKey(size_t EntrySize, size_t EntryAlign,
StringRef Key,
AllocatorTy &Allocator) {
size_t KeyLength = Key.size();
// Allocate a new item with space for the string at the end and a null
// terminator.
size_t AllocSize = EntrySize + KeyLength + 1;
void *Allocation = Allocator.Allocate(AllocSize, EntryAlign);
assert(Allocation && "Unhandled out-of-memory");
// Copy the string information.
char *Buffer = reinterpret_cast<char *>(Allocation) + EntrySize;
if (KeyLength > 0)
::memcpy(Buffer, Key.data(), KeyLength);
Buffer[KeyLength] = 0; // Null terminate for convenience of clients.
return Allocation;
}
|
subq $0x58, %rsp
movq %rdx, 0x48(%rsp)
movq %rcx, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %r8, 0x30(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x87d70
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rax
addq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x99d80
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
addq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x28(%rsp)
jbe 0x99d35
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x8cd00
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x28(%rsp), %rdx
callq 0x72670
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x18(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax)
|
/llvm/ADT/StringMapEntry.h
|
llvm::safe_realloc(void*, unsigned long)
|
LLVM_ATTRIBUTE_RETURNS_NONNULL inline void *safe_realloc(void *Ptr, size_t Sz) {
void *Result = std::realloc(Ptr, Sz);
if (Result == nullptr) {
// It is implementation-defined whether allocation occurs if the space
// requested is zero (ISO/IEC 9899:2018 7.22.3). Retry, requesting
// non-zero, if the space requested was zero.
if (Sz == 0)
return safe_malloc(1);
report_bad_alloc_error("Allocation failed");
}
return Result;
}
|
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x727f0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x9aee4
cmpq $0x0, 0x10(%rsp)
jne 0x9aed3
movl $0x1, %edi
callq 0x9ac40
movq %rax, 0x20(%rsp)
jmp 0x9aeee
leaq 0x11e71a(%rip), %rdi # 0x1b95f4
movl $0x1, %esi
callq 0x75760
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
/llvm/Support/MemAlloc.h
|
llvm::detail::IEEEFloat::multiply(llvm::detail::IEEEFloat const&, llvm::RoundingMode)
|
IEEEFloat::opStatus IEEEFloat::multiply(const IEEEFloat &rhs,
roundingMode rounding_mode) {
opStatus fs;
sign ^= rhs.sign;
fs = multiplySpecials(rhs);
if (isZero() && semantics->nanEncoding == fltNanEncoding::NegativeZero)
sign = false;
if (isFiniteNonZero()) {
lostFraction lost_fraction = multiplySignificand(rhs);
fs = normalize(rounding_mode, lost_fraction);
if (lost_fraction != lfExactlyZero)
fs = (opStatus) (fs | opInexact);
}
return fs;
}
|
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movb %al, 0x17(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x18(%rsp), %rax
movb 0x14(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %ecx
movb 0x14(%rdi), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
xorl %ecx, %eax
movb %al, %cl
movb 0x14(%rdi), %al
andb $0x1, %cl
shlb $0x3, %cl
andb $-0x9, %al
orb %cl, %al
movb %al, 0x14(%rdi)
movq 0x18(%rsp), %rsi
callq 0xd4890
movq (%rsp), %rdi
movl %eax, 0x10(%rsp)
callq 0xd4d80
testb $0x1, %al
jne 0xd4fc9
jmp 0xd4fe6
movq (%rsp), %rax
movq (%rax), %rax
cmpl $0x2, 0x14(%rax)
jne 0xd4fe6
movq (%rsp), %rax
movb 0x14(%rax), %cl
andb $-0x9, %cl
orb $0x0, %cl
movb %cl, 0x14(%rax)
movq (%rsp), %rdi
callq 0xd17c0
testb $0x1, %al
jne 0xd4ff5
jmp 0xd5033
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xd3dd0
movq (%rsp), %rdi
movl %eax, 0xc(%rsp)
movb 0x17(%rsp), %al
movl 0xc(%rsp), %edx
movsbl %al, %esi
callq 0xd2a60
movl %eax, 0x10(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0xd5031
movl 0x10(%rsp), %eax
orl $0x10, %eax
movl %eax, 0x10(%rsp)
jmp 0xd5033
movl 0x10(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
|
/Support/APFloat.cpp
|
llvm::detail::IEEEFloat::divide(llvm::detail::IEEEFloat const&, llvm::RoundingMode)
|
IEEEFloat::opStatus IEEEFloat::divide(const IEEEFloat &rhs,
roundingMode rounding_mode) {
opStatus fs;
sign ^= rhs.sign;
fs = divideSpecials(rhs);
if (isZero() && semantics->nanEncoding == fltNanEncoding::NegativeZero)
sign = false;
if (isFiniteNonZero()) {
lostFraction lost_fraction = divideSignificand(rhs);
fs = normalize(rounding_mode, lost_fraction);
if (lost_fraction != lfExactlyZero)
fs = (opStatus) (fs | opInexact);
}
return fs;
}
|
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movb %al, 0x17(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x18(%rsp), %rax
movb 0x14(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %ecx
movb 0x14(%rdi), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
xorl %ecx, %eax
movb %al, %cl
movb 0x14(%rdi), %al
andb $0x1, %cl
shlb $0x3, %cl
andb $-0x9, %al
orb %cl, %al
movb %al, 0x14(%rdi)
movq 0x18(%rsp), %rsi
callq 0xd49d0
movq (%rsp), %rdi
movl %eax, 0x10(%rsp)
callq 0xd4d80
testb $0x1, %al
jne 0xd50a9
jmp 0xd50c6
movq (%rsp), %rax
movq (%rax), %rax
cmpl $0x2, 0x14(%rax)
jne 0xd50c6
movq (%rsp), %rax
movb 0x14(%rax), %cl
andb $-0x9, %cl
orb $0x0, %cl
movb %cl, 0x14(%rax)
movq (%rsp), %rdi
callq 0xd17c0
testb $0x1, %al
jne 0xd50d5
jmp 0xd5113
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xd3e30
movq (%rsp), %rdi
movl %eax, 0xc(%rsp)
movb 0x17(%rsp), %al
movl 0xc(%rsp), %edx
movsbl %al, %esi
callq 0xd2a60
movl %eax, 0x10(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0xd5111
movl 0x10(%rsp), %eax
orl $0x10, %eax
movl %eax, 0x10(%rsp)
jmp 0xd5113
movl 0x10(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
|
/Support/APFloat.cpp
|
llvm::detail::DoubleAPFloat::compareAbsoluteValue(llvm::detail::DoubleAPFloat const&) const
|
APFloat::cmpResult
DoubleAPFloat::compareAbsoluteValue(const DoubleAPFloat &RHS) const {
auto Result = Floats[0].compareAbsoluteValue(RHS.Floats[0]);
if (Result != cmpEqual)
return Result;
Result = Floats[1].compareAbsoluteValue(RHS.Floats[1]);
if (Result == cmpLessThan || Result == cmpGreaterThan) {
auto Against = Floats[0].isNegative() ^ Floats[1].isNegative();
auto RHSAgainst = RHS.Floats[0].isNegative() ^ RHS.Floats[1].isNegative();
if (Against && !RHSAgainst)
return cmpLessThan;
if (!Against && RHSAgainst)
return cmpGreaterThan;
if (!Against && !RHSAgainst)
return Result;
if (Against && RHSAgainst)
return (cmpResult)(cmpLessThan + cmpGreaterThan - Result);
}
return Result;
}
|
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xe33c0
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xe33c0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xe3f90
movl %eax, 0x2c(%rsp)
cmpl $0x1, 0x2c(%rsp)
je 0xe5751
movl 0x2c(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0xe58ac
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xe33c0
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xe33c0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xe3f90
movl %eax, 0x2c(%rsp)
cmpl $0x0, 0x2c(%rsp)
je 0xe579f
cmpl $0x2, 0x2c(%rsp)
jne 0xe58a4
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xe33c0
movq %rax, %rdi
callq 0xe4150
movq 0x10(%rsp), %rdi
andb $0x1, %al
movzbl %al, %eax
movl %eax, (%rsp)
addq $0x8, %rdi
movl $0x1, %esi
callq 0xe33c0
movq %rax, %rdi
callq 0xe4150
movb %al, %cl
movl (%rsp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
xorl %ecx, %eax
movl %eax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xe33c0
movq %rax, %rdi
callq 0xe4150
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x4(%rsp)
movq 0x30(%rsp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xe33c0
movq %rax, %rdi
callq 0xe4150
movb %al, %cl
movl 0x4(%rsp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
xorl %ecx, %eax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x28(%rsp)
je 0xe5855
cmpl $0x0, 0x24(%rsp)
jne 0xe5855
movl $0x0, 0x44(%rsp)
jmp 0xe58ac
cmpl $0x0, 0x28(%rsp)
jne 0xe586d
cmpl $0x0, 0x24(%rsp)
je 0xe586d
movl $0x2, 0x44(%rsp)
jmp 0xe58ac
cmpl $0x0, 0x28(%rsp)
jne 0xe5885
cmpl $0x0, 0x24(%rsp)
jne 0xe5885
movl 0x2c(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0xe58ac
cmpl $0x0, 0x28(%rsp)
je 0xe58a2
cmpl $0x0, 0x24(%rsp)
je 0xe58a2
movl $0x2, %eax
subl 0x2c(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0xe58ac
jmp 0xe58a4
movl 0x2c(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop
|
/Support/APFloat.cpp
|
double llvm::bit_cast<double, unsigned long, void, void, void, void>(unsigned long const&)
|
[[nodiscard]] inline To bit_cast(const From &from) noexcept {
#if __has_builtin(__builtin_bit_cast)
return __builtin_bit_cast(To, from);
#else
To to;
std::memcpy(&to, &from, sizeof(To));
return to;
#endif
}
|
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movsd (%rax), %xmm0
retq
nop
|
/llvm/ADT/bit.h
|
llvm::APFloat::Storage::Storage<llvm::APFloatBase::uninitializedTag>(llvm::fltSemantics const&, llvm::APFloatBase::uninitializedTag&&)
|
Storage(const fltSemantics &Semantics, ArgTypes &&... Args) {
if (usesLayout<IEEEFloat>(Semantics)) {
new (&IEEE) IEEEFloat(Semantics, std::forward<ArgTypes>(Args)...);
return;
}
if (usesLayout<DoubleAPFloat>(Semantics)) {
new (&Double) DoubleAPFloat(Semantics, std::forward<ArgTypes>(Args)...);
return;
}
llvm_unreachable("Unexpected semantics");
}
|
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0xa2770
testb $0x1, %al
jne 0xe994d
jmp 0xe9965
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rax
movl (%rax), %edx
callq 0x77700
jmp 0xe998d
movq 0x18(%rsp), %rdi
callq 0xa27a0
testb $0x1, %al
jne 0xe9975
jmp 0xe998d
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rax
movl (%rax), %edx
callq 0x72640
jmp 0xe998d
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
/llvm/ADT/APFloat.h
|
llvm::APIntOps::GreatestCommonDivisor(llvm::APInt, llvm::APInt)
|
APInt llvm::APIntOps::GreatestCommonDivisor(APInt A, APInt B) {
// Fast-path a common case.
if (A == B) return A;
// Corner cases: if either operand is zero, the other is the gcd.
if (!A) return B;
if (!B) return A;
// Count common powers of 2 and remove all other powers of 2.
unsigned Pow2;
{
unsigned Pow2_A = A.countr_zero();
unsigned Pow2_B = B.countr_zero();
if (Pow2_A > Pow2_B) {
A.lshrInPlace(Pow2_A - Pow2_B);
Pow2 = Pow2_B;
} else if (Pow2_B > Pow2_A) {
B.lshrInPlace(Pow2_B - Pow2_A);
Pow2 = Pow2_A;
} else {
Pow2 = Pow2_A;
}
}
// Both operands are odd multiples of 2^Pow_2:
//
// gcd(a, b) = gcd(|a - b| / 2^i, min(a, b))
//
// This is a modified version of Stein's algorithm, taking advantage of
// efficient countTrailingZeros().
while (A != B) {
if (A.ugt(B)) {
A -= B;
A.lshrInPlace(A.countr_zero() - Pow2);
} else {
B -= A;
B.lshrInPlace(B.countr_zero() - Pow2);
}
}
return A;
}
|
subq $0x48, %rsp
movq %rdx, (%rsp)
movq %rsi, %rax
movq (%rsp), %rsi
movq %rax, 0x8(%rsp)
movq %rdi, %rax
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
movq %rax, %rcx
movq %rcx, 0x18(%rsp)
movq %rax, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
callq 0xf2270
testb $0x1, %al
jne 0xf3183
jmp 0xf3197
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0xe8660
jmp 0xf32d8
movq 0x8(%rsp), %rdi
callq 0xf32f0
testb $0x1, %al
jne 0xf31a7
jmp 0xf31ba
movq (%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0xe8660
jmp 0xf32d8
movq (%rsp), %rdi
callq 0xf32f0
testb $0x1, %al
jne 0xf31c9
jmp 0xf31dd
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0xe8660
jmp 0xf32d8
movq 0x8(%rsp), %rdi
callq 0xe9120
movq (%rsp), %rdi
movl %eax, 0x28(%rsp)
callq 0xe9120
movl %eax, 0x24(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x24(%rsp), %eax
jbe 0xf321e
movq 0x8(%rsp), %rdi
movl 0x28(%rsp), %esi
subl 0x24(%rsp), %esi
callq 0xe91a0
movl 0x24(%rsp), %eax
movl %eax, 0x2c(%rsp)
jmp 0xf324d
movl 0x24(%rsp), %eax
cmpl 0x28(%rsp), %eax
jbe 0xf3243
movq (%rsp), %rdi
movl 0x24(%rsp), %esi
subl 0x28(%rsp), %esi
callq 0xe91a0
movl 0x28(%rsp), %eax
movl %eax, 0x2c(%rsp)
jmp 0xf324b
movl 0x28(%rsp), %eax
movl %eax, 0x2c(%rsp)
jmp 0xf324d
jmp 0xf324f
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0xf3310
testb $0x1, %al
jne 0xf3263
jmp 0xf32c9
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0xf3340
testb $0x1, %al
jne 0xf3277
jmp 0xf32a1
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0xf02f0
movq 0x8(%rsp), %rdi
callq 0xe9120
movq 0x8(%rsp), %rdi
movl %eax, %esi
subl 0x2c(%rsp), %esi
callq 0xe91a0
jmp 0xf32c7
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xf02f0
movq (%rsp), %rdi
callq 0xe9120
movq (%rsp), %rdi
movl %eax, %esi
subl 0x2c(%rsp), %esi
callq 0xe91a0
jmp 0xf324f
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0xe8660
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
/Support/APInt.cpp
|
llvm::APInt::srem(long) const
|
int64_t APInt::srem(int64_t RHS) const {
if (isNegative()) {
if (RHS < 0)
return -((-(*this)).urem(-RHS));
return -((-(*this)).urem(RHS));
}
if (RHS < 0)
return this->urem(-RHS);
return this->urem(RHS);
}
|
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xd6250
testb $0x1, %al
jne 0xf6e36
jmp 0xf6ee5
cmpq $0x0, 0x50(%rsp)
jge 0xf6e95
movq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0xd61f0
leaq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xd6270
xorl %eax, %eax
movl %eax, %esi
subq 0x50(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0xf6af0
movq %rax, %rcx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, 0x60(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x9f220
leaq 0x30(%rsp), %rdi
callq 0x9f220
jmp 0xf6f1b
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0xd61f0
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xd6270
movq 0x50(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0xf6af0
movq %rax, %rcx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, 0x60(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x9f220
leaq 0x10(%rsp), %rdi
callq 0x9f220
jmp 0xf6f1b
cmpq $0x0, 0x50(%rsp)
jge 0xf6f07
movq 0x8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
subq 0x50(%rsp), %rsi
callq 0xf6af0
movq %rax, 0x60(%rsp)
jmp 0xf6f1b
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xf6af0
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
nop
|
/Support/APInt.cpp
|
llvm::APInt::tcMSB(unsigned long const*, unsigned int)
|
unsigned APInt::tcMSB(const WordType *parts, unsigned n) {
do {
--n;
if (parts[n] != 0) {
static_assert(sizeof(parts[n]) <= sizeof(uint64_t));
unsigned msb = llvm::Log2_64(parts[n]);
return msb + n * APINT_BITS_PER_WORD;
}
} while (n);
return UINT_MAX;
}
|
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movl 0x4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0xf966f
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0xf9690
movl %eax, (%rsp)
movl (%rsp), %eax
movl 0x4(%rsp), %ecx
shll $0x6, %ecx
addl %ecx, %eax
movl %eax, 0x14(%rsp)
jmp 0xf9680
jmp 0xf9671
cmpl $0x0, 0x4(%rsp)
jne 0xf962d
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
|
/Support/APInt.cpp
|
llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::handleOccurrence(unsigned int, llvm::StringRef, llvm::StringRef)
|
bool handleOccurrence(unsigned pos, StringRef ArgName,
StringRef Arg) override {
typename ParserClass::parser_data_type Val =
typename ParserClass::parser_data_type();
if (Parser.parse(*this, ArgName, Arg, Val))
return true; // Parse error!
this->setValue(Val);
this->setPosition(pos);
Callback(Val);
return false;
}
|
subq $0x68, %rsp
movq %rdx, 0x50(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq 0x38(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movb $0x0, 0x33(%rsp)
movq %rsi, %rdi
addq $0x98, %rdi
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
leaq 0x33(%rsp), %rax
movq %rax, (%rsp)
callq 0xfdfc0
testb $0x1, %al
jne 0xfdf6a
jmp 0xfdf71
movb $0x1, 0x67(%rsp)
jmp 0xfdfb2
movq 0x8(%rsp), %rdi
addq $0x80, %rdi
leaq 0x33(%rsp), %rsi
xorl %edx, %edx
callq 0xfe430
movq 0x8(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0xcd600
movq 0x8(%rsp), %rdi
addq $0xa0, %rdi
leaq 0x33(%rsp), %rsi
callq 0xcd620
movb $0x0, 0x67(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
nopl (%rax)
|
/llvm/Support/CommandLine.h
|
char const** llvm::SmallVectorImpl<char const*>::insert<char const**, void>(char const**, char const**, char const**)
|
iterator insert(iterator I, ItTy From, ItTy To) {
// Convert iterator to elt# to avoid invalidating iterator when we reserve()
size_t InsertElt = I - this->begin();
if (I == this->end()) { // Important special case for empty vector.
append(From, To);
return this->begin()+InsertElt;
}
assert(this->isReferenceToStorage(I) && "Insertion iterator is out of bounds.");
// Check that the reserve that follows doesn't invalidate the iterators.
this->assertSafeToAddRange(From, To);
size_t NumToInsert = std::distance(From, To);
// Ensure there is enough space.
reserve(this->size() + NumToInsert);
// Uninvalidate the iterator.
I = this->begin()+InsertElt;
// If there are more elements between the insertion point and the end of the
// range than there are being inserted, we can use a simple approach to
// insertion. Since we already reserved space, we know that this won't
// reallocate the vector.
if (size_t(this->end()-I) >= NumToInsert) {
T *OldEnd = this->end();
append(std::move_iterator<iterator>(this->end() - NumToInsert),
std::move_iterator<iterator>(this->end()));
// Copy the existing elements that get replaced.
std::move_backward(I, OldEnd-NumToInsert, OldEnd);
std::copy(From, To, I);
return I;
}
// Otherwise, we're inserting more elements than exist already, and we're
// not inserting at the end.
// Move over the elements that we're about to overwrite.
T *OldEnd = this->end();
this->set_size(this->size() + NumToInsert);
size_t NumOverwritten = OldEnd-I;
this->uninitialized_move(I, OldEnd, this->end()-NumOverwritten);
// Replace the overwritten part.
for (T *J = I; NumOverwritten > 0; --NumOverwritten) {
*J = *From;
++J; ++From;
}
// Insert the non-overwritten middle part.
this->uninitialized_copy(From, To, OldEnd);
return I;
}
|
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x101ab0
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movq 0x20(%rsp), %rax
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, 0x68(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x101ac0
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jne 0x10360f
movq 0x18(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x11ceb0
movq 0x18(%rsp), %rdi
callq 0x101ab0
movq 0x68(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x90(%rsp)
jmp 0x103843
movq 0x18(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x11cf60
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x76300
movq 0x18(%rsp), %rdi
movq %rax, 0x60(%rsp)
callq 0x77b60
movq 0x18(%rsp), %rdi
movq %rax, %rsi
addq 0x60(%rsp), %rsi
callq 0x11d020
movq 0x18(%rsp), %rdi
callq 0x101ab0
movq 0x18(%rsp), %rdi
movq 0x68(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x80(%rsp)
callq 0x101ac0
movq 0x80(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
cmpq 0x60(%rsp), %rax
jb 0x103745
movq 0x18(%rsp), %rdi
callq 0x101ac0
movq 0x18(%rsp), %rdi
movq %rax, 0x58(%rsp)
callq 0x101ac0
movq %rax, %rsi
xorl %eax, %eax
subq 0x60(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
leaq 0x50(%rsp), %rdi
callq 0x11d130
movq 0x18(%rsp), %rdi
callq 0x101ac0
movq %rax, %rsi
leaq 0x48(%rsp), %rdi
callq 0x11d130
movq 0x18(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x11d060
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
xorl %eax, %eax
subq 0x60(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x58(%rsp), %rdx
callq 0x79b80
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x758e0
movq 0x80(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0x103843
movq 0x18(%rsp), %rdi
callq 0x101ac0
movq 0x18(%rsp), %rdi
movq %rax, 0x40(%rsp)
callq 0x77b60
movq 0x18(%rsp), %rdi
movq %rax, %rsi
addq 0x60(%rsp), %rsi
callq 0x793a0
movq 0x18(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x80(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x101ac0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
xorl %eax, %eax
subq 0x38(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
callq 0x11d1f0
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x38(%rsp)
jbe 0x10381b
movq 0x78(%rsp), %rax
movq (%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x78(%rsp)
movq 0x38(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x1037d7
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x40(%rsp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x11d220
movq 0x80(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
/llvm/ADT/SmallVector.h
|
llvm::cl::ExpansionContext::readConfigFile(llvm::StringRef, llvm::SmallVectorImpl<char const*>&)
|
Error ExpansionContext::readConfigFile(StringRef CfgFile,
SmallVectorImpl<const char *> &Argv) {
SmallString<128> AbsPath;
if (sys::path::is_relative(CfgFile)) {
AbsPath.assign(CfgFile);
if (std::error_code EC = FS->makeAbsolute(AbsPath))
return make_error<StringError>(
EC, Twine("cannot get absolute path for " + CfgFile));
CfgFile = AbsPath.str();
}
InConfigFile = true;
RelativeNames = true;
if (Error Err = expandResponseFile(CfgFile, Argv))
return Err;
return expandResponseFiles(Argv);
}
|
subq $0x178, %rsp # imm = 0x178
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x170(%rsp)
movq %rdx, 0x160(%rsp)
movq %rcx, 0x168(%rsp)
movq %rsi, 0x158(%rsp)
movq %r8, 0x150(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0xb2070
leaq 0x90(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x87a30
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
callq 0x799a0
testb $0x1, %al
jne 0x103f92
jmp 0x104069
movq 0x160(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0xb8(%rsp), %rdi
callq 0xbc250
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movq (%rdi), %rax
leaq 0xb8(%rsp), %rsi
callq *0x68(%rax)
movl %eax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xa8340
testb $0x1, %al
jne 0x103fff
jmp 0x104038
leaq 0x48(%rsp), %rdi
leaq 0xb6f7d(%rip), %rsi # 0x1baf88
leaq 0x160(%rsp), %rdx
callq 0x1022e0
movq (%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x78710
movl $0x1, 0x44(%rsp)
jmp 0x10410e
leaq 0xb8(%rsp), %rdi
callq 0xb8b70
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x160(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x168(%rsp)
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
movb $0x1, 0x3a(%rsi)
movb $0x1, 0x38(%rsi)
movb $0x0, 0x2f(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x150(%rsp), %r8
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x100eb0
movq (%rsp), %rdi
callq 0x9fdd0
testb $0x1, %al
jne 0x1040bf
jmp 0x1040ce
movb $0x1, 0x2f(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0x1040d6
movl $0x0, 0x44(%rsp)
testb $0x1, 0x2f(%rsp)
jne 0x1040e6
movq (%rsp), %rdi
callq 0x9f720
movl 0x44(%rsp), %eax
testl %eax, %eax
jne 0x10410e
jmp 0x1040f0
movq 0x10(%rsp), %rsi
movq (%rsp), %rdi
movq 0x150(%rsp), %rdx
callq 0x1023b0
movl $0x1, 0x44(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0xb2490
movq 0x8(%rsp), %rax
addq $0x178, %rsp # imm = 0x178
retq
nopl (%rax,%rax)
|
/Support/CommandLine.cpp
|
llvm::cl::generic_parser_base::getOptionWidth(llvm::cl::Option const&) const
|
size_t generic_parser_base::getOptionWidth(const Option &O) const {
if (O.hasArgStr()) {
size_t Size =
argPlusPrefixesSize(O.ArgStr) + EqValue.size();
for (unsigned i = 0, e = getNumOptions(); i != e; ++i) {
StringRef Name = getOption(i);
if (!shouldPrintOption(Name, getDescription(i), O))
continue;
size_t NameSize = Name.empty() ? EmptyOption.size() : Name.size();
Size = std::max(Size, NameSize + getOptionPrefixesSize());
}
return Size;
} else {
size_t BaseSize = 0;
for (unsigned i = 0, e = getNumOptions(); i != e; ++i)
BaseSize = std::max(BaseSize, getOption(i).size() + 8);
return BaseSize;
}
}
|
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movq %rsi, 0xb0(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x107a10
testb $0x1, %al
jne 0x1077ba
jmp 0x107971
movq 0xb0(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x98(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movl $0x2, %edx
callq 0x1062a0
movq %rax, 0x18(%rsp)
leaq 0x1238a8(%rip), %rdi # 0x22b0a8
callq 0x87d70
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movq 0x18(%rsp), %rax
addq %rcx, %rax
movq %rax, 0xa8(%rsp)
movl $0x0, 0x94(%rsp)
movq (%rdi), %rax
callq *0x10(%rax)
movl %eax, 0x90(%rsp)
movl 0x94(%rsp), %eax
cmpl 0x90(%rsp), %eax
je 0x10795c
movq 0x20(%rsp), %rdi
movl 0x94(%rsp), %esi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x20(%rsp), %rdi
movq %rax, 0x80(%rsp)
movq %rdx, 0x88(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movl 0x94(%rsp), %esi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movq 0xb0(%rsp), %r8
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x68(%rsp), %rcx
callq 0x107a30
testb $0x1, %al
jne 0x1078c8
jmp 0x107946
leaq 0x80(%rsp), %rdi
callq 0x86d90
testb $0x1, %al
jne 0x1078db
jmp 0x1078ee
leaq 0x1237d6(%rip), %rdi # 0x22b0b8
callq 0x87d70
movq %rax, 0x10(%rsp)
jmp 0x107900
leaq 0x80(%rsp), %rdi
callq 0x87d70
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x107aa0
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x50(%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x72e90
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x107835
movq 0xa8(%rsp), %rax
movq %rax, 0xc0(%rsp)
jmp 0x1079f8
movq 0x20(%rsp), %rdi
movq $0x0, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
movq (%rdi), %rax
callq *0x10(%rax)
movl %eax, 0x40(%rsp)
movl 0x44(%rsp), %eax
cmpl 0x40(%rsp), %eax
je 0x1079eb
movq 0x20(%rsp), %rdi
movl 0x44(%rsp), %esi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x87d70
addq $0x8, %rax
movq %rax, 0x38(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x72e90
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x107991
movq 0x48(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
addq $0xc8, %rsp
retq
nopl (%rax,%rax)
|
/Support/CommandLine.cpp
|
llvm::cl::PrintHelpMessage(bool, bool)
|
void cl::PrintHelpMessage(bool Hidden, bool Categorized) {
if (!Hidden && !Categorized)
CommonOptions->UncategorizedNormalPrinter.printHelp();
else if (!Hidden && Categorized)
CommonOptions->CategorizedNormalPrinter.printHelp();
else if (Hidden && !Categorized)
CommonOptions->UncategorizedHiddenPrinter.printHelp();
else
CommonOptions->CategorizedHiddenPrinter.printHelp();
}
|
pushq %rax
movb %sil, %al
movb %dil, %cl
andb $0x1, %cl
movb %cl, 0x7(%rsp)
andb $0x1, %al
movb %al, 0x6(%rsp)
testb $0x1, 0x7(%rsp)
jne 0x109a88
testb $0x1, 0x6(%rsp)
jne 0x109a88
leaq 0x122d3f(%rip), %rdi # 0x22c7b8
callq 0x109b00
movq %rax, %rdi
callq 0x109b10
jmp 0x109af4
testb $0x1, 0x7(%rsp)
jne 0x109ab0
testb $0x1, 0x6(%rsp)
je 0x109ab0
leaq 0x122d1b(%rip), %rdi # 0x22c7b8
callq 0x109b00
movq %rax, %rdi
addq $0x20, %rdi
callq 0x109b10
jmp 0x109af2
testb $0x1, 0x7(%rsp)
je 0x109ad8
testb $0x1, 0x6(%rsp)
jne 0x109ad8
leaq 0x122cf3(%rip), %rdi # 0x22c7b8
callq 0x109b00
movq %rax, %rdi
addq $0x10, %rdi
callq 0x109b10
jmp 0x109af0
leaq 0x122cd9(%rip), %rdi # 0x22c7b8
callq 0x109b00
movq %rax, %rdi
addq $0x30, %rdi
callq 0x109b10
jmp 0x109af2
jmp 0x109af4
popq %rax
retq
nopw %cs:(%rax,%rax)
|
/Support/CommandLine.cpp
|
(anonymous namespace)::HelpPrinter::printHelp()
|
void printHelp() {
SubCommand *Sub = GlobalParser->getActiveSubCommand();
auto &OptionsMap = Sub->OptionsMap;
auto &PositionalOpts = Sub->PositionalOpts;
auto &ConsumeAfterOpt = Sub->ConsumeAfterOpt;
StrOptionPairVector Opts;
sortOpts(OptionsMap, Opts, ShowHidden);
StrSubCommandPairVector Subs;
sortSubCommands(GlobalParser->RegisteredSubCommands, Subs);
if (!GlobalParser->ProgramOverview.empty())
outs() << "OVERVIEW: " << GlobalParser->ProgramOverview << "\n";
if (Sub == &SubCommand::getTopLevel()) {
outs() << "USAGE: " << GlobalParser->ProgramName;
if (!Subs.empty())
outs() << " [subcommand]";
outs() << " [options]";
} else {
if (!Sub->getDescription().empty()) {
outs() << "SUBCOMMAND '" << Sub->getName()
<< "': " << Sub->getDescription() << "\n\n";
}
outs() << "USAGE: " << GlobalParser->ProgramName << " " << Sub->getName()
<< " [options]";
}
for (auto *Opt : PositionalOpts) {
if (Opt->hasArgStr())
outs() << " --" << Opt->ArgStr;
outs() << " " << Opt->HelpStr;
}
// Print the consume after option info if it exists...
if (ConsumeAfterOpt)
outs() << " " << ConsumeAfterOpt->HelpStr;
if (Sub == &SubCommand::getTopLevel() && !Subs.empty()) {
// Compute the maximum subcommand length...
size_t MaxSubLen = 0;
for (size_t i = 0, e = Subs.size(); i != e; ++i)
MaxSubLen = std::max(MaxSubLen, strlen(Subs[i].first));
outs() << "\n\n";
outs() << "SUBCOMMANDS:\n\n";
printSubCommands(Subs, MaxSubLen);
outs() << "\n";
outs() << " Type \"" << GlobalParser->ProgramName
<< " <subcommand> --help\" to get more help on a specific "
"subcommand";
}
outs() << "\n\n";
// Compute the maximum argument length...
size_t MaxArgLen = 0;
for (size_t i = 0, e = Opts.size(); i != e; ++i)
MaxArgLen = std::max(MaxArgLen, Opts[i].second->getOptionWidth());
outs() << "OPTIONS:\n";
printOptions(Opts, MaxArgLen);
// Print any extra help the user has declared.
for (const auto &I : GlobalParser->MoreHelp)
outs() << I;
GlobalParser->MoreHelp.clear();
}
|
subq $0x11a8, %rsp # imm = 0x11A8
movq %rdi, 0x11a0(%rsp)
movq 0x11a0(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x122c3d(%rip), %rdi # 0x22c770
callq 0xfe900
movq %rax, %rdi
callq 0xff370
movq %rax, 0x1198(%rsp)
movq 0x1198(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x1190(%rsp)
movq 0x1198(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x1188(%rsp)
movq 0x1198(%rsp), %rax
addq $0x98, %rax
movq %rax, 0x1180(%rsp)
leaq 0x970(%rsp), %rdi
callq 0x119160
movq 0x48(%rsp), %rax
movq 0x1190(%rsp), %rdi
movb 0x8(%rax), %al
leaq 0x970(%rsp), %rsi
andb $0x1, %al
movzbl %al, %edx
callq 0x119180
leaq 0x160(%rsp), %rdi
callq 0x119ac0
leaq 0x122ba5(%rip), %rdi # 0x22c770
callq 0xfe900
movq %rax, %rdi
addq $0x118, %rdi # imm = 0x118
leaq 0x160(%rsp), %rsi
callq 0x119ae0
leaq 0x122b82(%rip), %rdi # 0x22c770
callq 0xfe900
movq %rax, %rdi
addq $0x20, %rdi
callq 0x86d90
testb $0x1, %al
jne 0x109c69
callq 0x78810
movq %rax, %rdi
leaq 0xb1c71(%rip), %rsi # 0x1bb883
callq 0x985c0
movq %rax, 0x40(%rsp)
leaq 0x122b4d(%rip), %rdi # 0x22c770
callq 0xfe900
movq 0x40(%rsp), %rdi
movq 0x20(%rax), %rcx
movq %rcx, 0x150(%rsp)
movq 0x28(%rax), %rax
movq %rax, 0x158(%rsp)
movq 0x150(%rsp), %rsi
movq 0x158(%rsp), %rdx
callq 0x98810
movq %rax, %rdi
leaq 0xb1c69(%rip), %rsi # 0x1bb8cd
callq 0x985c0
movq 0x1198(%rsp), %rax
movq %rax, 0x38(%rsp)
callq 0xfef40
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jne 0x109cf8
callq 0x78810
movq %rax, %rdi
leaq 0xb1bf7(%rip), %rsi # 0x1bb88e
callq 0x985c0
movq %rax, 0x30(%rsp)
leaq 0x122ac8(%rip), %rdi # 0x22c770
callq 0xfe900
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0xa4fe0
leaq 0x160(%rsp), %rdi
callq 0x74ea0
testb $0x1, %al
jne 0x109cdf
callq 0x78810
movq %rax, %rdi
leaq 0xb1bbc(%rip), %rsi # 0x1bb896
callq 0x985c0
callq 0x78810
movq %rax, %rdi
leaq 0xb1bb6(%rip), %rsi # 0x1bb8a4
callq 0x985c0
jmp 0x109e63
movq 0x1198(%rsp), %rdi
callq 0x119c20
movq %rax, 0x140(%rsp)
movq %rdx, 0x148(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x86d90
xorb $-0x1, %al
testb $0x1, %al
jne 0x109d2d
jmp 0x109dd7
callq 0x78810
movq %rax, %rdi
leaq 0xb1b73(%rip), %rsi # 0x1bb8af
callq 0x985c0
movq %rax, 0x20(%rsp)
movq 0x1198(%rsp), %rdi
callq 0x1102b0
movq 0x20(%rsp), %rdi
movq %rax, 0x130(%rsp)
movq %rdx, 0x138(%rsp)
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
callq 0x98810
movq %rax, %rdi
leaq 0xb1160(%rip), %rsi # 0x1baee7
callq 0x985c0
movq %rax, 0x28(%rsp)
movq 0x1198(%rsp), %rdi
callq 0x119c20
movq 0x28(%rsp), %rdi
movq %rax, 0x120(%rsp)
movq %rdx, 0x128(%rsp)
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0x98810
movq %rax, %rdi
leaq 0xb1afa(%rip), %rsi # 0x1bb8cc
callq 0x985c0
callq 0x78810
movq %rax, %rdi
leaq 0xb1aa8(%rip), %rsi # 0x1bb88e
callq 0x985c0
movq %rax, 0x10(%rsp)
leaq 0x122979(%rip), %rdi # 0x22c770
callq 0xfe900
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xa4fe0
movq %rax, %rdi
leaq 0xb1b29(%rip), %rsi # 0x1bb93c
callq 0x985c0
movq %rax, 0x18(%rsp)
movq 0x1198(%rsp), %rdi
callq 0x1102b0
movq 0x18(%rsp), %rdi
movq %rax, 0x110(%rsp)
movq %rdx, 0x118(%rsp)
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x98810
movq %rax, %rdi
leaq 0xb1a46(%rip), %rsi # 0x1bb8a4
callq 0x985c0
movq 0x1188(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rdi
callq 0x10ce10
movq %rax, 0x100(%rsp)
movq 0x108(%rsp), %rdi
callq 0x10ccf0
movq %rax, 0xf8(%rsp)
movq 0x100(%rsp), %rax
cmpq 0xf8(%rsp), %rax
je 0x109f8a
movq 0x100(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rdi
callq 0x107a10
testb $0x1, %al
jne 0x109ed9
jmp 0x109f25
callq 0x78810
movq %rax, %rdi
leaq 0xb19d4(%rip), %rsi # 0x1bb8bc
callq 0x985c0
movq %rax, %rdi
movq 0xf0(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0xe0(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
callq 0x98810
callq 0x78810
movq %rax, %rdi
leaq 0xb1a08(%rip), %rsi # 0x1bb93c
callq 0x985c0
movq %rax, %rdi
movq 0xf0(%rsp), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0xd0(%rsp)
movq 0x28(%rax), %rax
movq %rax, 0xd8(%rsp)
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
callq 0x98810
movq 0x100(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x100(%rsp)
jmp 0x109e9d
movq 0x1180(%rsp), %rax
cmpq $0x0, (%rax)
je 0x109fe7
callq 0x78810
movq %rax, %rdi
leaq 0xb1995(%rip), %rsi # 0x1bb93c
callq 0x985c0
movq %rax, %rdi
movq 0x1180(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0xc0(%rsp)
movq 0x28(%rax), %rax
movq %rax, 0xc8(%rsp)
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
callq 0x98810
movq 0x1198(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0xfef40
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jne 0x10a14e
leaq 0x160(%rsp), %rdi
callq 0x74ea0
testb $0x1, %al
jne 0x10a14e
movq $0x0, 0xb8(%rsp)
movq $0x0, 0xb0(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x77b60
movq %rax, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
je 0x10a0b9
movq 0xb0(%rsp), %rsi
leaq 0x160(%rsp), %rdi
callq 0x119c40
movq (%rax), %rdi
callq 0x745d0
movq %rax, 0xa0(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x72e90
movq (%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xb0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb0(%rsp)
jmp 0x10a04c
callq 0x78810
movq %rax, %rdi
leaq 0xb1804(%rip), %rsi # 0x1bb8cc
callq 0x985c0
callq 0x78810
movq %rax, %rdi
leaq 0xb17e4(%rip), %rsi # 0x1bb8c0
callq 0x985c0
movq 0x48(%rsp), %rdi
movq 0xb8(%rsp), %rdx
leaq 0x160(%rsp), %rsi
callq 0x119c70
callq 0x78810
movq %rax, %rdi
leaq 0xb17c3(%rip), %rsi # 0x1bb8cd
callq 0x985c0
callq 0x78810
movq %rax, %rdi
leaq 0xb17b1(%rip), %rsi # 0x1bb8cf
callq 0x985c0
movq %rax, (%rsp)
leaq 0x122642(%rip), %rdi # 0x22c770
callq 0xfe900
movq (%rsp), %rdi
movq %rax, %rsi
callq 0xa4fe0
movq %rax, %rdi
leaq 0xb178f(%rip), %rsi # 0x1bb8d8
callq 0x985c0
callq 0x78810
movq %rax, %rdi
leaq 0xb176f(%rip), %rsi # 0x1bb8cc
callq 0x985c0
movq $0x0, 0x98(%rsp)
movq $0x0, 0x90(%rsp)
leaq 0x970(%rsp), %rdi
callq 0x77b60
movq %rax, 0x88(%rsp)
movq 0x90(%rsp), %rax
cmpq 0x88(%rsp), %rax
je 0x10a1fe
movq 0x90(%rsp), %rsi
leaq 0x970(%rsp), %rdi
callq 0x1124c0
movq 0x8(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq %rax, 0x80(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x72e90
movq (%rax), %rax
movq %rax, 0x98(%rsp)
movq 0x90(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x90(%rsp)
jmp 0x10a18f
callq 0x78810
movq %rax, %rdi
leaq 0xb170b(%rip), %rsi # 0x1bb918
callq 0x985c0
movq 0x48(%rsp), %rdi
movq 0x98(%rsp), %rdx
movq (%rdi), %rax
leaq 0x970(%rsp), %rsi
callq *(%rax)
leaq 0x12253d(%rip), %rdi # 0x22c770
callq 0xfe900
addq $0x30, %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x98d50
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x98b80
movq %rax, 0x68(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x74960
testb $0x1, %al
jne 0x10a274
jmp 0x10a2bc
leaq 0x70(%rsp), %rdi
callq 0x99220
movq %rax, 0x60(%rsp)
callq 0x78810
movq %rax, %rdi
movq 0x60(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x50(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x98810
leaq 0x70(%rsp), %rdi
callq 0x119e00
jmp 0x10a25f
leaq 0x1224ad(%rip), %rdi # 0x22c770
callq 0xfe900
movq %rax, %rdi
addq $0x30, %rdi
callq 0x110190
leaq 0x160(%rsp), %rdi
callq 0x119e20
leaq 0x970(%rsp), %rdi
callq 0x1193a0
addq $0x11a8, %rsp # imm = 0x11A8
retq
nopw %cs:(%rax,%rax)
|
/Support/CommandLine.cpp
|
(anonymous namespace)::VersionPrinter::print(std::vector<std::function<void (llvm::raw_ostream&)>, std::allocator<std::function<void (llvm::raw_ostream&)>>>)
|
void print(std::vector<VersionPrinterTy> ExtraPrinters = {}) {
raw_ostream &OS = outs();
#ifdef PACKAGE_VENDOR
OS << PACKAGE_VENDOR << " ";
#else
OS << "LLVM (http://llvm.org/):\n ";
#endif
OS << PACKAGE_NAME << " version " << PACKAGE_VERSION << "\n ";
#if LLVM_IS_DEBUG_BUILD
OS << "DEBUG build";
#else
OS << "Optimized build";
#endif
#ifndef NDEBUG
OS << " with assertions";
#endif
OS << ".\n";
// Iterate over any registered extra printers and call them to add further
// information.
if (!ExtraPrinters.empty()) {
for (const auto &I : ExtraPrinters)
I(outs());
}
}
|
subq $0x48, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
callq 0x78810
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
leaq 0xb14b9(%rip), %rsi # 0x1bb922
callq 0x985c0
movq 0x30(%rsp), %rdi
leaq 0xb14c4(%rip), %rsi # 0x1bb93e
callq 0x985c0
movq %rax, %rdi
leaq 0xb14ba(%rip), %rsi # 0x1bb943
callq 0x985c0
movq %rax, %rdi
leaq 0xb14b5(%rip), %rsi # 0x1bb94d
callq 0x985c0
movq %rax, %rdi
leaq 0xb1493(%rip), %rsi # 0x1bb93a
callq 0x985c0
movq 0x30(%rsp), %rdi
leaq 0xb149c(%rip), %rsi # 0x1bb954
callq 0x985c0
movq 0x30(%rsp), %rdi
leaq 0xb1af5(%rip), %rsi # 0x1bbfbe
callq 0x985c0
movq 0x8(%rsp), %rdi
callq 0x11a2b0
testb $0x1, %al
jne 0x10a550
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x11a300
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x11a330
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x76a20
testb $0x1, %al
jne 0x10a519
jmp 0x10a54e
leaq 0x20(%rsp), %rdi
callq 0x11a3a0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
callq 0x78810
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x118df0
leaq 0x20(%rsp), %rdi
callq 0x11a3b0
jmp 0x10a504
jmp 0x10a550
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop
|
/Support/CommandLine.cpp
|
llvm::ConvertUTF8toWide(unsigned int, llvm::StringRef, char*&, unsigned char const*&)
|
bool ConvertUTF8toWide(unsigned WideCharWidth, llvm::StringRef Source,
char *&ResultPtr, const UTF8 *&ErrorPtr) {
assert(WideCharWidth == 1 || WideCharWidth == 2 || WideCharWidth == 4);
ConversionResult result = conversionOK;
// Copy the character span over.
if (WideCharWidth == 1) {
const UTF8 *Pos = reinterpret_cast<const UTF8*>(Source.begin());
if (!isLegalUTF8String(&Pos, reinterpret_cast<const UTF8*>(Source.end()))) {
result = sourceIllegal;
ErrorPtr = Pos;
} else {
memcpy(ResultPtr, Source.data(), Source.size());
ResultPtr += Source.size();
}
} else if (WideCharWidth == 2) {
const UTF8 *sourceStart = (const UTF8*)Source.data();
// FIXME: Make the type of the result buffer correct instead of
// using reinterpret_cast.
UTF16 *targetStart = reinterpret_cast<UTF16 *>(ResultPtr);
ConversionFlags flags = strictConversion;
result =
ConvertUTF8toUTF16(&sourceStart, sourceStart + Source.size(),
&targetStart, targetStart + Source.size(), flags);
if (result == conversionOK)
ResultPtr = reinterpret_cast<char *>(targetStart);
else
ErrorPtr = sourceStart;
} else if (WideCharWidth == 4) {
const UTF8 *sourceStart = (const UTF8 *)Source.data();
// FIXME: Make the type of the result buffer correct instead of
// using reinterpret_cast.
UTF32 *targetStart = reinterpret_cast<UTF32 *>(ResultPtr);
ConversionFlags flags = strictConversion;
result =
ConvertUTF8toUTF32(&sourceStart, sourceStart + Source.size(),
&targetStart, targetStart + Source.size(), flags);
if (result == conversionOK)
ResultPtr = reinterpret_cast<char *>(targetStart);
else
ErrorPtr = sourceStart;
}
assert((result != targetExhausted) &&
"ConvertUTF8toUTFXX exhausted target buffer");
return result == conversionOK;
}
|
subq $0xa8, %rsp
movq %rsi, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
movl %edi, 0x94(%rsp)
movq %rcx, 0x88(%rsp)
movq %r8, 0x80(%rsp)
movl $0x0, 0x7c(%rsp)
cmpl $0x1, 0x94(%rsp)
jne 0x11ed82
leaq 0x98(%rsp), %rdi
callq 0x8ffa0
movq %rax, 0x70(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x8bdc0
movq %rax, %rsi
leaq 0x70(%rsp), %rdi
callq 0x74410
cmpb $0x0, %al
jne 0x11ed1e
movl $0x3, 0x7c(%rsp)
movq 0x70(%rsp), %rcx
movq 0x80(%rsp), %rax
movq %rcx, (%rax)
jmp 0x11ed7d
movq 0x88(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x8cd00
movq %rax, 0x38(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x87d70
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rax, %rdx
callq 0x72670
leaq 0x98(%rsp), %rdi
callq 0x87d70
movq %rax, %rcx
movq 0x88(%rsp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x11ef1a
cmpl $0x2, 0x94(%rsp)
jne 0x11ee4e
leaq 0x98(%rsp), %rdi
callq 0x8cd00
movq %rax, 0x68(%rsp)
movq 0x88(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x60(%rsp)
movl $0x0, 0x5c(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x87d70
movq %rax, %rcx
movq 0x18(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x87d70
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rsi
shlq %rax
addq %rax, %rcx
movl 0x5c(%rsp), %r8d
leaq 0x68(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x727d0
movl %eax, 0x7c(%rsp)
cmpl $0x0, 0x7c(%rsp)
jne 0x11ee39
movq 0x60(%rsp), %rcx
movq 0x88(%rsp), %rax
movq %rcx, (%rax)
jmp 0x11ee49
movq 0x68(%rsp), %rcx
movq 0x80(%rsp), %rax
movq %rcx, (%rax)
jmp 0x11ef18
cmpl $0x4, 0x94(%rsp)
jne 0x11ef16
leaq 0x98(%rsp), %rdi
callq 0x8cd00
movq %rax, 0x50(%rsp)
movq 0x88(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
leaq 0x98(%rsp), %rdi
callq 0x87d70
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x87d70
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rsi
shlq $0x2, %rax
addq %rax, %rcx
movl 0x44(%rsp), %r8d
leaq 0x50(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x77f00
movl %eax, 0x7c(%rsp)
cmpl $0x0, 0x7c(%rsp)
jne 0x11ef04
movq 0x48(%rsp), %rcx
movq 0x88(%rsp), %rax
movq %rcx, (%rax)
jmp 0x11ef14
movq 0x50(%rsp), %rcx
movq 0x80(%rsp), %rax
movq %rcx, (%rax)
jmp 0x11ef16
jmp 0x11ef18
jmp 0x11ef1a
cmpl $0x0, 0x7c(%rsp)
sete %al
andb $0x1, %al
addq $0xa8, %rsp
retq
nopl (%rax)
|
/Support/ConvertUTFWrapper.cpp
|
llvm::CrashRecoveryContext::unregisterCleanup(llvm::CrashRecoveryContextCleanup*)
|
void
CrashRecoveryContext::unregisterCleanup(CrashRecoveryContextCleanup *cleanup) {
if (!cleanup)
return;
if (cleanup == head) {
head = cleanup->next;
if (head)
head->prev = nullptr;
}
else {
cleanup->prev->next = cleanup->next;
if (cleanup->next)
cleanup->next->prev = cleanup->prev;
}
delete cleanup;
}
|
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x123425
jmp 0x1234b6
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
cmpq 0x8(%rcx), %rax
jne 0x123461
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, 0x8(%rax)
cmpq $0x0, 0x8(%rax)
je 0x12345f
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x18(%rax)
jmp 0x12349b
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x123499
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
jmp 0x12349b
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x1234b6
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
/Support/CrashRecoveryContext.cpp
|
llvm::isCurrentDebugType(char const*)
|
bool isCurrentDebugType(const char *DebugType) {
if (CurrentDebugType->empty())
return true;
// See if DebugType is in list. Note: do not use find() as that forces us to
// unnecessarily create an std::string instance.
for (auto &d : *CurrentDebugType) {
if (d == DebugType)
return true;
}
return false;
}
|
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
leaq 0x108a58(%rip), %rdi # 0x22cb98
callq 0x1241f0
movq %rax, %rdi
callq 0x124200
testb $0x1, %al
jne 0x124153
jmp 0x12415d
movb $0x1, 0x37(%rsp)
jmp 0x1241df
leaq 0x108a34(%rip), %rdi # 0x22cb98
callq 0x124250
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1242a0
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1242d0
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x74bf0
testb $0x1, %al
jne 0x1241a1
jmp 0x1241da
leaq 0x18(%rsp), %rdi
callq 0x124340
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x74eb0
testb $0x1, %al
jne 0x1241c5
jmp 0x1241cc
movb $0x1, 0x37(%rsp)
jmp 0x1241df
jmp 0x1241ce
leaq 0x18(%rsp), %rdi
callq 0x124380
jmp 0x12418c
movb $0x0, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw (%rax,%rax)
|
/Support/Debug.cpp
|
llvm::DenseMapBase<llvm::DenseMap<unsigned int, llvm::DebugCounter::CounterInfo, llvm::DenseMapInfo<unsigned int, void>, llvm::detail::DenseMapPair<unsigned int, llvm::DebugCounter::CounterInfo>>, unsigned int, llvm::DebugCounter::CounterInfo, llvm::DenseMapInfo<unsigned int, void>, llvm::detail::DenseMapPair<unsigned int, llvm::DebugCounter::CounterInfo>>::initEmpty()
|
void initEmpty() {
setNumEntries(0);
setNumTombstones(0);
assert((getNumBuckets() & (getNumBuckets()-1)) == 0 &&
"# initial buckets must be a power of two!");
const KeyT EmptyKey = getEmptyKey();
for (BucketT *B = getBuckets(), *E = getBucketsEnd(); B != E; ++B)
::new (&B->getFirst()) KeyT(EmptyKey);
}
|
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x126c40
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x126c60
callq 0x126c80
movq (%rsp), %rdi
movl %eax, 0x1c(%rsp)
callq 0x126c90
movq (%rsp), %rdi
movq %rax, 0x10(%rsp)
callq 0x126ca0
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x126c37
movq 0x10(%rsp), %rdi
callq 0x126ce0
movl 0x1c(%rsp), %ecx
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x10(%rsp)
jmp 0x126c09
addq $0x28, %rsp
retq
nopl (%rax)
|
/llvm/ADT/DenseMap.h
|
int llvm::array_pod_sort_comparator<llvm::StringRef>(void const*, void const*)
|
inline int array_pod_sort_comparator(const void *P1, const void *P2) {
if (std::less<T>()(*reinterpret_cast<const T*>(P1),
*reinterpret_cast<const T*>(P2)))
return -1;
if (std::less<T>()(*reinterpret_cast<const T*>(P2),
*reinterpret_cast<const T*>(P1)))
return 1;
return 0;
}
|
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0xf(%rsp), %rdi
callq 0x12ba50
testb $0x1, %al
jne 0x12ba08
jmp 0x12ba12
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x12ba3e
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0xe(%rsp), %rdi
callq 0x12ba50
testb $0x1, %al
jne 0x12ba2c
jmp 0x12ba36
movl $0x1, 0x24(%rsp)
jmp 0x12ba3e
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
|
/llvm/ADT/STLExtras.h
|
llvm::errorToErrorCode(llvm::Error)
|
std::error_code errorToErrorCode(Error Err) {
std::error_code EC;
handleAllErrors(std::move(Err), [&](const ErrorInfoBase &EI) {
EC = EI.convertToErrorCode();
});
if (EC == inconvertibleErrorCode())
report_fatal_error(Twine(EC.message()));
return EC;
}
|
subq $0x88, %rsp
movq %rdi, (%rsp)
movq %rdi, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
callq 0xa82c0
movq (%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0x9fe60
leaq 0x78(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x12c450
leaq 0x68(%rsp), %rdi
callq 0x9f720
callq 0x12c0b0
movl %eax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x79f90
testb $0x1, %al
jne 0x12c40e
jmp 0x12c43b
leaq 0x8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xa8510
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x7ae20
leaq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x724c0
movl 0x78(%rsp), %eax
movq 0x80(%rsp), %rdx
addq $0x88, %rsp
retq
nop
|
/Support/Error.cpp
|
(anonymous namespace)::GraphSession::TryFindProgram(llvm::StringRef, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
|
bool TryFindProgram(StringRef Names, std::string &ProgramPath) {
raw_string_ostream Log(LogBuffer);
SmallVector<StringRef, 8> parts;
Names.split(parts, '|');
for (auto Name : parts) {
if (ErrorOr<std::string> P = sys::findProgramByName(Name)) {
ProgramPath = *P;
return true;
}
Log << " Tried '" << Name << "'\n";
}
return false;
}
|
subq $0x178, %rsp # imm = 0x178
movq %rsi, 0x160(%rsp)
movq %rdx, 0x168(%rsp)
movq %rdi, 0x158(%rsp)
movq %rcx, 0x150(%rsp)
movq 0x158(%rsp), %rsi
leaq 0x118(%rsp), %rdi
callq 0xa1e70
leaq 0x88(%rsp), %rdi
callq 0xbf030
leaq 0x160(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movl $0x7c, %edx
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
movl $0x1, %r8d
callq 0x75bb0
leaq 0x88(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
callq 0x86ed0
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x86ee0
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x70(%rsp), %rax
je 0x131d97
movq 0x78(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x60(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x73e90
leaq 0x18(%rsp), %rdi
callq 0xc6f60
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
leaq 0x38(%rsp), %rdi
callq 0x733c0
leaq 0x38(%rsp), %rdi
callq 0xc7010
testb $0x1, %al
jne 0x131cf5
jmp 0x131d21
leaq 0x38(%rsp), %rdi
callq 0xc7030
movq %rax, %rsi
movq 0x150(%rsp), %rdi
callq 0x79880
movb $0x1, 0x177(%rsp)
movl $0x1, 0x14(%rsp)
jmp 0x131d29
movl $0x0, 0x14(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xc6fb0
movl 0x14(%rsp), %eax
testl %eax, %eax
jne 0x131da7
jmp 0x131d3d
leaq 0x118(%rsp), %rdi
leaq 0x8a0ec(%rip), %rsi # 0x1bbe38
callq 0x985c0
movq %rax, %rdi
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x98810
movq %rax, %rdi
leaq 0x89817(%rip), %rsi # 0x1bb596
callq 0x985c0
movq 0x78(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x78(%rsp)
jmp 0x131c72
movb $0x0, 0x177(%rsp)
movl $0x1, 0x14(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xbf110
leaq 0x118(%rsp), %rdi
callq 0xa1ec0
movb 0x177(%rsp), %al
andb $0x1, %al
addq $0x178, %rsp # imm = 0x178
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
/Support/GraphWriter.cpp
|
llvm::cl::opt<unsigned long, false, llvm::cl::parser<unsigned long>>::printOptionValue(unsigned long, bool) const
|
void printOptionValue(size_t GlobalWidth, bool Force) const override {
if (Force || !this->getDefault().compare(this->getValue())) {
cl::printOptionDiff<ParserClass>(*this, Parser, this->getValue(),
this->getDefault(), GlobalWidth);
}
}
|
subq $0x48, %rsp
movb %dl, %al
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
andb $0x1, %al
movb %al, 0x37(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movb $0x1, %al
testb $0x1, 0x37(%rsp)
movb %al, 0x1f(%rsp)
jne 0x13abae
movq 0x10(%rsp), %rdi
addq $0x80, %rdi
callq 0x13b390
movq 0x10(%rsp), %rdi
movq %rax, 0x8(%rsp)
addq $0x80, %rdi
callq 0x13b3a0
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rsi
callq 0x13ad50
xorb $-0x1, %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x13abb8
jmp 0x13ac07
movq 0x10(%rsp), %rdi
movq %rdi, %rax
addq $0xa0, %rax
movq %rax, (%rsp)
addq $0x80, %rdi
callq 0x13b3a0
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x80, %rdi
callq 0x13b390
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
movq %rax, %rcx
movq 0x38(%rsp), %r8
leaq 0x20(%rsp), %rdx
callq 0x781c0
addq $0x48, %rsp
retq
nopl (%rax)
|
/llvm/Support/CommandLine.h
|
llvm::initStatisticOptions()
|
void llvm::initStatisticOptions() {
static cl::opt<bool, true> registerEnableStats{
"stats",
cl::desc(
"Enable statistics output from program (available with Asserts)"),
cl::location(EnableStats), cl::Hidden};
static cl::opt<bool, true> registerStatsAsJson{
"stats-json", cl::desc("Display statistics as json data"),
cl::location(StatsAsJSON), cl::Hidden};
}
|
subq $0x68, %rsp
cmpb $0x0, 0xef57d(%rip) # 0x22cf98
jne 0x13dabc
leaq 0xef570(%rip), %rdi # 0x22cf98
callq 0x741f0
cmpl $0x0, %eax
je 0x13dabc
leaq 0x48(%rsp), %rdi
leaq 0x7e4d4(%rip), %rsi # 0x1bbf16
callq 0x7e720
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0xcc390
leaq 0xef53e(%rip), %rdi # 0x22cfa0
callq 0x78110
movq %rax, 0x40(%rsp)
movl $0x1, 0x3c(%rsp)
leaq 0xef45d(%rip), %rdi # 0x22ced8
leaq 0x7e48e(%rip), %rsi # 0x1bbf10
leaq 0x58(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x3c(%rsp), %r8
callq 0x13db70
leaq -0x7125d(%rip), %rdi # 0xcc840
leaq 0xef434(%rip), %rsi # 0x22ced8
leaq 0xed5d5(%rip), %rdx # 0x22b080
callq 0x778f0
leaq 0xef4e1(%rip), %rdi # 0x22cf98
callq 0x75450
cmpb $0x0, 0xef5a5(%rip) # 0x22d068
jne 0x13db64
leaq 0xef598(%rip), %rdi # 0x22d068
callq 0x741f0
cmpl $0x0, %eax
je 0x13db64
leaq 0x18(%rsp), %rdi
leaq 0x7e476(%rip), %rsi # 0x1bbf60
callq 0x7e720
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0xcc390
leaq 0xef566(%rip), %rdi # 0x22d070
callq 0x78110
movq %rax, 0x10(%rsp)
movl $0x1, 0xc(%rsp)
leaq 0xef485(%rip), %rdi # 0x22cfa8
leaq 0x7e42b(%rip), %rsi # 0x1bbf55
leaq 0x28(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
callq 0x13dc10
leaq -0x71305(%rip), %rdi # 0xcc840
leaq 0xef45c(%rip), %rsi # 0x22cfa8
leaq 0xed52d(%rip), %rdx # 0x22b080
callq 0x778f0
leaq 0xef509(%rip), %rdi # 0x22d068
callq 0x75450
addq $0x68, %rsp
retq
nopl (%rax)
|
/Support/Statistic.cpp
|
llvm::NamedRegionTimer::NamedRegionTimer(llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::StringRef, bool)
|
NamedRegionTimer::NamedRegionTimer(StringRef Name, StringRef Description,
StringRef GroupName,
StringRef GroupDescription, bool Enabled)
: TimeRegion(!Enabled ? nullptr
: &NamedGroupedTimers->get(Name, Description, GroupName,
GroupDescription)) {}
|
subq $0xb8, %rsp
movb %r9b, %al
leaq 0xd0(%rsp), %r9
movq %r9, 0x30(%rsp)
leaq 0xc0(%rsp), %r9
movq %r9, 0x38(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0xa0(%rsp)
movq %rdi, 0x90(%rsp)
andb $0x1, %al
movb %al, 0x8f(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x40(%rsp)
testb $0x1, 0x8f(%rsp)
jne 0x148088
xorl %eax, %eax
movq %rax, 0x28(%rsp)
jmp 0x148146
leaq 0xe5099(%rip), %rdi # 0x22d128
callq 0x148160
movq 0x38(%rsp), %rcx
movq %rax, %rdi
movq 0x30(%rsp), %rax
movq 0xa8(%rsp), %rdx
movq %rdx, 0x78(%rsp)
movq 0xb0(%rsp), %rdx
movq %rdx, 0x80(%rsp)
movq 0x98(%rsp), %rdx
movq %rdx, 0x68(%rsp)
movq 0xa0(%rsp), %rdx
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rcx), %rcx
movq %rcx, 0x60(%rsp)
movq (%rax), %rcx
movq %rcx, 0x48(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %r8
leaq 0x58(%rsp), %r9
leaq 0x48(%rsp), %rax
movq (%r9), %r10
movq %r10, (%rsp)
movq 0x8(%r9), %r9
movq %r9, 0x8(%rsp)
movq (%rax), %r9
movq %r9, 0x10(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x148170
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x148360
addq $0xb8, %rsp
retq
nopl (%rax)
|
/Support/Timer.cpp
|
llvm::vfs::RedirectingFileSystem::status(llvm::Twine const&)
|
ErrorOr<Status> RedirectingFileSystem::status(const Twine &OriginalPath) {
SmallString<256> Path;
OriginalPath.toVector(Path);
if (std::error_code EC = makeAbsolute(Path))
return EC;
if (Redirection == RedirectKind::Fallback) {
// Attempt to find the original file first, only falling back to the
// mapped file if that fails.
ErrorOr<Status> S = getExternalStatus(Path, OriginalPath);
if (S)
return S;
}
ErrorOr<RedirectingFileSystem::LookupResult> Result = lookupPath(Path);
if (!Result) {
// Was not able to map file, fallthrough to using the original path if
// that was the specified redirection type.
if (Redirection == RedirectKind::Fallthrough &&
isFileNotFound(Result.getError()))
return getExternalStatus(Path, OriginalPath);
return Result.getError();
}
ErrorOr<Status> S = status(Path, OriginalPath, *Result);
if (!S && Redirection == RedirectKind::Fallthrough &&
isFileNotFound(S.getError(), Result->E)) {
// Mapped the file but it wasn't found in the underlying filesystem,
// fallthrough to using the original path if that was the specified
// redirection type.
return getExternalStatus(Path, OriginalPath);
}
return S;
}
|
subq $0x408, %rsp # imm = 0x408
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x400(%rsp)
movq %rsi, 0x3f8(%rsp)
movq %rdx, 0x3f0(%rsp)
movq 0x3f8(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x2d8(%rsp), %rdi
callq 0xa4b00
movq 0x3f0(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x73970
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
leaq 0x2d8(%rsp), %rsi
callq *0x68(%rax)
movl %eax, 0x2c8(%rsp)
movq %rdx, 0x2d0(%rsp)
leaq 0x2c8(%rsp), %rdi
callq 0xa8340
testb $0x1, %al
jne 0x15a6a0
jmp 0x15a6e9
movq 0x10(%rsp), %rdi
movq 0x2c8(%rsp), %rax
movq %rax, 0x2b8(%rsp)
movq 0x2d0(%rsp), %rax
movq %rax, 0x2c0(%rsp)
movl 0x2b8(%rsp), %esi
movq 0x2c0(%rsp), %rdx
callq 0x150650
movl $0x1, 0x2b4(%rsp)
jmp 0x15a9c8
movq 0x20(%rsp), %rax
cmpl $0x1, 0x78(%rax)
jne 0x15a78b
movb $0x0, 0x2b3(%rsp)
leaq 0x288(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x893f0
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdi
movq 0x3f0(%rsp), %rcx
leaq 0x288(%rsp), %rdx
callq 0x15a520
movq 0x10(%rsp), %rdi
callq 0x1030e0
testb $0x1, %al
jne 0x15a744
jmp 0x15a759
movb $0x1, 0x2b3(%rsp)
movl $0x1, 0x2b4(%rsp)
jmp 0x15a764
movl $0x0, 0x2b4(%rsp)
testb $0x1, 0x2b3(%rsp)
jne 0x15a778
movq 0x10(%rsp), %rdi
callq 0x1038c0
movl 0x2b4(%rsp), %eax
testl %eax, %eax
jne 0x15a9c8
jmp 0x15a789
jmp 0x15a78b
leaq 0x2d8(%rsp), %rdi
callq 0xb3be0
movq 0x20(%rsp), %rsi
movq %rax, 0x130(%rsp)
movq %rdx, 0x138(%rsp)
movq 0x130(%rsp), %rdx
movq 0x138(%rsp), %rcx
leaq 0x140(%rsp), %rdi
callq 0x155620
leaq 0x140(%rsp), %rdi
callq 0x155a60
testb $0x1, %al
jne 0x15a8ad
movq 0x20(%rsp), %rax
cmpl $0x0, 0x78(%rax)
jne 0x15a868
leaq 0x140(%rsp), %rdi
callq 0x155ae0
movl %eax, 0x120(%rsp)
movq %rdx, 0x128(%rsp)
movl 0x120(%rsp), %edi
movq 0x128(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x155a80
testb $0x1, %al
jne 0x15a824
jmp 0x15a868
leaq 0xf8(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x893f0
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x3f0(%rsp), %rcx
leaq 0xf8(%rsp), %rdx
callq 0x15a520
movl $0x1, 0x2b4(%rsp)
jmp 0x15a9bb
leaq 0x140(%rsp), %rdi
callq 0x155ae0
movq 0x10(%rsp), %rdi
movl %eax, 0xe8(%rsp)
movq %rdx, 0xf0(%rsp)
movl 0xe8(%rsp), %esi
movq 0xf0(%rsp), %rdx
callq 0x150650
movl $0x1, 0x2b4(%rsp)
jmp 0x15a9bb
leaq 0x60(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x893f0
movq 0x3f0(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x155f00
movq 0x20(%rsp), %rsi
movq 0x8(%rsp), %rcx
movq %rax, %r8
leaq 0x88(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x155b40
leaq 0x88(%rsp), %rdi
callq 0x1030e0
testb $0x1, %al
jne 0x15a991
movq 0x20(%rsp), %rax
cmpl $0x0, 0x78(%rax)
jne 0x15a991
leaq 0x88(%rsp), %rdi
callq 0x103130
movl %eax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x155f10
movq 0x110(%rax), %rdx
movl 0x50(%rsp), %edi
movq 0x58(%rsp), %rsi
callq 0x155a80
testb $0x1, %al
jne 0x15a956
jmp 0x15a991
leaq 0x28(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x893f0
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x3f0(%rsp), %rcx
leaq 0x28(%rsp), %rdx
callq 0x15a520
movl $0x1, 0x2b4(%rsp)
jmp 0x15a9ae
movq 0x10(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x15a3c0
movl $0x1, 0x2b4(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x1038c0
leaq 0x140(%rsp), %rdi
callq 0x156400
leaq 0x2d8(%rsp), %rdi
callq 0xa4ba0
movq 0x18(%rsp), %rax
addq $0x408, %rsp # imm = 0x408
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
/Support/VirtualFileSystem.cpp
|
(anonymous namespace)::RealFileSystem::adjustPath(llvm::Twine const&, llvm::SmallVectorImpl<char>&) const
|
Twine adjustPath(const Twine &Path, SmallVectorImpl<char> &Storage) const {
if (!WD || !*WD)
return Path;
Path.toVector(Storage);
sys::fs::make_absolute(WD->get().Resolved, Storage);
return Storage;
}
|
subq $0x58, %rsp
movq %rdi, (%rsp)
movq %rdi, 0x8(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x10, %rdi
callq 0x15f8c0
testb $0x1, %al
jne 0x15f825
jmp 0x15f83f
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0x15f8e0
movq %rax, %rdi
callq 0x15f8f0
testb $0x1, %al
jne 0x15f854
movq (%rsp), %rdi
movq 0x48(%rsp), %rsi
movl $0x28, %edx
callq 0x72670
jmp 0x15f8aa
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x73970
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0x15f910
movq %rax, %rdi
callq 0x15f920
movq %rax, %rsi
addq $0x98, %rsi
leaq 0x18(%rsp), %rdi
callq 0x893f0
movq 0x40(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x787c0
movq (%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x893f0
movq 0x8(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nop
|
/Support/VirtualFileSystem.cpp
|
llvm::DenseMapIterator<llvm::StringRef, llvm::vfs::RedirectingFileSystemParser::KeyStatus, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, llvm::vfs::RedirectingFileSystemParser::KeyStatus>, false>::RetreatPastEmptyBuckets()
|
void RetreatPastEmptyBuckets() {
assert(Ptr >= End);
const KeyT Empty = KeyInfoT::getEmptyKey();
const KeyT Tombstone = KeyInfoT::getTombstoneKey();
while (Ptr != End && (KeyInfoT::isEqual(Ptr[-1].getFirst(), Empty) ||
KeyInfoT::isEqual(Ptr[-1].getFirst(), Tombstone)))
--Ptr;
}
|
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x146620
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
callq 0x146650
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x8(%rsp), %rdx
movq (%rdx), %rcx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, 0x7(%rsp)
je 0x167e60
movq 0x8(%rsp), %rax
movq (%rax), %rdi
addq $-0x18, %rdi
callq 0x167540
movq (%rax), %rcx
movq %rcx, 0x40(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
callq 0x146460
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0x6(%rsp)
jne 0x167e58
movq 0x8(%rsp), %rax
movq (%rax), %rdi
addq $-0x18, %rdi
callq 0x167540
movq (%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0x146460
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x167e6a
jmp 0x167e7e
movq 0x8(%rsp), %rax
movq (%rax), %rcx
addq $-0x18, %rcx
movq %rcx, (%rax)
jmp 0x167d91
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
/llvm/ADT/DenseMap.h
|
std::pair<llvm::StringMapIterator<llvm::vfs::RedirectingFileSystem::Entry*>, bool> llvm::StringMap<llvm::vfs::RedirectingFileSystem::Entry*, llvm::MallocAllocator>::try_emplace_with_hash<>(llvm::StringRef, unsigned int)
|
std::pair<iterator, bool> try_emplace_with_hash(StringRef Key,
uint32_t FullHashValue,
ArgsTy &&...Args) {
unsigned BucketNo = LookupBucketFor(Key, FullHashValue);
StringMapEntryBase *&Bucket = TheTable[BucketNo];
if (Bucket && Bucket != getTombstoneVal())
return std::make_pair(iterator(TheTable + BucketNo, false),
false); // Already exists in map.
if (Bucket == getTombstoneVal())
--NumTombstones;
Bucket =
MapEntryTy::create(Key, getAllocator(), std::forward<ArgsTy>(Args)...);
++NumItems;
assert(NumItems + NumTombstones <= NumBuckets);
BucketNo = RehashTable(BucketNo);
return std::make_pair(iterator(TheTable + BucketNo, false), true);
}
|
subq $0xc8, %rsp
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rdi, 0xa0(%rsp)
movl %ecx, 0x9c(%rsp)
movq 0xa0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x90(%rsp)
movl 0x9c(%rsp), %ecx
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x77d80
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x98(%rsp)
movq (%rax), %rax
movl 0x98(%rsp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
cmpq $0x0, (%rax)
je 0x176988
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
callq 0x99ac0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
je 0x176988
movq 0x28(%rsp), %rax
movq (%rax), %rax
movl 0x98(%rsp), %ecx
leaq (%rax,%rcx,8), %rsi
leaq 0x78(%rsp), %rdi
movq %rdi, 0x18(%rsp)
xorl %edx, %edx
callq 0x176ac0
movq 0x18(%rsp), %rdi
movb $0x0, 0x77(%rsp)
leaq 0x77(%rsp), %rsi
callq 0x74010
movb %dl, 0x68(%rsp)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xb8(%rsp)
movb 0x68(%rsp), %al
movb %al, 0xc0(%rsp)
jmp 0x176a6a
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x99ac0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jne 0x1769b8
movq 0x28(%rsp), %rax
movl 0x10(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rax)
movq 0x28(%rsp), %rdi
movups 0xa8(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
callq 0x99bb0
movq %rax, %rdx
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x176b00
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, (%rax)
movl 0xc(%rdi), %eax
incl %eax
movl %eax, 0xc(%rdi)
movl 0x98(%rsp), %esi
callq 0x725e0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x98(%rsp)
movq (%rax), %rax
movl 0x98(%rsp), %ecx
leaq (%rax,%rcx,8), %rsi
leaq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
xorl %edx, %edx
callq 0x176ac0
movq 0x8(%rsp), %rdi
movb $0x1, 0x47(%rsp)
leaq 0x47(%rsp), %rsi
callq 0x74010
movb %dl, 0x38(%rsp)
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0xb8(%rsp)
movb 0x38(%rsp), %al
movb %al, 0xc0(%rsp)
movq 0xb8(%rsp), %rax
movb 0xc0(%rsp), %dl
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
/llvm/ADT/StringMap.h
|
llvm::vfs::RedirectingFileSystem::Entry* const* llvm::SmallVectorTemplateCommon<llvm::vfs::RedirectingFileSystem::Entry*, void>::reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<llvm::vfs::RedirectingFileSystem::Entry*, true>>(llvm::SmallVectorTemplateBase<llvm::vfs::RedirectingFileSystem::Entry*, true>*, llvm::vfs::RedirectingFileSystem::Entry* const&, unsigned long)
|
static const T *reserveForParamAndGetAddressImpl(U *This, const T &Elt,
size_t N) {
size_t NewSize = This->size() + N;
if (LLVM_LIKELY(NewSize <= This->capacity()))
return &Elt;
bool ReferencesStorage = false;
int64_t Index = -1;
if (!U::TakesParamByValue) {
if (LLVM_UNLIKELY(This->isReferenceToStorage(&Elt))) {
ReferencesStorage = true;
Index = &Elt - This->begin();
}
}
This->grow(NewSize);
return ReferencesStorage ? This->begin() + Index : &Elt;
}
|
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rdi
callq 0x77b60
addq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x72eb0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
ja 0x1778d4
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x177926
movb $0x0, 0x1f(%rsp)
movq $-0x1, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x177360
testb $0x1, 0x1f(%rsp)
je 0x177914
movq 0x38(%rsp), %rdi
callq 0x176e20
movq 0x10(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
jmp 0x17791d
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
|
/llvm/ADT/SmallVector.h
|
encodeUTF8(unsigned int, llvm::SmallVectorImpl<char>&)
|
static void encodeUTF8( uint32_t UnicodeScalarValue
, SmallVectorImpl<char> &Result) {
if (UnicodeScalarValue <= 0x7F) {
Result.push_back(UnicodeScalarValue & 0x7F);
} else if (UnicodeScalarValue <= 0x7FF) {
uint8_t FirstByte = 0xC0 | ((UnicodeScalarValue & 0x7C0) >> 6);
uint8_t SecondByte = 0x80 | (UnicodeScalarValue & 0x3F);
Result.push_back(FirstByte);
Result.push_back(SecondByte);
} else if (UnicodeScalarValue <= 0xFFFF) {
uint8_t FirstByte = 0xE0 | ((UnicodeScalarValue & 0xF000) >> 12);
uint8_t SecondByte = 0x80 | ((UnicodeScalarValue & 0xFC0) >> 6);
uint8_t ThirdByte = 0x80 | (UnicodeScalarValue & 0x3F);
Result.push_back(FirstByte);
Result.push_back(SecondByte);
Result.push_back(ThirdByte);
} else if (UnicodeScalarValue <= 0x10FFFF) {
uint8_t FirstByte = 0xF0 | ((UnicodeScalarValue & 0x1F0000) >> 18);
uint8_t SecondByte = 0x80 | ((UnicodeScalarValue & 0x3F000) >> 12);
uint8_t ThirdByte = 0x80 | ((UnicodeScalarValue & 0xFC0) >> 6);
uint8_t FourthByte = 0x80 | (UnicodeScalarValue & 0x3F);
Result.push_back(FirstByte);
Result.push_back(SecondByte);
Result.push_back(ThirdByte);
Result.push_back(FourthByte);
}
}
|
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movq %rsi, 0x18(%rsp)
cmpl $0x7f, 0x24(%rsp)
ja 0x17ed3d
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %eax
andl $0x7f, %eax
movsbl %al, %esi
callq 0xa4dc0
jmp 0x17eea4
cmpl $0x7ff, 0x24(%rsp) # imm = 0x7FF
ja 0x17ed8f
movl 0x24(%rsp), %eax
andl $0x7c0, %eax # imm = 0x7C0
shrl $0x6, %eax
orl $0xc0, %eax
movb %al, 0x17(%rsp)
movl 0x24(%rsp), %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, 0x16(%rsp)
movq 0x18(%rsp), %rdi
movsbl 0x17(%rsp), %esi
callq 0xa4dc0
movq 0x18(%rsp), %rdi
movsbl 0x16(%rsp), %esi
callq 0xa4dc0
jmp 0x17eea2
cmpl $0xffff, 0x24(%rsp) # imm = 0xFFFF
ja 0x17ee05
movl 0x24(%rsp), %eax
andl $0xf000, %eax # imm = 0xF000
shrl $0xc, %eax
orl $0xe0, %eax
movb %al, 0x15(%rsp)
movl 0x24(%rsp), %eax
andl $0xfc0, %eax # imm = 0xFC0
shrl $0x6, %eax
orl $0x80, %eax
movb %al, 0x14(%rsp)
movl 0x24(%rsp), %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, 0x13(%rsp)
movq 0x18(%rsp), %rdi
movsbl 0x15(%rsp), %esi
callq 0xa4dc0
movq 0x18(%rsp), %rdi
movsbl 0x14(%rsp), %esi
callq 0xa4dc0
movq 0x18(%rsp), %rdi
movsbl 0x13(%rsp), %esi
callq 0xa4dc0
jmp 0x17eea0
cmpl $0x10ffff, 0x24(%rsp) # imm = 0x10FFFF
ja 0x17ee9e
movl 0x24(%rsp), %eax
andl $0x1f0000, %eax # imm = 0x1F0000
shrl $0x12, %eax
orl $0xf0, %eax
movb %al, 0x12(%rsp)
movl 0x24(%rsp), %eax
andl $0x3f000, %eax # imm = 0x3F000
shrl $0xc, %eax
orl $0x80, %eax
movb %al, 0x11(%rsp)
movl 0x24(%rsp), %eax
andl $0xfc0, %eax # imm = 0xFC0
shrl $0x6, %eax
orl $0x80, %eax
movb %al, 0x10(%rsp)
movl 0x24(%rsp), %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, 0xf(%rsp)
movq 0x18(%rsp), %rdi
movsbl 0x12(%rsp), %esi
callq 0xa4dc0
movq 0x18(%rsp), %rdi
movsbl 0x11(%rsp), %esi
callq 0xa4dc0
movq 0x18(%rsp), %rdi
movsbl 0x10(%rsp), %esi
callq 0xa4dc0
movq 0x18(%rsp), %rdi
movsbl 0xf(%rsp), %esi
callq 0xa4dc0
jmp 0x17eea0
jmp 0x17eea2
jmp 0x17eea4
addq $0x28, %rsp
retq
nopl (%rax)
|
/Support/YAMLParser.cpp
|
llvm::yaml::Scanner::scanDirective()
|
bool Scanner::scanDirective() {
// Reset the indentation level.
unrollIndent(-1);
SimpleKeys.clear();
IsSimpleKeyAllowed = false;
IsAdjacentValueAllowedInFlow = false;
StringRef::iterator Start = Current;
consume('%');
StringRef::iterator NameStart = Current;
Current = skip_while(&Scanner::skip_ns_char, Current);
StringRef Name(NameStart, Current - NameStart);
Current = skip_while(&Scanner::skip_s_white, Current);
Token T;
if (Name == "YAML") {
Current = skip_while(&Scanner::skip_ns_char, Current);
T.Kind = Token::TK_VersionDirective;
T.Range = StringRef(Start, Current - Start);
TokenQueue.push_back(T);
return true;
} else if(Name == "TAG") {
Current = skip_while(&Scanner::skip_ns_char, Current);
Current = skip_while(&Scanner::skip_s_white, Current);
Current = skip_while(&Scanner::skip_ns_char, Current);
T.Kind = Token::TK_TagDirective;
T.Range = StringRef(Start, Current - Start);
TokenQueue.push_back(T);
return true;
}
return false;
}
|
subq $0x148, %rsp # imm = 0x148
movq %rdi, 0x138(%rsp)
movq 0x138(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x1812e0
movq 0x10(%rsp), %rdi
addq $0xe0, %rdi
callq 0x1802a0
movq 0x10(%rsp), %rdi
movb $0x0, 0x49(%rdi)
movb $0x0, 0x4a(%rdi)
movq 0x28(%rdi), %rax
movq %rax, 0x130(%rsp)
movl $0x25, %esi
callq 0x180c40
movq 0x10(%rsp), %rdi
movq 0x28(%rdi), %rax
movq %rax, 0x128(%rsp)
movq 0x28(%rdi), %rcx
leaq -0x17a6(%rip), %rax # 0x180900
movq %rax, 0x118(%rsp)
movq $0x0, 0x120(%rsp)
movq 0x118(%rsp), %rsi
movq 0x120(%rsp), %rdx
callq 0x180980
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x128(%rsp), %rsi
movq 0x28(%rax), %rdx
subq %rsi, %rdx
leaq 0x108(%rsp), %rdi
callq 0x8d0e0
movq 0x10(%rsp), %rdi
movq 0x28(%rdi), %rcx
leaq -0x1867(%rip), %rax # 0x1808a0
movq %rax, 0xf8(%rsp)
movq $0x0, 0x100(%rsp)
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
callq 0x180980
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rax)
leaq 0xc0(%rsp), %rdi
callq 0x180330
movq 0x108(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x3ad66(%rip), %rsi # 0x1bcede
callq 0x7e720
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0xa8(%rsp), %rcx
callq 0x86e20
testb $0x1, %al
jne 0x1821ab
jmp 0x18226a
movq 0x10(%rsp), %rdi
movq 0x28(%rdi), %rcx
leaq -0x18bb(%rip), %rax # 0x180900
movq %rax, 0x90(%rsp)
movq $0x0, 0x98(%rsp)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x180980
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rax)
movl $0x3, 0xc0(%rsp)
movq 0x130(%rsp), %rsi
movq 0x28(%rax), %rdx
movq 0x130(%rsp), %rax
subq %rax, %rdx
leaq 0x80(%rsp), %rdi
callq 0x8d0e0
movq 0x10(%rsp), %rdi
movq 0x80(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0xd0(%rsp)
addq $0x50, %rdi
leaq 0xc0(%rsp), %rsi
callq 0x1813c0
movb $0x1, 0x147(%rsp)
movl $0x1, 0x7c(%rsp)
jmp 0x1823d8
movq 0x108(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x3acbc(%rip), %rsi # 0x1bcf4c
callq 0x7e720
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
callq 0x86e20
testb $0x1, %al
jne 0x1822b7
jmp 0x1823c6
movq 0x10(%rsp), %rdi
movq 0x28(%rdi), %rcx
leaq -0x19c7(%rip), %rax # 0x180900
movq %rax, 0x8(%rsp)
movq %rax, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x180980
movq 0x10(%rsp), %rdi
movq %rax, 0x28(%rdi)
movq 0x28(%rdi), %rcx
leaq -0x1a5d(%rip), %rax # 0x1808a0
movq %rax, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x180980
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rdi)
movq 0x28(%rdi), %rcx
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x180980
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rax)
movl $0x4, 0xc0(%rsp)
movq 0x130(%rsp), %rsi
movq 0x28(%rax), %rdx
movq 0x130(%rsp), %rax
subq %rax, %rdx
leaq 0x18(%rsp), %rdi
callq 0x8d0e0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0xd0(%rsp)
addq $0x50, %rdi
leaq 0xc0(%rsp), %rsi
callq 0x1813c0
movb $0x1, 0x147(%rsp)
movl $0x1, 0x7c(%rsp)
jmp 0x1823d8
jmp 0x1823c8
movb $0x0, 0x147(%rsp)
movl $0x1, 0x7c(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x17dee0
movb 0x147(%rsp), %al
andb $0x1, %al
addq $0x148, %rsp # imm = 0x148
retq
nopw %cs:(%rax,%rax)
|
/Support/YAMLParser.cpp
|
llvm::yaml::Document::skip()
|
bool Document::skip() {
if (stream.scanner->failed())
return false;
if (!Root && !getRoot())
return false;
Root->skip();
Token &T = peekNext();
if (T.Kind == Token::TK_StreamEnd)
return false;
if (T.Kind == Token::TK_DocumentEnd) {
getNext();
return skip();
}
return true;
}
|
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movq (%rax), %rdi
callq 0x1847d0
movq %rax, %rdi
callq 0x1847e0
testb $0x1, %al
jne 0x184c88
jmp 0x184c92
movb $0x0, 0x57(%rsp)
jmp 0x184d18
movq (%rsp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x184cb3
movq (%rsp), %rdi
callq 0x157350
cmpq $0x0, %rax
jne 0x184cb3
movb $0x0, 0x57(%rsp)
jmp 0x184d18
movq (%rsp), %rax
movq 0x68(%rax), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq (%rsp), %rdi
callq 0x185710
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x184ce0
movb $0x0, 0x57(%rsp)
jmp 0x184d18
movq 0x40(%rsp), %rax
cmpl $0x6, (%rax)
jne 0x184d13
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x185770
leaq 0x8(%rsp), %rdi
callq 0x17dee0
movq (%rsp), %rdi
callq 0x184c60
andb $0x1, %al
movb %al, 0x57(%rsp)
jmp 0x184d18
movb $0x1, 0x57(%rsp)
movb 0x57(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
/Support/YAMLParser.cpp
|
MakeErrMsg(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&, int)
|
static inline bool MakeErrMsg(
std::string* ErrMsg, const std::string& prefix, int errnum = -1) {
if (!ErrMsg)
return true;
if (errnum == -1)
errnum = errno;
*ErrMsg = prefix + ": " + llvm::sys::StrError(errnum);
return true;
}
|
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movl %edx, 0x6c(%rsp)
cmpq $0x0, 0x78(%rsp)
jne 0x18f9c7
movb $0x1, 0x87(%rsp)
jmp 0x18fa46
cmpl $-0x1, 0x6c(%rsp)
jne 0x18f9d9
callq 0x789c0
movl (%rax), %eax
movl %eax, 0x6c(%rsp)
movq 0x70(%rsp), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x2bfff(%rip), %rdx # 0x1bb9e9
callq 0x78f50
movl 0x6c(%rsp), %esi
leaq 0x8(%rsp), %rdi
callq 0x78910
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x72040
movq 0x78(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x751a0
leaq 0x48(%rsp), %rdi
callq 0x76b20
leaq 0x8(%rsp), %rdi
callq 0x76b20
leaq 0x28(%rsp), %rdi
callq 0x76b20
movb $0x1, 0x87(%rsp)
movb 0x87(%rsp), %al
andb $0x1, %al
addq $0x88, %rsp
retq
nopw (%rax,%rax)
|
/Support/Unix/Unix.h
|
llvm::SourceMgr::SrcBuffer::getPointerForLineNumber(unsigned int) const
|
const char *
SourceMgr::SrcBuffer::getPointerForLineNumber(unsigned LineNo) const {
size_t Sz = Buffer->getBufferSize();
if (Sz <= std::numeric_limits<uint8_t>::max())
return getPointerForLineNumberSpecialized<uint8_t>(LineNo);
else if (Sz <= std::numeric_limits<uint16_t>::max())
return getPointerForLineNumberSpecialized<uint16_t>(LineNo);
else if (Sz <= std::numeric_limits<uint32_t>::max())
return getPointerForLineNumberSpecialized<uint32_t>(LineNo);
else
return getPointerForLineNumberSpecialized<uint64_t>(LineNo);
}
|
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xc73b0
movq %rax, %rdi
callq 0xc8b90
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x191e00
movb %al, %cl
movq 0x20(%rsp), %rax
movzbl %cl, %ecx
cmpq %rcx, %rax
ja 0x19213c
movq 0x18(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x76480
movq %rax, 0x40(%rsp)
jmp 0x1921b5
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x191ec0
movw %ax, %cx
movq 0x10(%rsp), %rax
movzwl %cx, %ecx
cmpq %rcx, %rax
ja 0x192170
movq 0x18(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x77a90
movq %rax, 0x40(%rsp)
jmp 0x1921b5
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x9aac0
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, %ecx
cmpq %rcx, %rax
ja 0x1921a2
movq 0x18(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x794b0
movq %rax, 0x40(%rsp)
jmp 0x1921b5
movq 0x18(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x77ed0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nop
|
/Support/SourceMgr.cpp
|
buildFixItLine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, llvm::ArrayRef<llvm::SMFixIt>, llvm::ArrayRef<char>)
|
static void buildFixItLine(std::string &CaretLine, std::string &FixItLine,
ArrayRef<SMFixIt> FixIts,
ArrayRef<char> SourceLine) {
if (FixIts.empty())
return;
const char *LineStart = SourceLine.begin();
const char *LineEnd = SourceLine.end();
size_t PrevHintEndCol = 0;
for (const llvm::SMFixIt &Fixit : FixIts) {
// If the fixit contains a newline or tab, ignore it.
if (Fixit.getText().find_first_of("\n\r\t") != StringRef::npos)
continue;
SMRange R = Fixit.getRange();
// If the line doesn't contain any part of the range, then ignore it.
if (R.Start.getPointer() > LineEnd || R.End.getPointer() < LineStart)
continue;
// Translate from SMLoc to column.
// Ignore pieces of the range that go onto other lines.
// FIXME: Handle multibyte characters in the source line.
unsigned FirstCol;
if (R.Start.getPointer() < LineStart)
FirstCol = 0;
else
FirstCol = R.Start.getPointer() - LineStart;
// If we inserted a long previous hint, push this one forwards, and add
// an extra space to show that this is not part of the previous
// completion. This is sort of the best we can do when two hints appear
// to overlap.
//
// Note that if this hint is located immediately after the previous
// hint, no space will be added, since the location is more important.
unsigned HintCol = FirstCol;
if (HintCol < PrevHintEndCol)
HintCol = PrevHintEndCol + 1;
// FIXME: This assertion is intended to catch unintended use of multibyte
// characters in fixits. If we decide to do this, we'll have to track
// separate byte widths for the source and fixit lines.
assert((size_t)sys::locale::columnWidth(Fixit.getText()) ==
Fixit.getText().size());
// This relies on one byte per column in our fixit hints.
unsigned LastColumnModified = HintCol + Fixit.getText().size();
if (LastColumnModified > FixItLine.size())
FixItLine.resize(LastColumnModified, ' ');
llvm::copy(Fixit.getText(), FixItLine.begin() + HintCol);
PrevHintEndCol = LastColumnModified;
// For replacements, mark the removal range with '~'.
// FIXME: Handle multibyte characters in the source line.
unsigned LastCol;
if (R.End.getPointer() >= LineEnd)
LastCol = LineEnd - LineStart;
else
LastCol = R.End.getPointer() - LineStart;
std::fill(&CaretLine[FirstCol], &CaretLine[LastCol], '~');
}
}
|
subq $0x108, %rsp # imm = 0x108
movq %rdx, 0xf8(%rsp)
movq %rcx, 0x100(%rsp)
movq %r8, 0xe8(%rsp)
movq %r9, 0xf0(%rsp)
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x1957e0
testb $0x1, %al
jne 0x194eda
jmp 0x194edf
jmp 0x1951f2
leaq 0xe8(%rsp), %rdi
callq 0x11f390
movq %rax, 0xd0(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x11f3a0
movq %rax, 0xc8(%rsp)
movq $0x0, 0xc0(%rsp)
leaq 0xf8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x1949a0
movq %rax, 0xb0(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x1949b0
movq %rax, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
je 0x1951f2
movq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x195800
movq %rax, 0x90(%rsp)
movq %rdx, 0x98(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x28653(%rip), %rsi # 0x1bd5f4
callq 0x7e720
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x90(%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
callq 0x741a0
cmpq $-0x1, %rax
je 0x194fd2
jmp 0x1951d9
movq 0xa0(%rsp), %rdi
callq 0x195830
movq %rax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x191cf0
cmpq 0xc8(%rsp), %rax
ja 0x195015
leaq 0x70(%rsp), %rdi
addq $0x8, %rdi
callq 0x191cf0
cmpq 0xd0(%rsp), %rax
jae 0x19501a
jmp 0x1951d9
leaq 0x70(%rsp), %rdi
callq 0x191cf0
cmpq 0xd0(%rsp), %rax
jae 0x195038
movl $0x0, 0x6c(%rsp)
jmp 0x195051
leaq 0x70(%rsp), %rdi
callq 0x191cf0
movq 0xd0(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpq 0xc0(%rsp), %rax
jae 0x195077
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movl %eax, 0x68(%rsp)
movl 0x68(%rsp), %eax
movq %rax, 0x10(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x195800
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x87d70
movq %rax, %rcx
movq 0x10(%rsp), %rax
addq %rcx, %rax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
movq %rax, 0x18(%rsp)
movq 0xd8(%rsp), %rdi
callq 0x73bf0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jbe 0x1950eb
movq 0xd8(%rsp), %rdi
movl 0x64(%rsp), %eax
movl %eax, %esi
movl $0x20, %edx
callq 0x75f90
movq 0xa0(%rsp), %rdi
callq 0x195800
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0xd8(%rsp), %rdi
callq 0x74be0
movq %rax, 0x30(%rsp)
movl 0x68(%rsp), %eax
movl %eax, %esi
leaq 0x30(%rsp), %rdi
callq 0x130a20
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x753c0
movq %rax, 0x28(%rsp)
movl 0x64(%rsp), %eax
movq %rax, 0xc0(%rsp)
leaq 0x70(%rsp), %rdi
addq $0x8, %rdi
callq 0x191cf0
cmpq 0xc8(%rsp), %rax
jb 0x19517a
movq 0xc8(%rsp), %rax
movq 0xd0(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x24(%rsp)
jmp 0x195197
leaq 0x70(%rsp), %rdi
addq $0x8, %rdi
callq 0x191cf0
movq 0xd0(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x24(%rsp)
movq 0xe0(%rsp), %rdi
movl 0x6c(%rsp), %eax
movl %eax, %esi
callq 0x79760
movq %rax, 0x8(%rsp)
movq 0xe0(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, %esi
callq 0x79760
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movb $0x7e, 0x23(%rsp)
leaq 0x23(%rsp), %rdx
callq 0x77330
movq 0xb0(%rsp), %rax
addq $0x30, %rax
movq %rax, 0xb0(%rsp)
jmp 0x194f4f
addq $0x108, %rsp # imm = 0x108
retq
nopw (%rax,%rax)
|
/Support/SourceMgr.cpp
|
std::vector<unsigned int, std::allocator<unsigned int>>& GetOrCreateOffsetCache<unsigned int>(void*&, llvm::MemoryBuffer*)
|
static std::vector<T> &GetOrCreateOffsetCache(void *&OffsetCache,
MemoryBuffer *Buffer) {
if (OffsetCache)
return *static_cast<std::vector<T> *>(OffsetCache);
// Lazily fill in the offset cache.
auto *Offsets = new std::vector<T>();
size_t Sz = Buffer->getBufferSize();
assert(Sz <= std::numeric_limits<T>::max());
StringRef S = Buffer->getBuffer();
for (size_t N = 0; N < Sz; ++N) {
if (S[N] == '\n')
Offsets->push_back(static_cast<T>(N));
}
OffsetCache = Offsets;
return *Offsets;
}
|
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rax
cmpq $0x0, (%rax)
je 0x1969bb
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
jmp 0x196a7d
movl $0x18, %edi
callq 0x72d00
movq %rax, %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x73e90
movq 0x8(%rsp), %rdi
callq 0x11f9a0
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0xc8b90
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
callq 0xc73c0
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x196a66
movq 0x18(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x91a30
movsbl %al, %eax
cmpl $0xa, %eax
jne 0x196a54
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rax
movl %eax, 0x14(%rsp)
leaq 0x14(%rsp), %rsi
callq 0x13bef0
jmp 0x196a56
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x196a19
movq 0x38(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw (%rax,%rax)
|
/Support/SourceMgr.cpp
|
llvm::itanium_demangle::AbstractManglingParser<llvm::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::resolveForwardTemplateRefs(llvm::itanium_demangle::AbstractManglingParser<llvm::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::NameState&)
|
bool resolveForwardTemplateRefs(NameState &State) {
size_t I = State.ForwardTemplateRefsBegin;
size_t E = ForwardTemplateRefs.size();
for (; I < E; ++I) {
size_t Idx = ForwardTemplateRefs[I]->Index;
if (TemplateParams.empty() || !TemplateParams[0] ||
Idx >= TemplateParams[0]->size())
return true;
ForwardTemplateRefs[I]->Ref = (*TemplateParams[0])[Idx];
}
ForwardTemplateRefs.shrinkToSize(State.ForwardTemplateRefsBegin);
return false;
}
|
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
addq $0x2d0, %rdi # imm = 0x2D0
callq 0x1a1030
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x19eb31
movq 0x10(%rsp), %rdi
addq $0x2d0, %rdi # imm = 0x2D0
movq 0x28(%rsp), %rsi
callq 0x1b1a40
movq 0x10(%rsp), %rdi
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
addq $0x298, %rdi # imm = 0x298
callq 0x1b1a70
testb $0x1, %al
jne 0x19eacd
movq 0x10(%rsp), %rdi
addq $0x298, %rdi # imm = 0x298
xorl %eax, %eax
movl %eax, %esi
callq 0x1a2660
cmpq $0x0, (%rax)
je 0x19eacd
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x298, %rdi # imm = 0x298
xorl %eax, %eax
movl %eax, %esi
callq 0x1a2660
movq (%rax), %rdi
callq 0x19f7b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jb 0x19ead4
movb $0x1, 0x47(%rsp)
jmp 0x19eb50
movq 0x10(%rsp), %rdi
addq $0x298, %rdi # imm = 0x298
xorl %eax, %eax
movl %eax, %esi
callq 0x1a2660
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x1a2720
movq 0x10(%rsp), %rdi
movq (%rax), %rax
movq %rax, (%rsp)
addq $0x2d0, %rdi # imm = 0x2D0
movq 0x28(%rsp), %rsi
callq 0x1b1a40
movq (%rsp), %rcx
movq (%rax), %rax
movq %rcx, 0x18(%rax)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x19ea37
movq 0x10(%rsp), %rdi
addq $0x2d0, %rdi # imm = 0x2D0
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x1b1a90
movb $0x0, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax,%rax)
|
/llvm/Demangle/ItaniumDemangle.h
|
llvm::itanium_demangle::AbstractManglingParser<llvm::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::parseSeqId(unsigned long*)
|
bool AbstractManglingParser<Alloc, Derived>::parseSeqId(size_t *Out) {
if (!(look() >= '0' && look() <= '9') &&
!(look() >= 'A' && look() <= 'Z'))
return true;
size_t Id = 0;
while (true) {
if (look() >= '0' && look() <= '9') {
Id *= 36;
Id += static_cast<size_t>(look() - '0');
} else if (look() >= 'A' && look() <= 'Z') {
Id *= 36;
Id += static_cast<size_t>(look() - 'A') + 10;
} else {
*Out = Id;
return false;
}
++First;
}
}
|
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
cmpl $0x30, %eax
jl 0x19fd99
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
cmpl $0x39, %eax
jle 0x19fdc9
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
cmpl $0x41, %eax
jl 0x19fdbf
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
cmpl $0x5a, %eax
jle 0x19fdc9
movb $0x1, 0x27(%rsp)
jmp 0x19fe9f
movq $0x0, 0x8(%rsp)
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
cmpl $0x30, %eax
jl 0x19fe22
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
cmpl $0x39, %eax
jg 0x19fe22
movq (%rsp), %rdi
imulq $0x24, 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
subl $0x30, %eax
cltq
addq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x19fe8c
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
cmpl $0x41, %eax
jl 0x19fe76
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
cmpl $0x5a, %eax
jg 0x19fe76
movq (%rsp), %rdi
imulq $0x24, 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
subl $0x41, %eax
cltq
addq $0xa, %rax
addq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x19fe8a
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movb $0x0, 0x27(%rsp)
jmp 0x19fe9f
jmp 0x19fe8c
movq (%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x19fdd2
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw (%rax,%rax)
|
/llvm/Demangle/ItaniumDemangle.h
|
llvm::itanium_demangle::FloatLiteralImpl<float>::printLeft(llvm::itanium_demangle::OutputBuffer&) const
|
void printLeft(OutputBuffer &OB) const override {
const size_t N = FloatData<Float>::mangled_size;
if (Contents.size() >= N) {
union {
Float value;
char buf[sizeof(Float)];
};
const char *t = Contents.data();
const char *last = t + N;
char *e = buf;
for (; t != last; ++t, ++e) {
unsigned d1 = isdigit(*t) ? static_cast<unsigned>(*t - '0')
: static_cast<unsigned>(*t - 'a' + 10);
++t;
unsigned d0 = isdigit(*t) ? static_cast<unsigned>(*t - '0')
: static_cast<unsigned>(*t - 'a' + 10);
*e = static_cast<char>((d1 << 4) + d0);
}
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
std::reverse(buf, e);
#endif
char num[FloatData<Float>::max_demangled_size] = {0};
int n = snprintf(num, sizeof(num), FloatData<Float>::spec, value);
OB += std::string_view(num, n);
}
}
|
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq $0x8, 0x70(%rsp)
addq $0x10, %rdi
callq 0x110370
cmpq $0x8, %rax
jb 0x1a9793
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0x110360
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x58(%rsp)
leaq 0x6c(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rax
cmpq 0x58(%rsp), %rax
je 0x1a9725
movq 0x60(%rsp), %rax
movsbl (%rax), %edi
callq 0x7a118
cmpl $0x0, %eax
je 0x1a968b
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movl %eax, 0xc(%rsp)
jmp 0x1a969d
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
subl $0x61, %eax
addl $0xa, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x4c(%rsp)
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movsbl (%rax), %edi
callq 0x7a118
cmpl $0x0, %eax
je 0x1a96d6
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movl %eax, 0x8(%rsp)
jmp 0x1a96e8
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
subl $0x61, %eax
addl $0xa, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0x48(%rsp)
movl 0x4c(%rsp), %eax
shll $0x4, %eax
addl 0x48(%rsp), %eax
movb %al, %cl
movq 0x50(%rsp), %rax
movb %cl, (%rax)
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x1a9658
leaq 0x6c(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x72a70
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x73e90
leaq 0x30(%rsp), %rdi
movss 0x6c(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movl $0x18, %esi
leaq 0x16a4c(%rip), %rdx # 0x1c01ac
movb $0x1, %al
callq 0x74fc0
movl %eax, 0x2c(%rsp)
leaq 0x30(%rsp), %rsi
movslq 0x2c(%rsp), %rdx
leaq 0x18(%rsp), %rdi
callq 0x9f9a0
movq 0x78(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x19b8b0
addq $0x88, %rsp
retq
nopl (%rax,%rax)
|
/llvm/Demangle/ItaniumDemangle.h
|
llvm::itanium_demangle::AbstractManglingParser<llvm::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::parseBaseUnresolvedName()
|
Node *AbstractManglingParser<Derived, Alloc>::parseBaseUnresolvedName() {
if (std::isdigit(look()))
return getDerived().parseSimpleId();
if (consumeIf("dn"))
return getDerived().parseDestructorName();
consumeIf("on");
Node *Oper = getDerived().parseOperatorName(/*NameState=*/nullptr);
if (Oper == nullptr)
return nullptr;
if (look() == 'I') {
Node *TA = getDerived().parseTemplateArgs();
if (TA == nullptr)
return nullptr;
return make<NameWithTemplateArgs>(Oper, TA);
}
return Oper;
}
|
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %edi
callq 0x7a118
cmpl $0x0, %eax
je 0x1ae311
movq (%rsp), %rdi
callq 0x19c6b0
movq %rax, %rdi
callq 0x1ae1e0
movq %rax, 0x40(%rsp)
jmp 0x1ae409
leaq 0x28(%rsp), %rdi
leaq 0x123f1(%rip), %rsi # 0x1c070e
callq 0xc8900
movq (%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x19c610
testb $0x1, %al
jne 0x1ae33b
jmp 0x1ae356
movq (%rsp), %rdi
callq 0x19c6b0
movq %rax, %rdi
callq 0x1ae5f0
movq %rax, 0x40(%rsp)
jmp 0x1ae409
leaq 0x18(%rsp), %rdi
leaq 0xa877(%rip), %rsi # 0x1b8bd9
callq 0xc8900
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x19c610
movq (%rsp), %rdi
callq 0x19c6b0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1ae680
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1ae3a7
movq $0x0, 0x40(%rsp)
jmp 0x1ae409
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x19cc10
movsbl %al, %eax
cmpl $0x49, %eax
jne 0x1ae3ff
movq (%rsp), %rdi
callq 0x19c6b0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1a1850
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1ae3e5
movq $0x0, 0x40(%rsp)
jmp 0x1ae409
movq (%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x1a1ac0
movq %rax, 0x40(%rsp)
jmp 0x1ae409
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
/llvm/Demangle/ItaniumDemangle.h
|
CircuitOramOpt::access(int)
|
bool access(int identifier)
{
bool res = readAndRemove(identifier);
stash->add(identifier);
update_pos(identifier);
cnt2++;
if(cnt2 == naccess) {
cnt2 = 0;
for(int i = 0; i < nevict; ++i) {
flush(reverse_order());
}
}
return res;
}
|
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl 0x1c(%rsp), %esi
callq 0xc440
movb %al, %cl
movq 0x8(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x1b(%rsp)
movq 0x13d0(%rax), %rdi
movl 0x1c(%rsp), %esi
callq 0xc4e0
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0xc5b0
movq 0x8(%rsp), %rcx
movl 0x13dc(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x13dc(%rcx)
movl 0x13dc(%rcx), %eax
cmpl 0x13e0(%rcx), %eax
jne 0x99db
movq 0x8(%rsp), %rax
movl $0x0, 0x13dc(%rax)
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x13e4(%rcx), %eax
jge 0x99d9
movq 0x8(%rsp), %rdi
callq 0xce70
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0xc600
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x99a5
jmp 0x99db
movb 0x1b(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
/wangxiao1254[P]oram_simulator/circuit_oram_opt/circuit_oram_opt.h
|
Pl_LZWDecoder::handleCode(unsigned int)
|
void
Pl_LZWDecoder::handleCode(unsigned int code)
{
if (this->eod) {
return;
}
if (code == 256) {
if (!this->table.empty()) {
QTC::TC("libtests", "Pl_LZWDecoder intermediate reset");
}
this->table.clear();
this->code_size = 9;
} else if (code == 257) {
this->eod = true;
} else {
if (this->last_code != 256) {
// Add to the table from last time. New table entry would be what we read last plus the
// first character of what we're reading now.
unsigned char next_c = '\0';
unsigned int table_size = QIntC::to_uint(table.size());
if (code < 256) {
// just read < 256; last time's next_c was code
next_c = static_cast<unsigned char>(code);
} else if (code > 257) {
size_t idx = code - 258;
if (idx > table_size) {
throw std::runtime_error("LZWDecoder: bad code received");
} else if (idx == table_size) {
// The encoder would have just created this entry, so the first character of
// this entry would have been the same as the first character of the last entry.
QTC::TC("libtests", "Pl_LZWDecoder last was table size");
next_c = getFirstChar(this->last_code);
} else {
next_c = getFirstChar(code);
}
}
unsigned int new_idx = 258 + table_size;
if (new_idx == 4096) {
throw std::runtime_error("LZWDecoder: table full");
}
addToTable(next_c);
unsigned int change_idx = new_idx + code_change_delta;
if ((change_idx == 511) || (change_idx == 1023) || (change_idx == 2047)) {
++this->code_size;
}
}
if (code < 256) {
auto ch = static_cast<unsigned char>(code);
next()->write(&ch, 1);
} else {
unsigned int idx = code - 258;
if (idx >= table.size()) {
throw std::runtime_error("Pl_LZWDecoder::handleCode: table overflow");
}
Buffer& b = table.at(idx);
next()->write(b.getBuffer(), b.getSize());
}
}
this->last_code = code;
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, 0x49(%rdi)
jne 0x35c42
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x101, %esi # imm = 0x101
je 0x35b2e
cmpl $0x100, %ebx # imm = 0x100
jne 0x35b38
movq 0x50(%r14), %r12
movq 0x58(%r14), %r13
cmpq %r13, %r12
je 0x35b21
movq %r12, %r15
movq %r15, %rdi
callq 0x1dd3c
addq $0x8, %r15
cmpq %r13, %r15
jne 0x35b0c
movq %r12, 0x58(%r14)
movl $0x9, 0x34(%r14)
jmp 0x35c3e
movb $0x1, 0x49(%r14)
jmp 0x35c3e
cmpl $0x100, 0x68(%r14) # imm = 0x100
je 0x35bd9
movq 0x58(%r14), %r15
subq 0x50(%r14), %r15
sarq $0x3, %r15
movq %r15, %rax
shrq $0x20, %rax
je 0x35b63
movq %r15, %rdi
callq 0x1d6e4
cmpl $0xff, %ebx
ja 0x35b6f
movl %ebx, %eax
jmp 0x35b93
leal -0x102(%rbx), %eax
cmpl %r15d, %eax
ja 0x35c8c
jne 0x35b89
movl 0x68(%r14), %esi
movq %r14, %rdi
jmp 0x35b8e
movq %r14, %rdi
movl %ebx, %esi
callq 0x35cd6
addl $0x102, %r15d # imm = 0x102
cmpl $0x1000, %r15d # imm = 0x1000
je 0x35c50
movzbl %al, %esi
movq %r14, %rdi
callq 0x35e9e
movzbl 0x48(%r14), %eax
addl %eax, %r15d
cmpl $0x1ff, %r15d # imm = 0x1FF
je 0x35bd5
cmpl $0x7ff, %r15d # imm = 0x7FF
je 0x35bd5
cmpl $0x3ff, %r15d # imm = 0x3FF
jne 0x35bd9
incl 0x34(%r14)
cmpl $0xff, %ebx
ja 0x35bf9
leaq 0xf(%rsp), %rsi
movb %bl, (%rsi)
movq 0x28(%r14), %rdi
movq (%rdi), %rax
movl $0x1, %edx
callq *0x10(%rax)
jmp 0x35c3e
leal -0x102(%rbx), %eax
movq 0x50(%r14), %rcx
movq 0x58(%r14), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x35c6e
leaq (%rcx,%rax,8), %r15
movq 0x28(%r14), %r12
movq %r15, %rdi
callq 0x1de08
movq %rax, %r13
movq %r15, %rdi
callq 0x1ddf8
movq (%r12), %rcx
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq *0x10(%rcx)
movl %ebx, 0x68(%r14)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
leaq 0x129508(%rip), %rsi # 0x15f16c
movq %rax, %rdi
callq 0x192b0
jmp 0x35ca8
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
leaq 0x129501(%rip), %rsi # 0x15f183
movq %rax, %rdi
callq 0x192b0
jmp 0x35ca8
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
leaq 0x1294ae(%rip), %rsi # 0x15f14e
movq %rax, %rdi
callq 0x192b0
movq 0x1ba2f1(%rip), %rsi # 0x1effa0
movq 0x1ba2ba(%rip), %rdx # 0x1eff70
movq %rbx, %rdi
callq 0x196e0
jmp 0x35cc2
jmp 0x35cc2
movq %rax, %r14
movq %rbx, %rdi
callq 0x19a40
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_LZWDecoder.cc
|
Pl_LZWDecoder::getFirstChar(unsigned int)
|
unsigned char
Pl_LZWDecoder::getFirstChar(unsigned int code)
{
unsigned char result = '\0';
if (code < 256) {
result = static_cast<unsigned char>(code);
} else if (code > 257) {
unsigned int idx = code - 258;
if (idx >= table.size()) {
throw std::runtime_error("Pl_LZWDecoder::getFirstChar: table overflow");
}
Buffer& b = table.at(idx);
result = b.getBuffer()[0];
} else {
throw std::runtime_error(
"Pl_LZWDecoder::getFirstChar called with invalid code (" + std::to_string(code) + ")");
}
return result;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %esi, %r14d
cmpl $0xff, %esi
jbe 0x35d1b
cmpl $0x102, %r14d # imm = 0x102
jb 0x35d29
addl $0xfffffefe, %r14d # imm = 0xFFFFFEFE
movq 0x50(%rdi), %rax
movq 0x58(%rdi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x35d8b
leaq (%rax,%r14,8), %rdi
callq 0x1de08
movb (%rax), %r14b
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movl %r14d, %esi
callq 0x36143
leaq 0x12936e(%rip), %rsi # 0x15f0b8
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1d569
leaq 0x1444dd(%rip), %rsi # 0x17a23d
leaq 0x48(%rsp), %rdi
callq 0x19730
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x35dbd
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x35dca
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
leaq 0x1292ed(%rip), %rsi # 0x15f08c
movq %rax, %rdi
callq 0x192b0
movq 0x1ba1f2(%rip), %rsi # 0x1effa0
movq 0x1ba1bb(%rip), %rdx # 0x1eff70
movq %rbx, %rdi
callq 0x196e0
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x192d0
xorl %ebp, %ebp
movq 0x1ba1a6(%rip), %rsi # 0x1effa0
movq 0x1ba16f(%rip), %rdx # 0x1eff70
movq %rbx, %rdi
callq 0x196e0
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35e2b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x190e0
jmp 0x35e2b
movq %rax, %r14
movb $0x1, %bpl
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x35e46
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x190e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x35e61
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x190e0
testb %bpl, %bpl
jne 0x35e8d
jmp 0x35e95
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x35e8d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x190e0
jmp 0x35e8d
jmp 0x35e8a
movq %rax, %r14
movq %rbx, %rdi
callq 0x19a40
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_LZWDecoder.cc
|
Pl_LZWDecoder::addToTable(unsigned char)
|
void
Pl_LZWDecoder::addToTable(unsigned char c)
{
unsigned int last_size = 0;
unsigned char const* last_data = nullptr;
unsigned char tmp[1];
if (this->last_code < 256) {
tmp[0] = static_cast<unsigned char>(this->last_code);
last_data = tmp;
last_size = 1;
} else if (this->last_code > 257) {
unsigned int idx = this->last_code - 258;
if (idx >= table.size()) {
throw std::runtime_error("Pl_LZWDecoder::addToTable: table overflow");
}
Buffer& b = table.at(idx);
last_data = b.getBuffer();
last_size = QIntC::to_uint(b.getSize());
} else {
throw std::runtime_error(
"Pl_LZWDecoder::addToTable called with invalid code (" +
std::to_string(this->last_code) + ")");
}
Buffer entry(1 + last_size);
unsigned char* new_data = entry.getBuffer();
memcpy(new_data, last_data, last_size);
new_data[last_size] = c;
this->table.push_back(std::move(entry));
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl 0x68(%rdi), %eax
cmpl $0xff, %eax
ja 0x35ecb
leaq 0x7(%rsp), %r15
movb %al, (%r15)
movl $0x1, %r12d
jmp 0x35f1b
cmpl $0x102, %eax # imm = 0x102
jb 0x35f78
addl $0xfffffefe, %eax # imm = 0xFFFFFEFE
movq 0x50(%r14), %rcx
movq 0x58(%r14), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x35fdb
leaq (%rcx,%rax,8), %r12
movq %r12, %rdi
callq 0x1de08
movq %rax, %r15
movq %r12, %rdi
callq 0x1ddf8
movq %rax, %r12
shrq $0x20, %rax
je 0x35f1b
movq %r12, %rdi
callq 0x1d6e4
leal 0x1(%r12), %esi
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x1dc02
movq %r13, %rdi
callq 0x1de08
movq %rax, %r13
movl %r12d, %r12d
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x19080
movb %bl, (%r13,%r12)
addq $0x50, %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x3620e
leaq 0x8(%rsp), %rdi
callq 0x1dd3c
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
movl 0x68(%r14), %esi
leaq 0x28(%rsp), %rdi
callq 0x36143
leaq 0x12917f(%rip), %rsi # 0x15f119
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x1d569
leaq 0x14428d(%rip), %rsi # 0x17a23d
leaq 0x48(%rsp), %rdi
callq 0x19730
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3600d
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x3601a
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
leaq 0x129100(%rip), %rsi # 0x15f0ef
movq %rax, %rdi
callq 0x192b0
movq 0x1b9fa2(%rip), %rsi # 0x1effa0
movq 0x1b9f6b(%rip), %rdx # 0x1eff70
movq %rbx, %rdi
callq 0x196e0
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x192d0
xorl %ebp, %ebp
movq 0x1b9f56(%rip), %rsi # 0x1effa0
movq 0x1b9f1f(%rip), %rdx # 0x1eff70
movq %rbx, %rdi
callq 0x196e0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3607b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x190e0
jmp 0x3607b
movq %rax, %r14
movb $0x1, %bpl
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36096
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x190e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x360b1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x190e0
testb %bpl, %bpl
jne 0x360dd
jmp 0x360f4
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x360dd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x190e0
jmp 0x360dd
jmp 0x360da
movq %rax, %r14
movq %rbx, %rdi
callq 0x19a40
jmp 0x360f4
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1dd3c
movq %r14, %rdi
callq 0x19710
|
/jberkenbilt[P]qpdf/libqpdf/Pl_LZWDecoder.cc
|
Pl_LZWDecoder::~Pl_LZWDecoder()
|
~Pl_LZWDecoder() final = default;
|
pushq %rbx
movq %rdi, %rbx
addq $0x50, %rdi
callq 0x360fc
leaq 0x1b3988(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x361f4
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x190e0
popq %rbx
retq
|
/jberkenbilt[P]qpdf/libqpdf/qpdf/Pl_LZWDecoder.hh
|
Pl_MD5::Pl_MD5(char const*, Pipeline*)
|
Pl_MD5::Pl_MD5(char const* identifier, Pipeline* next) :
Pipeline(identifier, next)
{
if (!next) {
throw std::logic_error("Attempt to create Pl_MD5 with nullptr as next");
}
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
callq 0x30a50
leaq 0x1b4229(%rip), %rax # 0x1ea5f8
movq %rax, (%rbx)
movb $0x0, 0x30(%rbx)
leaq 0x38(%rbx), %rdi
callq 0x29a4c
movw $0x1, 0x48(%rbx)
testq %r14, %r14
je 0x363f0
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %r15
leaq 0x128db9(%rip), %rsi # 0x15f1bd
movq %rax, %rdi
callq 0x19970
movq 0x1b9bdd(%rip), %rsi # 0x1efff0
movq 0x1b9ba6(%rip), %rdx # 0x1effc0
movq %r15, %rdi
callq 0x196e0
movq %rax, %r14
jmp 0x36432
movq %rax, %r14
movq %r15, %rdi
callq 0x19a40
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x36445
callq 0x1ed58
jmp 0x36445
movq %rax, %r14
leaq 0x1b3714(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x36467
movq (%rbx), %rsi
incq %rsi
callq 0x190e0
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_MD5.cc
|
Pl_MD5::write(unsigned char const*, unsigned long)
|
void
Pl_MD5::write(unsigned char const* buf, size_t len)
{
if (this->enabled) {
if (!this->in_progress) {
this->md5.reset();
this->in_progress = true;
}
// Write in chunks in case len is too big to fit in an int. Assume int is at least 32 bits.
static size_t const max_bytes = 1 << 30;
size_t bytes_left = len;
unsigned char const* data = buf;
while (bytes_left > 0) {
size_t bytes = (bytes_left >= max_bytes ? max_bytes : bytes_left);
this->md5.encodeDataIncrementally(reinterpret_cast<char const*>(data), bytes);
bytes_left -= bytes;
data += bytes;
}
}
next()->write(buf, len);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
cmpb $0x1, 0x48(%rdi)
jne 0x364e4
cmpb $0x0, 0x30(%r15)
jne 0x364a6
leaq 0x38(%r15), %rdi
callq 0x29adc
movb $0x1, 0x30(%r15)
cmpq $0x0, 0x8(%rsp)
je 0x364e4
leaq 0x38(%r15), %r12
movl $0x40000000, %r14d # imm = 0x40000000
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r13
cmpq %r14, %rbx
movl $0x40000000, %ebp # imm = 0x40000000
cmovbq %rbx, %rbp
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x29b34
addq %rbp, %r13
subq %rbp, %rbx
jne 0x364c2
movq 0x28(%r15), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_MD5.cc
|
Pl_MD5::~Pl_MD5()
|
~Pl_MD5() final = default;
|
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x365ac
callq 0x1ed58
leaq 0x1b35ad(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x365cf
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x190e0
popq %rbx
retq
nop
|
/jberkenbilt[P]qpdf/libqpdf/qpdf/Pl_MD5.hh
|
Pl_OStream::Pl_OStream(char const*, std::ostream&)
|
Pl_OStream::Pl_OStream(char const* identifier, std::ostream& os) :
Pipeline(identifier, nullptr),
m(std::make_unique<Members>(os))
{
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
xorl %edx, %edx
callq 0x30a50
leaq 0x1b403c(%rip), %rax # 0x1ea640
movq %rax, (%rbx)
movl $0x8, %edi
callq 0x19180
movq %r14, (%rax)
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x1b3536(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x36645
movq (%rbx), %rsi
incq %rsi
callq 0x190e0
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_OStream.cc
|
Pl_PNGFilter::Pl_PNGFilter(char const*, Pipeline*, Pl_PNGFilter::action_e, unsigned int, unsigned int, unsigned int)
|
Pl_PNGFilter::Pl_PNGFilter(
char const* identifier,
Pipeline* next,
action_e action,
unsigned int columns,
unsigned int samples_per_pixel,
unsigned int bits_per_sample) :
Pipeline(identifier, next),
action(action)
{
if (!next) {
throw std::logic_error("Attempt to create Pl_PNGFilter with nullptr as next");
}
if (samples_per_pixel < 1) {
throw std::runtime_error("PNGFilter created with invalid samples_per_pixel");
}
if (!((bits_per_sample == 1) || (bits_per_sample == 2) || (bits_per_sample == 4) ||
(bits_per_sample == 8) || (bits_per_sample == 16))) {
throw std::runtime_error(
"PNGFilter created with invalid bits_per_sample not 1, 2, 4, 8, or 16");
}
this->bytes_per_pixel = ((bits_per_sample * samples_per_pixel) + 7) / 8;
unsigned long long bpr = ((columns * bits_per_sample * samples_per_pixel) + 7) / 8;
if ((bpr == 0) || (bpr > (UINT_MAX - 1))) {
throw std::runtime_error("PNGFilter created with invalid columns value");
}
if (memory_limit > 0 && bpr > (memory_limit / 2U)) {
throw std::runtime_error("PNGFilter memory limit exceeded");
}
this->bytes_per_row = bpr & UINT_MAX;
this->buf1 = QUtil::make_shared_array<unsigned char>(this->bytes_per_row + 1);
this->buf2 = QUtil::make_shared_array<unsigned char>(this->bytes_per_row + 1);
memset(this->buf1.get(), 0, this->bytes_per_row + 1);
memset(this->buf2.get(), 0, this->bytes_per_row + 1);
this->cur_row = this->buf1.get();
this->prev_row = this->buf2.get();
// number of bytes per incoming row
this->incoming = (action == a_encode ? this->bytes_per_row : this->bytes_per_row + 1);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r9d, %r15d
movl %r8d, %r14d
movl %ecx, %ebp
movq %rdx, %r12
movq %rdi, %rbx
callq 0x30a50
leaq 0x1b3f96(%rip), %rax # 0x1ea688
movq %rax, (%rbx)
movl %ebp, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x70(%rbx)
testq %r12, %r12
je 0x3684a
testl %r15d, %r15d
je 0x36876
movl 0x40(%rsp), %edi
cmpl $0x10, %edi
ja 0x368f8
movl $0x10116, %eax # imm = 0x10116
btl %edi, %eax
jae 0x368f8
imull %r15d, %edi
leal 0x7(%rdi), %eax
shrl $0x3, %eax
movl %eax, 0x38(%rbx)
imull %r14d, %edi
addl $0x7, %edi
cmpl $0x7, %edi
jbe 0x368a8
shrl $0x3, %edi
movq 0x1ba9b9(%rip), %rax # 0x1f1118
testq %rax, %rax
je 0x36772
movl %edi, %ecx
shrq %rax
cmpq %rcx, %rax
jb 0x368c6
movl %edi, 0x34(%rbx)
incl %edi
callq 0x194e0
leaq 0x8(%rsp), %rdi
movq %rax, -0x8(%rdi)
movq %rax, %rsi
callq 0x34e68
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x58(%rbx), %rdi
movups %xmm0, 0x50(%rbx)
testq %rdi, %rdi
je 0x367b9
callq 0x1ed58
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x367b9
callq 0x1ed58
movl 0x34(%rbx), %edi
incl %edi
callq 0x194e0
leaq 0x8(%rsp), %rdi
movq %rax, -0x8(%rdi)
movq %rax, %rsi
callq 0x34e68
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x68(%rbx), %rdi
movups %xmm0, 0x60(%rbx)
testq %rdi, %rdi
je 0x36800
callq 0x1ed58
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x36800
callq 0x1ed58
movq 0x50(%rbx), %rdi
movl 0x34(%rbx), %edx
incl %edx
xorl %esi, %esi
callq 0x19330
movq 0x60(%rbx), %rdi
movl 0x34(%rbx), %edx
incl %edx
xorl %esi, %esi
callq 0x19330
movq 0x50(%rbx), %rax
movq %rax, 0x40(%rbx)
movq 0x60(%rbx), %rax
movq %rax, 0x48(%rbx)
movl 0x34(%rbx), %eax
cmpl $0x1, %ebp
sbbl $-0x1, %eax
movq %rax, 0x78(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %r15
leaq 0x1289f1(%rip), %rsi # 0x15f24f
movq %rax, %rdi
callq 0x19970
movq 0x1b9753(%rip), %rdx # 0x1effc0
movq 0x1b977c(%rip), %rsi # 0x1efff0
jmp 0x368a0
movl $0x10, %edi
callq 0x193f0
movq %rax, %r15
leaq 0x1289f9(%rip), %rsi # 0x15f283
movq %rax, %rdi
callq 0x192b0
movq 0x1b96d7(%rip), %rdx # 0x1eff70
movq 0x1b9700(%rip), %rsi # 0x1effa0
movq %r15, %rdi
callq 0x196e0
movl $0x10, %edi
callq 0x193f0
movq %rax, %r15
leaq 0x128a3d(%rip), %rsi # 0x15f2f9
movq %rax, %rdi
callq 0x192b0
jmp 0x368e2
movl $0x10, %edi
callq 0x193f0
movq %rax, %r15
leaq 0x128a4c(%rip), %rsi # 0x15f326
movq %rax, %rdi
callq 0x192b0
movq 0x1b96b7(%rip), %rsi # 0x1effa0
movq 0x1b9680(%rip), %rdx # 0x1eff70
movq %r15, %rdi
callq 0x196e0
movl $0x10, %edi
callq 0x193f0
movq %rax, %r15
leaq 0x1289a8(%rip), %rsi # 0x15f2b4
movq %rax, %rdi
callq 0x192b0
jmp 0x36892
jmp 0x36921
jmp 0x36921
jmp 0x36921
jmp 0x36921
movq %rax, %r14
movq %r15, %rdi
callq 0x19a40
jmp 0x36937
jmp 0x36934
jmp 0x36934
jmp 0x36934
movq %rax, %r14
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x36945
callq 0x1ed58
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x36953
callq 0x1ed58
leaq 0x1b3206(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x36975
movq (%rbx), %rsi
incq %rsi
callq 0x190e0
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_PNGFilter.cc
|
Pl_PNGFilter::write(unsigned char const*, unsigned long)
|
void
Pl_PNGFilter::write(unsigned char const* data, size_t len)
{
size_t left = this->incoming - this->pos;
size_t offset = 0;
while (len >= left) {
// finish off current row
memcpy(this->cur_row + this->pos, data + offset, left);
offset += left;
len -= left;
processRow();
// Swap rows
unsigned char* t = this->prev_row;
this->prev_row = this->cur_row;
this->cur_row = t ? t : this->buf2.get();
memset(this->cur_row, 0, this->bytes_per_row + 1);
left = this->incoming;
this->pos = 0;
}
if (len) {
memcpy(this->cur_row + this->pos, data + offset, len);
}
this->pos += len;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x70(%rdi), %rdi
movq 0x78(%r14), %r13
subq %rdi, %r13
cmpq %rdx, %r13
jbe 0x369b1
xorl %ebp, %ebp
movq %rdi, %r12
jmp 0x36a10
xorl %r12d, %r12d
xorl %ebp, %ebp
addq 0x40(%r14), %rdi
leaq (%r15,%rbp), %rsi
movq %r13, %rdx
callq 0x19080
movq %r14, %rdi
callq 0x36a44
movq 0x48(%r14), %rdi
movq 0x40(%r14), %rax
movq %rax, 0x48(%r14)
testq %rdi, %rdi
jne 0x369e3
movq 0x60(%r14), %rdi
addq %r13, %rbp
subq %r13, %rbx
movq %rdi, 0x40(%r14)
movl 0x34(%r14), %edx
incl %edx
xorl %esi, %esi
callq 0x19330
movq 0x78(%r14), %r13
movq $0x0, 0x70(%r14)
movl $0x0, %edi
cmpq %r13, %rbx
jae 0x369b6
testq %rbx, %rbx
je 0x36a2e
addq 0x40(%r14), %r12
addq %rbp, %r15
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x19080
movq 0x70(%r14), %r12
addq %rbx, %r12
movq %r12, 0x70(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/jberkenbilt[P]qpdf/libqpdf/Pl_PNGFilter.cc
|
Pl_PNGFilter::encodeRow()
|
void
Pl_PNGFilter::encodeRow()
{
// For now, hard-code to using UP filter.
unsigned char ch = 2;
next()->write(&ch, 1);
if (this->prev_row) {
for (unsigned int i = 0; i < this->bytes_per_row; ++i) {
ch = static_cast<unsigned char>(this->cur_row[i] - this->prev_row[i]);
next()->write(&ch, 1);
}
} else {
next()->write(this->cur_row, this->bytes_per_row);
}
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xf(%rsp), %rsi
movb $0x2, (%rsi)
movq 0x28(%rdi), %rdi
movq (%rdi), %rax
movl $0x1, %edx
callq *0x10(%rax)
cmpq $0x0, 0x48(%rbx)
je 0x36abf
cmpl $0x0, 0x34(%rbx)
je 0x36ad0
xorl %r15d, %r15d
leaq 0xf(%rsp), %r14
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
movb (%rax,%r15), %al
subb (%rcx,%r15), %al
movb %al, 0xf(%rsp)
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
movl $0x1, %edx
movq %r14, %rsi
callq *0x10(%rax)
incq %r15
movl 0x34(%rbx), %eax
cmpq %rax, %r15
jb 0x36a8c
jmp 0x36ad0
movq 0x28(%rbx), %rdi
movq 0x40(%rbx), %rsi
movl 0x34(%rbx), %edx
movq (%rdi), %rax
callq *0x10(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/jberkenbilt[P]qpdf/libqpdf/Pl_PNGFilter.cc
|
Pl_PNGFilter::decodeSub()
|
void
Pl_PNGFilter::decodeSub()
{
QTC::TC("libtests", "Pl_PNGFilter decodeSub");
unsigned char* buffer = this->cur_row + 1;
unsigned int bpp = this->bytes_per_pixel;
for (unsigned int i = 0; i < this->bytes_per_row; ++i) {
unsigned char left = 0;
if (i >= bpp) {
left = buffer[i - bpp];
}
buffer[i] = static_cast<unsigned char>(buffer[i] + left);
}
}
|
cmpl $0x0, 0x34(%rdi)
je 0x36bbb
movq 0x40(%rdi), %rax
movl 0x38(%rdi), %ecx
movl %ecx, %edx
negl %edx
xorl %esi, %esi
cmpq %rcx, %rsi
jae 0x36ba1
xorl %r8d, %r8d
jmp 0x36baa
leal (%rdx,%rsi), %r8d
movb 0x1(%rax,%r8), %r8b
addb %r8b, 0x1(%rax,%rsi)
incq %rsi
movl 0x34(%rdi), %r8d
cmpq %r8, %rsi
jb 0x36b97
retq
|
/jberkenbilt[P]qpdf/libqpdf/Pl_PNGFilter.cc
|
Pl_PNGFilter::decodeAverage()
|
void
Pl_PNGFilter::decodeAverage()
{
QTC::TC("libtests", "Pl_PNGFilter decodeAverage");
unsigned char* buffer = this->cur_row + 1;
unsigned char* above_buffer = this->prev_row + 1;
unsigned int bpp = this->bytes_per_pixel;
for (unsigned int i = 0; i < this->bytes_per_row; ++i) {
int left = 0;
int up = 0;
if (i >= bpp) {
left = buffer[i - bpp];
}
up = above_buffer[i];
buffer[i] = static_cast<unsigned char>(buffer[i] + (left + up) / 2);
}
}
|
cmpl $0x0, 0x34(%rdi)
je 0x36c2f
movq 0x40(%rdi), %rax
movq 0x48(%rdi), %rcx
movl 0x38(%rdi), %edx
movl %edx, %esi
negl %esi
xorl %r8d, %r8d
cmpq %rdx, %r8
jae 0x36c04
xorl %r9d, %r9d
jmp 0x36c0e
leal (%rsi,%r8), %r9d
movzbl 0x1(%rax,%r9), %r9d
movzbl 0x1(%rcx,%r8), %r10d
movzwl %r9w, %r9d
addl %r10d, %r9d
shrl %r9d
addb %r9b, 0x1(%rax,%r8)
incq %r8
movl 0x34(%rdi), %r9d
cmpq %r9, %r8
jb 0x36bfa
retq
|
/jberkenbilt[P]qpdf/libqpdf/Pl_PNGFilter.cc
|
Pl_PNGFilter::~Pl_PNGFilter()
|
~Pl_PNGFilter() final = default;
|
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
testq %rdi, %rdi
je 0x36d64
callq 0x1ed58
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x36d72
callq 0x1ed58
leaq 0x1b2de7(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x36d95
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x190e0
popq %rbx
retq
nop
|
/jberkenbilt[P]qpdf/libqpdf/qpdf/Pl_PNGFilter.hh
|
Pl_QPDFTokenizer::finish()
|
void
Pl_QPDFTokenizer::finish()
{
m->buf.finish();
auto input = BufferInputSource("tokenizer data", m->buf.getBuffer(), true);
std::string empty;
while (true) {
auto token = m->tokenizer.readToken(input, empty, true);
m->filter->handleToken(token);
if (token.getType() == QPDFTokenizer::tt_eof) {
break;
} else if (token.isWord("ID")) {
// Read the space after the ID.
char ch = ' ';
input.read(&ch, 1);
m->filter->handleToken(
// line-break
QPDFTokenizer::Token(QPDFTokenizer::tt_space, std::string(1, ch)));
QTC::TC("qpdf", "Pl_QPDFTokenizer found ID");
m->tokenizer.expectInlineImage(input);
}
}
m->filter->handleEOF();
QPDFObjectHandle::TokenFilter::PipelineAccessor::setPipeline(m->filter, nullptr);
if (next()) {
next()->finish();
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
addq $0x10, %rdi
callq 0x329ba
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1283e7(%rip), %rsi # 0x15f346
leaq 0x1283ee(%rip), %rdx # 0x15f354
leaq 0x50(%rsp), %rdi
callq 0x1edc8
movq 0x30(%rbx), %rdi
addq $0x10, %rdi
callq 0x329d2
leaq 0x120(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %rax, %rdx
movl $0x1, %ecx
callq 0x1dea8
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x36fae
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x190e0
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x50(%rsp), %r14
leaq 0x120(%rsp), %rbp
leaq 0xb8(%rsp), %r15
movq 0x30(%rbx), %rsi
addq $0x8, %rsi
movq %r14, %rdi
movq %rbp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0xe2be8
movq 0x30(%rbx), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x10(%rax)
movl 0x50(%rsp), %r12d
cmpl $0xe, %r12d
je 0x371bd
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq %r15, %rdi
leaq 0x13dca1(%rip), %rsi # 0x174cd2
leaq 0x13dc9c(%rip), %rdx # 0x174cd4
callq 0x1edc8
cmpl $0xd, 0x50(%rsp)
jne 0x37076
movq 0x60(%rsp), %rdx
cmpq 0xc0(%rsp), %rdx
jne 0x37076
testq %rdx, %rdx
je 0x3722c
movq 0xb8(%rsp), %rsi
movq 0x58(%rsp), %rdi
callq 0x19790
testl %eax, %eax
sete %bpl
jmp 0x37078
xorl %ebp, %ebp
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x3709d
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x190e0
testb %bpl, %bpl
leaq 0x10(%rsp), %r13
leaq 0xb8(%rsp), %r15
leaq 0x120(%rsp), %rbp
je 0x371bd
movb $0x20, 0xf(%rsp)
movl $0x1, %edx
movq %rbp, %rdi
leaq 0xf(%rsp), %rsi
callq 0x1e34a
movq 0x30(%rbx), %rax
movq (%rax), %rbp
movsbl 0xf(%rsp), %edx
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x1, %esi
movq %r13, %rdi
callq 0x19670
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
movl $0xf, %esi
movq %r13, %rdx
callq 0xe105c
movq (%rbp), %rax
movq %rbp, %rdi
movq %r15, %rsi
callq *0x10(%rax)
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
leaq 0x120(%rsp), %rbp
je 0x37147
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x190e0
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x3716c
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x190e0
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x37191
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x190e0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x371ad
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x190e0
movq 0x30(%rbx), %rdi
addq $0x8, %rdi
movq %rbp, %rsi
callq 0xe22be
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x371e2
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x190e0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x37204
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x190e0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x37220
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x190e0
cmpl $0xe, %r12d
jne 0x36fd7
jmp 0x37234
movb $0x1, %bpl
jmp 0x37078
movq 0x30(%rbx), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x30(%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0xbf274
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x3725e
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x3727a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x190e0
leaq 0x120(%rsp), %rdi
callq 0x1e066
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x37337
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x37337
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x190e0
jmp 0x37337
jmp 0x372fc
jmp 0x37301
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x37340
jmp 0x372da
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x37304
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x190e0
jmp 0x37304
jmp 0x37301
jmp 0x37301
movq %rax, %rbx
jmp 0x3730e
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x37340
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x3732a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x190e0
leaq 0x120(%rsp), %rdi
callq 0x1e066
movq %rbx, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_QPDFTokenizer.cc
|
QPDFTokenizer::Token::~Token()
|
Token() :
type(tt_bad)
{
}
|
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
leaq 0x58(%rbx), %rax
cmpq %rax, %rdi
je 0x3735c
movq (%rax), %rsi
incq %rsi
callq 0x190e0
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rax
cmpq %rax, %rdi
je 0x37374
movq (%rax), %rsi
incq %rsi
callq 0x190e0
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x3738d
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x190e0
popq %rbx
retq
nop
|
/jberkenbilt[P]qpdf/include/qpdf/QPDFTokenizer.hh
|
Pl_RC4::Pl_RC4(char const*, Pipeline*, unsigned char const*, int, unsigned long)
|
Pl_RC4::Pl_RC4(
char const* identifier,
Pipeline* next,
unsigned char const* key_data,
int key_len,
size_t out_bufsize) :
Pipeline(identifier, next),
out_bufsize(out_bufsize),
rc4(key_data, key_len)
{
if (!next) {
throw std::logic_error("Attempt to create Pl_RC4 with nullptr as next");
}
this->outbuf = QUtil::make_shared_array<unsigned char>(out_bufsize);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r9, %r14
movl %r8d, %ebp
movq %rcx, %r12
movq %rdx, %r15
movq %rdi, %rbx
callq 0x30a50
leaq 0x1b32ed(%rip), %rax # 0x1ea718
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movq %r14, 0x40(%rbx)
leaq 0x48(%rbx), %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x148c80
testq %r15, %r15
je 0x3749e
movq %r14, %rdi
callq 0x194e0
leaq 0x8(%rsp), %rdi
movq %rax, -0x8(%rdi)
movq %rax, %rsi
callq 0x34e68
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x38(%rbx), %rdi
movups %xmm0, 0x30(%rbx)
testq %rdi, %rdi
je 0x37491
callq 0x1ed58
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x37491
callq 0x1ed58
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %r15
leaq 0x127ec7(%rip), %rsi # 0x15f379
movq %rax, %rdi
callq 0x19970
movq 0x1b8b2f(%rip), %rsi # 0x1efff0
movq 0x1b8af8(%rip), %rdx # 0x1effc0
movq %r15, %rdi
callq 0x196e0
jmp 0x374e4
movq %rax, %r14
movq %r15, %rdi
callq 0x19a40
jmp 0x374e7
movq %rax, %r14
jmp 0x374f5
movq %rax, %r14
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x374f5
callq 0x1ed58
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x37503
callq 0x1ed58
leaq 0x1b2656(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x37525
movq (%rbx), %rsi
incq %rsi
callq 0x190e0
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_RC4.cc
|
Pl_RC4::write(unsigned char const*, unsigned long)
|
void
Pl_RC4::write(unsigned char const* data, size_t len)
{
if (this->outbuf == nullptr) {
throw std::logic_error(this->identifier + ": Pl_RC4: write() called after finish() called");
}
size_t bytes_left = len;
unsigned char const* p = data;
while (bytes_left > 0) {
size_t bytes = (bytes_left < this->out_bufsize ? bytes_left : out_bufsize);
bytes_left -= bytes;
// lgtm[cpp/weak-cryptographic-algorithm]
rc4.process(p, bytes, outbuf.get());
p += bytes;
next()->write(outbuf.get(), bytes);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
cmpq $0x0, 0x30(%rdi)
je 0x3759a
movq %rdx, %rbx
testq %rdx, %rdx
je 0x3758b
movq %rsi, %r15
leaq 0x48(%r14), %r12
movq 0x30(%r14), %rcx
movq 0x40(%r14), %r13
cmpq %r13, %rbx
cmovbq %rbx, %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x148cbe
addq %r13, %r15
movq 0x28(%r14), %rdi
movq 0x30(%r14), %rsi
movq (%rdi), %rax
movq %r13, %rdx
callq *0x10(%rax)
subq %r13, %rbx
jne 0x37555
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
addq $0x8, %r14
leaq 0x127df5(%rip), %rdx # 0x15f3a7
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x1e433
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x19150
xorl %ebp, %ebp
movq 0x1b8a18(%rip), %rsi # 0x1efff0
movq 0x1b89e1(%rip), %rdx # 0x1effc0
movq %rbx, %rdi
callq 0x196e0
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37605
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x190e0
testb %bpl, %bpl
jne 0x3760f
jmp 0x37617
movq %rax, %r14
movq %rbx, %rdi
callq 0x19a40
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_RC4.cc
|
Pl_RC4::finish()
|
void
Pl_RC4::finish()
{
outbuf = nullptr;
next()->finish();
}
|
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq 0x38(%rdi), %rdi
movups %xmm0, 0x30(%rbx)
testq %rdi, %rdi
je 0x37639
callq 0x1ed58
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
popq %rbx
jmpq *0x18(%rax)
|
/jberkenbilt[P]qpdf/libqpdf/Pl_RC4.cc
|
Pl_RC4::~Pl_RC4()
|
~Pl_RC4() final = default;
|
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
testq %rdi, %rdi
je 0x37656
callq 0x1ed58
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x37664
callq 0x1ed58
leaq 0x1b24f5(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x37687
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x190e0
popq %rbx
retq
nop
|
/jberkenbilt[P]qpdf/libqpdf/qpdf/Pl_RC4.hh
|
Pl_RunLength::Pl_RunLength(char const*, Pipeline*, Pl_RunLength::action_e)
|
Pl_RunLength::Pl_RunLength(char const* identifier, Pipeline* next, action_e action) :
Pipeline(identifier, next),
m(std::make_unique<Members>(action))
{
if (!next) {
throw std::logic_error("Attempt to create Pl_RunLength with nullptr as next");
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rdi, %rbx
callq 0x30a50
leaq 0x1b30a0(%rip), %rax # 0x1ea760
movq %rax, (%rbx)
movl $0xb0, %edi
callq 0x19180
leaq 0x30(%rbx), %r14
movl %ebp, (%rax)
xorl %ecx, %ecx
movl %ecx, 0x4(%rax)
movl %ecx, 0x88(%rax)
movq %rax, %rcx
addq $0xa0, %rcx
movq %rcx, 0x90(%rax)
movq $0x0, 0x98(%rax)
movb $0x0, 0xa0(%rax)
movq %rax, (%r14)
testq %r15, %r15
je 0x37712
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %r12
leaq 0x127cb8(%rip), %rsi # 0x15f3de
movq %rax, %rdi
callq 0x19970
movq 0x1b88bb(%rip), %rsi # 0x1efff0
movq 0x1b8884(%rip), %rdx # 0x1effc0
movq %r12, %rdi
callq 0x196e0
movq %rax, %r15
jmp 0x37754
movq %rax, %r15
movq %r12, %rdi
callq 0x19a40
movq (%r14), %rsi
testq %rsi, %rsi
je 0x37764
movq %r14, %rdi
callq 0x37c56
movq $0x0, (%r14)
jmp 0x37770
movq %rax, %r15
leaq 0x1b23e9(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x37792
movq (%rbx), %rsi
incq %rsi
callq 0x190e0
movq %r15, %rdi
callq 0x19710
|
/jberkenbilt[P]qpdf/libqpdf/Pl_RunLength.cc
|
Pl_RunLength::~Pl_RunLength()
|
Pl_RunLength::~Pl_RunLength() // NOLINT (modernize-use-equals-default)
{
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
}
|
pushq %rbx
movq %rdi, %rbx
leaq 0x1b2fb3(%rip), %rax # 0x1ea760
movq %rax, (%rdi)
movq 0x30(%rdi), %rsi
testq %rsi, %rsi
je 0x377c2
leaq 0x30(%rbx), %rdi
callq 0x37c56
movq $0x0, 0x30(%rbx)
leaq 0x1b238f(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x377ed
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x190e0
popq %rbx
retq
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_RunLength.cc
|
Pl_RunLength::encode(unsigned char const*, unsigned long)
|
void
Pl_RunLength::encode(unsigned char const* data, size_t len)
{
for (size_t i = 0; i < len; ++i) {
if ((m->state == st_top) != (m->length <= 1)) {
throw std::logic_error("Pl_RunLength::encode: state/length inconsistency");
}
unsigned char ch = data[i];
if ((m->length > 0) && ((m->state == st_copying) || (m->length < 128)) &&
(ch == m->buf[m->length - 1])) {
QTC::TC("libtests", "Pl_RunLength: switch to run", (m->length == 128) ? 0 : 1);
if (m->state == st_copying) {
--m->length;
flush_encode();
m->buf[0] = ch;
m->length = 1;
}
m->state = st_run;
m->buf[m->length] = ch;
++m->length;
} else {
if ((m->length == 128) || (m->state == st_run)) {
flush_encode();
} else if (m->length > 0) {
m->state = st_copying;
}
m->buf[m->length] = ch;
++m->length;
}
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x37912
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x30(%rdi), %rax
xorl %r12d, %r12d
movl 0x4(%rax), %edx
movl 0x88(%rax), %ecx
testl %edx, %edx
sete %sil
cmpl $0x2, %ecx
setae %dil
xorb %sil, %dil
je 0x3791b
movb (%r14,%r12), %bpl
testl %ecx, %ecx
je 0x3789c
cmpl $0x1, %edx
jne 0x378a5
leal -0x1(%rcx), %esi
cmpb 0x8(%rax,%rsi), %bpl
jne 0x378c0
movl %esi, 0x88(%rax)
movq %r15, %rdi
callq 0x37ab6
movq 0x30(%r15), %rax
movb %bpl, 0x8(%rax)
movq 0x30(%r15), %rax
movl $0x1, 0x88(%rax)
movl $0x1, %ecx
jmp 0x378b7
xorl %ecx, %ecx
cmpl $0x2, %edx
je 0x378d5
jmp 0x378f5
cmpl $0x80, %ecx
jae 0x378c0
leal -0x1(%rcx), %esi
cmpb 0x8(%rax,%rsi), %bpl
jne 0x378e9
movl $0x2, 0x4(%rax)
jmp 0x378f5
cmpl $0x80, %ecx
sete %sil
cmpl $0x2, %edx
sete %dl
orb %sil, %dl
je 0x378ee
movq %r15, %rdi
callq 0x37ab6
movq 0x30(%r15), %rax
movl 0x88(%rax), %ecx
jmp 0x378f5
cmpl $0x2, %edx
je 0x378d5
movl $0x1, 0x4(%rax)
movl %ecx, %ecx
movb %bpl, 0x8(%rax,%rcx)
movq 0x30(%r15), %rax
incl 0x88(%rax)
incq %r12
cmpq %r12, %rbx
jne 0x3783b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
leaq 0x127ae3(%rip), %rsi # 0x15f412
movq %rax, %rdi
callq 0x19970
movq 0x1b86b2(%rip), %rsi # 0x1efff0
movq 0x1b867b(%rip), %rdx # 0x1effc0
movq %rbx, %rdi
callq 0x196e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x19a40
movq %r14, %rdi
callq 0x19710
|
/jberkenbilt[P]qpdf/libqpdf/Pl_RunLength.cc
|
Pl_RunLength::decode(unsigned char const*, unsigned long)
|
void
Pl_RunLength::decode(unsigned char const* data, size_t len)
{
if (memory_limit && (len + m->out.size()) > memory_limit) {
throw std::runtime_error("Pl_RunLength memory limit exceeded");
}
m->out.reserve(len);
for (size_t i = 0; i < len; ++i) {
unsigned char const& ch = data[i];
switch (m->state) {
case st_top:
if (ch < 128) {
// length represents remaining number of bytes to copy
m->length = 1U + ch;
m->state = st_copying;
} else if (ch > 128) {
// length represents number of copies of next byte
m->length = 257U - ch;
m->state = st_run;
} else // ch == 128
{
// EOD; stay in this state
}
break;
case st_copying:
m->out.append(1, static_cast<char>(ch));
if (--m->length == 0) {
m->state = st_top;
}
break;
case st_run:
m->out.append(m->length, static_cast<char>(ch));
m->state = st_top;
break;
}
}
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x1b97b0(%rip), %rax # 0x1f1128
movq 0x30(%rdi), %rdi
testq %rax, %rax
je 0x37994
movq 0x98(%rdi), %rcx
addq %rbx, %rcx
cmpq %rax, %rcx
ja 0x37a70
addq $0x90, %rdi
movq %rbx, %rsi
callq 0x19950
testq %rbx, %rbx
je 0x37a64
movq 0x30(%r15), %rdi
xorl %r12d, %r12d
movl 0x4(%rdi), %eax
cmpl $0x2, %eax
je 0x37a0b
cmpl $0x1, %eax
je 0x379de
testl %eax, %eax
jne 0x37a39
movzbl (%r14,%r12), %eax
testb %al, %al
js 0x37a47
incl %eax
movl %eax, 0x88(%rdi)
movl $0x1, 0x4(%rdi)
jmp 0x37a39
movsbl (%r14,%r12), %r8d
movq 0x98(%rdi), %rsi
addq $0x90, %rdi
movl $0x1, %ecx
xorl %edx, %edx
callq 0x19640
movq 0x30(%r15), %rdi
decl 0x88(%rdi)
jne 0x37a39
jmp 0x37a32
leaq 0x90(%rdi), %rax
movl 0x88(%rdi), %ecx
movsbl (%r14,%r12), %r8d
movq 0x98(%rdi), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x19640
movq 0x30(%r15), %rdi
movl $0x0, 0x4(%rdi)
incq %r12
cmpq %r12, %rbx
jne 0x379b3
jmp 0x37a64
cmpl $0x80, %eax
je 0x37a39
movl $0x101, %ecx # imm = 0x101
subl %eax, %ecx
movl %ecx, 0x88(%rdi)
movl $0x2, 0x4(%rdi)
jmp 0x37a39
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
leaq 0x1279bf(%rip), %rsi # 0x15f443
movq %rax, %rdi
callq 0x192b0
movq 0x1b850d(%rip), %rsi # 0x1effa0
movq 0x1b84d6(%rip), %rdx # 0x1eff70
movq %rbx, %rdi
callq 0x196e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x19a40
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_RunLength.cc
|
Pl_RunLength::finish()
|
void
Pl_RunLength::finish()
{
// When decoding, we might have read a length byte not followed by data, which means the stream
// was terminated early, but we will just ignore this case since this is the only sensible thing
// to do.
if (m->action == a_encode) {
flush_encode();
unsigned char ch = 128;
next()->write(&ch, 1);
} else {
if (memory_limit && (m->out.size()) > memory_limit) {
throw std::runtime_error("Pl_RunLength memory limit exceeded");
}
next()->writeString(m->out);
}
next()->finish();
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rsi
cmpl $0x0, (%rsi)
je 0x37bdf
movq 0x1b9569(%rip), %rax # 0x1f1128
testq %rax, %rax
je 0x37bcd
cmpq %rax, 0x98(%rsi)
ja 0x37c10
movq 0x28(%rbx), %rdi
addq $0x90, %rsi
callq 0x30b7c
jmp 0x37bfe
movq %rbx, %rdi
callq 0x37ab6
leaq 0x7(%rsp), %rsi
movb $-0x80, (%rsi)
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
movl $0x1, %edx
callq *0x10(%rax)
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
leaq 0x12781f(%rip), %rsi # 0x15f443
movq %rax, %rdi
callq 0x192b0
movq 0x1b836d(%rip), %rsi # 0x1effa0
movq 0x1b8336(%rip), %rdx # 0x1eff70
movq %rbx, %rdi
callq 0x196e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x19a40
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_RunLength.cc
|
Pl_SHA2::resetBits(int)
|
void
Pl_SHA2::resetBits(int bits)
{
if (this->in_progress) {
throw std::logic_error("bit reset requested for in-progress SHA2 Pipeline");
}
this->crypto = QPDFCryptoProvider::getImpl();
this->crypto->SHA2_init(bits);
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpb $0x1, 0x30(%rdi)
je 0x37d4c
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x62d9c
movaps (%r15), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r15)
movq 0x40(%r14), %rdi
movups %xmm0, 0x38(%r14)
testq %rdi, %rdi
je 0x37d36
callq 0x1ed58
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x37d36
callq 0x1ed58
movq 0x38(%r14), %rdi
movq (%rdi), %rax
movl %ebx, %esi
callq *0x38(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
leaq 0x12774f(%rip), %rsi # 0x15f4af
movq %rax, %rdi
callq 0x19970
movq 0x1b8281(%rip), %rsi # 0x1efff0
movq 0x1b824a(%rip), %rdx # 0x1effc0
movq %rbx, %rdi
callq 0x196e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x19a40
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_SHA2.cc
|
Pl_SHA2::write(unsigned char const*, unsigned long)
|
void
Pl_SHA2::write(unsigned char const* buf, size_t len)
{
if (!this->in_progress) {
this->in_progress = true;
}
// Write in chunks in case len is too big to fit in an int. Assume int is at least 32 bits.
static size_t const max_bytes = 1 << 30;
size_t bytes_left = len;
unsigned char const* data = buf;
while (bytes_left > 0) {
size_t bytes = (bytes_left >= max_bytes ? max_bytes : bytes_left);
this->crypto->SHA2_update(data, bytes);
bytes_left -= bytes;
data += bytes;
}
if (next()) {
next()->write(buf, len);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, (%rsp)
movq %rdi, %r15
cmpb $0x0, 0x30(%rdi)
jne 0x37db2
movb $0x1, 0x30(%r15)
testq %r14, %r14
je 0x37de8
movl $0x40000000, %ebp # imm = 0x40000000
movq %r14, %rbx
movq (%rsp), %r12
cmpq %rbp, %rbx
movl $0x40000000, %r13d # imm = 0x40000000
cmovbq %rbx, %r13
movq 0x38(%r15), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movq %r13, %rdx
callq *0x40(%rax)
addq %r13, %r12
subq %r13, %rbx
jne 0x37dc3
movq 0x28(%r15), %rdi
testq %rdi, %rdi
je 0x37e0f
movq (%rdi), %rax
movq 0x10(%rax), %rax
movq (%rsp), %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/jberkenbilt[P]qpdf/libqpdf/Pl_SHA2.cc
|
Pl_SHA2::finish()
|
void
Pl_SHA2::finish()
{
if (next()) {
next()->finish();
}
this->crypto->SHA2_finalize();
this->in_progress = false;
}
|
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x37e31
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x38(%rbx), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movb $0x0, 0x30(%rbx)
popq %rbx
retq
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_SHA2.cc
|
Pl_SHA2::getHexDigest[abi:cxx11]()
|
std::string
Pl_SHA2::getHexDigest()
{
if (this->in_progress) {
throw std::logic_error("digest requested for in-progress SHA2 Pipeline");
}
return QUtil::hex_encode(getRawDigest());
}
|
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpb $0x1, 0x30(%rsi)
je 0x37ef8
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x37e42
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13e84c
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37eed
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x190e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %r14
leaq 0x1275d5(%rip), %rsi # 0x15f4e1
movq %rax, %rdi
callq 0x19970
movq 0x1b80d5(%rip), %rsi # 0x1efff0
movq 0x1b809e(%rip), %rdx # 0x1effc0
movq %r14, %rdi
callq 0x196e0
movq %rax, %rbx
movq %r14, %rdi
callq 0x19a40
jmp 0x37f55
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37f55
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x190e0
movq %rbx, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_SHA2.cc
|
Pl_SHA2::~Pl_SHA2()
|
~Pl_SHA2() final = default;
|
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x37f70
callq 0x1ed58
leaq 0x1b1be9(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x37f93
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x190e0
popq %rbx
retq
nop
|
/jberkenbilt[P]qpdf/libqpdf/qpdf/Pl_SHA2.hh
|
Pl_StdioFile::Pl_StdioFile(char const*, _IO_FILE*)
|
Pl_StdioFile::Pl_StdioFile(char const* identifier, FILE* f) :
Pipeline(identifier, nullptr),
m(std::make_unique<Members>(f))
{
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
xorl %edx, %edx
callq 0x30a50
leaq 0x1b2828(%rip), %rax # 0x1ea7f0
movq %rax, (%rbx)
movl $0x8, %edi
callq 0x19180
movq %r14, (%rax)
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x1b1b72(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x38009
movq (%rbx), %rsi
incq %rsi
callq 0x190e0
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_StdioFile.cc
|
Pl_StdioFile::~Pl_StdioFile()
|
Pl_StdioFile::~Pl_StdioFile() = default;
|
pushq %rbx
movq %rdi, %rbx
leaq 0x1b27d3(%rip), %rax # 0x1ea7f0
movq %rax, (%rdi)
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x38033
movl $0x8, %esi
callq 0x190e0
movq $0x0, 0x30(%rbx)
leaq 0x1b1b1e(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x3805e
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x190e0
popq %rbx
retq
|
/jberkenbilt[P]qpdf/libqpdf/Pl_StdioFile.cc
|
Pl_StdioFile::~Pl_StdioFile()
|
void
Pl_StdioFile::write(unsigned char const* buf, size_t len)
{
size_t so_far = 0;
while (len > 0) {
so_far = fwrite(buf, 1, len, m->file);
if (so_far == 0) {
QUtil::throw_system_error(this->identifier + ": Pl_StdioFile::write");
} else {
buf += so_far;
len -= so_far;
}
}
}
|
pushq %rbx
movq %rdi, %rbx
callq 0x38012
movl $0x38, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x190e0
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_StdioFile.cc
|
Pl_StdioFile::write(unsigned char const*, unsigned long)
|
void
Pl_StdioFile::write(unsigned char const* buf, size_t len)
{
size_t so_far = 0;
while (len > 0) {
so_far = fwrite(buf, 1, len, m->file);
if (so_far == 0) {
QUtil::throw_system_error(this->identifier + ": Pl_StdioFile::write");
} else {
buf += so_far;
len -= so_far;
}
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdx, %rdx
je 0x38114
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r12
leaq 0x127470(%rip), %r13 # 0x15f519
movq 0x30(%r15), %rax
movq (%rax), %rcx
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x19ca0
testq %rax, %rax
je 0x380cd
addq %rax, %r14
subq %rax, %rbx
jmp 0x3810f
movq %rbp, 0x8(%rsp)
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x1e48a
movq %r12, %rdi
movq %r13, %rsi
callq 0x19730
movq %r12, %rdi
callq 0x13deab
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3810f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x190e0
testq %rbx, %rbx
jne 0x380a9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38125
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3813f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x190e0
movq %rbx, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_StdioFile.cc
|
Pl_StdioFile::finish()
|
void
Pl_StdioFile::finish()
{
if ((fflush(m->file) == -1) && (errno == EBADF)) {
throw std::logic_error(this->identifier + ": Pl_StdioFile::finish: stream already closed");
}
}
|
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
movq 0x30(%rdi), %rax
movq (%rax), %rdi
callq 0x19570
cmpl $-0x1, %eax
jne 0x3816e
callq 0x19ba0
cmpl $0x9, (%rax)
je 0x38177
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %rbx
addq $0x8, %r14
leaq 0x1273a0(%rip), %rdx # 0x15f52f
movq %rsp, %rdi
movq %r14, %rsi
callq 0x1e433
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x19150
xorl %ebp, %ebp
movq 0x1b7e3f(%rip), %rsi # 0x1efff0
movq 0x1b7e08(%rip), %rdx # 0x1effc0
movq %rbx, %rdi
callq 0x196e0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x381de
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x190e0
testb %bpl, %bpl
jne 0x381e8
jmp 0x381f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x19a40
movq %r14, %rdi
callq 0x19710
|
/jberkenbilt[P]qpdf/libqpdf/Pl_StdioFile.cc
|
Pl_String::Pl_String(char const*, Pipeline*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
|
Pl_String::Pl_String(char const* identifier, Pipeline* next, std::string& s) :
Pipeline(identifier, next),
m(std::make_unique<Members>(s))
{
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdi, %rbx
callq 0x30a50
leaq 0x1b262a(%rip), %rax # 0x1ea838
movq %rax, (%rbx)
movl $0x8, %edi
callq 0x19180
movq %r14, (%rax)
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x1b192c(%rip), %rax # 0x1e9b60
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x3824f
movq (%rbx), %rsi
incq %rsi
callq 0x190e0
movq %r14, %rdi
callq 0x19710
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_String.cc
|
Pl_TIFFPredictor::write(unsigned char const*, unsigned long)
|
void
Pl_TIFFPredictor::write(unsigned char const* data, size_t len)
{
auto end = data + len;
auto row_end = data + (bytes_per_row - cur_row.size());
while (row_end <= end) {
// finish off current row
cur_row.insert(cur_row.end(), data, row_end);
data = row_end;
row_end += bytes_per_row;
processRow();
// Prepare for next row
cur_row.clear();
}
cur_row.insert(cur_row.end(), data, end);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdx
addq %rsi, %rbx
movl 0x38(%rdi), %r13d
leaq 0x48(%rdi), %r14
movq 0x50(%rdi), %rax
movq 0x48(%rdi), %rsi
movq %rsi, %rcx
subq %rax, %rcx
addq %rdx, %r13
addq %rcx, %r13
cmpq %rbx, %r13
jbe 0x3855a
movq %rdx, %r12
jmp 0x38596
movq %rdi, %r15
movq %rax, %rsi
movq %r13, %r12
movq %r14, %rdi
movq %r13, %rcx
callq 0x38814
movl 0x38(%r15), %r13d
movq %r15, %rdi
callq 0x385b6
movq 0x48(%r15), %rsi
cmpq %rsi, 0x50(%r15)
je 0x38588
movq %rsi, 0x50(%r15)
addq %r12, %r13
movq %r12, %rdx
cmpq %rbx, %r13
jbe 0x38560
movq %rsi, %rax
subq %rsi, %rax
addq %rsi, %rax
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x38814
|
/jberkenbilt[P]qpdf/libqpdf/Pl_TIFFPredictor.cc
|
Pl_TIFFPredictor::processRow()
|
void
Pl_TIFFPredictor::processRow()
{
QTC::TC("libtests", "Pl_TIFFPredictor processRow", (action == a_decode ? 0 : 1));
previous.assign(samples_per_pixel, 0);
if (bits_per_sample != 8) {
BitWriter bw(next());
BitStream in(cur_row.data(), cur_row.size());
for (unsigned int col = 0; col < this->columns; ++col) {
for (auto& prev: previous) {
long long sample = in.getBitsSigned(this->bits_per_sample);
long long new_sample = sample;
if (action == a_encode) {
new_sample -= prev;
prev = sample;
} else {
new_sample += prev;
prev = new_sample;
}
bw.writeBitsSigned(new_sample, this->bits_per_sample);
}
}
bw.flush();
} else {
out.clear();
auto next_it = cur_row.begin();
auto cr_end = cur_row.end();
auto pr_end = previous.end();
while (next_it != cr_end) {
for (auto prev = previous.begin(); prev != pr_end && next_it != cr_end;
++prev, ++next_it) {
long long sample = *next_it;
long long new_sample = sample;
if (action == a_encode) {
new_sample -= *prev;
*prev = sample;
} else {
new_sample += *prev;
*prev = new_sample;
}
out.push_back(static_cast<unsigned char>(255U & new_sample));
}
}
next()->write(out.data(), out.size());
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
addq $0x60, %rdi
movl 0x3c(%rbx), %esi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %rdi, (%rsp)
callq 0x389fc
cmpl $0x8, 0x40(%rbx)
jne 0x38692
movq 0x78(%rbx), %rdx
cmpq %rdx, 0x80(%rbx)
je 0x38601
movq %rdx, 0x80(%rbx)
movq 0x48(%rbx), %r13
movq 0x50(%rbx), %rbp
movq %rdx, %rsi
cmpq %rbp, %r13
je 0x38680
leaq 0x78(%rbx), %r15
movq 0x68(%rbx), %r14
movq (%rsp), %rax
movq (%rax), %r12
cmpq %r14, %r12
je 0x38670
addq $0x8, %r12
movzbl (%r13), %eax
movq -0x8(%r12), %rcx
movl %eax, %edx
subl %ecx, %edx
cmpl $0x0, 0x30(%rbx)
leaq (%rcx,%rax), %rcx
movq %rcx, %rsi
cmoveq %rax, %rsi
movq %rsi, -0x8(%r12)
cmovel %edx, %ecx
movb %cl, 0x8(%rsp)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x38ddc
incq %r13
cmpq %r14, %r12
je 0x38670
addq $0x8, %r12
cmpq %rbp, %r13
jne 0x38629
cmpq %rbp, %r13
jne 0x38619
movq 0x78(%rbx), %rsi
movq 0x80(%rbx), %rdx
movq 0x28(%rbx), %rdi
subq %rsi, %rdx
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x38724
movq 0x28(%rbx), %rsi
leaq 0x30(%rsp), %rdi
callq 0x1d9a4
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
subq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x1d0ac
movl 0x34(%rbx), %eax
testl %eax, %eax
je 0x3871a
xorl %ebp, %ebp
leaq 0x8(%rsp), %r14
leaq 0x30(%rsp), %r15
movq 0x60(%rbx), %r12
movq 0x68(%rbx), %r13
cmpq %r13, %r12
je 0x38714
movl 0x40(%rbx), %esi
movq %r14, %rdi
callq 0x1d3dc
movq (%r12), %rsi
movq %rax, %rcx
subq %rsi, %rcx
addq %rax, %rsi
cmpl $0x0, 0x30(%rbx)
cmovneq %rsi, %rax
cmoveq %rcx, %rsi
movq %rax, (%r12)
movl 0x40(%rbx), %edx
movq %r15, %rdi
callq 0x1daaa
addq $0x8, %r12
cmpq %r13, %r12
jne 0x386d5
movl 0x34(%rbx), %eax
incl %ebp
cmpl %eax, %ebp
jb 0x386c8
leaq 0x30(%rsp), %rdi
callq 0x1daf0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/jberkenbilt[P]qpdf/libqpdf/Pl_TIFFPredictor.cc
|
Subsets and Splits
SQL Console for LLM4Binary/decompile-bench
Filters out entries with file names ending in .cpp, providing a basic subset of the dataset that excludes C++ files.