	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fifolog_write_record_poll      ## -- Begin function fifolog_write_record_poll
	.p2align	4, 0x90
_fifolog_write_record_poll:             ## @fifolog_write_record_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rcx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r13
	movl	%edx, -44(%rbp)
	testl	%edx, %edx
	jne	LBB0_2
## %bb.1:
	leaq	-44(%rbp), %rdi
	callq	_time
LBB0_2:
	movq	%r13, %rdi
	callq	_fifolog_write_assert
	movq	_FIFOLOG_TIMESTAMP@GOTPCREL(%rip), %rax
	movq	_FIFOLOG_LENGTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	xorl	%edi, %edi
	testl	%r15d, %ecx
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.3:
	jle	LBB0_4
## %bb.7:
	movq	%rbx, %rcx
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movslq	%ebx, %rax
	addq	%rax, %r14
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	subq	%rax, %rcx
	jle	LBB0_12
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	cmpl	$255, %ecx
	movl	$255, %ebx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmovll	%ecx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%r14, %rcx
	movl	%ebx, %r8d
	callq	_fifolog_write_record
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=2
	movl	-44(%rbp), %esi
	movq	%r13, %rdi
	callq	_fifolog_write_gzip
	testq	%rax, %rax
	movl	$-1, %eax
	cmovsl	%eax, %r12d
	jmp	LBB0_10
LBB0_5:
	movl	-44(%rbp), %edx
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	_fifolog_write_record
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	movl	-44(%rbp), %esi
	movq	%r13, %rdi
	callq	_fifolog_write_gzip
	movq	%rax, %rbx
	sarq	$63, %rbx
	movl	-44(%rbp), %edx
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	_fifolog_write_record
	cmpl	$1, %eax
	sbbl	%r12d, %r12d
	orl	%ebx, %r12d
	jmp	LBB0_12
LBB0_4:
	xorl	%r12d, %r12d
LBB0_12:
	movl	-44(%rbp), %esi
	movq	%r13, %rdi
	callq	_fifolog_write_gzip
	testq	%rax, %rax
	movl	$-1, %ebx
	cmovnsl	%r12d, %ebx
	movq	%r13, %rdi
	callq	_fifolog_write_assert
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIFOLOG_TIMESTAMP,4,2          ## @FIFOLOG_TIMESTAMP
	.comm	_FIFOLOG_LENGTH,4,2             ## @FIFOLOG_LENGTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fifolog_write_record_poll      ; -- Begin function fifolog_write_record_poll
	.p2align	2
_fifolog_write_record_poll:             ; @fifolog_write_record_poll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x4
	mov	x20, x3
	mov	x21, x1
	mov	x19, x0
	str	w2, [sp, #12]
	cbnz	w2, LBB0_2
; %bb.1:
	add	x0, sp, #12
	bl	_time
LBB0_2:
	mov	x0, x19
	bl	_fifolog_write_assert
Lloh0:
	adrp	x8, _FIFOLOG_TIMESTAMP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIFOLOG_TIMESTAMP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _FIFOLOG_LENGTH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FIFOLOG_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w21
	cset	w0, eq
	bl	_assert
	cmp	x20, #0
	cset	w0, ne
	bl	_assert
	cbz	x22, LBB0_9
; %bb.3:
	cmp	x22, #1
	b.lt	LBB0_11
; %bb.4:
	mov	w24, #0
	mov	w25, #255
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x8, w23
	sub	x22, x22, x8
	add	x20, x20, x8
	cmp	x22, #0
	b.le	LBB0_12
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	cmp	w22, #255
	csel	w23, w22, w25, lt
LBB0_7:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	mov	x4, x23
	bl	_fifolog_write_record
	cbnz	w0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_fifolog_write_gzip
	cmp	x0, #0
	csinv	w24, w24, wzr, ge
	b	LBB0_7
LBB0_9:
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	mov	w4, #0
	bl	_fifolog_write_record
	mov	w24, #0
	cbnz	w0, LBB0_12
; %bb.10:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_fifolog_write_gzip
	asr	x22, x0, #63
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	mov	w4, #0
	bl	_fifolog_write_record
	cmp	w0, #0
	csinv	w24, w22, wzr, ne
	b	LBB0_12
LBB0_11:
	mov	w24, #0
LBB0_12:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_fifolog_write_gzip
	cmp	x0, #0
	csinv	w20, w24, wzr, ge
	mov	x0, x19
	bl	_fifolog_write_assert
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FIFOLOG_TIMESTAMP,4,2          ; @FIFOLOG_TIMESTAMP
	.comm	_FIFOLOG_LENGTH,4,2             ; @FIFOLOG_LENGTH
.subsections_via_symbols
