	.file	"930715.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"reldepmod1.so"
	.align 8
.LC1:
	.string	"cannot open reldepmod1.so: %s\n"
.LC2:
	.string	"reldepmod4.so"
	.align 8
.LC3:
	.string	"cannot open reldepmod4.so: %s\n"
.LC4:
	.string	"some_var"
	.align 8
.LC5:
	.string	"cannot get address of \"some_var\": %s\n"
.LC6:
	.string	"call_me"
	.align 8
.LC7:
	.string	"cannot get address of \"call_me\": %s\n"
	.align 8
.LC8:
	.string	"function \"call_me\" returned wrong result"
.LC9:
	.string	"closing h1 failed: %s\n"
	.align 8
.LC10:
	.string	"cannot open reldepmod1.so the second time: %s\n"
	.align 8
.LC11:
	.string	"cannot get address of \"some_var\" the second time: %s\n"
.LC12:
	.string	"variable \"some_var\" not reset"
.LC13:
	.string	"closing h2 failed: %s\n"
	.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, 32
	call	mtrace@PLT
	mov	esi, 257
	lea	rdi, .LC0[rip]
	call	dlopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L2
	call	dlerror@PLT
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	dlopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L3
	call	dlerror@PLT
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	dlsym@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L4
	call	dlerror@PLT
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], 42
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	dlsym@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L5
	call	dlerror@PLT
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR -8[rbp]
	call	rax
	test	eax, eax
	je	.L6
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	dlclose@PLT
	test	eax, eax
	je	.L7
	call	dlerror@PLT
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	esi, 257
	lea	rdi, .LC0[rip]
	call	dlopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L8
	call	dlerror@PLT
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	dlsym@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L9
	call	dlerror@PLT
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L10
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	dlclose@PLT
	test	eax, eax
	je	.L11
	call	dlerror@PLT
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dlclose@PLT
	test	eax, eax
	je	.L12
	call	dlerror@PLT
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	eax, 0
	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	"930715.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"reldepmod1.so\000"
	.align	2
.LC1:
	.ascii	"cannot open reldepmod1.so: %s\012\000"
	.align	2
.LC2:
	.ascii	"reldepmod4.so\000"
	.align	2
.LC3:
	.ascii	"cannot open reldepmod4.so: %s\012\000"
	.align	2
.LC4:
	.ascii	"some_var\000"
	.align	2
.LC5:
	.ascii	"cannot get address of \"some_var\": %s\012\000"
	.align	2
.LC6:
	.ascii	"call_me\000"
	.align	2
.LC7:
	.ascii	"cannot get address of \"call_me\": %s\012\000"
	.align	2
.LC8:
	.ascii	"function \"call_me\" returned wrong result\000"
	.align	2
.LC9:
	.ascii	"closing h1 failed: %s\012\000"
	.align	2
.LC10:
	.ascii	"cannot open reldepmod1.so the second time: %s\012\000"
	.align	2
.LC11:
	.ascii	"cannot get address of \"some_var\" the second time:"
	.ascii	" %s\012\000"
	.align	2
.LC12:
	.ascii	"variable \"some_var\" not reset\000"
	.align	2
.LC13:
	.ascii	"closing h2 failed: %s\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	bl	mtrace
	ldr	r1, .L14
	ldr	r0, .L14+4
	bl	dlopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L2
	bl	dlerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+8
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	mov	r1, #1
	ldr	r0, .L14+12
	bl	dlopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L3
	bl	dlerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+16
	bl	printf
	mov	r0, #1
	bl	exit
.L3:
	ldr	r1, .L14+20
	ldr	r0, [fp, #-20]
	bl	dlsym
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L4
	bl	dlerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+24
	bl	printf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, [fp, #-12]
	mov	r2, #42
	str	r2, [r3]
	ldr	r1, .L14+28
	ldr	r0, [fp, #-16]
	bl	dlsym
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L5
	bl	dlerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+32
	bl	printf
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-8]
	blx	r3
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r0, .L14+36
	bl	puts
	mov	r0, #1
	bl	exit
.L6:
	ldr	r0, [fp, #-20]
	bl	dlclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	bl	dlerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+40
	bl	printf
	mov	r0, #1
	bl	exit
.L7:
	ldr	r1, .L14
	ldr	r0, .L14+4
	bl	dlopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L8
	bl	dlerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+44
	bl	printf
	mov	r0, #1
	bl	exit
.L8:
	ldr	r1, .L14+20
	ldr	r0, [fp, #-20]
	bl	dlsym
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L9
	bl	dlerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+48
	bl	printf
	mov	r0, #1
	bl	exit
.L9:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L10
	ldr	r0, .L14+52
	bl	puts
	mov	r0, #1
	bl	exit
.L10:
	ldr	r0, [fp, #-20]
	bl	dlclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	bl	dlerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+40
	bl	printf
	mov	r0, #1
	bl	exit
.L11:
	ldr	r0, [fp, #-16]
	bl	dlclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	bl	dlerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+56
	bl	printf
	mov	r0, #1
	bl	exit
.L12:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	257
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
