	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_gpt_timer_start
_imx_gpt_timer_start:                   ## @imx_gpt_timer_start
	.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	8(%rdi), %rbx
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movq	_IMX_GPT_OCR2@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_IMX_GPT_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_READ4
	addl	(%rbx), %eax
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_WRITE4
	movq	_GPT_IR_OF2@GOTPCREL(%rip), %rax
	movl	4(%rbx), %edx
	orl	(%rax), %edx
	movl	%edx, 4(%rbx)
	movq	_IMX_GPT_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_WRITE4
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_2:
	testl	%esi, %esi
	je	LBB0_6
## %bb.3:
	movl	4(%rbx), %eax
	movq	_GPT_IR_OF3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, %edx
	jne	LBB0_5
## %bb.4:
	orl	%eax, %edx
	movl	%edx, 4(%rbx)
	movq	_IMX_GPT_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_WRITE4
LBB0_5:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_spinlock_enter
	movq	_IMX_GPT_OCR3@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_IMX_GPT_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_READ4
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_WRITE4
	xorl	%eax, %eax
	callq	_spinlock_exit
	jmp	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMX_GPT_OCR2,4,2               ## @IMX_GPT_OCR2
	.comm	_IMX_GPT_CNT,4,2                ## @IMX_GPT_CNT
	.comm	_GPT_IR_OF2,4,2                 ## @GPT_IR_OF2
	.comm	_IMX_GPT_IR,4,2                 ## @IMX_GPT_IR
	.comm	_GPT_IR_OF3,4,2                 ## @GPT_IR_OF3
	.comm	_IMX_GPT_OCR3,4,2               ## @IMX_GPT_OCR3
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_imx_gpt_timer_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_gpt_timer_start
_imx_gpt_timer_start:                   ; @imx_gpt_timer_start
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0, #8]
	cbz	w2, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _IMX_GPT_OCR2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMX_GPT_OCR2@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _IMX_GPT_CNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IMX_GPT_CNT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x19]
	add	w2, w8, w0
	mov	x0, x19
	mov	x1, x20
	bl	_WRITE4
Lloh6:
	adrp	x8, _GPT_IR_OF2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPT_IR_OF2@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w2, w9, w8
	str	w2, [x19, #4]
Lloh9:
	adrp	x8, _IMX_GPT_IR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IMX_GPT_IR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WRITE4
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	cbz	w1, LBB0_6
; %bb.3:
	ldr	w8, [x19, #4]
Lloh12:
	adrp	x9, _GPT_IR_OF3@GOTPAGE
Lloh13:
	ldr	x9, [x9, _GPT_IR_OF3@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
	orr	w2, w9, w8
	str	w2, [x19, #4]
Lloh15:
	adrp	x8, _IMX_GPT_IR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IMX_GPT_IR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WRITE4
LBB0_5:
	bl	_spinlock_enter
Lloh18:
	adrp	x8, _IMX_GPT_OCR3@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IMX_GPT_OCR3@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
Lloh21:
	adrp	x8, _IMX_GPT_CNT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IMX_GPT_CNT@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_READ4
	mov	x0, x19
	mov	x1, x20
	bl	_WRITE4
	bl	_spinlock_exit
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_IMX_GPT_OCR2,4,2               ; @IMX_GPT_OCR2
	.comm	_IMX_GPT_CNT,4,2                ; @IMX_GPT_CNT
	.comm	_GPT_IR_OF2,4,2                 ; @GPT_IR_OF2
	.comm	_IMX_GPT_IR,4,2                 ; @IMX_GPT_IR
	.comm	_GPT_IR_OF3,4,2                 ; @GPT_IR_OF3
	.comm	_IMX_GPT_OCR3,4,2               ; @IMX_GPT_OCR3
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_imx_gpt_timer_start
.subsections_via_symbols
