	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uart_opal_real_map_outbuffer
_uart_opal_real_map_outbuffer:          ## @uart_opal_real_map_outbuffer
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_opalcons_buffer@GOTPCREL(%rip), %r12
	leaq	16(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mtx_initialized
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_MTX_SPIN@GOTPCREL(%rip), %rax
	movq	_MTX_QUIET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_MTX_NOWITNESS@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mtx_init
LBB0_2:
	movq	_pmap_bootstrapped@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_mtx_lock_spin
	movq	(%r15), %rax
	movq	(%rax), %rsi
	movl	$8, %edi
	callq	_min
	movq	(%r15), %rcx
	movq	%rax, (%rcx)
	movq	%rax, (%r12)
	movq	8(%r12), %rdi
	movq	(%r14), %rsi
	movq	(%r15), %rax
	movq	(%rax), %rdx
	callq	_memcpy
	movq	8(%r12), %rax
	movq	%rax, (%r14)
	movq	%r12, (%r15)
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_opalcons_buffer,24,3           ## @opalcons_buffer
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"uart_opal"

	.comm	_MTX_SPIN,4,2                   ## @MTX_SPIN
	.comm	_MTX_QUIET,4,2                  ## @MTX_QUIET
	.comm	_MTX_NOWITNESS,4,2              ## @MTX_NOWITNESS
	.comm	_pmap_bootstrapped,4,2          ## @pmap_bootstrapped
	.no_dead_strip	_uart_opal_real_map_outbuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uart_opal_real_map_outbuffer
_uart_opal_real_map_outbuffer:          ; @uart_opal_real_map_outbuffer
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _opalcons_buffer@GOTPAGE
Lloh1:
	ldr	x22, [x22, _opalcons_buffer@GOTPAGEOFF]
	add	x21, x22, #16
	mov	x0, x21
	bl	_mtx_initialized
	cbnz	w0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _MTX_SPIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MTX_SPIN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _MTX_QUIET@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MTX_QUIET@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _MTX_NOWITNESS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MTX_NOWITNESS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w3, w8, w9
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_mtx_init
LBB0_2:
Lloh13:
	adrp	x8, _pmap_bootstrapped@GOTPAGE
Lloh14:
	ldr	x8, [x8, _pmap_bootstrapped@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.3:
	add	x0, x22, #16
	bl	_mtx_lock_spin
	ldr	x8, [x19]
	ldr	x1, [x8]
	mov	w0, #8
	bl	_min
	ldr	x8, [x19]
	str	x0, [x8]
	str	x0, [x22]
	ldr	x0, [x22, #8]
	ldr	x1, [x20]
	ldr	x8, [x19]
	ldr	x2, [x8]
	bl	_memcpy
	ldr	x8, [x22, #8]
	str	x8, [x20]
	str	x22, [x19]
LBB0_4:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_opalcons_buffer,24,3           ; @opalcons_buffer
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"uart_opal"

	.comm	_MTX_SPIN,4,2                   ; @MTX_SPIN
	.comm	_MTX_QUIET,4,2                  ; @MTX_QUIET
	.comm	_MTX_NOWITNESS,4,2              ; @MTX_NOWITNESS
	.comm	_pmap_bootstrapped,4,2          ; @pmap_bootstrapped
	.no_dead_strip	_uart_opal_real_map_outbuffer
.subsections_via_symbols
