	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vt8251_scr_write
_vt8251_scr_write:                      ## @vt8251_scr_write
	.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
	pushq	%rax
	.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, %r12d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movq	8(%rbx), %rax
	movl	(%rax), %r13d
	addl	%r13d, %r13d
	addl	(%rbx), %r13d
	cmpl	$129, %r12d
	je	LBB0_3
## %bb.1:
	cmpl	$128, %r12d
	jne	LBB0_4
## %bb.2:
	xorl	%edi, %edi
	cmpl	$21127, (%r14)                  ## imm = 0x5287
	setne	%dil
	callq	_WARN_ON
	leal	176(,%r13,4), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_pci_write_config_dword
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movl	%r15d, %eax
	shrl	%eax
	andl	$2, %eax
	movl	%r15d, %ecx
	andl	$1, %ecx
	orl	%eax, %ecx
	shrl	$6, %r15d
	andl	$12, %r15d
	orl	%ecx, %r15d
	addl	$164, %r13d
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	callq	_pci_write_config_byte
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vt8251_scr_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vt8251_scr_write
_vt8251_scr_write:                      ; @vt8251_scr_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x20, x0
	ldr	x8, [x22, #8]
	ldr	w8, [x8]
	ldr	w9, [x22]
	add	w22, w9, w8, lsl #1
	cmp	w21, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w21, #128
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [x20]
	mov	w9, #21127
	cmp	w8, w9
	cset	w0, ne
	bl	_WARN_ON
	lsl	w8, w22, #2
	add	w1, w8, #176
	mov	x0, x20
	mov	x2, x19
	bl	_pci_write_config_dword
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	lsr	w8, w19, #1
	and	w8, w8, #0x2
	bfxil	w8, w19, #0, #1
	lsr	w9, w19, #6
	and	w9, w9, #0xc
	orr	w2, w8, w9
	add	w1, w22, #164
	mov	x0, x20
	bl	_pci_write_config_byte
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	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
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vt8251_scr_write
.subsections_via_symbols
