	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nes_nic_init_timer
_nes_nic_init_timer:                    ## @nes_nic_init_timer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	16(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	16(%rbx), %ecx
	jmp	LBB0_3
LBB0_2:
	movq	$0, 8(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movq	_NES_NIC_FAST_TIMER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rbx)
	movq	$0, 8(%rbx)
LBB0_3:
	movslq	%ecx, %rsi
	cmpq	%rsi, %rax
	je	LBB0_5
## %bb.4:
	movq	%rsi, 8(%rbx)
	movq	_NES_PERIODIC_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	shll	$3, %esi
	orl	$-2147483648, %esi              ## imm = 0x80000000
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_nes_write32
LBB0_5:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NES_NIC_FAST_TIMER,4,2         ## @NES_NIC_FAST_TIMER
	.comm	_NES_PERIODIC_CONTROL,8,3       ## @NES_PERIODIC_CONTROL
	.no_dead_strip	_nes_nic_init_timer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nes_nic_init_timer
_nes_nic_init_timer:                    ; @nes_nic_init_timer
	.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
	mov	x20, x0
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w9, [x19, #16]
	b	LBB0_3
LBB0_2:
	str	xzr, [x20, #8]
	stp	xzr, xzr, [x19, #24]
Lloh0:
	adrp	x9, _NES_NIC_FAST_TIMER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NES_NIC_FAST_TIMER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x19, #16]
	str	xzr, [x19, #8]
LBB0_3:
	sxtw	x9, w9
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	str	x9, [x19, #8]
	ldr	x8, [x20]
Lloh3:
	adrp	x10, _NES_PERIODIC_CONTROL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NES_PERIODIC_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	add	x0, x10, x8
	lsl	w8, w9, #3
	orr	w1, w8, #0x80000000
	bl	_nes_write32
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NES_NIC_FAST_TIMER,4,2         ; @NES_NIC_FAST_TIMER
	.comm	_NES_PERIODIC_CONTROL,8,3       ; @NES_PERIODIC_CONTROL
	.no_dead_strip	_nes_nic_init_timer
.subsections_via_symbols
