	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function yealink_set_ringtone
_yealink_set_ringtone:                  ## @yealink_set_ringtone
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_CMD_RING_VOLUME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, 20(%rcx)
	movl	$1, (%rcx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movq	8(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_yealink_cmd
	movq	_CMD_RING_NOTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	decq	%r14
	je	LBB0_6
## %bb.3:
	addq	$4, -48(%rbp)                   ## 8-byte Folded Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %r13d
	subl	%r12d, %r13d
	cmpl	$8, %r13d
	movl	$8, %eax
	cmovael	%eax, %r13d
	movl	%r13d, (%rbx)
	movl	%r12d, %edi
	callq	_cpu_to_be16
	movl	%eax, 16(%rbx)
	movq	8(%rbx), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_yealink_cmd
	addl	%r12d, %r13d
	movq	%r13, %r15
	movl	%r13d, %r12d
	cmpq	%r13, %r14
	jne	LBB0_4
## %bb.5:
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_6:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CMD_RING_VOLUME,4,2            ## @CMD_RING_VOLUME
	.comm	_CMD_RING_NOTE,4,2              ## @CMD_RING_NOTE
	.no_dead_strip	_yealink_set_ringtone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function yealink_set_ringtone
_yealink_set_ringtone:                  ; @yealink_set_ringtone
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x2, LBB0_5
; %bb.1:
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh0:
	adrp	x8, _CMD_RING_VOLUME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_RING_VOLUME@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x20]
	str	w8, [x9, #20]
	mov	w8, #1
	str	w8, [x9]
	ldr	w8, [x19], #4
	ldr	x9, [x9, #8]
	str	w8, [x9]
	mov	x0, x20
	mov	x1, x21
	bl	_yealink_cmd
Lloh3:
	adrp	x8, _CMD_RING_NOTE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_RING_NOTE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x21, #20]
	subs	x24, x22, #1
	b.eq	LBB0_4
; %bb.2:
	mov	x26, #0
	mov	w22, #0
	mov	w25, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w24, w22
	cmp	w8, #8
	csel	w23, w8, w25, lo
	str	w23, [x21]
	mov	x0, x22
	bl	_cpu_to_be16
	str	w0, [x21, #16]
	ldr	x0, [x21, #8]
	add	x1, x19, x26, lsl #2
	mov	x2, x23
	bl	_memcpy
	mov	x0, x20
	mov	x1, x21
	bl	_yealink_cmd
	add	w26, w23, w22
	cmp	x24, x26
	mov	x22, x26
	b.ne	LBB0_3
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CMD_RING_VOLUME,4,2            ; @CMD_RING_VOLUME
	.comm	_CMD_RING_NOTE,4,2              ; @CMD_RING_NOTE
	.no_dead_strip	_yealink_set_ringtone
.subsections_via_symbols
