	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uart_opal_cnprobe
_uart_opal_cnprobe:                     ## @uart_opal_cnprobe
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	callq	_opal_check
	testq	%rax, %rax
	je	LBB0_1
LBB0_6:
	movq	_CN_DEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_OF_finddevice
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	leaq	-96(%rbp), %rdx
	movl	%eax, %edi
	movl	$64, %ecx
	callq	_OF_getprop
	testq	%rax, %rax
	jle	LBB0_6
## %bb.3:
	leaq	-96(%rbp), %rdi
	callq	_OF_finddevice
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, _uart_opal_cnprobe.sc(%rip)
	leaq	_uart_opal_cnprobe.sc(%rip), %r14
	movq	%r14, %rdi
	callq	_uart_opal_probe_node
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	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	_uart_opal_cnprobe.sc+4(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	_CN_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_console_sc@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	movq	%r14, 8(%rbx)
	movq	_stdout_cp@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	jmp	LBB0_7
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_uart_opal_cnprobe.sc,8,2 ## @uart_opal_cnprobe.sc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/chosen"

L_.str.1:                               ## @.str.1
	.asciz	"linux,stdout-path"

L_.str.2:                               ## @.str.2
	.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	_CN_NORMAL,4,2                  ## @CN_NORMAL
	.comm	_console_sc,8,3                 ## @console_sc
	.comm	_stdout_cp,8,3                  ## @stdout_cp
	.comm	_CN_DEAD,4,2                    ## @CN_DEAD
	.no_dead_strip	_uart_opal_cnprobe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uart_opal_cnprobe
_uart_opal_cnprobe:                     ; @uart_opal_cnprobe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	bl	_opal_check
	cbz	x0, LBB0_4
LBB0_1:
Lloh3:
	adrp	x8, _CN_DEAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CN_DEAD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_2:
	ldur	x8, [x29, #-24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_OF_finddevice
	cmn	w0, #1
	b.eq	LBB0_1
; %bb.5:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	w3, #64
	bl	_OF_getprop
	cmp	x0, #1
	b.lt	LBB0_1
; %bb.6:
	add	x0, sp, #8
	bl	_OF_finddevice
	cmn	w0, #1
	b.eq	LBB0_1
; %bb.7:
Lloh13:
	adrp	x20, _uart_opal_cnprobe.sc@PAGE
Lloh14:
	add	x20, x20, _uart_opal_cnprobe.sc@PAGEOFF
	str	w0, [x20]
	mov	x0, x20
	bl	_uart_opal_probe_node
	cbnz	x0, LBB0_1
; %bb.8:
Lloh15:
	adrp	x8, _MTX_SPIN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MTX_SPIN@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _MTX_QUIET@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MTX_QUIET@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _MTX_NOWITNESS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MTX_NOWITNESS@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w3, w8, w9
	add	x0, x20, #4
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, #0
	bl	_mtx_init
Lloh26:
	adrp	x8, _CN_NORMAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CN_NORMAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _console_sc@GOTPAGE
Lloh30:
	ldr	x9, [x9, _console_sc@GOTPAGEOFF]
	str	w8, [x19]
Lloh31:
	str	x20, [x9]
	str	x20, [x19, #8]
Lloh32:
	adrp	x8, _stdout_cp@GOTPAGE
Lloh33:
	ldr	x8, [x8, _stdout_cp@GOTPAGEOFF]
Lloh34:
	str	x19, [x8]
	b	LBB0_2
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_uart_opal_cnprobe.sc,8,2 ; @uart_opal_cnprobe.sc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/chosen"

l_.str.1:                               ; @.str.1
	.asciz	"linux,stdout-path"

l_.str.2:                               ; @.str.2
	.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	_CN_NORMAL,4,2                  ; @CN_NORMAL
	.comm	_console_sc,8,3                 ; @console_sc
	.comm	_stdout_cp,8,3                  ; @stdout_cp
	.comm	_CN_DEAD,4,2                    ; @CN_DEAD
	.no_dead_strip	_uart_opal_cnprobe
.subsections_via_symbols
