	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcxhr_clock_type_put
_pcxhr_clock_type_put:                  ## @pcxhr_clock_type_put
	.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, %r12
	callq	_snd_kcontrol_chip
	movq	%rax, %r13
	movq	%rax, %r14
	cmpq	$0, 32(%rax)
	je	LBB0_1
## %bb.2:
	movl	24(%r14), %eax
	cmpl	$1, 20(%r14)
	adcl	$2, %eax
	jmp	LBB0_3
LBB0_1:
	movl	$2, %eax
LBB0_3:
	movq	(%r12), %rcx
	cmpl	%eax, (%rcx)
	jae	LBB0_4
## %bb.5:
	leaq	12(%r13), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	cmpq	%rax, (%r14)
	je	LBB0_12
## %bb.6:
	addq	$16, %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	movl	(%rax), %esi
	movq	%rsi, (%r14)
	movl	$0, -44(%rbp)
	movq	_PCXHR_CLOCK_TYPE_INTERNAL@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_8
## %bb.7:
	movl	8(%r14), %eax
	testl	%eax, %eax
	movl	$48000, %esi                    ## imm = 0xBB80
	cmovnel	%eax, %esi
	movl	%esi, -44(%rbp)
	jmp	LBB0_9
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_8:
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pcxhr_get_external_clock
	movl	-44(%rbp), %esi
	testl	%esi, %esi
	je	LBB0_11
LBB0_9:
	movq	%r14, %rdi
	callq	_pcxhr_set_clock
	cmpl	$0, 8(%r14)
	je	LBB0_11
## %bb.10:
	movl	-44(%rbp), %eax
	movl	%eax, 8(%r14)
LBB0_11:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	$1, %ebx
LBB0_12:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCXHR_CLOCK_TYPE_INTERNAL,8,3  ## @PCXHR_CLOCK_TYPE_INTERNAL
	.no_dead_strip	_pcxhr_clock_type_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcxhr_clock_type_put
_pcxhr_clock_type_put:                  ; @pcxhr_clock_type_put
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x22, x1
	bl	_snd_kcontrol_chip
	mov	x19, x0
	ldr	x9, [x0, #32]
	mov	w8, #2
	cbz	x9, LBB0_2
; %bb.1:
	ldp	w10, w9, [x19, #20]
	cmp	w10, #0
	cinc	w8, w8, eq
	add	w8, w8, w9
LBB0_2:
	ldr	x9, [x22]
	ldr	w9, [x9]
	cmp	w9, w8
	b.hs	LBB0_5
; %bb.3:
	add	x20, x19, #12
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19]
	ldr	x9, [x22]
	ldr	w9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	mov	w19, #0
	b	LBB0_12
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_13
LBB0_6:
	add	x21, x19, #16
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x22]
	ldr	w1, [x8]
	str	x1, [x19]
	str	wzr, [sp, #12]
Lloh3:
	adrp	x8, _PCXHR_CLOCK_TYPE_INTERNAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCXHR_CLOCK_TYPE_INTERNAL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_8
; %bb.7:
	ldr	w8, [x19, #8]
	mov	w9, #48000
	cmp	w8, #0
	csel	w1, w9, w8, eq
	str	w1, [sp, #12]
	b	LBB0_9
LBB0_8:
	add	x2, sp, #12
	mov	x0, x19
	bl	_pcxhr_get_external_clock
	ldr	w1, [sp, #12]
	cbz	w1, LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_pcxhr_set_clock
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_11
; %bb.10:
	ldr	w8, [sp, #12]
	str	w8, [x19, #8]
LBB0_11:
	mov	x0, x21
	bl	_mutex_unlock
	mov	w19, #1
LBB0_12:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCXHR_CLOCK_TYPE_INTERNAL,8,3  ; @PCXHR_CLOCK_TYPE_INTERNAL
	.no_dead_strip	_pcxhr_clock_type_put
.subsections_via_symbols
