	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function highlander_i2c_smbus_xfer
_highlander_i2c_smbus_xfer:             ## @highlander_i2c_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	$24, %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, %r14d
	movl	%ecx, %r13d
	movl	%esi, %r15d
	movq	16(%rbp), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	callq	_i2c_get_adapdata
	movq	%rax, %rbx
	movq	_I2C_SMBUS_READ@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	andb	%r13b, %al
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	leaq	28(%rbx), %rdi
	callq	_init_completion
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	movl	%r12d, %r9d
	callq	_dev_dbg
	cmpl	$128, %r12d
	je	LBB0_5
## %bb.1:
	cmpl	$129, %r12d
	jne	LBB0_3
## %bb.2:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movl	$1, %eax
	jmp	LBB0_6
LBB0_5:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	addq	$4, %rax
	movq	%rax, (%rbx)
	movq	(%rcx), %rax
	movl	(%rax), %eax
LBB0_6:
	movl	%eax, 8(%rbx)
	movq	_SMMR@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	16(%rbx), %rdi
	callq	_ioread16
	movl	8(%rbx), %edx
	leal	-1(%rdx), %ecx
	cmpl	$31, %ecx
	ja	LBB0_10
## %bb.7:
	movq	_SMMR_MODE0@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movq	_SMMR_MODE1@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	movl	%r9d, %esi
	orl	%r8d, %esi
	movl	%esi, %edi
	notl	%edi
	andl	%eax, %edi
	leaq	LJTI0_0(%rip), %r10
	movslq	(%r10,%rcx,4), %rcx
	addq	%r10, %rcx
	jmpq	*%rcx
LBB0_11:
	orl	%r8d, %edi
	jmp	LBB0_12
LBB0_3:
	movl	24(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	jmp	LBB0_4
LBB0_10:
	movl	24(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
LBB0_4:
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	orl	%r9d, %edi
	jmp	LBB0_12
LBB0_9:
	orl	%eax, %esi
	movl	%esi, %edi
LBB0_12:
	movsbl	-41(%rbp), %r14d                ## 1-byte Folded Reload
	movq	(%r12), %rsi
	addq	16(%rbx), %rsi
	callq	_iowrite16
	movq	%rbx, %rdi
	callq	_highlander_i2c_done
	addl	%r15d, %r15d
	orl	%r14d, %r15d
	movq	_SMSMADR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	movl	%r15d, %edi
	callq	_iowrite16
	movl	8(%rbx), %edx
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_highlander_i2c_command
	movq	%rbx, %rdi
	addq	$24, %rsp
	testb	%r14b, %r14b
	je	LBB0_13
## %bb.14:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_highlander_i2c_read            ## TAILCALL
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_highlander_i2c_write           ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_I2C_SMBUS_READ,1,0             ## @I2C_SMBUS_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"addr %04x, command %02x, read_write %d, size %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"unsupported command %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMMR,8,3                       ## @SMMR
	.comm	_SMMR_MODE0,4,2                 ## @SMMR_MODE0
	.comm	_SMMR_MODE1,4,2                 ## @SMMR_MODE1
L_.str.2:                               ## @.str.2
	.asciz	"unsupported xfer size %d\n"

	.comm	_SMSMADR,8,3                    ## @SMSMADR
	.no_dead_strip	_highlander_i2c_smbus_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function highlander_i2c_smbus_xfer
_highlander_i2c_smbus_xfer:             ; @highlander_i2c_smbus_xfer
	.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	x23, x6
	mov	x24, x5
	mov	x20, x4
	mov	x22, x3
	mov	x21, x1
	bl	_i2c_get_adapdata
	mov	x19, x0
Lloh0:
	adrp	x8, _I2C_SMBUS_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_SMBUS_READ@GOTPAGEOFF]
	ldrb	w25, [x8]
	add	x0, x0, #28
	bl	_init_completion
	ldr	w0, [x19, #24]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x20
	mov	x4, x22
	mov	x5, x24
	bl	_dev_dbg
	cmp	w24, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w24, #129
	b.ne	LBB0_7
; %bb.2:
	str	x23, [x19]
	mov	w8, #1
	b	LBB0_4
LBB0_3:
	ldr	x8, [x23]
	add	x8, x8, #4
	str	x8, [x19]
	ldr	x8, [x23]
	ldr	w8, [x8]
LBB0_4:
	str	w8, [x19, #8]
	ldr	x8, [x19, #16]
Lloh4:
	adrp	x23, _SMMR@GOTPAGE
Lloh5:
	ldr	x23, [x23, _SMMR@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_ioread16
	ldr	w2, [x19, #8]
	sub	w9, w2, #1
	cmp	w9, #31
	b.hi	LBB0_8
; %bb.5:
	mov	x8, x0
Lloh6:
	adrp	x10, _SMMR_MODE0@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SMMR_MODE0@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _SMMR_MODE1@GOTPAGE
Lloh10:
	ldr	x11, [x11, _SMMR_MODE1@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	orr	w12, w11, w10
	bic	w0, w0, w12
Lloh12:
	adrp	x13, lJTI0_0@PAGE
Lloh13:
	add	x13, x13, lJTI0_0@PAGEOFF
	adr	x14, LBB0_6
	ldrb	w15, [x13, x9]
	add	x14, x14, x15, lsl #2
	br	x14
LBB0_6:
	orr	w0, w0, w10
	b	LBB0_12
LBB0_7:
	ldr	w0, [x19, #24]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x24
	b	LBB0_9
LBB0_8:
	ldr	w0, [x19, #24]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	bl	_dev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	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
LBB0_10:
	orr	w0, w0, w11
	b	LBB0_12
LBB0_11:
	orr	w0, w12, w8
LBB0_12:
	and	w8, w25, w22
	sxtb	w22, w8
	ldr	x8, [x19, #16]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_iowrite16
	mov	x0, x19
	bl	_highlander_i2c_done
	orr	w0, w22, w21, lsl #1
	ldr	x8, [x19, #16]
Lloh21:
	adrp	x9, _SMSMADR@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SMSMADR@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite16
	ldr	w2, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_highlander_i2c_command
	mov	x0, x19
	cbz	w22, LBB0_14
; %bb.13:
	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
	b	_highlander_i2c_read
LBB0_14:
	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
	b	_highlander_i2c_write
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
                                        ; -- End function
	.comm	_I2C_SMBUS_READ,1,0             ; @I2C_SMBUS_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"addr %04x, command %02x, read_write %d, size %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"unsupported command %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMMR,8,3                       ; @SMMR
	.comm	_SMMR_MODE0,4,2                 ; @SMMR_MODE0
	.comm	_SMMR_MODE1,4,2                 ; @SMMR_MODE1
l_.str.2:                               ; @.str.2
	.asciz	"unsupported xfer size %d\n"

	.comm	_SMSMADR,8,3                    ; @SMSMADR
	.no_dead_strip	_highlander_i2c_smbus_xfer
.subsections_via_symbols
