	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtdoops_console_write
_mtdoops_console_write:                 ## @mtdoops_console_write
	.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	_oops_in_progress@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.1:
	movq	(%rdi), %rbx
	cmpl	$0, 20(%rbx)
	je	LBB0_9
## %bb.2:
	cmpq	$0, 24(%rbx)
	je	LBB0_9
## %bb.3:
	movl	%edx, %r12d
	movq	%rsi, %r14
	leaq	4(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	cmpl	$0, 20(%rbx)
	je	LBB0_8
## %bb.4:
	movl	(%rbx), %ecx
	movq	8(%rbx), %rax
	testl	%ecx, %ecx
	jne	LBB0_6
## %bb.5:
	movl	16(%rbx), %ecx
	movl	%ecx, (%rax)
	movq	_MTDOOPS_KERNMSG_MAGIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movl	$8, (%rbx)
	movl	$8, %ecx
LBB0_6:
	leal	(%rcx,%r12), %edx
	movq	_OOPS_PAGE_SIZE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, %r13d
	subl	%ecx, %r13d
	cmpl	%esi, %edx
	cmovbel	%r12d, %r13d
	movslq	%ecx, %rcx
	leaq	(%rax,%rcx,4), %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	addl	%r13d, (%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%rbx), %eax
	movq	_OOPS_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtdoops_console_sync           ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_oops_in_progress,4,2           ## @oops_in_progress
	.comm	_MTDOOPS_KERNMSG_MAGIC,4,2      ## @MTDOOPS_KERNMSG_MAGIC
	.comm	_OOPS_PAGE_SIZE,4,2             ## @OOPS_PAGE_SIZE
	.no_dead_strip	_mtdoops_console_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtdoops_console_write
_mtdoops_console_write:                 ; @mtdoops_console_write
	.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
Lloh0:
	adrp	x8, _oops_in_progress@GOTPAGE
Lloh1:
	ldr	x8, [x8, _oops_in_progress@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.1:
	ldr	x22, [x0]
	ldr	x8, [x22, #24]
	ldr	w9, [x22, #20]
	cmp	w9, #0
	ccmp	x8, #0, #4, ne
	b.eq	LBB0_7
; %bb.2:
	mov	x20, x2
	mov	x19, x1
	add	x21, x22, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w8, [x22, #20]
	cbz	w8, LBB0_8
; %bb.3:
	ldr	w9, [x22]
	ldr	x8, [x22, #8]
	cbnz	w9, LBB0_5
; %bb.4:
	ldr	w9, [x22, #16]
	str	w9, [x8]
Lloh3:
	adrp	x9, _MTDOOPS_KERNMSG_MAGIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MTDOOPS_KERNMSG_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [x8, #4]
	mov	w9, #8
	str	w9, [x22]
LBB0_5:
Lloh6:
	adrp	x23, _OOPS_PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _OOPS_PAGE_SIZE@GOTPAGEOFF]
	ldr	w10, [x23]
	sub	w11, w10, w9
	add	w12, w9, w20
	cmp	w12, w10
	csel	w20, w11, w20, hi
	add	x0, x8, w9, sxtw #2
	mov	x1, x19
	mov	x2, x20
	bl	_memcpy
	ldr	w8, [x22]
	add	w8, w8, w20
	str	w8, [x22]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w8, [x22]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_7
LBB0_6:
	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	_mtdoops_console_sync
LBB0_7:
	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_8:
	mov	x0, x21
	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	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_oops_in_progress,4,2           ; @oops_in_progress
	.comm	_MTDOOPS_KERNMSG_MAGIC,4,2      ; @MTDOOPS_KERNMSG_MAGIC
	.comm	_OOPS_PAGE_SIZE,4,2             ; @OOPS_PAGE_SIZE
	.no_dead_strip	_mtdoops_console_write
.subsections_via_symbols
