	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mode_getcrtc               ## -- Begin function drm_mode_getcrtc
	.p2align	4, 0x90
_drm_mode_getcrtc:                      ## @drm_mode_getcrtc
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_DRIVER_MODESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_core_check_feature
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	28(%r15), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_drm_crtc_find
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	40(%rax), %r12
	movl	32(%rax), %eax
	movl	%eax, 24(%r15)
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_drm_modeset_lock
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.11:
	movq	(%rcx), %rcx
	jmp	LBB0_12
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_22
LBB0_8:
	movq	16(%r12), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	(%rax), %rax
	movq	%rax, 16(%r15)
	jmp	LBB0_13
LBB0_7:
	xorl	%ecx, %ecx
LBB0_12:
	movq	%rcx, 16(%r15)
	movswl	2(%rax), %ecx
	movl	%ecx, (%r15)
	movswl	6(%rax), %eax
	movl	%eax, 4(%r15)
LBB0_13:
	movq	%r12, %rdi
	callq	_drm_modeset_unlock
	leaq	8(%rbx), %r12
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_drm_modeset_lock
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.14:
	cmpq	$0, 8(%rsi)
	je	LBB0_19
## %bb.15:
	leaq	12(%r15), %rdi
	jmp	LBB0_18
LBB0_16:
	movl	(%rbx), %eax
	movl	%eax, (%r15)
	movl	4(%rbx), %eax
	movl	%eax, 4(%r15)
	cmpq	$0, 16(%rbx)
	je	LBB0_19
## %bb.17:
	leaq	12(%r15), %rdi
	addq	$12, %rbx
	movq	%rbx, %rsi
LBB0_18:
	callq	_drm_mode_convert_to_umode
	movl	$1, %r13d
LBB0_19:
	movl	%r13d, 8(%r15)
	cmpl	$0, (%r14)
	jne	LBB0_21
## %bb.20:
	movq	_DRM_MODE_FLAG_PIC_AR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 12(%r15)
LBB0_21:
	movq	%r12, %rdi
	callq	_drm_modeset_unlock
	xorl	%eax, %eax
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	$0, 16(%r15)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_MODESET,4,2             ## @DRIVER_MODESET
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_DRM_MODE_FLAG_PIC_AR_MASK,4,2  ## @DRM_MODE_FLAG_PIC_AR_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mode_getcrtc               ; -- Begin function drm_mode_getcrtc
	.p2align	2
_drm_mode_getcrtc:                      ; @drm_mode_getcrtc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _DRIVER_MODESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_MODESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_drm_core_check_feature
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w2, [x19, #28]
	mov	x0, x21
	mov	x1, x20
	bl	_drm_crtc_find
	cbz	x0, LBB0_7
; %bb.2:
	mov	x21, x0
	ldr	x22, [x0, #40]
	ldr	w8, [x0, #32]
	str	w8, [x19, #24]
	mov	x0, x22
	mov	x1, #0
	bl	_drm_modeset_lock
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_9
; %bb.3:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_5
; %bb.4:
	ldr	x9, [x9]
LBB0_5:
	str	x9, [x19, #16]
	ldr	d0, [x8]
	sshr.2s	v0, v0, #16
	str	d0, [x19]
	b	LBB0_12
LBB0_6:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _ENOENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_9:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	x8, [x8]
	str	x8, [x19, #16]
	b	LBB0_12
LBB0_11:
	str	xzr, [x19, #16]
LBB0_12:
	mov	x0, x22
	bl	_drm_modeset_unlock
	add	x22, x21, #8
	mov	x0, x22
	mov	x1, #0
	bl	_drm_modeset_lock
	ldr	x1, [x21, #24]
	cbz	x1, LBB0_15
; %bb.13:
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_18
; %bb.14:
	add	x0, x19, #12
	b	LBB0_17
LBB0_15:
	ldr	d0, [x21]
	str	d0, [x19]
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_18
; %bb.16:
	add	x0, x19, #12
	add	x1, x21, #12
LBB0_17:
	bl	_drm_mode_convert_to_umode
	mov	w8, #1
LBB0_18:
	str	w8, [x19, #8]
	ldr	w8, [x20]
	cbnz	w8, LBB0_20
; %bb.19:
Lloh7:
	adrp	x8, _DRM_MODE_FLAG_PIC_AR_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DRM_MODE_FLAG_PIC_AR_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	bic	w8, w9, w8
	str	w8, [x19, #12]
LBB0_20:
	mov	x0, x22
	bl	_drm_modeset_unlock
	mov	w0, #0
LBB0_21:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_MODESET,4,2             ; @DRIVER_MODESET
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_DRM_MODE_FLAG_PIC_AR_MASK,4,2  ; @DRM_MODE_FLAG_PIC_AR_MASK
.subsections_via_symbols
