	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function audit_pipe_read
_audit_pipe_read:                       ## @audit_pipe_read
	.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	%rsi, %r13
	leaq	-48(%rbp), %rdi
	callq	_devfs_get_cdevpriv
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	-48(%rbp), %rdi
	callq	_AUDIT_PIPE_SX_XLOCK_SIG
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_EINTR@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	-48(%rbp), %rdi
	callq	_AUDIT_PIPE_LOCK
	movq	_AUDIT_PIPE_NBIO@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi
	addq	$24, %rdi
	callq	_TAILQ_EMPTY
	movq	-48(%rbp), %rdi
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r14), %eax
	testl	%eax, (%rdi)
	jne	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	32(%rdi), %rbx
	callq	_AUDIT_PIPE_MTX
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_cv_wait_sig
	testl	%eax, %eax
	je	LBB0_6
## %bb.9:
	movl	%eax, %r15d
	movq	-48(%rbp), %rdi
	callq	_AUDIT_PIPE_UNLOCK
	movq	-48(%rbp), %rdi
	callq	_AUDIT_PIPE_SX_XUNLOCK
	jmp	LBB0_4
LBB0_10:
	incl	28(%rdi)
	addq	$24, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %r14
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=1
	addq	$24, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_18
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r13)
	jle	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-48(%rbp), %rdi
	callq	_AUDIT_PIPE_LOCK_ASSERT
	movq	(%rbx), %rax
	movq	-48(%rbp), %rcx
	xorl	%edi, %edi
	cmpq	8(%rcx), %rax
	setg	%dil
	movq	%r14, %rsi
	callq	_KASSERT
	movq	(%rbx), %rdi
	movq	-48(%rbp), %rax
	subq	8(%rax), %rdi
	movq	(%r13), %rsi
	callq	_MIN
	movl	%eax, %r12d
	movq	-48(%rbp), %rdi
	callq	_AUDIT_PIPE_UNLOCK
	movq	8(%rbx), %rdi
	movq	-48(%rbp), %rax
	addq	8(%rax), %rdi
	movl	%r12d, %esi
	movq	%r13, %rdx
	callq	_uiomove
	movq	-48(%rbp), %rdi
	testl	%eax, %eax
	jne	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	callq	_AUDIT_PIPE_LOCK
	movq	-48(%rbp), %rdi
	addq	$24, %rdi
	callq	_TAILQ_FIRST
	xorl	%edi, %edi
	cmpq	%rbx, %rax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movslq	%r12d, %rax
	movq	-48(%rbp), %rcx
	addq	8(%rcx), %rax
	movq	%rax, 8(%rcx)
	xorl	%edi, %edi
	cmpq	%rax, (%rbx)
	setge	%dil
	leaq	L_.str.2(%rip), %rsi
	callq	_KASSERT
	movq	-48(%rbp), %rdi
	movq	8(%rdi), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	addq	$24, %rdi
	movq	_ape_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movl	(%rbx), %eax
	movq	-48(%rbp), %rcx
	subl	%eax, 20(%rcx)
	movq	%rbx, %rdi
	callq	_audit_pipe_entry_free
	movq	-48(%rbp), %rdi
	decl	16(%rdi)
	movq	$0, 8(%rdi)
	jmp	LBB0_12
LBB0_17:
	callq	_AUDIT_PIPE_UNLOCK
	movq	-48(%rbp), %rdi
	callq	_AUDIT_PIPE_SX_XUNLOCK
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_18:
	movq	-48(%rbp), %rdi
	callq	_AUDIT_PIPE_UNLOCK
	movq	-48(%rbp), %rdi
	callq	_AUDIT_PIPE_SX_XUNLOCK
	xorl	%r15d, %r15d
	jmp	LBB0_4
LBB0_19:
	movl	%eax, %r15d
	callq	_AUDIT_PIPE_SX_XUNLOCK
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_AUDIT_PIPE_NBIO,4,2            ## @AUDIT_PIPE_NBIO
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"audit_pipe_read: record_len > qoffset (1)"

L_.str.1:                               ## @.str.1
	.asciz	"audit_pipe_read: queue out of sync after uiomove"

L_.str.2:                               ## @.str.2
	.asciz	"audit_pipe_read: record_len >= qoffset (2)"

	.comm	_ape_queue,4,2                  ## @ape_queue
	.no_dead_strip	_audit_pipe_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function audit_pipe_read
_audit_pipe_read:                       ; @audit_pipe_read
	.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	x19, x1
	add	x0, sp, #8
	bl	_devfs_get_cdevpriv
	mov	x24, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x0, [sp, #8]
	bl	_AUDIT_PIPE_SX_XLOCK_SIG
	cbz	x0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _EINTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_3:
	ldr	w24, [x8]
LBB0_4:
	mov	x0, x24
	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
LBB0_5:
	ldr	x0, [sp, #8]
	bl	_AUDIT_PIPE_LOCK
Lloh2:
	adrp	x21, _AUDIT_PIPE_NBIO@GOTPAGE
Lloh3:
	ldr	x21, [x21, _AUDIT_PIPE_NBIO@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]
	add	x0, x8, #24
	bl	_TAILQ_EMPTY
	mov	x8, x0
	ldr	x0, [sp, #8]
	cbz	x8, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x0]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x0, #32
	bl	_AUDIT_PIPE_MTX
	mov	x1, x0
	mov	x0, x20
	bl	_cv_wait_sig
	cbz	w0, LBB0_6
; %bb.9:
	mov	x24, x0
	ldr	x0, [sp, #8]
	bl	_AUDIT_PIPE_UNLOCK
	ldr	x0, [sp, #8]
	bl	_AUDIT_PIPE_SX_XUNLOCK
	b	LBB0_4
LBB0_10:
	ldr	w8, [x0, #28]
	add	w8, w8, #1
	str	w8, [x0, #28]
	add	x0, x0, #24
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_18
; %bb.11:
	mov	x23, x0
Lloh4:
	adrp	x20, l_.str@PAGE
Lloh5:
	add	x20, x20, l_.str@PAGEOFF
Lloh6:
	adrp	x21, l_.str.1@PAGE
Lloh7:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh8:
	adrp	x26, _ape_queue@GOTPAGE
Lloh9:
	ldr	x26, [x26, _ape_queue@GOTPAGEOFF]
Lloh10:
	adrp	x22, l_.str.2@PAGE
Lloh11:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x0, x8, #24
	bl	_TAILQ_FIRST
	mov	x23, x0
	cbz	x0, LBB0_18
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x0, [sp, #8]
	bl	_AUDIT_PIPE_LOCK_ASSERT
	ldr	x8, [x23]
	ldr	x9, [sp, #8]
	ldr	x9, [x9, #8]
	cmp	x8, x9
	cset	w0, gt
	mov	x1, x20
	bl	_KASSERT
	ldr	x8, [x23]
	ldr	x9, [sp, #8]
	ldr	x9, [x9, #8]
	sub	x0, x8, x9
	ldr	x1, [x19]
	bl	_MIN
	mov	x25, x0
	ldr	x0, [sp, #8]
	bl	_AUDIT_PIPE_UNLOCK
	ldr	x8, [x23, #8]
	ldr	x9, [sp, #8]
	ldr	x9, [x9, #8]
	add	x0, x8, x9
	mov	x1, x25
	mov	x2, x19
	bl	_uiomove
	mov	x24, x0
	ldr	x0, [sp, #8]
	cbnz	w24, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	bl	_AUDIT_PIPE_LOCK
	ldr	x8, [sp, #8]
	add	x0, x8, #24
	bl	_TAILQ_FIRST
	cmp	x0, x23
	cset	w0, eq
	mov	x1, x21
	bl	_KASSERT
	ldr	x8, [sp, #8]
	ldr	x9, [x8, #8]
	add	x9, x9, w25, sxtw
	str	x9, [x8, #8]
	ldr	x8, [x23]
	cmp	x8, x9
	cset	w0, ge
	mov	x1, x22
	bl	_KASSERT
	ldr	x8, [sp, #8]
	ldr	x9, [x8, #8]
	ldr	x10, [x23]
	cmp	x9, x10
	b.ne	LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x0, x8, #24
	ldr	w2, [x26]
	mov	x1, x23
	bl	_TAILQ_REMOVE
	ldr	w8, [x23]
	ldr	x9, [sp, #8]
	ldr	w10, [x9, #20]
	sub	w8, w10, w8
	str	w8, [x9, #20]
	mov	x0, x23
	bl	_audit_pipe_entry_free
	ldr	x8, [sp, #8]
	ldr	w9, [x8, #16]
	sub	w9, w9, #1
	str	w9, [x8, #16]
	str	xzr, [x8, #8]
	b	LBB0_12
LBB0_17:
	bl	_AUDIT_PIPE_UNLOCK
	ldr	x0, [sp, #8]
	bl	_AUDIT_PIPE_SX_XUNLOCK
Lloh12:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_3
LBB0_18:
	ldr	x0, [sp, #8]
	bl	_AUDIT_PIPE_UNLOCK
	ldr	x0, [sp, #8]
	bl	_AUDIT_PIPE_SX_XUNLOCK
	mov	w24, #0
	b	LBB0_4
LBB0_19:
	bl	_AUDIT_PIPE_SX_XUNLOCK
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_AUDIT_PIPE_NBIO,4,2            ; @AUDIT_PIPE_NBIO
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"audit_pipe_read: record_len > qoffset (1)"

l_.str.1:                               ; @.str.1
	.asciz	"audit_pipe_read: queue out of sync after uiomove"

l_.str.2:                               ; @.str.2
	.asciz	"audit_pipe_read: record_len >= qoffset (2)"

	.comm	_ape_queue,4,2                  ; @ape_queue
	.no_dead_strip	_audit_pipe_read
.subsections_via_symbols
