	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sq_poll
_sq_poll:                               ## @sq_poll
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_write_sq@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_FMODE_WRITE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	xorl	%r14d, %r14d
	testl	%eax, (%rdi)
	je	LBB0_7
## %bb.3:
	movq	%rsi, %rdx
	leaq	40(%r15), %rsi
	movq	%rbx, %rdi
	callq	_poll_wait
	movl	(%r12), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
## %bb.4:
	movq	8(%r15), %rax
	cmpq	16(%r15), %rax
	jl	LBB0_6
## %bb.5:
	movq	24(%r15), %rax
	cmpq	32(%r15), %rax
	jle	LBB0_7
LBB0_6:
	movq	_POLLOUT@GOTPCREL(%rip), %rax
	movq	_POLLWRNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	jmp	LBB0_8
LBB0_1:
	movq	_write_sq@GOTPCREL(%rip), %rdi
	callq	_sq_setup
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_write_sq,48,3                  ## @write_sq
	.comm	_FMODE_WRITE,4,2                ## @FMODE_WRITE
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLWRNORM,4,2                 ## @POLLWRNORM
	.no_dead_strip	_sq_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sq_poll
_sq_poll:                               ; @sq_poll
	.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
Lloh0:
	adrp	x20, _write_sq@GOTPAGE
Lloh1:
	ldr	x20, [x20, _write_sq@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh2:
	adrp	x21, _FMODE_WRITE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _FMODE_WRITE@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
	mov	x2, x1
	add	x1, x20, #40
	mov	x0, x19
	bl	_poll_wait
	ldr	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
	ldp	x8, x9, [x20, #8]
	cmp	x8, x9
	b.lt	LBB0_5
; %bb.4:
	ldp	x8, x9, [x20, #24]
	cmp	x8, x9
	b.le	LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _POLLOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _POLLOUT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _POLLWRNORM@GOTPAGE
Lloh8:
	ldr	x9, [x9, _POLLWRNORM@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w0, w9, w8
	b	LBB0_8
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh10:
	adrp	x0, _write_sq@GOTPAGE
Lloh11:
	ldr	x0, [x0, _write_sq@GOTPAGEOFF]
	bl	_sq_setup
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_write_sq,48,3                  ; @write_sq
	.comm	_FMODE_WRITE,4,2                ; @FMODE_WRITE
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLWRNORM,4,2                 ; @POLLWRNORM
	.no_dead_strip	_sq_poll
.subsections_via_symbols
