	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_fb_kms_detach
_vmw_fb_kms_detach:                     ## @vmw_fb_kms_detach
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	cmpq	$0, 16(%rdi)
	je	LBB0_3
## %bb.1:
	movl	36(%rbx), %eax
	movl	%eax, -48(%rbp)
	leaq	32(%rbx), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, -88(%rbp)
	movups	%xmm0, -72(%rbp)
	movq	$0, -56(%rbp)
	movq	%rax, -96(%rbp)
	leaq	-96(%rbp), %rdi
	callq	_vmwgfx_set_config_internal
	testl	%eax, %eax
	je	LBB0_2
## %bb.10:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_9
LBB0_2:
	movq	16(%rbx), %rsi
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	callq	_drm_mode_destroy
	movq	$0, 16(%rbx)
LBB0_3:
	testq	%r12, %r12
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	_drm_framebuffer_put
	movq	$0, 8(%rbx)
LBB0_5:
	xorl	%r13d, %r13d
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.6:
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.7:
	cmpq	$0, (%rbx)
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_vmw_bo_unreference
LBB0_9:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not unset a mode.\n"

	.no_dead_strip	_vmw_fb_kms_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_fb_kms_detach
_vmw_fb_kms_detach:                     ; @vmw_fb_kms_detach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldp	x22, x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x19, #36]
	str	w8, [sp, #56]
	add	x8, x19, #32
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	str	xzr, [sp, #48]
	str	x8, [sp, #8]
	add	x0, sp, #8
	bl	_vmwgfx_set_config_internal
	cbz	w0, LBB0_3
; %bb.2:
	mov	x23, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_10
LBB0_3:
	ldp	x1, x8, [x19, #16]
	ldr	w0, [x8]
	bl	_drm_mode_destroy
	str	xzr, [x19, #16]
LBB0_4:
	cbz	x22, LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_drm_framebuffer_put
	str	xzr, [x19, #8]
LBB0_6:
	mov	w23, #0
	cbz	w21, LBB0_10
; %bb.7:
	cbz	w20, LBB0_10
; %bb.8:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_vmw_bo_unreference
	mov	w23, #0
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not unset a mode.\n"

	.no_dead_strip	_vmw_fb_kms_detach
.subsections_via_symbols
