	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vt8251_scr_read
_vt8251_scr_read:                       ## @vt8251_scr_read
	.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
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r15
	movq	8(%r13), %rax
	movl	(%rax), %ebx
	addl	%ebx, %ebx
	addl	(%r13), %ebx
	movl	$0, -48(%rbp)
	cmpl	$130, %r12d
	je	LBB0_4
## %bb.1:
	cmpl	$129, %r12d
	je	LBB0_6
## %bb.2:
	cmpl	$128, %r12d
	jne	LBB0_5
## %bb.3:
	addl	$160, %ebx
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_pci_read_config_byte
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	andl	$19, %eax
	addl	$16, %eax
	andl	$12, %ecx
	leaq	_vt8251_scr_read.ipm_tbl(%rip), %rdx
	orl	(%rcx,%rdx), %eax
	jmp	LBB0_7
LBB0_4:
	addl	$164, %ebx
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_pci_read_config_byte
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	andl	$2, %eax
	movl	%ecx, %edx
	andl	$1, %edx
	andl	$12, %ecx
	shll	$6, %ecx
	leal	(%rdx,%rax,2), %eax
	orl	%ecx, %eax
	jmp	LBB0_7
LBB0_6:
	xorl	%edi, %edi
	cmpl	$21127, (%r15)                  ## imm = 0x5287
	setne	%dil
	callq	_WARN_ON
	leal	176(,%rbx,4), %esi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_dword
	movl	-48(%rbp), %eax
LBB0_7:
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @vt8251_scr_read.ipm_tbl
_vt8251_scr_read.ipm_tbl:
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	6                               ## 0x6
	.long	0                               ## 0x0

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vt8251_scr_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vt8251_scr_read
_vt8251_scr_read:                       ; @vt8251_scr_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	str	wzr, [sp, #12]
	cmp	w21, #130
	b.eq	LBB0_4
; %bb.1:
	cmp	w21, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #128
	b.ne	LBB0_7
; %bb.3:
	add	w1, w22, #160
	add	x2, sp, #8
	mov	x0, x20
	bl	_pci_read_config_byte
	ldr	w8, [sp, #8]
	tst	w8, #0x10
	mov	w9, #32
	mov	w10, #16
	csel	w9, w10, w9, eq
	bfxil	w9, w8, #0, #2
	ubfx	x8, x8, #2, #2
Lloh0:
	adrp	x10, _vt8251_scr_read.ipm_tbl@PAGE
Lloh1:
	add	x10, x10, _vt8251_scr_read.ipm_tbl@PAGEOFF
	ldr	w8, [x10, x8, lsl #2]
	orr	w8, w9, w8
	b	LBB0_6
LBB0_4:
	add	w1, w22, #164
	add	x2, sp, #8
	mov	x0, x20
	bl	_pci_read_config_byte
	ldr	w9, [sp, #8]
	lsr	w10, w9, #2
	lsl	w8, w9, #1
	and	w8, w8, #0x4
	bfxil	w8, w9, #0, #1
	bfi	w8, w10, #8, #2
	b	LBB0_6
LBB0_5:
	ldr	w8, [x20]
	mov	w9, #21127
	cmp	w8, w9
	cset	w0, ne
	bl	_WARN_ON
	lsl	w8, w22, #2
	add	w1, w8, #176
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
LBB0_6:
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_8
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @vt8251_scr_read.ipm_tbl
_vt8251_scr_read.ipm_tbl:
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	6                               ; 0x6
	.long	0                               ; 0x0

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vt8251_scr_read
.subsections_via_symbols
