	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dbm_open                       ## -- Begin function dbm_open
	.p2align	4, 0x90
_dbm_open:                              ## @dbm_open
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_dbm_map
	movl	$-1, %ebx
	cmpl	$-1, %eax
	je	LBB0_14
## %bb.1:
	movl	$4, %edi
	callq	_dbm_getint
	movq	(%rax), %rdi
	callq	_be32toh
	movq	_npages@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	js	LBB0_2
## %bb.4:
	movl	$5, %edi
	callq	_dbm_getint
	movq	_pages@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$2, %edi
	callq	_dbm_getint
	movq	(%rax), %rdi
	callq	_dbm_get
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r12
	movq	(%rax), %rdi
	callq	_be32toh
	movq	_MACRO_MAX@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_15
## %bb.7:
	testq	%rax, %rax
	jle	LBB0_13
## %bb.8:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12,%r13,8), %rdi
	callq	_dbm_get
	testq	%rax, %rax
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %rbx
	movq	(%rax), %rdi
	callq	_be32toh
	movq	_nvals@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx,%r13,8)
	addq	$8, %rbx
	movq	_macros@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rbx, (%rax,%r13,8)
	incq	%r13
	cmpq	(%r14), %r13
	jl	LBB0_9
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_11
LBB0_15:
	movq	(%r12), %rdi
	callq	_be32toh
	leaq	L_.str.2(%rip), %rdi
LBB0_3:
	movq	%r15, %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_warnx
LBB0_11:
	xorl	%eax, %eax
	callq	_dbm_unmap
	movq	_EFTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_warnx
	movl	$-1, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_npages,8,3                     ## @npages
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dbm_open(%s): Invalid number of pages: %d"

	.comm	_pages,8,3                      ## @pages
L_.str.1:                               ## @.str.1
	.asciz	"dbm_open(%s): Invalid offset of macros array"

	.comm	_MACRO_MAX,8,3                  ## @MACRO_MAX
L_.str.2:                               ## @.str.2
	.asciz	"dbm_open(%s): Invalid number of macros: %d"

L_.str.3:                               ## @.str.3
	.asciz	"dbm_open(%s): Invalid offset of macro %d"

	.comm	_nvals,8,3                      ## @nvals
	.comm	_macros,8,3                     ## @macros
	.comm	_EFTYPE,4,2                     ## @EFTYPE
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dbm_open                       ; -- Begin function dbm_open
	.p2align	2
_dbm_open:                              ; @dbm_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_dbm_map
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.1:
	mov	w0, #4
	bl	_dbm_getint
	ldr	x0, [x0]
	bl	_be32toh
Lloh0:
	adrp	x8, _npages@GOTPAGE
Lloh1:
	ldr	x8, [x8, _npages@GOTPAGEOFF]
Lloh2:
	str	x0, [x8]
	tbnz	x0, #63, LBB0_9
; %bb.2:
	mov	w0, #5
	bl	_dbm_getint
Lloh3:
	adrp	x8, _pages@GOTPAGE
Lloh4:
	ldr	x8, [x8, _pages@GOTPAGEOFF]
Lloh5:
	str	x0, [x8]
	mov	w0, #2
	bl	_dbm_getint
	ldr	x0, [x0]
	bl	_dbm_get
	cbz	x0, LBB0_10
; %bb.3:
	mov	x20, x0
	ldr	x0, [x0]
	bl	_be32toh
Lloh6:
	adrp	x21, _MACRO_MAX@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MACRO_MAX@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.4:
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x22, #0
	add	x23, x20, #8
Lloh8:
	adrp	x24, _nvals@GOTPAGE
Lloh9:
	ldr	x24, [x24, _nvals@GOTPAGEOFF]
Lloh10:
	adrp	x25, _macros@GOTPAGE
Lloh11:
	ldr	x25, [x25, _macros@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23, x22, lsl #3]
	bl	_dbm_get
	cbz	x0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x20, x0
	ldr	x0, [x20], #8
	bl	_be32toh
	ldr	x8, [x24]
	lsl	x9, x22, #3
	str	x0, [x8, x9]
	ldr	x8, [x25]
	str	x20, [x8, x9]
	add	x22, x22, #1
	ldr	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_6
LBB0_8:
	mov	w0, #0
	b	LBB0_14
LBB0_9:
	str	x0, [sp]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_13
LBB0_10:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_11:
	ldr	x0, [x20]
	bl	_be32toh
	str	x0, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
	str	x22, [sp]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_13:
	mov	x1, x19
	bl	_warnx
	bl	_dbm_unmap
Lloh20:
	adrp	x8, _EFTYPE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EFTYPE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _errno@GOTPAGE
Lloh24:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh25:
	str	w8, [x9]
	mov	w0, #-1
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_npages,8,3                     ; @npages
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dbm_open(%s): Invalid number of pages: %d"

	.comm	_pages,8,3                      ; @pages
l_.str.1:                               ; @.str.1
	.asciz	"dbm_open(%s): Invalid offset of macros array"

	.comm	_MACRO_MAX,8,3                  ; @MACRO_MAX
l_.str.2:                               ; @.str.2
	.asciz	"dbm_open(%s): Invalid number of macros: %d"

l_.str.3:                               ; @.str.3
	.asciz	"dbm_open(%s): Invalid offset of macro %d"

	.comm	_nvals,8,3                      ; @nvals
	.comm	_macros,8,3                     ; @macros
	.comm	_EFTYPE,4,2                     ; @EFTYPE
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
