	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _phy_convert_txpower_dbm_to_relative_value
__phy_convert_txpower_dbm_to_relative_value: ## @_phy_convert_txpower_dbm_to_relative_value
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %r8d
	movl	%r8d, %r9d
	shrl	$24, %r9d
	cmpl	$3, %esi
	jg	LBB0_3
## %bb.1:
	cmpl	$3, %edx
	jl	LBB0_3
## %bb.2:
	andl	$15, %r9d
	movl	%r8d, %eax
	shrl	$28, %eax
	leal	(%rax,%rax,4), %eax
	leal	(%r9,%rax,2), %r9d
	movl	%r9d, %eax
	subl	%ecx, %eax
	negl	%eax
	subl	%ecx, %r9d
	cmovlel	%eax, %r9d
LBB0_3:
	movl	%r8d, %r10d
	shrl	$16, %r10d
	cmpl	$2, %esi
	jg	LBB0_6
## %bb.4:
	cmpl	$2, %edx
	jl	LBB0_6
## %bb.5:
	andl	$15, %r10d
	movl	%r8d, %eax
	shrl	$20, %eax
	andl	$15, %eax
	leal	(%rax,%rax,4), %eax
	leal	(%r10,%rax,2), %r10d
	movl	%r10d, %eax
	subl	%ecx, %eax
	negl	%eax
	subl	%ecx, %r10d
	cmovlel	%eax, %r10d
	jmp	LBB0_7
LBB0_6:
	movzbl	%r10b, %r10d
LBB0_7:
	movl	%r8d, %r11d
	shrl	$8, %r11d
	cmpl	$1, %esi
	jg	LBB0_10
## %bb.8:
	testl	%edx, %edx
	jle	LBB0_10
## %bb.9:
	andl	$15, %r11d
	movl	%r8d, %eax
	shrl	$12, %eax
	andl	$15, %eax
	leal	(%rax,%rax,4), %eax
	leal	(%r11,%rax,2), %eax
	movl	%eax, %r11d
	subl	%ecx, %r11d
	negl	%r11d
	subl	%ecx, %eax
	cmovlel	%r11d, %eax
	testl	%esi, %esi
	jle	LBB0_12
	jmp	LBB0_14
LBB0_10:
	movzbl	%r11b, %eax
	testl	%esi, %esi
	jg	LBB0_14
LBB0_12:
	testl	%edx, %edx
	js	LBB0_14
## %bb.13:
	movl	%r8d, %edx
	andl	$15, %edx
	shrl	$4, %r8d
	andl	$15, %r8d
	leal	(%r8,%r8,4), %esi
	leal	(%rdx,%rsi,2), %edx
	movl	%edx, %esi
	subl	%ecx, %esi
	negl	%esi
	subl	%ecx, %edx
	cmovlel	%esi, %edx
	jmp	LBB0_15
LBB0_14:
	movzbl	%r8b, %edx
LBB0_15:
	shll	$16, %r9d
	shll	$8, %r10d
	orl	%r9d, %r10d
	orl	%r10d, %eax
	shll	$8, %eax
	orl	%edx, %eax
	movl	%eax, (%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	__phy_convert_txpower_dbm_to_relative_value
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _phy_convert_txpower_dbm_to_relative_value
__phy_convert_txpower_dbm_to_relative_value: ; @_phy_convert_txpower_dbm_to_relative_value
	.cfi_startproc
; %bb.0:
	ldr	w9, [x0]
	lsr	w8, w9, #24
	ubfx	w10, w9, #24, #4
	lsr	w11, w9, #28
	mov	w12, #10
	madd	w10, w11, w12, w10
	sub	w11, w3, w10
	subs	w10, w10, w3
	csel	w10, w10, w11, gt
	cmp	w2, #3
	csel	w10, w8, w10, lt
	cmp	w1, #3
	csel	w8, w8, w10, gt
	b.ge	LBB0_3
; %bb.1:
	cmp	w2, #2
	b.lt	LBB0_3
; %bb.2:
	ubfx	w10, w9, #16, #4
	ubfx	w11, w9, #20, #4
	mov	w12, #10
	madd	w10, w11, w12, w10
	sub	w11, w3, w10
	subs	w10, w10, w3
	csel	w10, w10, w11, gt
	cmp	w1, #1
	b.le	LBB0_4
	b	LBB0_6
LBB0_3:
	ubfx	w10, w9, #16, #8
	cmp	w1, #1
	b.gt	LBB0_6
LBB0_4:
	cmp	w2, #1
	b.lt	LBB0_6
; %bb.5:
	ubfx	w11, w9, #8, #4
	ubfx	w12, w9, #12, #4
	mov	w13, #10
	madd	w11, w12, w13, w11
	sub	w12, w3, w11
	subs	w11, w11, w3
	csel	w11, w11, w12, gt
	cmp	w1, #0
	b.le	LBB0_7
	b	LBB0_9
LBB0_6:
	ubfx	w11, w9, #8, #8
	cmp	w1, #0
	b.gt	LBB0_9
LBB0_7:
	tbnz	w2, #31, LBB0_9
; %bb.8:
	and	w12, w9, #0xf
	ubfx	w9, w9, #4, #4
	mov	w13, #10
	madd	w9, w9, w13, w12
	sub	w12, w3, w9
	subs	w9, w9, w3
	csel	w9, w9, w12, gt
	b	LBB0_10
LBB0_9:
	and	w9, w9, #0xff
LBB0_10:
	lsl	w8, w8, #16
	orr	w8, w8, w10, lsl #8
	orr	w8, w11, w8
	orr	w8, w9, w8, lsl #8
	str	w8, [x0]
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	__phy_convert_txpower_dbm_to_relative_value
.subsections_via_symbols
