	.file	"extr_extint.c_extint_register.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ExtInt vector %d < 16, use a Pin object"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"ExtInt vector %d >= max of %d"
.LC2:
	.string	"invalid ExtInt Mode: %d"
.LC3:
	.string	"invalid ExtInt Pull: %d"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"ExtInt vector %d is already in use"
	.text
	.p2align 4
	.globl	extint_register
	.type	extint_register, @function
extint_register:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	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
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	DWORD PTR 8[rsp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	mp_obj_is_int@PLT
	mov	rdi, r12
	test	rax, rax
	je	.L2
	call	mp_obj_get_int@PLT
	mov	r12d, eax
	cmp	eax, 15
	jle	.L23
	mov	ecx, DWORD PTR EXTI_NUM_VECTORS[rip]
	xor	r14d, r14d
	cmp	ecx, r12d
	jle	.L24
.L4:
	cmp	DWORD PTR GPIO_MODE_IT_RISING[rip], ebp
	je	.L5
	cmp	DWORD PTR GPIO_MODE_IT_FALLING[rip], ebp
	je	.L5
	cmp	DWORD PTR GPIO_MODE_IT_RISING_FALLING[rip], ebp
	je	.L5
	cmp	DWORD PTR GPIO_MODE_EVT_RISING[rip], ebp
	je	.L5
	cmp	DWORD PTR GPIO_MODE_EVT_FALLING[rip], ebp
	je	.L5
	cmp	DWORD PTR GPIO_MODE_EVT_RISING_FALLING[rip], ebp
	je	.L5
	lea	rdi, mp_type_ValueError[rip]
	mov	edx, ebp
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	mp_obj_new_exception_msg_varg@PLT
	mov	edi, eax
	call	nlr_raise@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	DWORD PTR GPIO_NOPULL[rip], ebx
	je	.L6
	cmp	DWORD PTR GPIO_PULLUP[rip], ebx
	je	.L6
	cmp	DWORD PTR GPIO_PULLDOWN[rip], ebx
	je	.L6
	lea	rdi, mp_type_ValueError[rip]
	mov	edx, ebx
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	mp_obj_new_exception_msg_varg@PLT
	mov	edi, eax
	call	nlr_raise@PLT
.L6:
	mov	edi, DWORD PTR pyb_extint_callback[rip]
	movsx	r15, r12d
	call	MP_STATE_PORT@PLT
	lea	r8, [rax+r15*8]
	mov	eax, DWORD PTR 8[rsp]
	test	eax, eax
	jne	.L7
	mov	rax, QWORD PTR mp_const_none[rip]
	cmp	QWORD PTR [r8], rax
	je	.L7
	cmp	rax, r13
	jne	.L25
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, r12d
	mov	QWORD PTR 8[rsp], r8
	call	extint_disable@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	eax, DWORD PTR EXTI_Mode_Interrupt[rip]
	test	ebp, 65536
	mov	rsi, QWORD PTR pyb_extint_mode[rip]
	cmove	eax, DWORD PTR EXTI_Mode_Event[rip]
	lea	rdx, 0[0+r15*4]
	mov	QWORD PTR [r8], r13
	cmp	QWORD PTR mp_const_none[rip], r13
	mov	DWORD PTR [rsi+r15*4], eax
	je	.L1
	mov	rax, QWORD PTR pyb_extint_hard_irq[rip]
	add	rdx, QWORD PTR pyb_extint_callback_arg[rip]
	mov	edi, r12d
	mov	r13, rdx
	mov	DWORD PTR [rax+r15*4], 1
	call	MP_OBJ_NEW_SMALL_INT@PLT
	mov	DWORD PTR 0[r13], eax
	test	r14, r14
	je	.L26
	mov	edi, DWORD PTR 4[r14]
	call	mp_hal_gpio_clock_enable@PLT
	mov	eax, DWORD PTR 8[r14]
	mov	edi, DWORD PTR 4[r14]
	lea	rsi, 16[rsp]
	mov	DWORD PTR 16[rsp], ebp
	mov	DWORD PTR 28[rsp], eax
	mov	eax, DWORD PTR GPIO_SPEED_FREQ_HIGH[rip]
	mov	DWORD PTR 20[rsp], ebx
	mov	DWORD PTR 24[rsp], eax
	call	HAL_GPIO_Init@PLT
.L12:
	mov	rax, QWORD PTR nvic_irq_channel[rip]
	mov	ebp, DWORD PTR IRQ_PRI_EXTINT[rip]
	mov	edi, DWORD PTR [rax+r15*4]
	call	IRQn_NONNEG@PLT
	mov	esi, ebp
	mov	edi, eax
	call	NVIC_SetPriority@PLT
	mov	rax, QWORD PTR nvic_irq_channel[rip]
	mov	edi, DWORD PTR [rax+r15*4]
	call	HAL_NVIC_EnableIRQ@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	call	pin_find@PLT
	mov	r12d, DWORD PTR [rax]
	mov	r14, rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L23:
	mov	edx, eax
	lea	rsi, .LC0[rip]
	xor	eax, eax
	xor	r14d, r14d
	lea	rdi, mp_type_ValueError[rip]
	call	mp_obj_new_exception_msg_varg@PLT
	mov	edi, eax
	call	nlr_raise@PLT
	mov	ecx, DWORD PTR EXTI_NUM_VECTORS[rip]
	cmp	ecx, r12d
	jg	.L4
.L24:
	mov	edx, r12d
	lea	rsi, .LC1[rip]
	lea	rdi, mp_type_ValueError[rip]
	xor	eax, eax
	call	mp_obj_new_exception_msg_varg@PLT
	mov	edi, eax
	call	nlr_raise@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edx, r12d
	lea	rsi, .LC4[rip]
	xor	eax, eax
	mov	QWORD PTR 8[rsp], r8
	lea	rdi, mp_type_ValueError[rip]
	call	mp_obj_new_exception_msg_varg@PLT
	mov	edi, eax
	call	nlr_raise@PLT
	mov	r8, QWORD PTR 8[rsp]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edi, r12d
	mov	esi, ebp
	call	extint_trigger_mode@PLT
	mov	edi, r12d
	call	extint_enable@PLT
	jmp	.L12
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	extint_register, .-extint_register
	.comm	pyb_extint_mode,8,8
	.comm	pyb_extint_hard_irq,8,8
	.comm	pyb_extint_callback_arg,8,8
	.comm	pyb_extint_callback,4,4
	.comm	nvic_irq_channel,8,8
	.comm	mp_type_ValueError,4,4
	.comm	mp_const_none,8,8
	.comm	IRQ_PRI_EXTINT,4,4
	.comm	GPIO_SPEED_FREQ_HIGH,4,4
	.comm	GPIO_PULLUP,4,4
	.comm	GPIO_PULLDOWN,4,4
	.comm	GPIO_NOPULL,4,4
	.comm	GPIO_MODE_IT_RISING_FALLING,4,4
	.comm	GPIO_MODE_IT_RISING,4,4
	.comm	GPIO_MODE_IT_FALLING,4,4
	.comm	GPIO_MODE_EVT_RISING_FALLING,4,4
	.comm	GPIO_MODE_EVT_RISING,4,4
	.comm	GPIO_MODE_EVT_FALLING,4,4
	.comm	EXTI_NUM_VECTORS,4,4
	.comm	EXTI_Mode_Interrupt,4,4
	.comm	EXTI_Mode_Event,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_extint.c_extint_register.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ExtInt vector %d < 16, use a Pin object\000"
	.align	2
.LC1:
	.ascii	"ExtInt vector %d >= max of %d\000"
	.align	2
.LC2:
	.ascii	"invalid ExtInt Mode: %d\000"
	.align	2
.LC3:
	.ascii	"invalid ExtInt Pull: %d\000"
	.align	2
.LC4:
	.ascii	"ExtInt vector %d is already in use\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	extint_register
	.syntax unified
	.arm
	.fpu softvfp
	.type	extint_register, %function
extint_register:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r3
	ldr	r3, .L27
	sub	sp, sp, #28
	mov	r4, r0
	mov	r5, r1
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	fp, [sp, #64]
	bl	mp_obj_is_int
	cmp	r0, #0
	mov	r0, r4
	beq	.L2
	bl	mp_obj_get_int
	cmp	r0, #15
	mov	r4, r0
	ble	.L22
.L3:
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, r4
	movgt	r10, #0
	ble	.L23
.L4:
	ldr	r3, .L27+8
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L5
	ldr	r3, .L27+12
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L5
	ldr	r3, .L27+16
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L5
	ldr	r3, .L27+20
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L5
	ldr	r3, .L27+24
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L5
	ldr	r3, .L27+28
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L5
	mov	r2, r5
	ldr	r1, .L27+32
	ldr	r0, .L27+36
	bl	mp_obj_new_exception_msg_varg
	bl	nlr_raise
.L5:
	ldr	r3, .L27+40
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L6
	ldr	r3, .L27+44
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L6
	ldr	r3, .L27+48
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L6
	mov	r2, r6
	ldr	r1, .L27+52
	ldr	r0, .L27+36
	bl	mp_obj_new_exception_msg_varg
	bl	nlr_raise
.L6:
	ldr	r3, .L27+56
	lsl	r8, r4, #2
	ldr	r0, [r3]
	bl	MP_STATE_PORT
	cmp	fp, #0
	mov	r9, r0
	ldr	fp, .L27+60
	bne	.L7
	ldr	r2, [r0, r4, lsl #2]
	ldr	r3, [fp]
	cmp	r2, r3
	cmpne	r3, r7
	bne	.L24
.L7:
	mov	r0, r4
	bl	extint_disable
	tst	r5, #65536
	ldrne	r3, .L27+64
	ldreq	r3, .L27+68
	str	r7, [r9, r8]
	ldr	r2, [r3]
	ldr	r3, .L27+72
	ldr	r1, [fp]
	ldr	r3, [r3]
	cmp	r1, r7
	str	r2, [r3, r8]
	beq	.L1
	mov	r2, #1
	ldr	r3, .L27+76
	ldr	r1, .L27+80
	ldr	r3, [r3]
	ldr	r7, [r1]
	mov	r0, r4
	str	r2, [r3, r8]
	bl	MP_OBJ_NEW_SMALL_INT
	cmp	r10, #0
	str	r0, [r7, r8]
	beq	.L25
	ldr	r0, [r10, #4]
	bl	mp_hal_gpio_clock_enable
	ldr	r2, .L27+84
	ldr	r3, [r10, #8]
	ldr	r2, [r2]
	ldr	r0, [r10, #4]
	add	r1, sp, #4
	str	r5, [sp, #4]
	str	r6, [sp, #8]
	str	r2, [sp, #12]
	str	r3, [sp, #16]
	bl	HAL_GPIO_Init
.L12:
	ldr	r5, .L27+88
	ldr	r3, [r5]
	ldr	r0, [r3, r8]
	bl	IRQn_NONNEG
	ldr	r3, .L27+92
	ldr	r1, [r3]
	bl	NVIC_SetPriority
	ldr	r3, [r5]
	ldr	r0, [r3, r8]
	bl	HAL_NVIC_EnableIRQ
.L1:
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L26
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	bl	pin_find
	mov	r10, r0
	ldr	r4, [r0]
	b	.L4
.L22:
	mov	r2, r0
	ldr	r1, .L27+96
	ldr	r0, .L27+36
	bl	mp_obj_new_exception_msg_varg
	bl	nlr_raise
	b	.L3
.L23:
	mov	r2, r4
	ldr	r1, .L27+100
	ldr	r0, .L27+36
	bl	mp_obj_new_exception_msg_varg
	bl	nlr_raise
	mov	r10, #0
	b	.L4
.L24:
	mov	r2, r4
	ldr	r1, .L27+104
	ldr	r0, .L27+36
	bl	mp_obj_new_exception_msg_varg
	bl	nlr_raise
	b	.L7
.L25:
	mov	r1, r5
	mov	r0, r4
	bl	extint_trigger_mode
	mov	r0, r4
	bl	extint_enable
	b	.L12
.L26:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC5
	.word	EXTI_NUM_VECTORS
	.word	GPIO_MODE_IT_RISING
	.word	GPIO_MODE_IT_FALLING
	.word	GPIO_MODE_IT_RISING_FALLING
	.word	GPIO_MODE_EVT_RISING
	.word	GPIO_MODE_EVT_FALLING
	.word	GPIO_MODE_EVT_RISING_FALLING
	.word	.LC2
	.word	mp_type_ValueError
	.word	GPIO_NOPULL
	.word	GPIO_PULLUP
	.word	GPIO_PULLDOWN
	.word	.LC3
	.word	pyb_extint_callback
	.word	mp_const_none
	.word	EXTI_Mode_Interrupt
	.word	EXTI_Mode_Event
	.word	pyb_extint_mode
	.word	pyb_extint_hard_irq
	.word	pyb_extint_callback_arg
	.word	GPIO_SPEED_FREQ_HIGH
	.word	nvic_irq_channel
	.word	IRQ_PRI_EXTINT
	.word	.LC0
	.word	.LC1
	.word	.LC4
	.size	extint_register, .-extint_register
	.comm	pyb_extint_mode,4,4
	.comm	pyb_extint_hard_irq,4,4
	.comm	pyb_extint_callback_arg,4,4
	.comm	pyb_extint_callback,4,4
	.comm	nvic_irq_channel,4,4
	.comm	mp_type_ValueError,4,4
	.comm	mp_const_none,4,4
	.comm	IRQ_PRI_EXTINT,4,4
	.comm	GPIO_SPEED_FREQ_HIGH,4,4
	.comm	GPIO_PULLUP,4,4
	.comm	GPIO_PULLDOWN,4,4
	.comm	GPIO_NOPULL,4,4
	.comm	GPIO_MODE_IT_RISING_FALLING,4,4
	.comm	GPIO_MODE_IT_RISING,4,4
	.comm	GPIO_MODE_IT_FALLING,4,4
	.comm	GPIO_MODE_EVT_RISING_FALLING,4,4
	.comm	GPIO_MODE_EVT_RISING,4,4
	.comm	GPIO_MODE_EVT_FALLING,4,4
	.comm	EXTI_NUM_VECTORS,4,4
	.comm	EXTI_Mode_Interrupt,4,4
	.comm	EXTI_Mode_Event,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
