	.file	"extr_twl4030-audio.c_twl4030_audio_disable_resource.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Invalid resource ID (%u)\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Resource has been disabled already (%u)\n"
	.text
	.p2align 4
	.globl	twl4030_audio_disable_resource
	.type	twl4030_audio_disable_resource, @function
twl4030_audio_disable_resource:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	mov	rdi, QWORD PTR twl4030_audio_dev[rip]
	call	platform_get_drvdata@PLT
	cmp	DWORD PTR TWL4030_AUDIO_RES_MAX[rip], ebp
	jbe	.L9
	mov	r12, rax
	mov	rdi, rax
	call	mutex_lock@PLT
	mov	rdx, QWORD PTR 8[r12]
	mov	eax, ebp
	lea	rdx, [rdx+rax*4]
	mov	eax, DWORD PTR [rdx]
	test	eax, eax
	je	.L10
	sub	eax, 1
	mov	DWORD PTR [rdx], eax
	je	.L11
	mov	edi, ebp
	call	twl4030_audio_get_resource@PLT
	mov	r13d, eax
.L6:
	mov	rdi, r12
	call	mutex_unlock@PLT
	mov	eax, r13d
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xor	esi, esi
	mov	edi, ebp
	call	twl4030_audio_set_resource@PLT
	mov	r13d, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, QWORD PTR twl4030_audio_dev[rip]
	mov	edx, ebp
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r13d, DWORD PTR EINVAL[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	neg	r13d
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, QWORD PTR twl4030_audio_dev[rip]
	mov	edx, ebp
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	rdi, r12
	call	mutex_unlock@PLT
	mov	r13d, DWORD PTR EPERM[rip]
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	neg	r13d
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	twl4030_audio_disable_resource, .-twl4030_audio_disable_resource
	.comm	twl4030_audio_dev,8,8
	.comm	TWL4030_AUDIO_RES_MAX,4,4
	.comm	EPERM,4,4
	.comm	EINVAL,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_twl4030-audio.c_twl4030_audio_disable_resource.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Invalid resource ID (%u)\012\000"
	.align	2
.LC1:
	.ascii	"Resource has been disabled already (%u)\012\000"
	.text
	.align	2
	.global	twl4030_audio_disable_resource
	.syntax unified
	.arm
	.fpu softvfp
	.type	twl4030_audio_disable_resource, %function
twl4030_audio_disable_resource:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r6, .L12
	ldr	r0, [r6]
	bl	platform_get_drvdata
	ldr	r3, .L12+4
	ldr	r3, [r3]
	cmp	r3, r4
	bls	.L9
	mov	r5, r0
	bl	mutex_lock
	ldr	r3, [r5, #4]
	ldr	r1, [r3, r4, lsl #2]
	cmp	r1, #0
	beq	.L10
	sub	r1, r1, #1
	cmp	r1, #0
	mov	r0, r4
	str	r1, [r3, r4, lsl #2]
	beq	.L11
	bl	twl4030_audio_get_resource
	mov	r4, r0
.L6:
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L11:
	bl	twl4030_audio_set_resource
	mov	r4, r0
	b	.L6
.L9:
	mov	r2, r4
	ldr	r0, [r6]
	ldr	r1, .L12+8
	bl	dev_err
	ldr	r3, .L12+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L10:
	mov	r2, r4
	ldr	r1, .L12+16
	ldr	r0, [r6]
	bl	dev_err
	mov	r0, r5
	bl	mutex_unlock
	ldr	r3, .L12+20
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L13:
	.align	2
.L12:
	.word	twl4030_audio_dev
	.word	TWL4030_AUDIO_RES_MAX
	.word	.LC0
	.word	EINVAL
	.word	.LC1
	.word	EPERM
	.size	twl4030_audio_disable_resource, .-twl4030_audio_disable_resource
	.comm	twl4030_audio_dev,4,4
	.comm	TWL4030_AUDIO_RES_MAX,4,4
	.comm	EPERM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
