	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan78xx_setup_irq_domain
_lan78xx_setup_irq_domain:              ## @lan78xx_setup_irq_domain
	.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, %rbx
	movq	40(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	addq	$36, %rdi
	callq	_mutex_init
	movq	_INT_EP_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_lan78xx_read_reg
	movl	-28(%rbp), %eax
	movl	%eax, 32(%rbx)
	movq	_lan78xx_irqchip@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	movq	_handle_simple_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_MAX_INT_EP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_chip_domain_ops@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%edx, %edx
	movq	%rbx, %r8
	callq	_irq_domain_add_simple
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r15
	movq	_INT_EP_PHY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_irq_create_mapping
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	%r15, %rdi
	callq	_irq_domain_remove
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	xorl	%eax, %eax
LBB0_4:
	movq	%r15, 8(%rbx)
	movl	%eax, (%rbx)
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_EP_CTL,4,2                 ## @INT_EP_CTL
	.comm	_lan78xx_irqchip,4,2            ## @lan78xx_irqchip
	.comm	_handle_simple_irq,4,2          ## @handle_simple_irq
	.comm	_MAX_INT_EP,4,2                 ## @MAX_INT_EP
	.comm	_chip_domain_ops,4,2            ## @chip_domain_ops
	.comm	_INT_EP_PHY,4,2                 ## @INT_EP_PHY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_lan78xx_setup_irq_domain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan78xx_setup_irq_domain
_lan78xx_setup_irq_domain:              ; @lan78xx_setup_irq_domain
	.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
	ldr	x8, [x0, #40]
	ldr	x8, [x8]
	ldr	x20, [x8]
	add	x0, x0, #36
	bl	_mutex_init
Lloh0:
	adrp	x8, _INT_EP_CTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_EP_CTL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_lan78xx_read_reg
	ldr	w8, [sp, #12]
	str	w8, [x19, #32]
Lloh3:
	adrp	x8, _lan78xx_irqchip@GOTPAGE
Lloh4:
	ldr	x8, [x8, _lan78xx_irqchip@GOTPAGEOFF]
Lloh5:
	adrp	x9, _handle_simple_irq@GOTPAGE
Lloh6:
	ldr	x9, [x9, _handle_simple_irq@GOTPAGEOFF]
	str	x8, [x19, #24]
Lloh7:
	ldr	w8, [x9]
	str	w8, [x19, #16]
Lloh8:
	adrp	x8, _MAX_INT_EP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAX_INT_EP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x3, _chip_domain_ops@GOTPAGE
Lloh12:
	ldr	x3, [x3, _chip_domain_ops@GOTPAGEOFF]
	mov	x0, x20
	mov	w2, #0
	mov	x4, x19
	bl	_irq_domain_add_simple
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.1:
Lloh13:
	adrp	x8, _INT_EP_PHY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _INT_EP_PHY@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_irq_create_mapping
	cbz	w0, LBB0_3
; %bb.2:
	mov	w8, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_irq_domain_remove
	mov	x20, #0
	mov	w0, #0
LBB0_4:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_5:
	str	x20, [x19, #8]
	str	w0, [x19]
	mov	x0, x8
	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	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_EP_CTL,4,2                 ; @INT_EP_CTL
	.comm	_lan78xx_irqchip,4,2            ; @lan78xx_irqchip
	.comm	_handle_simple_irq,4,2          ; @handle_simple_irq
	.comm	_MAX_INT_EP,4,2                 ; @MAX_INT_EP
	.comm	_chip_domain_ops,4,2            ; @chip_domain_ops
	.comm	_INT_EP_PHY,4,2                 ; @INT_EP_PHY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_lan78xx_setup_irq_domain
.subsections_via_symbols
