	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdsp_wait_for_iobox
_hdsp_wait_for_iobox:                   ## @hdsp_wait_for_iobox
	.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	%edx, %r15d
	movq	(%rdi), %rcx
	movq	_H9652@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_7
## %bb.1:
	movq	_H9632@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_7
## %bb.2:
	movl	%esi, %r12d
	movq	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_6
## %bb.3:
	xorl	%ebx, %ebx
	movq	_HDSP_ConfigError@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_HDSP_statusRegister@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_hdsp_read
	testl	%eax, (%r13)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, %edi
	callq	_msleep
	addl	%r15d, %ebx
	decl	%r12d
	jne	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_snd_printk
	movq	_HDSP_FirmwareLoaded@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 8(%r14)
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_snd_printd
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_H9652,8,3                      ## @H9652
	.comm	_H9632,8,3                      ## @H9632
	.comm	_HDSP_statusRegister,4,2        ## @HDSP_statusRegister
	.comm	_HDSP_ConfigError,4,2           ## @HDSP_ConfigError
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Hammerfall-DSP: iobox found after %ums!\n"

L_.str.1:                               ## @.str.1
	.asciz	"Hammerfall-DSP: no Digiface or Multiface connected!\n"

	.comm	_HDSP_FirmwareLoaded,4,2        ## @HDSP_FirmwareLoaded
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_hdsp_wait_for_iobox
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdsp_wait_for_iobox
_hdsp_wait_for_iobox:                   ; @hdsp_wait_for_iobox
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _H9652@GOTPAGE
Lloh1:
	ldr	x9, [x9, _H9652@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _H9632@GOTPAGE
Lloh4:
	ldr	x10, [x10, _H9632@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_7
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	cbz	w1, LBB0_5
; %bb.2:
	mov	x20, x2
	mov	w22, #0
Lloh6:
	adrp	x23, _HDSP_statusRegister@GOTPAGE
Lloh7:
	ldr	x23, [x23, _HDSP_statusRegister@GOTPAGEOFF]
Lloh8:
	adrp	x24, _HDSP_ConfigError@GOTPAGE
Lloh9:
	ldr	x24, [x24, _HDSP_ConfigError@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_hdsp_read
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_msleep
	add	w22, w22, w20
	subs	w21, w21, #1
	b.ne	LBB0_3
LBB0_5:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_snd_printk
Lloh12:
	adrp	x8, _HDSP_FirmwareLoaded@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HDSP_FirmwareLoaded@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_6:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_snd_printd
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_H9652,8,3                      ; @H9652
	.comm	_H9632,8,3                      ; @H9632
	.comm	_HDSP_statusRegister,4,2        ; @HDSP_statusRegister
	.comm	_HDSP_ConfigError,4,2           ; @HDSP_ConfigError
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Hammerfall-DSP: iobox found after %ums!\n"

l_.str.1:                               ; @.str.1
	.asciz	"Hammerfall-DSP: no Digiface or Multiface connected!\n"

	.comm	_HDSP_FirmwareLoaded,4,2        ; @HDSP_FirmwareLoaded
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_hdsp_wait_for_iobox
.subsections_via_symbols
