	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_scr_cfg_addr
_get_scr_cfg_addr:                      ## @get_scr_cfg_addr
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	_SIS_SCR_BASE@GOTPCREL(%rip), %rcx
	shll	$2, %ebx
	addl	(%rcx), %ebx
	cmpq	$0, (%r15)
	je	LBB0_8
## %bb.1:
	movl	(%rax), %ecx
	leal	-384(%rcx), %edx
	cmpl	$2, %edx
	jb	LBB0_5
## %bb.2:
	leal	-386(%rcx), %eax
	cmpl	$2, %eax
	jb	LBB0_4
## %bb.3:
	cmpl	$4482, %ecx                     ## imm = 0x1182
	jne	LBB0_8
LBB0_4:
	movq	_SIS182_SATA1_OFS@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_SIS_PMR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-28(%rbp), %rdx
	movq	%rax, %rdi
	callq	_pci_read_config_byte
	movq	_SIS_PMR_COMBINED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -28(%rbp)
	jne	LBB0_8
## %bb.6:
	movq	_SIS180_SATA1_OFS@GOTPCREL(%rip), %rax
LBB0_7:
	addl	(%rax), %ebx
LBB0_8:
	leal	16(%rbx), %eax
	cmpq	$0, (%r14)
	cmovel	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIS_SCR_BASE,4,2               ## @SIS_SCR_BASE
	.comm	_SIS_PMR,4,2                    ## @SIS_PMR
	.comm	_SIS_PMR_COMBINED,4,2           ## @SIS_PMR_COMBINED
	.comm	_SIS180_SATA1_OFS,4,2           ## @SIS180_SATA1_OFS
	.comm	_SIS182_SATA1_OFS,4,2           ## @SIS182_SATA1_OFS
	.no_dead_strip	_get_scr_cfg_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_scr_cfg_addr
_get_scr_cfg_addr:                      ; @get_scr_cfg_addr
	.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	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
Lloh0:
	adrp	x8, _SIS_SCR_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIS_SCR_BASE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w20, w8, w20, lsl #2
	ldr	x8, [x21]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	w8, [x0]
	sub	w9, w8, #384
	cmp	w9, #2
	b.lo	LBB0_4
; %bb.2:
	sub	w9, w8, #386
	cmp	w9, #2
	mov	w9, #4482
	ccmp	w8, w9, #4, hs
	b.ne	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _SIS182_SATA1_OFS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIS182_SATA1_OFS@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _SIS_PMR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SIS_PMR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
Lloh8:
	adrp	x9, _SIS_PMR_COMBINED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SIS_PMR_COMBINED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.5:
Lloh11:
	adrp	x8, _SIS180_SATA1_OFS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SIS180_SATA1_OFS@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	add	w20, w8, w20
LBB0_7:
	ldr	x8, [x19]
	add	w9, w20, #16
	cmp	x8, #0
	csel	w0, w20, w9, eq
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SIS_SCR_BASE,4,2               ; @SIS_SCR_BASE
	.comm	_SIS_PMR,4,2                    ; @SIS_PMR
	.comm	_SIS_PMR_COMBINED,4,2           ; @SIS_PMR_COMBINED
	.comm	_SIS180_SATA1_OFS,4,2           ; @SIS180_SATA1_OFS
	.comm	_SIS182_SATA1_OFS,4,2           ; @SIS182_SATA1_OFS
	.no_dead_strip	_get_scr_cfg_addr
.subsections_via_symbols
