	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b53_setup
_b53_setup:                             ## @b53_setup
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_b53_reset_switch
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_11
LBB0_2:
	movq	%r12, %rdi
	callq	_b53_reset_mib
	movq	%r12, %rdi
	callq	_b53_apply_config
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	4(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_4:
	cmpl	$0, (%r12)
	je	LBB0_10
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_b53_disable_port
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	cmpl	(%r12), %ebx
	jae	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_dsa_is_cpu_port
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_b53_enable_cpu_port
	jmp	LBB0_9
LBB0_10:
	movl	$1, (%r15)
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to reset switch\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to apply configuration\n"

	.no_dead_strip	_b53_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b53_setup
_b53_setup:                             ; @b53_setup
	.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	x19, x0
	ldr	x21, [x0, #8]
	mov	x0, x21
	bl	_b53_reset_switch
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_11
LBB0_2:
	mov	x0, x21
	bl	_b53_reset_mib
	mov	x0, x21
	bl	_b53_apply_config
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_4:
	ldr	w8, [x21]
	cbz	w8, LBB0_10
; %bb.5:
	mov	w22, #0
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_b53_disable_port
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w22, w22, #1
	ldr	w8, [x21]
	cmp	w22, w8
	b.hs	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_dsa_is_cpu_port
	cbz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_b53_enable_cpu_port
	b	LBB0_7
LBB0_10:
	mov	w8, #1
	str	w8, [x19]
LBB0_11:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to reset switch\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to apply configuration\n"

	.no_dead_strip	_b53_setup
.subsections_via_symbols
