	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function crtc_crc_open
_crtc_crc_open:                         ## @crtc_crc_open
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	movl	24(%r14), %edi
	callq	_drm_drv_uses_atomic_modeset
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	8(%r14), %r15
	movq	%r15, %rdi
	callq	_drm_modeset_lock_single_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.2:
	movq	16(%r14), %rax
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	cmpl	$0, (%rax)
	cmovnel	%edx, %ebx
	movq	%r15, %rdi
	callq	_drm_modeset_unlock
	testl	%ebx, %ebx
	jne	LBB0_17
LBB0_3:
	movq	(%r14), %rax
	movl	52(%r14), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	*(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.4:
	movq	-40(%rbp), %rax
	movq	_DRM_MAX_CRC_NR@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	seta	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_5
## %bb.7:
	xorl	%edi, %edi
	cmpq	$0, -40(%rbp)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_8
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_DRM_CRC_ENTRIES_NR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r12
	leaq	48(%r14), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	cmpl	$0, 32(%r14)
	je	LBB0_11
## %bb.14:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.15:
	negl	%ebx
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_17
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_11:
	movl	$1, 32(%r14)
	movq	%r12, 56(%r14)
	movq	-40(%rbp), %rax
	movq	%rax, 40(%r14)
	movq	%r15, %rdi
	callq	_spin_unlock_irq
LBB0_12:
	movq	(%r14), %rax
	movl	52(%r14), %esi
	movq	%r14, %rdi
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_13
## %bb.16:
	movl	%eax, %ebx
	addq	$32, %r14
	movq	%r15, %rdi
	callq	_spin_lock_irq
	movq	%r14, %rdi
	callq	_crtc_crc_cleanup
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	jmp	LBB0_17
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_DRM_MAX_CRC_NR,8,3             ## @DRM_MAX_CRC_NR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_CRC_ENTRIES_NR,4,2         ## @DRM_CRC_ENTRIES_NR
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_crtc_crc_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function crtc_crc_open
_crtc_crc_open:                         ; @crtc_crc_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x19, [x0]
	ldr	w0, [x19, #24]
	bl	_drm_drv_uses_atomic_modeset
	cbz	x0, LBB0_3
; %bb.1:
	add	x21, x19, #8
	mov	x0, x21
	bl	_drm_modeset_lock_single_interruptible
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _EIO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, #0
	csneg	w20, wzr, w9, ne
	mov	x0, x21
	bl	_drm_modeset_unlock
	cbnz	w20, LBB0_8
LBB0_3:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w1, [x19, #52]
	add	x2, sp, #8
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	x8, [sp, #8]
Lloh3:
	adrp	x9, _DRM_MAX_CRC_NR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_MAX_CRC_NR@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, hi
	bl	_WARN_ON
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	x8, [sp, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_9
LBB0_6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
Lloh8:
	adrp	x8, _DRM_CRC_ENTRIES_NR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DRM_CRC_ENTRIES_NR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kcalloc
	cbz	x0, LBB0_13
; %bb.10:
	mov	x22, x0
	add	x21, x19, #48
	mov	x0, x21
	bl	_spin_lock_irq
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_14
; %bb.11:
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh16:
	ldr	w20, [x8]
	mov	x0, x21
	bl	_spin_unlock_irq
	cbz	w20, LBB0_15
; %bb.12:
	neg	w20, w20
	mov	x0, x22
	bl	_kfree
	b	LBB0_8
LBB0_13:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_14:
	mov	w8, #1
	str	w8, [x19, #32]
	str	x22, [x19, #56]
	ldr	x8, [sp, #8]
	str	x8, [x19, #40]
	mov	x0, x21
	bl	_spin_unlock_irq
LBB0_15:
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	ldr	w1, [x19, #52]
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.16:
	add	x19, x19, #32
	mov	x0, x21
	bl	_spin_lock_irq
	mov	x0, x19
	bl	_crtc_crc_cleanup
	mov	x0, x21
	bl	_spin_unlock_irq
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_DRM_MAX_CRC_NR,8,3             ; @DRM_MAX_CRC_NR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_CRC_ENTRIES_NR,4,2         ; @DRM_CRC_ENTRIES_NR
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_crtc_crc_open
.subsections_via_symbols
