	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_twl4030_audio_enable_resource  ## -- Begin function twl4030_audio_enable_resource
	.p2align	4, 0x90
_twl4030_audio_enable_resource:         ## @twl4030_audio_enable_resource
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_twl4030_audio_dev@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_platform_get_drvdata
	movq	%rax, %r14
	movq	_TWL4030_AUDIO_RES_MAX@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jbe	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	8(%r14), %rax
	movl	%ebx, %r15d
	cmpl	$0, (%rax,%r15,4)
	je	LBB0_3
## %bb.4:
	movl	%ebx, %edi
	callq	_twl4030_audio_get_resource
	jmp	LBB0_5
LBB0_1:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_3:
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_twl4030_audio_set_resource
LBB0_5:
	movl	%eax, %ebx
	movq	8(%r14), %rax
	incl	(%rax,%r15,4)
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_twl4030_audio_dev,8,3          ## @twl4030_audio_dev
	.comm	_TWL4030_AUDIO_RES_MAX,4,2      ## @TWL4030_AUDIO_RES_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid resource ID (%u)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_twl4030_audio_enable_resource  ; -- Begin function twl4030_audio_enable_resource
	.p2align	2
_twl4030_audio_enable_resource:         ; @twl4030_audio_enable_resource
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
Lloh0:
	adrp	x21, _twl4030_audio_dev@GOTPAGE
Lloh1:
	ldr	x21, [x21, _twl4030_audio_dev@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_platform_get_drvdata
Lloh2:
	adrp	x8, _TWL4030_AUDIO_RES_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TWL4030_AUDIO_RES_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ls	LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	mov	w21, w20
	ldr	w8, [x8, w20, uxtw #2]
	cbz	w8, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_twl4030_audio_get_resource
	b	LBB0_5
LBB0_3:
	ldr	x0, [x21]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	mov	w1, #1
	bl	_twl4030_audio_set_resource
LBB0_5:
	mov	x20, x0
	ldr	x8, [x19, #8]
	lsl	x9, x21, #2
	ldr	w10, [x8, x9]
	add	w10, w10, #1
	str	w10, [x8, x9]
	mov	x0, x19
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_twl4030_audio_dev,8,3          ; @twl4030_audio_dev
	.comm	_TWL4030_AUDIO_RES_MAX,4,2      ; @TWL4030_AUDIO_RES_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid resource ID (%u)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
