	.file	"extr_hdspm.c_snd_hdspm_set_defaults.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_hdspm_set_defaults, @function
snd_hdspm_set_defaults:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	eax, DWORD PTR 4[rdi]
	mov	rbp, rdi
	mov	DWORD PTR [rdi], 0
	cmp	eax, 131
	je	.L2
	jg	.L3
	cmp	eax, 128
	je	.L2
	sub	eax, 129
	cmp	eax, 1
	ja	.L4
.L19:
	mov	DWORD PTR 8[rbp], 16794778
	mov	edx, 16794778
.L5:
	mov	esi, DWORD PTR HDSPM_controlRegister[rip]
	mov	rdi, rbp
	call	hdspm_write@PLT
	cmp	DWORD PTR 4[rbp], 132
	je	.L21
.L7:
	mov	rdi, rbp
	call	hdspm_compute_period_size@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	all_in_all_mixer@PLT
	mov	rdi, rbp
	call	hdspm_is_raydat_or_aio@PLT
	test	rax, rax
	jne	.L22
.L8:
	mov	rdi, rbp
	mov	edx, 1
	mov	esi, 48000
	call	hdspm_set_rate@PLT
	xor	eax, eax
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	eax, 132
	jne	.L4
	mov	edi, 7
	call	hdspm_encode_latency@PLT
	mov	edx, DWORD PTR HDSPM_ClockModeMaster[rip]
	or	edx, DWORD PTR HDSPM_SyncRef0[rip]
	or	edx, DWORD PTR HDSPM_LineOut[rip]
	or	edx, DWORD PTR HDSPM_Professional[rip]
	or	edx, eax
	mov	DWORD PTR 8[rbp], edx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edx, DWORD PTR 0[rbp]
	mov	esi, DWORD PTR HDSPM_WR_SETTINGS[rip]
	mov	rdi, rbp
	call	hdspm_write@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edx, DWORD PTR 8[rbp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	DWORD PTR 0[rbp], 4097
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L21:
	mov	DWORD PTR 12[rbp], 0
	mov	esi, DWORD PTR HDSPM_control2Reg[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	hdspm_write@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	snd_hdspm_set_defaults, .-snd_hdspm_set_defaults
	.comm	UNITY_GAIN,4,4
	.comm	HDSPM_controlRegister,4,4
	.comm	HDSPM_control2Reg,4,4
	.comm	HDSPM_WR_SETTINGS,4,4
	.comm	HDSPM_SyncRef0,4,4
	.comm	HDSPM_Professional,4,4
	.comm	HDSPM_LineOut,4,4
	.comm	HDSPM_ClockModeMaster,4,4
	.comm	HDSPM_BIGENDIAN_MODE,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_snd_hdspm_set_defaults.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_hdspm_set_defaults, %function
snd_hdspm_set_defaults:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r2, #0
	ldr	r3, [r0, #4]
	push	{r4, lr}
	sub	r3, r3, #128
	mov	r4, r0
	str	r2, [r0]
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L5
	.word	.L6
	.word	.L6
	.word	.L5
	.word	.L3
.L6:
	ldr	r2, .L17
	str	r2, [r0, #8]
.L7:
	ldr	r3, .L17+4
	mov	r0, r4
	ldr	r1, [r3]
	bl	hdspm_write
	ldr	r3, [r4, #4]
	cmp	r3, #132
	beq	.L15
.L8:
	mov	r0, r4
	bl	hdspm_compute_period_size
	mov	r1, #0
	mov	r0, r4
	bl	all_in_all_mixer
	mov	r0, r4
	bl	hdspm_is_raydat_or_aio
	cmp	r0, #0
	bne	.L16
.L9:
	mov	r0, r4
	mov	r2, #1
	ldr	r1, .L17+8
	bl	hdspm_set_rate
	mov	r0, #0
	pop	{r4, pc}
.L5:
	ldr	r3, .L17+12
	ldr	r2, .L17
	str	r3, [r0]
	str	r2, [r0, #8]
	b	.L7
.L3:
	mov	r0, #7
	bl	hdspm_encode_latency
	ldr	r3, .L17+16
	ldr	r2, .L17+20
	ldr	r1, .L17+24
	ldr	ip, [r3]
	ldr	r2, [r2]
	ldr	r3, .L17+28
	ldr	r1, [r1]
	ldr	r3, [r3]
	orr	r2, r2, ip
	orr	r2, r2, r1
	orr	r2, r2, r3
	orr	r2, r2, r0
	str	r2, [r4, #8]
	b	.L7
.L16:
	ldr	r3, .L17+32
	mov	r0, r4
	ldr	r2, [r4]
	ldr	r1, [r3]
	bl	hdspm_write
	b	.L9
.L15:
	mov	r2, #0
	ldr	r3, .L17+36
	mov	r0, r4
	ldr	r1, [r3]
	str	r2, [r4, #12]
	bl	hdspm_write
	b	.L8
.L2:
	ldr	r2, [r0, #8]
	b	.L7
.L18:
	.align	2
.L17:
	.word	16794778
	.word	HDSPM_controlRegister
	.word	48000
	.word	4097
	.word	HDSPM_SyncRef0
	.word	HDSPM_ClockModeMaster
	.word	HDSPM_LineOut
	.word	HDSPM_Professional
	.word	HDSPM_WR_SETTINGS
	.word	HDSPM_control2Reg
	.size	snd_hdspm_set_defaults, .-snd_hdspm_set_defaults
	.comm	UNITY_GAIN,4,4
	.comm	HDSPM_controlRegister,4,4
	.comm	HDSPM_control2Reg,4,4
	.comm	HDSPM_WR_SETTINGS,4,4
	.comm	HDSPM_SyncRef0,4,4
	.comm	HDSPM_Professional,4,4
	.comm	HDSPM_LineOut,4,4
	.comm	HDSPM_ClockModeMaster,4,4
	.comm	HDSPM_BIGENDIAN_MODE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
