	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_hwif_ali15x3
_init_hwif_ali15x3:                     ## @init_hwif_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_isa_dev@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	leaq	-28(%rbp), %rdx
	movl	$88, %esi
	callq	_pci_read_config_byte
	movl	-28(%rbp), %edi
	movl	%edi, %esi
	andl	$3, %esi
	movl	%esi, -28(%rbp)
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	setne	%dl
	sete	%bl
	cmpl	$3, %esi
	setne	%al
	orb	%bl, %al
	testl	%esi, %esi
	setne	%bl
	movl	$68, %esi
	cmpb	$1, %al
	jne	LBB0_5
## %bb.2:
	orb	%bl, %dl
	je	LBB0_5
## %bb.3:
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.4:
	movl	$117, %esi
	andl	$1, %edi
	jne	LBB0_7
LBB0_5:
	movq	(%r14), %rdi
	leaq	-32(%rbp), %rdx
	callq	_pci_read_config_byte
	movl	-32(%rbp), %eax
	andq	$15, %rax
	je	LBB0_7
## %bb.6:
	leaq	l___const.init_hwif_ali15x3.irq_routing_table(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%r15)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.init_hwif_ali15x3.irq_routing_table
l___const.init_hwif_ali15x3.irq_routing_table:
	.long	4294967295                      ## 0xffffffff
	.long	9                               ## 0x9
	.long	3                               ## 0x3
	.long	10                              ## 0xa
	.long	4                               ## 0x4
	.long	5                               ## 0x5
	.long	7                               ## 0x7
	.long	6                               ## 0x6
	.long	1                               ## 0x1
	.long	11                              ## 0xb
	.long	0                               ## 0x0
	.long	12                              ## 0xc
	.long	0                               ## 0x0
	.long	14                              ## 0xe
	.long	0                               ## 0x0
	.long	15                              ## 0xf

	.comm	_isa_dev,8,3                    ## @isa_dev
	.no_dead_strip	_init_hwif_ali15x3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_hwif_ali15x3
_init_hwif_ali15x3:                     ; @init_hwif_ali15x3
	.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	x19, x0
Lloh0:
	adrp	x20, _isa_dev@GOTPAGE
Lloh1:
	ldr	x20, [x20, _isa_dev@GOTPAGEOFF]
	ldr	x0, [x20]
	cbz	x0, LBB0_8
; %bb.1:
	add	x2, sp, #12
	mov	w1, #88
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	ldr	x9, [x19, #8]
	cmp	x9, #0
	cset	w10, ne
	ands	w11, w8, #0x3
	str	w11, [sp, #12]
	cset	w12, ne
	cmp	w11, #3
	ccmp	x9, #0, #4, eq
	orr	w10, w10, w12
	ccmp	w10, #0, #4, eq
	b.ne	LBB0_3
; %bb.2:
	mov	w1, #68
	b	LBB0_6
LBB0_3:
	cbz	x9, LBB0_8
; %bb.4:
	tbnz	w8, #0, LBB0_8
; %bb.5:
	mov	w1, #117
LBB0_6:
	ldr	x0, [x20]
	add	x2, sp, #8
	bl	_pci_read_config_byte
	ldr	w8, [sp, #8]
	and	x8, x8, #0xf
	cbz	w8, LBB0_8
; %bb.7:
Lloh2:
	adrp	x9, l___const.init_hwif_ali15x3.irq_routing_table@PAGE
Lloh3:
	add	x9, x9, l___const.init_hwif_ali15x3.irq_routing_table@PAGEOFF
	ldr	w8, [x9, x8, lsl #2]
	str	w8, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.init_hwif_ali15x3.irq_routing_table
l___const.init_hwif_ali15x3.irq_routing_table:
	.long	4294967295                      ; 0xffffffff
	.long	9                               ; 0x9
	.long	3                               ; 0x3
	.long	10                              ; 0xa
	.long	4                               ; 0x4
	.long	5                               ; 0x5
	.long	7                               ; 0x7
	.long	6                               ; 0x6
	.long	1                               ; 0x1
	.long	11                              ; 0xb
	.long	0                               ; 0x0
	.long	12                              ; 0xc
	.long	0                               ; 0x0
	.long	14                              ; 0xe
	.long	0                               ; 0x0
	.long	15                              ; 0xf

	.comm	_isa_dev,8,3                    ; @isa_dev
	.no_dead_strip	_init_hwif_ali15x3
.subsections_via_symbols
