	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_fb_set_par
_vmw_fb_set_par:                        ## @vmw_fb_set_par
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	24(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	48(%rax), %r15
	movq	_DRM_MODE_TYPE_DRIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DRM_MODE_FLAG_NHSYNC@GOTPCREL(%rip), %rax
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_DRM_MODE
	addq	$64, %rsp
	movl	%eax, -64(%rbp)
	movq	$0, -60(%rbp)
	movl	(%r15), %edi
	leaq	-64(%rbp), %rsi
	callq	_drm_mode_duplicate
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %r14
	movl	(%r12), %eax
	movl	%eax, (%r14)
	movl	16(%r12), %eax
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	callq	_vmw_guess_mode_timing
	movl	(%r14), %ebx
	movl	12(%r12), %edi
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	imull	%eax, %ebx
	movl	4(%r14), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_vmw_kms_validate_mode_vram
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_vmw_fb_kms_framebuffer
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	8(%r12), %eax
	movl	%eax, 36(%rbx)
	movl	4(%r12), %eax
	movl	%eax, 32(%rbx)
	movl	44(%rbx), %eax
	movl	%eax, -72(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -88(%rbp)
	movq	%r14, -96(%rbp)
	movq	24(%rbx), %rax
	movq	%rax, -104(%rbp)
	movl	$1, -120(%rbp)
	leaq	40(%rbx), %rax
	movq	%rax, -112(%rbp)
	leaq	-120(%rbp), %rdi
	callq	_vmwgfx_set_config_internal
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	36(%rbx), %esi
	movl	32(%rbx), %edx
	movq	24(%rbx), %rax
	movl	(%rax), %r8d
	movl	4(%rax), %ecx
	movq	%rbx, %rdi
	callq	_vmw_fb_dirty_mark
	leaq	16(%rbx), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_schedule_delayed_work
LBB0_5:
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:
	movl	(%r15), %edi
	callq	_drm_mode_destroy
LBB0_7:
	movq	%r14, 8(%rbx)
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_drm_mode_destroy
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
LBB0_10:
	subl	(%rax), %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$88, %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	"fb_mode"

	.comm	_DRM_MODE_TYPE_DRIVER,4,2       ## @DRM_MODE_TYPE_DRIVER
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ## @DRM_MODE_FLAG_NHSYNC
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ## @DRM_MODE_FLAG_PVSYNC
L_.str.1:                               ## @.str.1
	.asciz	"Could not create new fb mode.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vmw_fb_set_par
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_fb_set_par
_vmw_fb_set_par:                        ; @vmw_fb_set_par
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x22, x0
	ldr	x19, [x0, #24]
	ldr	x20, [x19, #48]
Lloh0:
	adrp	x8, _DRM_MODE_TYPE_DRIVER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_TYPE_DRIVER@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DRM_MODE_FLAG_NHSYNC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DRM_MODE_FLAG_NHSYNC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	stp	xzr, xzr, [sp]
	stp	wzr, w8, [sp, #16]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_DRM_MODE
	stp	wzr, wzr, [sp, #28]
	str	w0, [sp, #24]
	ldr	w0, [x20]
	add	x1, sp, #24
	bl	_drm_mode_duplicate
	cbz	x0, LBB0_8
; %bb.1:
	mov	x21, x0
	ldr	w8, [x22]
	str	w8, [x0]
	ldr	w8, [x22, #16]
	str	w8, [x0, #4]
	bl	_vmw_guess_mode_timing
	ldr	w23, [x21]
	ldr	w0, [x22, #12]
	mov	w1, #8
	bl	_DIV_ROUND_UP
	mul	w1, w0, w23
	ldr	w2, [x21, #4]
	mov	x0, x20
	bl	_vmw_kms_validate_mode_vram
	cbz	w0, LBB0_9
; %bb.2:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x22
	bl	_vmw_fb_kms_framebuffer
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldur	d0, [x22, #4]
	str	d0, [x19, #32]
	ldr	w8, [x19, #44]
	str	w8, [sp, #88]
	stp	xzr, xzr, [sp, #72]
	str	x21, [sp, #64]
	ldr	x8, [x19, #24]
	mov	w9, #1
	str	w9, [sp, #40]
	add	x9, x19, #40
	stp	x9, x8, [sp, #48]
	add	x0, sp, #40
	bl	_vmwgfx_set_config_internal
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.4:
	ldp	w2, w1, [x19, #32]
	ldr	x8, [x19, #24]
	ldp	w4, w3, [x8]
	mov	x0, x19
	bl	_vmw_fb_dirty_mark
	add	x0, x19, #16
	mov	w1, #0
	bl	_schedule_delayed_work
LBB0_5:
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_7
; %bb.6:
	ldr	w0, [x20]
	bl	_drm_mode_destroy
LBB0_7:
	str	x21, [x19, #8]
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_11
LBB0_8:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
	ldr	w0, [x20]
	mov	x1, x21
	bl	_drm_mode_destroy
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_11:
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fb_mode"

	.comm	_DRM_MODE_TYPE_DRIVER,4,2       ; @DRM_MODE_TYPE_DRIVER
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ; @DRM_MODE_FLAG_NHSYNC
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ; @DRM_MODE_FLAG_PVSYNC
l_.str.1:                               ; @.str.1
	.asciz	"Could not create new fb mode.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vmw_fb_set_par
.subsections_via_symbols
