	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ehea_up
_ehea_up:                               ## @ehea_up
	.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, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_EHEA_PORT_UP@GOTPCREL(%rip), %rcx
	xorl	%r13d, %r13d
	cmpq	(%rcx), %rax
	je	LBB0_26
## %bb.1:
	movl	8(%r15), %esi
	movq	%r15, %rdi
	callq	_ehea_port_res_setup
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_3
LBB0_4:
	movq	%r15, %rdi
	callq	_ehea_configure_port
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_7:
	movq	%r14, %rdi
	callq	_ehea_reg_interrupts
	testl	%eax, %eax
	je	LBB0_8
## %bb.13:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	movq	%r15, %rdi
	callq	_ehea_clean_all_portres
LBB0_3:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_netdev_info
LBB0_25:
	xorl	%eax, %eax
	callq	_ehea_update_bcmc_registrations
	xorl	%eax, %eax
	callq	_ehea_update_firmware_handles
LBB0_26:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpl	$0, 8(%r15)
	jle	LBB0_20
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	24(%r15), %edi
	movq	16(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_ehea_activate_qp
	testl	%eax, %eax
	jne	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movslq	8(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_10
## %bb.15:
	testl	%eax, %eax
	jle	LBB0_20
## %bb.16:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rdi
	addq	%rbx, %rdi
	callq	_ehea_fill_port_res
	testl	%eax, %eax
	jne	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_18 Depth=1
	incq	%r12
	movslq	8(%r15), %rax
	addq	$4, %rbx
	cmpq	%rax, %r12
	jl	LBB0_18
LBB0_20:
	movq	_H_REG_BCMC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ehea_broadcast_reg_helper
	testl	%eax, %eax
	je	LBB0_23
## %bb.21:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_22
LBB0_11:
	movl	%eax, %r13d
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_12
LBB0_23:
	movq	_EHEA_PORT_UP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	jmp	LBB0_24
LBB0_19:
	movl	%eax, %r13d
	leaq	L_.str.4(%rip), %rsi
LBB0_12:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
LBB0_22:
	movq	%r14, %rdi
	callq	_ehea_free_interrupts
	movq	%r15, %rdi
	callq	_ehea_clean_all_portres
	testl	%r13d, %r13d
	jne	LBB0_3
LBB0_24:
	xorl	%r13d, %r13d
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_EHEA_PORT_UP,8,3               ## @EHEA_PORT_UP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"port_res_failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"ehea_configure_port failed. ret:%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"reg_interrupts failed. ret:%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"activate_qp failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"out_free_irqs\n"

	.comm	_H_REG_BCMC,4,2                 ## @H_REG_BCMC
	.comm	_EIO,4,2                        ## @EIO
L_.str.5:                               ## @.str.5
	.asciz	"Failed starting. ret=%i\n"

	.no_dead_strip	_ehea_up
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ehea_up
_ehea_up:                               ; @ehea_up
	.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
	bl	_netdev_priv
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _EHEA_PORT_UP@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EHEA_PORT_UP@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_11
LBB0_2:
	mov	x20, x0
	ldr	w1, [x0, #8]
	bl	_ehea_port_res_setup
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	b	LBB0_9
LBB0_4:
	mov	x0, x20
	bl	_ehea_configure_port
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
	str	x21, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_ehea_reg_interrupts
	cbz	w0, LBB0_12
; %bb.7:
	mov	x21, x0
	str	x21, [sp]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
LBB0_8:
	mov	x0, x20
	bl	_ehea_clean_all_portres
LBB0_9:
Lloh8:
	adrp	x1, l_.str.5@PAGE
Lloh9:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_netdev_info
LBB0_10:
	bl	_ehea_update_bcmc_registrations
	bl	_ehea_update_firmware_handles
LBB0_11:
	mov	x0, x21
	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
LBB0_12:
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.13:
	mov	x23, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #24]
	ldr	x8, [x20, #16]
	ldr	w1, [x8, x23, lsl #2]
	bl	_ehea_activate_qp
	cbnz	w0, LBB0_22
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x20, #8]
	cmp	x23, x8
	b.lt	LBB0_14
; %bb.16:
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.17:
	mov	x23, #0
	mov	x24, #0
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	add	x0, x8, x23
	bl	_ehea_fill_port_res
	cbnz	w0, LBB0_24
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x20, #8]
	add	x23, x23, #4
	cmp	x24, x8
	b.lt	LBB0_18
LBB0_20:
Lloh10:
	adrp	x8, _H_REG_BCMC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _H_REG_BCMC@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ehea_broadcast_reg_helper
	cbz	w0, LBB0_23
; %bb.21:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_26
LBB0_22:
	mov	x21, x0
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_25
LBB0_23:
	mov	w21, #0
	ldr	x8, [x22]
	str	x8, [x20]
	b	LBB0_10
LBB0_24:
	mov	x21, x0
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_25:
	mov	x0, x19
	bl	_netdev_err
LBB0_26:
	mov	x0, x19
	bl	_ehea_free_interrupts
	mov	x0, x20
	bl	_ehea_clean_all_portres
	cbnz	w21, LBB0_9
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EHEA_PORT_UP,8,3               ; @EHEA_PORT_UP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"port_res_failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"ehea_configure_port failed. ret:%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"reg_interrupts failed. ret:%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"activate_qp failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"out_free_irqs\n"

	.comm	_H_REG_BCMC,4,2                 ; @H_REG_BCMC
	.comm	_EIO,4,2                        ; @EIO
l_.str.5:                               ; @.str.5
	.asciz	"Failed starting. ret=%i\n"

	.no_dead_strip	_ehea_up
.subsections_via_symbols
