	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx2967_i2c_xfer_msg
_zx2967_i2c_xfer_msg:                   ## @zx2967_i2c_xfer_msg
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_zx2967_i2c_flush_fifos
	movl	8(%r14), %eax
	movl	%eax, 12(%r12)
	movl	(%r14), %ecx
	movl	%ecx, (%r12)
	movq	_I2C_FIFO_MAX@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, 4(%r12)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	4(%r14), %edx
	movl	%edx, 8(%r12)
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	movq	%r12, %rdi
	callq	_zx2967_i2c_xfer_bytes
	testl	%eax, %eax
	jne	LBB0_9
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	cmpl	4(%r12), %ebx
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_zx2967_i2c_xfer_bytes
	testl	%eax, %eax
	je	LBB0_3
	jmp	LBB0_9
LBB0_5:
	movl	(%r12), %ecx
LBB0_6:
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	movl	%ecx, %esi
	callq	_zx2967_i2c_xfer_bytes
	testl	%eax, %eax
	jne	LBB0_9
LBB0_8:
	movq	$0, (%r12)
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FIFO_MAX,4,2               ## @I2C_FIFO_MAX
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.no_dead_strip	_zx2967_i2c_xfer_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx2967_i2c_xfer_msg
_zx2967_i2c_xfer_msg:                   ; @zx2967_i2c_xfer_msg
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_zx2967_i2c_flush_fifos
	ldr	w8, [x20, #8]
	str	w8, [x19, #12]
	ldp	w1, w9, [x20]
	str	w1, [x19]
Lloh0:
	adrp	x20, _I2C_FIFO_MAX@GOTPAGE
Lloh1:
	ldr	x20, [x20, _I2C_FIFO_MAX@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh2:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh3:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
	sdiv	w11, w1, w8
Lloh4:
	ldr	w10, [x10]
	and	w9, w10, w9
	stp	w11, w9, [x19, #4]
	cmp	w11, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x0, x19
	mov	x1, x8
	bl	_zx2967_i2c_xfer_bytes
	cbnz	w0, LBB0_9
; %bb.2:
	mov	w21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w21, w21, #1
	ldr	w8, [x19, #4]
	cmp	w21, w8
	b.ge	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_zx2967_i2c_xfer_bytes
	cbz	w0, LBB0_3
	b	LBB0_9
LBB0_5:
	ldr	w1, [x19]
LBB0_6:
	cmp	w1, #1
	b.lt	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_zx2967_i2c_xfer_bytes
	cbnz	w0, LBB0_9
LBB0_8:
	mov	w0, #0
	str	xzr, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FIFO_MAX,4,2               ; @I2C_FIFO_MAX
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_zx2967_i2c_xfer_msg
.subsections_via_symbols
