	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_resctx                     ## -- Begin function drm_resctx
	.p2align	4, 0x90
_drm_resctx:                            ## @drm_resctx
	.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	%rsi, %r12
	movq	_DRM_RESERVED_CONTEXTS@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	cmpl	%eax, (%rsi)
	jl	LBB0_6
## %bb.1:
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	xorl	%r13d, %r13d
	leaq	-48(%rbp), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -48(%rbp)
	movq	8(%r12), %rdi
	addq	%r13, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_copy_to_user
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_6:
	movl	%eax, (%r12)
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_RESERVED_CONTEXTS,4,2      ## @DRM_RESERVED_CONTEXTS
	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_resctx                     ; -- Begin function drm_resctx
	.p2align	2
_drm_resctx:                            ; @drm_resctx
	.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
	mov	x19, x1
	ldr	w9, [x1]
Lloh0:
	adrp	x20, _DRM_RESERVED_CONTEXTS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DRM_RESERVED_CONTEXTS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w9, w8
	b.lt	LBB0_5
; %bb.1:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x21, #0
	mov	x22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	w22, [sp, #8]
	ldr	x8, [x19, #8]
	add	x0, x8, x21
	add	x1, sp, #8
	mov	w2, #4
	bl	_copy_to_user
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_3
LBB0_5:
	mov	w0, #0
	str	w8, [x19]
LBB0_6:
	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_7:
Lloh2:
	adrp	x8, _EFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_RESERVED_CONTEXTS,4,2      ; @DRM_RESERVED_CONTEXTS
	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
