	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sky2_setup_irq
_sky2_setup_irq:                        ## @sky2_setup_irq
	.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	%rsi, %rcx
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	movl	(%rbx), %edi
	movq	_sky2_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SKY2_HW_USE_MSI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	(%r15), %eax
	jne	LBB0_2
## %bb.1:
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_2:
	movq	%r15, %r8
	callq	_request_irq
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %edx
	addq	$4, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	jmp	LBB0_5
LBB0_4:
	movq	_SKY2_HW_IRQ_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	leaq	4(%r15), %rdi
	callq	_napi_enable
	movq	_B0_IMSK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_Y2_IS_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_sky2_write32
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_sky2_read32
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sky2_intr,4,2                  ## @sky2_intr
	.comm	_SKY2_HW_USE_MSI,4,2            ## @SKY2_HW_USE_MSI
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot assign irq %d\n"

	.comm	_SKY2_HW_IRQ_SETUP,4,2          ## @SKY2_HW_IRQ_SETUP
	.comm	_B0_IMSK,4,2                    ## @B0_IMSK
	.comm	_Y2_IS_BASE,4,2                 ## @Y2_IS_BASE
	.no_dead_strip	_sky2_setup_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sky2_setup_irq
_sky2_setup_irq:                        ; @sky2_setup_irq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x3, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	ldr	w0, [x21]
Lloh0:
	adrp	x8, _sky2_intr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sky2_intr@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _SKY2_HW_USE_MSI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SKY2_HW_USE_MSI@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _IRQF_SHARED@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IRQF_SHARED@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w2, w10, wzr, eq
	mov	x4, x19
	bl	_request_irq
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w2, [x21], #4
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x8, _SKY2_HW_IRQ_SETUP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SKY2_HW_IRQ_SETUP@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	mov	x0, x19
	str	w8, [x0], #4
	bl	_napi_enable
Lloh14:
	adrp	x21, _B0_IMSK@GOTPAGE
Lloh15:
	ldr	x21, [x21, _B0_IMSK@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh16:
	adrp	x8, _Y2_IS_BASE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _Y2_IS_BASE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_sky2_write32
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sky2_read32
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_sky2_intr,4,2                  ; @sky2_intr
	.comm	_SKY2_HW_USE_MSI,4,2            ; @SKY2_HW_USE_MSI
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot assign irq %d\n"

	.comm	_SKY2_HW_IRQ_SETUP,4,2          ; @SKY2_HW_IRQ_SETUP
	.comm	_B0_IMSK,4,2                    ; @B0_IMSK
	.comm	_Y2_IS_BASE,4,2                 ; @Y2_IS_BASE
	.no_dead_strip	_sky2_setup_irq
.subsections_via_symbols
