	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_db_last                        ## -- Begin function db_last
	.p2align	4, 0x90
_db_last:                               ## @db_last
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	(%rbx), %rax
	movq	_OOBLNO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	leaq	-40(%rbp), %rax
	movq	%rax, -56(%rbp)
	movl	$8, -48(%rbp)
	movq	40(%rbx), %rdi
	movq	_R_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	callq	*(%rdi)
	cmpl	$1, %eax
	je	LBB0_8
## %bb.6:
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.7:
	movq	_M_SYSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_msgq
	movq	$0, (%r14)
	movl	$1, %ebx
	jmp	LBB0_16
LBB0_1:
	movq	_EXM_NOFILEYET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ex_emsg
	movl	$1, %ebx
	jmp	LBB0_16
LBB0_3:
	movq	%rax, (%r14)
	movq	_SC_TINPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_F_ISSET
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_16
## %bb.4:
	movl	(%r12), %edi
	movq	__texth@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_TAILQ_LAST
	movq	(%rax), %r15
	movl	(%r12), %edi
	callq	_TAILQ_FIRST
	subq	(%rax), %r15
	addq	%r15, (%r14)
	jmp	LBB0_16
LBB0_8:
	movq	$0, (%r14)
	jmp	LBB0_15
LBB0_9:
	movq	-56(%rbp), %rsi
	leaq	-40(%rbp), %r15
	movq	%r15, %rdi
	movl	$8, %edx
	callq	_memcpy
	movq	-40(%rbp), %rax
	cmpq	8(%rbx), %rax
	je	LBB0_11
## %bb.10:
	movq	-72(%rbp), %rsi
	movl	-64(%rbp), %edx
	movq	%r12, %rdi
	callq	_FILE2INT
	movq	-72(%rbp), %rax
	movq	%rax, 16(%rbx)
	movq	-40(%rbp), %rax
	movq	%rax, 8(%rbx)
LBB0_11:
	movq	%rax, (%rbx)
	movq	_SC_TINPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_F_ISSET
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movl	(%r12), %edi
	movq	__texth@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_TAILQ_LAST
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jle	LBB0_14
## %bb.13:
	movl	(%r12), %edi
	movl	(%rbx), %esi
	callq	_TAILQ_LAST
	movq	%rax, %r15
LBB0_14:
	movq	(%r15), %rax
	movq	%rax, (%r14)
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXM_NOFILEYET,4,2              ## @EXM_NOFILEYET
	.comm	_OOBLNO,8,3                     ## @OOBLNO
	.comm	_SC_TINPUT,4,2                  ## @SC_TINPUT
	.comm	__texth,4,2                     ## @_texth
	.comm	_R_LAST,4,2                     ## @R_LAST
	.comm	_M_SYSERR,4,2                   ## @M_SYSERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"007|unable to get last line"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_db_last                        ; -- Begin function db_last
	.p2align	2
_db_last:                               ; @db_last
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x0
	ldr	x21, [x0, #8]
	cbz	x21, LBB0_5
; %bb.1:
	mov	x19, x1
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _OOBLNO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OOBLNO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
	add	x8, sp, #8
	str	x8, [sp, #16]
	mov	w8, #8
	str	w8, [sp, #24]
	ldr	x0, [x21, #40]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _R_LAST@GOTPAGE
Lloh4:
	ldr	x9, [x9, _R_LAST@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x9]
	add	x1, sp, #16
	add	x2, sp, #32
	blr	x8
	cmp	w0, #1
	b.eq	LBB0_8
; %bb.3:
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.4:
Lloh6:
	adrp	x8, _M_SYSERR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _M_SYSERR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_msgq
	str	xzr, [x19]
	mov	w0, #1
	b	LBB0_17
LBB0_5:
Lloh11:
	adrp	x8, _EXM_NOFILEYET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EXM_NOFILEYET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, #0
	bl	_ex_emsg
	mov	w0, #1
	b	LBB0_17
LBB0_6:
	str	x8, [x19]
Lloh14:
	adrp	x8, _SC_TINPUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SC_TINPUT@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_F_ISSET
	cbz	x0, LBB0_17
; %bb.7:
	ldr	w0, [x20]
Lloh17:
	adrp	x8, __texth@GOTPAGE
Lloh18:
	ldr	x8, [x8, __texth@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_TAILQ_LAST
	ldr	x21, [x0]
	ldr	w0, [x20]
	bl	_TAILQ_FIRST
	mov	x8, x0
	mov	w0, #0
	ldr	x8, [x8]
	ldr	x9, [x19]
	sub	x8, x21, x8
	add	x8, x8, x9
	b	LBB0_16
LBB0_8:
	mov	w0, #0
	str	xzr, [x19]
	b	LBB0_17
LBB0_9:
	ldr	x1, [sp, #16]
	add	x0, sp, #8
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [sp, #8]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.10:
	ldr	x1, [sp, #32]
	ldr	w2, [sp, #40]
	mov	x0, x20
	bl	_FILE2INT
	ldr	x9, [sp, #32]
	ldr	x8, [sp, #8]
	stp	x8, x9, [x21, #8]
LBB0_11:
	str	x8, [x21]
Lloh20:
	adrp	x8, _SC_TINPUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SC_TINPUT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_F_ISSET
	cbz	x0, LBB0_14
; %bb.12:
	ldr	w0, [x20]
Lloh23:
	adrp	x21, __texth@GOTPAGE
Lloh24:
	ldr	x21, [x21, __texth@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_TAILQ_LAST
	ldr	x8, [x0]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	b.le	LBB0_14
; %bb.13:
	ldr	w0, [x20]
	ldr	w1, [x21]
	bl	_TAILQ_LAST
	mov	x8, x0
	b	LBB0_15
LBB0_14:
	add	x8, sp, #8
LBB0_15:
	mov	w0, #0
	ldr	x8, [x8]
LBB0_16:
	str	x8, [x19]
LBB0_17:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EXM_NOFILEYET,4,2              ; @EXM_NOFILEYET
	.comm	_OOBLNO,8,3                     ; @OOBLNO
	.comm	_SC_TINPUT,4,2                  ; @SC_TINPUT
	.comm	__texth,4,2                     ; @_texth
	.comm	_R_LAST,4,2                     ; @R_LAST
	.comm	_M_SYSERR,4,2                   ; @M_SYSERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"007|unable to get last line"

.subsections_via_symbols
