	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_systimer_start
_bcm_systimer_start:                    ## @bcm_systimer_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	%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
	testl	%esi, %esi
	je	LBB0_4
## %bb.1:
	movq	8(%rdi), %r15
	xorl	%eax, %eax
	callq	_intr_disable
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SYSTIMER_CLO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_bcm_systimer_tc_read_4
	movl	%eax, %ebx
	movq	_SYSTIMER_CS@GOTPCREL(%rip), %r13
	movq	_SYSTIMER_C0@GOTPCREL(%rip), %r14
                                        ## implicit-def: $r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	addl	%r12d, %ebx
	movq	(%r13), %rdi
	movzbl	(%r15), %ecx
	movl	$1, %esi
	shll	%cl, %esi
	callq	_bcm_systimer_tc_write_4
	movslq	(%r15), %rdi
	shlq	$2, %rdi
	addq	(%r14), %rdi
	movl	%ebx, %esi
	callq	_bcm_systimer_tc_write_4
	movq	_SYSTIMER_CLO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_bcm_systimer_tc_read_4
	addl	%r12d, %r12d
	cmpl	%ebx, %eax
	movl	%eax, %ebx
	jge	LBB0_2
## %bb.3:
	movl	$1, 4(%r15)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_intr_restore
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYSTIMER_CLO,4,2               ## @SYSTIMER_CLO
	.comm	_SYSTIMER_CS,8,3                ## @SYSTIMER_CS
	.comm	_SYSTIMER_C0,8,3                ## @SYSTIMER_C0
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_bcm_systimer_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_systimer_start
_bcm_systimer_start:                    ; @bcm_systimer_start
	.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
	cbz	w1, LBB0_4
; %bb.1:
	ldr	x21, [x0, #8]
	bl	_intr_disable
	mov	x19, x0
Lloh0:
	adrp	x22, _SYSTIMER_CLO@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SYSTIMER_CLO@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_bcm_systimer_tc_read_4
Lloh2:
	adrp	x23, _SYSTIMER_CS@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SYSTIMER_CS@GOTPAGEOFF]
	mov	w24, #1
Lloh4:
	adrp	x25, _SYSTIMER_C0@GOTPAGE
Lloh5:
	ldr	x25, [x25, _SYSTIMER_C0@GOTPAGEOFF]
                                        ; implicit-def: $w26
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w20, w26, w0
	ldr	x0, [x23]
	ldr	w8, [x21]
	lsl	w1, w24, w8
	bl	_bcm_systimer_tc_write_4
	ldr	x8, [x25]
	ldrsw	x9, [x21]
	add	x0, x8, x9, lsl #2
	mov	x1, x20
	bl	_bcm_systimer_tc_write_4
	ldr	w0, [x22]
	bl	_bcm_systimer_tc_read_4
	lsl	w26, w26, #1
	cmp	w0, w20
	b.ge	LBB0_2
; %bb.3:
	mov	w8, #1
	str	w8, [x21, #4]
	mov	x0, x19
	bl	_intr_restore
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_5:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SYSTIMER_CLO,4,2               ; @SYSTIMER_CLO
	.comm	_SYSTIMER_CS,8,3                ; @SYSTIMER_CS
	.comm	_SYSTIMER_C0,8,3                ; @SYSTIMER_C0
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_bcm_systimer_start
.subsections_via_symbols
