	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_uart_init
_pci_uart_init:                         ## @pci_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	_PCIBAR_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_UART_IO_BAR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r15d, %r15d
	movq	%rsi, %rdi
	xorl	%esi, %esi
	callq	_pci_emul_alloc_bar
	movq	%rbx, %rdi
	callq	_pci_lintr_request
	movq	_PCIR_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_COM_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pci_set_cfgdata16
	movq	_PCIR_VENDOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_COM_VENDOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pci_set_cfgdata16
	movq	_PCIR_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCIC_SIMPLECOMM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pci_set_cfgdata8
	movq	_pci_uart_intr_assert@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_pci_uart_intr_deassert@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_uart_init
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_uart_set_backend
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %ecx
	movl	4(%rbx), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_fprintf
	movl	$-1, %r15d
LBB0_2:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIBAR_IO,4,2                  ## @PCIBAR_IO
	.comm	_UART_IO_BAR_SIZE,4,2           ## @UART_IO_BAR_SIZE
	.comm	_PCIR_DEVICE,4,2                ## @PCIR_DEVICE
	.comm	_COM_DEV,4,2                    ## @COM_DEV
	.comm	_PCIR_VENDOR,4,2                ## @PCIR_VENDOR
	.comm	_COM_VENDOR,4,2                 ## @COM_VENDOR
	.comm	_PCIR_CLASS,4,2                 ## @PCIR_CLASS
	.comm	_PCIC_SIMPLECOMM,4,2            ## @PCIC_SIMPLECOMM
	.comm	_pci_uart_intr_assert,4,2       ## @pci_uart_intr_assert
	.comm	_pci_uart_intr_deassert,4,2     ## @pci_uart_intr_deassert
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to initialize backend '%s' for pci uart at %d:%d\n"

	.no_dead_strip	_pci_uart_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_uart_init
_pci_uart_init:                         ; @pci_uart_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, _PCIBAR_IO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIBAR_IO@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _UART_IO_BAR_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UART_IO_BAR_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x1
	mov	w1, #0
	bl	_pci_emul_alloc_bar
	mov	x0, x20
	bl	_pci_lintr_request
Lloh6:
	adrp	x8, _PCIR_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCIR_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _COM_DEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _COM_DEV@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_pci_set_cfgdata16
Lloh12:
	adrp	x8, _PCIR_VENDOR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCIR_VENDOR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _COM_VENDOR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _COM_VENDOR@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_pci_set_cfgdata16
Lloh18:
	adrp	x8, _PCIR_CLASS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCIR_CLASS@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _PCIC_SIMPLECOMM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PCIC_SIMPLECOMM@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_pci_set_cfgdata8
Lloh24:
	adrp	x8, _pci_uart_intr_assert@GOTPAGE
Lloh25:
	ldr	x8, [x8, _pci_uart_intr_assert@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x8, _pci_uart_intr_deassert@GOTPAGE
Lloh28:
	ldr	x8, [x8, _pci_uart_intr_deassert@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_uart_init
	str	x0, [x20, #8]
	mov	x1, x19
	bl	_uart_set_backend
	cbz	x0, LBB0_2
; %bb.1:
Lloh30:
	adrp	x8, _stderr@GOTPAGE
Lloh31:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	ldp	w3, w4, [x20]
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_fprintf
	mov	w0, #-1
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIBAR_IO,4,2                  ; @PCIBAR_IO
	.comm	_UART_IO_BAR_SIZE,4,2           ; @UART_IO_BAR_SIZE
	.comm	_PCIR_DEVICE,4,2                ; @PCIR_DEVICE
	.comm	_COM_DEV,4,2                    ; @COM_DEV
	.comm	_PCIR_VENDOR,4,2                ; @PCIR_VENDOR
	.comm	_COM_VENDOR,4,2                 ; @COM_VENDOR
	.comm	_PCIR_CLASS,4,2                 ; @PCIR_CLASS
	.comm	_PCIC_SIMPLECOMM,4,2            ; @PCIC_SIMPLECOMM
	.comm	_pci_uart_intr_assert,4,2       ; @pci_uart_intr_assert
	.comm	_pci_uart_intr_deassert,4,2     ; @pci_uart_intr_deassert
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to initialize backend '%s' for pci uart at %d:%d\n"

	.no_dead_strip	_pci_uart_init
.subsections_via_symbols
