	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function abituguru3_synchronize
_abituguru3_synchronize:                ## @abituguru3_synchronize
	.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, %r14
	movq	_ABIT_UGURU3_SYNCHRONIZE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_abituguru3_wait_while_busy
	movq	_ABIT_UGURU3_SUCCESS@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_1
## %bb.3:
	movq	_ABIT_UGURU3_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	$32, %edi
	callq	_outb
	movq	%r14, %rdi
	callq	_abituguru3_wait_while_busy
	cmpl	(%r13), %eax
	jne	LBB0_4
## %bb.5:
	movq	_ABIT_UGURU3_CMD@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	(%r14), %rsi
	movl	$16, %edi
	callq	_outb
	movq	%r14, %rdi
	callq	_abituguru3_wait_while_busy
	cmpl	(%r13), %eax
	jne	LBB0_6
## %bb.7:
	movq	(%r12), %rsi
	addq	(%r14), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_outb
	movq	%r14, %rdi
	callq	_abituguru3_wait_while_busy
	cmpl	(%r13), %eax
	jne	LBB0_8
## %bb.11:
	movq	%r14, %rdi
	callq	_abituguru3_wait_for_read
	cmpl	(%r13), %eax
	jne	LBB0_17
## %bb.12:
	movq	(%r12), %rdi
	addq	(%r14), %rdi
	callq	_inb
	xorl	%ebx, %ebx
	cmpl	$172, %eax
	je	LBB0_10
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	decl	%r15d
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	$1, %edi
	callq	_msleep
	movq	(%r12), %rdi
	addq	(%r14), %rdi
	callq	_inb
	cmpl	$172, %eax
	jne	LBB0_14
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_ABIT_UGURU3_DEBUG
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_17:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_2
LBB0_16:
	leaq	L_.str.5(%rip), %rdi
LBB0_2:
	movl	%eax, %esi
	callq	_ABIT_UGURU3_DEBUG
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ABIT_UGURU3_SYNCHRONIZE_TIMEOUT,4,2 ## @ABIT_UGURU3_SYNCHRONIZE_TIMEOUT
	.comm	_ABIT_UGURU3_SUCCESS,4,2        ## @ABIT_UGURU3_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"synchronize timeout during initial busy wait, status: 0x%02x\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ABIT_UGURU3_DATA,8,3           ## @ABIT_UGURU3_DATA
L_.str.1:                               ## @.str.1
	.asciz	"synchronize timeout after sending 0x20, status: 0x%02x\n"

	.comm	_ABIT_UGURU3_CMD,8,3            ## @ABIT_UGURU3_CMD
L_.str.2:                               ## @.str.2
	.asciz	"synchronize timeout after sending 0x10, status: 0x%02x\n"

L_.str.3:                               ## @.str.3
	.asciz	"synchronize timeout after sending 0x00, status: 0x%02x\n"

L_.str.4:                               ## @.str.4
	.asciz	"synchronize timeout waiting for read, status: 0x%02x\n"

L_.str.5:                               ## @.str.5
	.asciz	"synchronize timeout cmd does not hold 0xAC after synchronize, cmd: 0x%02x\n"

	.no_dead_strip	_abituguru3_synchronize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function abituguru3_synchronize
_abituguru3_synchronize:                ; @abituguru3_synchronize
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _ABIT_UGURU3_SYNCHRONIZE_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ABIT_UGURU3_SYNCHRONIZE_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	bl	_abituguru3_wait_while_busy
Lloh3:
	adrp	x22, _ABIT_UGURU3_SUCCESS@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ABIT_UGURU3_SUCCESS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.1:
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _ABIT_UGURU3_DATA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ABIT_UGURU3_DATA@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #32
	bl	_outb
	mov	x0, x19
	bl	_abituguru3_wait_while_busy
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.2:
	ldr	x8, [x19]
Lloh8:
	adrp	x21, _ABIT_UGURU3_CMD@GOTPAGE
Lloh9:
	ldr	x21, [x21, _ABIT_UGURU3_CMD@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #16
	bl	_outb
	mov	x0, x19
	bl	_abituguru3_wait_while_busy
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.3:
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #0
	bl	_outb
	mov	x0, x19
	bl	_abituguru3_wait_while_busy
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.4:
	mov	x0, x19
	bl	_abituguru3_wait_for_read
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.5:
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_inb
	cmp	w0, #172
	b.ne	LBB0_12
LBB0_6:
	mov	w0, #0
	b	LBB0_18
LBB0_7:
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_17
LBB0_8:
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_9:
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_10:
	mov	x1, x0
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_11:
	mov	x1, x0
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_17
LBB0_12:
	subs	w20, w20, #1
	b.eq	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_inb
	cmp	w0, #172
	b.eq	LBB0_6
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x1, x0
	subs	w20, w20, #1
	b.ne	LBB0_13
	b	LBB0_16
LBB0_15:
	mov	x1, x0
LBB0_16:
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_17:
	bl	_ABIT_UGURU3_DEBUG
Lloh22:
	adrp	x8, _EIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ABIT_UGURU3_SYNCHRONIZE_TIMEOUT,4,2 ; @ABIT_UGURU3_SYNCHRONIZE_TIMEOUT
	.comm	_ABIT_UGURU3_SUCCESS,4,2        ; @ABIT_UGURU3_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"synchronize timeout during initial busy wait, status: 0x%02x\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ABIT_UGURU3_DATA,8,3           ; @ABIT_UGURU3_DATA
l_.str.1:                               ; @.str.1
	.asciz	"synchronize timeout after sending 0x20, status: 0x%02x\n"

	.comm	_ABIT_UGURU3_CMD,8,3            ; @ABIT_UGURU3_CMD
l_.str.2:                               ; @.str.2
	.asciz	"synchronize timeout after sending 0x10, status: 0x%02x\n"

l_.str.3:                               ; @.str.3
	.asciz	"synchronize timeout after sending 0x00, status: 0x%02x\n"

l_.str.4:                               ; @.str.4
	.asciz	"synchronize timeout waiting for read, status: 0x%02x\n"

l_.str.5:                               ; @.str.5
	.asciz	"synchronize timeout cmd does not hold 0xAC after synchronize, cmd: 0x%02x\n"

	.no_dead_strip	_abituguru3_synchronize
.subsections_via_symbols
