	.file	"extr_pshrec.c_ps_mask_table_set_bits.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ps_mask_table_set_bits, @function
ps_mask_table_set_bits:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	mov	esi, r8d
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, r8d
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, ecx
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rdx, rsp
	call	ps_mask_table_last@PLT
	test	rax, rax
	je	.L15
.L2:
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L16
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rdi, QWORD PTR [rsp]
	mov	edx, r12d
	mov	esi, ebx
	call	ps_mask_ensure@PLT
	test	rax, rax
	jne	.L1
	mov	edx, ebp
	mov	rdi, QWORD PTR [rsp]
	mov	ecx, ebp
	mov	esi, 128
	sar	edx, 3
	and	ecx, 7
	movsx	rdx, edx
	sar	esi, cl
	mov	DWORD PTR [rdi], ebx
	mov	r8, QWORD PTR 8[rdi]
	lea	r9, 0[r13+rdx*4]
	mov	ecx, 128
	test	ebx, ebx
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR [r8]
	mov	edi, ecx
	not	edi
	and	edi, edx
	or	edx, ecx
	test	DWORD PTR [r9], esi
	cmove	edx, edi
	sar	esi
	mov	DWORD PTR [r8], edx
	jne	.L6
	add	r9, 4
	mov	esi, 128
.L6:
	sar	ecx
	jne	.L7
	add	r8, 4
	mov	ecx, 128
.L7:
	sub	ebx, 1
	jne	.L3
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ps_mask_table_set_bits, .-ps_mask_table_set_bits
	.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_pshrec.c_ps_mask_table_set_bits.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ps_mask_table_set_bits, %function
ps_mask_table_set_bits:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	sub	sp, sp, #12
	ldr	r7, [sp, #32]
	mov	r4, r3
	ldr	r3, .L16
	mov	r5, r1
	mov	r6, r2
	mov	r1, r7
	mov	r2, sp
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	ps_mask_table_last
	cmp	r0, #0
	beq	.L14
.L2:
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L14:
	mov	r2, r7
	mov	r1, r4
	ldr	r0, [sp]
	bl	ps_mask_ensure
	cmp	r0, #0
	bne	.L1
	mov	ip, #128
	ldr	r3, [sp]
	and	lr, r6, #7
	asr	r1, r6, #3
	cmp	r4, #0
	add	r1, r5, r1, lsl #2
	asr	lr, ip, lr
	ldr	r5, [r3, #4]
	str	r4, [r3]
	ble	.L1
.L3:
	ldr	r2, [r1]
	ldr	r3, [r5]
	tst	lr, r2
	biceq	r3, r3, ip
	orrne	r3, r3, ip
	asrs	lr, lr, #1
	moveq	lr, #128
	addeq	r1, r1, #4
	asrs	ip, ip, #1
	moveq	ip, #128
	str	r3, [r5]
	addeq	r5, r5, #4
	subs	r4, r4, #1
	bne	.L3
	b	.L1
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.size	ps_mask_table_set_bits, .-ps_mask_table_set_bits
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
