	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_addmap_ioctl               ## -- Begin function drm_addmap_ioctl
	.p2align	4, 0x90
_drm_addmap_ioctl:                      ## @drm_addmap_ioctl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	movq	(%rbx), %rcx
	testq	%rax, %rax
	je	LBB0_1
LBB0_4:
	movl	24(%rbx), %esi
	movl	16(%rbx), %r8d
	movl	20(%rbx), %edx
	leaq	-24(%rbp), %r9
	movq	%r14, %rdi
	callq	_drm_addmap_core
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	__DRM_AGP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_4
## %bb.2:
	movq	__DRM_SHM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_4
## %bb.3:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	__DRM_AGP,8,3                   ## @_DRM_AGP
	.comm	__DRM_SHM,8,3                   ## @_DRM_SHM
	.comm	_EPERM,4,2                      ## @EPERM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_addmap_ioctl               ; -- Begin function drm_addmap_ioctl
	.p2align	2
_drm_addmap_ioctl:                      ; @drm_addmap_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	ldr	x3, [x19]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, __DRM_AGP@GOTPAGE
Lloh4:
	ldr	x8, [x8, __DRM_AGP@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, __DRM_SHM@GOTPAGE
Lloh7:
	ldr	x9, [x9, __DRM_SHM@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x3, x8
	ccmp	x3, x9, #4, ne
	b.ne	LBB0_4
LBB0_2:
	ldp	w2, w1, [x19, #20]
	ldr	w4, [x19, #16]
	add	x5, sp, #8
	mov	x0, x20
	bl	_drm_addmap_core
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	str	x8, [x19, #8]
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _EPERM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	__DRM_AGP,8,3                   ; @_DRM_AGP
	.comm	__DRM_SHM,8,3                   ; @_DRM_SHM
	.comm	_EPERM,4,2                      ; @EPERM
.subsections_via_symbols
