	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_chipset_ali15x3
_init_chipset_ali15x3:                  ## @init_chipset_ali15x3
	.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	%rdi, %r15
	movl	16(%rdi), %ebx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_PCI_DEVFN
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_pci_get_slot
	movq	%rax, %r14
	movl	(%r15), %eax
	movq	_m5229_revision@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movq	_PCI_VENDOR_ID_AL@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	movq	_PCI_DEVICE_ID_AL_M1533@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_pci_get_device
	movq	_isa_dev@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	callq	_local_irq_save
	movl	(%rbx), %r12d
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$75, %esi
	callq	_pci_read_config_byte
	movl	-44(%rbp), %edx
	cmpl	$193, %r12d
	jg	LBB0_4
## %bb.1:
	andl	$127, %edx
	movq	%r15, %rdi
	movl	$75, %esi
	callq	_pci_write_config_byte
	movl	(%rbx), %eax
	movq	_isa_dev@GOTPCREL(%rip), %r12
	cmpl	$32, %eax
	jl	LBB0_14
## %bb.2:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.3:
	leaq	-44(%rbp), %rdx
	movl	$94, %esi
	callq	_pci_read_config_byte
	movl	-44(%rbp), %eax
	andl	$30, %eax
	xorl	%ecx, %ecx
	cmpl	$18, %eax
	sete	%cl
	movq	_chip_is_1543c_e@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	jmp	LBB0_13
LBB0_4:
	orl	$8, %edx
	movq	%r15, %rdi
	movl	$75, %esi
	callq	_pci_write_config_byte
	testq	%r14, %r14
	movq	_isa_dev@GOTPCREL(%rip), %r12
	je	LBB0_6
## %bb.5:
	movq	8(%r14), %rax
	cmpq	(%r13), %rax
	jne	LBB0_13
LBB0_6:
	movq	_m5229_revision@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	cmpl	$196, %eax
	jg	LBB0_14
## %bb.7:
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.8:
	leaq	-44(%rbp), %rdx
	movl	$121, %esi
	callq	_pci_read_config_byte
	movl	(%rbx), %eax
	cmpl	$194, %eax
	jne	LBB0_10
## %bb.9:
	movq	(%r12), %rdi
	movl	-44(%rbp), %edx
	orl	$4, %edx
	jmp	LBB0_12
LBB0_10:
	jle	LBB0_14
## %bb.11:
	movq	(%r12), %rdi
	movl	-44(%rbp), %edx
	orl	$2, %edx
LBB0_12:
	movl	$121, %esi
	callq	_pci_write_config_byte
LBB0_13:
	movq	_m5229_revision@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
LBB0_14:
	cmpl	$32, %eax
	jl	LBB0_21
## %bb.15:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$83, %esi
	callq	_pci_read_config_byte
	movl	(%rbx), %eax
	cmpl	$32, %eax
	jg	LBB0_17
## %bb.16:
	movl	-44(%rbp), %edx
	andl	$-4, %edx
	jmp	LBB0_19
LBB0_17:
	addl	$-199, %eax
	movl	-44(%rbp), %edx
	cmpl	$1, %eax
	ja	LBB0_19
## %bb.18:
	orl	$3, %edx
	jmp	LBB0_20
LBB0_19:
	orl	$1, %edx
LBB0_20:
	movl	%edx, -44(%rbp)
	movq	%r15, %rdi
	movl	$83, %esi
	callq	_pci_write_config_byte
LBB0_21:
	movq	%r14, %rdi
	callq	_pci_dev_put
	movq	(%r12), %rdi
	callq	_pci_dev_put
	callq	_local_irq_restore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_m5229_revision,4,2             ## @m5229_revision
	.comm	_PCI_VENDOR_ID_AL,8,3           ## @PCI_VENDOR_ID_AL
	.comm	_PCI_DEVICE_ID_AL_M1533,4,2     ## @PCI_DEVICE_ID_AL_M1533
	.comm	_isa_dev,8,3                    ## @isa_dev
	.comm	_chip_is_1543c_e,4,2            ## @chip_is_1543c_e
	.no_dead_strip	_init_chipset_ali15x3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_chipset_ali15x3
_init_chipset_ali15x3:                  ; @init_chipset_ali15x3
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	ldr	w20, [x0, #16]
	mov	w0, #0
	mov	w1, #0
	bl	_PCI_DEVFN
	mov	x1, x0
	mov	x0, x20
	bl	_pci_get_slot
	mov	x20, x0
	ldr	w8, [x19]
Lloh0:
	adrp	x22, _m5229_revision@GOTPAGE
Lloh1:
	ldr	x22, [x22, _m5229_revision@GOTPAGEOFF]
	str	w8, [x22]
Lloh2:
	adrp	x23, _PCI_VENDOR_ID_AL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PCI_VENDOR_ID_AL@GOTPAGEOFF]
	ldr	x0, [x23]
Lloh4:
	adrp	x8, _PCI_DEVICE_ID_AL_M1533@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCI_DEVICE_ID_AL_M1533@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_pci_get_device
Lloh7:
	adrp	x21, _isa_dev@GOTPAGE
Lloh8:
	ldr	x21, [x21, _isa_dev@GOTPAGEOFF]
	str	x0, [x21]
	bl	_local_irq_save
	ldr	w24, [x22]
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #75
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	cmp	w24, #193
	b.gt	LBB0_3
; %bb.1:
	and	w2, w8, #0x7f
	mov	x0, x19
	mov	w1, #75
	bl	_pci_write_config_byte
	ldr	w8, [x22]
	ldr	x0, [x21]
	cmp	w8, #32
	ccmp	x0, #0, #4, ge
	b.eq	LBB0_12
; %bb.2:
	add	x2, sp, #12
	mov	w1, #94
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	and	w8, w8, #0x1e
	cmp	w8, #18
	cset	w8, eq
Lloh9:
	adrp	x9, _chip_is_1543c_e@GOTPAGE
Lloh10:
	ldr	x9, [x9, _chip_is_1543c_e@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
	b	LBB0_11
LBB0_3:
	orr	w2, w8, #0x8
	mov	x0, x19
	mov	w1, #75
	bl	_pci_write_config_byte
	cbz	x20, LBB0_5
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_5:
	ldr	w8, [x22]
	ldr	x0, [x21]
	cmp	w8, #196
	ccmp	x0, #0, #4, le
	b.eq	LBB0_12
; %bb.6:
	add	x2, sp, #12
	mov	w1, #121
	bl	_pci_read_config_byte
	ldr	w8, [x22]
	cmp	w8, #194
	b.ne	LBB0_8
; %bb.7:
	ldr	x0, [x21]
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x4
	b	LBB0_10
LBB0_8:
	cmp	w8, #195
	b.lt	LBB0_12
; %bb.9:
	ldr	x0, [x21]
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x2
LBB0_10:
	mov	w1, #121
	bl	_pci_write_config_byte
LBB0_11:
	ldr	w8, [x22]
LBB0_12:
	cmp	w8, #32
	b.lt	LBB0_19
; %bb.13:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #83
	bl	_pci_read_config_byte
	ldr	w8, [x22]
	cmp	w8, #32
	b.gt	LBB0_15
; %bb.14:
	ldr	w8, [sp, #12]
	and	w8, w8, #0xfffffffc
	b	LBB0_17
LBB0_15:
	sub	w9, w8, #199
	ldr	w8, [sp, #12]
	cmp	w9, #1
	b.hi	LBB0_17
; %bb.16:
	orr	w2, w8, #0x3
	b	LBB0_18
LBB0_17:
	orr	w2, w8, #0x1
LBB0_18:
	str	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #83
	bl	_pci_write_config_byte
LBB0_19:
	mov	x0, x20
	bl	_pci_dev_put
	ldr	x0, [x21]
	bl	_pci_dev_put
	bl	_local_irq_restore
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_m5229_revision,4,2             ; @m5229_revision
	.comm	_PCI_VENDOR_ID_AL,8,3           ; @PCI_VENDOR_ID_AL
	.comm	_PCI_DEVICE_ID_AL_M1533,4,2     ; @PCI_DEVICE_ID_AL_M1533
	.comm	_isa_dev,8,3                    ; @isa_dev
	.comm	_chip_is_1543c_e,4,2            ; @chip_is_1543c_e
	.no_dead_strip	_init_chipset_ali15x3
.subsections_via_symbols
