	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_set_tx_power
_iwl_set_tx_power:                      ## @iwl_set_tx_power
	.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
	movq	_IWL_TX_POWER_CALIB_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, (%rdi)
	jne	LBB0_20
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	48(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_IWL_RXON_CTX_BSS@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	addq	$40, %rdi
	callq	_lockdep_assert_held
	testl	%r15d, %r15d
	jne	LBB0_3
## %bb.2:
	cmpq	%r14, 8(%r12)
	je	LBB0_20
LBB0_3:
	movq	_IWLAGN_TX_POWER_TARGET_POWER_MIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%r14, %rcx
	jle	LBB0_6
## %bb.4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_6:
	movq	32(%r12), %rax
	movq	(%rax), %rdi
	movl	$2, %esi
	callq	_DIV_ROUND_UP
	cmpq	%r14, %rax
	jge	LBB0_8
## %bb.7:
	movq	32(%r12), %rax
	movq	(%rax), %rcx
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_IWL_WARN
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r12, %rdi
	callq	_iwl_is_ready_rf
	testl	%eax, %eax
	je	LBB0_9
## %bb.11:
	movq	%r14, 16(%r12)
	movq	_STATUS_SCANNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r12), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_9:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r13,8), %rdi
	addq	$4, %rdi
	leaq	(%rax,%r13,8), %rsi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	sete	%al
LBB0_14:
	testl	%r15d, %r15d
	jne	LBB0_17
## %bb.15:
	testb	%al, %al
	jne	LBB0_17
## %bb.16:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_IWL_DEBUG_INFO
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_17:
	movq	8(%r12), %r15
	movq	%r14, 8(%r12)
	movq	%r12, %rdi
	callq	_iwlagn_send_tx_power
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:
	movl	%eax, %ebx
	movq	%r15, 8(%r12)
	movq	%r15, 16(%r12)
	jmp	LBB0_20
LBB0_18:
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_RXON_CTX_BSS,8,3           ## @IWL_RXON_CTX_BSS
	.comm	_IWL_TX_POWER_CALIB_DISABLED,4,2 ## @IWL_TX_POWER_CALIB_DISABLED
	.comm	_IWLAGN_TX_POWER_TARGET_POWER_MIN,8,3 ## @IWLAGN_TX_POWER_TARGET_POWER_MIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Requested user TXPOWER %d below lower limit %d.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Requested user TXPOWER %d above upper limit %d.\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_STATUS_SCANNING,4,2            ## @STATUS_SCANNING
L_.str.2:                               ## @.str.2
	.asciz	"Deferring tx power set\n"

	.no_dead_strip	_iwl_set_tx_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_set_tx_power
_iwl_set_tx_power:                      ; @iwl_set_tx_power
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _IWL_TX_POWER_CALIB_DISABLED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IWL_TX_POWER_CALIB_DISABLED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.1:
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #48]
Lloh3:
	adrp	x8, _IWL_RXON_CTX_BSS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IWL_RXON_CTX_BSS@GOTPAGEOFF]
Lloh5:
	ldr	x23, [x8]
	add	x0, x0, #40
	bl	_lockdep_assert_held
	cbnz	w21, LBB0_5
; %bb.2:
	ldr	x8, [x19, #8]
	cmp	x8, x20
	b.ne	LBB0_5
LBB0_3:
	mov	w0, #0
LBB0_4:
	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
LBB0_5:
Lloh6:
	adrp	x8, _IWLAGN_TX_POWER_TARGET_POWER_MIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IWLAGN_TX_POWER_TARGET_POWER_MIN@GOTPAGEOFF]
Lloh8:
	ldr	x3, [x8]
	cmp	x3, x20
	b.le	LBB0_7
; %bb.6:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_7:
	ldr	x8, [x19, #32]
	ldr	x0, [x8]
	mov	w1, #2
	bl	_DIV_ROUND_UP
	cmp	x0, x20
	b.ge	LBB0_11
; %bb.8:
	ldr	x8, [x19, #32]
	ldr	x3, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x19
	mov	x2, x20
	bl	_IWL_WARN
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_11:
	mov	x0, x19
	bl	_iwl_is_ready_rf
	cbz	w0, LBB0_14
; %bb.12:
	str	x20, [x19, #16]
Lloh15:
	adrp	x8, _STATUS_SCANNING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _STATUS_SCANNING@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	add	x1, x19, #24
	bl	_test_bit
	cbz	x0, LBB0_15
; %bb.13:
	mov	w8, #0
	b	LBB0_16
LBB0_14:
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_10
LBB0_15:
	add	x1, x22, x23, lsl #3
	add	x0, x1, #4
	mov	w2, #4
	bl	_memcmp
	cmp	x0, #0
	cset	w8, eq
LBB0_16:
	cbnz	w21, LBB0_19
; %bb.17:
	tbnz	w8, #0, LBB0_19
; %bb.18:
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_INFO
	mov	w0, #0
	b	LBB0_4
LBB0_19:
	ldr	x21, [x19, #8]
	str	x20, [x19, #8]
	mov	x0, x19
	bl	_iwlagn_send_tx_power
	cbz	w0, LBB0_4
; %bb.20:
	stp	x21, x21, [x19, #8]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_RXON_CTX_BSS,8,3           ; @IWL_RXON_CTX_BSS
	.comm	_IWL_TX_POWER_CALIB_DISABLED,4,2 ; @IWL_TX_POWER_CALIB_DISABLED
	.comm	_IWLAGN_TX_POWER_TARGET_POWER_MIN,8,3 ; @IWLAGN_TX_POWER_TARGET_POWER_MIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Requested user TXPOWER %d below lower limit %d.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Requested user TXPOWER %d above upper limit %d.\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_STATUS_SCANNING,4,2            ; @STATUS_SCANNING
l_.str.2:                               ; @.str.2
	.asciz	"Deferring tx power set\n"

	.no_dead_strip	_iwl_set_tx_power
.subsections_via_symbols
