	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iguanair_set_tx_carrier
_iguanair_set_tx_carrier:               ## @iguanair_set_tx_carrier
	.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
	movl	%esi, %ebx
	leal	-150001(%rbx), %eax
	cmpl	$-125002, %eax                  ## imm = 0xFFFE17B6
	ja	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movq	(%rdi), %r15
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	%ebx, (%r15)
	je	LBB0_4
## %bb.3:
	movl	%ebx, (%r15)
	addl	%ebx, %ebx
	movl	$24000000, %edi                 ## imm = 0x16E3600
	movl	%ebx, %esi
	callq	_DIV_ROUND_CLOSEST
                                        ## kill: def $eax killed $eax def $rax
	subl	4(%r15), %eax
	movl	%eax, %ecx
	negl	%ecx
	andl	$3, %ecx
	leal	(,%rcx,8), %edx
	movl	%ecx, %esi
	subl	%edx, %esi
	leal	(%rax,%rsi), %edx
	addl	$3, %edx
                                        ## kill: def $esi killed $esi killed $rsi
	addl	%eax, %esi
	cmovnsl	%esi, %edx
	sarl	$2, %edx
	addl	%ecx, %ecx
	movl	$8, %eax
	subl	%ecx, %eax
	movq	16(%r15), %rcx
	movl	%eax, (%rcx)
	movl	$110, %eax
	subl	%edx, %eax
	movl	%eax, 4(%rcx)
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_iguanair_set_tx_carrier
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iguanair_set_tx_carrier
_iguanair_set_tx_carrier:               ; @iguanair_set_tx_carrier
	.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
	sub	w8, w1, #36, lsl #12            ; =147456
	sub	w8, w8, #2545
	mov	w9, #6070
	movk	w9, #65534, lsl #16
	cmp	w8, w9
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	mov	x20, x1
	ldr	x21, [x0]
	add	x19, x21, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x21]
	cmp	w8, w20
	b.eq	LBB0_4
; %bb.3:
	str	w20, [x21]
	lsl	w1, w20, #1
	mov	w0, #13824
	movk	w0, #366, lsl #16
	bl	_DIV_ROUND_CLOSEST
	ldr	w8, [x21, #4]
	sub	w8, w0, w8
	neg	w9, w8
	and	w9, w9, #0x3
	sub	w10, w9, w9, lsl #3
	add	w8, w10, w8
	add	w10, w8, #3
	cmp	w8, #0
	csel	w8, w10, w8, lt
	mov	w10, #8
	sub	w9, w10, w9, lsl #1
	ldr	x10, [x21, #16]
	mov	w11, #110
	sub	w8, w11, w8, asr #2
	stp	w9, w8, [x10]
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
LBB0_5:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_iguanair_set_tx_carrier
.subsections_via_symbols
