	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar5523_get_max_rxsz
_ar5523_get_max_rxsz:                   ## @ar5523_get_max_rxsz
	.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
	movq	_ST_WDC_TRANSPORT_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movl	$4, %ecx
	callq	_ar5523_get_status
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ar5523_err
	jmp	LBB0_6
LBB0_2:
	movl	-28(%rbp), %edi
	callq	_be32_to_cpu
	movl	%eax, (%rbx)
	movq	_AR5523_SANE_RXBUFSZ@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	cmpl	%edx, %eax
	jle	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ar5523_err
	movl	(%r15), %eax
	movl	%eax, (%rbx)
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ar5523_dbg
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ST_WDC_TRANSPORT_CHUNK_SIZE,4,2 ## @ST_WDC_TRANSPORT_CHUNK_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not read max RX size\n"

	.comm	_AR5523_SANE_RXBUFSZ,4,2        ## @AR5523_SANE_RXBUFSZ
L_.str.1:                               ## @.str.1
	.asciz	"Bad rxbufsz from device. Using %d instead\n"

L_.str.2:                               ## @.str.2
	.asciz	"Max RX buf size: %d\n"

	.no_dead_strip	_ar5523_get_max_rxsz
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar5523_get_max_rxsz
_ar5523_get_max_rxsz:                   ; @ar5523_get_max_rxsz
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _ST_WDC_TRANSPORT_CHUNK_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ST_WDC_TRANSPORT_CHUNK_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	w3, #4
	bl	_ar5523_get_status
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ar5523_err
	b	LBB0_5
LBB0_2:
	ldr	w0, [sp, #12]
	bl	_be32_to_cpu
	mov	x2, x0
	str	w0, [x19]
Lloh5:
	adrp	x21, _AR5523_SANE_RXBUFSZ@GOTPAGE
Lloh6:
	ldr	x21, [x21, _AR5523_SANE_RXBUFSZ@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w0, #0
	ccmp	w0, w8, #0, ne
	b.le	LBB0_4
; %bb.3:
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ar5523_err
	ldr	w2, [x21]
	str	w2, [x19]
LBB0_4:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ar5523_dbg
LBB0_5:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ST_WDC_TRANSPORT_CHUNK_SIZE,4,2 ; @ST_WDC_TRANSPORT_CHUNK_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not read max RX size\n"

	.comm	_AR5523_SANE_RXBUFSZ,4,2        ; @AR5523_SANE_RXBUFSZ
l_.str.1:                               ; @.str.1
	.asciz	"Bad rxbufsz from device. Using %d instead\n"

l_.str.2:                               ; @.str.2
	.asciz	"Max RX buf size: %d\n"

	.no_dead_strip	_ar5523_get_max_rxsz
.subsections_via_symbols
