	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rds_poll
_rds_poll:                              ## @rds_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	%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	%rdx, %r14
	movq	%rdi, %r15
	movq	(%rsi), %rbx
	movq	%rbx, %rdi
	callq	_rds_sk_to_rs
	movq	%rax, %r12
	movq	(%rbx), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_poll_wait
	cmpq	$0, 8(%r12)
	je	LBB0_2
## %bb.1:
	movq	_rds_poll_waitq@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_poll_wait
LBB0_2:
	leaq	16(%r12), %r14
	movq	%r14, %rdi
	callq	_read_lock_irqsave
	cmpl	$0, 44(%r12)
	je	LBB0_3
## %bb.6:
	leaq	28(%r12), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	xorl	%r15d, %r15d
	cmpq	$0, 32(%r12)
	cmovnel	%ecx, %r15d
	movq	%rbx, %rdi
	callq	_spin_unlock
	jmp	LBB0_7
LBB0_3:
	leaq	40(%r12), %rdi
	callq	_rds_cong_updated_since
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	orl	(%rax), %r15d
	movq	_POLLWRBAND@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	jmp	LBB0_7
LBB0_4:
	xorl	%r15d, %r15d
LBB0_7:
	leaq	24(%r12), %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	addq	$20, %rdi
	callq	_list_empty
	testl	%eax, %eax
	jne	LBB0_10
LBB0_9:
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	orl	(%rax), %r15d
	orl	(%rcx), %r15d
LBB0_10:
	movq	(%r12), %r13
	movq	%r12, %rdi
	callq	_rds_sk_sndbuf
	movq	_POLLOUT@GOTPCREL(%rip), %rcx
	movq	_POLLWRNORM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	xorl	%ebx, %ebx
	cmpq	%rax, %r13
	cmovll	%edx, %ebx
	movq	%r14, %rdi
	callq	_read_unlock_irqrestore
	orl	%r15d, %ebx
	je	LBB0_12
## %bb.11:
	movq	$0, 8(%r12)
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rds_poll_waitq,4,2             ## @rds_poll_waitq
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.comm	_POLLWRBAND,4,2                 ## @POLLWRBAND
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLWRNORM,4,2                 ## @POLLWRNORM
	.no_dead_strip	_rds_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rds_poll
_rds_poll:                              ; @rds_poll
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x0
	ldr	x22, [x1]
	mov	x0, x22
	bl	_rds_sk_to_rs
	mov	x19, x0
	ldr	x1, [x22]
	mov	x0, x21
	mov	x2, x20
	bl	_poll_wait
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, _rds_poll_waitq@GOTPAGE
Lloh1:
	ldr	x1, [x1, _rds_poll_waitq@GOTPAGEOFF]
	mov	x0, x21
	mov	x2, x20
	bl	_poll_wait
LBB0_2:
	add	x20, x19, #16
	mov	x0, x20
	bl	_read_lock_irqsave
	ldr	w8, [x19, #44]
Lloh2:
	adrp	x22, _POLLIN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _POLLIN@GOTPAGEOFF]
Lloh4:
	adrp	x23, _POLLRDNORM@GOTPAGE
Lloh5:
	ldr	x23, [x23, _POLLRDNORM@GOTPAGEOFF]
	cbz	w8, LBB0_4
; %bb.3:
	add	x21, x19, #28
	mov	x0, x21
	bl	_spin_lock
	ldr	x8, [x19, #32]
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w9, w10, w9
	cmp	x8, #0
	csel	w24, wzr, w9, eq
	mov	x0, x21
	bl	_spin_unlock
	b	LBB0_7
LBB0_4:
	add	x0, x19, #40
	bl	_rds_cong_updated_since
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _POLLWRBAND@GOTPAGE
Lloh7:
	ldr	x9, [x9, _POLLWRBAND@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w24, w8, w9
	b	LBB0_7
LBB0_6:
	mov	w24, #0
LBB0_7:
	add	x0, x19, #24
	bl	_list_empty
	cbz	w0, LBB0_9
; %bb.8:
	add	x0, x19, #20
	bl	_list_empty
	cbnz	w0, LBB0_10
LBB0_9:
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w8, w8, w24
	orr	w24, w8, w9
LBB0_10:
	ldr	x21, [x19]
	mov	x0, x19
	bl	_rds_sk_sndbuf
Lloh9:
	adrp	x8, _POLLOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _POLLOUT@GOTPAGEOFF]
Lloh11:
	adrp	x9, _POLLWRNORM@GOTPAGE
Lloh12:
	ldr	x9, [x9, _POLLWRNORM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	x21, x0
	csel	w8, w8, wzr, lt
	orr	w21, w8, w24
	mov	x0, x20
	bl	_read_unlock_irqrestore
	cbz	w21, LBB0_12
; %bb.11:
	str	xzr, [x19, #8]
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_rds_poll_waitq,4,2             ; @rds_poll_waitq
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.comm	_POLLWRBAND,4,2                 ; @POLLWRBAND
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLWRNORM,4,2                 ; @POLLWRNORM
	.no_dead_strip	_rds_poll
.subsections_via_symbols
