	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_generic_ioctl
_vmw_generic_ioctl:                     ## @vmw_generic_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	movq	(%r13), %rax
	movq	(%rax), %r15
	movl	%esi, %edi
	callq	_DRM_IOCTL_NR
	movl	%eax, %ebx
	movq	_DRM_COMMAND_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, %r14d
	subl	%eax, %r14d
	jb	LBB0_10
## %bb.1:
	movq	_DRM_COMMAND_END@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jae	LBB0_10
## %bb.2:
	movq	(%r15), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	cmpl	%ecx, %ebx
	jae	LBB0_10
## %bb.3:
	movq	_DRM_VMW_EXECBUF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	cmpl	%ecx, %ebx
	jne	LBB0_4
## %bb.16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_10:
	leaq	-44(%rbp), %rsi
	movl	%ebx, %edi
	callq	_drm_ioctl_flags
	testl	%eax, %eax
	je	LBB0_13
LBB0_11:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	*-72(%rbp)                      ## 8-byte Folded Reload
	jmp	LBB0_15
LBB0_4:
	movq	_vmw_ioctls@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	movq	_DRM_VMW_UPDATE_LAYOUT@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	cmpl	%eax, %ebx
	jne	LBB0_8
## %bb.5:
	movq	%r13, %rdi
	callq	_drm_is_current_master
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_7
LBB0_8:
	xorl	%edi, %edi
	cmpl	%r12d, (%r15,%r14,8)
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_9
## %bb.12:
	movq	_DRM_COMMAND_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_ERROR
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_14:
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	4(%r15,%r14,8), %eax
	movl	%eax, -44(%rbp)
	jmp	LBB0_11
LBB0_7:
	movq	_EACCES@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_COMMAND_BASE,4,2           ## @DRM_COMMAND_BASE
	.comm	_DRM_COMMAND_END,4,2            ## @DRM_COMMAND_END
	.comm	_vmw_ioctls,8,3                 ## @vmw_ioctls
	.comm	_DRM_VMW_EXECBUF,4,2            ## @DRM_VMW_EXECBUF
	.comm	_DRM_VMW_UPDATE_LAYOUT,4,2      ## @DRM_VMW_UPDATE_LAYOUT
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_EACCES,8,3                     ## @EACCES
	.comm	_EINVAL,8,3                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid command format, ioctl %d\n"

	.no_dead_strip	_vmw_generic_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_generic_ioctl
_vmw_generic_ioctl:                     ; @vmw_generic_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	str	x3, [sp]                        ; 8-byte Folded Spill
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x23, [x0]
	ldr	x8, [x23]
	ldr	x26, [x8]
	mov	x0, x1
	bl	_DRM_IOCTL_NR
	mov	x22, x0
Lloh0:
	adrp	x24, _DRM_COMMAND_BASE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DRM_COMMAND_BASE@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x9, _DRM_COMMAND_END@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DRM_COMMAND_END@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	subs	w25, w0, w8
	ccmp	w0, w9, #2, hs
	b.hs	LBB0_4
; %bb.1:
	ldr	x9, [x26]
	ldr	w9, [x9]
	add	w9, w9, w8
	cmp	w22, w9
	b.hs	LBB0_4
; %bb.2:
Lloh5:
	adrp	x9, _DRM_VMW_EXECBUF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DRM_VMW_EXECBUF@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	add	w9, w9, w8
	cmp	w22, w9
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldr	x3, [sp]                        ; 8-byte Folded Reload
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	br	x3
LBB0_4:
	add	x1, sp, #12
	mov	x0, x22
	bl	_drm_ioctl_flags
	cbz	w0, LBB0_11
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldr	x3, [sp]                        ; 8-byte Folded Reload
	blr	x3
	b	LBB0_13
LBB0_6:
Lloh8:
	adrp	x9, _vmw_ioctls@GOTPAGE
Lloh9:
	ldr	x9, [x9, _vmw_ioctls@GOTPAGEOFF]
Lloh10:
	ldr	x26, [x9]
Lloh11:
	adrp	x9, _DRM_VMW_UPDATE_LAYOUT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DRM_VMW_UPDATE_LAYOUT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	add	w8, w9, w8
	cmp	w22, w8
	b.ne	LBB0_9
; %bb.7:
	mov	x0, x23
	bl	_drm_is_current_master
	cbnz	w0, LBB0_9
; %bb.8:
Lloh14:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_15
LBB0_9:
	lsl	x8, x25, #3
	ldr	w8, [x26, x8]
	cmp	w8, w20
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_14
; %bb.10:
	ldr	w8, [x24]
	sub	w1, w22, w8
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_11:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_14:
	add	x8, x26, x25, lsl #3
	ldr	w8, [x8, #4]
	str	w8, [sp, #12]
	b	LBB0_5
LBB0_15:
Lloh21:
	adrp	x8, _EACCES@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_COMMAND_BASE,4,2           ; @DRM_COMMAND_BASE
	.comm	_DRM_COMMAND_END,4,2            ; @DRM_COMMAND_END
	.comm	_vmw_ioctls,8,3                 ; @vmw_ioctls
	.comm	_DRM_VMW_EXECBUF,4,2            ; @DRM_VMW_EXECBUF
	.comm	_DRM_VMW_UPDATE_LAYOUT,4,2      ; @DRM_VMW_UPDATE_LAYOUT
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_EACCES,8,3                     ; @EACCES
	.comm	_EINVAL,8,3                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid command format, ioctl %d\n"

	.no_dead_strip	_vmw_generic_ioctl
.subsections_via_symbols
