	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function af9013_sleep
_af9013_sleep:                          ## @af9013_sleep
	.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), %r15
	movq	8(%r15), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r15), %edi
	movl	$55088, %esi                    ## imm = 0xD730
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	(%r15), %edi
	movl	$54295, %esi                    ## imm = 0xD417
	movl	$16, %edx
	movl	$16, %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movl	(%r15), %edi
	movl	$44799, %esi                    ## imm = 0xAEFF
	movl	$1, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	(%r15), %edi
	xorl	%r15d, %r15d
	movl	$54295, %esi                    ## imm = 0xD417
	xorl	%ecx, %ecx
	movl	$5000, %r8d                     ## imm = 0x1388
	movl	$1000000, %r9d                  ## imm = 0xF4240
	callq	_regmap_read_poll_timeout
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	%r15d, %ebx
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"failed %d\n"

	.no_dead_strip	_af9013_sleep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function af9013_sleep
_af9013_sleep:                          ; @af9013_sleep
	.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
	ldr	x21, [x0]
	ldr	x19, [x21, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w0, [x21]
	mov	w1, #55088
	mov	w2, #1
	mov	w3, #0
	bl	_regmap_update_bits
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x21]
	mov	w1, #54295
	mov	w2, #16
	mov	w3, #16
	bl	_regmap_update_bits
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	w0, [x21]
	mov	w1, #44799
	mov	w2, #1
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x21]
	mov	w1, #54295
	mov	w3, #0
	mov	w4, #5000
	mov	w5, #16960
	movk	w5, #15, lsl #16
	bl	_regmap_read_poll_timeout
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	str	x20, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	x0, x20
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"failed %d\n"

	.no_dead_strip	_af9013_sleep
.subsections_via_symbols
