	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setsamplerate
_setsamplerate:                         ## @setsamplerate
	.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
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_CMDRET_ZERO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movzbl	(%rsi), %esi
	movzbl	1(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_snd_printdd
	movl	%r12d, %eax
	shll	$16, %eax
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	cmpl	$48000, %r12d                   ## imm = 0xBB80
	movl	$-1149304832, %ecx              ## imm = 0xBB7F0000
	cmovnel	%eax, %ecx
	movslq	%ecx, %r12
	imulq	$91625969, %r12, %r13           ## imm = 0x57619F1
	movq	%r13, %rax
	shrq	$63, %rax
	sarq	$42, %r13
	addl	%eax, %r13d
	imull	$48000, %r13d, %eax             ## imm = 0xBB80
	subl	%eax, %r12d
	jmp	LBB0_1
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	incl	%r14d
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_MAX_WRITE_RETRY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	leal	1(%r14), %eax
	testl	%r14d, %r14d
	movl	%eax, %r14d
	jg	LBB0_12
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movb	(%rbx), %al
	cmpb	$-1, %al
	je	LBB0_11
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movzbl	%al, %esi
	movq	%r15, %rdi
	movl	$48000, %edx                    ## imm = 0xBB80
	movl	%r13d, %ecx
	movl	%r12d, %r8d
	callq	_SEND_SSRC
	movzbl	(%rbx), %esi
	movq	%r15, %rdi
	leaq	-48(%rbp), %rdx
	callq	_SEND_RSRC
	movq	-48(%rbp), %rax
	cmpl	$48000, 4(%rax)                 ## imm = 0xBB80
	je	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r13d, 8(%rax)
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	%r12d, 12(%rax)
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_MAX_WRITE_RETRY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movzbl	(%rbx), %esi
	movq	%r15, %rdi
	movl	$48000, %edx                    ## imm = 0xBB80
	movl	%r13d, %ecx
	movl	%r12d, %r8d
	callq	_SEND_SSRC
	movzbl	(%rbx), %esi
	movq	%r15, %rdi
	leaq	-48(%rbp), %rdx
	callq	_SEND_RSRC
	movq	-48(%rbp), %rax
	incl	%r14d
	cmpl	$48000, 4(%rax)                 ## imm = 0xBB80
	jne	LBB0_4
	jmp	LBB0_9
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_10:
	movzbl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_snd_printdd
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMDRET_ZERO,8,3                ## @CMDRET_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setsamplerate intdec: %d,%d rate: %d\n"

	.comm	_MAX_WRITE_RETRY,4,2            ## @MAX_WRITE_RETRY
L_.str.1:                               ## @.str.1
	.asciz	"sent samplerate %d: %d failed\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_setsamplerate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setsamplerate
_setsamplerate:                         ; @setsamplerate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _CMDRET_ZERO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMDRET_ZERO@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldrb	w1, [x1]
	ldrb	w2, [x20, #1]
	stp	x19, x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printdd
	mov	w24, #0
	lsl	w8, w19, #16
	mov	w25, #48000
	mov	w9, #-1149304832
	cmp	w19, w25
	csel	w8, w9, w8, eq
	mov	w9, #6641
	movk	w9, #1398, lsl #16
	smull	x9, w8, w9
	lsr	x10, x9, #63
	asr	x9, x9, #42
	add	w22, w9, w10
	msub	w23, w22, w25, w8
Lloh5:
	adrp	x26, _MAX_WRITE_RETRY@GOTPAGE
Lloh6:
	ldr	x26, [x26, _MAX_WRITE_RETRY@GOTPAGEOFF]
	b	LBB0_4
LBB0_1:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w24, w24, #1
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	cmp	w24, w8
	b.eq	LBB0_11
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	add	w8, w24, #1
	cmp	w24, #1
	mov	x24, x8
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldrb	w1, [x20]
	cmp	w1, #255
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	w2, #48000
	mov	x3, x22
	mov	x4, x23
	bl	_SEND_SSRC
	ldrb	w1, [x20]
	add	x2, sp, #8
	mov	x0, x21
	bl	_SEND_RSRC
	ldr	x8, [sp, #8]
	ldr	w9, [x8, #4]
	cmp	w9, w25
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [x8, #8]
	cmp	w9, w22
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x8, #12]
	cmp	w8, w23
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x26]
	cmp	w24, w8
	b.ge	LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	ldrb	w1, [x20]
	mov	x0, x21
	mov	w2, #48000
	mov	x3, x22
	mov	x4, x23
	bl	_SEND_SSRC
	ldrb	w1, [x20]
	add	x2, sp, #8
	mov	x0, x21
	bl	_SEND_RSRC
	ldr	x8, [sp, #8]
	ldr	w9, [x8, #4]
	add	w24, w24, #1
	cmp	w9, w25
	b.ne	LBB0_6
	b	LBB0_2
LBB0_10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
	ldrb	w1, [x20]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_snd_printdd
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CMDRET_ZERO,8,3                ; @CMDRET_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setsamplerate intdec: %d,%d rate: %d\n"

	.comm	_MAX_WRITE_RETRY,4,2            ; @MAX_WRITE_RETRY
l_.str.1:                               ; @.str.1
	.asciz	"sent samplerate %d: %d failed\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_setsamplerate
.subsections_via_symbols
