	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ser12_check_uart
_ser12_check_uart:                      ## @ser12_check_uart
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_c_uart_16450@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_c_uart_unknown@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	%eax, -60(%rbp)
	movq	_c_uart_16550@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_c_uart_16550A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	callq	_MCR
	movl	%eax, %edi
	callq	_inb
	movzbl	%al, %r14d
	movl	%r14d, %ebx
	orl	$16, %ebx
	movl	%r12d, %edi
	callq	_MCR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb
	movl	%r12d, %edi
	callq	_MSR
	movl	%eax, %edi
	callq	_inb
	movl	%eax, %r15d
	movl	%r12d, %edi
	callq	_MCR
	movl	$26, %edi
	movl	%eax, %esi
	callq	_outb
	movl	%r12d, %edi
	callq	_MSR
	movl	%eax, %edi
	callq	_inb
	movl	%eax, %ebx
	andl	$240, %ebx
	movl	%r12d, %edi
	callq	_MCR
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_outb
	movzbl	%r15b, %r14d
	movl	%r12d, %edi
	callq	_MSR
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_outb
	cmpl	$144, %ebx
	jne	LBB0_1
## %bb.2:
	movl	%r12d, %edi
	callq	_RBR
	movl	%eax, %edi
	callq	_inb
	movl	%r12d, %edi
	callq	_RBR
	movl	%eax, %edi
	callq	_inb
	movl	%r12d, %edi
	callq	_FCR
	movl	$1, %edi
	movl	%eax, %esi
	callq	_outb
	movl	%r12d, %edi
	callq	_IIR
	movl	%eax, %edi
	callq	_inb
                                        ## kill: def $eax killed $eax def $rax
	shrl	$6, %eax
	andl	$3, %eax
	movl	-64(%rbp,%rax,4), %r14d
	movq	_c_uart_16450@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_5
## %bb.3:
	movl	%r12d, %edi
	callq	_SCR
	movl	$90, %edi
	movl	%eax, %esi
	callq	_outb
	movl	%r12d, %edi
	callq	_SCR
	movl	%eax, %edi
	callq	_inb
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_SCR
	movl	$165, %edi
	movl	%eax, %esi
	callq	_outb
	movl	%r12d, %edi
	callq	_SCR
	movl	%eax, %edi
	callq	_inb
	movzbl	%bl, %ecx
	xorl	$90, %ecx
	movzbl	%al, %eax
	xorl	$165, %eax
	orl	%ecx, %eax
	je	LBB0_5
## %bb.4:
	movq	_c_uart_8250@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_5
LBB0_1:
	movl	(%r13), %r14d
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_c_uart_16450,4,2               ## @c_uart_16450
	.comm	_c_uart_unknown,4,2             ## @c_uart_unknown
	.comm	_c_uart_16550,4,2               ## @c_uart_16550
	.comm	_c_uart_16550A,4,2              ## @c_uart_16550A
	.comm	_c_uart_8250,4,2                ## @c_uart_8250
	.no_dead_strip	_ser12_check_uart
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ser12_check_uart
_ser12_check_uart:                      ; @ser12_check_uart
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x22, _c_uart_16450@GOTPAGE
Lloh4:
	ldr	x22, [x22, _c_uart_16450@GOTPAGEOFF]
Lloh5:
	adrp	x23, _c_uart_unknown@GOTPAGE
Lloh6:
	ldr	x23, [x23, _c_uart_unknown@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [x23]
	stp	w8, w9, [sp, #8]
Lloh7:
	adrp	x8, _c_uart_16550@GOTPAGE
Lloh8:
	ldr	x8, [x8, _c_uart_16550@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _c_uart_16550A@GOTPAGE
Lloh11:
	ldr	x9, [x9, _c_uart_16550A@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #16]
	bl	_MCR
	bl	_inb
	and	w20, w0, #0xff
	orr	w21, w20, #0x10
	mov	x0, x19
	bl	_MCR
	mov	x1, x0
	mov	x0, x21
	bl	_outb
	mov	x0, x19
	bl	_MSR
	bl	_inb
	mov	x21, x0
	mov	x0, x19
	bl	_MCR
	mov	x1, x0
	mov	w0, #26
	bl	_outb
	mov	x0, x19
	bl	_MSR
	bl	_inb
	and	w24, w0, #0xf0
	mov	x0, x19
	bl	_MCR
	mov	x1, x0
	mov	x0, x20
	bl	_outb
	and	w20, w21, #0xff
	mov	x0, x19
	bl	_MSR
	mov	x1, x0
	mov	x0, x20
	bl	_outb
	cmp	w24, #144
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_RBR
	bl	_inb
	mov	x0, x19
	bl	_RBR
	bl	_inb
	mov	x0, x19
	bl	_FCR
	mov	x1, x0
	mov	w0, #1
	bl	_outb
	mov	x0, x19
	bl	_IIR
	bl	_inb
	ubfx	w8, w0, #6, #2
	add	x9, sp, #8
	ldr	w20, [x9, w8, uxtw #2]
	ldr	w8, [x22]
	cmp	w20, w8
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_SCR
	mov	x1, x0
	mov	w22, #90
	mov	w0, #90
	bl	_outb
	mov	x0, x19
	bl	_SCR
	bl	_inb
	mov	x21, x0
	mov	x0, x19
	bl	_SCR
	mov	x1, x0
	mov	w0, #165
	bl	_outb
	mov	x0, x19
	bl	_SCR
	bl	_inb
	and	w8, w21, #0xff
	and	w9, w0, #0xff
	cmp	w9, #165
	ccmp	w8, w22, #0, eq
Lloh13:
	adrp	x8, _c_uart_8250@GOTPAGE
Lloh14:
	ldr	x8, [x8, _c_uart_8250@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	csel	w20, w8, w20, ne
	b	LBB0_4
LBB0_3:
	ldr	w20, [x23]
LBB0_4:
	ldr	x8, [sp, #24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_c_uart_16450,4,2               ; @c_uart_16450
	.comm	_c_uart_unknown,4,2             ; @c_uart_unknown
	.comm	_c_uart_16550,4,2               ; @c_uart_16550
	.comm	_c_uart_16550A,4,2              ; @c_uart_16550A
	.comm	_c_uart_8250,4,2                ; @c_uart_8250
	.no_dead_strip	_ser12_check_uart
.subsections_via_symbols
