	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_audit_buf_get
_tty_audit_buf_get:                     ## @tty_audit_buf_get
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_current@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax), %rdi
	callq	_spin_lock_irq
	movq	(%r15), %rax
	movq	8(%rax), %rax
	xorl	%edi, %edi
	cmpl	$0, 8(%rax)
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_2:
	movq	(%r15), %rax
	movq	8(%rax), %rcx
	movq	(%rcx), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.3:
	movq	%rbx, %rdi
	callq	_atomic_inc
LBB0_4:
	xorl	%r14d, %r14d
LBB0_5:
	movq	(%r15), %rax
	movq	(%rax), %rdi
	callq	_spin_unlock_irq
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_tty_audit_buf_free
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	(%rax), %rdi
	callq	_spin_unlock_irq
	movq	16(%r14), %rax
	movl	8(%rax), %edi
	movq	8(%r14), %rsi
	addq	(%rax), %rsi
	movl	(%r14), %edx
	callq	_tty_audit_buf_alloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	%rax, %r14
	movq	(%r15), %rax
	movq	(%rax), %rdi
	callq	_spin_lock_irq
	movq	(%r15), %rax
	movq	8(%rax), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_14
## %bb.10:
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	jne	LBB0_12
## %bb.11:
	movq	%r14, (%rax)
	movq	%r14, %rbx
	xorl	%r14d, %r14d
LBB0_12:
	movq	%rbx, %rdi
	callq	_atomic_inc
	jmp	LBB0_5
LBB0_13:
	leaq	L_.str(%rip), %rdi
	callq	_audit_log_lost
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_14:
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory in TTY auditing"

	.no_dead_strip	_tty_audit_buf_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_audit_buf_get
_tty_audit_buf_get:                     ; @tty_audit_buf_get
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
Lloh0:
	adrp	x21, _current@GOTPAGE
Lloh1:
	ldr	x21, [x21, _current@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x0, [x8]
	bl	_spin_lock_irq
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	ldr	w8, [x8, #8]
	cmp	w8, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, #0
	b	LBB0_4
LBB0_2:
	ldr	x8, [x21]
	ldr	x9, [x8, #8]
	ldr	x19, [x9]
	cbz	x19, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_atomic_inc
LBB0_4:
	mov	x20, #0
LBB0_5:
	ldr	x8, [x21]
	ldr	x0, [x8]
	bl	_spin_unlock_irq
	cbz	x20, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_tty_audit_buf_free
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	x0, [x8]
	bl	_spin_unlock_irq
	ldp	x9, x8, [x20, #8]
	ldr	w0, [x8, #8]
	ldr	x8, [x8]
	add	x1, x9, x8
	ldr	w2, [x20]
	bl	_tty_audit_buf_alloc
	cbz	x0, LBB0_13
; %bb.9:
	mov	x20, x0
	ldr	x8, [x21]
	ldr	x0, [x8]
	bl	_spin_lock_irq
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_14
; %bb.10:
	ldr	x19, [x8]
	cbnz	x19, LBB0_12
; %bb.11:
	str	x20, [x8]
	mov	x19, x20
	mov	x20, #0
LBB0_12:
	mov	x0, x19
	bl	_atomic_inc
	b	LBB0_5
LBB0_13:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_audit_log_lost
	mov	x19, #0
	b	LBB0_7
LBB0_14:
	mov	x19, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory in TTY auditing"

	.no_dead_strip	_tty_audit_buf_get
.subsections_via_symbols
