	.file	"143042.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"usage: %s dlfilename dlflags [ ... ]\n"
.LC1:
	.string	"verify"
.LC2:
	.string	"self"
.LC3:
	.string	"dlrun verify self ok"
.LC4:
	.string	"-"
.LC5:
	.string	"error loading %s (%d|%s): %s"
.LC6:
	.string	"dlmain"
.LC7:
	.string	"no dlmain symbol"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	cmp	DWORD PTR -52[rbp], 2
	jg	.L2
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L4
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -52[rbp]
	sub	eax, 2
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L6
.L5:
	mov	eax, 1
.L6:
	mov	DWORD PTR -40[rbp], eax
	mov	DWORD PTR -44[rbp], 3
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	lea	rcx, -16[rdx]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	add	DWORD PTR -44[rbp], 1
.L7:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jl	.L8
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	dlopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L9
	call	dlerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rdi, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	r9, rsi
	mov	r8, rdi
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L3
.L9:
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	dlsym@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L3
.L10:
	mov	eax, DWORD PTR -52[rbp]
	lea	ecx, -2[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rax
	mov	edi, ecx
	call	rdx
	mov	DWORD PTR -36[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	dlclose@PLT
	mov	eax, DWORD PTR -36[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"143042.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s dlfilename dlflags [ ... ]\012\000"
	.align	2
.LC1:
	.ascii	"verify\000"
	.align	2
.LC2:
	.ascii	"self\000"
	.align	2
.LC3:
	.ascii	"dlrun verify self ok\000"
	.align	2
.LC4:
	.ascii	"-\000"
	.align	2
.LC5:
	.ascii	"error loading %s (%d|%s): %s\000"
	.align	2
.LC6:
	.ascii	"dlmain\000"
	.align	2
.LC7:
	.ascii	"no dlmain symbol\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	bgt	.L2
	ldr	r3, .L11
	ldr	r0, [r3]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L11+4
	bl	fprintf
	mov	r3, #1
	b	.L3
.L2:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L11+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L11+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L11+16
	bl	puts
	mov	r3, #0
	b	.L3
.L4:
	ldr	r3, [fp, #-48]
	sub	r3, r3, #2
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-52]
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L11+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	b	.L6
.L5:
	mov	r3, #1
.L6:
	str	r3, [fp, #-28]
	mov	r3, #3
	str	r3, [fp, #-40]
	b	.L7
.L8:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r2, r2, r3
	ldr	r3, [fp, #-40]
	sub	r3, r3, #-1073741822
	lsl	r3, r3, #2
	ldr	r1, [fp, #-36]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L7:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	blt	.L8
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-32]
	bl	dlopen
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L11
	ldr	r5, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r4, [r3]
	bl	dlerror
	mov	r3, r0
	str	r3, [sp, #4]
	str	r4, [sp]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-32]
	ldr	r1, .L11+24
	mov	r0, r5
	bl	fprintf
	mov	r3, #1
	b	.L3
.L9:
	ldr	r1, .L11+28
	ldr	r0, [fp, #-24]
	bl	dlsym
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L11
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L11+32
	bl	fwrite
	mov	r3, #1
	b	.L3
.L10:
	ldr	r3, [fp, #-48]
	sub	r2, r3, #2
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-36]
	mov	r0, r2
	blx	r3
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	dlclose
	ldr	r3, [fp, #-16]
.L3:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L12:
	.align	2
.L11:
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
