	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function abituguru_ready
_abituguru_ready:                       ## @abituguru_ready
	.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
	xorl	%r13d, %r13d
	cmpl	$0, (%rdi)
	jne	LBB0_15
## %bb.1:
	movq	%rdi, %r14
	movq	_ABIT_UGURU_READY_TIMEOUT@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	_ABIT_UGURU_DATA@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	8(%rdi), %rsi
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_outb
	movq	_ABIT_UGURU_STATUS_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_abituguru_wait
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_ABIT_UGURU_DEBUG
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_3:
	movq	_ABIT_UGURU_CMD@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	addq	8(%r14), %rdi
	callq	_inb_p
	cmpl	$172, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	decl	%ebx
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edi, %edi
	callq	_msleep
	jmp	LBB0_4
LBB0_7:
	movl	(%r12), %ebx
	movq	(%r15), %rdi
	addq	8(%r14), %rdi
	callq	_inb_p
	movq	_ABIT_UGURU_STATUS_INPUT@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	je	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	xorl	%edi, %edi
	callq	_msleep
	movq	(%r15), %rdi
	addq	8(%r14), %rdi
	callq	_inb_p
	cmpl	(%r12), %eax
	jne	LBB0_8
LBB0_10:
	movl	$1, (%r14)
	xorl	%r13d, %r13d
	jmp	LBB0_15
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.2(%rip), %rsi
LBB0_13:
	movl	$1, %edi
	callq	_ABIT_UGURU_DEBUG
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
LBB0_14:
	subl	(%rax), %r13d
LBB0_15:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ABIT_UGURU_READY_TIMEOUT,4,2   ## @ABIT_UGURU_READY_TIMEOUT
	.comm	_ABIT_UGURU_DATA,8,3            ## @ABIT_UGURU_DATA
	.comm	_ABIT_UGURU_STATUS_READY,4,2    ## @ABIT_UGURU_STATUS_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout exceeded waiting for ready state\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ABIT_UGURU_CMD,8,3             ## @ABIT_UGURU_CMD
L_.str.1:                               ## @.str.1
	.asciz	"CMD reg does not hold 0xAC after ready command\n"

	.comm	_ABIT_UGURU_STATUS_INPUT,4,2    ## @ABIT_UGURU_STATUS_INPUT
L_.str.2:                               ## @.str.2
	.asciz	"state != more input after ready command\n"

	.no_dead_strip	_abituguru_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function abituguru_ready
_abituguru_ready:                       ; @abituguru_ready
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_14
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x21, _ABIT_UGURU_READY_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ABIT_UGURU_READY_TIMEOUT@GOTPAGEOFF]
	ldr	w22, [x21]
	ldr	x8, [x0, #8]
Lloh2:
	adrp	x20, _ABIT_UGURU_DATA@GOTPAGE
Lloh3:
	ldr	x20, [x20, _ABIT_UGURU_DATA@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #0
	bl	_outb
Lloh4:
	adrp	x8, _ABIT_UGURU_STATUS_READY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ABIT_UGURU_STATUS_READY@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_abituguru_wait
	cbz	x0, LBB0_5
; %bb.3:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	w0, #1
	bl	_ABIT_UGURU_DEBUG
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_5:
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x23, _ABIT_UGURU_CMD@GOTPAGE
Lloh13:
	ldr	x23, [x23, _ABIT_UGURU_CMD@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_inb_p
	cmp	w0, #172
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	subs	w22, w22, #1
	b.eq	LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #0
	bl	_msleep
	ldr	x8, [x19, #8]
	b	LBB0_6
LBB0_9:
	ldr	w21, [x21]
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_inb_p
Lloh14:
	adrp	x22, _ABIT_UGURU_STATUS_INPUT@GOTPAGE
Lloh15:
	ldr	x22, [x22, _ABIT_UGURU_STATUS_INPUT@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	subs	w21, w21, #1
	b.eq	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w0, #0
	bl	_msleep
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_inb_p
	b	LBB0_10
LBB0_13:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
LBB0_14:
	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_15:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_16:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ABIT_UGURU_READY_TIMEOUT,4,2   ; @ABIT_UGURU_READY_TIMEOUT
	.comm	_ABIT_UGURU_DATA,8,3            ; @ABIT_UGURU_DATA
	.comm	_ABIT_UGURU_STATUS_READY,4,2    ; @ABIT_UGURU_STATUS_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout exceeded waiting for ready state\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ABIT_UGURU_CMD,8,3             ; @ABIT_UGURU_CMD
l_.str.1:                               ; @.str.1
	.asciz	"CMD reg does not hold 0xAC after ready command\n"

	.comm	_ABIT_UGURU_STATUS_INPUT,4,2    ; @ABIT_UGURU_STATUS_INPUT
l_.str.2:                               ; @.str.2
	.asciz	"state != more input after ready command\n"

	.no_dead_strip	_abituguru_ready
.subsections_via_symbols
