	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function da9150_fg_read_sync_start
_da9150_fg_read_sync_start:             ## @da9150_fg_read_sync_start
	.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	%rdi, %rbx
	addq	$4, %rdi
	callq	_mutex_lock
	movq	_DA9150_QIF_SYNC@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_DA9150_QIF_SYNC_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_da9150_fg_read_attr
	testq	%rax, %rax
	jle	LBB0_2
## %bb.1:
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_da9150_fg_write_attr
LBB0_2:
	movq	_DA9150_QIF_SYNC_RETRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.3:
	movl	$1, %r14d
	movq	_DA9150_QIF_SYNC_TIMEOUT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	leal	(%rdi,%rdi), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_usleep_range
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_da9150_fg_read_attr
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%r14), %ecx
	movq	_DA9150_QIF_SYNC_RETRIES@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r14d
	movl	%ecx, %r14d
	jl	LBB0_4
LBB0_6:
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DA9150_QIF_SYNC,4,2            ## @DA9150_QIF_SYNC
	.comm	_DA9150_QIF_SYNC_SIZE,4,2       ## @DA9150_QIF_SYNC_SIZE
	.comm	_DA9150_QIF_SYNC_RETRIES,4,2    ## @DA9150_QIF_SYNC_RETRIES
	.comm	_DA9150_QIF_SYNC_TIMEOUT,4,2    ## @DA9150_QIF_SYNC_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to perform QIF read sync!\n"

	.no_dead_strip	_da9150_fg_read_sync_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function da9150_fg_read_sync_start
_da9150_fg_read_sync_start:             ; @da9150_fg_read_sync_start
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	add	x0, x0, #4
	bl	_mutex_lock
Lloh0:
	adrp	x20, _DA9150_QIF_SYNC@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DA9150_QIF_SYNC@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _DA9150_QIF_SYNC_SIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _DA9150_QIF_SYNC_SIZE@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_da9150_fg_read_attr
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #0
	bl	_da9150_fg_write_attr
LBB0_2:
Lloh4:
	adrp	x22, _DA9150_QIF_SYNC_RETRIES@GOTPAGE
Lloh5:
	ldr	x22, [x22, _DA9150_QIF_SYNC_RETRIES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	w23, #1
Lloh6:
	adrp	x24, _DA9150_QIF_SYNC_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x24, [x24, _DA9150_QIF_SYNC_TIMEOUT@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	lsl	w1, w0, #1
	bl	_usleep_range
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_da9150_fg_read_attr
	ldr	w8, [x22]
	cmp	x0, #0
	ccmp	w23, w8, #0, eq
	add	w23, w23, #1
	b.lt	LBB0_4
; %bb.5:
	cbz	x0, LBB0_7
; %bb.6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_dev_err
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DA9150_QIF_SYNC,4,2            ; @DA9150_QIF_SYNC
	.comm	_DA9150_QIF_SYNC_SIZE,4,2       ; @DA9150_QIF_SYNC_SIZE
	.comm	_DA9150_QIF_SYNC_RETRIES,4,2    ; @DA9150_QIF_SYNC_RETRIES
	.comm	_DA9150_QIF_SYNC_TIMEOUT,4,2    ; @DA9150_QIF_SYNC_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to perform QIF read sync!\n"

	.no_dead_strip	_da9150_fg_read_sync_start
.subsections_via_symbols
