	.file	"extr_spi.c_spi_find_index.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"SPI(%s) doesn't exist"
.LC1:
	.string	"SPI(%d) doesn't exist"
	.text
	.p2align 4
	.globl	spi_find_index
	.type	spi_find_index, @function
spi_find_index:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	mp_obj_is_str@PLT
	mov	edi, ebp
	test	rax, rax
	je	.L2
	call	mp_obj_str_get_str@PLT
	lea	rdi, mp_type_ValueError[rip]
	lea	rsi, .LC0[rip]
	mov	rdx, rax
	xor	eax, eax
	call	mp_obj_new_exception_msg_varg@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	edi, eax
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	nlr_raise@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	call	mp_obj_get_int@PLT
	mov	r12d, eax
	test	eax, eax
	jle	.L3
	mov	rdi, QWORD PTR spi_obj[rip]
	call	MP_ARRAY_SIZE@PLT
	cmp	eax, r12d
	jl	.L3
	mov	rdx, QWORD PTR spi_obj[rip]
	movsx	rax, r12d
	cmp	QWORD PTR -8[rdx+rax*8], 0
	je	.L3
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	edx, r12d
	lea	rdi, mp_type_ValueError[rip]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	mp_obj_new_exception_msg_varg@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	edi, eax
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	nlr_raise@PLT
	.cfi_endproc
.LFE0:
	.size	spi_find_index, .-spi_find_index
	.comm	spi_obj,8,8
	.comm	mp_type_ValueError,4,4
	.comm	MICROPY_HW_SPI6_NAME,4,4
	.comm	MICROPY_HW_SPI5_NAME,4,4
	.comm	MICROPY_HW_SPI4_NAME,4,4
	.comm	MICROPY_HW_SPI3_NAME,4,4
	.comm	MICROPY_HW_SPI2_NAME,4,4
	.comm	MICROPY_HW_SPI1_NAME,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_spi.c_spi_find_index.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"SPI(%s) doesn't exist\000"
	.align	2
.LC1:
	.ascii	"SPI(%d) doesn't exist\000"
	.text
	.align	2
	.global	spi_find_index
	.syntax unified
	.arm
	.fpu softvfp
	.type	spi_find_index, %function
spi_find_index:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	mp_obj_is_str
	cmp	r0, #0
	mov	r0, r4
	beq	.L2
	bl	mp_obj_str_get_str
	ldr	r1, .L10
	mov	r2, r0
	ldr	r0, .L10+4
	bl	mp_obj_new_exception_msg_varg
	pop	{r4, r5, r6, lr}
	b	nlr_raise
.L2:
	bl	mp_obj_get_int
	subs	r4, r0, #0
	ble	.L3
	ldr	r5, .L10+8
	ldr	r0, [r5]
	bl	MP_ARRAY_SIZE
	cmp	r0, r4
	blt	.L3
	ldr	r3, [r5]
	sub	r2, r4, #-1073741823
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	beq	.L3
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L3:
	mov	r2, r4
	ldr	r1, .L10+12
	ldr	r0, .L10+4
	bl	mp_obj_new_exception_msg_varg
	pop	{r4, r5, r6, lr}
	b	nlr_raise
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	mp_type_ValueError
	.word	spi_obj
	.word	.LC1
	.size	spi_find_index, .-spi_find_index
	.comm	spi_obj,4,4
	.comm	mp_type_ValueError,4,4
	.comm	MICROPY_HW_SPI6_NAME,4,4
	.comm	MICROPY_HW_SPI5_NAME,4,4
	.comm	MICROPY_HW_SPI4_NAME,4,4
	.comm	MICROPY_HW_SPI3_NAME,4,4
	.comm	MICROPY_HW_SPI2_NAME,4,4
	.comm	MICROPY_HW_SPI1_NAME,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
