	.file	"extr_regulator.c_regulator_release.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	regulator_release
	.type	regulator_release, @function
regulator_release:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	r12, QWORD PTR 8[rdi]
	xor	edi, edi
	movsx	rsi, DWORD PTR 12[r12]
	cmp	QWORD PTR [r12], 0
	setg	dil
	call	KASSERT@PLT
	xor	eax, eax
	call	REG_TOPO_SLOCK@PLT
	cmp	QWORD PTR 0[rbp], 0
	jle	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, r12
	call	regnode_disable@PLT
	mov	rax, QWORD PTR 0[rbp]
	sub	rax, 1
	mov	QWORD PTR 0[rbp], rax
	test	rax, rax
	jg	.L3
.L2:
	mov	rdi, r12
	call	REGNODE_XLOCK@PLT
	mov	edx, DWORD PTR link[rip]
	mov	rsi, rbp
	lea	rdi, 8[r12]
	call	TAILQ_REMOVE@PLT
	sub	QWORD PTR [r12], 1
	mov	rdi, r12
	call	REGNODE_UNLOCK@PLT
	xor	eax, eax
	call	REG_TOPO_UNLOCK@PLT
	mov	esi, DWORD PTR M_REGULATOR[rip]
	mov	rdi, rbp
	call	free@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	regulator_release, .-regulator_release
	.comm	link,4,4
	.comm	M_REGULATOR,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_regulator.c_regulator_release.c"
	.text
	.align	2
	.global	regulator_release
	.syntax unified
	.arm
	.fpu softvfp
	.type	regulator_release, %function
regulator_release:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r5, [r0, #4]
	ldr	r0, [r5]
	ldr	r1, [r5, #8]
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
	bl	KASSERT
	bl	REG_TOPO_SLOCK
	ldr	r3, [r4]
	cmp	r3, #0
	ble	.L2
.L3:
	mov	r0, r5
	bl	regnode_disable
	ldr	r3, [r4]
	sub	r3, r3, #1
	cmp	r3, #0
	str	r3, [r4]
	bgt	.L3
.L2:
	mov	r0, r5
	bl	REGNODE_XLOCK
	ldr	r3, .L7
	mov	r1, r4
	ldr	r2, [r3]
	add	r0, r5, #4
	bl	TAILQ_REMOVE
	ldr	r3, [r5]
	mov	r0, r5
	sub	r3, r3, #1
	str	r3, [r5]
	bl	REGNODE_UNLOCK
	bl	REG_TOPO_UNLOCK
	ldr	r3, .L7+4
	mov	r0, r4
	ldr	r1, [r3]
	bl	free
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L8:
	.align	2
.L7:
	.word	link
	.word	M_REGULATOR
	.size	regulator_release, .-regulator_release
	.comm	link,4,4
	.comm	M_REGULATOR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
