	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc2k_process_msg
_lpc2k_process_msg:                     ## @lpc2k_process_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movq	32(%r15), %rax
	movq	_I2C_M_NOSTART@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	(%rax), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	32(%r15), %rax
	xorl	%edi, %edi
	cmpq	$0, 8(%rax)
	sete	%dil
	callq	_WARN_ON
	movq	32(%r15), %rax
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_LPC24XX_I2CONCLR@GOTPCREL(%rip), %r14
	movq	_LPC24XX_SI@GOTPCREL(%rip), %rbx
	testl	%ecx, (%rax)
	jne	LBB0_6
## %bb.4:
	movq	16(%rax), %rax
	movl	(%rax), %edi
	movq	_LPC24XX_I2DAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	incl	24(%r15)
	jmp	LBB0_6
LBB0_1:
	movq	_LPC24XX_I2CONSET@GOTPCREL(%rip), %r14
	movq	_LPC24XX_STA@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_5:
	movq	_LPC24XX_STA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LPC24XX_I2CONSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	movq	_LPC24XX_I2CONCLR@GOTPCREL(%rip), %r14
	movq	_LPC24XX_SI@GOTPCREL(%rip), %rbx
LBB0_6:
	movl	(%rbx), %edi
	movq	(%r14), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	movl	4(%r15), %edi
	callq	_enable_irq
	movl	(%r15), %eax
	movl	8(%r15), %r14d
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	addl	(%rcx), %eax
	setne	%bl
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	(%r15), %eax
	jmp	LBB0_9
LBB0_7:
	movl	4(%r15), %edi
	callq	_disable_irq_nosync
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LPC24XX_STA,4,2                ## @LPC24XX_STA
	.comm	_LPC24XX_I2CONSET,8,3           ## @LPC24XX_I2CONSET
	.comm	_I2C_M_NOSTART,4,2              ## @I2C_M_NOSTART
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_LPC24XX_I2DAT,8,3              ## @LPC24XX_I2DAT
	.comm	_LPC24XX_SI,4,2                 ## @LPC24XX_SI
	.comm	_LPC24XX_I2CONCLR,8,3           ## @LPC24XX_I2CONCLR
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_lpc2k_process_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc2k_process_msg
_lpc2k_process_msg:                     ; @lpc2k_process_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	x19, x0
Lloh0:
	adrp	x20, _LPC24XX_I2CONSET@GOTPAGE
Lloh1:
	ldr	x20, [x20, _LPC24XX_I2CONSET@GOTPAGEOFF]
Lloh2:
	adrp	x21, _LPC24XX_STA@GOTPAGE
Lloh3:
	ldr	x21, [x21, _LPC24XX_STA@GOTPAGEOFF]
	cbz	w1, LBB0_6
; %bb.1:
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _I2C_M_NOSTART@GOTPAGE
Lloh5:
	ldr	x9, [x9, _I2C_M_NOSTART@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	x8, [x19, #32]
	ldr	w9, [x8]
Lloh7:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh8:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x8, #16]
	ldr	w0, [x8]
	ldr	x8, [x19, #16]
Lloh10:
	adrp	x9, _LPC24XX_I2DAT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _LPC24XX_I2DAT@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	b	LBB0_5
LBB0_4:
	ldr	w0, [x21]
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
LBB0_5:
Lloh13:
	adrp	x20, _LPC24XX_I2CONCLR@GOTPAGE
Lloh14:
	ldr	x20, [x20, _LPC24XX_I2CONCLR@GOTPAGEOFF]
Lloh15:
	adrp	x21, _LPC24XX_SI@GOTPAGE
Lloh16:
	ldr	x21, [x21, _LPC24XX_SI@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x21]
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x19, #4]
	bl	_enable_irq
	ldr	w20, [x19, #8]
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _EBUSY@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EBUSY@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmn	w8, w9
	cset	w21, ne
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_wait_event_timeout
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x19]
	b	LBB0_9
LBB0_8:
	ldr	w0, [x19, #4]
	bl	_disable_irq_nosync
Lloh20:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_LPC24XX_STA,4,2                ; @LPC24XX_STA
	.comm	_LPC24XX_I2CONSET,8,3           ; @LPC24XX_I2CONSET
	.comm	_I2C_M_NOSTART,4,2              ; @I2C_M_NOSTART
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_LPC24XX_I2DAT,8,3              ; @LPC24XX_I2DAT
	.comm	_LPC24XX_SI,4,2                 ; @LPC24XX_SI
	.comm	_LPC24XX_I2CONCLR,8,3           ; @LPC24XX_I2CONCLR
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_lpc2k_process_msg
.subsections_via_symbols
