	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _bus_dmamap_addseg
__bus_dmamap_addseg:                    ## @_bus_dmamap_addseg
	.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
                                        ## kill: def $edx killed $edx def $rdx
	movl	(%rdi), %eax
	movl	%eax, %r10d
	negl	%r10d
	testl	%eax, %eax
	jle	LBB0_2
## %bb.1:
	leal	(%rax,%rdx), %esi
	andl	%r10d, %esi
	subl	%edx, %esi
	cmpl	%ecx, %esi
	cmovll	%esi, %ecx
LBB0_2:
	movslq	(%r9), %rsi
	cmpq	$-1, %rsi
	je	LBB0_3
## %bb.4:
	movl	(%r8,%rsi,8), %r14d
	movl	4(%r8,%rsi,8), %r11d
	leal	(%r11,%r14), %ebx
	cmpl	%edx, %ebx
	jne	LBB0_9
## %bb.5:
	addl	%ecx, %r11d
	cmpl	4(%rdi), %r11d
	jg	LBB0_9
## %bb.6:
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	xorl	%edx, %r14d
	testl	%r10d, %r14d
	je	LBB0_8
LBB0_9:
	leal	1(%rsi), %ebx
	xorl	%eax, %eax
	cmpl	8(%rdi), %ebx
	jge	LBB0_12
## %bb.10:
	movl	%edx, 8(%r8,%rsi,8)
	movl	%ecx, 12(%r8,%rsi,8)
	jmp	LBB0_11
LBB0_3:
	movl	%edx, (%r8)
	movl	%ecx, 4(%r8)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movl	%r11d, 4(%r8,%rsi,8)
	movl	%esi, %ebx
LBB0_11:
	movl	%ebx, (%r9)
	movl	%ecx, %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	__bus_dmamap_addseg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _bus_dmamap_addseg
__bus_dmamap_addseg:                    ; @_bus_dmamap_addseg
	.cfi_startproc
; %bb.0:
	mov	x8, x0
	ldr	w11, [x0]
	neg	w10, w11
	add	w9, w11, w2
	and	w9, w9, w10
	sub	w9, w9, w2
	cmp	w9, w3
	csel	w9, w9, w3, lt
	cmp	w11, #1
	csel	w0, w3, w9, lt
	ldr	w9, [x5]
	cmn	w9, #1
	b.eq	LBB0_7
; %bb.1:
	sxtw	x12, w9
	lsl	x13, x12, #3
	add	x12, x4, x13
	ldr	w13, [x4, x13]
	ldr	w14, [x12, #4]!
	add	w15, w14, w13
	cmp	w15, w2
	b.ne	LBB0_5
; %bb.2:
	ldr	w15, [x8, #4]
	add	w14, w14, w0
	cmp	w14, w15
	b.gt	LBB0_5
; %bb.3:
	cbz	w11, LBB0_9
; %bb.4:
	eor	w11, w13, w2
	tst	w11, w10
	b.eq	LBB0_9
LBB0_5:
	add	w9, w9, #1
	ldr	w8, [x8, #8]
	cmp	w9, w8
	b.ge	LBB0_8
; %bb.6:
	add	x8, x4, w9, sxtw #3
	stp	w2, w0, [x8]
	str	w9, [x5]
	ret
LBB0_7:
	mov	w9, #0
	stp	w2, w0, [x4]
	str	w9, [x5]
	ret
LBB0_8:
	mov	w0, #0
	ret
LBB0_9:
	str	w14, [x12]
	str	w9, [x5]
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	__bus_dmamap_addseg
.subsections_via_symbols
