	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k6aa_new_config_sync
_s5k6aa_new_config_sync:                ## @s5k6aa_new_config_sync
	.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, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%esi, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r14
	movl	$1, -44(%rbp)
	movq	_REG_G_ACTIVE_PREV_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_s5k6aa_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	_REG_G_PREV_CFG_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_s5k6aa_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_REG_G_NEW_CFG_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_s5k6aa_write
	movl	%eax, %ebx
LBB0_3:
	testl	%r12d, %r12d
	je	LBB0_12
## %bb.4:
	testl	%ebx, %ebx
	js	LBB0_11
## %bb.5:
	addq	%r13, %r14
	movq	%r14, %rdi
	callq	_time_is_after_jiffies
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	_REG_G_NEW_CFG_SYNC@GOTPCREL(%rip), %r13
	leaq	-44(%rbp), %r12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_s5k6aa_read
	cmpl	$0, -44(%rbp)
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %ebx
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_usleep_range
	testl	%ebx, %ebx
	js	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	callq	_time_is_after_jiffies
	testq	%rax, %rax
	jne	LBB0_8
LBB0_11:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	testl	%ebx, %ebx
	cmovel	%ecx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_REG_G_ACTIVE_PREV_CFG,4,2      ## @REG_G_ACTIVE_PREV_CFG
	.comm	_REG_G_PREV_CFG_CHG,4,2         ## @REG_G_PREV_CFG_CHG
	.comm	_REG_G_NEW_CFG_SYNC,4,2         ## @REG_G_NEW_CFG_SYNC
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_s5k6aa_new_config_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5k6aa_new_config_sync
_s5k6aa_new_config_sync:                ; @s5k6aa_new_config_sync
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	mov	x0, x1
	bl	_msecs_to_jiffies
	mov	x22, x0
	mov	w8, #1
	str	w8, [sp, #12]
Lloh3:
	adrp	x8, _REG_G_ACTIVE_PREV_CFG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_G_ACTIVE_PREV_CFG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_s5k6aa_write
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _REG_G_PREV_CFG_CHG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_G_PREV_CFG_CHG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_s5k6aa_write
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _REG_G_NEW_CFG_SYNC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_G_NEW_CFG_SYNC@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_s5k6aa_write
	mov	x20, x0
LBB0_3:
	cbz	w21, LBB0_11
; %bb.4:
	tbnz	w20, #31, LBB0_10
; %bb.5:
	add	x21, x22, x23
	mov	x0, x21
	bl	_time_is_after_jiffies
	cbz	x0, LBB0_10
; %bb.6:
Lloh12:
	adrp	x22, _REG_G_NEW_CFG_SYNC@GOTPAGE
Lloh13:
	ldr	x22, [x22, _REG_G_NEW_CFG_SYNC@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x19
	bl	_s5k6aa_read
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x20, x0
	mov	w0, #1000
	mov	w1, #5000
	bl	_usleep_range
	tbnz	w20, #31, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_time_is_after_jiffies
	cbnz	x0, LBB0_7
LBB0_10:
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w20, #0
	csneg	w20, w20, w8, ne
LBB0_11:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_12:
	mov	w20, #0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_REG_G_ACTIVE_PREV_CFG,4,2      ; @REG_G_ACTIVE_PREV_CFG
	.comm	_REG_G_PREV_CFG_CHG,4,2         ; @REG_G_PREV_CFG_CHG
	.comm	_REG_G_NEW_CFG_SYNC,4,2         ; @REG_G_NEW_CFG_SYNC
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_s5k6aa_new_config_sync
.subsections_via_symbols
