	.file	"extr_fb_st7735r.c_set_var.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	set_var, @function
set_var:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	mov	rax, QWORD PTR 8[rdi]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 180
	je	.L2
	jg	.L3
	test	eax, eax
	je	.L4
	cmp	eax, 90
	jne	.L6
	mov	edx, DWORD PTR MX[rip]
	or	edx, DWORD PTR MV[rip]
.L9:
	mov	eax, DWORD PTR [rdi]
	mov	esi, DWORD PTR MIPI_DCS_SET_ADDRESS_MODE[rip]
	sal	eax, 3
	or	edx, eax
	call	write_reg@PLT
.L6:
	xor	eax, eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	edx, DWORD PTR MY[rip]
	cmp	eax, 270
	jne	.L6
	or	edx, DWORD PTR MV[rip]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edx, DWORD PTR MX[rip]
	or	edx, DWORD PTR MY[rip]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR [rdi]
	mov	esi, DWORD PTR MIPI_DCS_SET_ADDRESS_MODE[rip]
	lea	edx, 0[0+rax*8]
	call	write_reg@PLT
	xor	eax, eax
	add	rsp, 8
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	set_var, .-set_var
	.comm	MY,4,4
	.comm	MX,4,4
	.comm	MV,4,4
	.comm	MIPI_DCS_SET_ADDRESS_MODE,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_fb_st7735r.c_set_var.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_var, %function
set_var:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #4]
	mov	r1, r0
	ldr	r3, [r3]
	push	{r4, lr}
	cmp	r3, #180
	beq	.L2
	bgt	.L3
	cmp	r3, #0
	beq	.L4
	cmp	r3, #90
	ldreq	r3, .L12
	bne	.L6
.L10:
	ldr	r2, .L12+4
.L9:
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r2, [r1]
	ldr	r1, .L12+8
	orr	r3, r3, ip
	ldr	r1, [r1]
	orr	r2, r3, r2, lsl #3
	bl	write_reg
.L6:
	mov	r0, #0
	pop	{r4, pc}
.L3:
	ldr	r2, .L12+12
	cmp	r3, r2
	ldreq	r3, .L12+16
	beq	.L10
	mov	r0, #0
	pop	{r4, pc}
.L2:
	ldr	r3, .L12+8
	ldr	r2, [r0]
	ldr	r1, [r3]
	lsl	r2, r2, #3
	bl	write_reg
	mov	r0, #0
	pop	{r4, pc}
.L4:
	ldr	r3, .L12
	ldr	r2, .L12+16
	b	.L9
.L13:
	.align	2
.L12:
	.word	MX
	.word	MV
	.word	MIPI_DCS_SET_ADDRESS_MODE
	.word	270
	.word	MY
	.size	set_var, .-set_var
	.comm	MY,4,4
	.comm	MX,4,4
	.comm	MV,4,4
	.comm	MIPI_DCS_SET_ADDRESS_MODE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
