	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function macb_configure_caps
_macb_configure_caps:                   ## @macb_configure_caps
	.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
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movl	(%rsi), %eax
	movl	%eax, (%rbx)
LBB0_2:
	movl	28(%rbx), %esi
	movl	32(%rbx), %edi
	callq	_hw_is_gem
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	_MACB_CAPS_MACB_IS_GEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	_DCFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gem_readl
	movq	_IRQCOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_GEM_BFEXT
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_MACB_CAPS_ISR_CLEAR_ON_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_5:
	movq	_DCFG2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gem_readl
	movl	%eax, %r14d
	movq	_RX_PKT_BUFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GEM_BIT
	movl	%eax, %r15d
	movq	_TX_PKT_BUFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GEM_BIT
	orl	%r15d, %eax
	testl	%r14d, %eax
	jne	LBB0_7
## %bb.6:
	movq	_MACB_CAPS_FIFO_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_7:
	movq	8(%rbx), %rdi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MACB_CAPS_MACB_IS_GEM,4,2      ## @MACB_CAPS_MACB_IS_GEM
	.comm	_DCFG1,4,2                      ## @DCFG1
	.comm	_IRQCOR,4,2                     ## @IRQCOR
	.comm	_MACB_CAPS_ISR_CLEAR_ON_WRITE,4,2 ## @MACB_CAPS_ISR_CLEAR_ON_WRITE
	.comm	_DCFG2,4,2                      ## @DCFG2
	.comm	_RX_PKT_BUFF,4,2                ## @RX_PKT_BUFF
	.comm	_TX_PKT_BUFF,4,2                ## @TX_PKT_BUFF
	.comm	_MACB_CAPS_FIFO_MODE,4,2        ## @MACB_CAPS_FIFO_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cadence caps 0x%08x\n"

	.comm	_DCFG5,4,2                      ## @DCFG5
	.comm	_HW_DMA_CAP_PTP,4,2             ## @HW_DMA_CAP_PTP
	.comm	_TSU,4,2                        ## @TSU
	.comm	_gem_ptp_info,4,2               ## @gem_ptp_info
	.no_dead_strip	_macb_configure_caps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macb_configure_caps
_macb_configure_caps:                   ; @macb_configure_caps
	.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
	cbz	x1, LBB0_2
; %bb.1:
	ldr	w8, [x1]
	str	w8, [x19]
LBB0_2:
	ldp	w1, w0, [x19, #28]
	bl	_hw_is_gem
	cbz	x0, LBB0_7
; %bb.3:
Lloh0:
	adrp	x8, _MACB_CAPS_MACB_IS_GEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MACB_CAPS_MACB_IS_GEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh3:
	adrp	x8, _DCFG1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DCFG1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gem_readl
	mov	x1, x0
Lloh6:
	adrp	x8, _IRQCOR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQCOR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_GEM_BFEXT
	cbnz	x0, LBB0_5
; %bb.4:
Lloh9:
	adrp	x8, _MACB_CAPS_ISR_CLEAR_ON_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MACB_CAPS_ISR_CLEAR_ON_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_5:
Lloh12:
	adrp	x8, _DCFG2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DCFG2@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gem_readl
	mov	x20, x0
Lloh15:
	adrp	x8, _RX_PKT_BUFF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RX_PKT_BUFF@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_GEM_BIT
	mov	x21, x0
Lloh18:
	adrp	x8, _TX_PKT_BUFF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TX_PKT_BUFF@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_GEM_BIT
	orr	w8, w0, w21
	tst	w8, w20
	b.ne	LBB0_7
; %bb.6:
Lloh21:
	adrp	x8, _MACB_CAPS_FIFO_MODE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MACB_CAPS_FIFO_MODE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_7:
	ldr	x0, [x19, #8]
	ldr	w2, [x19]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_dev_dbg
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MACB_CAPS_MACB_IS_GEM,4,2      ; @MACB_CAPS_MACB_IS_GEM
	.comm	_DCFG1,4,2                      ; @DCFG1
	.comm	_IRQCOR,4,2                     ; @IRQCOR
	.comm	_MACB_CAPS_ISR_CLEAR_ON_WRITE,4,2 ; @MACB_CAPS_ISR_CLEAR_ON_WRITE
	.comm	_DCFG2,4,2                      ; @DCFG2
	.comm	_RX_PKT_BUFF,4,2                ; @RX_PKT_BUFF
	.comm	_TX_PKT_BUFF,4,2                ; @TX_PKT_BUFF
	.comm	_MACB_CAPS_FIFO_MODE,4,2        ; @MACB_CAPS_FIFO_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cadence caps 0x%08x\n"

	.comm	_DCFG5,4,2                      ; @DCFG5
	.comm	_HW_DMA_CAP_PTP,4,2             ; @HW_DMA_CAP_PTP
	.comm	_TSU,4,2                        ; @TSU
	.comm	_gem_ptp_info,4,2               ; @gem_ptp_info
	.no_dead_strip	_macb_configure_caps
.subsections_via_symbols
