	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hda_set_power_state
_hda_set_power_state:                   ## @hda_set_power_state
	.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, %r13
	movq	24(%rdi), %r15
	testq	%r15, %r15
	jne	LBB0_2
## %bb.1:
	movq	16(%r13), %r15
LBB0_2:
	movq	_AC_PWRST_D3@GOTPCREL(%rip), %rax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	cmpl	%r14d, (%rax)
	jne	LBB0_4
## %bb.3:
	cmpq	$0, 8(%r13)
	movl	$100, %eax
	movl	$10, %edi
	cmovel	%eax, %edi
	callq	_msleep
	movq	_HDA_RW_NO_RESPONSE_FALLBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_4:
	movl	$9, %ebx
	movq	_AC_PWRST_ERROR@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	*%rax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_AC_VERB_SET_POWER_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %r8d
	callq	_snd_hda_codec_read
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_snd_hda_codec_set_power_to_all
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_hda_sync_power_state
	subl	$1, %ebx
	setb	%cl
	testl	%eax, (%r12)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	testb	%cl, %cl
	je	LBB0_5
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC_PWRST_D3,4,2                ## @AC_PWRST_D3
	.comm	_HDA_RW_NO_RESPONSE_FALLBACK,4,2 ## @HDA_RW_NO_RESPONSE_FALLBACK
	.comm	_AC_VERB_SET_POWER_STATE,4,2    ## @AC_VERB_SET_POWER_STATE
	.comm	_AC_PWRST_ERROR,4,2             ## @AC_PWRST_ERROR
	.no_dead_strip	_hda_set_power_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hda_set_power_state
_hda_set_power_state:                   ; @hda_set_power_state
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0, #24]
	cbnz	x21, LBB0_2
; %bb.1:
	ldr	x21, [x20, #16]
LBB0_2:
Lloh0:
	adrp	x8, _AC_PWRST_D3@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC_PWRST_D3@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	cmp	x8, #0
	mov	w8, #10
	mov	w9, #100
	csel	w0, w9, w8, eq
	bl	_msleep
Lloh3:
	adrp	x8, _HDA_RW_NO_RESPONSE_FALLBACK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDA_RW_NO_RESPONSE_FALLBACK@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	b	LBB0_5
LBB0_4:
	mov	w22, #0
LBB0_5:
	mov	w23, #9
Lloh6:
	adrp	x24, _AC_VERB_SET_POWER_STATE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _AC_VERB_SET_POWER_STATE@GOTPAGEOFF]
Lloh8:
	adrp	x25, _AC_PWRST_ERROR@GOTPAGE
Lloh9:
	ldr	x25, [x25, _AC_PWRST_ERROR@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w3, [x24]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x4, x19
	bl	_snd_hda_codec_read
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_snd_hda_codec_set_power_to_all
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_hda_sync_power_state
	ldr	w8, [x25]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w23, #0, #4, ne
	sub	w23, w23, #1
	b.eq	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	blr	x8
	b	LBB0_7
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AC_PWRST_D3,4,2                ; @AC_PWRST_D3
	.comm	_HDA_RW_NO_RESPONSE_FALLBACK,4,2 ; @HDA_RW_NO_RESPONSE_FALLBACK
	.comm	_AC_VERB_SET_POWER_STATE,4,2    ; @AC_VERB_SET_POWER_STATE
	.comm	_AC_PWRST_ERROR,4,2             ; @AC_PWRST_ERROR
	.no_dead_strip	_hda_set_power_state
.subsections_via_symbols
