	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_freebufs                   ## -- Begin function drm_freebufs
	.p2align	4, 0x90
_drm_freebufs:                          ## @drm_freebufs
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %r13
	movq	_DRIVER_HAVE_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_core_check_feature
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	testq	%r13, %r13
	je	LBB0_10
## %bb.2:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	cmpl	$0, (%rbx)
	jle	LBB0_9
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rsi
	addq	%r12, %rsi
	leaq	-44(%rbp), %rdi
	movl	$4, %edx
	callq	_copy_from_user
	testq	%rax, %rax
	jne	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %esi
	movl	(%r13), %edx
	testl	%esi, %esi
	js	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%edx, %esi
	jge	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r13), %rax
	movq	(%rax,%rsi,8), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, (%rsi)
	jne	LBB0_16
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_drm_free_buffer
	incq	%r14
	movslq	(%rbx), %rax
	addq	$4, %r12
	cmpq	%rax, %r14
	jl	LBB0_4
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_15:
	decl	%edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_17
LBB0_16:
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_task_pid_nr
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_HAVE_DMA,4,2            ## @DRIVER_HAVE_DMA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
L_.str.1:                               ## @.str.1
	.asciz	"Index %d (of %d max)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Process %d freeing buffer not owned\n"

	.comm	_current,4,2                    ## @current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_freebufs                   ; -- Begin function drm_freebufs
	.p2align	2
_drm_freebufs:                          ; @drm_freebufs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _DRIVER_HAVE_DMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_HAVE_DMA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_drm_core_check_feature
	cbz	w0, LBB0_14
; %bb.1:
	cbz	x22, LBB0_14
; %bb.2:
	ldr	w1, [x20]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	x23, #0
	mov	x24, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x1, x8, x23
	add	x0, sp, #12
	mov	w2, #4
	bl	_copy_from_user
	cbnz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [sp, #12]
	ldr	w8, [x22]
	tbnz	w1, #31, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w1, w8
	b.ge	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22, #8]
	ldr	x1, [x8, x1, lsl #3]
	ldr	x8, [x1]
	cmp	x8, x19
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_drm_free_buffer
	add	x24, x24, #1
	ldrsw	x8, [x20]
	add	x23, x23, #4
	cmp	x24, x8
	b.lt	LBB0_4
LBB0_9:
	mov	w0, #0
	b	LBB0_16
LBB0_10:
Lloh5:
	adrp	x8, _EFAULT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:
	sub	w8, w8, #1
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	b	LBB0_13
LBB0_12:
Lloh9:
	adrp	x8, _current@GOTPAGE
Lloh10:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_task_pid_nr
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_13:
	bl	_DRM_ERROR
LBB0_14:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_HAVE_DMA,4,2            ; @DRIVER_HAVE_DMA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
l_.str.1:                               ; @.str.1
	.asciz	"Index %d (of %d max)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Process %d freeing buffer not owned\n"

	.comm	_current,4,2                    ; @current
.subsections_via_symbols
