	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r5l_append_flush_payload
_r5l_append_flush_payload:              ## @r5l_append_flush_payload
	.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	16(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_mutex_lock
	movq	%rbx, %rdi
	movl	$36, %esi
	callq	_r5l_get_meta
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movq	8(%rbx), %r15
	movl	12(%r15), %edi
	callq	_page_address
	movq	%rax, %r12
	movslq	(%r15), %r13
	movq	_R5LOG_PAYLOAD_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	shlq	$5, %r13
	movq	%rax, 24(%r12,%r13)
	xorl	%edi, %edi
	callq	_cpu_to_le16
	movq	%rax, 16(%r12,%r13)
	movl	$4, %edi
	callq	_cpu_to_le32
	movl	%eax, 8(%r12,%r13)
	movl	%r14d, %edi
	callq	_cpu_to_le64
	movq	(%r12,%r13), %rcx
	movl	%eax, (%rcx)
	addl	$36, (%r15)
	cmpl	$0, 4(%r15)
	jne	LBB0_4
## %bb.3:
	movl	$1, 4(%r15)
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_atomic_inc
LBB0_4:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R5LOG_PAYLOAD_FLUSH,4,2        ## @R5LOG_PAYLOAD_FLUSH
	.no_dead_strip	_r5l_append_flush_payload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r5l_append_flush_payload
_r5l_append_flush_payload:              ; @r5l_append_flush_payload
	.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
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	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
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
	mov	x0, x19
	mov	w1, #36
	bl	_r5l_get_meta
	cbnz	x0, LBB0_5
; %bb.3:
	ldr	x22, [x19, #8]
	ldr	w0, [x22, #12]
	bl	_page_address
	mov	x21, x0
	ldrsw	x23, [x22]
Lloh0:
	adrp	x8, _R5LOG_PAYLOAD_FLUSH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R5LOG_PAYLOAD_FLUSH@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	add	x21, x21, x23, lsl #5
	str	x0, [x21, #24]
	mov	w0, #0
	bl	_cpu_to_le16
	str	x0, [x21, #16]
	mov	w0, #4
	bl	_cpu_to_le32
	str	w0, [x21, #8]
	mov	x0, x20
	bl	_cpu_to_le64
	ldr	x8, [x21]
	str	w0, [x8]
	ldp	w8, w9, [x22]
	add	w8, w8, #36
	str	w8, [x22]
	cbnz	w9, LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [x22, #4]
	add	x0, x22, #8
	bl	_atomic_inc
LBB0_5:
	mov	x0, x19
	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
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_R5LOG_PAYLOAD_FLUSH,4,2        ; @R5LOG_PAYLOAD_FLUSH
	.no_dead_strip	_r5l_append_flush_payload
.subsections_via_symbols
