	.file	"extr_dbm.c_dbm_open.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"dbm_open(%s): Invalid number of pages: %d"
	.align 8
.LC1:
	.string	"dbm_open(%s): Invalid offset of macros array"
	.align 8
.LC2:
	.string	"dbm_open(%s): Invalid number of macros: %d"
	.align 8
.LC3:
	.string	"dbm_open(%s): Invalid offset of macro %d"
	.text
	.p2align 4
	.globl	dbm_open
	.type	dbm_open, @function
dbm_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	dbm_map@PLT
	cmp	eax, -1
	je	.L1
	mov	edi, 4
	call	dbm_getint@PLT
	mov	rdi, QWORD PTR [rax]
	call	be32toh@PLT
	mov	QWORD PTR npages[rip], rax
	test	rax, rax
	js	.L18
	mov	edi, 5
	call	dbm_getint@PLT
	mov	edi, 2
	mov	QWORD PTR pages[rip], rax
	call	dbm_getint@PLT
	mov	rdi, QWORD PTR [rax]
	call	dbm_get@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L19
	mov	rdi, QWORD PTR [rax]
	call	be32toh@PLT
	cmp	rax, QWORD PTR MACRO_MAX[rip]
	jne	.L6
	xor	r12d, r12d
	test	rax, rax
	jg	.L7
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, QWORD PTR [rbx]
	mov	rax, QWORD PTR nvals[rip]
	add	rbx, 8
	lea	r14, [rax+r12*8]
	call	be32toh@PLT
	mov	QWORD PTR [r14], rax
	mov	rax, QWORD PTR macros[rip]
	mov	QWORD PTR [rax+r12*8], rbx
	add	r12, 1
	cmp	QWORD PTR MACRO_MAX[rip], r12
	jle	.L9
.L7:
	mov	rdi, QWORD PTR 8[rbp+r12*8]
	call	dbm_get@PLT
	mov	rbx, rax
	test	rax, rax
	jne	.L8
	mov	rdx, r12
	mov	rsi, r13
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	warnx@PLT
.L4:
	xor	eax, eax
	call	dbm_unmap@PLT
	mov	eax, DWORD PTR EFTYPE[rip]
	mov	DWORD PTR errno[rip], eax
	mov	eax, -1
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	mov	rdi, QWORD PTR 0[rbp]
	call	be32toh@PLT
	mov	rsi, r13
	lea	rdi, .LC2[rip]
	mov	rdx, rax
	xor	eax, eax
	call	warnx@PLT
	jmp	.L4
.L18:
	mov	rdx, rax
	mov	rsi, r13
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	warnx@PLT
	jmp	.L4
.L19:
	mov	rsi, r13
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	warnx@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	dbm_open, .-dbm_open
	.comm	pages,8,8
	.comm	nvals,8,8
	.comm	npages,8,8
	.comm	macros,8,8
	.comm	errno,4,4
	.comm	MACRO_MAX,8,8
	.comm	EFTYPE,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_dbm.c_dbm_open.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"dbm_open(%s): Invalid number of pages: %d\000"
	.align	2
.LC1:
	.ascii	"dbm_open(%s): Invalid offset of macros array\000"
	.align	2
.LC2:
	.ascii	"dbm_open(%s): Invalid number of macros: %d\000"
	.align	2
.LC3:
	.ascii	"dbm_open(%s): Invalid offset of macro %d\000"
	.text
	.align	2
	.global	dbm_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	dbm_open, %function
dbm_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r9, r0
	bl	dbm_map
	cmn	r0, #1
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r0, #4
	bl	dbm_getint
	ldr	r0, [r0]
	bl	be32toh
	ldr	r3, .L19
	cmp	r0, #0
	str	r0, [r3]
	blt	.L17
	mov	r0, #5
	bl	dbm_getint
	mov	r2, r0
	ldr	r3, .L19+4
	mov	r0, #2
	str	r2, [r3]
	bl	dbm_getint
	ldr	r0, [r0]
	bl	dbm_get
	subs	r5, r0, #0
	beq	.L18
	ldr	r0, [r5]
	bl	be32toh
	ldr	r6, .L19+8
	ldr	r3, [r6]
	cmp	r0, r3
	bne	.L6
	cmp	r0, #0
	ble	.L9
	mov	r10, #0
	ldr	r8, .L19+12
	ldr	r7, .L19+16
	b	.L7
.L8:
	ldr	r0, [r4], #4
	ldr	fp, [r8]
	bl	be32toh
	ldr	r2, [r7]
	str	r0, [fp, r10, lsl #2]
	ldr	r3, [r6]
	str	r4, [r2, r10, lsl #2]
	add	r10, r10, #1
	cmp	r3, r10
	ble	.L9
.L7:
	ldr	r0, [r5, #4]!
	bl	dbm_get
	subs	r4, r0, #0
	bne	.L8
	mov	r2, r10
	mov	r1, r9
	ldr	r0, .L19+20
	bl	warnx
.L4:
	bl	dbm_unmap
	ldr	r2, .L19+24
	ldr	r3, .L19+28
	ldr	r2, [r2]
	mvn	r0, #0
	str	r2, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r0, [r5]
	bl	be32toh
	mov	r1, r9
	mov	r2, r0
	ldr	r0, .L19+32
	bl	warnx
	b	.L4
.L17:
	mov	r2, r0
	mov	r1, r9
	ldr	r0, .L19+36
	bl	warnx
	b	.L4
.L18:
	mov	r1, r9
	ldr	r0, .L19+40
	bl	warnx
	b	.L4
.L20:
	.align	2
.L19:
	.word	npages
	.word	pages
	.word	MACRO_MAX
	.word	nvals
	.word	macros
	.word	.LC3
	.word	EFTYPE
	.word	errno
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	dbm_open, .-dbm_open
	.comm	pages,4,4
	.comm	nvals,4,4
	.comm	npages,4,4
	.comm	macros,4,4
	.comm	errno,4,4
	.comm	MACRO_MAX,4,4
	.comm	EFTYPE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
