	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_i2c_get_adapdata
	movq	%rax, -1088(%rbp)               ## 8-byte Spill
	movq	%rax, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_13
## %bb.1:
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	jle	LBB0_10
## %bb.2:
	movl	%r12d, -1080(%rbp)              ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_REQUEST_I2C_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1072(%rbp)
	movl	(%rbx), %edx
	addl	$2, %edx
	movq	-1088(%rbp), %rdi               ## 8-byte Reload
	leaq	-1072(%rbp), %rsi
	callq	_dib0700_ctrl_wr
	testq	%rax, %rax
	movl	-1076(%rbp), %ebx               ## 4-byte Reload
	movl	-1080(%rbp), %r12d              ## 4-byte Reload
	js	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %ebx
	cmpl	%r12d, %r13d
	jge	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -1076(%rbp)               ## 4-byte Spill
	movslq	%ebx, %r13
	movq	%r13, %r14
	shlq	$4, %r14
	movl	(%r15,%r14), %eax
	addl	%eax, %eax
	movl	%eax, -1068(%rbp)
	movl	4(%r15,%r14), %edx
	movl	12(%r15,%r14), %esi
	leaq	(%r15,%r14), %rbx
	addq	$4, %rbx
	leaq	-1064(%rbp), %rdi
	callq	_memcpy
	incl	%r13d
	cmpl	%r12d, %r13d
	jge	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r13d, %r12
	shlq	$4, %r12
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15,%r12)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_REQUEST_I2C_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1072(%rbp)
	orb	$1, -1068(%rbp)
	movl	(%rbx), %edx
	addl	$2, %edx
	movl	4(%r15,%r12), %r8d
	movl	12(%r15,%r12), %ecx
	movq	-1088(%rbp), %rdi               ## 8-byte Reload
	leaq	-1072(%rbp), %rsi
	callq	_dib0700_ctrl_rd
	testl	%eax, %eax
	jle	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r15,%r12), %rcx
	addq	$4, %rcx
	movl	%eax, (%rcx)
	movl	-1076(%rbp), %eax               ## 4-byte Reload
	addl	$2, %eax
	movl	%eax, %r13d
	movl	-1080(%rbp), %r12d              ## 4-byte Reload
	jmp	LBB0_9
LBB0_13:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	addq	%r14, %r15
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_deb_info
	movl	-1076(%rbp), %ebx               ## 4-byte Reload
LBB0_10:
	movq	-1088(%rbp), %rdi               ## 8-byte Reload
	callq	_mutex_unlock
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.14:
	movl	%ebx, %eax
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_REQUEST_I2C_READ,4,2           ## @REQUEST_I2C_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C read failed on address 0x%02x\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:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #1040
	mov	x21, x2
	mov	x22, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	bl	_i2c_get_adapdata
	mov	x19, x0
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_9
; %bb.1:
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.2:
	mov	w20, #0
	add	x8, sp, #4
	add	x23, x8, #8
Lloh3:
	adrp	x26, _REQUEST_I2C_WRITE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _REQUEST_I2C_WRITE@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x26]
	str	w8, [sp, #4]
	ldr	w8, [x27]
	add	w2, w8, #2
	add	x1, sp, #4
	mov	x0, x19
	bl	_dib0700_ctrl_wr
	tbnz	x0, #63, LBB0_12
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x20, x28
	cmp	w28, w21
	b.ge	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x25, w20
	add	x24, x22, w20, sxtw #4
	ldr	w8, [x24]
	lsl	w8, w8, #1
	str	w8, [sp, #8]
	ldr	w1, [x24, #12]
	mov	x27, x24
	ldr	w2, [x27, #4]!
	mov	x0, x23
	bl	_memcpy
	add	x28, x25, #1
	cmp	w28, w21
	b.ge	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x22, x28, lsl #4
	ldr	w8, [x25, #8]
Lloh5:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh8:
	adrp	x8, _REQUEST_I2C_READ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REQUEST_I2C_READ@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	orr	w9, w9, #0x1
	stp	w8, w9, [sp, #4]
	ldr	w8, [x27]
	add	w2, w8, #2
	ldr	w4, [x25, #4]!
	ldr	w3, [x25, #8]
	add	x1, sp, #4
	mov	x0, x19
	bl	_dib0700_ctrl_rd
	cmp	w0, #0
	b.le	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w0, [x25]
	add	w28, w20, #2
	b	LBB0_4
LBB0_9:
Lloh11:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_10:
	mov	w20, #0
	b	LBB0_12
LBB0_11:
	ldr	w1, [x24]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_info
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	ldur	x8, [x29, #-96]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x20
	add	sp, sp, #1040
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_REQUEST_I2C_READ,4,2           ; @REQUEST_I2C_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C read failed on address 0x%02x\n"

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