	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_uart_init               ## -- Begin function mantis_uart_init
	.p2align	4, 0x90
_mantis_uart_init:                      ## @mantis_uart_init
	.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
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	movq	(%rbx), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rbx), %rdx
	movq	%rdx, -40(%rbp)
	movq	_MANTIS_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_rates@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %ecx
	movq	_parity@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rdx,4), %r8d
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_mantis_uart_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_INIT_WORK
	movq	_MANTIS_UART_CTL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_mmread
	andl	$65519, %eax                    ## imm = 0xFFEF
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_mmwrite
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mantis_uart_setup
	movq	_MANTIS_UART_BAUD@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_mmread
	movl	16(%rbx), %edi
	shll	$8, %edi
	orl	%eax, %edi
	movl	(%r12), %esi
	callq	_mmwrite
	movl	(%r14), %edi
	callq	_mmread
	movq	_MANTIS_UART_RXFLUSH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_mmwrite
	movl	(%r14), %edi
	callq	_mmread
	movq	_MANTIS_UART_RXINT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_mmwrite
	movq	_MANTIS_INT_IRQ1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mantis_unmask_ints
	movq	%r15, %rdi
	callq	_schedule_work
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MANTIS_INFO,4,2                ## @MANTIS_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Initializing UART @ %sbps parity:%s"

	.comm	_rates,8,3                      ## @rates
	.comm	_parity,8,3                     ## @parity
	.comm	_mantis_uart_work,4,2           ## @mantis_uart_work
	.comm	_MANTIS_UART_CTL,4,2            ## @MANTIS_UART_CTL
	.comm	_MANTIS_UART_BAUD,4,2           ## @MANTIS_UART_BAUD
	.comm	_MANTIS_UART_RXFLUSH,4,2        ## @MANTIS_UART_RXFLUSH
	.comm	_MANTIS_UART_RXINT,4,2          ## @MANTIS_UART_RXINT
	.comm	_MANTIS_INT_IRQ1,4,2            ## @MANTIS_INT_IRQ1
	.comm	_MANTIS_DEBUG,4,2               ## @MANTIS_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"UART successfully initialized"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_uart_init               ; -- Begin function mantis_uart_init
	.p2align	2
_mantis_uart_init:                      ; @mantis_uart_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x20, [x0, #8]
	ldp	x8, x9, [x20]
Lloh0:
	adrp	x10, _MANTIS_INFO@GOTPAGE
Lloh1:
	ldr	x10, [x10, _MANTIS_INFO@GOTPAGEOFF]
	stp	x8, x9, [sp, #16]
Lloh2:
	ldr	w0, [x10]
Lloh3:
	adrp	x10, _rates@GOTPAGE
Lloh4:
	ldr	x10, [x10, _rates@GOTPAGEOFF]
Lloh5:
	adrp	x11, _parity@GOTPAGE
Lloh6:
	ldr	x11, [x11, _parity@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
Lloh8:
	ldr	x11, [x11]
	ldr	w8, [x10, x8, lsl #2]
	ldr	w9, [x11, x9, lsl #2]
	stp	x8, x9, [sp]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh11:
	adrp	x8, _mantis_uart_work@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mantis_uart_work@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_INIT_WORK
Lloh14:
	adrp	x21, _MANTIS_UART_CTL@GOTPAGE
Lloh15:
	ldr	x21, [x21, _MANTIS_UART_CTL@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_mmread
	mov	w8, #65519
	and	w0, w0, w8
	ldr	w1, [x21]
	bl	_mmwrite
	add	x1, sp, #16
	mov	x0, x19
	bl	_mantis_uart_setup
Lloh16:
	adrp	x22, _MANTIS_UART_BAUD@GOTPAGE
Lloh17:
	ldr	x22, [x22, _MANTIS_UART_BAUD@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_mmread
	ldr	w8, [x20, #16]
	orr	w0, w0, w8, lsl #8
	ldr	w1, [x22]
	bl	_mmwrite
	ldr	w0, [x21]
	bl	_mmread
Lloh18:
	adrp	x8, _MANTIS_UART_RXFLUSH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MANTIS_UART_RXFLUSH@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	w1, [x21]
	bl	_mmwrite
	ldr	w0, [x21]
	bl	_mmread
Lloh21:
	adrp	x8, _MANTIS_UART_RXINT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MANTIS_UART_RXINT@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	w1, [x21]
	bl	_mmwrite
Lloh24:
	adrp	x8, _MANTIS_INT_IRQ1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MANTIS_INT_IRQ1@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mantis_unmask_ints
	mov	x0, x19
	bl	_schedule_work
Lloh27:
	adrp	x8, _MANTIS_DEBUG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MANTIS_DEBUG@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x2, l_.str.1@PAGE
Lloh31:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MANTIS_INFO,4,2                ; @MANTIS_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Initializing UART @ %sbps parity:%s"

	.comm	_rates,8,3                      ; @rates
	.comm	_parity,8,3                     ; @parity
	.comm	_mantis_uart_work,4,2           ; @mantis_uart_work
	.comm	_MANTIS_UART_CTL,4,2            ; @MANTIS_UART_CTL
	.comm	_MANTIS_UART_BAUD,4,2           ; @MANTIS_UART_BAUD
	.comm	_MANTIS_UART_RXFLUSH,4,2        ; @MANTIS_UART_RXFLUSH
	.comm	_MANTIS_UART_RXINT,4,2          ; @MANTIS_UART_RXINT
	.comm	_MANTIS_INT_IRQ1,4,2            ; @MANTIS_INT_IRQ1
	.comm	_MANTIS_DEBUG,4,2               ; @MANTIS_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"UART successfully initialized"

.subsections_via_symbols
