	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcxhr_sub_get_external_clock
_pcxhr_sub_get_external_clock:          ## @pcxhr_sub_get_external_clock
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	addl	$-137, %esi
	cmpl	$6, %esi
	jae	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %r15
	movslq	%esi, %rax
	leaq	l_switch.table.pcxhr_sub_get_external_clock(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movb	(%rax), %r12b
	movq	_CMD_ACCESS_IO_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	callq	_pcxhr_init_rmh
	movl	$2, -56(%rbp)
	movq	_IO_NUM_REG_STATUS@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	-48(%rbp), %rcx
	orb	%al, (%rcx)
	cmpb	%r12b, (%r15)
	je	LBB0_5
## %bb.3:
	movq	-48(%rbp), %rax
	movb	%r12b, 1(%rax)
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_pcxhr_send_msg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movl	$100, %edi
	callq	_udelay
	movb	%r12b, (%r15)
LBB0_5:
	movq	_REG_STATUS_CURRENT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	-48(%rbp), %rcx
	movb	%al, 1(%rcx)
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_pcxhr_send_msg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_snd_printdd
	movl	$0, (%r14)
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_STATUS_WORD_CLOCK,1,0      ## @REG_STATUS_WORD_CLOCK
	.comm	_REG_STATUS_AES_SYNC,1,0        ## @REG_STATUS_AES_SYNC
	.comm	_REG_STATUS_AES_1,1,0           ## @REG_STATUS_AES_1
	.comm	_REG_STATUS_AES_2,1,0           ## @REG_STATUS_AES_2
	.comm	_REG_STATUS_AES_3,1,0           ## @REG_STATUS_AES_3
	.comm	_REG_STATUS_AES_4,1,0           ## @REG_STATUS_AES_4
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CMD_ACCESS_IO_READ,4,2         ## @CMD_ACCESS_IO_READ
	.comm	_IO_NUM_REG_STATUS,1,0          ## @IO_NUM_REG_STATUS
	.comm	_REG_STATUS_CURRENT,1,0         ## @REG_STATUS_CURRENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"External clock is at %d Hz\n"

	.no_dead_strip	_pcxhr_sub_get_external_clock
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.pcxhr_sub_get_external_clock
l_switch.table.pcxhr_sub_get_external_clock:
	.quad	_REG_STATUS_WORD_CLOCK
	.quad	_REG_STATUS_AES_SYNC
	.quad	_REG_STATUS_AES_4
	.quad	_REG_STATUS_AES_3
	.quad	_REG_STATUS_AES_2
	.quad	_REG_STATUS_AES_1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcxhr_sub_get_external_clock
_pcxhr_sub_get_external_clock:          ; @pcxhr_sub_get_external_clock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	sub	w8, w1, #137
	cmp	w8, #6
	b.hs	LBB0_6
; %bb.1:
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x9, l_switch.table.pcxhr_sub_get_external_clock@PAGE
Lloh1:
	add	x9, x9, l_switch.table.pcxhr_sub_get_external_clock@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldrb	w21, [x8]
Lloh2:
	adrp	x8, _CMD_ACCESS_IO_READ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMD_ACCESS_IO_READ@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_pcxhr_init_rmh
	mov	w8, #2
	str	w8, [sp, #8]
Lloh5:
	adrp	x8, _IO_NUM_REG_STATUS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IO_NUM_REG_STATUS@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldr	x9, [sp, #16]
	ldrb	w10, [x9]
	orr	w8, w10, w8
	strb	w8, [x9]
	ldrb	w8, [x20]
	cmp	w8, w21
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [sp, #16]
	strb	w21, [x8, #1]
	add	x1, sp, #8
	mov	x0, x20
	bl	_pcxhr_send_msg
	cbnz	w0, LBB0_7
; %bb.3:
	mov	w0, #100
	bl	_udelay
	strb	w21, [x20]
LBB0_4:
Lloh7:
	adrp	x8, _REG_STATUS_CURRENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _REG_STATUS_CURRENT@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldr	x9, [sp, #16]
	strb	w8, [x9, #1]
	add	x1, sp, #8
	mov	x0, x20
	bl	_pcxhr_send_msg
	cbnz	w0, LBB0_7
; %bb.5:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #0
	bl	_snd_printdd
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_STATUS_WORD_CLOCK,1,0      ; @REG_STATUS_WORD_CLOCK
	.comm	_REG_STATUS_AES_SYNC,1,0        ; @REG_STATUS_AES_SYNC
	.comm	_REG_STATUS_AES_1,1,0           ; @REG_STATUS_AES_1
	.comm	_REG_STATUS_AES_2,1,0           ; @REG_STATUS_AES_2
	.comm	_REG_STATUS_AES_3,1,0           ; @REG_STATUS_AES_3
	.comm	_REG_STATUS_AES_4,1,0           ; @REG_STATUS_AES_4
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CMD_ACCESS_IO_READ,4,2         ; @CMD_ACCESS_IO_READ
	.comm	_IO_NUM_REG_STATUS,1,0          ; @IO_NUM_REG_STATUS
	.comm	_REG_STATUS_CURRENT,1,0         ; @REG_STATUS_CURRENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"External clock is at %d Hz\n"

	.no_dead_strip	_pcxhr_sub_get_external_clock
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.pcxhr_sub_get_external_clock
l_switch.table.pcxhr_sub_get_external_clock:
	.quad	_REG_STATUS_WORD_CLOCK
	.quad	_REG_STATUS_AES_SYNC
	.quad	_REG_STATUS_AES_4
	.quad	_REG_STATUS_AES_3
	.quad	_REG_STATUS_AES_2
	.quad	_REG_STATUS_AES_1

.subsections_via_symbols
