	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function abituguru_read
_abituguru_read:                        ## @abituguru_read
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r9d, %ecx
	callq	_abituguru_send_address
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	jle	LBB0_2
## %bb.3:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	movq	_ABIT_UGURU_STATUS_READ@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_abituguru_wait
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_ABIT_UGURU_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_inb
	movq	%rax, (%r15,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_4
## %bb.7:
	movl	%r12d, %ebx
	jmp	LBB0_8
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	leal	(%rax,%rax), %edi
	incl	%edi
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_ABIT_UGURU_DEBUG
LBB0_8:
	movq	%r14, %rdi
	callq	_abituguru_ready
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ABIT_UGURU_STATUS_READ,4,2     ## @ABIT_UGURU_STATUS_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout exceeded waiting for read state (bank: %d, sensor: %d)\n"

	.comm	_ABIT_UGURU_CMD,8,3             ## @ABIT_UGURU_CMD
	.no_dead_strip	_abituguru_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function abituguru_read
_abituguru_read:                        ; @abituguru_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x5
	mov	x25, x4
	mov	x24, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	mov	x3, x5
	bl	_abituguru_send_address
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.1:
	cmp	w25, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x20, #0
Lloh0:
	adrp	x26, _ABIT_UGURU_STATUS_READ@GOTPAGE
Lloh1:
	ldr	x26, [x26, _ABIT_UGURU_STATUS_READ@GOTPAGEOFF]
Lloh2:
	adrp	x27, _ABIT_UGURU_CMD@GOTPAGE
Lloh3:
	ldr	x27, [x27, _ABIT_UGURU_CMD@GOTPAGEOFF]
	mov	w25, w25
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	bl	_abituguru_wait
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	ldr	x9, [x27]
	add	x0, x9, x8
	bl	_inb
	str	x0, [x24, x20, lsl #3]
	add	x20, x20, #1
	cmp	x25, x20
	b.ne	LBB0_3
; %bb.5:
	mov	x20, x25
	b	LBB0_8
LBB0_6:
	mov	w20, #0
	b	LBB0_8
LBB0_7:
	cmp	w23, #0
	mov	w8, #3
	csinc	w0, w8, wzr, eq
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x21
	bl	_ABIT_UGURU_DEBUG
LBB0_8:
	mov	x0, x19
	bl	_abituguru_ready
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ABIT_UGURU_STATUS_READ,4,2     ; @ABIT_UGURU_STATUS_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout exceeded waiting for read state (bank: %d, sensor: %d)\n"

	.comm	_ABIT_UGURU_CMD,8,3             ; @ABIT_UGURU_CMD
	.no_dead_strip	_abituguru_read
.subsections_via_symbols
