	.file	"extr_hx8357.c_hx8357_spi_write_then_read.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Couldn't send SPI data\n"
	.text
	.p2align 4
	.type	hx8357_spi_write_then_read, @function
hx8357_spi_write_then_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xor	r14d, r14d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 120
	.cfi_def_cfa_offset 176
	mov	QWORD PTR 24[rsp], rcx
	lea	rbp, 48[rsp]
	lea	r13, 44[rsp]
	mov	DWORD PTR 12[rsp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 104[rsp], rax
	xor	eax, eax
	call	lcd_get_data@PLT
	mov	edx, 48
	xor	esi, esi
	mov	rdi, rbp
	mov	QWORD PTR 16[rsp], rax
	call	memset@PLT
	mov	rdi, r13
	call	spi_message_init@PLT
	test	ebx, ebx
	jne	.L23
	mov	eax, DWORD PTR 12[rsp]
	test	eax, eax
	jne	.L24
.L8:
	mov	rax, QWORD PTR 16[rsp]
	mov	rsi, r13
	mov	edi, DWORD PTR [rax]
	call	spi_sync@PLT
	mov	r13d, eax
	test	eax, eax
	js	.L25
.L9:
	test	ebx, ebx
	jne	.L26
.L1:
	mov	rax, QWORD PTR 104[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 120
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L23:
	.cfi_restore_state
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 4
	mov	edi, ebx
	call	kcalloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L3
	test	ebx, ebx
	jle	.L7
	mov	eax, DWORD PTR [r15]
	lea	ecx, -1[rbx]
	xor	edx, edx
	mov	DWORD PTR [r14], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edx, DWORD PTR [r15+rax*4]
	or	dh, 1
	mov	DWORD PTR [r14+rax*4], edx
	mov	rdx, rax
.L10:
	lea	rax, 1[rdx]
	cmp	rcx, rdx
	jne	.L6
.L7:
	lea	eax, [rbx+rbx]
	mov	rsi, r13
	mov	rdi, rbp
	mov	QWORD PTR 56[rsp], r14
	mov	DWORD PTR 48[rsp], eax
	mov	DWORD PTR 52[rsp], 9
	call	spi_message_add_tail@PLT
	mov	eax, DWORD PTR 12[rsp]
	test	eax, eax
	je	.L8
.L24:
	mov	eax, DWORD PTR 12[rsp]
	lea	rdi, 72[rsp]
	mov	rsi, r13
	mov	DWORD PTR 76[rsp], 8
	mov	DWORD PTR 72[rsp], eax
	mov	rax, QWORD PTR 24[rsp]
	mov	QWORD PTR 88[rsp], rax
	call	spi_message_add_tail@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, r14
	call	kfree@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	call	dev_err@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	mov	r13d, DWORD PTR ENOMEM[rip]
	neg	r13d
	jmp	.L1
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hx8357_spi_write_then_read, .-hx8357_spi_write_then_read
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_hx8357.c_hx8357_spi_write_then_read.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Couldn't send SPI data\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hx8357_spi_write_then_read, %function
hx8357_spi_write_then_read:
	@ args = 4, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r3
	ldr	r3, .L26
	sub	sp, sp, #40
	mov	r4, r2
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	mov	r10, r1
	mov	r7, r0
	ldr	r9, [sp, #72]
	bl	lcd_get_data
	mov	r2, #32
	mov	r1, #0
	mov	r5, r0
	add	r0, sp, #4
	bl	memset
	mov	r0, sp
	bl	spi_message_init
	cmp	r4, #0
	moveq	r8, r4
	bne	.L21
	cmp	r9, #0
	bne	.L22
.L8:
	ldr	r0, [r5]
	mov	r1, sp
	bl	spi_sync
	subs	r5, r0, #0
	blt	.L23
.L9:
	cmp	r4, #0
	bne	.L24
.L1:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	mov	r0, r5
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	ldr	r3, .L26+4
	mov	r1, #4
	mov	r0, r4
	ldr	r2, [r3]
	bl	kcalloc
	subs	r8, r0, #0
	beq	.L3
	cmp	r4, #0
	ble	.L7
	ldr	r2, [r10]
	sub	r0, r10, #4
	str	r2, [r8]
	mov	r3, r10
	mov	r2, r8
	add	r0, r0, r4, lsl #2
	b	.L10
.L6:
	ldr	r1, [r3, #4]!
	orr	r1, r1, #256
	str	r1, [r2, #4]!
.L10:
	cmp	r3, r0
	bne	.L6
.L7:
	mov	r2, #9
	lsl	r3, r4, #1
	mov	r1, sp
	add	r0, sp, #4
	str	r8, [sp, #12]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	bl	spi_message_add_tail
	cmp	r9, #0
	beq	.L8
.L22:
	mov	r3, #8
	mov	r1, sp
	add	r0, sp, #20
	str	r9, [sp, #20]
	str	r6, [sp, #32]
	str	r3, [sp, #24]
	bl	spi_message_add_tail
	b	.L8
.L24:
	mov	r0, r8
	bl	kfree
	b	.L1
.L23:
	mov	r0, r7
	ldr	r1, .L26+8
	bl	dev_err
	b	.L9
.L3:
	ldr	r3, .L26+12
	ldr	r0, [r3]
	rsb	r5, r0, #0
	b	.L1
.L25:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	.LC1
	.word	GFP_KERNEL
	.word	.LC0
	.word	ENOMEM
	.size	hx8357_spi_write_then_read, .-hx8357_spi_write_then_read
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
