	.file	"extr_mlock-random-test.c_test_mlock_outof_limit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"mlock"
.LC1:
	.string	"mlock2"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"alloc_size[%d] >%u rlimit, violates test condition\n"
	.align 8
.LC3:
	.string	"%s() succeeds? on %p(%d) mlock%p(%d)\n"
	.align 8
.LC4:
	.string	"tests leads to new mlocked page: old[%d], new[%d]\n"
	.text
	.p2align 4
	.globl	test_mlock_outof_limit
	.type	test_mlock_outof_limit, @function
test_mlock_outof_limit:
.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
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	edi, DWORD PTR RLIMIT_MEMLOCK[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	lea	rsi, 20[rsp]
	call	getrlimit@PLT
	mov	edx, DWORD PTR 20[rsp]
	cmp	edx, r13d
	jge	.L16
	xor	eax, eax
	call	get_proc_locked_vm_size@PLT
	xor	edi, edi
	mov	DWORD PTR 12[rsp], eax
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	eax, DWORD PTR TEST_LOOP[rip]
	test	eax, eax
	jle	.L4
	xor	r12d, r12d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, ebx
	call	mlock@PLT
	test	eax, eax
	je	.L17
.L7:
	add	r12d, 1
	cmp	DWORD PTR TEST_LOOP[rip], r12d
	jle	.L4
.L9:
	xor	eax, eax
	call	rand@PLT
	and	eax, 1
	mov	ebp, eax
	xor	eax, eax
	call	rand@PLT
	mov	r9d, DWORD PTR 20[rsp]
	mov	ecx, r13d
	cdq
	sub	ecx, r9d
	idiv	ecx
	xor	eax, eax
	lea	ebx, [rdx+r9]
	call	rand@PLT
	mov	esi, r13d
	sub	esi, ebx
	cdq
	idiv	esi
	movsx	r15, edx
	lea	rdi, [r14+r15]
	test	ebp, ebp
	jne	.L18
	mov	edx, DWORD PTR MLOCK_ONFAULT[rip]
	mov	esi, ebx
	call	mlock2_@PLT
	test	eax, eax
	jne	.L7
.L17:
	test	ebp, ebp
	lea	rax, .LC1[rip]
	mov	r9d, ebx
	mov	ecx, r13d
	lea	rsi, .LC0[rip]
	lea	r8, [r14+r15]
	mov	rdx, r14
	cmove	rsi, rax
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	printf@PLT
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	xor	eax, eax
	call	get_proc_locked_vm_size@PLT
	cmp	DWORD PTR 12[rsp], eax
	jne	.L19
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 24[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L20
	add	rsp, 40
	.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
.L16:
	.cfi_restore_state
	mov	esi, r13d
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	printf@PLT
	mov	eax, -1
	jmp	.L1
.L19:
	mov	esi, DWORD PTR 12[rsp]
	mov	edx, eax
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	printf@PLT
	mov	eax, -1
	jmp	.L1
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	test_mlock_outof_limit, .-test_mlock_outof_limit
	.comm	TEST_LOOP,4,4
	.comm	RLIMIT_MEMLOCK,4,4
	.comm	MLOCK_ONFAULT,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_mlock-random-test.c_test_mlock_outof_limit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"mlock\000"
	.align	2
.LC1:
	.ascii	"mlock2\000"
	.align	2
.LC2:
	.ascii	"alloc_size[%d] >%u rlimit, violates test condition\012"
	.ascii	"\000"
	.global	__aeabi_idivmod
	.align	2
.LC3:
	.ascii	"%s() succeeds? on %p(%d) mlock%p(%d)\012\000"
	.align	2
.LC4:
	.ascii	"tests leads to new mlocked page: old[%d], new[%d]\012"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	test_mlock_outof_limit
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_mlock_outof_limit, %function
test_mlock_outof_limit:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r1
	ldr	r3, .L21
	sub	sp, sp, #28
	mov	r8, r0
	ldr	r0, [r3]
	ldr	r3, .L21+4
	add	r1, sp, #16
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	getrlimit
	ldr	r2, [sp, #16]
	cmp	r2, r7
	bge	.L16
	bl	get_proc_locked_vm_size
	mov	fp, r0
	ldr	r9, .L21+8
	mov	r0, #0
	str	fp, [sp, #12]
	bl	time
	bl	srand
	ldr	r3, [r9]
	cmp	r3, #0
	ble	.L4
	mov	r6, #0
	ldr	r10, .L21+12
	b	.L9
.L18:
	mov	r1, r4
	bl	mlock
	cmp	r0, #0
	beq	.L17
.L7:
	ldr	r3, [r9]
	add	r6, r6, #1
	cmp	r3, r6
	ble	.L4
.L9:
	bl	rand
	and	r5, r0, #1
	bl	rand
	ldr	r4, [sp, #16]
	sub	r1, r7, r4
	bl	__aeabi_idivmod
	add	r4, r1, r4
	bl	rand
	sub	r1, r7, r4
	bl	__aeabi_idivmod
	cmp	r5, #0
	add	fp, r8, r1
	mov	r0, fp
	bne	.L18
	mov	r1, r4
	ldr	r2, [r10]
	bl	mlock2_
	cmp	r0, #0
	bne	.L7
.L17:
	ldr	r0, .L21+16
	cmp	r5, #0
	ldr	r1, .L21+20
	mov	r3, r7
	movne	r1, r0
	mov	r2, r8
	ldr	r0, .L21+24
	str	r4, [sp, #4]
	str	fp, [sp]
	bl	printf
	mvn	r0, #0
	b	.L1
.L4:
	bl	get_proc_locked_vm_size
	ldr	r3, [sp, #12]
	cmp	r3, r0
	moveq	r0, #0
	bne	.L19
.L1:
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	mov	r1, r7
	ldr	r0, .L21+28
	bl	printf
	mvn	r0, #0
	b	.L1
.L19:
	mov	r2, r0
	mov	r1, r3
	ldr	r0, .L21+32
	bl	printf
	mvn	r0, #0
	b	.L1
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	RLIMIT_MEMLOCK
	.word	.LC5
	.word	TEST_LOOP
	.word	MLOCK_ONFAULT
	.word	.LC0
	.word	.LC1
	.word	.LC3
	.word	.LC2
	.word	.LC4
	.size	test_mlock_outof_limit, .-test_mlock_outof_limit
	.comm	TEST_LOOP,4,4
	.comm	RLIMIT_MEMLOCK,4,4
	.comm	MLOCK_ONFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
