	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il3945_hw_reg_set_txpower      ## -- Begin function il3945_hw_reg_set_txpower
	.p2align	4, 0x90
_il3945_hw_reg_set_txpower:             ## @il3945_hw_reg_set_txpower
	.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	%rsi, %rbx
	cmpq	%rsi, (%rdi)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_D_POWER
	jmp	LBB0_8
LBB0_2:
	movq	%rdi, %r15
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_D_POWER
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, (%r15)
	cmpq	$0, 8(%r15)
	je	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	addq	$8, %rbx
	cmpq	8(%r15), %r13
	jae	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %r14
	leaq	(%r14,%rbx), %r12
	movq	%r12, %rdi
	callq	_il3945_hw_reg_get_ch_txpower_limit
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	callq	_min
	cmpq	(%r14,%rbx), %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, (%r12)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_il3945_hw_reg_set_new_power
	jmp	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	callq	_il3945_is_temp_calib_needed
	movq	%r15, %rdi
	callq	_il3945_hw_reg_comp_txpower_temp
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Requested Tx power same as current limit: %ddBm.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Setting upper limit clamp to %ddBm.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il3945_hw_reg_set_txpower      ; -- Begin function il3945_hw_reg_set_txpower
	.p2align	2
_il3945_hw_reg_set_txpower:             ; @il3945_hw_reg_set_txpower
	.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	x20, x1
	ldr	x8, [x0]
	cmp	x8, x1
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_D_POWER
	b	LBB0_8
LBB0_2:
	mov	x19, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_D_POWER
	str	x20, [x19]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.3:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	ldr	x8, [x19, #8]
	add	x22, x22, #8
	cmp	x23, x8
	b.hs	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x21, x8, x22
	mov	x0, x21
	bl	_il3945_hw_reg_get_ch_txpower_limit
	mov	x1, x0
	mov	x0, x20
	bl	_min
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x0, [x21]
	mov	x0, x19
	mov	x1, x21
	bl	_il3945_hw_reg_set_new_power
	b	LBB0_4
LBB0_7:
	mov	x0, x19
	bl	_il3945_is_temp_calib_needed
	mov	x0, x19
	bl	_il3945_hw_reg_comp_txpower_temp
LBB0_8:
	mov	w0, #0
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Requested Tx power same as current limit: %ddBm.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Setting upper limit clamp to %ddBm.\n"

.subsections_via_symbols
