LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/Lut99[P]RayTracer/src/lib/ObjectTree.cpp
// Function: RayTracer::ObjectTree::hit(RayTracer::Ray const&, double, double, RayTracer::HitRecord&) const
bool ObjectTree::hit(const Ray& ray, double t_min, double t_max, HitRecord& record) const {
    // Do different things depending if we're optimised or not
    if (this->is_optimised) {
        // Quit if there is nothing
        if (this->root == nullptr) { return false; }

        // Simply use the tree structure
        return this->root->quick_hit(ray, t_min, t_max) && this->root->hit(ray, t_min, t_max, record);
    }

    cerr << "WARNING: ObjectTree @ " << this << " is not optimised." << endl;

    // Otherwise, do it loop-wise
    double t_best = t_max;
    bool hit = false;
    for (size_t i = 0; i < this->objects.size(); i++) {
        // Fetch the correct item from the list
        RenderObject* obj = this->objects.at(i);
        if (obj->quick_hit(ray, t_min, t_best) && obj->hit(ray, t_min, t_best, record)) {
            t_best = record.t;
            hit = true;
        }
    }

    // Return if we hit or not
    return hit;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x1, 0x20(%rdi)
jne 0x821cc
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x822c5
movq (%rdi), %rax
movq %r14, %rsi
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
callq *0x10(%rax)
testb %al, %al
je 0x822c5
movq 0x18(%r15), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %r14, %rsi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
movq 0x21df9(%rip), %r12     # 0xa3fd8
leaq 0x8928(%rip), %rsi      # 0x8ab0e
movl $0x16, %edx
movq %r12, %rdi
callq 0x3a500
movq %r12, %rdi
movq %r15, %rsi
callq 0x3a370
movq %rax, %r12
leaq 0x891d(%rip), %rsi      # 0x8ab25
movl $0x12, %edx
movq %rax, %rdi
callq 0x3a500
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3a440
movsbl %al, %esi
movq %r12, %rdi
callq 0x3a050
movq %rax, %rdi
callq 0x3a310
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x822c5
xorl %r13d, %r13d
xorl %ebp, %ebp
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
movq (%rax,%r13,8), %r12
movq (%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
movsd %xmm1, 0x8(%rsp)
callq *0x20(%rax)
testb %al, %al
je 0x822a1
movq (%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %rbx, %rdx
callq *0x30(%rax)
testb %al, %al
movsd 0x8(%rsp), %xmm1
je 0x822a7
movsd (%rbx), %xmm1
movb $0x1, %bpl
jmp 0x822a7
movsd 0x8(%rsp), %xmm1
incq %r13
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
movsd 0x10(%rsp), %xmm0
jb 0x82257
jmp 0x822c7
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Lut99[P]RayTracer/src/lib/ObjectTree.cpp
// Function: RayTracer::ObjectTree::operator=(RayTracer::ObjectTree)
ObjectTree& ObjectTree::operator=(ObjectTree other) {
    if (this != &other) {
        // Copy by swapping
        swap(*this, other);
    }
    return *this;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x822ed
movq %rbx, %rdi
callq 0x822f2
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/Lut99[P]RayTracer/src/lib/ObjectTree.cpp
// Function: RayTracer::ObjectTree::operator=(RayTracer::ObjectTree&&)
ObjectTree& ObjectTree::operator=(ObjectTree&& other) {
    if (this != &other) {
        // Copy by swapping
        swap(*this, other);
    }
    return *this;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x8234d
movq %rbx, %rdi
callq 0x822f2
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: choose_window(_XDisplay*)
Window choose_window(Display * display){
    Window root = RootWindow(display, DefaultScreen(display));
    Window root_out;
    int root_x, root_y;
    int win_x, win_y;
    unsigned int mask;
    Window child = 0;
    Cursor cursor;

    cursor = XCreateFontCursor(display, XC_crosshair);

    XGrabPointer(display, root, False, ButtonPressMask | ButtonReleaseMask, GrabModeSync, GrabModeAsync, root, cursor, CurrentTime);

    // std::cout << "Grabbing window" << std::endl;
    while (1){
        XAllowEvents(display, SyncPointer, CurrentTime);
        XEvent event;
        XWindowEvent(display, root, ButtonPressMask | ButtonReleaseMask, &event);
        if (event.type == ButtonPress){
            child = event.xbutton.subwindow;
            break;
        }
    }

    // XQueryPointer(display, root, &root_out, &child, &root_x, &root_y, &win_x, &win_y, &mask);
    // std::cout << "Grabbed window " << child << std::endl;
    XUngrabPointer(display, CurrentTime);
    std::cout << "Grabbed window " << child << std::endl;
    if (child == root){
        return 0;
    }

    return child;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %r14
movq 0xe8(%rdi), %rax
movslq 0xe0(%rdi), %rcx
shlq $0x7, %rcx
movq 0x10(%rax,%rcx), %rbx
movl $0x22, %esi
callq 0x3190
subq $0x8, %rsp
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl $0xc, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq $0x0
pushq %rax
pushq %rbx
callq 0x3110
addq $0x20, %rsp
leaq -0xe0(%rbp), %r15
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3150
movl $0xc, %edx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x3080
cmpl $0x4, -0xe0(%rbp)
jne 0x3780
movq -0xb0(%rbp), %r15
xorl %r12d, %r12d
movq %r14, %rdi
xorl %esi, %esi
callq 0x3290
movq 0x480a(%rip), %r14      # 0x7fd0
leaq 0x28cb(%rip), %rsi      # 0x6098
movl $0xf, %edx
movq %r14, %rdi
callq 0x3350
movq %r14, %rdi
movq %r15, %rsi
callq 0x31c0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x32c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
cmpq %rbx, %r15
cmoveq %r12, %r15
movq %r15, %rax
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: find_xborder_window(_XDisplay*)
Window find_xborder_window(Display * display){
    Window chosen = choose_window(display);
    if (chosen == 0){
        std::cout << "Error: Window could not be selected, or root window chosen" << std::endl;
        return 0;
    }
    Atom xborder = XInternAtom(display, "xborder", false);
    Window xborder_window = find_window_by_atom(display, chosen, xborder);
    if (xborder_window == 0){
        std::cout << "Error: Selected window is not an xborder: " << chosen << std::endl;
        return 0;
    }
    return xborder_window;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x371c
testq %rax, %rax
je 0x3860
movq %rax, %r14
leaq 0x2aab(%rip), %rsi      # 0x62f2
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3200
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x38a9
movq 0x4769(%rip), %rbx      # 0x7fd0
leaq 0x283a(%rip), %rsi      # 0x60a8
movl $0x3a, %edx
movq %rbx, %rdi
callq 0x3350
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: find_window_by_atom(_XDisplay*, unsigned long, unsigned long)
static Window find_window_by_atom(Display *dpy, Window win, Atom atom){
    Atom type = None;
    int format;
    unsigned long nitems, after;
    unsigned char *data = NULL;
    Window inf;

    // std::cout << "Find window with atom " << XGetAtomName(dpy, atom) << std::endl;
    XGetWindowProperty(dpy, win, atom, 0, 0, False, AnyPropertyType,
            &type, &format, &nitems, &after, &data);
    if (data)
        XFree(data);
    if (type)
        return win;
    inf = TryChildren(dpy, win, atom);
    if (!inf)
        inf = win;
    return inf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
xorl %eax, %eax
leaq -0x30(%rbp), %r10
movq %rax, (%r10)
leaq -0x40(%rbp), %r12
movq %rax, (%r12)
leaq -0x48(%rbp), %r11
leaq -0x50(%rbp), %r13
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r11
pushq %r13
leaq -0x34(%rbp), %r11
pushq %r11
pushq %r10
pushq %rax
callq 0x30c0
addq $0x30, %rsp
movq (%r12), %rdi
testq %rdi, %rdi
je 0x390a
callq 0x33a0
cmpq $0x0, -0x30(%rbp)
jne 0x3926
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x5067
testq %rax, %rax
cmovneq %rax, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: find_terminal(_XDisplay*)
Window find_terminal(Display * display){
    Window child = choose_window(display);
    if (child == 0){
        return 0;
    }
    return _XmuClientWindow(display, child);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x371c
testq %rax, %rax
je 0x397a
movq %rax, %rbx
leaq 0x284c(%rip), %rsi      # 0x61a2
movq %r14, %rdi
movl $0x1, %edx
callq 0x3200
testq %rax, %rax
je 0x397c
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x38a9
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: hsv2rgb(hsv)
rgb hsv2rgb(hsv HSV){
    rgb RGB;
    double H = HSV.h, S = HSV.s, V = HSV.v,
           P, Q, T,
           fract;

    (H == 360.)?(H = 0.):(H /= 60.);
    fract = H - floor(H);

    P = V*(1. - S);
    Q = V*(1. - S*fract);
    T = V*(1. - S*(1. - fract));

    if      (0. <= H && H < 1.)
        RGB = (rgb){.r = V, .g = T, .b = P};
    else if (1. <= H && H < 2.)
        RGB = (rgb){.r = Q, .g = V, .b = P};
    else if (2. <= H && H < 3.)
        RGB = (rgb){.r = P, .g = V, .b = T};
    else if (3. <= H && H < 4.)
        RGB = (rgb){.r = P, .g = Q, .b = V};
    else if (4. <= H && H < 5.)
        RGB = (rgb){.r = T, .g = P, .b = V};
    else if (5. <= H && H < 6.)
        RGB = (rgb){.r = V, .g = P, .b = Q};
    else
        RGB = (rgb){.r = 0., .g = 0., .b = 0.};

    return RGB;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movsd 0x10(%rbp), %xmm0
movsd 0x18(%rbp), %xmm1
movsd %xmm1, -0x18(%rbp)
movapd %xmm0, %xmm1
divsd 0x256e(%rip), %xmm1     # 0x6010
movsd 0x20(%rbp), %xmm2
movsd %xmm2, -0x10(%rbp)
cmpeqsd 0x2563(%rip), %xmm0     # 0x6018
andnpd %xmm1, %xmm0
movapd %xmm0, -0x30(%rbp)
callq 0x3530
movsd -0x18(%rbp), %xmm6
movsd -0x10(%rbp), %xmm5
movapd -0x30(%rbp), %xmm7
movapd %xmm7, %xmm3
subsd %xmm0, %xmm3
movsd 0x253e(%rip), %xmm1     # 0x6020
movapd %xmm1, %xmm0
subsd %xmm6, %xmm0
mulsd %xmm5, %xmm0
movapd %xmm1, %xmm4
subsd %xmm3, %xmm4
mulsd %xmm6, %xmm4
movapd %xmm1, %xmm2
subsd %xmm4, %xmm2
mulsd %xmm5, %xmm2
xorpd %xmm4, %xmm4
ucomisd %xmm4, %xmm7
movapd %xmm7, %xmm4
jb 0x3b25
ucomisd %xmm4, %xmm1
jbe 0x3b25
movsd %xmm5, (%rbx)
movsd %xmm2, 0x8(%rbx)
jmp 0x3b52
mulsd %xmm3, %xmm6
subsd %xmm6, %xmm1
mulsd %xmm5, %xmm1
ucomisd 0x24e7(%rip), %xmm4     # 0x6020
jb 0x3b61
movsd 0x24e5(%rip), %xmm3     # 0x6028
ucomisd %xmm4, %xmm3
jbe 0x3b61
movsd %xmm1, (%rbx)
movsd %xmm5, 0x8(%rbx)
movsd %xmm0, 0x10(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
ucomisd 0x24bf(%rip), %xmm4     # 0x6028
jb 0x3b89
movsd 0x24bd(%rip), %xmm3     # 0x6030
ucomisd %xmm4, %xmm3
jbe 0x3b89
movsd %xmm0, (%rbx)
movsd %xmm5, 0x8(%rbx)
movsd %xmm2, 0x10(%rbx)
jmp 0x3b57
ucomisd 0x249f(%rip), %xmm4     # 0x6030
jb 0x3bac
movsd 0x249d(%rip), %xmm3     # 0x6038
ucomisd %xmm4, %xmm3
jbe 0x3bac
movsd %xmm0, (%rbx)
movsd %xmm1, 0x8(%rbx)
jmp 0x3bcd
ucomisd 0x2484(%rip), %xmm4     # 0x6038
jb 0x3bd4
movsd 0x2482(%rip), %xmm3     # 0x6040
ucomisd %xmm4, %xmm3
jbe 0x3bd4
movsd %xmm2, (%rbx)
movsd %xmm0, 0x8(%rbx)
movsd %xmm5, 0x10(%rbx)
jmp 0x3b57
ucomisd 0x2464(%rip), %xmm4     # 0x6040
jb 0x3bff
movsd 0x2462(%rip), %xmm2     # 0x6048
ucomisd %xmm4, %xmm2
jbe 0x3bff
movsd %xmm5, (%rbx)
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x10(%rbx)
jmp 0x3b57
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
jmp 0x3b57
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: get_rgb(int, float, float)
rgb get_rgb(int h, float s, float v){
    hsv hsv;
    hsv.h = h;
    hsv.s = s;
    hsv.v = v;
    return hsv2rgb(hsv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
cvtsi2sd %esi, %xmm2
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
movsd %xmm2, -0x20(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd %xmm1, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x20(%rbp), %xmm0
movups %xmm0, (%rsp)
callq 0x3a7b
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: get_rgb(int, int)
rgb get_rgb(int x, int y){
    if (x < 0 || x > palette_x || y < 0 || y > palette_y){
        rgb out;
        out.r = 0;
        out.g = 0;
        out.b = 0;
        return out;
    }
    hsv hsv;
    hsv.h = (int) interpolate(x, 0, palette_x, 0, 360);
    hsv.s = 1.0;
    hsv.v = 1.2 - interpolate(y, 0, palette_y, 0.2, 1.0);
    return hsv2rgb(hsv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
cmpl $0x15, %esi
setb %al
cmpl $0x7, %edx
setb %cl
testb %cl, %al
jne 0x3ca8
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
jmp 0x3d2a
cvtsi2ss %esi, %xmm0
mulss 0x23a4(%rip), %xmm0     # 0x6058
divss 0x23a0(%rip), %xmm0     # 0x605c
xorps %xmm1, %xmm1
addss %xmm0, %xmm1
cvttps2dq %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
cvtdq2pd %xmm0, %xmm0
mulss 0x2386(%rip), %xmm1     # 0x6060
divss 0x2382(%rip), %xmm1     # 0x6064
addss 0x237e(%rip), %xmm1     # 0x6068
cvtss2sd %xmm1, %xmm1
movsd 0x235a(%rip), %xmm2     # 0x6050
subsd %xmm1, %xmm2
movlps %xmm0, -0x20(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x18(%rbp)
movsd %xmm2, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x20(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x3a7b
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: x_error(_XDisplay*, XErrorEvent*)
int x_error(Display * display, XErrorEvent * event){
    char buffer[256];
    snprintf(buffer, sizeof(buffer), "/tmp/xborder-error.%lu", window);
    FILE * log = fopen(buffer, "a");
    fprintf(log, "xborder pid %d window id %lu crashed\n", getpid(), window);
    fprintf(log, "xerror:\n");
    fprintf(log, "  serial: %lu\n", event->serial);
    char error_string[256];
    XGetErrorText(display, event->error_code, error_string, sizeof(error_string));
    fprintf(log, "  error code: %s\n", error_string);
    fprintf(log, "  request code: %d\n", event->request_code);
    fprintf(log, "  minor code: %d\n", event->minor_code);
    fprintf(log, "  resource id: %lu\n", event->resourceid);
    fprintf(log, "\n");
    show_backtrace(fileno(log));
    fclose(log);
    // exit(1);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x520, %rsp            # imm = 0x520
movq %rsi, %r14
movq %rdi, %r15
movq 0x42c6(%rip), %rcx      # 0x8318
leaq 0x208a(%rip), %rdx      # 0x60e3
leaq -0x220(%rbp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x34e0
leaq 0x2084(%rip), %rsi      # 0x60fa
movq %rbx, %rdi
callq 0x3360
movq %rax, %rbx
callq 0x3450
movq 0x428b(%rip), %rcx      # 0x8318
leaq 0x2068(%rip), %rsi      # 0x60fc
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x3410
leaq 0x207b(%rip), %rdi      # 0x6122
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x35d0
movq 0x18(%r14), %rdx
leaq 0x2067(%rip), %rsi      # 0x612b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3410
movzbl 0x20(%r14), %esi
leaq -0x120(%rbp), %r12
movq %r15, %rdi
movq %r12, %rdx
movl $0x100, %ecx            # imm = 0x100
callq 0x3430
leaq 0x2049(%rip), %rsi      # 0x613a
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3410
movzbl 0x21(%r14), %edx
leaq 0x2042(%rip), %rsi      # 0x614c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3410
movzbl 0x22(%r14), %edx
leaq 0x2040(%rip), %rsi      # 0x6160
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3410
movq 0x10(%r14), %rdx
leaq 0x203d(%rip), %rsi      # 0x6172
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3410
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3380
movq %rbx, %rdi
callq 0x3320
movl %eax, %r14d
leaq -0x540(%rbp), %r15
movq %r15, %rdi
movl $0x64, %esi
callq 0x3470
movq %r15, %rdi
movl %eax, %esi
movl %r14d, %edx
callq 0x34d0
movq %rbx, %rdi
callq 0x32d0
xorl %eax, %eax
addq $0x520, %rsp            # imm = 0x520
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: get_window_title[abi:cxx11](_XDisplay*, unsigned long)
std::string get_window_title(Display * display, Window window){
    char* buffer = NULL;
    if (XFetchName(display, window, &buffer) != 0){
        if (buffer != NULL){
            std::string out = buffer;
            XFree(buffer);
            return out;
        }
    }

    return "XBorder";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x20(%rbp), %r14
movq $0x0, (%r14)
movq %rsi, %rdi
movq %rdx, %rsi
movq %r14, %rdx
callq 0x3490
testl %eax, %eax
setne %al
movq (%r14), %r14
testq %r14, %r14
setne %cl
andb %al, %cl
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
cmpb $0x1, %cl
jne 0x41f8
movq %r14, %rdi
callq 0x3140
movq %r14, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5922
movq -0x20(%rbp), %rdi
callq 0x33a0
jmp 0x420e
leaq 0x1f87(%rip), %rsi      # 0x6186
leaq 0x1f87(%rip), %rdx      # 0x618d
movq %rbx, %rdi
callq 0x5922
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x4232
movq (%r15), %rsi
incq %rsi
callq 0x3300
movq %r14, %rdi
callq 0x3550
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: do_configure_xborder()
void do_configure_xborder(){
    Display * display;

    display = XOpenDisplay(NULL);
    if (display == NULL){
        std::cerr << "Cannot open display" << std::endl;
        return;
    }

    Window chosen = find_xborder_window(display);
    if (chosen == 0){
        XCloseDisplay(display);
        return;
    }

    // std::cout << "Send event to window " << chosen << std::endl;

    Atom xborder_configure = XInternAtom(display, "xborder", false);

    XEvent event;
    XClientMessageEvent * client = &event.xclient;
    event.type = ClientMessage;
    client->message_type = xborder_configure;
    client->format = 8;
    client->window = chosen;
    client->data.b[0] = XBorderConfigure;

    if (XSendEvent(display, chosen, 0, 0, &event) != 0){
        std::cout << "Reconfigured xborder window " << chosen << std::endl;
    } else {
        std::cout << "Could not send an event" << std::endl;
    }
    XCloseDisplay(display);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
xorl %edi, %edi
callq 0x33e0
testq %rax, %rax
je 0x4e98
movq %rax, %rbx
movq %rax, %rdi
callq 0x3829
testq %rax, %rax
je 0x4ee7
movq %rax, %r14
leaq 0x14c9(%rip), %rsi      # 0x62f2
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3200
leaq -0xd8(%rbp), %r8
movl $0x21, (%r8)
movq %rax, 0x28(%r8)
movl $0x8, 0x30(%r8)
movq %r14, 0x20(%r8)
movb $0x0, 0x38(%r8)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3070
testl %eax, %eax
je 0x4efc
movq 0x315c(%rip), %r15      # 0x7fd0
leaq 0x147f(%rip), %rsi      # 0x62fa
movl $0x1c, %edx
movq %r15, %rdi
callq 0x3350
movq %r15, %rdi
movq %r14, %rsi
callq 0x31c0
movq %rax, %r14
jmp 0x4f17
movq 0x3151(%rip), %rbx      # 0x7ff0
leaq 0x1342(%rip), %rsi      # 0x61e8
movl $0x13, %edx
movq %rbx, %rdi
callq 0x3350
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31d0
movq %rbx, %rdi
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x35a0
movq 0x30cd(%rip), %r14      # 0x7fd0
leaq 0x140d(%rip), %rsi      # 0x6317
movl $0x17, %edx
movq %r14, %rdi
callq 0x3350
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x32c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
movq %rbx, %rdi
callq 0x35a0
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: main
int main(int argc, char ** argv){
    bool glow = false;

    for (int i = 1; i < argc; i++){
        std::string arg(argv[i]);
        if (arg == "glow" ||
            arg == "-glow" ||
            arg == "--glow"){
            glow = true;
        } else if (arg == "configure"){
            do_configure_xborder();
            return 0;
        }
    }

    run_xborder(glow);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x2, %edi
jl 0x501f
movq %rsi, %rbx
movl %edi, %r13d
movl $0x1, %r12d
movl $0x0, -0x2c(%rbp)
leaq -0x50(%rbp), %r14
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
leaq -0x2d(%rbp), %rdx
callq 0x519a
movq %r14, %rdi
leaq 0x1392(%rip), %rsi      # 0x6331
callq 0x30b0
movb $0x1, %r15b
testl %eax, %eax
je 0x4fee
movq %r14, %rdi
leaq 0x137b(%rip), %rsi      # 0x6330
callq 0x30b0
testl %eax, %eax
je 0x4fee
movq %r14, %rdi
leaq 0x1367(%rip), %rsi      # 0x632f
callq 0x30b0
testl %eax, %eax
je 0x4fee
movq %r14, %rdi
leaq 0x135b(%rip), %rsi      # 0x6336
callq 0x30b0
testl %eax, %eax
jne 0x4ff3
callq 0x4deb
xorl %r15d, %r15d
jmp 0x4ff3
movb $0x1, %al
movl %eax, -0x2c(%rbp)
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x500c
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3300
testb %r15b, %r15b
je 0x5032
incq %r12
cmpq %r12, %r13
jne 0x4f85
jmp 0x5026
movl $0x0, -0x2c(%rbp)
movzbl -0x2c(%rbp), %edi
andl $0x1, %edi
callq 0x450b
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x505f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3300
movq %rbx, %rdi
callq 0x3550
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: TryChildren(_XDisplay*, unsigned long, unsigned long)
static Window TryChildren(Display *dpy, Window win, Atom WM_STATE){
    Window root, parent;
    Window *children;
    unsigned int nchildren;
    unsigned int i;
    Atom type = None;
    int format;
    unsigned long nitems, after;
    unsigned char *data;
    Window inf = 0;

    if (!XQueryTree(dpy, win, &root, &parent, &children, &nchildren))
        return 0;
    for (i = 0; !inf && (i < nchildren); i++) {
        data = NULL;
        XGetWindowProperty(dpy, children[i], WM_STATE, 0, 0, False,
                AnyPropertyType, &type, &format, &nitems,
                &after, &data);
        if (data)
            XFree(data);
        if (type)
            inf = children[i];
    }
    for (i = 0; !inf && (i < nchildren); i++)
        inf = TryChildren(dpy, children[i], WM_STATE);
    if (children)
        XFree(children);
    return inf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq $0x0, -0x48(%rbp)
leaq -0x70(%rbp), %rdx
leaq -0x68(%rbp), %rcx
leaq -0x38(%rbp), %r8
leaq -0x2c(%rbp), %r9
callq 0x3120
testl %eax, %eax
je 0x5172
cmpl $0x0, -0x2c(%rbp)
je 0x5177
movl $0x1, %r13d
xorl %r12d, %r12d
movq %r12, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rax,%r13,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
leaq -0x40(%rbp), %rax
pushq %rax
leaq -0x58(%rbp), %rax
pushq %rax
leaq -0x60(%rbp), %rax
pushq %rax
leaq -0x4c(%rbp), %rax
pushq %rax
leaq -0x48(%rbp), %rax
pushq %rax
pushq %r12
callq 0x30c0
addq $0x30, %rsp
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x5103
callq 0x33a0
cmpq $0x0, -0x48(%rbp)
je 0x5115
movq -0x38(%rbp), %rax
movq -0x8(%rax,%r13,8), %r15
jmp 0x5118
xorl %r15d, %r15d
movl -0x2c(%rbp), %eax
testq %r15, %r15
jne 0x512c
leaq 0x1(%r13), %rcx
cmpq %rax, %r13
movq %rcx, %r13
jb 0x50b6
testl %eax, %eax
setne %al
testq %r15, %r15
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x517a
movl $0x1, %r12d
movq -0x38(%rbp), %rax
movq -0x8(%rax,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5067
movq %rax, %r15
testq %rax, %rax
jne 0x517a
leaq 0x1(%r12), %rax
movl -0x2c(%rbp), %ecx
cmpq %rcx, %r12
movq %rax, %r12
jb 0x5144
jmp 0x517a
xorl %r15d, %r15d
jmp 0x5188
xorl %r15d, %r15d
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x5188
callq 0x33a0
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kazzmir[P]xborder/src/main.cpp
// Function: OptionWindow::create(_XDisplay*, unsigned long)
static OptionWindow* create(Display * display, Window xborder_window){
        Atom wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", false);
        int screen = DefaultScreen(display);
        int width = (palette_x + 1) * palette_size_block + 5;
        int height = palette_start_y + (palette_y + 1) * palette_size_block;
        Window window = XCreateSimpleWindow(display, RootWindow(display, screen),
                                            1, 1,
                                            width, height,
                                            1, BlackPixel(display, screen), WhitePixel(display, screen));
        XFontStruct * fontInfo = XLoadQueryFont(display, "6x10");
        XGCValues values;
        // values.font = fontInfo->fid;
        values.foreground = BlackPixel(display, screen);
        GC graphics = XCreateGC(display, window, GCForeground, &values);
        XSelectInput(display, window,
                     ExposureMask |
                     KeyPress |
                     KeyRelease |
                     ButtonPressMask |
                     ButtonReleaseMask |
                     Button1MotionMask |
                     StructureNotifyMask);
        XMapWindow(display, window);
        XStoreName(display, window, "XBorder options");
        XSetWMProtocols(display, window, &wm_delete_window, 1);

        return new OptionWindow(display, window, graphics, xborder_window);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xd5a(%rip), %rsi       # 0x62c3
xorl %edx, %edx
callq 0x3200
leaq -0x30(%rbp), %r15
movq %rax, (%r15)
movslq 0xe0(%r14), %r13
movq 0xe8(%r14), %rax
shlq $0x7, %r13
movq 0x10(%rax,%r13), %rsi
subq $0x8, %rsp
movq %r14, %rdi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x140, %r8d            # imm = 0x140
movl $0x91, %r9d
pushq 0x58(%rax,%r13)
pushq 0x60(%rax,%r13)
pushq $0x1
callq 0x30d0
addq $0x20, %rsp
movq %rax, %r12
leaq 0xdb7(%rip), %rsi       # 0x6381
movq %r14, %rdi
callq 0x3570
movq 0xe8(%r14), %rax
movq 0x60(%rax,%r13), %rax
leaq -0xb0(%rbp), %rcx
movq %rax, 0x10(%rcx)
movl $0x4, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x3160
movq %rax, %r13
movl $0x2810f, %edx          # imm = 0x2810F
movq %r14, %rdi
movq %r12, %rsi
callq 0x31b0
movq %r14, %rdi
movq %r12, %rsi
callq 0x3330
leaq 0xd68(%rip), %rdx       # 0x6386
movq %r14, %rdi
movq %r12, %rsi
callq 0x3060
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x3180
movl $0x68, %edi
callq 0x32f0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x59ce
movq %r15, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x68, %esi
movq %r15, %rdi
callq 0x3300
movq %rbx, %rdi
callq 0x3550
// File: /workspace/github_cpp_makefile_star2_O3/j-faria[P]kima/examples/default_priors/kima_setup.cpp
// Function: main
int main(int argc, char** argv)
{
    datafile = "dummy_data.rv";

    load(datafile, "kms", 0);

    Sampler<RVmodel> sampler = setup<RVmodel>(argc, argv);
    sampler.run(1000);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x6c0, %rsp            # imm = 0x6C0
movq %rsi, %rbx
movl %edi, %ebp
movq 0x30151(%rip), %rdx     # 0x50548
leaq 0x30142(%rip), %r14     # 0x50540
leaq 0x224e8(%rip), %rcx     # 0x428ed
movl $0xd, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x6600
leaq 0x8(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x1d0e9(%rip), %rsi     # 0x3d510
movq %r14, %rdi
callq 0x20627
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x2072a
movq %r14, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x207fc
leaq 0x8(%rsp), %rdi
callq 0x209da
xorl %eax, %eax
addq $0x6c0, %rsp            # imm = 0x6C0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x209da
movq %rbx, %rdi
callq 0x6710
nop
// File: /workspace/github_cpp_makefile_star2_O3/yckwong[P]tinywebserver/timer/lst_timer.cpp
// Function: sort_timer_lst::add_timer(util_timer*)
void sort_timer_lst::add_timer(util_timer *timer)
{
    if (!timer)
    {
        return;
    }
    if (!head)
    {
        head = tail = timer;
        return;
    }
    if (timer->expire < head->expire)
    {
        timer->next = head;
        head->prev = timer;
        head = timer;
        return;
    }
    add_timer(timer, head);
}

// Assembly:
testq %rsi, %rsi
je 0x3f90
movq (%rdi), %rax
testq %rax, %rax
je 0x3f89
movq (%rsi), %rcx
cmpq (%rax), %rcx
jge 0x3f67
movq %rax, 0x20(%rsi)
movq %rsi, 0x18(%rax)
jmp 0x3f8d
movq %rax, %rdx
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x3f91
cmpq (%rax), %rcx
jge 0x3f67
movq %rsi, 0x20(%rdx)
movq %rax, 0x20(%rsi)
movq %rsi, 0x18(%rax)
movq %rdx, 0x18(%rsi)
retq
movq %rsi, 0x8(%rdi)
movq %rsi, (%rdi)
retq
movq %rsi, 0x20(%rdx)
movq %rdx, 0x18(%rsi)
movq $0x0, 0x20(%rsi)
movq %rsi, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/yckwong[P]tinywebserver/timer/lst_timer.cpp
// Function: sort_timer_lst::adjust_timer(util_timer*)
void sort_timer_lst::adjust_timer(util_timer *timer)
{
    if (!timer)
    {
        return;
    }
    util_timer *tmp = timer->next;
    if (!tmp || (timer->expire < tmp->expire))
    {
        return;
    }
    if (timer == head)
    {
        head = head->next;
        head->prev = NULL;
        timer->next = NULL;
        add_timer(timer, head);
    }
    else
    {
        timer->prev->next = timer->next;
        timer->next->prev = timer->prev;
        add_timer(timer, timer->next);
    }
}

// Assembly:
testq %rsi, %rsi
je 0x408d
movq 0x20(%rsi), %rcx
testq %rcx, %rcx
je 0x408d
movq (%rsi), %rax
cmpq (%rcx), %rax
jl 0x408d
movq (%rdi), %rdx
cmpq %rsi, %rdx
je 0x403c
movq 0x18(%rsi), %r8
movq %rcx, 0x20(%r8)
movq 0x20(%rsi), %rdx
movq %r8, 0x18(%rdx)
movq %rdx, %rcx
movq 0x20(%rdx), %rdx
testq %rdx, %rdx
je 0x406f
cmpq (%rdx), %rax
jge 0x401a
movq %rsi, 0x20(%rcx)
movq %rdx, 0x20(%rsi)
movq %rsi, 0x18(%rdx)
movq %rcx, 0x18(%rsi)
retq
movq 0x20(%rdx), %rcx
movq %rcx, (%rdi)
xorl %edx, %edx
movq %rdx, 0x18(%rcx)
movq %rdx, 0x20(%rsi)
movq %rcx, %rdx
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
je 0x4079
cmpq (%rcx), %rax
jge 0x404d
movq %rsi, 0x20(%rdx)
movq %rcx, 0x20(%rsi)
movq %rsi, 0x18(%rcx)
movq %rdx, 0x18(%rsi)
retq
movq %rsi, 0x20(%rcx)
movq %rcx, 0x18(%rsi)
jmp 0x4081
movq %rsi, 0x20(%rdx)
movq %rdx, 0x18(%rsi)
movq $0x0, 0x20(%rsi)
movq %rsi, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/yckwong[P]tinywebserver/timer/lst_timer.cpp
// Function: sort_timer_lst::del_timer(util_timer*)
void sort_timer_lst::del_timer(util_timer *timer)
{
    if (!timer)
    {
        return;
    }
    if ((timer == head) && (timer == tail))
    {
        delete timer;
        head = NULL;
        tail = NULL;
        return;
    }
    if (timer == head)
    {
        head = head->next;
        head->prev = NULL;
        delete timer;
        return;
    }
    if (timer == tail)
    {
        tail = tail->prev;
        tail->next = NULL;
        delete timer;
        return;
    }
    timer->prev->next = timer->next;
    timer->next->prev = timer->prev;
    delete timer;
}

// Assembly:
pushq %rbx
testq %rsi, %rsi
je 0x4104
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdi), %rdx
movq 0x8(%rdi), %rcx
cmpq %rsi, %rdx
je 0x40bd
cmpq %rax, %rcx
je 0x40d3
movq 0x18(%rax), %rcx
movq 0x20(%rax), %rdx
movq %rdx, 0x20(%rcx)
movq %rcx, 0x18(%rdx)
jmp 0x40e3
cmpq %rax, %rcx
je 0x40f1
movq 0x20(%rdx), %rcx
movq %rcx, (%rbx)
movq $0x0, 0x18(%rcx)
jmp 0x40e3
movq 0x18(%rcx), %rcx
movq %rcx, 0x8(%rbx)
movq $0x0, 0x20(%rcx)
movl $0x28, %esi
movq %rax, %rdi
popq %rbx
jmp 0x3430
movl $0x28, %esi
movq %rax, %rdi
callq 0x3430
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/yckwong[P]tinywebserver/timer/lst_timer.cpp
// Function: sort_timer_lst::tick()
void sort_timer_lst::tick()
{
    if (!head)
    {
        return;
    }
    
    time_t cur = time(NULL);
    util_timer *tmp = head;
    while (tmp)
    {
        if (cur < tmp->expire)
        {
            break;
        }
        tmp->cb_func(tmp->user_data);
        head = tmp->next;
        if (head)
        {
            head->prev = NULL;
        }
        delete tmp;
        tmp = head;
    }
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x4161
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %edi, %edi
callq 0x33d0
movq (%rbx), %r15
testq %r15, %r15
je 0x415c
movq %rax, %r14
cmpq (%r15), %r14
jl 0x415c
movq 0x10(%r15), %rdi
callq *0x8(%r15)
movq 0x20(%r15), %rax
movq %rax, (%rbx)
testq %rax, %rax
je 0x4147
movq $0x0, 0x18(%rax)
movl $0x28, %esi
movq %r15, %rdi
callq 0x3430
movq (%rbx), %r15
testq %r15, %r15
jne 0x4126
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/yckwong[P]tinywebserver/http/http_conn.cpp
// Function: http_conn::init(int, sockaddr_in const&, char*, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void http_conn::init(int sockfd, const sockaddr_in &addr, char *root, int SQLVerify, int TRIGMode,
                     int close_log, string user, string passwd, string sqlname)
{
    m_sockfd = sockfd;
    m_address = addr;

    addfd(m_epollfd, sockfd, true, m_TRIGMode);
    m_user_count++;

    //当浏览器出现连接重置时，可能是网站根目录出错或http响应格式出错或者访问的文件中内容完全为空
    doc_root = root;
    m_SQLVerify = SQLVerify;
    m_TRIGMode = TRIGMode;
    m_close_log = close_log;

    strcpy(sql_user, user.c_str());
    strcpy(sql_passwd, passwd.c_str());
    strcpy(sql_name, sqlname.c_str());

    init();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movl %r8d, %r14d
movq %rcx, %r15
movq %rdi, %rbx
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %r12
movl 0x50(%rsp), %r13d
movl %esi, 0x14(%rdi)
movups (%rdx), %xmm0
movups %xmm0, 0x18(%rdi)
movl 0x9b5c(%rip), %edi      # 0xe440
movl 0xe34(%rbx), %ecx
movl $0x1, %edx
callq 0x4795
incl 0x9bce(%rip)            # 0xe4c8
movq %r15, 0xdf8(%rbx)
movl %r14d, 0xe30(%rbx)
movl %ebp, 0xe34(%rbx)
movl %r13d, 0xe38(%rbx)
leaq 0xe3c(%rbx), %rdi
movq (%r12), %rsi
callq 0x33f0
leaq 0xea0(%rbx), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rsi
callq 0x33f0
leaq 0xf04(%rbx), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
callq 0x33f0
movq $0x0, 0xdf0(%rbx)
xorl %eax, %eax
movl %eax, 0xde4(%rbx)
leaq 0x28(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl %eax, 0x10(%rbx)
movl $0xcfd, %edx            # imm = 0xCFD
xorl %esi, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3260
nop
// File: /workspace/github_cpp_makefile_star2_O3/yckwong[P]tinywebserver/http/http_conn.cpp
// Function: http_conn::read_once()
bool http_conn::read_once()
{
    if (m_read_idx >= READ_BUFFER_SIZE)
    {
        return false;
    }
    int bytes_read = 0;
    while (true)
    {
        bytes_read = recv(m_sockfd, m_read_buf + m_read_idx, READ_BUFFER_SIZE - m_read_idx, 0);
        if (bytes_read == -1)
        {
            if (errno == EAGAIN || errno == EWOULDBLOCK)
                break;
            return false;
        }
        else if (bytes_read == 0)
        {
            return false;
        }
        m_read_idx += bytes_read;
    }
    return true;
}

// Assembly:
movl 0x828(%rdi), %eax
cmpl $0x7ff, %eax            # imm = 0x7FF
jle 0x4a8c
xorl %eax, %eax
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
movl 0x14(%rbx), %edi
cltq
leaq (%r14,%rax), %rsi
movl $0x800, %ecx            # imm = 0x800
subl %eax, %ecx
movslq %ecx, %rdx
xorl %ecx, %ecx
callq 0x3120
testl %eax, %eax
je 0x4ad5
cmpl $-0x1, %eax
je 0x4ac8
addl 0x828(%rbx), %eax
movl %eax, 0x828(%rbx)
jmp 0x4a97
callq 0x3060
cmpl $0xb, (%rax)
sete %al
jmp 0x4ad7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yckwong[P]tinywebserver/webserver.cpp
// Function: WebServer::sql_pool()
void WebServer::sql_pool()
{
    //初始化数据库连接池
    m_connPool = connection_pool::GetInstance();
    m_connPool->init("localhost", m_user, m_passWord, m_databaseName, 3306, m_sql_num, m_close_log);

    //初始化数据库读取表
    if (0 == m_SQLVerify)
        users->initmysql_result(m_connPool);
    else if (1 == m_SQLVerify)
        users->initresultFile(m_connPool);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
callq 0x75d4
movq %rax, %r14
movq %rax, 0x30(%rbx)
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2612(%rip), %rsi      # 0xa4ee
leaq 0x2614(%rip), %rdx      # 0xa4f7
leaq 0x68(%rsp), %rdi
callq 0x3e86
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x3df0
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x3df0
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x78(%rbx), %rsi
movq 0x80(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x3df0
movl 0x14(%rbx), %eax
movl 0x98(%rbx), %r10d
leaq 0x68(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %r14, %rdi
movl $0xcea, %r9d            # imm = 0xCEA
pushq %rax
pushq %r10
callq 0x7644
addq $0x10, %rsp
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7f95
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x7fac
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x7fc3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x7fda
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3430
movl 0x9c(%rbx), %eax
cmpl $0x1, %eax
je 0x7ff8
testl %eax, %eax
jne 0x8005
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rsi
callq 0x4330
jmp 0x8005
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rsi
callq 0x44dc
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8036
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3430
jmp 0x8036
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x8052
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3430
jmp 0x8052
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x806e
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3430
jmp 0x806e
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x8085
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3430
movq %rbx, %rdi
callq 0x36e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/yckwong[P]tinywebserver/webserver.cpp
// Function: WebServer::adjust_timer(util_timer*)
void WebServer::adjust_timer(util_timer *timer)
{
    time_t cur = time(NULL);
    timer->expire = cur + 3 * TIMESLOT;
    timer_lst.adjust_timer(timer);

    LOG_INFO("%s", "adjust timer once");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
callq 0x33d0
addq $0xf, %rax
movq %rax, (%rbx)
leaq 0x1d578(%r14), %rdi
movq %rbx, %rsi
callq 0x3fe0
cmpl $0x0, 0x14(%r14)
je 0x85fe
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x62d8
leaq 0x1ca3(%rip), %rdx      # 0xa2ad
leaq 0x1f46(%rip), %rcx      # 0xa557
movq %rax, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x6e2c
callq 0x62d8
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x726e
// File: /workspace/github_cpp_makefile_star2_O3/yckwong[P]tinywebserver/webserver.cpp
// Function: WebServer::deal_timer(util_timer*, int)
void WebServer::deal_timer(util_timer *timer, int sockfd)
{
    timer->cb_func(&users_timer[sockfd]);
    if (timer)
    {
        timer_lst.del_timer(timer);
    }

    LOG_INFO("close fd %d", users_timer[sockfd].sockfd);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movslq %edx, %r15
shlq $0x5, %r15
movq 0x1d588(%rdi), %rdi
addq %r15, %rdi
callq *0x8(%rsi)
leaq 0x1d578(%rbx), %rdi
movq %r14, %rsi
callq 0x408e
cmpl $0x0, 0x14(%rbx)
je 0x866e
popq %rbx
popq %r14
popq %r15
retq
callq 0x62d8
movq 0x1d588(%rbx), %rcx
movl 0x10(%rcx,%r15), %ecx
leaq 0x1ee3(%rip), %rdx      # 0xa569
movq %rax, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x6e2c
callq 0x62d8
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x726e
nop
// File: /workspace/github_cpp_makefile_star2_O3/oknenavin[P]cxon/test/../src/cxon/lang/common/cio/char.hxx
// Function: std::enable_if<!cxon::JSON<cxon::json::format_traits>::produce_strict_javascript, bool>::type cxon::cio::chr::imp::encode_<cxon::JSON<cxon::json::format_traits>, char32_t>::value<cxon::cnt::range_container<char*>, cxon::context<cxon::JSON<cxon::json::format_traits>>, cxon::JSON<cxon::json::format_traits>>(cxon::cnt::range_container<char*>&, char32_t, cxon::context<cxon::JSON<cxon::json::format_traits>>&)
static auto value(O& o, char32_t c, Cx& cx) -> enable_if_t<!S::produce_strict_javascript, bool> {
                        if (c > 0x7F) {
                                char b[4]; int const n = utf32_to_utf8(b, c);
                                return poke<X>(o, b, n, cx);
                        }
                        else    return encode_<X, char>::value(o, char(c), cx);
                    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
cmpl $0x80, %esi
jb 0x1937d1
movl %esi, %eax
andl $0xfffffc00, %eax       # imm = 0xFFFFFC00
cmpl $0xd800, %eax           # imm = 0xD800
jne 0x1937eb
xorl %r15d, %r15d
jmp 0x19384c
movsbl %sil, %esi
movq %rbx, %rdi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe66ea
movl $0x2, %r15d
cmpl $0x800, %esi            # imm = 0x800
jb 0x19382f
movl $0x3, %r15d
cmpl $0x10000, %esi          # imm = 0x10000
jb 0x193822
cmpl $0x10ffff, %esi         # imm = 0x10FFFF
ja 0x1937cc
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x7(%rsp)
shrl $0x6, %esi
movl $0x4, %r15d
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x6(%rsp)
shrl $0x6, %esi
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x5(%rsp)
shrl $0x6, %esi
leaq 0x5190d(%rip), %rax     # 0x1e5150
orl (%rax,%r15,8), %esi
movb %sil, 0x4(%rsp)
movq 0x8(%rbx), %r12
movq 0x10(%rbx), %rdi
subq %rdi, %r12
cmpq %r15, %r12
jl 0x19387b
testq %r15, %r15
je 0x193872
leaq 0x4(%rsp), %rsi
movq %r15, %rdx
callq 0xe200
movq 0x10(%rbx), %rdi
addq %r15, %rdi
movq %rdi, 0x10(%rbx)
jmp 0x19388b
callq 0x4b620
movl $0x1, (%r14)
movq %rax, 0x8(%r14)
cmpq %r15, %r12
setge %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/oknenavin[P]cxon/test/../src/cxon/lang/common/cio/string.hxx
// Function: bool cxon::cio::str::imp::char_read_<cxon::JSON<cxon::test::input_iterator_traits<cxon::json::format_traits>>, cxon::cnt::range_container<char*>, cxon::test::force_input_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, cxon::context<cxon::JSON<cxon::test::input_iterator_traits<cxon::json::format_traits>>>, char>(cxon::cnt::range_container<char*>&, cxon::test::force_input_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, cxon::test::force_input_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, cxon::context<cxon::JSON<cxon::test::input_iterator_traits<cxon::json::format_traits>>>&)
inline bool char_read_(C& c, II& i, II e, Cx& cx) {
                II const o = i;
                    char32_t const c32 = chr::utf8_to_utf32<X>(i, e, cx);
                        if (c32 == chr::bad_utf32) return rewind(i, o), false;
                return char_append_(c, c32) || (rewind(i, o), cx/X::read_error::overflow);
            }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdx), %rcx
movq (%rsi), %rdx
cmpq %rcx, %rdx
je 0xe33ba
cmpb $0x5c, (%rdx)
jne 0xe33ba
incq %rdx
movq %rdx, (%rax)
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
movq %r14, %rdx
callq 0xe319a
jmp 0xe33cd
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
movq %r14, %rdx
callq 0xe3548
cmpl $-0x1, %eax
je 0xe347b
movl %eax, %ecx
andl $0xfffffc00, %ecx       # imm = 0xFFFFFC00
cmpl $0xd800, %ecx           # imm = 0xD800
jne 0xe33eb
xorl %r15d, %r15d
jmp 0xe345b
movl $0x1, %r15d
cmpl $0x80, %eax
jb 0xe344c
movl $0x2, %r15d
cmpl $0x800, %eax            # imm = 0x800
jb 0xe343d
movl $0x3, %r15d
cmpl $0x10000, %eax          # imm = 0x10000
jb 0xe342e
cmpl $0x10ffff, %eax         # imm = 0x10FFFF
ja 0xe33e6
movl %eax, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0xb(%rsp)
shrl $0x6, %eax
movl $0x4, %r15d
movl %eax, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0xa(%rsp)
shrl $0x6, %eax
movl %eax, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x9(%rsp)
shrl $0x6, %eax
leaq 0x101cfd(%rip), %rcx    # 0x1e5150
orl (%rcx,%r15,8), %eax
movb %al, 0x8(%rsp)
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdi
subq %rdi, %rax
cmpq %rax, %r15
jle 0xe347f
callq 0x4a9e4
movl $0x8, (%r14)
movq %rax, 0x8(%r14)
xorl %eax, %eax
jmp 0xe349e
testq %r15, %r15
je 0xe3495
leaq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0xe200
movq 0x10(%rbx), %rdi
addq %r15, %rdi
movq %rdi, 0x10(%rbx)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq