	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readline_shell_write
_readline_shell_write:                  ## @readline_shell_write
	.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	%rsi, %r13
	movq	%rdi, %r14
	movq	_prompt_str@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_CLIR_G
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	callq	_CLIR_G
	movq	%rax, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_smart_str_appendl
LBB0_9:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_pager@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_CLIR_G
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movl	(%r15), %edi
	callq	_CLIR_G
	cmpq	$0, (%rax)
	movq	_pager_pipe@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	je	LBB0_7
## %bb.4:
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movl	(%r15), %edi
	callq	_CLIR_G
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_VCWD_POPEN
	movq	%rax, (%r12)
LBB0_7:
	testq	%rax, %rax
	je	LBB0_8
LBB0_10:
	movq	%r13, %rdi
	movl	$16384, %esi                    ## imm = 0x4000
	callq	_MIN
	movq	_pager_pipe@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r14, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fwrite                         ## TAILCALL
LBB0_6:
	movq	_pager_pipe@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_10
LBB0_8:
	movq	$-1, %r13
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_prompt_str,4,2                 ## @prompt_str
	.comm	_pager,4,2                      ## @pager
	.comm	_pager_pipe,8,3                 ## @pager_pipe
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

	.no_dead_strip	_readline_shell_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readline_shell_write
_readline_shell_write:                  ; @readline_shell_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _prompt_str@GOTPAGE
Lloh1:
	ldr	x21, [x21, _prompt_str@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_CLIR_G
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x21]
	bl	_CLIR_G
	mov	x1, x20
	mov	x2, x19
	bl	_smart_str_appendl
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh2:
	adrp	x22, _pager@GOTPAGE
Lloh3:
	ldr	x22, [x22, _pager@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_CLIR_G
Lloh4:
	adrp	x21, _pager_pipe@GOTPAGE
Lloh5:
	ldr	x21, [x21, _pager_pipe@GOTPAGEOFF]
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w0, [x22]
	bl	_CLIR_G
	ldr	x8, [x0]
	ldr	x0, [x21]
	cmp	x8, #0
	ccmp	x0, #0, #0, ne
	b.ne	LBB0_6
; %bb.5:
	ldr	w0, [x22]
	bl	_CLIR_G
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_VCWD_POPEN
	str	x0, [x21]
LBB0_6:
	cbz	x0, LBB0_9
LBB0_7:
	mov	x0, x19
	mov	w1, #16384
	bl	_MIN
	mov	x2, x0
	ldr	x3, [x21]
	mov	x0, x20
	mov	w1, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_fwrite
LBB0_8:
	ldr	x0, [x21]
	cbnz	x0, LBB0_7
LBB0_9:
	mov	x19, #-1
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_prompt_str,4,2                 ; @prompt_str
	.comm	_pager,4,2                      ; @pager
	.comm	_pager_pipe,8,3                 ; @pager_pipe
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

	.no_dead_strip	_readline_shell_write
.subsections_via_symbols
