	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sch_access
_sch_access:                            ## @sch_access
	.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	%r9d, %r13d
	movl	%r8d, %ebx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_SMBHSTSTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_inb
	testb	$8, %al
	jne	LBB0_7
## %bb.1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_SMBHSTCLK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_inw
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_sch_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_notice
	movq	_backbone_speed@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1374389535, %rax, %rdi         ## imm = 0x51EB851F
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$39, %rdi
	addl	%eax, %edi
	movl	(%rbx), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_outw
LBB0_3:
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	testb	%r12b, %r12b
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	_sch_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	leal	-132(%r13), %ecx
	cmpl	$4, %ecx
	ja	LBB0_8
## %bb.4:
	movq	16(%rbp), %r14
	movsbl	%r12b, %eax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	movl	%r12d, %r13d
	jmpq	*%rcx
LBB0_5:
	addl	%r15d, %r15d
	orl	%eax, %r15d
	movq	_SMBHSTADD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r15d, %edi
	callq	_outb
	movq	_SMBHSTCMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_outb
	movq	_I2C_SMBUS_WRITE@GOTPCREL(%rip), %rax
	movl	$128, %r15d
	cmpb	%r13b, (%rax)
	jne	LBB0_23
## %bb.6:
	movzbl	(%r14), %edi
	movq	_SMBHSTDAT0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_outb
	movzbl	1(%r14), %edi
	movq	_SMBHSTDAT1@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_7:
	andl	$15, %eax
	movq	_sch_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_40:
	subl	(%rax), %ebx
	jmp	LBB0_41
LBB0_8:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_dev_warn
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_40
LBB0_9:
	addl	%r15d, %r15d
	orl	%eax, %r15d
	movq	_SMBHSTADD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r15d, %edi
	callq	_outb
	movq	_SCH_QUICK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_23
LBB0_10:
	addl	%r15d, %r15d
	orl	%eax, %r15d
	movq	_SMBHSTADD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r15d, %edi
	callq	_outb
	movq	_SMBHSTCMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_outb
	movq	_I2C_SMBUS_WRITE@GOTPCREL(%rip), %rax
	movl	$129, %r15d
	cmpb	%r13b, (%rax)
	jne	LBB0_23
## %bb.11:
	movl	(%r14), %edi
	movq	_SMBHSTDAT0@GOTPCREL(%rip), %rax
LBB0_12:
	movq	(%rax), %rsi
	callq	_outb
	jmp	LBB0_23
LBB0_13:
	addl	%r15d, %r15d
	orl	%eax, %r15d
	movq	_SMBHSTADD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r15d, %edi
	callq	_outb
	movq	_I2C_SMBUS_WRITE@GOTPCREL(%rip), %rax
	movl	$130, %r15d
	cmpb	%r13b, (%rax)
	jne	LBB0_23
## %bb.14:
	movq	_SMBHSTCMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_outb
	jmp	LBB0_23
LBB0_15:
	addl	%r15d, %r15d
	orl	%eax, %r15d
	movq	_SMBHSTADD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r15d, %edi
	callq	_outb
	movq	_SMBHSTCMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_outb
	movq	_I2C_SMBUS_WRITE@GOTPCREL(%rip), %rax
	movl	$131, %r15d
	cmpb	%r13b, (%rax)
	jne	LBB0_23
## %bb.16:
	movq	%r14, %r12
	movq	(%r14), %rax
	movl	(%rax), %r14d
	testq	%r14, %r14
	je	LBB0_42
## %bb.17:
	movq	_I2C_SMBUS_BLOCK_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jg	LBB0_42
## %bb.18:
	movq	_SMBHSTDAT0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r14d, %edi
	callq	_outb
	testl	%r14d, %r14d
	jle	LBB0_22
## %bb.19:
	xorl	%ebx, %ebx
	movq	_SMBBLKDAT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	4(%rax,%rbx,4), %edi
	movl	(%r13), %eax
	addl	%ebx, %eax
	movslq	%eax, %rsi
	callq	_outb
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_20
## %bb.21:
	movl	-48(%rbp), %r13d                ## 4-byte Reload
LBB0_22:
	movq	%r12, %r14
LBB0_23:
	movq	_SMBHSTCNT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	_sch_adapter@GOTPCREL(%rip), %rdi
	leaq	L_.str.6(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%rbx), %rdi
	callq	_inb
	andl	$176, %eax
	movl	%r15d, %edi
	andl	$7, %edi
	orl	%eax, %edi
	movq	(%rbx), %rsi
	callq	_outb
	xorl	%eax, %eax
	callq	_sch_transaction
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_41
## %bb.24:
	movq	_I2C_SMBUS_WRITE@GOTPCREL(%rip), %rax
	cmpb	%r13b, (%rax)
	je	LBB0_37
## %bb.25:
	movq	_SCH_QUICK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_37
## %bb.26:
	leal	-129(%r15), %eax
	cmpl	$2, %eax
	jb	LBB0_34
## %bb.27:
	cmpl	$128, %r15d
	je	LBB0_35
## %bb.28:
	cmpl	$131, %r15d
	jne	LBB0_37
## %bb.29:
	movq	_SMBHSTDAT0@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_inb
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	movq	(%r14), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_38
## %bb.30:
	movq	_I2C_SMBUS_BLOCK_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_38
## %bb.31:
	movl	$0, %ebx
	testl	%eax, %eax
	jle	LBB0_41
## %bb.32:
	xorl	%ebx, %ebx
	movq	_SMBBLKDAT@GOTPCREL(%rip), %r15
	xorl	%r12d, %r12d
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %eax
	addl	%r12d, %eax
	movslq	%eax, %rdi
	callq	_inb
	movq	(%r14), %rcx
	movl	%eax, 4(%rcx,%r12,4)
	movq	(%r14), %rax
	movslq	(%rax), %rax
	incq	%r12
	cmpq	%rax, %r12
	jl	LBB0_33
	jmp	LBB0_41
LBB0_34:
	movq	_SMBHSTDAT0@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_inb
	jmp	LBB0_36
LBB0_42:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_39
LBB0_35:
	movq	_SMBHSTDAT0@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_inb
	movl	%eax, %ebx
	movq	_SMBHSTDAT1@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_inb
	shll	$8, %eax
	addl	%ebx, %eax
LBB0_36:
	movl	%eax, (%r14)
LBB0_37:
	xorl	%ebx, %ebx
LBB0_41:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_38:
	movq	_EPROTO@GOTPCREL(%rip), %rax
LBB0_39:
	xorl	%ebx, %ebx
	jmp	LBB0_40
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_13
	.long	L0_0_set_15
	.end_data_region
                                        ## -- End function
	.comm	_SMBHSTSTS,8,3                  ## @SMBHSTSTS
	.comm	_sch_adapter,4,2                ## @sch_adapter
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SMBus busy (%02x)\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_SMBHSTCLK,4,2                  ## @SMBHSTCLK
L_.str.1:                               ## @.str.1
	.asciz	"Clock divider uninitialized. Setting defaults\n"

	.comm	_backbone_speed,4,2             ## @backbone_speed
L_.str.2:                               ## @.str.2
	.asciz	"access size: %d %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"READ"

L_.str.4:                               ## @.str.4
	.asciz	"WRITE"

	.comm	_SMBHSTADD,8,3                  ## @SMBHSTADD
	.comm	_SCH_QUICK,4,2                  ## @SCH_QUICK
	.comm	_I2C_SMBUS_WRITE,1,0            ## @I2C_SMBUS_WRITE
	.comm	_SMBHSTCMD,8,3                  ## @SMBHSTCMD
	.comm	_SMBHSTDAT0,8,3                 ## @SMBHSTDAT0
	.comm	_SMBHSTDAT1,8,3                 ## @SMBHSTDAT1
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ## @I2C_SMBUS_BLOCK_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMBBLKDAT,4,2                  ## @SMBBLKDAT
L_.str.5:                               ## @.str.5
	.asciz	"Unsupported transaction %d\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
L_.str.6:                               ## @.str.6
	.asciz	"write size %d to 0x%04x\n"

	.comm	_SMBHSTCNT,8,3                  ## @SMBHSTCNT
	.comm	_EPROTO,4,2                     ## @EPROTO
	.no_dead_strip	_sch_access
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sch_access
_sch_access:                            ; @sch_access
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x6
	mov	x23, x5
	mov	x21, x4
	mov	x20, x3
	mov	x22, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _SMBHSTSTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMBHSTSTS@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	bl	_inb
	tbnz	w0, #3, LBB0_8
; %bb.1:
Lloh3:
	adrp	x25, _SMBHSTCLK@GOTPAGE
Lloh4:
	ldr	x25, [x25, _SMBHSTCLK@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_inw
	cbnz	w0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x0, _sch_adapter@GOTPAGE
Lloh6:
	ldr	x0, [x0, _sch_adapter@GOTPAGEOFF]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_notice
Lloh9:
	adrp	x8, _backbone_speed@GOTPAGE
Lloh10:
	ldr	x8, [x8, _backbone_speed@GOTPAGEOFF]
Lloh11:
	ldrsw	x8, [x8]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #39
	add	w0, w8, w9
	ldr	w1, [x25]
	bl	_outw
LBB0_3:
Lloh12:
	adrp	x8, l_.str.3@PAGE
Lloh13:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh14:
	adrp	x9, l_.str.4@PAGE
Lloh15:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	w20, #0
	csel	x8, x9, x8, eq
Lloh16:
	adrp	x0, _sch_adapter@GOTPAGE
Lloh17:
	ldr	x0, [x0, _sch_adapter@GOTPAGEOFF]
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	bl	_dev_dbg
	sub	w8, w23, #132
	cmp	w8, #4
	b.hi	LBB0_10
; %bb.4:
Lloh20:
	adrp	x9, lJTI0_0@PAGE
Lloh21:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	orr	w0, w20, w22, lsl #1
Lloh22:
	adrp	x8, _SMBHSTADD@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SMBHSTADD@GOTPAGEOFF]
Lloh24:
	ldr	x1, [x8]
	bl	_outb
Lloh25:
	adrp	x8, _SMBHSTCMD@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SMBHSTCMD@GOTPAGEOFF]
Lloh27:
	ldr	x1, [x8]
	mov	x0, x21
	bl	_outb
Lloh28:
	adrp	x8, _I2C_SMBUS_WRITE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _I2C_SMBUS_WRITE@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w8, w20, uxtb
	b.ne	LBB0_7
; %bb.6:
	ldrb	w0, [x19]
Lloh30:
	adrp	x8, _SMBHSTDAT0@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SMBHSTDAT0@GOTPAGEOFF]
Lloh32:
	ldr	x1, [x8]
	bl	_outb
	ldrb	w0, [x19, #1]
Lloh33:
	adrp	x8, _SMBHSTDAT1@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SMBHSTDAT1@GOTPAGEOFF]
Lloh35:
	ldr	x1, [x8]
	bl	_outb
LBB0_7:
	mov	w21, #128
	b	LBB0_25
LBB0_8:
	and	w2, w0, #0xf
Lloh36:
	adrp	x0, _sch_adapter@GOTPAGE
Lloh37:
	ldr	x0, [x0, _sch_adapter@GOTPAGEOFF]
Lloh38:
	adrp	x1, l_.str@PAGE
Lloh39:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh40:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_39
LBB0_10:
Lloh42:
	adrp	x1, l_.str.5@PAGE
Lloh43:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x24
	mov	x2, x23
	bl	_dev_warn
Lloh44:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh45:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_9
LBB0_11:
	orr	w0, w20, w22, lsl #1
Lloh46:
	adrp	x8, _SMBHSTADD@GOTPAGE
Lloh47:
	ldr	x8, [x8, _SMBHSTADD@GOTPAGEOFF]
Lloh48:
	ldr	x1, [x8]
	bl	_outb
Lloh49:
	adrp	x8, _SCH_QUICK@GOTPAGE
Lloh50:
	ldr	x8, [x8, _SCH_QUICK@GOTPAGEOFF]
Lloh51:
	ldr	w21, [x8]
	b	LBB0_25
LBB0_12:
	orr	w0, w20, w22, lsl #1
Lloh52:
	adrp	x8, _SMBHSTADD@GOTPAGE
Lloh53:
	ldr	x8, [x8, _SMBHSTADD@GOTPAGEOFF]
Lloh54:
	ldr	x1, [x8]
	bl	_outb
Lloh55:
	adrp	x8, _SMBHSTCMD@GOTPAGE
Lloh56:
	ldr	x8, [x8, _SMBHSTCMD@GOTPAGEOFF]
Lloh57:
	ldr	x1, [x8]
	mov	x0, x21
	bl	_outb
Lloh58:
	adrp	x8, _I2C_SMBUS_WRITE@GOTPAGE
Lloh59:
	ldr	x8, [x8, _I2C_SMBUS_WRITE@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w8, w20, uxtb
	b.ne	LBB0_14
; %bb.13:
	ldr	w0, [x19]
Lloh60:
	adrp	x8, _SMBHSTDAT0@GOTPAGE
Lloh61:
	ldr	x8, [x8, _SMBHSTDAT0@GOTPAGEOFF]
Lloh62:
	ldr	x1, [x8]
	bl	_outb
LBB0_14:
	mov	w21, #129
	b	LBB0_25
LBB0_15:
	orr	w0, w20, w22, lsl #1
Lloh63:
	adrp	x8, _SMBHSTADD@GOTPAGE
Lloh64:
	ldr	x8, [x8, _SMBHSTADD@GOTPAGEOFF]
Lloh65:
	ldr	x1, [x8]
	bl	_outb
Lloh66:
	adrp	x8, _I2C_SMBUS_WRITE@GOTPAGE
Lloh67:
	ldr	x8, [x8, _I2C_SMBUS_WRITE@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w8, w20, uxtb
	b.ne	LBB0_17
; %bb.16:
Lloh68:
	adrp	x8, _SMBHSTCMD@GOTPAGE
Lloh69:
	ldr	x8, [x8, _SMBHSTCMD@GOTPAGEOFF]
Lloh70:
	ldr	x1, [x8]
	mov	x0, x21
	bl	_outb
LBB0_17:
	mov	w21, #130
	b	LBB0_25
LBB0_18:
	orr	w0, w20, w22, lsl #1
Lloh71:
	adrp	x8, _SMBHSTADD@GOTPAGE
Lloh72:
	ldr	x8, [x8, _SMBHSTADD@GOTPAGEOFF]
Lloh73:
	ldr	x1, [x8]
	bl	_outb
Lloh74:
	adrp	x8, _SMBHSTCMD@GOTPAGE
Lloh75:
	ldr	x8, [x8, _SMBHSTCMD@GOTPAGEOFF]
Lloh76:
	ldr	x1, [x8]
	mov	x0, x21
	bl	_outb
Lloh77:
	adrp	x8, _I2C_SMBUS_WRITE@GOTPAGE
Lloh78:
	ldr	x8, [x8, _I2C_SMBUS_WRITE@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w8, w20, uxtb
	b.ne	LBB0_24
; %bb.19:
	ldr	x8, [x19]
	ldr	w21, [x8]
	cbz	w21, LBB0_37
; %bb.20:
Lloh79:
	adrp	x8, _I2C_SMBUS_BLOCK_MAX@GOTPAGE
Lloh80:
	ldr	x8, [x8, _I2C_SMBUS_BLOCK_MAX@GOTPAGEOFF]
Lloh81:
	ldr	w8, [x8]
	cmp	w21, w8
	b.gt	LBB0_37
; %bb.21:
Lloh82:
	adrp	x8, _SMBHSTDAT0@GOTPAGE
Lloh83:
	ldr	x8, [x8, _SMBHSTDAT0@GOTPAGEOFF]
Lloh84:
	ldr	x1, [x8]
	mov	x0, x21
	bl	_outb
	cmp	w21, #1
	b.lt	LBB0_24
; %bb.22:
	add	x21, x21, #1
	mov	w22, #1
Lloh85:
	adrp	x23, _SMBBLKDAT@GOTPAGE
Lloh86:
	ldr	x23, [x23, _SMBBLKDAT@GOTPAGEOFF]
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w0, [x8, x22, lsl #2]
	ldr	w8, [x23]
	add	w8, w22, w8
	sub	w8, w8, #1
	sxtw	x1, w8
	bl	_outb
	add	x22, x22, #1
	cmp	x21, x22
	b.ne	LBB0_23
LBB0_24:
	mov	w21, #131
LBB0_25:
Lloh87:
	adrp	x22, _SMBHSTCNT@GOTPAGE
Lloh88:
	ldr	x22, [x22, _SMBHSTCNT@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh89:
	adrp	x0, _sch_adapter@GOTPAGE
Lloh90:
	ldr	x0, [x0, _sch_adapter@GOTPAGEOFF]
	str	x8, [sp]
Lloh91:
	adrp	x1, l_.str.6@PAGE
Lloh92:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	ldr	x0, [x22]
	bl	_inb
	mov	w8, #176
	and	w0, w0, w8
	bfxil	w0, w21, #0, #3
	ldr	x1, [x22]
	bl	_outb
	bl	_sch_transaction
	cbnz	w0, LBB0_39
; %bb.26:
Lloh93:
	adrp	x8, _I2C_SMBUS_WRITE@GOTPAGE
Lloh94:
	ldr	x8, [x8, _I2C_SMBUS_WRITE@GOTPAGEOFF]
	ldrb	w8, [x8]
Lloh95:
	adrp	x9, _SCH_QUICK@GOTPAGE
Lloh96:
	ldr	x9, [x9, _SCH_QUICK@GOTPAGEOFF]
Lloh97:
	ldr	w9, [x9]
	cmp	w8, w20, uxtb
	ccmp	w21, w9, #4, ne
	b.ne	LBB0_28
LBB0_27:
	mov	w0, #0
	b	LBB0_39
LBB0_28:
	sub	w8, w21, #129
	cmp	w8, #2
	b.lo	LBB0_36
; %bb.29:
	cmp	w21, #128
	b.eq	LBB0_38
; %bb.30:
	cmp	w21, #131
	b.ne	LBB0_27
; %bb.31:
Lloh98:
	adrp	x8, _SMBHSTDAT0@GOTPAGE
Lloh99:
	ldr	x8, [x8, _SMBHSTDAT0@GOTPAGEOFF]
Lloh100:
	ldr	x0, [x8]
	bl	_inb
	ldr	x8, [x19]
	str	w0, [x8]
	ldr	x8, [x19]
	ldr	w8, [x8]
	cbz	w8, LBB0_40
; %bb.32:
Lloh101:
	adrp	x9, _I2C_SMBUS_BLOCK_MAX@GOTPAGE
Lloh102:
	ldr	x9, [x9, _I2C_SMBUS_BLOCK_MAX@GOTPAGEOFF]
Lloh103:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_40
; %bb.33:
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.34:
	mov	x20, #0
Lloh104:
	adrp	x21, _SMBBLKDAT@GOTPAGE
Lloh105:
	ldr	x21, [x21, _SMBBLKDAT@GOTPAGEOFF]
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	add	w8, w20, w8
	sxtw	x0, w8
	bl	_inb
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
	add	x9, x9, x20, lsl #2
	str	w8, [x9, #4]
	ldr	x8, [x19]
	ldrsw	x8, [x8]
	add	x20, x20, #1
	cmp	x20, x8
	b.lt	LBB0_35
	b	LBB0_39
LBB0_36:
Lloh106:
	adrp	x8, _SMBHSTDAT0@GOTPAGE
Lloh107:
	ldr	x8, [x8, _SMBHSTDAT0@GOTPAGEOFF]
Lloh108:
	ldr	x0, [x8]
	bl	_inb
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_39
LBB0_37:
Lloh109:
	adrp	x8, _EINVAL@GOTPAGE
Lloh110:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_38:
Lloh111:
	adrp	x8, _SMBHSTDAT0@GOTPAGE
Lloh112:
	ldr	x8, [x8, _SMBHSTDAT0@GOTPAGEOFF]
Lloh113:
	ldr	x0, [x8]
	bl	_inb
	mov	x20, x0
Lloh114:
	adrp	x8, _SMBHSTDAT1@GOTPAGE
Lloh115:
	ldr	x8, [x8, _SMBHSTDAT1@GOTPAGEOFF]
Lloh116:
	ldr	x0, [x8]
	bl	_inb
	mov	x8, x0
	mov	w0, #0
	add	w8, w20, w8, lsl #8
	str	w8, [x19]
LBB0_39:
	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
	add	sp, sp, #96
	ret
LBB0_40:
Lloh117:
	adrp	x8, _EPROTO@GOTPAGE
Lloh118:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGot	Lloh85, Lloh86
	.loh AdrpAdd	Lloh91, Lloh92
	.loh AdrpLdrGot	Lloh89, Lloh90
	.loh AdrpLdrGot	Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGot	Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpLdrGot	Lloh104, Lloh105
	.loh AdrpLdrGotLdr	Lloh106, Lloh107, Lloh108
	.loh AdrpLdrGot	Lloh109, Lloh110
	.loh AdrpLdrGotLdr	Lloh114, Lloh115, Lloh116
	.loh AdrpLdrGotLdr	Lloh111, Lloh112, Lloh113
	.loh AdrpLdrGot	Lloh117, Lloh118
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_11-LBB0_5)>>2
	.byte	(LBB0_12-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_18-LBB0_5)>>2
                                        ; -- End function
	.comm	_SMBHSTSTS,8,3                  ; @SMBHSTSTS
	.comm	_sch_adapter,4,2                ; @sch_adapter
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SMBus busy (%02x)\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_SMBHSTCLK,4,2                  ; @SMBHSTCLK
l_.str.1:                               ; @.str.1
	.asciz	"Clock divider uninitialized. Setting defaults\n"

	.comm	_backbone_speed,4,2             ; @backbone_speed
l_.str.2:                               ; @.str.2
	.asciz	"access size: %d %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"READ"

l_.str.4:                               ; @.str.4
	.asciz	"WRITE"

	.comm	_SMBHSTADD,8,3                  ; @SMBHSTADD
	.comm	_SCH_QUICK,4,2                  ; @SCH_QUICK
	.comm	_I2C_SMBUS_WRITE,1,0            ; @I2C_SMBUS_WRITE
	.comm	_SMBHSTCMD,8,3                  ; @SMBHSTCMD
	.comm	_SMBHSTDAT0,8,3                 ; @SMBHSTDAT0
	.comm	_SMBHSTDAT1,8,3                 ; @SMBHSTDAT1
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ; @I2C_SMBUS_BLOCK_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMBBLKDAT,4,2                  ; @SMBBLKDAT
l_.str.5:                               ; @.str.5
	.asciz	"Unsupported transaction %d\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
l_.str.6:                               ; @.str.6
	.asciz	"write size %d to 0x%04x\n"

	.comm	_SMBHSTCNT,8,3                  ; @SMBHSTCNT
	.comm	_EPROTO,4,2                     ; @EPROTO
	.no_dead_strip	_sch_access
.subsections_via_symbols
