	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis630_transaction_wait
_sis630_transaction_wait:               ## @sis630_transaction_wait
	.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	%esi, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_SIS630_BLOCK_DATA@GOTPCREL(%rip), %r13
	movq	_MAX_TIMEOUT@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_msleep
	movq	_SMB_STS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sis630_read
	movl	%eax, %r12d
	cmpl	%r15d, (%r13)
	setne	%al
	testb	$16, %r12b
	sete	%cl
	orb	%al, %cl
	cmpb	$1, %cl
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, %eax
	andl	$14, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%rbx), %edx
	movl	(%r14), %ecx
	cmpl	%ecx, %ebx
	movl	%edx, %ebx
	jl	LBB0_1
	jmp	LBB0_5
LBB0_3:
	movl	(%r14), %ecx
	movl	%ebx, %edx
LBB0_5:
	xorl	%eax, %eax
	cmpl	%ecx, %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jg	LBB0_6
## %bb.7:
	testb	$2, %r12b
	jne	LBB0_8
LBB0_9:
	testb	$4, %r12b
	je	LBB0_11
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testb	$2, %r12b
	je	LBB0_9
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testb	$4, %r12b
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_SMB_STS,4,2                    ## @SMB_STS
	.comm	_SIS630_BLOCK_DATA,4,2          ## @SIS630_BLOCK_DATA
	.comm	_MAX_TIMEOUT,4,2                ## @MAX_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SMBus Timeout!\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"Error: Failed bus transaction\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.2:                               ## @.str.2
	.asciz	"Bus collision!\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sis630_transaction_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sis630_transaction_wait
_sis630_transaction_wait:               ; @sis630_transaction_wait
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
	mov	w22, #0
Lloh0:
	adrp	x23, _SMB_STS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SMB_STS@GOTPAGEOFF]
Lloh2:
	adrp	x25, _SIS630_BLOCK_DATA@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SIS630_BLOCK_DATA@GOTPAGEOFF]
Lloh4:
	adrp	x24, _MAX_TIMEOUT@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MAX_TIMEOUT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_msleep
	ldr	w0, [x23]
	bl	_sis630_read
	mov	x20, x0
	ldr	w8, [x25]
	tst	w0, #0x10
	ccmp	w8, w21, #0, ne
	and	w8, w0, #0xe
	ccmp	w8, #0, #0, ne
	b.ne	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w9, w22, #1
	ldr	w8, [x24]
	cmp	w22, w8
	mov	x22, x9
	b.lt	LBB0_1
; %bb.3:
	mov	x22, x9
	cmp	w22, w8
	b.gt	LBB0_6
LBB0_4:
	mov	w0, #0
	tbnz	w20, #1, LBB0_7
	b	LBB0_8
LBB0_5:
	ldr	w8, [x24]
	cmp	w22, w8
	b.le	LBB0_4
LBB0_6:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh8:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	tbz	w20, #1, LBB0_8
LBB0_7:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh13:
	adrp	x8, _ENXIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	tbz	w20, #2, LBB0_10
; %bb.9:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SMB_STS,4,2                    ; @SMB_STS
	.comm	_SIS630_BLOCK_DATA,4,2          ; @SIS630_BLOCK_DATA
	.comm	_MAX_TIMEOUT,4,2                ; @MAX_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SMBus Timeout!\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"Error: Failed bus transaction\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.2:                               ; @.str.2
	.asciz	"Bus collision!\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sis630_transaction_wait
.subsections_via_symbols
