	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_ioctl_permit               ## -- Begin function drm_ioctl_permit
	.p2align	4, 0x90
_drm_ioctl_permit:                      ## @drm_ioctl_permit
	.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
	movl	%edi, %r15d
	movq	_DRM_ROOT_ONLY@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
LBB0_3:
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_15
## %bb.4:
	movq	_DRM_AUTH@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_drm_is_render_client
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	xorl	%ebx, %ebx
	cmpl	$0, (%r14)
	sete	%bl
LBB0_7:
	movl	%ebx, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_15
## %bb.8:
	movq	_DRM_MASTER@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.10:
	movq	%r14, %rdi
	callq	_drm_is_current_master
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	jmp	LBB0_11
LBB0_9:
	xorl	%edi, %edi
LBB0_11:
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_15
## %bb.12:
	movq	_DRM_RENDER_ALLOW@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	movl	$0, %edi
	testl	%r15d, (%rax)
	jne	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_drm_is_render_client
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
LBB0_14:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_16
LBB0_15:
	movq	_EACCES@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_ROOT_ONLY,4,2              ## @DRM_ROOT_ONLY
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_DRM_AUTH,4,2                   ## @DRM_AUTH
	.comm	_DRM_MASTER,4,2                 ## @DRM_MASTER
	.comm	_DRM_RENDER_ALLOW,4,2           ## @DRM_RENDER_ALLOW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_ioctl_permit               ; -- Begin function drm_ioctl_permit
	.p2align	2
_drm_ioctl_permit:                      ; @drm_ioctl_permit
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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, _DRM_ROOT_ONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_ROOT_ONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_capable
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_14
	b	LBB0_3
LBB0_2:
	mov	w0, #0
	bl	_unlikely
	cbnz	x0, LBB0_14
LBB0_3:
Lloh6:
	adrp	x8, _DRM_AUTH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRM_AUTH@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_drm_is_render_client
	cbz	x0, LBB0_6
LBB0_5:
	mov	w0, #0
	bl	_unlikely
	cbnz	x0, LBB0_14
	b	LBB0_7
LBB0_6:
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_14
LBB0_7:
Lloh9:
	adrp	x8, _DRM_MASTER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DRM_MASTER@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_drm_is_current_master
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_14
	b	LBB0_10
LBB0_9:
	mov	w0, #0
	bl	_unlikely
	cbnz	x0, LBB0_14
LBB0_10:
Lloh12:
	adrp	x8, _DRM_RENDER_ALLOW@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DRM_RENDER_ALLOW@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_drm_is_render_client
	cmp	x0, #0
	cset	w0, ne
LBB0_13:
	bl	_unlikely
	cbz	x0, LBB0_15
LBB0_14:
Lloh15:
	adrp	x8, _EACCES@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_ROOT_ONLY,4,2              ; @DRM_ROOT_ONLY
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_DRM_AUTH,4,2                   ; @DRM_AUTH
	.comm	_DRM_MASTER,4,2                 ; @DRM_MASTER
	.comm	_DRM_RENDER_ALLOW,4,2           ; @DRM_RENDER_ALLOW
.subsections_via_symbols
