	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_legacy_markbufs            ## -- Begin function drm_legacy_markbufs
	.p2align	4, 0x90
_drm_legacy_markbufs:                   ## @drm_legacy_markbufs
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	_DRIVER_LEGACY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_core_check_feature
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_DRIVER_HAVE_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_drm_core_check_feature
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	testq	%r15, %r15
	je	LBB0_5
## %bb.6:
	movl	16(%r14), %esi
	movq	(%r14), %rdx
	movq	8(%r14), %rcx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movl	16(%r14), %edi
	callq	_order_base_2
	movq	_DRM_MIN_ORDER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_5
## %bb.7:
	movq	_DRM_MAX_ORDER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_5
## %bb.8:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	js	LBB0_5
## %bb.9:
	movq	(%r15), %rdx
	cltq
	leaq	(%rax,%rax,2), %rax
	movq	(%rdx,%rax,8), %rsi
	cmpq	%rsi, %rcx
	jg	LBB0_5
## %bb.10:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	js	LBB0_5
## %bb.11:
	cmpq	%rsi, %rdi
	jg	LBB0_5
## %bb.12:
	movq	%rcx, 8(%rdx,%rax,8)
	movq	%rdi, 16(%rdx,%rax,8)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_LEGACY,4,2              ## @DRIVER_LEGACY
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_DRIVER_HAVE_DMA,4,2            ## @DRIVER_HAVE_DMA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d, %d, %d\n"

	.comm	_DRM_MIN_ORDER,4,2              ## @DRM_MIN_ORDER
	.comm	_DRM_MAX_ORDER,4,2              ## @DRM_MAX_ORDER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_legacy_markbufs            ; -- Begin function drm_legacy_markbufs
	.p2align	2
_drm_legacy_markbufs:                   ; @drm_legacy_markbufs
	.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	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _DRIVER_LEGACY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_LEGACY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_drm_core_check_feature
	cbz	w0, LBB0_9
; %bb.1:
Lloh3:
	adrp	x8, _DRIVER_HAVE_DMA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRIVER_HAVE_DMA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_drm_core_check_feature
	cbz	w0, LBB0_9
; %bb.2:
	cbz	x21, LBB0_10
; %bb.3:
	ldr	w1, [x19, #16]
	ldp	x2, x3, [x19]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w0, [x19, #16]
	bl	_order_base_2
                                        ; kill: def $w0 killed $w0 def $x0
Lloh8:
	adrp	x8, _DRM_MIN_ORDER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DRM_MIN_ORDER@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _DRM_MAX_ORDER@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DRM_MAX_ORDER@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w0, w8
	ccmp	w0, w9, #0, ge
	b.gt	LBB0_10
; %bb.4:
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_10
; %bb.5:
	ldr	x9, [x21]
	sxtw	x10, w0
	mov	w11, #24
	mul	x11, x10, x11
	ldr	x12, [x9, x11]
	cmp	x8, x12
	b.gt	LBB0_10
; %bb.6:
	ldr	x11, [x19, #8]
	tbnz	x11, #63, LBB0_10
; %bb.7:
	cmp	x11, x12
	b.gt	LBB0_10
; %bb.8:
	mov	w0, #0
	mov	w12, #24
	madd	x9, x10, x12, x9
	stp	x8, x11, [x9, #8]
	b	LBB0_12
LBB0_9:
Lloh14:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_LEGACY,4,2              ; @DRIVER_LEGACY
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_DRIVER_HAVE_DMA,4,2            ; @DRIVER_HAVE_DMA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d, %d, %d\n"

	.comm	_DRM_MIN_ORDER,4,2              ; @DRM_MIN_ORDER
	.comm	_DRM_MAX_ORDER,4,2              ; @DRM_MAX_ORDER
.subsections_via_symbols
