	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dnv_rd_reg
_dnv_rd_reg:                            ## @dnv_rd_reg
	.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	%r9, %r12
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movl	%esi, %ebx
	cmpl	$4, %edx
	jne	LBB0_3
## %bb.1:
	movl	%ebx, %r14d
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r15d, %r15d
	movl	$6528, %esi                     ## imm = 0x1980
	xorl	%edx, %edx
	callq	_pci_get_device
	testq	%rax, %rax
	je	LBB0_16
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_pci_read_config_dword
	movq	%rbx, %rdi
	callq	_pci_dev_put
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_3:
	movl	%edi, %r14d
	cmpl	$76, %edi
	jne	LBB0_7
## %bb.4:
	testl	%edx, %edx
	jne	LBB0_7
## %bb.5:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_get_mem_ctrl_hub_base_addr
	testq	%rax, %rax
	je	LBB0_16
## %bb.6:
	movq	_DNV_MCHBAR_SIZE@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_7:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_get_sideband_reg_base_addr
	testq	%rax, %rax
	je	LBB0_16
## %bb.8:
	shll	$16, %r14d
	addq	%r14, %rax
	movq	_DNV_SB_PORT_SIZE@GOTPCREL(%rip), %rcx
LBB0_9:
	movq	(%rcx), %rsi
	movl	%eax, %edi
	callq	_ioremap
	testq	%rax, %rax
	je	LBB0_17
## %bb.10:
	movslq	%ebx, %rcx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$8, %rbx
	jne	LBB0_12
## %bb.11:
	movl	4(%rax,%rcx), %edx
	movl	%edx, 4(%r13)
LBB0_12:
	movl	(%rax,%rcx), %ecx
	movl	%ecx, (%r13)
	movq	%rax, %rdi
	callq	_iounmap
LBB0_13:
	xorl	%r15d, %r15d
	movl	$0, %ecx
	cmpq	$8, %rbx
	jne	LBB0_15
## %bb.14:
	movl	4(%r13), %ecx
LBB0_15:
	movl	(%r13), %r8d
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movq	%r12, %rdx
	callq	_edac_dbg
	jmp	LBB0_19
LBB0_16:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_17:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_18:
	subl	(%rax), %r15d
LBB0_19:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_VENDOR_ID_INTEL,4,2        ## @PCI_VENDOR_ID_INTEL
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_DNV_MCHBAR_SIZE,8,3            ## @DNV_MCHBAR_SIZE
	.comm	_DNV_SB_PORT_SIZE,8,3           ## @DNV_SB_PORT_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Read %s=%.8x_%.8x\n"

	.no_dead_strip	_dnv_rd_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dnv_rd_reg
_dnv_rd_reg:                            ; @dnv_rd_reg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x5
	mov	x21, x4
	mov	x20, x3
	mov	x22, x1
	cmp	w2, #4
	b.ne	LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _PCI_VENDOR_ID_INTEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_VENDOR_ID_INTEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #6528
	mov	x2, #0
	bl	_pci_get_device
	cbz	x0, LBB0_16
; %bb.2:
	mov	x23, x0
	mov	x1, x22
	mov	x2, x20
	bl	_pci_read_config_dword
	mov	x0, x23
	bl	_pci_dev_put
	cmp	x21, #8
	b.ne	LBB0_14
LBB0_3:
	ldr	w3, [x20, #4]
	b	LBB0_15
LBB0_4:
	mov	x23, x0
	cmp	w0, #76
	b.ne	LBB0_8
; %bb.5:
	cbnz	w2, LBB0_8
; %bb.6:
	bl	_get_mem_ctrl_hub_base_addr
	cbz	x0, LBB0_16
; %bb.7:
Lloh3:
	adrp	x8, _DNV_MCHBAR_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DNV_MCHBAR_SIZE@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	bl	_get_sideband_reg_base_addr
	cbz	x0, LBB0_16
; %bb.9:
	lsl	w8, w23, #16
	add	x0, x0, x8
Lloh5:
	adrp	x8, _DNV_SB_PORT_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DNV_SB_PORT_SIZE@GOTPAGEOFF]
LBB0_10:
	ldr	x1, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ioremap
	cbz	x0, LBB0_16
; %bb.11:
	sxtw	x8, w22
	cmp	x21, #8
	b.ne	LBB0_13
; %bb.12:
	add	x9, x0, x8
	ldr	w9, [x9, #4]
	str	w9, [x20, #4]
LBB0_13:
	ldr	w8, [x0, x8]
	str	w8, [x20]
	bl	_iounmap
	cmp	x21, #8
	b.eq	LBB0_3
LBB0_14:
	mov	w3, #0
LBB0_15:
	ldr	w4, [x20]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	mov	x2, x19
	bl	_edac_dbg
	mov	w0, #0
	b	LBB0_17
LBB0_16:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_VENDOR_ID_INTEL,4,2        ; @PCI_VENDOR_ID_INTEL
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_DNV_MCHBAR_SIZE,8,3            ; @DNV_MCHBAR_SIZE
	.comm	_DNV_SB_PORT_SIZE,8,3           ; @DNV_SB_PORT_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Read %s=%.8x_%.8x\n"

	.no_dead_strip	_dnv_rd_reg
.subsections_via_symbols
