	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdspm_set_interrupt_interval
_hdspm_set_interrupt_interval:          ## @hdspm_set_interrupt_interval
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_spin_lock_irq
	xorl	%edi, %edi
	cmpl	$128, %ebx
	jb	LBB0_3
## %bb.1:
	shrl	$7, %ebx
	xorl	%edi, %edi
	movl	%ebx, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%edi
	shrl	%eax
	cmpl	$1, %ebx
	movl	%eax, %ebx
	ja	LBB0_2
LBB0_3:
	movq	_HDSPM_LatencyMask@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 4(%r14)
	callq	_hdspm_encode_latency
	orl	4(%r14), %eax
	movl	%eax, 4(%r14)
	movq	_HDSPM_controlRegister@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_hdspm_write
	movq	%r14, %rdi
	callq	_hdspm_compute_period_size
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDSPM_LatencyMask,4,2          ## @HDSPM_LatencyMask
	.comm	_HDSPM_controlRegister,4,2      ## @HDSPM_controlRegister
	.no_dead_strip	_hdspm_set_interrupt_interval
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdspm_set_interrupt_interval
_hdspm_set_interrupt_interval:          ; @hdspm_set_interrupt_interval
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_spin_lock_irq
	cmp	w20, #128
	b.hs	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_4
LBB0_2:
	mov	w0, #0
	lsr	w8, w20, #7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w0, w0, #1
	lsr	w9, w8, #1
	cmp	w8, #1
	mov	x8, x9
	b.hi	LBB0_3
LBB0_4:
Lloh0:
	adrp	x8, _HDSPM_LatencyMask@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDSPM_LatencyMask@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
	bl	_hdspm_encode_latency
	ldr	w8, [x19, #4]
	orr	w2, w8, w0
	str	w2, [x19, #4]
Lloh3:
	adrp	x8, _HDSPM_controlRegister@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDSPM_controlRegister@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hdspm_write
	mov	x0, x19
	bl	_hdspm_compute_period_size
	mov	x0, x19
	bl	_spin_unlock_irq
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HDSPM_LatencyMask,4,2          ; @HDSPM_LatencyMask
	.comm	_HDSPM_controlRegister,4,2      ; @HDSPM_controlRegister
	.no_dead_strip	_hdspm_set_interrupt_interval
.subsections_via_symbols
