	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_lpc2k_xfer
_i2c_lpc2k_xfer:                        ## @i2c_lpc2k_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	callq	_i2c_get_adapdata
	movq	%rax, %r15
	movq	_LPC24XX_I2STAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	24(%r15), %rdi
	callq	_readl
	movq	_M_I2C_IDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.2:
	movl	%r14d, %r13d
	decl	%r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, 16(%r15)
	movq	$0, 8(%r15)
	xorl	%eax, %eax
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	movl	%eax, 4(%r15)
	xorl	%eax, %eax
	cmpq	%rbx, %r14
	sete	%al
	movl	%eax, (%r15)
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_lpc2k_process_msg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	addq	$4, %r12
	cmpq	%rbx, %r13
	jne	LBB0_5
## %bb.7:
	movl	%r13d, %r14d
	jmp	LBB0_8
LBB0_3:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i2c_lpc2k_clear_arb            ## TAILCALL
LBB0_6:
	movl	%eax, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LPC24XX_I2STAT,8,3             ## @LPC24XX_I2STAT
	.comm	_M_I2C_IDLE,8,3                 ## @M_I2C_IDLE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_i2c_lpc2k_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_lpc2k_xfer
_i2c_lpc2k_xfer:                        ; @i2c_lpc2k_xfer
	.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
	mov	x22, x2
	mov	x19, x1
	bl	_i2c_get_adapdata
	mov	x20, x0
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x9, _LPC24XX_I2STAT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LPC24XX_I2STAT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh3:
	adrp	x8, _M_I2C_IDLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _M_I2C_IDLE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.1:
	subs	w23, w22, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x21, #0
	mov	w24, w22
Lloh6:
	adrp	x25, _EBUSY@GOTPAGE
Lloh7:
	ldr	x25, [x25, _EBUSY@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	stp	xzr, x19, [x20, #8]
	ldr	w8, [x25]
	neg	w8, w8
	cmp	x23, x21
	cset	w9, eq
	stp	w9, w8, [x20]
	mov	x0, x20
	mov	x1, x21
	bl	_lpc2k_process_msg
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	add	x19, x19, #4
	cmp	x24, x21
	b.ne	LBB0_3
; %bb.5:
	mov	x22, x24
	b	LBB0_8
LBB0_6:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_i2c_lpc2k_clear_arb
LBB0_7:
	mov	x22, x0
LBB0_8:
	mov	x0, x22
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_LPC24XX_I2STAT,8,3             ; @LPC24XX_I2STAT
	.comm	_M_I2C_IDLE,8,3                 ; @M_I2C_IDLE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_i2c_lpc2k_xfer
.subsections_via_symbols
