	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vt596_transaction
_vt596_transaction:                     ## @vt596_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	%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	%edi, %r14d
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_vt596_dump_regs
	movq	_SMBHSTSTS@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_inb_p
	movl	%eax, %ebx
	testb	$31, %bl
	je	LBB0_3
## %bb.1:
	movq	_vt596_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_outb_p
	movl	(%r12), %edi
	callq	_inb_p
	testb	$31, %al
	je	LBB0_3
## %bb.2:
	movq	_vt596_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_18
LBB0_3:
	movl	%r14d, %edi
	orl	$64, %edi
	movq	_SMBHSTCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_outb_p
	xorl	%ebx, %ebx
	movq	_MAX_TIMEOUT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %edi
	callq	_inb_p
	movl	%eax, %r13d
	testb	$1, %r13b
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	jl	LBB0_4
	jmp	LBB0_7
LBB0_5:
	movl	(%r15), %eax
LBB0_7:
	xorl	%r15d, %r15d
	cmpl	%eax, %ebx
	je	LBB0_8
## %bb.9:
	testb	$16, %r13b
	jne	LBB0_10
LBB0_11:
	testb	$8, %r13b
	jne	LBB0_12
LBB0_13:
	testb	$4, %r13b
	jne	LBB0_14
LBB0_15:
	testb	$31, %r13b
	je	LBB0_17
LBB0_16:
	movl	(%r12), %esi
	movl	%r13d, %edi
	callq	_outb_p
LBB0_17:
	leaq	L_.str.7(%rip), %rdi
	movl	%r14d, %esi
	callq	_vt596_dump_regs
LBB0_18:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	_vt596_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	testb	$16, %r13b
	je	LBB0_11
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	_vt596_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	testb	$8, %r13b
	je	LBB0_13
LBB0_12:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	_vt596_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	testb	$4, %r13b
	je	LBB0_15
LBB0_14:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	_vt596_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	testb	$31, %r13b
	jne	LBB0_16
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Transaction (pre)"

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

L_.str.2:                               ## @.str.2
	.asciz	"SMBus reset failed! (0x%02x)\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SMBHSTCNT,4,2                  ## @SMBHSTCNT
	.comm	_MAX_TIMEOUT,4,2                ## @MAX_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.3:                               ## @.str.3
	.asciz	"SMBus timeout!\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.4:                               ## @.str.4
	.asciz	"Transaction failed (0x%02x)\n"

L_.str.5:                               ## @.str.5
	.asciz	"SMBus collision!\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.6:                               ## @.str.6
	.asciz	"No response\n"

L_.str.7:                               ## @.str.7
	.asciz	"Transaction (post)"

	.no_dead_strip	_vt596_transaction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vt596_transaction
_vt596_transaction:                     ; @vt596_transaction
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_vt596_dump_regs
Lloh2:
	adrp	x22, _SMBHSTSTS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SMBHSTSTS@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_inb_p
	tst	w0, #0x1f
	b.eq	LBB0_3
; %bb.1:
	mov	x20, x0
	str	x20, [sp]
Lloh4:
	adrp	x0, _vt596_adapter@GOTPAGE
Lloh5:
	ldr	x0, [x0, _vt596_adapter@GOTPAGEOFF]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w1, [x22]
	mov	x0, x20
	bl	_outb_p
	ldr	w0, [x22]
	bl	_inb_p
                                        ; kill: def $w0 killed $w0 def $x0
	tst	w0, #0x1f
	b.eq	LBB0_3
; %bb.2:
	str	x0, [sp]
Lloh8:
	adrp	x0, _vt596_adapter@GOTPAGE
Lloh9:
	ldr	x0, [x0, _vt596_adapter@GOTPAGEOFF]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_16
LBB0_3:
	orr	w0, w19, #0x40
Lloh15:
	adrp	x8, _SMBHSTCNT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SMBHSTCNT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_outb_p
	mov	w21, #0
Lloh18:
	adrp	x23, _MAX_TIMEOUT@GOTPAGE
Lloh19:
	ldr	x23, [x23, _MAX_TIMEOUT@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_msleep
	ldr	w0, [x22]
	bl	_inb_p
	mov	x20, x0
	tbz	w0, #0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w21, w21, #1
	ldr	w8, [x23]
	cmp	w21, w8
	b.lt	LBB0_4
; %bb.6:
	cmp	w21, w8
	b.ne	LBB0_9
LBB0_7:
Lloh20:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
Lloh23:
	adrp	x0, _vt596_adapter@GOTPAGE
Lloh24:
	ldr	x0, [x0, _vt596_adapter@GOTPAGEOFF]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	tbnz	w20, #4, LBB0_10
	b	LBB0_11
LBB0_8:
	ldr	w8, [x23]
	cmp	w21, w8
	b.eq	LBB0_7
LBB0_9:
	mov	w21, #0
	tbz	w20, #4, LBB0_11
LBB0_10:
Lloh27:
	adrp	x8, _EIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w21, w8
	str	x19, [sp]
Lloh30:
	adrp	x0, _vt596_adapter@GOTPAGE
Lloh31:
	ldr	x0, [x0, _vt596_adapter@GOTPAGEOFF]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
LBB0_11:
	tbnz	w20, #3, LBB0_17
; %bb.12:
	tbnz	w20, #2, LBB0_18
LBB0_13:
	tst	w20, #0x1f
	b.eq	LBB0_15
LBB0_14:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_outb_p
LBB0_15:
Lloh34:
	adrp	x0, l_.str.7@PAGE
Lloh35:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	x1, x19
	bl	_vt596_dump_regs
LBB0_16:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_17:
Lloh36:
	adrp	x8, _EIO@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w21, w8
Lloh39:
	adrp	x0, _vt596_adapter@GOTPAGE
Lloh40:
	ldr	x0, [x0, _vt596_adapter@GOTPAGEOFF]
Lloh41:
	adrp	x1, l_.str.5@PAGE
Lloh42:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	tbz	w20, #2, LBB0_13
LBB0_18:
Lloh43:
	adrp	x8, _ENXIO@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	neg	w21, w8
Lloh46:
	adrp	x0, _vt596_adapter@GOTPAGE
Lloh47:
	ldr	x0, [x0, _vt596_adapter@GOTPAGEOFF]
Lloh48:
	adrp	x1, l_.str.6@PAGE
Lloh49:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
	tst	w20, #0x1f
	b.ne	LBB0_14
	b	LBB0_15
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Transaction (pre)"

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

l_.str.2:                               ; @.str.2
	.asciz	"SMBus reset failed! (0x%02x)\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SMBHSTCNT,4,2                  ; @SMBHSTCNT
	.comm	_MAX_TIMEOUT,4,2                ; @MAX_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.3:                               ; @.str.3
	.asciz	"SMBus timeout!\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.4:                               ; @.str.4
	.asciz	"Transaction failed (0x%02x)\n"

l_.str.5:                               ; @.str.5
	.asciz	"SMBus collision!\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.6:                               ; @.str.6
	.asciz	"No response\n"

l_.str.7:                               ; @.str.7
	.asciz	"Transaction (post)"

	.no_dead_strip	_vt596_transaction
.subsections_via_symbols
