	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tumbler_find_device
_tumbler_find_device:                   ## @tumbler_find_device
	.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
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.1:
	callq	_find_compatible_audio_device
	jmp	LBB0_3
LBB0_2:
	callq	_find_audio_device
LBB0_3:
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:
	movzwl	(%rax), %eax
	jmp	LBB0_11
LBB0_4:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_DBG
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_snd_printdd
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subq	(%rax), %rbx
	jmp	LBB0_22
LBB0_7:
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movl	(%rax), %ecx
	leal	80(%rcx), %eax
	cmpl	$80, %ecx
	cmovgel	%ecx, %eax
LBB0_11:
	movzwl	%ax, %eax
	movl	%eax, (%r15)
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	(%rax), %ecx
	movl	%ecx, 4(%r15)
	cmpl	$1, (%rax)
	movl	$5, %ecx
	sbbl	$0, %ecx
	movl	%ecx, 8(%r15)
	xorl	%ecx, %ecx
	cmpl	$0, (%rax)
	sete	%cl
	orl	$4, %ecx
	movl	%ecx, 12(%r15)
LBB0_21:
	movl	(%r15), %edx
	movl	4(%r15), %ecx
	leaq	L_.str.7(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_DBG
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_irq_of_parse_and_map
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_of_node_put
LBB0_22:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movabsq	$17179869184, %rax              ## imm = 0x400000000
	movq	%rax, 4(%r15)
	movl	$5, 12(%r15)
	testq	%r12, %r12
	je	LBB0_21
## %bb.14:
	movq	%r13, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_21
## %bb.15:
	movl	12(%rax), %ecx
	cmpl	$9, %ecx
	jne	LBB0_18
## %bb.16:
	cmpl	$9, 16(%rax)
	jne	LBB0_21
## %bb.17:
	movabsq	$51539607565, %rcx              ## imm = 0xC0000000D
	movq	%rcx, 8(%r15)
	movl	12(%rax), %ecx
LBB0_18:
	cmpl	$1, %ecx
	jne	LBB0_21
## %bb.19:
	cmpl	$1, 16(%rax)
	jne	LBB0_21
## %bb.20:
	movabsq	$17179869189, %rax              ## imm = 0x400000005
	movq	%rax, 8(%r15)
	jmp	LBB0_21
LBB0_8:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_DBG
	leaq	L_.str.5(%rip), %rdi
	movq	%r14, %rsi
	callq	_snd_printd
	movq	%r13, %rdi
	callq	_of_node_put
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(W) cannot find audio device %s !\n"

L_.str.1:                               ## @.str.1
	.asciz	"cannot find device %s\n"

	.comm	_ENODEV,8,3                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"AAPL,address"

L_.str.3:                               ## @.str.3
	.asciz	"reg"

L_.str.4:                               ## @.str.4
	.asciz	"(E) cannot find address for device %s !\n"

L_.str.5:                               ## @.str.5
	.asciz	"cannot find address for device %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"audio-gpio-active-state"

L_.str.7:                               ## @.str.7
	.asciz	"(I) GPIO device %s found, offset: %x, active state: %d !\n"

	.no_dead_strip	_tumbler_find_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function tumbler_find_device
lCPI0_0:
	.long	0                               ; 0x0
	.long	4                               ; 0x4
lCPI0_1:
	.long	13                              ; 0xd
	.long	12                              ; 0xc
lCPI0_2:
	.long	5                               ; 0x5
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_tumbler_find_device:                   ; @tumbler_find_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	cbz	w3, LBB0_4
; %bb.1:
	bl	_find_compatible_audio_device
	mov	x20, x0
	cbz	x0, LBB0_5
LBB0_2:
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_7
; %bb.3:
	ldrh	w8, [x0]
	b	LBB0_9
LBB0_4:
	bl	_find_audio_device
	mov	x20, x0
	cbnz	x0, LBB0_2
LBB0_5:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DBG
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_snd_printdd
LBB0_6:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_12
LBB0_7:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_21
; %bb.8:
	ldr	w8, [x0]
	add	w9, w8, #80
	cmp	w8, #80
	csel	w8, w9, w8, lt
LBB0_9:
	and	w8, w8, #0xffff
	str	w8, [x21]
Lloh11:
	adrp	x1, l_.str.6@PAGE
Lloh12:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_13
; %bb.10:
	ldr	w8, [x0]
	str	w8, [x21, #4]
	ldr	w8, [x0]
	cmp	w8, #0
	mov	w8, #4
	cinc	w9, w8, ne
	str	w9, [x21, #8]
	ldr	w9, [x0]
	cmp	w9, #0
	cinc	w8, w8, eq
	str	w8, [x21, #12]
LBB0_11:
	ldp	w8, w9, [x21]
	stp	x8, x9, [sp]
Lloh13:
	adrp	x0, l_.str.7@PAGE
Lloh14:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	x1, x19
	bl	_DBG
	mov	x0, x20
	mov	w1, #0
	bl	_irq_of_parse_and_map
	mov	x19, x0
	mov	x0, x20
	bl	_of_node_put
	mov	x0, x19
LBB0_12:
	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
	add	sp, sp, #64
	ret
LBB0_13:
Lloh15:
	adrp	x8, lCPI0_0@PAGE
Lloh16:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x21, #4]
	mov	w8, #5
	str	w8, [x21, #12]
	cbz	x22, LBB0_11
; %bb.14:
	mov	x0, x20
	mov	x1, x22
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_11
; %bb.15:
	ldr	w8, [x0, #12]
	cmp	w8, #9
	b.ne	LBB0_18
; %bb.16:
	ldr	w8, [x0, #16]
	cmp	w8, #9
	b.ne	LBB0_11
; %bb.17:
Lloh17:
	adrp	x8, lCPI0_1@PAGE
Lloh18:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x21, #8]
	ldr	w8, [x0, #12]
LBB0_18:
	cmp	w8, #1
	b.ne	LBB0_11
; %bb.19:
	ldr	w8, [x0, #16]
	cmp	w8, #1
	b.ne	LBB0_11
; %bb.20:
Lloh19:
	adrp	x8, lCPI0_2@PAGE
Lloh20:
	ldr	d0, [x8, lCPI0_2@PAGEOFF]
	str	d0, [x21, #8]
	b	LBB0_11
LBB0_21:
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
	bl	_DBG
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x19
	bl	_snd_printd
	mov	x0, x20
	bl	_of_node_put
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdr	Lloh15, Lloh16
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpLdr	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(W) cannot find audio device %s !\n"

l_.str.1:                               ; @.str.1
	.asciz	"cannot find device %s\n"

	.comm	_ENODEV,8,3                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"AAPL,address"

l_.str.3:                               ; @.str.3
	.asciz	"reg"

l_.str.4:                               ; @.str.4
	.asciz	"(E) cannot find address for device %s !\n"

l_.str.5:                               ; @.str.5
	.asciz	"cannot find address for device %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"audio-gpio-active-state"

l_.str.7:                               ; @.str.7
	.asciz	"(I) GPIO device %s found, offset: %x, active state: %d !\n"

	.no_dead_strip	_tumbler_find_device
.subsections_via_symbols
