	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_pick_crtcs
_drm_pick_crtcs:                        ## @drm_pick_crtcs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	xorl	%ecx, %ecx
	cmpl	%r14d, (%rdi)
	je	LBB0_18
## %bb.1:
	movl	%r9d, %ebx
	movq	24(%rdi), %r12
	movq	16(%rdi), %rax
	movslq	%r14d, %r13
	movq	(%rax,%r13,8), %r15
	movq	(%r15), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	$0, (%rsi,%r13,8)
	leal	1(%r13), %ecx
	movq	%rdi, -120(%rbp)                ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, -100(%rbp)                ## 4-byte Spill
	movl	%r8d, -64(%rbp)                 ## 4-byte Spill
	callq	_drm_pick_crtcs
	movl	%eax, %ecx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, -112(%rbp)                ## 8-byte Spill
	cmpq	$0, (%rax,%r13,8)
	je	LBB0_18
## %bb.2:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, -128(%rbp)                ## 8-byte Spill
	movl	(%r12), %edi
	shll	$3, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_17
## %bb.3:
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rax
	movq	_connector_status_connected@GOTPCREL(%rip), %rcx
	movl	%ebx, %r12d
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	sete	%bl
	movq	%r15, %rdi
	callq	_drm_has_cmdline_mode
	cmpq	$1, %rax
	sbbl	$-1, %ebx
	movq	%r15, %rdi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, -96(%rbp)                ## 4-byte Spill
	movl	%r12d, %edx
	callq	_drm_has_preferred_mode
	cmpq	$1, %rax
	sbbl	$-1, %ebx
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movq	8(%r13), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_16
## %bb.4:
	movq	-120(%rbp), %r15                ## 8-byte Reload
	movl	4(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.5:
	incl	-60(%rbp)                       ## 4-byte Folded Spill
	leal	(,%r14,8), %ecx
	movl	%ecx, -92(%rbp)                 ## 4-byte Spill
	movq	%r14, -136(%rbp)                ## 8-byte Spill
	movl	%r14d, %r13d
	xorl	%r12d, %r12d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	movq	-120(%rbp), %r15                ## 8-byte Reload
	movslq	4(%r15), %rax
	cmpq	%rax, %r12
	jge	LBB0_16
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	btl	%r12d, %ecx
	jae	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	(,%r12,4), %rbx
	addq	8(%r15), %rbx
	cmpl	$0, -136(%rbp)                  ## 4-byte Folded Reload
	jle	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rbx, (%rdi,%rcx,8)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	incq	%rcx
	cmpq	%rcx, %r13
	jne	LBB0_9
	jmp	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$1, %eax
	jg	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rdi
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	(%rax,%rcx,8), %rsi
	callq	_drm_mode_equal
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	%rbx, (%r14,%rax,8)
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-92(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-100(%rbp), %ecx                ## 4-byte Reload
	movl	-64(%rbp), %r8d                 ## 4-byte Reload
	movl	-96(%rbp), %r9d                 ## 4-byte Reload
	callq	_drm_pick_crtcs
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %r15d
	addl	-60(%rbp), %r15d                ## 4-byte Folded Reload
	cmpl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	movq	-128(%rbp), %rax                ## 8-byte Reload
	jle	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rax), %edx
	shll	$3, %edx
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_15
LBB0_16:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
LBB0_17:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
LBB0_18:
	movl	%ecx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_connector_status_connected,8,3 ## @connector_status_connected
	.no_dead_strip	_drm_pick_crtcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_pick_crtcs
_drm_pick_crtcs:                        ; @drm_pick_crtcs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
	cmp	w8, w3
	b.ne	LBB0_2
; %bb.1:
	mov	w25, #0
	b	LBB0_18
LBB0_2:
	mov	x27, x5
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	ldp	x8, x20, [x0, #16]
	sbfiz	x19, x21, #3, #32
	ldr	x26, [x8, x19]
	ldr	x28, [x26]
	str	xzr, [x1, x19]
	add	w3, w3, #1
	str	w3, [sp, #40]                   ; 4-byte Folded Spill
	str	w4, [sp, #4]                    ; 4-byte Folded Spill
	bl	_drm_pick_crtcs
	mov	x25, x0
	ldr	x8, [x22, x19]
	cbz	x8, LBB0_18
; %bb.3:
	str	w27, [sp, #44]                  ; 4-byte Folded Spill
	ldr	w8, [x20]
	lsl	w0, w8, #3
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_18
; %bb.4:
	mov	x27, x0
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x8, [x28]
Lloh3:
	adrp	x9, _connector_status_connected@GOTPAGE
Lloh4:
	ldr	x9, [x9, _connector_status_connected@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #1
	cinc	w19, w8, eq
	mov	x0, x26
	bl	_drm_has_cmdline_mode
	cmp	x0, #0
	cinc	w19, w19, ne
	mov	x0, x26
	ldr	w20, [sp, #4]                   ; 4-byte Folded Reload
	mov	x1, x20
	ldr	w2, [sp, #44]                   ; 4-byte Folded Reload
	bl	_drm_has_preferred_mode
	cmp	x0, #0
	cinc	w8, w19, ne
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	ldr	x8, [x28, #8]
	ldr	x8, [x8]
	mov	x0, x28
	blr	x8
	cbz	x0, LBB0_17
; %bb.5:
	ldr	w8, [x24, #4]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.6:
	mov	x28, x0
	mov	x26, #0
	sxtw	x9, w21
	str	x9, [sp, #32]                   ; 8-byte Folded Spill
	lsl	w9, w21, #3
	str	w9, [sp, #24]                   ; 4-byte Folded Spill
	mov	w9, w21
	str	x9, [sp, #16]                   ; 8-byte Folded Spill
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x24, #4]
	cmp	x26, x8
	b.ge	LBB0_17
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldr	w9, [x28]
	lsr	w9, w9, w26
	tbz	w9, #0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x24, #8]
	add	x19, x9, x26, lsl #2
	cmp	w21, #1
	b.lt	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x10, [sp, #16]                  ; 8-byte Folded Reload
	mov	x11, x23
	mov	x9, x22
LBB0_11:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x12, [x11]
	cmp	x12, x19
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	add	x9, x9, #8
	add	x11, x11, #8
	subs	x10, x10, #1
	b.ne	LBB0_11
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	w8, #1
	b.gt	LBB0_7
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [x9]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	x1, [x22, x8, lsl #3]
	bl	_drm_mode_equal
	cbz	w0, LBB0_7
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	str	x19, [x27, x8, lsl #3]
	mov	x0, x27
	mov	x1, x23
	ldr	w2, [sp, #24]                   ; 4-byte Folded Reload
	bl	_memcpy
	mov	x0, x24
	mov	x1, x27
	mov	x2, x22
	ldp	w3, w5, [sp, #40]               ; 8-byte Folded Reload
	mov	x4, x20
	bl	_drm_pick_crtcs
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	add	w19, w8, w0
	cmp	w19, w25
	b.le	LBB0_7
; %bb.16:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w8, [x8]
	lsl	w2, w8, #3
	mov	x0, x23
	mov	x1, x27
	bl	_memcpy
	mov	x25, x19
	b	LBB0_7
LBB0_17:
	mov	x0, x27
	bl	_kfree
LBB0_18:
	mov	x0, x25
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_connector_status_connected,8,3 ; @connector_status_connected
	.no_dead_strip	_drm_pick_crtcs
.subsections_via_symbols
