	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_chipset_amd74xx
_init_chipset_amd74xx:                  ## @init_chipset_amd74xx
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$0, -36(%rbp)
	callq	_amd_offset
	movl	%eax, %r14d
	movq	(%rbx), %rax
	movq	_PCI_VENDOR_ID_AMD@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_4
## %bb.1:
	movq	8(%rbx), %rax
	movq	_PCI_DEVICE_ID_AMD_COBRA_7401@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.2:
	movq	_PCI_DEVICE_ID_AMD_VIPER_7409@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_amd7409_cable_detect
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_amd7411_cable_detect
LBB0_5:
	movq	_AMD_IDE_CONFIG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	addl	%r14d, %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_byte
	movq	(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_8
## %bb.6:
	movq	8(%rbx), %rax
	movq	_PCI_DEVICE_ID_AMD_VIPER_7411@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movl	-36(%rbp), %edx
	andl	$15, %edx
	jmp	LBB0_9
LBB0_8:
	movl	$240, %edx
	orl	-36(%rbp), %edx
LBB0_9:
	movl	%edx, -36(%rbp)
	addl	(%r12), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_pci_write_config_byte
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_VENDOR_ID_AMD,8,3          ## @PCI_VENDOR_ID_AMD
	.comm	_PCI_DEVICE_ID_AMD_COBRA_7401,8,3 ## @PCI_DEVICE_ID_AMD_COBRA_7401
	.comm	_PCI_DEVICE_ID_AMD_VIPER_7409,8,3 ## @PCI_DEVICE_ID_AMD_VIPER_7409
	.comm	_AMD_IDE_CONFIG,4,2             ## @AMD_IDE_CONFIG
	.comm	_PCI_DEVICE_ID_AMD_VIPER_7411,8,3 ## @PCI_DEVICE_ID_AMD_VIPER_7411
	.no_dead_strip	_init_chipset_amd74xx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_chipset_amd74xx
_init_chipset_amd74xx:                  ; @init_chipset_amd74xx
	.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, x0
	str	wzr, [sp, #12]
	bl	_amd_offset
	mov	x20, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x21, _PCI_VENDOR_ID_AMD@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PCI_VENDOR_ID_AMD@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _PCI_DEVICE_ID_AMD_COBRA_7401@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PCI_DEVICE_ID_AMD_COBRA_7401@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.2:
Lloh5:
	adrp	x9, _PCI_DEVICE_ID_AMD_VIPER_7409@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PCI_DEVICE_ID_AMD_VIPER_7409@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_amd7409_cable_detect
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_amd7411_cable_detect
LBB0_5:
Lloh8:
	adrp	x22, _AMD_IDE_CONFIG@GOTPAGE
Lloh9:
	ldr	x22, [x22, _AMD_IDE_CONFIG@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w1, w8, w20
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_byte
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	ldr	x8, [x19, #8]
Lloh10:
	adrp	x9, _PCI_DEVICE_ID_AMD_VIPER_7411@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PCI_DEVICE_ID_AMD_VIPER_7411@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	w8, [sp, #12]
	and	w2, w8, #0xf
	b	LBB0_9
LBB0_8:
	ldr	w8, [sp, #12]
	orr	w2, w8, #0xf0
LBB0_9:
	str	w2, [sp, #12]
	ldr	w8, [x22]
	add	w1, w8, w20
	mov	x0, x19
	bl	_pci_write_config_byte
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_VENDOR_ID_AMD,8,3          ; @PCI_VENDOR_ID_AMD
	.comm	_PCI_DEVICE_ID_AMD_COBRA_7401,8,3 ; @PCI_DEVICE_ID_AMD_COBRA_7401
	.comm	_PCI_DEVICE_ID_AMD_VIPER_7409,8,3 ; @PCI_DEVICE_ID_AMD_VIPER_7409
	.comm	_AMD_IDE_CONFIG,4,2             ; @AMD_IDE_CONFIG
	.comm	_PCI_DEVICE_ID_AMD_VIPER_7411,8,3 ; @PCI_DEVICE_ID_AMD_VIPER_7411
	.no_dead_strip	_init_chipset_amd74xx
.subsections_via_symbols
