	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis96x_transaction
_sis96x_transaction:                    ## @sis96x_transaction
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_sis96x_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_SMB_CNT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_sis96x_read
	testb	$3, %al
	je	LBB0_4
## %bb.1:
	movq	_sis96x_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_SMB_HOST_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$32, %esi
	callq	_sis96x_write
	movl	(%r15), %edi
	callq	_sis96x_read
	movq	_sis96x_adapter@GOTPCREL(%rip), %rdi
	testb	$3, %al
	je	LBB0_3
## %bb.2:
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_16
LBB0_3:
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_4:
	movl	(%r15), %edi
	movl	$32, %esi
	callq	_sis96x_write
	movq	_SMB_STS@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_sis96x_read
	movl	(%r15), %edi
	andl	$30, %eax
	movl	%eax, %esi
	callq	_sis96x_write
	movq	_SMB_HOST_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	$7, %ebx
	orl	$16, %ebx
	movl	%ebx, %esi
	callq	_sis96x_write
	movq	_MAX_TIMEOUT@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %edi
	callq	_sis96x_read
	movl	%eax, %ebx
	testb	$14, %bl
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%r12), %ecx
	movl	(%r14), %eax
	cmpl	%eax, %r12d
	movl	%ecx, %r12d
	jl	LBB0_5
	jmp	LBB0_8
LBB0_6:
	movl	(%r14), %eax
	movl	%r12d, %ecx
LBB0_8:
	xorl	%r14d, %r14d
	cmpl	%eax, %ecx
	jg	LBB0_9
## %bb.10:
	testb	$2, %bl
	jne	LBB0_11
LBB0_12:
	testb	$4, %bl
	je	LBB0_14
LBB0_13:
	movq	_sis96x_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.6(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_14:
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_sis96x_write
	movl	(%r15), %edi
	callq	_sis96x_read
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movq	_sis96x_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.7(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_16:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_sis96x_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.4(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	testb	$2, %bl
	je	LBB0_12
LBB0_11:
	movq	_sis96x_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.5(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	testb	$4, %bl
	jne	LBB0_13
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_sis96x_adapter,4,2             ## @sis96x_adapter
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SMBus transaction %d\n"

	.comm	_SMB_CNT,4,2                    ## @SMB_CNT
L_.str.1:                               ## @.str.1
	.asciz	"SMBus busy (0x%02x). Resetting...\n"

	.comm	_SMB_HOST_CNT,4,2               ## @SMB_HOST_CNT
L_.str.2:                               ## @.str.2
	.asciz	"Failed (0x%02x)\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.3:                               ## @.str.3
	.asciz	"Successful\n"

	.comm	_SMB_STS,4,2                    ## @SMB_STS
	.comm	_MAX_TIMEOUT,4,2                ## @MAX_TIMEOUT
L_.str.4:                               ## @.str.4
	.asciz	"SMBus Timeout! (0x%02x)\n"

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

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

	.comm	_EIO,4,2                        ## @EIO
L_.str.7:                               ## @.str.7
	.asciz	"Failed reset at end of transaction! (0x%02x)\n"

	.no_dead_strip	_sis96x_transaction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sis96x_transaction
_sis96x_transaction:                    ; @sis96x_transaction
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	str	x19, [sp]
Lloh0:
	adrp	x0, _sis96x_adapter@GOTPAGE
Lloh1:
	ldr	x0, [x0, _sis96x_adapter@GOTPAGEOFF]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh4:
	adrp	x21, _SMB_CNT@GOTPAGE
Lloh5:
	ldr	x21, [x21, _SMB_CNT@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_sis96x_read
                                        ; kill: def $w0 killed $w0 def $x0
Lloh6:
	adrp	x20, _SMB_HOST_CNT@GOTPAGE
Lloh7:
	ldr	x20, [x20, _SMB_HOST_CNT@GOTPAGEOFF]
	tst	w0, #0x3
	b.eq	LBB0_4
; %bb.1:
	str	x0, [sp]
Lloh8:
	adrp	x0, _sis96x_adapter@GOTPAGE
Lloh9:
	ldr	x0, [x0, _sis96x_adapter@GOTPAGEOFF]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x20]
	mov	w1, #32
	bl	_sis96x_write
	ldr	w0, [x21]
	bl	_sis96x_read
                                        ; kill: def $w0 killed $w0 def $x0
	tst	w0, #0x3
	b.eq	LBB0_3
; %bb.2:
	str	x0, [sp]
Lloh12:
	adrp	x0, _sis96x_adapter@GOTPAGE
Lloh13:
	ldr	x0, [x0, _sis96x_adapter@GOTPAGEOFF]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
Lloh16:
	adrp	x8, _EBUSY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_16
LBB0_3:
Lloh19:
	adrp	x0, _sis96x_adapter@GOTPAGE
Lloh20:
	ldr	x0, [x0, _sis96x_adapter@GOTPAGEOFF]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
LBB0_4:
	ldr	w0, [x21]
	mov	w1, #32
	bl	_sis96x_write
Lloh23:
	adrp	x21, _SMB_STS@GOTPAGE
Lloh24:
	ldr	x21, [x21, _SMB_STS@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_sis96x_read
	ldr	w8, [x21]
	and	w1, w0, #0x1e
	mov	x0, x8
	bl	_sis96x_write
	ldr	w0, [x20]
	mov	w1, #16
	bfxil	w1, w19, #0, #3
	bl	_sis96x_write
	mov	w20, #0
Lloh25:
	adrp	x22, _MAX_TIMEOUT@GOTPAGE
Lloh26:
	ldr	x22, [x22, _MAX_TIMEOUT@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_msleep
	ldr	w0, [x21]
	bl	_sis96x_read
	mov	x19, x0
	tst	w0, #0xe
	b.ne	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w9, w20, #1
	ldr	w8, [x22]
	cmp	w20, w8
	mov	x20, x9
	b.lt	LBB0_5
; %bb.7:
	mov	x20, x9
	cmp	w20, w8
	b.gt	LBB0_10
LBB0_8:
	mov	w20, #0
	tbnz	w19, #1, LBB0_11
	b	LBB0_12
LBB0_9:
	ldr	w8, [x22]
	cmp	w20, w8
	b.le	LBB0_8
LBB0_10:
	str	x19, [sp]
Lloh27:
	adrp	x0, _sis96x_adapter@GOTPAGE
Lloh28:
	ldr	x0, [x0, _sis96x_adapter@GOTPAGEOFF]
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
Lloh31:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w20, w8
	tbz	w19, #1, LBB0_12
LBB0_11:
Lloh34:
	adrp	x0, _sis96x_adapter@GOTPAGE
Lloh35:
	ldr	x0, [x0, _sis96x_adapter@GOTPAGEOFF]
Lloh36:
	adrp	x1, l_.str.5@PAGE
Lloh37:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
Lloh38:
	adrp	x8, _ENXIO@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_12:
	tbz	w19, #2, LBB0_14
; %bb.13:
Lloh41:
	adrp	x0, _sis96x_adapter@GOTPAGE
Lloh42:
	ldr	x0, [x0, _sis96x_adapter@GOTPAGEOFF]
Lloh43:
	adrp	x1, l_.str.6@PAGE
Lloh44:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
Lloh45:
	adrp	x8, _EIO@GOTPAGE
Lloh46:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_14:
	ldr	w0, [x21]
	mov	x1, x19
	bl	_sis96x_write
	ldr	w0, [x21]
	bl	_sis96x_read
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_16
; %bb.15:
	str	x0, [sp]
Lloh48:
	adrp	x0, _sis96x_adapter@GOTPAGE
Lloh49:
	ldr	x0, [x0, _sis96x_adapter@GOTPAGEOFF]
Lloh50:
	adrp	x1, l_.str.7@PAGE
Lloh51:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_dbg
LBB0_16:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_sis96x_adapter,4,2             ; @sis96x_adapter
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SMBus transaction %d\n"

	.comm	_SMB_CNT,4,2                    ; @SMB_CNT
l_.str.1:                               ; @.str.1
	.asciz	"SMBus busy (0x%02x). Resetting...\n"

	.comm	_SMB_HOST_CNT,4,2               ; @SMB_HOST_CNT
l_.str.2:                               ; @.str.2
	.asciz	"Failed (0x%02x)\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.3:                               ; @.str.3
	.asciz	"Successful\n"

	.comm	_SMB_STS,4,2                    ; @SMB_STS
	.comm	_MAX_TIMEOUT,4,2                ; @MAX_TIMEOUT
l_.str.4:                               ; @.str.4
	.asciz	"SMBus Timeout! (0x%02x)\n"

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

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

	.comm	_EIO,4,2                        ; @EIO
l_.str.7:                               ; @.str.7
	.asciz	"Failed reset at end of transaction! (0x%02x)\n"

	.no_dead_strip	_sis96x_transaction
.subsections_via_symbols
