	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_dma_desc_size_pos
_bcm2835_dma_desc_size_pos:             ## @bcm2835_dma_desc_size_pos
	.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
	movl	(%rdi), %r9d
	testq	%r9, %r9
	je	LBB0_1
## %bb.2:
	movq	8(%rdi), %r8
	movq	16(%rdi), %r10
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%rdi, %rax
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	cmpq	%rcx, %r9
	je	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edx, %edx
	cmpq	%r11, %r8
	setne	%r14b
	movq	(%r10,%rcx,8), %rbx
	movq	(%rbx), %rdi
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	%r14b, %dl
	movq	8(%rbx,%rdx,8), %rdx
	cmpq	%rsi, %rdx
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%rdi, %rdx
	subq	%rsi, %rdx
	movl	$0, %eax
	cmovaeq	%rdx, %rax
	jmp	LBB0_8
LBB0_1:
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_DEV_TO_MEM,8,3             ## @DMA_DEV_TO_MEM
	.no_dead_strip	_bcm2835_dma_desc_size_pos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm2835_dma_desc_size_pos
_bcm2835_dma_desc_size_pos:             ; @bcm2835_dma_desc_size_pos
	.cfi_startproc
; %bb.0:
	ldr	w9, [x0]
	cbz	w9, LBB0_4
; %bb.1:
	mov	x8, x0
	mov	x0, #0
	ldp	x8, x10, [x8, #8]
Lloh0:
	adrp	x11, _DMA_DEV_TO_MEM@GOTPAGE
Lloh1:
	ldr	x11, [x11, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	mov	w12, #16
	mov	w13, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x10], #8
	ldr	x15, [x14]
	cmp	x8, x11
	csel	x16, x13, x12, eq
	ldr	x14, [x14, x16]
	add	x16, x14, x15
	subs	x16, x16, x1
	csel	x16, xzr, x16, lo
	cmp	x14, x1
	csel	x14, xzr, x16, gt
	add	x15, x15, x0
	cmp	x0, #0
	csel	x0, x14, x15, eq
	subs	x9, x9, #1
	b.ne	LBB0_2
; %bb.3:
	ret
LBB0_4:
	mov	x0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_DEV_TO_MEM,8,3             ; @DMA_DEV_TO_MEM
	.no_dead_strip	_bcm2835_dma_desc_size_pos
.subsections_via_symbols
