	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_rcb_get_cfg                ## -- Begin function hns_rcb_get_cfg
	.p2align	4, 0x90
_hns_rcb_get_cfg:                       ## @hns_rcb_get_cfg
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	callq	_hns_rcb_get_base_irq_idx
	movl	%eax, %r15d
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	callq	_to_platform_device
	movq	%rax, %r12
	movq	16(%rbx), %rax
	movl	4(%rax), %edi
	callq	_AE_IS_VER1
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	testq	%r14, %r14
	je	LBB0_8
## %bb.1:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leal	1(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	movq	%r15, %rax
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
                                        ## kill: def $r15d killed $r15d killed $r15 def $r15
	xorl	%r12d, %r12d
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %r14
	movq	%rbx, 40(%r14,%r13)
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r14,%r13)
	movq	%r12, (%r14,%r13)
	movl	12(%rbx), %edi
	movq	%r12, %rsi
	callq	_RCB_COMM_BASE_TO_RING_BASE
	movq	%rax, 24(%r14,%r13)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_hns_rcb_get_port_in_comm
	movl	%eax, 32(%r14,%r13)
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_platform_get_irq
	leaq	(%r14,%r13), %rcx
	addq	$8, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r14,%r13), %rcx
	movq	_HNS_RCB_IRQ_IDX_TX@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	incl	%r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	(%r12,%r12,2), %r15d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_platform_get_irq
	leaq	(%r12,%r12,2), %rcx
	shlq	$4, %rcx
	addq	%r14, %rcx
	addq	$8, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r14,%r13), %rcx
	movq	_HNS_RCB_IRQ_IDX_TX@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	addl	-80(%rbp), %r15d                ## 4-byte Folded Reload
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_platform_get_irq
	movq	%rax, %rcx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	movq	_HNS_RCB_IRQ_IDX_RX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ecx, (%rdx,%rax,4)
	movq	(%rbx), %rsi
	xorl	%eax, %eax
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rdi
	subl	(%rdi), %eax
	cmpl	%eax, (%rdx,%rsi,4)
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%eax, %ecx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r14,%r13), %r15
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %edi
	movq	%r12, %rsi
	callq	_RCB_COMM_BASE_TO_RING_BASE
	movq	%rax, 16(%r14,%r13)
	movq	%r15, %rdi
	callq	_hns_rcb_ring_pair_get_cfg
	incq	%r12
	addq	$48, %r13
	movq	-104(%rbp), %r15                ## 8-byte Reload
	addl	$2, %r15d
	addl	$3, -44(%rbp)                   ## 4-byte Folded Spill
	cmpq	%r12, -96(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_2
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HNS_RCB_IRQ_IDX_TX,8,3         ## @HNS_RCB_IRQ_IDX_TX
	.comm	_HNS_RCB_IRQ_IDX_RX,8,3         ## @HNS_RCB_IRQ_IDX_RX
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_rcb_get_cfg                ; -- Begin function hns_rcb_get_cfg
	.p2align	2
_hns_rcb_get_cfg:                       ; @hns_rcb_get_cfg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x20, [x0]
	bl	_hns_rcb_get_base_irq_idx
	mov	x25, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_to_platform_device
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #4]
	bl	_AE_IS_VER1
	str	w0, [sp, #28]                   ; 4-byte Folded Spill
	str	x20, [sp, #16]                  ; 8-byte Folded Spill
	cbz	x20, LBB0_7
; %bb.1:
	mov	x28, #0
	mov	x23, #0
	add	w24, w25, #1
Lloh0:
	adrp	x21, _HNS_RCB_IRQ_IDX_TX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HNS_RCB_IRQ_IDX_TX@GOTPAGEOFF]
	str	w25, [sp, #4]                   ; 4-byte Folded Spill
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x27, [x19, #16]
	add	x26, x27, x28
	str	x19, [x26, #40]
	ldr	w8, [x8]
	str	w8, [x26, #36]
	str	x23, [x26]
	ldr	w0, [x19, #12]
	mov	x1, x23
	bl	_RCB_COMM_BASE_TO_RING_BASE
	str	x0, [x26, #24]
	mov	x0, x19
	mov	x1, x23
	bl	_hns_rcb_get_port_in_comm
	str	w0, [x26, #32]
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x25
	bl	_platform_get_irq
	mov	x22, x26
	ldr	x8, [x22, #8]!
	ldr	x9, [x21]
	str	w0, [x8, x9, lsl #2]
	add	w1, w25, #1
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w23, w23, lsl #1
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x24
	bl	_platform_get_irq
	mov	w8, #48
	madd	x8, x23, x8, x27
	add	x22, x8, #8
	ldr	x8, [x26, #8]
	ldr	x9, [x21]
	str	w0, [x8, x9, lsl #2]
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	add	w1, w20, w8
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_platform_get_irq
	mov	x8, x0
	ldr	x9, [x22]
Lloh2:
	adrp	x10, _HNS_RCB_IRQ_IDX_RX@GOTPAGE
Lloh3:
	ldr	x10, [x10, _HNS_RCB_IRQ_IDX_RX@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
	ldr	x10, [x21]
	ldr	w9, [x9, x10, lsl #2]
Lloh5:
	adrp	x10, _EPROBE_DEFER@GOTPAGE
Lloh6:
	ldr	x10, [x10, _EPROBE_DEFER@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	neg	w0, w10
	cmn	w9, w10
	ccmp	w8, w0, #4, ne
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #8]
	mov	x1, x23
	bl	_RCB_COMM_BASE_TO_RING_BASE
	add	x8, x27, x28
	str	x0, [x8, #16]
	mov	x0, x26
	bl	_hns_rcb_ring_pair_get_cfg
	add	x23, x23, #1
	add	x28, x28, #48
	add	w25, w25, #2
	add	w24, w24, #3
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	cmp	x8, x23
	b.ne	LBB0_2
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HNS_RCB_IRQ_IDX_TX,8,3         ; @HNS_RCB_IRQ_IDX_TX
	.comm	_HNS_RCB_IRQ_IDX_RX,8,3         ; @HNS_RCB_IRQ_IDX_RX
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
.subsections_via_symbols
