	.file	"extr_r9a06g032-clocks.c_r9a06g032_clk_gate_set.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	r9a06g032_clk_gate_set, @function
r9a06g032_clk_gate_set:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	xor	edi, edi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmp	QWORD PTR 24[rsi], 0
	mov	rbx, rsi
	sete	dil
	call	WARN_ON@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	spin_lock_irqsave@PLT
	mov	rsi, QWORD PTR 24[rbx]
	mov	edx, r12d
	mov	rdi, rbp
	call	clk_rdesc_set@PLT
	mov	rsi, QWORD PTR 16[rbx]
	test	rsi, rsi
	jne	.L18
.L2:
	xor	esi, esi
	mov	rdi, rbp
	call	spin_unlock_irqrestore@PLT
	mov	edi, 5
	call	udelay@PLT
	cmp	QWORD PTR 8[rbx], 0
	jne	.L3
	cmp	QWORD PTR [rbx], 0
	je	.L1
.L3:
	xor	esi, esi
	mov	rdi, rbp
	call	spin_lock_irqsave@PLT
	mov	rsi, QWORD PTR 8[rbx]
	test	rsi, rsi
	jne	.L19
	mov	rsi, QWORD PTR [rbx]
	test	rsi, rsi
	jne	.L20
.L6:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	xor	esi, esi
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	spin_unlock_irqrestore@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	xor	edx, edx
	test	r12d, r12d
	mov	rdi, rbp
	sete	dl
	call	clk_rdesc_set@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	xor	esi, esi
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	spin_unlock_irqrestore@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	edx, r12d
	mov	rdi, rbp
	call	clk_rdesc_set@PLT
	mov	rsi, QWORD PTR [rbx]
	test	rsi, rsi
	je	.L6
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edx, 1
	mov	rdi, rbp
	call	clk_rdesc_set@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	r9a06g032_clk_gate_set, .-r9a06g032_clk_gate_set
	.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_r9a06g032-clocks.c_r9a06g032_clk_gate_set.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	r9a06g032_clk_gate_set, %function
r9a06g032_clk_gate_set:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r1, #12]
	push	{r4, r5, r6, lr}
	mov	r6, r0
	clz	r0, r3
	mov	r4, r1
	mov	r5, r2
	lsr	r0, r0, #5
	bl	WARN_ON
	mov	r1, #0
	mov	r0, r6
	bl	spin_lock_irqsave
	ldr	r1, [r4, #12]
	mov	r2, r5
	mov	r0, r6
	bl	clk_rdesc_set
	ldr	r1, [r4, #8]
	cmp	r1, #0
	bne	.L18
.L2:
	mov	r1, #0
	mov	r0, r6
	bl	spin_unlock_irqrestore
	mov	r0, #5
	bl	udelay
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L3
	ldr	r3, [r4]
	cmp	r3, #0
	popeq	{r4, r5, r6, pc}
.L3:
	mov	r1, #0
	mov	r0, r6
	bl	spin_lock_irqsave
	ldr	r1, [r4, #4]
	cmp	r1, #0
	bne	.L19
	ldr	r1, [r4]
	cmp	r1, #0
	bne	.L20
.L6:
	mov	r0, r6
	pop	{r4, r5, r6, lr}
	mov	r1, #0
	b	spin_unlock_irqrestore
.L20:
	clz	r2, r5
	mov	r0, r6
	lsr	r2, r2, #5
	bl	clk_rdesc_set
	mov	r0, r6
	pop	{r4, r5, r6, lr}
	mov	r1, #0
	b	spin_unlock_irqrestore
.L19:
	mov	r2, r5
	mov	r0, r6
	bl	clk_rdesc_set
	ldr	r1, [r4]
	cmp	r1, #0
	beq	.L6
	b	.L20
.L18:
	mov	r2, #1
	mov	r0, r6
	bl	clk_rdesc_set
	b	.L2
	.size	r9a06g032_clk_gate_set, .-r9a06g032_clk_gate_set
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
