	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scratch_mark_header
_scratch_mark_header:                   ## @scratch_mark_header
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_DBG_SCRATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_PDEBUG
	movl	8(%rbx), %ecx
	movq	16(%rbx), %rdx
	movq	(%rbx), %rax
	movl	%ecx, (%rdx,%rax,4)
	incq	%rax
	movq	_USBVISION_NUM_HEADERMARKER@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	movq	%rdx, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DBG_SCRATCH,4,2                ## @DBG_SCRATCH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"header at write_ptr=%d\n"

	.comm	_USBVISION_NUM_HEADERMARKER,4,2 ## @USBVISION_NUM_HEADERMARKER
	.no_dead_strip	_scratch_mark_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scratch_mark_header
_scratch_mark_header:                   ; @scratch_mark_header
	.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	x19, x0
Lloh0:
	adrp	x8, _DBG_SCRATCH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DBG_SCRATCH@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x2, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
	ldr	w8, [x19, #8]
	ldr	x9, [x19, #16]
	ldr	x10, [x19]
	str	w8, [x9, x10, lsl #2]
	add	x8, x10, #1
Lloh5:
	adrp	x9, _USBVISION_NUM_HEADERMARKER@GOTPAGE
Lloh6:
	ldr	x9, [x9, _USBVISION_NUM_HEADERMARKER@GOTPAGEOFF]
Lloh7:
	ldrsw	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG_SCRATCH,4,2                ; @DBG_SCRATCH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"header at write_ptr=%d\n"

	.comm	_USBVISION_NUM_HEADERMARKER,4,2 ; @USBVISION_NUM_HEADERMARKER
	.no_dead_strip	_scratch_mark_header
.subsections_via_symbols
