	.file	"extr_pcnt.c_pcnt_set_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pcnt_set_mode
	.type	pcnt_set_mode, @function
pcnt_set_mode:
.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
	mov	r14, rdx
	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, r8
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r9
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edx, DWORD PTR ESP_ERR_INVALID_ARG[rip]
	mov	esi, DWORD PTR PCNT_UNIT_ERR_STR[rip]
	cmp	QWORD PTR PCNT_UNIT_MAX[rip], rdi
	seta	dil
	movzx	edi, dil
	call	PCNT_CHECK@PLT
	mov	edx, DWORD PTR ESP_ERR_INVALID_ARG[rip]
	mov	esi, DWORD PTR PCNT_CHANNEL_ERR_STR[rip]
	xor	edi, edi
	cmp	QWORD PTR PCNT_CHANNEL_MAX[rip], r15
	setg	dil
	call	PCNT_CHECK@PLT
	cmp	r14, r13
	mov	rax, r13
	mov	edx, DWORD PTR ESP_ERR_INVALID_ARG[rip]
	cmovge	rax, r14
	mov	esi, DWORD PTR PCNT_COUNT_MODE_ERR_STR[rip]
	xor	edi, edi
	cmp	QWORD PTR PCNT_COUNT_MAX[rip], rax
	setg	dil
	call	PCNT_CHECK@PLT
	cmp	r12, rbp
	mov	rax, rbp
	mov	edx, DWORD PTR ESP_ERR_INVALID_ARG[rip]
	cmovge	rax, r12
	mov	esi, DWORD PTR PCNT_CTRL_MODE_ERR_STR[rip]
	xor	edi, edi
	cmp	QWORD PTR PCNT_MODE_MAX[rip], rax
	setg	dil
	sal	rbx, 6
	call	PCNT_CHECK@PLT
	add	rbx, QWORD PTR PCNT[rip]
	test	r15, r15
	jne	.L2
	mov	QWORD PTR 56[rbx], r14
	mov	QWORD PTR 48[rbx], r13
	mov	QWORD PTR 40[rbx], r12
	mov	QWORD PTR 32[rbx], rbp
.L3:
	mov	eax, DWORD PTR ESP_OK[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	mov	QWORD PTR 24[rbx], r14
	mov	QWORD PTR 16[rbx], r13
	mov	QWORD PTR 8[rbx], r12
	mov	QWORD PTR [rbx], rbp
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	pcnt_set_mode, .-pcnt_set_mode
	.comm	PCNT_UNIT_MAX,8,8
	.comm	PCNT_UNIT_ERR_STR,4,4
	.comm	PCNT_MODE_MAX,8,8
	.comm	PCNT_CTRL_MODE_ERR_STR,4,4
	.comm	PCNT_COUNT_MODE_ERR_STR,4,4
	.comm	PCNT_COUNT_MAX,8,8
	.comm	PCNT_CHANNEL_MAX,8,8
	.comm	PCNT_CHANNEL_ERR_STR,4,4
	.comm	PCNT,8,8
	.comm	ESP_OK,4,4
	.comm	ESP_ERR_INVALID_ARG,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_pcnt.c_pcnt_set_mode.c"
	.text
	.align	2
	.global	pcnt_set_mode
	.syntax unified
	.arm
	.fpu softvfp
	.type	pcnt_set_mode, %function
pcnt_set_mode:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	mov	r7, r1
	mov	r5, r2
	mov	r4, r3
	ldr	r3, .L6
	ldr	r8, .L6+4
	ldr	r0, [r3]
	ldr	r3, .L6+8
	cmp	r0, r6
	movls	r0, #0
	movhi	r0, #1
	ldr	r2, [r8]
	ldr	r1, [r3]
	ldr	r10, [sp, #32]
	ldr	r9, [sp, #36]
	bl	PCNT_CHECK
	ldr	r2, .L6+12
	ldr	r3, .L6+16
	ldr	r0, [r2]
	ldr	r1, [r3]
	cmp	r0, r7
	movle	r0, #0
	movgt	r0, #1
	ldr	r2, [r8]
	bl	PCNT_CHECK
	cmp	r5, r4
	movge	r3, r5
	movlt	r3, r4
	ldr	r1, .L6+20
	ldr	r2, .L6+24
	ldr	r0, [r1]
	ldr	r1, [r2]
	cmp	r0, r3
	movle	r0, #0
	movgt	r0, #1
	ldr	r2, [r8]
	bl	PCNT_CHECK
	cmp	r10, r9
	movge	r1, r10
	movlt	r1, r9
	ldr	r2, .L6+28
	ldr	r3, .L6+32
	ldr	r0, [r2]
	ldr	r2, [r8]
	cmp	r0, r1
	movle	r0, #0
	movgt	r0, #1
	ldr	r1, [r3]
	bl	PCNT_CHECK
	ldr	r2, .L6+36
	lsl	r3, r6, #5
	ldr	r2, [r2]
	cmp	r7, #0
	add	r3, r2, r3
	strne	r5, [r3, #12]
	strne	r4, [r3, #8]
	strne	r10, [r3, #4]
	streq	r5, [r3, #28]
	streq	r4, [r3, #24]
	streq	r10, [r3, #20]
	streq	r9, [r3, #16]
	ldr	r3, .L6+40
	strne	r9, [r2, r6, lsl #5]
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	.align	2
.L6:
	.word	PCNT_UNIT_MAX
	.word	ESP_ERR_INVALID_ARG
	.word	PCNT_UNIT_ERR_STR
	.word	PCNT_CHANNEL_MAX
	.word	PCNT_CHANNEL_ERR_STR
	.word	PCNT_COUNT_MAX
	.word	PCNT_COUNT_MODE_ERR_STR
	.word	PCNT_MODE_MAX
	.word	PCNT_CTRL_MODE_ERR_STR
	.word	PCNT
	.word	ESP_OK
	.size	pcnt_set_mode, .-pcnt_set_mode
	.comm	PCNT_UNIT_MAX,4,4
	.comm	PCNT_UNIT_ERR_STR,4,4
	.comm	PCNT_MODE_MAX,4,4
	.comm	PCNT_CTRL_MODE_ERR_STR,4,4
	.comm	PCNT_COUNT_MODE_ERR_STR,4,4
	.comm	PCNT_COUNT_MAX,4,4
	.comm	PCNT_CHANNEL_MAX,4,4
	.comm	PCNT_CHANNEL_ERR_STR,4,4
	.comm	PCNT,4,4
	.comm	ESP_OK,4,4
	.comm	ESP_ERR_INVALID_ARG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
