	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smart1_completed
_smart1_completed:                      ## @smart1_completed
	.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	%rdi, %rbx
	movq	_SMART1_SYSTEM_DOORBELL@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_inb
	movq	_CHANNEL_BUSY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testl	%eax, %edi
	je	LBB0_4
## %bb.1:
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	callq	_outb
	movq	_SMART1_COMPLETE_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_inl
	movq	%rax, %r14
	movq	_SMART1_LISTSTATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_inb
	movl	%eax, %r15d
	movq	_CHANNEL_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SMART1_LOCAL_DOORBELL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_outb
	testq	%r14, %r14
	je	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_bus_to_virt
	movb	%r15b, (%rax)
	jmp	LBB0_5
LBB0_4:
	xorl	%r14d, %r14d
LBB0_5:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMART1_SYSTEM_DOORBELL,8,3     ## @SMART1_SYSTEM_DOORBELL
	.comm	_CHANNEL_BUSY,4,2               ## @CHANNEL_BUSY
	.comm	_SMART1_COMPLETE_ADDR,8,3       ## @SMART1_COMPLETE_ADDR
	.comm	_SMART1_LISTSTATUS,8,3          ## @SMART1_LISTSTATUS
	.comm	_CHANNEL_CLEAR,4,2              ## @CHANNEL_CLEAR
	.comm	_SMART1_LOCAL_DOORBELL,8,3      ## @SMART1_LOCAL_DOORBELL
	.no_dead_strip	_smart1_completed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smart1_completed
_smart1_completed:                      ; @smart1_completed
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x8, [x0]
Lloh0:
	adrp	x20, _SMART1_SYSTEM_DOORBELL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SMART1_SYSTEM_DOORBELL@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_inb
	mov	x8, x0
Lloh2:
	adrp	x9, _CHANNEL_BUSY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CHANNEL_BUSY@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x9]
	tst	w0, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_outb
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _SMART1_COMPLETE_ADDR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SMART1_COMPLETE_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_inl
	mov	x20, x0
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _SMART1_LISTSTATUS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SMART1_LISTSTATUS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_inb
	mov	x21, x0
Lloh11:
	adrp	x8, _CHANNEL_CLEAR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CHANNEL_CLEAR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh14:
	adrp	x9, _SMART1_LOCAL_DOORBELL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SMART1_LOCAL_DOORBELL@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_outb
	cbz	x20, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_bus_to_virt
	strb	w21, [x0]
	b	LBB0_4
LBB0_3:
	mov	x20, #0
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SMART1_SYSTEM_DOORBELL,8,3     ; @SMART1_SYSTEM_DOORBELL
	.comm	_CHANNEL_BUSY,4,2               ; @CHANNEL_BUSY
	.comm	_SMART1_COMPLETE_ADDR,8,3       ; @SMART1_COMPLETE_ADDR
	.comm	_SMART1_LISTSTATUS,8,3          ; @SMART1_LISTSTATUS
	.comm	_CHANNEL_CLEAR,4,2              ; @CHANNEL_CLEAR
	.comm	_SMART1_LOCAL_DOORBELL,8,3      ; @SMART1_LOCAL_DOORBELL
	.no_dead_strip	_smart1_completed
.subsections_via_symbols
