	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iop3xx_i2c_master_xfer
_iop3xx_i2c_master_xfer:                ## @iop3xx_i2c_master_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	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %r13
	leaq	-52(%rbp), %rsi
	movq	%r13, %rdi
	callq	_iop3xx_i2c_wait_idle
	movq	%r13, %rdi
	callq	_iop3xx_i2c_reset
	movq	%r13, %rdi
	callq	_iop3xx_i2c_enable
	testl	%r12d, %r12d
	je	LBB0_1
## %bb.2:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r13d
	decq	%r13
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_iop3xx_i2c_handle_msg
	leaq	1(%r12), %r14
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$4, %rbx
	cmpq	%r12, %r13
	movq	%r14, %r12
	jne	LBB0_3
LBB0_5:
	testl	%eax, %eax
	cmovnel	%eax, %r14d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_1:
	xorl	%r14d, %r14d
LBB0_6:
	movq	%r13, %rdi
	callq	_iop3xx_i2c_transaction_cleanup
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_iop3xx_i2c_master_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iop3xx_i2c_master_xfer
_iop3xx_i2c_master_xfer:                ; @iop3xx_i2c_master_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0]
	add	x1, sp, #12
	mov	x0, x19
	bl	_iop3xx_i2c_wait_idle
	mov	x0, x19
	bl	_iop3xx_i2c_reset
	mov	x0, x19
	bl	_iop3xx_i2c_enable
	cbz	w22, LBB0_5
; %bb.1:
	mov	x23, #0
	mov	w8, w22
	sub	x22, x8, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_iop3xx_i2c_handle_msg
	add	x8, x23, #1
	cbnz	w0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #4
	cmp	x22, x23
	mov	x23, x8
	b.ne	LBB0_2
LBB0_4:
	cmp	w0, #0
	csel	w20, w8, w0, eq
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	mov	x0, x19
	bl	_iop3xx_i2c_transaction_cleanup
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_iop3xx_i2c_master_xfer
.subsections_via_symbols
