// File: /workspace/github_c_makefile_star2_O0/lukexi[P]eglstreams-mini/src/kms.c
// Function: AssignAtomicRequest
static void AssignAtomicRequest(int drmFd,
                                drmModeAtomicReqPtr pAtomic,
                                const struct Config *pConfig,
                                uint32_t modeID, uint32_t fb)
{
    struct PropertyIDs propertyIDs = { {0} };

    AssignPropertyIDs(drmFd, pConfig, &propertyIDs);


    /* Specify the mode to use on the CRTC, and make the CRTC active. */

    drmModeAtomicAddProperty(pAtomic, pConfig->crtcID,
                             propertyIDs.crtc.mode_id, modeID);
    drmModeAtomicAddProperty(pAtomic, pConfig->crtcID,
                             propertyIDs.crtc.active, 1);

    /* Tell the connector to receive pixels from the CRTC. */

    drmModeAtomicAddProperty(pAtomic, pConfig->connectorID,
                             propertyIDs.connector.crtc_id, pConfig->crtcID);

    /*
     * Specify the region of source surface to display (i.e., the
     * "ViewPortIn").  Note these values are in 16.16 format, so shift
     * up by 16.
     */

    drmModeAtomicAddProperty(pAtomic, pConfig->planeID,
                             propertyIDs.plane.src_x, 0);
    drmModeAtomicAddProperty(pAtomic, pConfig->planeID,
                             propertyIDs.plane.src_y, 0);
    drmModeAtomicAddProperty(pAtomic, pConfig->planeID,
                             propertyIDs.plane.src_w, pConfig->width << 16);
    drmModeAtomicAddProperty(pAtomic, pConfig->planeID,
                             propertyIDs.plane.src_h, pConfig->height << 16);

    /*
     * Specify the region within the mode where the image should be
     * displayed (i.e., the "ViewPortOut").
     */

    drmModeAtomicAddProperty(pAtomic, pConfig->planeID,
                             propertyIDs.plane.crtc_x, 0);
    drmModeAtomicAddProperty(pAtomic, pConfig->planeID,
                             propertyIDs.plane.crtc_y, 0);
    drmModeAtomicAddProperty(pAtomic, pConfig->planeID,
                             propertyIDs.plane.crtc_w, pConfig->width);
    drmModeAtomicAddProperty(pAtomic, pConfig->planeID,
                             propertyIDs.plane.crtc_h, pConfig->height);

    /*
     * Specify the surface to display in the plane, and connect the
     * plane to the CRTC.
     *
     * XXX for EGLStreams purposes, it would be nice to have the
     * option of not specifying a surface at this point, as well as to
     * be able to have the KMS atomic modeset consume a frame from an
     * EGLStream.
     */

    drmModeAtomicAddProperty(pAtomic, pConfig->planeID,
                             propertyIDs.plane.fb_id, fb);
    drmModeAtomicAddProperty(pAtomic, pConfig->planeID,
                             propertyIDs.plane.crtc_id, pConfig->crtcID);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
leaq -0x54(%rbp), %rdi
xorl %esi, %esi
movl $0x34, %edx
callq 0x2080
movl -0x4(%rbp), %edi
movq -0x18(%rbp), %rsi
leaq -0x54(%rbp), %rdx
callq 0x4990
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %esi
movl -0x54(%rbp), %edx
movl -0x1c(%rbp), %eax
movl %eax, %ecx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %esi
movl -0x50(%rbp), %edx
movl $0x1, %ecx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %ecx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x4c(%rbp), %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x48(%rbp), %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x44(%rbp), %edx
movq -0x18(%rbp), %rax
movzwl 0x60(%rax), %eax
shll $0x10, %eax
movslq %eax, %rcx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x40(%rbp), %edx
movq -0x18(%rbp), %rax
movzwl 0x62(%rax), %eax
shll $0x10, %eax
movslq %eax, %rcx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x3c(%rbp), %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x38(%rbp), %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x34(%rbp), %edx
movq -0x18(%rbp), %rax
movzwl 0x60(%rax), %eax
movl %eax, %ecx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x30(%rbp), %edx
movq -0x18(%rbp), %rax
movzwl 0x62(%rax), %eax
movl %eax, %ecx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x2c(%rbp), %edx
movl -0x20(%rbp), %eax
movl %eax, %ecx
callq 0x2320
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movl -0x28(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %ecx
callq 0x2320
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)