	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib9000_mbx_host_init
_dib9000_mbx_host_init:                 ## @dib9000_mbx_host_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	xorl	%r12d, %r12d
	cmpl	$1, %esi
	sete	%r12b
	shll	$4, %r12d
	orl	$1027, %r12d                    ## imm = 0x403
	movl	%r12d, %esi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_dib9000_write_word
	movl	$-999, %ebx                     ## imm = 0xFC19
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_dib9000_read_word
	movl	%eax, %r13d
	movl	$100, %edi
	callq	_msleep
	testl	$32768, %r13d                   ## imm = 0x8000
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_1
LBB0_3:
	testl	$32768, %r13d                   ## imm = 0x8000
	jne	LBB0_4
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_6
LBB0_4:
	addl	$65, %r14d
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MBX: init ERROR, no response from RISC %c\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"MBX: initialized\n"

	.no_dead_strip	_dib9000_mbx_host_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib9000_mbx_host_init
_dib9000_mbx_host_init:                 ; @dib9000_mbx_host_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	mov	w8, #1027
	mov	w9, #1043
	cmp	w1, #1
	csel	w21, w9, w8, eq
	mov	x1, x21
	mov	w2, #32768
	bl	_dib9000_write_word
	mov	w8, #-999
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x8
	mov	x0, x20
	mov	x1, x21
	bl	_dib9000_read_word
	mov	x22, x0
	mov	w0, #100
	bl	_msleep
	tbz	w22, #15, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w8, w23, #1
	cbnz	w23, LBB0_1
LBB0_3:
	tbnz	w22, #15, LBB0_5
; %bb.4:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	add	w8, w19, #65
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MBX: init ERROR, no response from RISC %c\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"MBX: initialized\n"

	.no_dead_strip	_dib9000_mbx_host_init
.subsections_via_symbols
