	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw2100_wx_set_rts
_ipw2100_wx_set_rts:                    ## @ipw2100_wx_set_rts
	.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	%rdx, %rbx
	callq	_libipw_priv
	cmpq	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_STATUS_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_3
## %bb.5:
	cmpq	$0, 16(%rbx)
	je	LBB0_10
## %bb.6:
	movq	_RTS_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	orl	4(%r15), %r12d
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_10:
	movl	8(%rbx), %r12d
	leal	-2305(%r12), %eax
	cmpl	$-2305, %eax                    ## imm = 0xF6FF
	ja	LBB0_7
## %bb.11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_7:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_ipw2100_set_rts_threshold
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_IPW_DEBUG_WX
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_STATUS_INITIALIZED,4,2         ## @STATUS_INITIALIZED
	.comm	_EIO,4,2                        ## @EIO
	.comm	_RTS_DISABLED,4,2               ## @RTS_DISABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SET RTS Threshold -> 0x%08X\n"

	.no_dead_strip	_ipw2100_wx_set_rts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw2100_wx_set_rts
_ipw2100_wx_set_rts:                    ; @ipw2100_wx_set_rts
	.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	x21, x2
	bl	_libipw_priv
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _STATUS_INITIALIZED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STATUS_INITIALIZED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	w8, [x20, #4]
Lloh3:
	adrp	x9, _RTS_DISABLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RTS_DISABLED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w21, w9, w8
	b	LBB0_9
LBB0_4:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_5:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldr	w21, [x21, #8]
	sub	w8, w21, #2305
	cmn	w8, #2305
	b.hi	LBB0_9
; %bb.7:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	mov	x1, x21
	bl	_ipw2100_set_rts_threshold
	mov	x20, x0
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_IPW_DEBUG_WX
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_STATUS_INITIALIZED,4,2         ; @STATUS_INITIALIZED
	.comm	_EIO,4,2                        ; @EIO
	.comm	_RTS_DISABLED,4,2               ; @RTS_DISABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SET RTS Threshold -> 0x%08X\n"

	.no_dead_strip	_ipw2100_wx_set_rts
.subsections_via_symbols
