	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scx200_acb_smbus_xfer
_scx200_acb_smbus_xfer:                 ## @scx200_acb_smbus_xfer
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movl	%r8d, %r13d
	movl	%ecx, %r14d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_i2c_get_adapdata
	movq	%rax, %rbx
	leal	-128(%r12), %eax
	cmpl	$4, %eax
	ja	LBB0_6
## %bb.1:
	movq	16(%rbp), %rdx
	xorl	%r15d, %r15d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	xorl	%ecx, %ecx
	jmpq	*%rax
LBB0_3:
	movl	(%rdx), %edi
	callq	_cpu_to_le16
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rcx
	movl	$2, %r15d
	jmp	LBB0_9
LBB0_4:
	movq	(%rdx), %rcx
	movl	(%rcx), %r15d
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.5:
	movq	_I2C_SMBUS_BLOCK_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jg	LBB0_6
## %bb.7:
	addq	$4, %rcx
	jmp	LBB0_9
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_8:
	testb	%r14b, %r14b
	leaq	-52(%rbp), %rcx
	cmovneq	%rdx, %rcx
	movl	$1, %r15d
	jmp	LBB0_9
LBB0_2:
	movl	$1, %r15d
	movq	%rdx, %rcx
LBB0_9:
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdx
	movsbl	%r14b, %r12d
	movl	%r12d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %r8d
	xorl	%r13d, %r13d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx killed $rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r15d, %r9d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_I2C_SMBUS_READ@GOTPCREL(%rip), %rax
	testl	%r15d, %r15d
	jne	LBB0_12
## %bb.10:
	cmpb	%r14b, (%rax)
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_12:
	movl	%r14d, -64(%rbp)                ## 4-byte Spill
	movq	%rbx, %rdi
	addq	$32, %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%eax, %eax
	orl	%r12d, %eax
	movl	%eax, (%rbx)
	movl	-52(%rbp), %eax
	movl	%eax, 4(%rbx)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movl	%r15d, 16(%rbx)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movl	%r13d, 20(%rbx)
	movq	$0, 40(%rbx)
	movq	_ACBCTL1@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_inb
	movq	_ACBCTL1_START@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_outb
	movq	_state_quick@GOTPCREL(%rip), %rax
	movq	%rax, %rcx
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	cmpl	$129, %r12d
	je	LBB0_14
## %bb.13:
	movq	_state_address@GOTPCREL(%rip), %rcx
LBB0_14:
	cmpl	$132, %r12d
	cmoveq	%rax, %rcx
	movq	(%rcx), %rax
	movq	%rax, 24(%rbx)
	movq	_state_idle@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	movq	16(%rbp), %r15
	je	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_scx200_acb_poll
	movq	24(%rbx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_15
LBB0_16:
	cmpq	$0, 40(%rbx)
	je	LBB0_18
## %bb.17:
	movq	%rbx, %rdi
	callq	_scx200_acb_reset
LBB0_18:
	movl	20(%rbx), %ebx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	cmpl	$128, %r12d
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	jne	LBB0_22
## %bb.19:
	testl	%ebx, %ebx
	jne	LBB0_22
## %bb.20:
	movq	_I2C_SMBUS_READ@GOTPCREL(%rip), %rcx
	cmpb	%al, (%rcx)
	jne	LBB0_22
## %bb.21:
	movl	-48(%rbp), %edi
	callq	_le16_to_cpu
	movl	%eax, (%r15)
	xorl	%ebx, %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_9
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ## @I2C_SMBUS_BLOCK_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"size=%d, address=0x%x, command=0x%x, len=%d, read=%d\n"

	.comm	_I2C_SMBUS_READ,1,0             ## @I2C_SMBUS_READ
L_.str.1:                               ## @.str.1
	.asciz	"zero length read\n"

	.comm	_ACBCTL1,4,2                    ## @ACBCTL1
	.comm	_ACBCTL1_START,4,2              ## @ACBCTL1_START
	.comm	_state_quick,8,3                ## @state_quick
	.comm	_state_address,8,3              ## @state_address
	.comm	_state_idle,8,3                 ## @state_idle
	.no_dead_strip	_scx200_acb_smbus_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scx200_acb_smbus_xfer
_scx200_acb_smbus_xfer:                 ; @scx200_acb_smbus_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x6
	mov	x21, x5
	mov	x25, x4
	mov	x20, x3
	mov	x23, x1
	mov	x24, x0
	str	w4, [sp, #44]
	bl	_i2c_get_adapdata
	sub	w8, w21, #128
	cmp	w8, #4
	b.hi	LBB0_10
; %bb.1:
	mov	x22, x0
	mov	w26, #0
	mov	x27, #0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w0, [x19]
	bl	_cpu_to_le16
	str	w0, [sp, #40]
	add	x27, sp, #40
	mov	w26, #2
	b	LBB0_7
LBB0_3:
	cmp	w20, #0
	add	x8, sp, #44
	csel	x27, x8, x19, eq
	mov	w26, #1
	b	LBB0_7
LBB0_4:
	ldr	x8, [x19]
	ldr	w26, [x8]
Lloh2:
	adrp	x9, _I2C_SMBUS_BLOCK_MAX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _I2C_SMBUS_BLOCK_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w26, #0
	ccmp	w26, w9, #0, ne
	b.gt	LBB0_10
; %bb.5:
	add	x27, x8, #4
	b	LBB0_7
LBB0_6:
	mov	w26, #1
	mov	x27, x19
LBB0_7:
	stp	x25, x26, [sp, #16]
	stp	x21, x23, [sp]
	sxtw	x8, w20
	str	x8, [sp, #32]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_dev_dbg
Lloh7:
	adrp	x25, _I2C_SMBUS_READ@GOTPAGE
Lloh8:
	ldr	x25, [x25, _I2C_SMBUS_READ@GOTPAGEOFF]
	cbnz	w26, LBB0_11
; %bb.8:
	ldrb	w8, [x25]
	cmp	w8, w20, uxtb
	b.ne	LBB0_11
; %bb.9:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x24
	bl	_dev_dbg
LBB0_10:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_20
LBB0_11:
	add	x24, x22, #32
	mov	x0, x24
	bl	_mutex_lock
	orr	w8, w20, w23, lsl #1
	str	w8, [x22]
	ldr	w8, [sp, #44]
	str	w8, [x22, #4]
	str	x27, [x22, #8]
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w8, w8
	stp	w26, w8, [x22, #16]
	str	xzr, [x22, #40]
Lloh17:
	adrp	x23, _ACBCTL1@GOTPAGE
Lloh18:
	ldr	x23, [x23, _ACBCTL1@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_inb
Lloh19:
	adrp	x8, _ACBCTL1_START@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ACBCTL1_START@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	w1, [x23]
	bl	_outb
	cmp	w21, #129
	mov	w8, #132
	ccmp	w21, w8, #4, ne
Lloh22:
	adrp	x8, _state_quick@GOTPAGE
Lloh23:
	ldr	x8, [x8, _state_quick@GOTPAGEOFF]
Lloh24:
	adrp	x9, _state_address@GOTPAGE
Lloh25:
	ldr	x9, [x9, _state_address@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	x8, [x8]
	str	x8, [x22, #24]
Lloh26:
	adrp	x23, _state_idle@GOTPAGE
Lloh27:
	ldr	x23, [x23, _state_idle@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x22
	bl	_scx200_acb_poll
	ldr	x8, [x22, #24]
	b	LBB0_12
LBB0_14:
	ldr	x8, [x22, #40]
	cbz	x8, LBB0_16
; %bb.15:
	mov	x0, x22
	bl	_scx200_acb_reset
LBB0_16:
	ldr	w22, [x22, #20]
	mov	x0, x24
	bl	_mutex_unlock
	cmp	w21, #128
	b.ne	LBB0_20
; %bb.17:
	cbnz	w22, LBB0_20
; %bb.18:
	ldrb	w8, [x25]
	cmp	w8, w20, uxtb
	b.ne	LBB0_20
; %bb.19:
	ldr	w0, [sp, #40]
	bl	_le16_to_cpu
	mov	w22, #0
	str	w0, [x19]
LBB0_20:
	mov	x0, x22
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
                                        ; -- End function
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ; @I2C_SMBUS_BLOCK_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"size=%d, address=0x%x, command=0x%x, len=%d, read=%d\n"

	.comm	_I2C_SMBUS_READ,1,0             ; @I2C_SMBUS_READ
l_.str.1:                               ; @.str.1
	.asciz	"zero length read\n"

	.comm	_ACBCTL1,4,2                    ; @ACBCTL1
	.comm	_ACBCTL1_START,4,2              ; @ACBCTL1_START
	.comm	_state_quick,8,3                ; @state_quick
	.comm	_state_address,8,3              ; @state_address
	.comm	_state_idle,8,3                 ; @state_idle
	.no_dead_strip	_scx200_acb_smbus_xfer
.subsections_via_symbols
