	.file	"extr_sdio.c_brcmf_sdio_bus_sleep.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"SLEEP"
.LC1:
	.string	"WAKE"
.LC2:
	.string	"no clock, set ALP\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"error while changing bus sleep state %d\n"
	.section	.rodata.str1.1
.LC4:
	.string	"new state %s\n"
.LC5:
	.string	"Exit: err=%d\n"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"Enter: request %s currently %s\n"
	.text
	.p2align 4
	.type	brcmf_sdio_bus_sleep, @function
brcmf_sdio_bus_sleep:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, edx
	lea	rdx, .LC1[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	lea	r12, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	ecx, DWORD PTR [rdi]
	mov	edi, DWORD PTR SDIO[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 4[rsp], 0
	test	ecx, ecx
	mov	rcx, rdx
	cmovne	rcx, r12
	test	esi, esi
	je	.L25
	xor	eax, eax
	lea	rsi, .LC6[rip]
	mov	rdx, r12
	call	brcmf_dbg@PLT
	cmp	QWORD PTR 8[rbx], 0
	je	.L9
	cmp	ebp, DWORD PTR [rbx]
	je	.L26
	lea	r12, 4[rsp]
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR SBSDIO_FUNC1_CHIPCLKCSR[rip]
	mov	rdx, r12
	call	brcmf_sdiod_readb@PLT
	test	DWORD PTR SBSDIO_CSR_MASK[rip], eax
	je	.L27
.L15:
	xor	esi, esi
	mov	rdi, rbx
	call	brcmf_sdio_kso_control@PLT
	mov	DWORD PTR 4[rsp], eax
	test	eax, eax
	jne	.L13
	cmp	QWORD PTR 8[rbx], 0
	je	.L9
	lea	rdx, .LC0[rip]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	xor	eax, eax
	lea	rsi, .LC6[rip]
	call	brcmf_dbg@PLT
	cmp	QWORD PTR 8[rbx], 0
	jne	.L10
.L11:
	mov	esi, DWORD PTR CLK_AVAIL[rip]
	mov	edx, r13d
	mov	rdi, rbx
	call	brcmf_sdio_clkctl@PLT
	mov	esi, 1
	mov	rdi, rbx
	call	brcmf_sdio_wd_timer@PLT
	lea	rdx, .LC1[rip]
.L7:
	mov	DWORD PTR [rbx], ebp
	mov	edi, DWORD PTR SDIO[rip]
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	brcmf_dbg@PLT
.L6:
	mov	edx, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR SDIO[rip]
	xor	eax, eax
	lea	rsi, .LC5[rip]
	call	brcmf_dbg@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L28
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.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
.L10:
	.cfi_restore_state
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	je	.L11
	mov	esi, 1
	mov	rdi, rbx
	call	brcmf_sdio_kso_control@PLT
	mov	DWORD PTR 4[rsp], eax
	test	eax, eax
	je	.L11
.L13:
	mov	esi, eax
	lea	rdi, .LC3[rip]
	call	brcmf_err@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	esi, DWORD PTR CLK_NONE[rip]
	mov	edx, r13d
	mov	rdi, rbx
	call	brcmf_sdio_clkctl@PLT
	lea	rdx, .LC0[rip]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdx, r12
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edi, DWORD PTR SDIO[rip]
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	brcmf_dbg@PLT
	mov	edi, DWORD PTR 16[rbx]
	mov	edx, DWORD PTR SBSDIO_ALP_AVAIL_REQ[rip]
	mov	rcx, r12
	mov	esi, DWORD PTR SBSDIO_FUNC1_CHIPCLKCSR[rip]
	call	brcmf_sdiod_writeb@PLT
	jmp	.L15
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	brcmf_sdio_bus_sleep, .-brcmf_sdio_bus_sleep
	.comm	SDIO,4,4
	.comm	SBSDIO_FUNC1_CHIPCLKCSR,4,4
	.comm	SBSDIO_CSR_MASK,4,4
	.comm	SBSDIO_ALP_AVAIL_REQ,4,4
	.comm	CLK_NONE,4,4
	.comm	CLK_AVAIL,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_sdio.c_brcmf_sdio_bus_sleep.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"SLEEP\000"
	.align	2
.LC1:
	.ascii	"WAKE\000"
	.align	2
.LC2:
	.ascii	"Enter: request %s currently %s\012\000"
	.align	2
.LC3:
	.ascii	"no clock, set ALP\012\000"
	.align	2
.LC4:
	.ascii	"error while changing bus sleep state %d\012\000"
	.align	2
.LC5:
	.ascii	"new state %s\012\000"
	.align	2
.LC6:
	.ascii	"Exit: err=%d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	brcmf_sdio_bus_sleep, %function
brcmf_sdio_bus_sleep:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	ldr	r3, .L33
	ldr	r0, .L33+4
	subs	r5, r1, #0
	mov	ip, #0
	movne	r8, r3
	moveq	r8, r0
	mov	r6, r2
	ldr	r2, [r4]
	ldr	r7, .L33+8
	cmp	r2, ip
	ldr	lr, .L33+12
	moveq	r3, r0
	sub	sp, sp, #12
	mov	r2, r8
	ldr	r0, [r7]
	ldr	r1, .L33+16
	ldr	lr, [lr]
	str	lr, [sp, #4]
	mov	lr,#0
	str	ip, [sp]
	bl	brcmf_dbg
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L4
	ldr	r3, [r4]
	cmp	r3, r5
	beq	.L5
	cmp	r5, #0
	beq	.L6
	ldr	r9, .L33+20
	mov	r2, sp
	ldr	r1, [r9]
	ldr	r0, [r4, #8]
	bl	brcmf_sdiod_readb
	ldr	r3, .L33+24
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L31
.L7:
	mov	r1, #0
	mov	r0, r4
	bl	brcmf_sdio_kso_control
	cmp	r0, #0
	str	r0, [sp]
	bne	.L8
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L12
.L13:
	ldr	r3, .L33+28
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r3]
	bl	brcmf_sdio_clkctl
	b	.L12
.L4:
	cmp	r5, #0
	bne	.L13
.L10:
	ldr	r3, .L33+32
	mov	r2, r6
	ldr	r1, [r3]
	mov	r0, r4
	bl	brcmf_sdio_clkctl
	mov	r1, #1
	mov	r0, r4
	bl	brcmf_sdio_wd_timer
.L12:
	mov	r2, r8
	ldr	r1, .L33+36
	ldr	r0, [r7]
	str	r5, [r4]
	bl	brcmf_dbg
.L11:
	ldr	r2, [sp]
	ldr	r0, [r7]
	ldr	r1, .L33+40
	bl	brcmf_dbg
	ldr	r3, .L33+12
	ldr	r0, [sp]
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L32
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L6:
	mov	r1, #1
	mov	r0, r4
	bl	brcmf_sdio_kso_control
	cmp	r0, #0
	str	r0, [sp]
	beq	.L10
.L8:
	mov	r1, r0
	ldr	r0, .L33+44
	bl	brcmf_err
	b	.L11
.L5:
	cmp	r5, #0
	bne	.L12
	b	.L10
.L31:
	ldr	r1, .L33+48
	ldr	r0, [r7]
	bl	brcmf_dbg
	ldr	r2, .L33+52
	mov	r3, sp
	ldr	r1, [r9]
	ldr	r2, [r2]
	ldr	r0, [r4, #8]
	bl	brcmf_sdiod_writeb
	b	.L7
.L32:
	bl	__stack_chk_fail
.L34:
	.align	2
.L33:
	.word	.LC0
	.word	.LC1
	.word	SDIO
	.word	.LC7
	.word	.LC2
	.word	SBSDIO_FUNC1_CHIPCLKCSR
	.word	SBSDIO_CSR_MASK
	.word	CLK_NONE
	.word	CLK_AVAIL
	.word	.LC5
	.word	.LC6
	.word	.LC4
	.word	.LC3
	.word	SBSDIO_ALP_AVAIL_REQ
	.size	brcmf_sdio_bus_sleep, .-brcmf_sdio_bus_sleep
	.comm	SDIO,4,4
	.comm	SBSDIO_FUNC1_CHIPCLKCSR,4,4
	.comm	SBSDIO_CSR_MASK,4,4
	.comm	SBSDIO_ALP_AVAIL_REQ,4,4
	.comm	CLK_NONE,4,4
	.comm	CLK_AVAIL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
