	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dibx000_master_i2c_read
_dibx000_master_i2c_read:               ## @dibx000_master_i2c_read
	.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
	movq	%rsi, %r15
	movl	8(%rsi), %esi
	xorl	%eax, %eax
	testl	%esi, %esi
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r12
	movq	(%r15), %rbx
	movl	%esi, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
	cmpl	$8, %r13d
	movl	$8, %r14d
	cmovll	%r13d, %r14d
	movl	16(%r15), %ecx
	shll	$9, %ecx
	movl	%r14d, %edx
	andl	$7, %edx
	leal	(%rcx,%rdx,4), %ecx
	xorl	%edx, %edx
	cmpl	%esi, %r13d
	sete	%dl
	shll	$5, %edx
	orl	%ecx, %edx
	xorl	%eax, %eax
	subl	%r14d, %r13d
	sete	%al
	shll	$6, %eax
	addl	%eax, %edx
	addl	$386, %edx                      ## imm = 0x182
	movq	(%r12), %rsi
	incq	%rsi
	movq	%r12, %rdi
	callq	_dibx000_write_word
	movq	%r12, %rdi
	callq	_dibx000_is_i2c_done
	testq	%rax, %rax
	je	LBB0_6
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	movzbl	%al, %eax
	movl	%eax, 4(%rbx)
	addq	$8, %rbx
	addl	$-2, %r14d
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
	testl	%r14d, %r14d
	je	LBB0_2
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_6 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	(%r12), %rsi
	movq	%r12, %rdi
	callq	_dibx000_read_word
	movzbl	%ah, %ecx
	movl	%ecx, (%rbx)
	cmpl	$2, %r14d
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=3
	addq	$4, %rbx
	decl	%r14d
	testl	%r14d, %r14d
	jne	LBB0_7
LBB0_2:                                 ##   in Loop: Header=BB0_5 Depth=1
	testl	%r13d, %r13d
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r15), %esi
	jmp	LBB0_5
LBB0_10:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_3:
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_dibx000_master_i2c_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dibx000_master_i2c_read
_dibx000_master_i2c_read:               ; @dibx000_master_i2c_read
	.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
	ldr	w8, [x1, #8]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x24, [x1]
	mov	w21, #8
	mov	w22, #386
	mov	w23, #418
	mov	x25, x8
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w25, #8
	csel	w26, w25, w21, lt
	ldr	w9, [x19, #16]
	ubfiz	w10, w26, #2, #3
	bfi	w10, w9, #9, #23
	cmp	w25, w8
	csel	w8, w23, w22, eq
	orr	w8, w10, w8
	subs	w25, w25, w26
	orr	w9, w8, #0x40
	csel	w2, w9, w8, eq
	ldr	x8, [x20]
	add	x1, x8, #1
	mov	x0, x20
	bl	_dibx000_write_word
	mov	x0, x20
	bl	_dibx000_is_i2c_done
	cbnz	x0, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w26, LBB0_5
	b	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	sub	w26, w26, #1
	mov	x24, x9
	cbz	w26, LBB0_7
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x20]
	mov	x0, x20
	bl	_dibx000_read_word
	ubfx	w8, w0, #8, #8
	mov	x9, x24
	str	w8, [x9], #4
	subs	w8, w26, #2
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	and	w9, w0, #0xff
	str	w9, [x24, #4]
	add	x24, x24, #8
	mov	x26, x8
	cbnz	w8, LBB0_5
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbz	w25, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19, #8]
	b	LBB0_2
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh0:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_dibx000_master_i2c_read
.subsections_via_symbols
