	.file	"extr_cc_pal.c_spi_Open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	spi_Open
	.type	spi_Open, @function
spi_Open:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edi, DWORD PTR PRCM_LSPI[rip]
	mov	esi, DWORD PTR PRCM_RUN_MODE_CLK[rip]
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	or	esi, DWORD PTR PRCM_SLP_MODE_CLK[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, QWORD PTR SPI_RATE_20M[rip]
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, QWORD PTR LSPI_BASE[rip]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	MAP_PRCMPeripheralClkEnable@PLT
	mov	rdi, rbp
	call	MAP_SPICSDisable@PLT
	mov	rdi, rbp
	call	MAP_SPIDisable@PLT
	mov	rdi, rbp
	call	MAP_SPIReset@PLT
	mov	edi, DWORD PTR PRCM_LSPI[rip]
	mov	r14d, DWORD PTR SPI_SUB_MODE_0[rip]
	mov	r13d, DWORD PTR SPI_MODE_MASTER[rip]
	mov	ebx, DWORD PTR SPI_SW_CTRL_CS[rip]
	or	ebx, DWORD PTR SPI_4PIN_MODE[rip]
	or	ebx, DWORD PTR SPI_TURBO_OFF[rip]
	or	ebx, DWORD PTR SPI_CS_ACTIVEHIGH[rip]
	or	ebx, DWORD PTR SPI_WL_32[rip]
	call	MAP_PRCMPeripheralClockGet@PLT
	mov	r9d, ebx
	mov	r8d, r14d
	mov	ecx, r13d
	mov	rdx, r12
	mov	rdi, rbp
	mov	esi, eax
	call	MAP_SPIConfigSetExpClk@PLT
	mov	rdi, rbp
	call	MAP_SPIEnable@PLT
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	DWORD PTR g_SpiFd[rip], 1
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	spi_Open, .-spi_Open
	.comm	g_SpiFd,4,4
	.comm	SPI_WL_32,4,4
	.comm	SPI_TURBO_OFF,4,4
	.comm	SPI_SW_CTRL_CS,4,4
	.comm	SPI_SUB_MODE_0,4,4
	.comm	SPI_RATE_20M,8,8
	.comm	SPI_MODE_MASTER,4,4
	.comm	SPI_CS_ACTIVEHIGH,4,4
	.comm	SPI_4PIN_MODE,4,4
	.comm	PRCM_SLP_MODE_CLK,4,4
	.comm	PRCM_RUN_MODE_CLK,4,4
	.comm	PRCM_LSPI,4,4
	.comm	LSPI_BASE,8,8
	.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_cc_pal.c_spi_Open.c"
	.text
	.align	2
	.global	spi_Open
	.syntax unified
	.arm
	.fpu softvfp
	.type	spi_Open, %function
spi_Open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r2, .L4
	ldr	r3, .L4+4
	ldr	r0, [r2]
	ldr	r2, .L4+8
	ldr	r1, [r3]
	ldr	r5, .L4+12
	ldr	r4, [r2]
	ldr	r3, .L4+16
	sub	sp, sp, #8
	orr	r1, r0, r1
	ldr	r0, [r5]
	ldr	r6, [r3]
	bl	MAP_PRCMPeripheralClkEnable
	mov	r0, r4
	bl	MAP_SPICSDisable
	mov	r0, r4
	bl	MAP_SPIDisable
	mov	r0, r4
	bl	MAP_SPIReset
	ldr	r0, [r5]
	bl	MAP_PRCMPeripheralClockGet
	ldr	r3, .L4+20
	ldr	r2, .L4+24
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r1, r0
	ldr	r0, .L4+28
	orr	r3, r3, r2
	ldr	r2, .L4+32
	ldr	r0, [r0]
	ldr	r2, [r2]
	orr	r3, r3, r0
	ldr	r0, .L4+36
	orr	r3, r3, r2
	ldr	r2, .L4+40
	ldr	r0, [r0]
	ldr	lr, [r2]
	ldr	ip, .L4+44
	orr	r3, r3, r0
	mov	r2, r6
	str	r3, [sp, #4]
	str	lr, [sp]
	ldr	r3, [ip]
	mov	r0, r4
	bl	MAP_SPIConfigSetExpClk
	mov	r0, r4
	bl	MAP_SPIEnable
	mov	r0, #1
	ldr	r3, .L4+48
	str	r0, [r3]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L5:
	.align	2
.L4:
	.word	PRCM_RUN_MODE_CLK
	.word	PRCM_SLP_MODE_CLK
	.word	LSPI_BASE
	.word	PRCM_LSPI
	.word	SPI_RATE_20M
	.word	SPI_SW_CTRL_CS
	.word	SPI_4PIN_MODE
	.word	SPI_TURBO_OFF
	.word	SPI_CS_ACTIVEHIGH
	.word	SPI_WL_32
	.word	SPI_SUB_MODE_0
	.word	SPI_MODE_MASTER
	.word	g_SpiFd
	.size	spi_Open, .-spi_Open
	.comm	g_SpiFd,4,4
	.comm	SPI_WL_32,4,4
	.comm	SPI_TURBO_OFF,4,4
	.comm	SPI_SW_CTRL_CS,4,4
	.comm	SPI_SUB_MODE_0,4,4
	.comm	SPI_RATE_20M,4,4
	.comm	SPI_MODE_MASTER,4,4
	.comm	SPI_CS_ACTIVEHIGH,4,4
	.comm	SPI_4PIN_MODE,4,4
	.comm	PRCM_SLP_MODE_CLK,4,4
	.comm	PRCM_RUN_MODE_CLK,4,4
	.comm	PRCM_LSPI,4,4
	.comm	LSPI_BASE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
