	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drainSelfPipe
_drainSelfPipe:                         ## @drainSelfPipe
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_selfpipe_readfd@GOTPCREL(%rip), %r14
	leaq	-64(%rbp), %rbx
	movq	_waiting@GOTPCREL(%rip), %r13
	movq	_ERROR@GOTPCREL(%rip), %r12
	leaq	L_.str.1(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%r13)
	movl	(%r12), %edi
	callq	_elog
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	%rbx, %rsi
	movl	$16, %edx
	callq	_read
	testl	%eax, %eax
	js	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rsi
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$16, %eax
	jae	LBB0_1
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rsi
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_1
	jmp	LBB0_5
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_selfpipe_readfd,4,2            ## @selfpipe_readfd
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_EWOULDBLOCK,8,3                ## @EWOULDBLOCK
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_waiting,4,2                    ## @waiting
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read() on self-pipe failed: %m"

L_.str.1:                               ## @.str.1
	.asciz	"unexpected EOF on self-pipe"

	.no_dead_strip	_drainSelfPipe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drainSelfPipe
_drainSelfPipe:                         ; @drainSelfPipe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x19, _selfpipe_readfd@GOTPAGE
Lloh4:
	ldr	x19, [x19, _selfpipe_readfd@GOTPAGEOFF]
Lloh5:
	adrp	x20, _errno@GOTPAGE
Lloh6:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
Lloh7:
	adrp	x21, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x21, [x21, _EAGAIN@GOTPAGEOFF]
Lloh9:
	adrp	x22, _EWOULDBLOCK@GOTPAGE
Lloh10:
	ldr	x22, [x22, _EWOULDBLOCK@GOTPAGEOFF]
Lloh11:
	adrp	x23, _EINTR@GOTPAGE
Lloh12:
	ldr	x23, [x23, _EINTR@GOTPAGEOFF]
Lloh13:
	adrp	x24, l_.str@PAGE
Lloh14:
	add	x24, x24, l_.str@PAGEOFF
Lloh15:
	adrp	x25, _waiting@GOTPAGE
Lloh16:
	ldr	x25, [x25, _waiting@GOTPAGEOFF]
Lloh17:
	adrp	x26, _ERROR@GOTPAGE
Lloh18:
	ldr	x26, [x26, _ERROR@GOTPAGEOFF]
Lloh19:
	adrp	x27, l_.str.1@PAGE
Lloh20:
	add	x27, x27, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #16
	b.lo	LBB0_8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	add	x1, sp, #8
	mov	w2, #16
	bl	_read
	tbnz	w0, #31, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w0, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x27
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x21]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x23]
	mov	x1, x24
	cmp	x8, x9
	b.eq	LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	wzr, [x25]
	ldr	w0, [x26]
	bl	_elog
	b	LBB0_2
LBB0_8:
	ldr	x8, [sp, #24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_selfpipe_readfd,4,2            ; @selfpipe_readfd
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_EWOULDBLOCK,8,3                ; @EWOULDBLOCK
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_waiting,4,2                    ; @waiting
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read() on self-pipe failed: %m"

l_.str.1:                               ; @.str.1
	.asciz	"unexpected EOF on self-pipe"

	.no_dead_strip	_drainSelfPipe
.subsections_via_symbols
