	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib0700_i2c_xfer_legacy
_dib0700_i2c_xfer_legacy:               ## @dib0700_i2c_xfer_legacy
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	callq	_i2c_get_adapdata
	movq	%rax, %r14
	movq	8(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	%r14, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_5
## %bb.3:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_4
## %bb.6:
	xorl	%r15d, %r15d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_REQUEST_I2C_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rsi
	movl	%eax, (%rsi)
	movl	(%r14), %edx
	addl	$2, %edx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_dib0700_ctrl_wr
	testl	%eax, %eax
	js	LBB0_17
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %r15d
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_20
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%r15d, %rax
	leaq	(%rax,%rax,2), %r12
	movl	(%r13,%r12,8), %eax
	addl	%eax, %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdi
	movl	%eax, 4(%rdi)
	movl	4(%r13,%r12,8), %edx
	cmpl	$7, %edx
	jae	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	leaq	4(,%r12,8), %r14
	addq	%r13, %r14
	addq	$8, %rdi
	movq	8(%r13,%r12,8), %rsi
	callq	_memcpy
	leal	1(%r15), %ebx
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movslq	%ebx, %rax
	leaq	(%rax,%rax,2), %rsi
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r13,%rsi,8)
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_REQUEST_I2C_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	orb	$1, 4(%rcx)
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edx
	addl	$2, %edx
	movq	%rsi, %rbx
	movl	4(%r13,%rsi,8), %r8d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rcx, %rsi
	callq	_dib0700_ctrl_rd
	movl	%eax, %r14d
	testl	%eax, %eax
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	jle	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rcx
	leaq	4(,%rbx,8), %rbx
	addq	%r13, %rbx
	movl	(%rbx), %edx
	cmpl	$9, %edx
	jae	LBB0_14
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r13,%rcx,8), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	callq	_memcpy
	movl	%r14d, (%rbx)
	addl	$2, %r15d
	movl	%r15d, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_err
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_1:
	movq	_EINTR@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_4:
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	movl	%edx, %esi
	callq	_deb_info
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_17:
	movl	%eax, %ebx
	jmp	LBB0_20
LBB0_12:
	leaq	(,%r12,8), %rax
	addq	%r13, %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_15
LBB0_14:
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
LBB0_15:
	callq	_deb_info
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_20:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_21:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINTR,4,2                      ## @EINTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not acquire lock"

L_.str.1:                               ## @.str.1
	.asciz	"i2c xfer to big: %d\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_REQUEST_I2C_READ,4,2           ## @REQUEST_I2C_READ
L_.str.2:                               ## @.str.2
	.asciz	"I2C read failed on address 0x%02x\n"

L_.str.3:                               ## @.str.3
	.asciz	"i2c xfer buffer to small for %d\n"

	.comm	_REQUEST_I2C_WRITE,4,2          ## @REQUEST_I2C_WRITE
	.no_dead_strip	_dib0700_i2c_xfer_legacy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib0700_i2c_xfer_legacy
_dib0700_i2c_xfer_legacy:               ; @dib0700_i2c_xfer_legacy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x2
	mov	x22, x1
	bl	_i2c_get_adapdata
	mov	x19, x0
	ldr	x25, [x0, #8]
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_13
; %bb.1:
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_12
; %bb.2:
	str	x20, [sp]                       ; 8-byte Folded Spill
	cmp	w21, #1
	b.lt	LBB0_14
; %bb.3:
	mov	w23, #0
	mov	w24, #24
Lloh0:
	adrp	x26, _REQUEST_I2C_WRITE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _REQUEST_I2C_WRITE@GOTPAGEOFF]
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x26]
	ldr	x1, [x25]
	str	w8, [x1]
	ldr	w8, [x28]
	add	w2, w8, #2
	mov	x0, x19
	bl	_dib0700_ctrl_wr
	tbnz	w0, #31, LBB0_16
; %bb.5:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w23, w21
	b.ge	LBB0_20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	smaddl	x20, w23, w24, x22
	ldr	w8, [x20]
	lsl	w9, w8, #1
	ldr	x8, [x25]
	str	w9, [x8, #4]
	mov	x28, x20
	ldr	w2, [x28, #4]!
	cmp	w2, #7
	b.hs	LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	sxtw	x27, w23
	add	x0, x8, #8
	madd	x8, x27, x24, x22
	ldr	x1, [x8, #8]
	bl	_memcpy
	add	x23, x27, #1
	cmp	w23, w21
	b.ge	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	madd	x8, x23, x24, x22
	ldr	w8, [x8, #16]
Lloh2:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x19, x26
Lloh5:
	adrp	x8, _REQUEST_I2C_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REQUEST_I2C_READ@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	x1, [x25]
	ldr	w9, [x1, #4]
	orr	w9, w9, #0x1
	stp	w8, w9, [x1]
	ldr	w8, [x28]
	add	w2, w8, #2
	madd	x26, x23, x24, x22
	ldr	w4, [x26, #4]!
	mov	x3, x1
	bl	_dib0700_ctrl_rd
	cmp	w0, #0
	b.le	LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w2, [x26]
	cmp	w2, #9
	b.hs	LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x24, x0
	mov	w8, #24
	madd	x8, x23, x8, x22
	ldr	x0, [x8, #8]
	ldr	x1, [x25]
	bl	_memcpy
	str	w24, [x26]
	mov	w24, #24
	add	w23, w27, #2
	mov	x26, x19
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	cmp	w23, w21
	b.lt	LBB0_6
	b	LBB0_20
LBB0_12:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
Lloh10:
	adrp	x8, _EINTR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_21
LBB0_14:
	mov	w23, #0
	b	LBB0_20
LBB0_15:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x2
	bl	_deb_info
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_20
LBB0_16:
	mov	x23, x0
	b	LBB0_20
LBB0_17:
	ldr	w1, [x20]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_18:
	ldr	w1, [x28]
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_19:
	bl	_deb_info
Lloh22:
	adrp	x8, _EIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w23, w8
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
LBB0_20:
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_mutex_unlock
	mov	x0, x19
	bl	_mutex_unlock
LBB0_21:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EINTR,4,2                      ; @EINTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not acquire lock"

l_.str.1:                               ; @.str.1
	.asciz	"i2c xfer to big: %d\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_REQUEST_I2C_READ,4,2           ; @REQUEST_I2C_READ
l_.str.2:                               ; @.str.2
	.asciz	"I2C read failed on address 0x%02x\n"

l_.str.3:                               ; @.str.3
	.asciz	"i2c xfer buffer to small for %d\n"

	.comm	_REQUEST_I2C_WRITE,4,2          ; @REQUEST_I2C_WRITE
	.no_dead_strip	_dib0700_i2c_xfer_legacy
.subsections_via_symbols
