	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcxhr_set_clock                ## -- Begin function pcxhr_set_clock
	.p2align	4, 0x90
_pcxhr_set_clock:                       ## @pcxhr_set_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	testl	%esi, %esi
	je	LBB0_8
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	cmpq	$0, (%rdi)
	je	LBB0_3
## %bb.2:
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_hr222_sub_set_clock
	testl	%eax, %eax
	jne	LBB0_8
	jmp	LBB0_5
LBB0_3:
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pcxhr_sub_set_clock
	testl	%eax, %eax
	jne	LBB0_8
LBB0_5:
	cmpl	$0, -28(%rbp)
	je	LBB0_7
## %bb.6:
	movq	_CMD_MODIFY_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	callq	_pcxhr_init_rmh
	movq	_PCXHR_MODIFY_CLOCK_S_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rdx
	orl	%eax, (%rdx)
	movq	_PCXHR_IRQ_TIMER_FREQ@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	setbe	%cl
	movq	_PCXHR_IRQ_TIMER_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	%cl, %eax
	movl	%eax, 4(%rdx)
	movl	%ebx, 8(%rdx)
	movl	$3, -40(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_pcxhr_send_msg
	testl	%eax, %eax
	jne	LBB0_8
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_MODIFY_CLOCK,4,2           ## @CMD_MODIFY_CLOCK
	.comm	_PCXHR_MODIFY_CLOCK_S_BIT,4,2   ## @PCXHR_MODIFY_CLOCK_S_BIT
	.comm	_PCXHR_IRQ_TIMER_FREQ,4,2       ## @PCXHR_IRQ_TIMER_FREQ
	.comm	_PCXHR_IRQ_TIMER_PERIOD,4,2     ## @PCXHR_IRQ_TIMER_PERIOD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcxhr_set_clock                ; -- Begin function pcxhr_set_clock
	.p2align	2
_pcxhr_set_clock:                       ; @pcxhr_set_clock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	cbz	w1, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.2:
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_hr222_sub_set_clock
	cbnz	w0, LBB0_7
	b	LBB0_4
LBB0_3:
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_pcxhr_sub_set_clock
	cbnz	w0, LBB0_7
LBB0_4:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_6
; %bb.5:
Lloh0:
	adrp	x8, _CMD_MODIFY_CLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_MODIFY_CLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #16
	bl	_pcxhr_init_rmh
Lloh3:
	adrp	x8, _PCXHR_MODIFY_CLOCK_S_BIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCXHR_MODIFY_CLOCK_S_BIT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [sp, #16]
	ldr	w10, [x9]
	orr	w8, w10, w8
Lloh6:
	adrp	x10, _PCXHR_IRQ_TIMER_FREQ@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PCXHR_IRQ_TIMER_FREQ@GOTPAGEOFF]
	str	w8, [x9]
Lloh8:
	ldr	w8, [x10]
	cmp	w8, w20
	cset	w8, ls
Lloh9:
	adrp	x10, _PCXHR_IRQ_TIMER_PERIOD@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PCXHR_IRQ_TIMER_PERIOD@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	lsl	w8, w10, w8
	stp	w8, w20, [x9, #4]
	mov	w8, #3
	str	w8, [sp, #24]
	add	x1, sp, #16
	mov	x0, x19
	bl	_pcxhr_send_msg
	cbnz	w0, LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_MODIFY_CLOCK,4,2           ; @CMD_MODIFY_CLOCK
	.comm	_PCXHR_MODIFY_CLOCK_S_BIT,4,2   ; @PCXHR_MODIFY_CLOCK_S_BIT
	.comm	_PCXHR_IRQ_TIMER_FREQ,4,2       ; @PCXHR_IRQ_TIMER_FREQ
	.comm	_PCXHR_IRQ_TIMER_PERIOD,4,2     ; @PCXHR_IRQ_TIMER_PERIOD
.subsections_via_symbols
