	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc32xx_setup_tsc
_lpc32xx_setup_tsc:                     ## @lpc32xx_setup_tsc
	.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	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_clk_prepare_enable
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_LPC32XX_TSC_CON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_tsc_readl
	movq	_LPC32XX_TSC_ADCCON_IRQ_TO_FIFO_4@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	$10, %edi
	callq	_LPC32XX_TSC_ADCCON_X_SAMPLE_SIZE
	movl	%eax, %r15d
	movl	$10, %edi
	callq	_LPC32XX_TSC_ADCCON_Y_SAMPLE_SIZE
	orl	%eax, %r15d
	orl	%r13d, %r15d
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_tsc_writel
	movq	_LPC32XX_TSC_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LPC32XX_TSC_SEL_DEFVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_tsc_writel
	movq	_LPC32XX_TSC_MIN_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LPC32XX_TSC_MIN_XY_VAL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_tsc_writel
	movq	_LPC32XX_TSC_MAX_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LPC32XX_TSC_MAX_XY_VAL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_tsc_writel
	movq	_LPC32XX_TSC_MIN_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_tsc_writel
	movq	_LPC32XX_TSC_MAX_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_tsc_writel
	movq	_LPC32XX_TSC_AUX_UTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_tsc_writel
	movq	_LPC32XX_TSC_AUX_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_tsc_writel
	movq	_LPC32XX_TSC_AUX_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_tsc_writel
	movq	_LPC32XX_TSC_RTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_tsc_writel
	movq	_LPC32XX_TSC_DTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_tsc_writel
	movq	_LPC32XX_TSC_TTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_tsc_writel
	movq	_LPC32XX_TSC_DXP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_tsc_writel
	movq	_LPC32XX_TSC_UTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$88, %edx
	callq	_tsc_writel
	movq	%rbx, %rdi
	callq	_lpc32xx_fifo_clear
	movq	_LPC32XX_TSC_CON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LPC32XX_TSC_ADCCON_AUTO_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_tsc_writel
LBB0_2:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LPC32XX_TSC_CON,4,2            ## @LPC32XX_TSC_CON
	.comm	_LPC32XX_TSC_ADCCON_POWER_UP,4,2 ## @LPC32XX_TSC_ADCCON_POWER_UP
	.comm	_LPC32XX_TSC_ADCCON_IRQ_TO_FIFO_4,4,2 ## @LPC32XX_TSC_ADCCON_IRQ_TO_FIFO_4
	.comm	_LPC32XX_TSC_SEL,4,2            ## @LPC32XX_TSC_SEL
	.comm	_LPC32XX_TSC_SEL_DEFVAL,4,2     ## @LPC32XX_TSC_SEL_DEFVAL
	.comm	_LPC32XX_TSC_MIN_X,4,2          ## @LPC32XX_TSC_MIN_X
	.comm	_LPC32XX_TSC_MIN_XY_VAL,4,2     ## @LPC32XX_TSC_MIN_XY_VAL
	.comm	_LPC32XX_TSC_MAX_X,4,2          ## @LPC32XX_TSC_MAX_X
	.comm	_LPC32XX_TSC_MAX_XY_VAL,4,2     ## @LPC32XX_TSC_MAX_XY_VAL
	.comm	_LPC32XX_TSC_MIN_Y,4,2          ## @LPC32XX_TSC_MIN_Y
	.comm	_LPC32XX_TSC_MAX_Y,4,2          ## @LPC32XX_TSC_MAX_Y
	.comm	_LPC32XX_TSC_AUX_UTR,4,2        ## @LPC32XX_TSC_AUX_UTR
	.comm	_LPC32XX_TSC_AUX_MIN,4,2        ## @LPC32XX_TSC_AUX_MIN
	.comm	_LPC32XX_TSC_AUX_MAX,4,2        ## @LPC32XX_TSC_AUX_MAX
	.comm	_LPC32XX_TSC_RTR,4,2            ## @LPC32XX_TSC_RTR
	.comm	_LPC32XX_TSC_DTR,4,2            ## @LPC32XX_TSC_DTR
	.comm	_LPC32XX_TSC_TTR,4,2            ## @LPC32XX_TSC_TTR
	.comm	_LPC32XX_TSC_DXP,4,2            ## @LPC32XX_TSC_DXP
	.comm	_LPC32XX_TSC_UTR,4,2            ## @LPC32XX_TSC_UTR
	.comm	_LPC32XX_TSC_ADCCON_AUTO_EN,4,2 ## @LPC32XX_TSC_ADCCON_AUTO_EN
	.no_dead_strip	_lpc32xx_setup_tsc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc32xx_setup_tsc
_lpc32xx_setup_tsc:                     ; @lpc32xx_setup_tsc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	ldr	w0, [x0]
	bl	_clk_prepare_enable
	mov	x19, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x22, _LPC32XX_TSC_CON@GOTPAGE
Lloh1:
	ldr	x22, [x22, _LPC32XX_TSC_CON@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_tsc_readl
Lloh2:
	adrp	x8, _LPC32XX_TSC_ADCCON_IRQ_TO_FIFO_4@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LPC32XX_TSC_ADCCON_IRQ_TO_FIFO_4@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	mov	w0, #10
	bl	_LPC32XX_TSC_ADCCON_X_SAMPLE_SIZE
	orr	w21, w0, w21
	mov	w0, #10
	bl	_LPC32XX_TSC_ADCCON_Y_SAMPLE_SIZE
	orr	w21, w21, w0
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x21
	bl	_tsc_writel
Lloh5:
	adrp	x8, _LPC32XX_TSC_SEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LPC32XX_TSC_SEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _LPC32XX_TSC_SEL_DEFVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LPC32XX_TSC_SEL_DEFVAL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_tsc_writel
Lloh11:
	adrp	x8, _LPC32XX_TSC_MIN_X@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LPC32XX_TSC_MIN_X@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x23, _LPC32XX_TSC_MIN_XY_VAL@GOTPAGE
Lloh15:
	ldr	x23, [x23, _LPC32XX_TSC_MIN_XY_VAL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	bl	_tsc_writel
Lloh16:
	adrp	x8, _LPC32XX_TSC_MAX_X@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LPC32XX_TSC_MAX_X@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x24, _LPC32XX_TSC_MAX_XY_VAL@GOTPAGE
Lloh20:
	ldr	x24, [x24, _LPC32XX_TSC_MAX_XY_VAL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	bl	_tsc_writel
Lloh21:
	adrp	x8, _LPC32XX_TSC_MIN_Y@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LPC32XX_TSC_MIN_Y@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	w2, [x23]
	mov	x0, x20
	bl	_tsc_writel
Lloh24:
	adrp	x8, _LPC32XX_TSC_MAX_Y@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LPC32XX_TSC_MAX_Y@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	ldr	w2, [x24]
	mov	x0, x20
	bl	_tsc_writel
Lloh27:
	adrp	x8, _LPC32XX_TSC_AUX_UTR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LPC32XX_TSC_AUX_UTR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_tsc_writel
Lloh30:
	adrp	x8, _LPC32XX_TSC_AUX_MIN@GOTPAGE
Lloh31:
	ldr	x8, [x8, _LPC32XX_TSC_AUX_MIN@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_tsc_writel
Lloh33:
	adrp	x8, _LPC32XX_TSC_AUX_MAX@GOTPAGE
Lloh34:
	ldr	x8, [x8, _LPC32XX_TSC_AUX_MAX@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_tsc_writel
Lloh36:
	adrp	x8, _LPC32XX_TSC_RTR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _LPC32XX_TSC_RTR@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #2
	bl	_tsc_writel
Lloh39:
	adrp	x8, _LPC32XX_TSC_DTR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _LPC32XX_TSC_DTR@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #2
	bl	_tsc_writel
Lloh42:
	adrp	x8, _LPC32XX_TSC_TTR@GOTPAGE
Lloh43:
	ldr	x8, [x8, _LPC32XX_TSC_TTR@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #16
	bl	_tsc_writel
Lloh45:
	adrp	x8, _LPC32XX_TSC_DXP@GOTPAGE
Lloh46:
	ldr	x8, [x8, _LPC32XX_TSC_DXP@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #4
	bl	_tsc_writel
Lloh48:
	adrp	x8, _LPC32XX_TSC_UTR@GOTPAGE
Lloh49:
	ldr	x8, [x8, _LPC32XX_TSC_UTR@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #88
	bl	_tsc_writel
	mov	x0, x20
	bl	_lpc32xx_fifo_clear
	ldr	w1, [x22]
Lloh51:
	adrp	x8, _LPC32XX_TSC_ADCCON_AUTO_EN@GOTPAGE
Lloh52:
	ldr	x8, [x8, _LPC32XX_TSC_ADCCON_AUTO_EN@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	orr	w2, w8, w21
	mov	x0, x20
	bl	_tsc_writel
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_LPC32XX_TSC_CON,4,2            ; @LPC32XX_TSC_CON
	.comm	_LPC32XX_TSC_ADCCON_POWER_UP,4,2 ; @LPC32XX_TSC_ADCCON_POWER_UP
	.comm	_LPC32XX_TSC_ADCCON_IRQ_TO_FIFO_4,4,2 ; @LPC32XX_TSC_ADCCON_IRQ_TO_FIFO_4
	.comm	_LPC32XX_TSC_SEL,4,2            ; @LPC32XX_TSC_SEL
	.comm	_LPC32XX_TSC_SEL_DEFVAL,4,2     ; @LPC32XX_TSC_SEL_DEFVAL
	.comm	_LPC32XX_TSC_MIN_X,4,2          ; @LPC32XX_TSC_MIN_X
	.comm	_LPC32XX_TSC_MIN_XY_VAL,4,2     ; @LPC32XX_TSC_MIN_XY_VAL
	.comm	_LPC32XX_TSC_MAX_X,4,2          ; @LPC32XX_TSC_MAX_X
	.comm	_LPC32XX_TSC_MAX_XY_VAL,4,2     ; @LPC32XX_TSC_MAX_XY_VAL
	.comm	_LPC32XX_TSC_MIN_Y,4,2          ; @LPC32XX_TSC_MIN_Y
	.comm	_LPC32XX_TSC_MAX_Y,4,2          ; @LPC32XX_TSC_MAX_Y
	.comm	_LPC32XX_TSC_AUX_UTR,4,2        ; @LPC32XX_TSC_AUX_UTR
	.comm	_LPC32XX_TSC_AUX_MIN,4,2        ; @LPC32XX_TSC_AUX_MIN
	.comm	_LPC32XX_TSC_AUX_MAX,4,2        ; @LPC32XX_TSC_AUX_MAX
	.comm	_LPC32XX_TSC_RTR,4,2            ; @LPC32XX_TSC_RTR
	.comm	_LPC32XX_TSC_DTR,4,2            ; @LPC32XX_TSC_DTR
	.comm	_LPC32XX_TSC_TTR,4,2            ; @LPC32XX_TSC_TTR
	.comm	_LPC32XX_TSC_DXP,4,2            ; @LPC32XX_TSC_DXP
	.comm	_LPC32XX_TSC_UTR,4,2            ; @LPC32XX_TSC_UTR
	.comm	_LPC32XX_TSC_ADCCON_AUTO_EN,4,2 ; @LPC32XX_TSC_ADCCON_AUTO_EN
	.no_dead_strip	_lpc32xx_setup_tsc
.subsections_via_symbols
