	.file	"extr_sch56xx-common.c_sch56xx_send_cmd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"EC reports: 0x%02x reading virtual register 0x%04hx\n"
	.align 8
.LC1:
	.string	"Max retries exceeded reading virtual register 0x%04hx (%d)\n"
	.text
	.p2align 4
	.type	sch56xx_send_cmd, @function
sch56xx_send_cmd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, ecx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	lea	r12d, 1[rdi]
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edi
	mov	edi, r12d
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	lea	ebx, 2[rbp]
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	inb@PLT
	mov	esi, r12d
	mov	edi, eax
	call	outb@PLT
	xor	edi, edi
	mov	esi, ebx
	call	outb@PLT
	lea	esi, 3[rbp]
	mov	edi, 128
	call	outb@PLT
	lea	eax, 4[rbp]
	mov	edi, r14d
	mov	esi, eax
	mov	DWORD PTR 12[rsp], eax
	call	outb@PLT
	lea	esi, 5[rbp]
	mov	edi, 1
	call	outb@PLT
	mov	esi, ebx
	mov	edi, 4
	call	outb@PLT
	cmp	DWORD PTR SCH56XX_CMD_WRITE[rip], r14d
	je	.L22
.L2:
	lea	esi, 6[rbp]
	movzx	edi, r13b
	xor	ebx, ebx
	call	outb@PLT
	mov	edi, r13d
	lea	esi, 7[rbp]
	sar	edi, 8
	call	outb@PLT
	mov	esi, ebp
	mov	edi, 1
	add	ebp, 8
	call	outb@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, ebp
	call	inb@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L5
.L9:
	add	ebx, 1
	cmp	ebx, 96
	je	.L23
	cmp	ebx, 63
	jle	.L3
	mov	edi, 1
	call	msleep@PLT
	mov	edi, ebp
	call	inb@PLT
	mov	r15d, eax
	test	eax, eax
	je	.L9
.L5:
	mov	esi, ebp
	mov	edi, eax
	call	outb@PLT
	and	r15d, 1
	je	.L9
	xor	ebp, ebp
	lea	rbx, .LC0[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L11:
	cmp	r15d, 64
	je	.L24
.L12:
	mov	ebp, r15d
.L8:
	mov	edi, r12d
	call	inb@PLT
	cmp	eax, 1
	je	.L10
	lea	r15d, 1[rbp]
	test	ebp, ebp
	jne	.L11
	mov	edx, r13d
	mov	esi, eax
	mov	rdi, rbx
	call	pr_warn@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	cmp	DWORD PTR SCH56XX_CMD_READ[rip], r14d
	je	.L14
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	esi, DWORD PTR 12[rsp]
	mov	edi, r15d
	call	outb@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L23:
	mov	edx, 1
.L20:
	mov	esi, r13d
	lea	rdi, .LC1[rip]
	call	pr_err@PLT
	mov	eax, DWORD PTR EIO[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	edx, 2
	jmp	.L20
.L14:
	mov	edi, DWORD PTR 12[rsp]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	inb@PLT
	.cfi_endproc
.LFE0:
	.size	sch56xx_send_cmd, .-sch56xx_send_cmd
	.comm	SCH56XX_CMD_WRITE,4,4
	.comm	SCH56XX_CMD_READ,4,4
	.comm	EIO,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_sch56xx-common.c_sch56xx_send_cmd.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"EC reports: 0x%02x reading virtual register 0x%04hx"
	.ascii	"\012\000"
	.align	2
.LC1:
	.ascii	"Max retries exceeded reading virtual register 0x%04"
	.ascii	"hx (%d)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sch56xx_send_cmd, %function
sch56xx_send_cmd:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	mov	r7, r1
	add	r5, r0, #1
	mov	r0, r5
	mov	r9, r3
	mov	r6, r2
	add	r10, r4, #2
	bl	inb
	mov	r1, r5
	bl	outb
	mov	r1, r10
	mov	r0, #0
	bl	outb
	add	r8, r4, #4
	add	r1, r4, #3
	mov	r0, #128
	bl	outb
	mov	r1, r8
	mov	r0, r7
	bl	outb
	add	r1, r4, #5
	mov	r0, #1
	bl	outb
	mov	r1, r10
	mov	r0, #4
	bl	outb
	ldr	r3, .L26
	ldr	r3, [r3]
	cmp	r3, r7
	beq	.L22
.L2:
	add	r1, r4, #6
	and	r0, r6, #255
	bl	outb
	add	r1, r4, #7
	asr	r0, r6, #8
	bl	outb
	mov	r1, r4
	mov	r0, #1
	bl	outb
	mov	r9, #0
	add	r10, r4, #8
.L3:
	mov	r0, r10
	bl	inb
	subs	r4, r0, #0
	add	r9, r9, #1
	bne	.L5
.L9:
	cmp	r9, #96
	beq	.L23
	cmp	r9, #63
	ble	.L3
	mov	r0, #1
	bl	msleep
	b	.L3
.L5:
	mov	r1, r10
	bl	outb
	tst	r4, #1
	beq	.L9
	mov	r4, #0
	ldr	r9, .L26+4
.L8:
	mov	r0, r5
	bl	inb
	cmp	r0, #1
	beq	.L10
.L25:
	cmp	r4, #0
	add	r4, r4, #1
	beq	.L24
	cmp	r4, #64
	bne	.L8
	mov	r1, r6
	mov	r2, #2
.L20:
	ldr	r0, .L26+8
	bl	pr_err
	ldr	r3, .L26+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L24:
	mov	r1, r0
	mov	r2, r6
	mov	r0, r9
	bl	pr_warn
	mov	r0, r5
	bl	inb
	cmp	r0, #1
	bne	.L25
.L10:
	ldr	r3, .L26+16
	ldr	r3, [r3]
	cmp	r3, r7
	beq	.L14
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L22:
	mov	r0, r9
	mov	r1, r8
	bl	outb
	b	.L2
.L23:
	mov	r1, r6
	mov	r2, #1
	b	.L20
.L14:
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	inb
.L27:
	.align	2
.L26:
	.word	SCH56XX_CMD_WRITE
	.word	.LC0
	.word	.LC1
	.word	EIO
	.word	SCH56XX_CMD_READ
	.size	sch56xx_send_cmd, .-sch56xx_send_cmd
	.comm	SCH56XX_CMD_WRITE,4,4
	.comm	SCH56XX_CMD_READ,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
