	.file	"extr_hdspm.c_hdspm_set_interrupt_interval.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hdspm_set_interrupt_interval, @function
hdspm_set_interrupt_interval:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	spin_lock_irq@PLT
	mov	edi, 7
	cmp	ebx, 32
	je	.L2
	xor	edi, edi
	shr	ebx, 7
	mov	esi, ebx
	je	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	add	edi, 1
	shr	esi
	jne	.L3
.L2:
	mov	eax, DWORD PTR HDSPM_LatencyMask[rip]
	not	eax
	and	DWORD PTR 4[rbp], eax
	call	hdspm_encode_latency@PLT
	or	eax, DWORD PTR 4[rbp]
	mov	esi, DWORD PTR HDSPM_controlRegister[rip]
	mov	rdi, rbp
	mov	DWORD PTR 4[rbp], eax
	mov	edx, eax
	call	hdspm_write@PLT
	mov	rdi, rbp
	call	hdspm_compute_period_size@PLT
	mov	rdi, rbp
	call	spin_unlock_irq@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	hdspm_set_interrupt_interval, .-hdspm_set_interrupt_interval
	.comm	HDSPM_controlRegister,4,4
	.comm	HDSPM_LatencyMask,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_hdspm.c_hdspm_set_interrupt_interval.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hdspm_set_interrupt_interval, %function
hdspm_set_interrupt_interval:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r1
	mov	r5, r0
	bl	spin_lock_irq
	cmp	r4, #32
	moveq	r0, #7
	beq	.L2
	lsrs	r1, r4, #7
	beq	.L5
	mov	r0, #0
.L3:
	lsrs	r1, r1, #1
	add	r0, r0, #1
	bne	.L3
.L2:
	ldr	r2, .L9
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	bic	r3, r3, r2
	str	r3, [r5, #4]
	bl	hdspm_encode_latency
	ldr	r2, [r5, #4]
	ldr	r3, .L9+4
	orr	r2, r0, r2
	ldr	r1, [r3]
	str	r2, [r5, #4]
	mov	r0, r5
	bl	hdspm_write
	mov	r0, r5
	bl	hdspm_compute_period_size
	mov	r0, r5
	bl	spin_unlock_irq
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L5:
	mov	r0, r1
	b	.L2
.L10:
	.align	2
.L9:
	.word	HDSPM_LatencyMask
	.word	HDSPM_controlRegister
	.size	hdspm_set_interrupt_interval, .-hdspm_set_interrupt_interval
	.comm	HDSPM_controlRegister,4,4
	.comm	HDSPM_LatencyMask,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
