	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rds_send_queue_rm
_rds_send_queue_rm:                     ## @rds_send_queue_rm
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%r9), %eax
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	%r9, %rbx
	movq	%rdx, %r14
	movq	%rdi, %r15
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	4(%rdx), %edi
	callq	_be32_to_cpu
	movl	%eax, %r13d
	leaq	4(%r15), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movl	(%r15), %r12d
	movq	%r15, %rdi
	callq	_rds_sk_sndbuf
	cmpl	%eax, %r12d
	jge	LBB0_5
## %bb.2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	(%r15), %ebx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	addl	%r13d, %ebx
	movl	%ebx, (%r15)
	movq	%r15, %rdi
	callq	_rds_sk_sndbuf
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %ebx
	jl	LBB0_4
## %bb.3:
	movq	_RDS_MSG_ACK_REQUIRED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r14), %rsi
	callq	___set_bit
LBB0_4:
	leaq	32(%r14), %rdi
	leaq	8(%r15), %rsi
	callq	_list_add_tail
	movq	_RDS_MSG_ON_SOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r14), %r12
	movq	%r12, %rsi
	callq	_set_bit
	movq	%r14, %rdi
	callq	_rds_message_addref
	movq	%r15, 24(%r14)
	movq	%r14, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_rds_message_populate_header
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, 8(%r14)
	movq	%r14, %rdi
	callq	_rds_message_addref
	movq	%rbx, %rdi
	callq	_spin_lock
	movl	8(%rbx), %edi
	leal	1(%rdi), %eax
	movl	%eax, 8(%rbx)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_be64
	movl	%eax, (%r14)
	leaq	20(%r14), %rdi
	leaq	4(%rbx), %rsi
	callq	_list_add_tail
	movq	_RDS_MSG_ON_CONN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
	movq	%rbx, %rdi
	callq	_spin_unlock
	movl	(%r15), %r12d
	movl	(%r14), %edi
	callq	_be64_to_cpu
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r15, %rcx
	movl	%r12d, %r8d
	movq	%rax, %r9
	callq	_rdsdebug
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	$1, (%rbx)
LBB0_5:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	(%rbx), %eax
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RDS_MSG_ACK_REQUIRED,4,2       ## @RDS_MSG_ACK_REQUIRED
	.comm	_RDS_MSG_ON_SOCK,4,2            ## @RDS_MSG_ON_SOCK
	.comm	_RDS_MSG_ON_CONN,4,2            ## @RDS_MSG_ON_CONN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"queued msg %p len %d, rs %p bytes %d seq %llu\n"

	.no_dead_strip	_rds_send_queue_rm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rds_send_queue_rm
_rds_send_queue_rm:                     ; @rds_send_queue_rm
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x0
	ldr	w0, [x5]
	cbnz	w0, LBB0_6
; %bb.1:
	mov	x19, x5
	mov	x25, x4
	mov	x26, x3
	mov	x21, x2
	mov	x24, x1
	ldr	w0, [x2, #4]
	bl	_be32_to_cpu
	mov	x23, x0
	add	x22, x20, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	w27, [x20]
	mov	x0, x20
	bl	_rds_sk_sndbuf
	cmp	w27, w0
	b.ge	LBB0_5
; %bb.2:
	ldr	w8, [x20]
	add	w27, w8, w23
	str	w27, [x20]
	mov	x0, x20
	bl	_rds_sk_sndbuf
	cmp	w0, #0
	cinc	w8, w0, lt
	cmp	w27, w8, asr #1
	b.lt	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _RDS_MSG_ACK_REQUIRED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RDS_MSG_ACK_REQUIRED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x21, #16
	bl	___set_bit
LBB0_4:
	add	x0, x21, #32
	add	x1, x20, #8
	bl	_list_add_tail
Lloh3:
	adrp	x8, _RDS_MSG_ON_SOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RDS_MSG_ON_SOCK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x27, x21, #16
	mov	x1, x27
	bl	_set_bit
	mov	x0, x21
	bl	_rds_message_addref
	str	x20, [x21, #24]
	mov	x0, x21
	mov	x1, x26
	mov	x2, x25
	mov	w3, #0
	bl	_rds_message_populate_header
	str	x24, [x21, #8]
	mov	x0, x21
	bl	_rds_message_addref
	mov	x0, x24
	bl	_spin_lock
	ldr	w0, [x24, #8]
	add	w8, w0, #1
	str	w8, [x24, #8]
	bl	_cpu_to_be64
	str	w0, [x21]
	add	x0, x21, #20
	add	x1, x24, #4
	bl	_list_add_tail
Lloh6:
	adrp	x8, _RDS_MSG_ON_CONN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RDS_MSG_ON_CONN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x27
	bl	_set_bit
	mov	x0, x24
	bl	_spin_unlock
	ldr	w24, [x20]
	ldr	w0, [x21]
	bl	_be64_to_cpu
	mov	x5, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x23
	mov	x3, x20
	mov	x4, x24
	bl	_rdsdebug
	mov	w8, #1
	str	w8, [x19]
LBB0_5:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RDS_MSG_ACK_REQUIRED,4,2       ; @RDS_MSG_ACK_REQUIRED
	.comm	_RDS_MSG_ON_SOCK,4,2            ; @RDS_MSG_ON_SOCK
	.comm	_RDS_MSG_ON_CONN,4,2            ; @RDS_MSG_ON_CONN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"queued msg %p len %d, rs %p bytes %d seq %llu\n"

	.no_dead_strip	_rds_send_queue_rm
.subsections_via_symbols
