	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_uart_probe
_tegra_uart_probe:                      ## @tegra_uart_probe
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%r12d, %edi
	callq	_ofw_bus_status_okay
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_ofw_bus_search_compatible
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, 8(%r14)
	movq	%r14, %rbx
	addq	$4, %rbx
	leaq	L_.str(%rip), %rdx
	movl	%r12d, %edi
	xorl	%esi, %esi
	movq	%rbx, %rcx
	callq	_hwreset_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_6:
	movl	(%rbx), %edi
	callq	_hwreset_deassert
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
LBB0_5:
	movl	%r12d, %edi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	%r12d, %edi
	callq	_ofw_bus_get_node
	movl	%eax, %edi
	callq	_uart_fdt_get_shift1
	movl	%eax, %r15d
	movl	%r12d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_clk_get_by_ofw_index
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_10
LBB0_11:
	movl	(%r14), %edi
	callq	_clk_enable
	testl	%eax, %eax
	jne	LBB0_12
## %bb.13:
	movl	(%r14), %edi
	leaq	-40(%rbp), %rsi
	callq	_clk_get_freq
	testl	%eax, %eax
	je	LBB0_14
LBB0_12:
	leaq	L_.str.4(%rip), %rsi
LBB0_10:
	movl	%r12d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_1
LBB0_14:
	movl	-40(%rbp), %ecx
	movl	$0, (%rsp)
	movl	%r12d, %edi
	movl	%r15d, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_uart_bus_probe
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_compat_data,4,2                ## @compat_data
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"serial"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot get 'serial' reset\n"

L_.str.2:                               ## @.str.2
	.asciz	"Cannot unreset 'serial' reset\n"

L_.str.3:                               ## @.str.3
	.asciz	"Cannot get UART clock: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Cannot enable UART clock: %d\n"

	.no_dead_strip	_tegra_uart_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_uart_probe
_tegra_uart_probe:                      ; @tegra_uart_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	mov	x0, x19
	bl	_ofw_bus_status_okay
	cbz	w0, LBB0_12
; %bb.1:
Lloh0:
	adrp	x8, _compat_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	x8, [x0]
	cbz	x8, LBB0_12
; %bb.2:
	str	x8, [x20, #8]
	add	x21, x20, #4
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	x3, x21
	bl	_hwreset_get_by_ofw_name
	cbz	w0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_4:
	ldr	w0, [x21]
	bl	_hwreset_deassert
	cbz	w0, LBB0_6
; %bb.5:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_ofw_bus_get_node
	bl	_uart_fdt_get_shift1
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	x3, x20
	bl	_clk_get_by_ofw_index
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_8
; %bb.7:
	str	x0, [sp]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_11
LBB0_8:
	ldr	w0, [x20]
	bl	_clk_enable
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_10
; %bb.9:
	ldr	w0, [x20]
	add	x1, sp, #8
	bl	_clk_get_freq
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_14
LBB0_10:
	str	x0, [sp]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_device_printf
LBB0_12:
Lloh13:
	adrp	x8, _ENXIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
LBB0_13:
	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
	add	sp, sp, #64
	ret
LBB0_14:
	ldr	w3, [sp, #8]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_uart_bus_probe
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_compat_data,4,2                ; @compat_data
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"serial"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot get 'serial' reset\n"

l_.str.2:                               ; @.str.2
	.asciz	"Cannot unreset 'serial' reset\n"

l_.str.3:                               ; @.str.3
	.asciz	"Cannot get UART clock: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Cannot enable UART clock: %d\n"

	.no_dead_strip	_tegra_uart_probe
.subsections_via_symbols
