	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_dvsec_function
_read_dvsec_function:                   ## @read_dvsec_function
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_OCXL_DVSEC_FUNC_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_find_dvsec
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, (%r14)
	movslq	%eax, %rsi
	movq	_OCXL_DVSEC_FUNC_OFF_INDEX@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_dword
	movl	-28(%rbp), %edi
	movl	$31, %esi
	callq	_EXTRACT_BIT
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	-28(%rbp), %edi
	movl	$24, %esi
	movl	$29, %edx
	callq	_EXTRACT_BITS
	movl	%eax, 4(%r14)
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_3:
	movl	$-1, 4(%r14)
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	4(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCXL_DVSEC_FUNC_ID,4,2         ## @OCXL_DVSEC_FUNC_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't find function DVSEC\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_OCXL_DVSEC_FUNC_OFF_INDEX,8,3  ## @OCXL_DVSEC_FUNC_OFF_INDEX
L_.str.1:                               ## @.str.1
	.asciz	"Function doesn't define any AFU\n"

L_.str.2:                               ## @.str.2
	.asciz	"Function DVSEC:\n"

L_.str.3:                               ## @.str.3
	.asciz	"  Max AFU index = %d\n"

	.no_dead_strip	_read_dvsec_function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_dvsec_function
_read_dvsec_function:                   ; @read_dvsec_function
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _OCXL_DVSEC_FUNC_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OCXL_DVSEC_FUNC_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_find_dvsec
	cbz	w0, LBB0_3
; %bb.1:
	str	w0, [x20]
Lloh3:
	adrp	x8, _OCXL_DVSEC_FUNC_OFF_INDEX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OCXL_DVSEC_FUNC_OFF_INDEX@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, w0, sxtw
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	w0, [sp, #12]
	mov	w1, #31
	bl	_EXTRACT_BIT
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [sp, #12]
	mov	w1, #24
	mov	w2, #29
	bl	_EXTRACT_BITS
	str	w0, [x20, #4]
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	mov	w8, #-1
	str	w8, [x20, #4]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w8, [x20, #4]
	str	x8, [sp]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_OCXL_DVSEC_FUNC_ID,4,2         ; @OCXL_DVSEC_FUNC_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't find function DVSEC\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_OCXL_DVSEC_FUNC_OFF_INDEX,8,3  ; @OCXL_DVSEC_FUNC_OFF_INDEX
l_.str.1:                               ; @.str.1
	.asciz	"Function doesn't define any AFU\n"

l_.str.2:                               ; @.str.2
	.asciz	"Function DVSEC:\n"

l_.str.3:                               ; @.str.3
	.asciz	"  Max AFU index = %d\n"

	.no_dead_strip	_read_dvsec_function
.subsections_via_symbols
