	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function af9033_sleep
_af9033_sleep:                          ## @af9033_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r12
	movq	16(%r12), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r12), %edi
	movl	$8388684, %esi                  ## imm = 0x80004C
	movl	$1, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movl	(%r12), %edi
	movl	$8388608, %esi                  ## imm = 0x800000
	xorl	%edx, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movl	(%r12), %edi
	movl	$8388684, %esi                  ## imm = 0x80004C
	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_7
## %bb.3:
	movl	(%r12), %edi
	movl	$8452900, %esi                  ## imm = 0x80FB24
	movl	$8, %edx
	movl	$8, %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%ebx, %r15d
LBB0_8:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	8(%r12), %rax
	movq	_AF9033_TS_MODE_SERIAL@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:
	movl	(%r12), %edi
	xorl	%r15d, %r15d
	movl	$55575, %esi                    ## imm = 0xD917
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	(%r12), %edi
	movl	$55574, %esi                    ## imm = 0xD916
	movl	$1, %edx
	movl	$1, %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_AF9033_TS_MODE_SERIAL,8,3      ## @AF9033_TS_MODE_SERIAL
L_.str.1:                               ## @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_af9033_sleep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function af9033_sleep
_af9033_sleep:                          ; @af9033_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, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w0, [x21]
	mov	w1, #76
	movk	w1, #128, lsl #16
	mov	w2, #1
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x21]
	mov	w1, #8388608
	mov	w2, #0
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x21]
	mov	w1, #76
	movk	w1, #128, lsl #16
	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_4
; %bb.3:
	ldr	w0, [x21]
	mov	w1, #64292
	movk	w1, #128, lsl #16
	mov	w2, #8
	mov	w3, #8
	bl	_regmap_update_bits
	mov	x20, x0
	cbz	w0, LBB0_6
LBB0_4:
	str	x20, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_5:
	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
LBB0_6:
	ldr	x8, [x21, #8]
Lloh4:
	adrp	x9, _AF9033_TS_MODE_SERIAL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _AF9033_TS_MODE_SERIAL@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	ldr	w0, [x21]
	mov	w1, #55575
	mov	w2, #1
	mov	w3, #0
	bl	_regmap_update_bits
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.8:
	ldr	w0, [x21]
	mov	w1, #55574
	mov	w2, #1
	mov	w3, #1
	bl	_regmap_update_bits
	mov	x20, x0
	cbnz	w0, LBB0_4
	b	LBB0_5
LBB0_9:
	mov	w20, #0
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_AF9033_TS_MODE_SERIAL,8,3      ; @AF9033_TS_MODE_SERIAL
l_.str.1:                               ; @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_af9033_sleep
.subsections_via_symbols
