	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ex_writefp                     ## -- Begin function ex_writefp
	.p2align	4, 0x90
_ex_writefp:                            ## @ex_writefp
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %r15
	movq	(%r8), %rcx
	testq	%r9, %r9
	je	LBB0_2
## %bb.1:
	movq	$0, (%r13)
	movq	$0, (%r12)
LBB0_2:
	testq	%rcx, %rcx
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	je	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$0, %r14d
	cmpq	%rcx, %r15
	jg	LBB0_27
## %bb.5:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	subq	%r15, %rcx
	incq	%rcx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	leaq	L_.str(%rip), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%r14), %r13
	movq	_INTERRUPT_CHECK@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r13, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	jne	LBB0_15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	jne	LBB0_15
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_INTERRUPTED
	testq	%rax, %rax
	jne	LBB0_26
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, 24(%rbp)
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_BUSY_ON@GOTPCREL(%rip), %rax
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_BUSY_UPDATE@GOTPCREL(%rip), %rax
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	leaq	(%r15,%r14), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	-128(%rbp), %rdx
	leaq	-104(%rbp), %rcx
	callq	_db_rget
	testq	%rax, %rax
	jne	LBB0_16
## %bb.20:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-128(%rbp), %rdi
	movq	-104(%rbp), %rdx
	movl	$1, %esi
	movq	%rbx, %rcx
	callq	_fwrite
	cmpq	-104(%rbp), %rax
	jne	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r12
	addq	-48(%rbp), %r12                 ## 8-byte Folded Reload
	movl	$10, %edi
	movq	%rbx, %rsi
	callq	_putc
	cmpb	$10, %al
	jne	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	movq	%r13, %r14
	movq	%r12, %rax
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	-120(%rbp), %rax                ## 8-byte Reload
	cmpq	%r13, %rax
	jne	LBB0_6
## %bb.25:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %r14
	jmp	LBB0_26
LBB0_3:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_27
LBB0_16:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	16(%rbp), %r13
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_21:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	16(%rbp), %r13
	jmp	LBB0_17
LBB0_23:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
LBB0_26:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	16(%rbp), %r13
LBB0_27:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_fflush
	testq	%rax, %rax
	jne	LBB0_17
## %bb.28:
	movq	%rbx, %rdi
	callq	_fileno
	leaq	-80(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testl	%eax, %eax
	je	LBB0_29
LBB0_31:
	movq	%rbx, %rdi
	callq	_fclose
	testq	%rax, %rax
	jne	LBB0_17
## %bb.32:
	xorl	%ebx, %ebx
	cmpl	$0, 24(%rbp)
	jne	LBB0_35
	jmp	LBB0_34
LBB0_29:
	movl	-80(%rbp), %edi
	callq	_S_ISREG
	testq	%rax, %rax
	je	LBB0_31
## %bb.30:
	movq	%rbx, %rdi
	callq	_fileno
	movl	%eax, %edi
	callq	_fsync
	testq	%rax, %rax
	je	LBB0_31
LBB0_17:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_F_MULTILOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_F_ISSET
	testl	%eax, %eax
	jne	LBB0_19
## %bb.18:
	movq	_M_SYSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	callq	_msgq_str
LBB0_19:
	movq	%rbx, %rdi
	callq	_fclose
	movl	$1, %ebx
	cmpl	$0, 24(%rbp)
	jne	LBB0_35
LBB0_34:
	movq	_BUSY_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
LBB0_35:
	testq	%r12, %r12
	je	LBB0_37
## %bb.36:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r13)
	movq	%r14, (%r12)
LBB0_37:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"253|Writing..."

	.comm	_INTERRUPT_CHECK,8,3            ## @INTERRUPT_CHECK
	.comm	_BUSY_UPDATE,4,2                ## @BUSY_UPDATE
	.comm	_BUSY_ON,4,2                    ## @BUSY_ON
	.comm	_F_MULTILOCK,4,2                ## @F_MULTILOCK
	.comm	_M_SYSERR,4,2                   ## @M_SYSERR
L_.str.1:                               ## @.str.1
	.asciz	"%s"

	.comm	_BUSY_OFF,4,2                   ## @BUSY_OFF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ex_writefp                     ; -- Begin function ex_writefp
	.p2align	2
_ex_writefp:                            ; @ex_writefp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w7, [sp, #36]                   ; 4-byte Folded Spill
	mov	x20, x6
	mov	x19, x5
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	ldr	x24, [x3]
	ldr	x8, [x4]
	cbz	x5, LBB0_2
; %bb.1:
	str	xzr, [x20]
	str	xzr, [x19]
LBB0_2:
	cmp	x8, #0
	ccmp	x24, x8, #0, ne
	b.le	LBB0_4
; %bb.3:
	mov	x27, #0
	mov	x26, #0
	b	LBB0_15
LBB0_4:
	stp	x22, x20, [sp, #8]              ; 16-byte Folded Spill
	mov	x26, #0
	mov	x27, #0
	sub	x8, x8, x24
	add	x22, x8, #1
Lloh0:
	adrp	x20, _INTERRUPT_CHECK@GOTPAGE
Lloh1:
	ldr	x20, [x20, _INTERRUPT_CHECK@GOTPAGEOFF]
Lloh2:
	adrp	x25, l_.str@PAGE
Lloh3:
	add	x25, x25, l_.str@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x28, x26, #1
	ldr	x8, [x20]
	sdiv	x9, x28, x8
	msub	x8, x9, x8, x28
	cbnz	x8, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_INTERRUPTED
	cbnz	x0, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #36]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	cmp	x25, #0
Lloh4:
	adrp	x9, _BUSY_UPDATE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _BUSY_UPDATE@GOTPAGEOFF]
Lloh6:
	adrp	x10, _BUSY_ON@GOTPAGE
Lloh7:
	ldr	x10, [x10, _BUSY_ON@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w2, [x9]
	mov	x0, x21
	mov	x1, x25
	blr	x8
	mov	x25, #0
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x1, x24, x26
	add	x2, sp, #40
	add	x3, sp, #48
	mov	x0, x21
	bl	_db_rget
	cbnz	x0, LBB0_19
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldp	x0, x2, [sp, #40]
	mov	w1, #1
	mov	x3, x23
	bl	_fwrite
	ldr	x8, [sp, #48]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x0, x27
	mov	w0, #10
	mov	x1, x23
	bl	_putc
	cmp	w0, #10
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x27, #1
	mov	x26, x28
	cmp	x22, x28
	b.ne	LBB0_5
; %bb.13:
	mov	x26, x22
LBB0_14:
	ldp	x22, x20, [sp, #8]              ; 16-byte Folded Reload
LBB0_15:
	mov	x0, x23
	bl	_fflush
	cbnz	x0, LBB0_20
; %bb.16:
	mov	x0, x23
	bl	_fileno
	add	x1, sp, #56
	bl	_fstat
	cbz	w0, LBB0_27
LBB0_17:
	mov	x0, x23
	bl	_fclose
	cbnz	x0, LBB0_20
; %bb.18:
	mov	w23, #0
	ldr	w8, [sp, #36]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_24
	b	LBB0_23
LBB0_19:
	ldp	x22, x20, [sp, #8]              ; 16-byte Folded Reload
LBB0_20:
	ldr	w0, [x21]
Lloh8:
	adrp	x8, _F_MULTILOCK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F_MULTILOCK@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_F_ISSET
	cbnz	w0, LBB0_22
; %bb.21:
Lloh11:
	adrp	x8, _M_SYSERR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _M_SYSERR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x3, l_.str.1@PAGE
Lloh15:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_msgq_str
LBB0_22:
	mov	x0, x23
	bl	_fclose
	mov	w23, #1
	ldr	w8, [sp, #36]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_24
LBB0_23:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _BUSY_OFF@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BUSY_OFF@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x9]
	mov	x0, x21
	mov	x1, #0
	blr	x8
LBB0_24:
	cbz	x19, LBB0_26
; %bb.25:
	str	x27, [x20]
	str	x26, [x19]
LBB0_26:
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_27:
	ldr	w0, [sp, #56]
	bl	_S_ISREG
	cbz	x0, LBB0_17
; %bb.28:
	mov	x0, x23
	bl	_fileno
	bl	_fsync
	cbnz	x0, LBB0_20
	b	LBB0_17
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"253|Writing..."

	.comm	_INTERRUPT_CHECK,8,3            ; @INTERRUPT_CHECK
	.comm	_BUSY_UPDATE,4,2                ; @BUSY_UPDATE
	.comm	_BUSY_ON,4,2                    ; @BUSY_ON
	.comm	_F_MULTILOCK,4,2                ; @F_MULTILOCK
	.comm	_M_SYSERR,4,2                   ; @M_SYSERR
l_.str.1:                               ; @.str.1
	.asciz	"%s"

	.comm	_BUSY_OFF,4,2                   ; @BUSY_OFF
.subsections_via_symbols
