	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfa_nw_ioc_smem_read
_bfa_nw_ioc_smem_read:                  ## @bfa_nw_ioc_smem_read
	.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
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movl	12(%rdi), %edi
	movl	%edx, %esi
	callq	_PSS_SMEM_PGNUM
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_PSS_SMEM_PGOFF
	movl	%eax, %ebx
	movl	(%r13), %edi
	callq	_bfa_nw_ioc_sem_get
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	4(%r13), %esi
	movl	%r12d, %edi
	callq	_writel
	cmpl	$4, %r14d
	jl	LBB0_7
## %bb.3:
	shrl	$2, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	cmpq	%r15, %r14
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r13), %edi
	addl	%ebx, %edi
	callq	_readl
	movl	%eax, %edi
	callq	_swab32
	movl	%eax, %edi
	callq	_be32_to_cpu
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r15,4)
	addl	$4, %ebx
	movl	%ebx, %edi
	callq	_PSS_SMEM_PGOFF
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%r12d
	movl	4(%r13), %esi
	movl	%r12d, %edi
	callq	_writel
	jmp	LBB0_6
LBB0_7:
	movl	12(%r13), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_PSS_SMEM_PGNUM
	movl	4(%r13), %esi
	movl	%eax, %edi
	callq	_writel
	movl	(%r13), %edi
	callq	_readl
	movl	(%r13), %esi
	movl	$1, %edi
	callq	_writel
	jmp	LBB0_8
LBB0_1:
	movl	$1, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_bfa_nw_ioc_smem_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfa_nw_ioc_smem_read
_bfa_nw_ioc_smem_read:                  ; @bfa_nw_ioc_smem_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #12]
	mov	x1, x2
	bl	_PSS_SMEM_PGNUM
	mov	x21, x0
	mov	x0, x22
	bl	_PSS_SMEM_PGOFF
	mov	x22, x0
	ldr	w0, [x19]
	bl	_bfa_nw_ioc_sem_get
	cbz	w0, LBB0_7
; %bb.1:
	ldr	w1, [x19, #4]
	mov	x0, x21
	bl	_writel
	cmp	w23, #4
	b.lt	LBB0_6
; %bb.2:
	lsr	w23, w23, #2
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #4
	subs	x23, x23, #1
	b.eq	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #8]
	add	w0, w8, w22
	bl	_readl
	bl	_swab32
	bl	_be32_to_cpu
	str	w0, [x20]
	add	w0, w22, #4
	bl	_PSS_SMEM_PGOFF
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w21, w21, #1
	ldr	w1, [x19, #4]
	mov	x0, x21
	bl	_writel
	b	LBB0_3
LBB0_6:
	ldr	w0, [x19, #12]
	mov	w1, #0
	bl	_PSS_SMEM_PGNUM
	ldr	w1, [x19, #4]
	bl	_writel
	ldr	w0, [x19]
	bl	_readl
	ldr	w1, [x19]
	mov	w0, #1
	bl	_writel
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	w0, #1
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_bfa_nw_ioc_smem_read
.subsections_via_symbols
