	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2o_dma_map_sg                 ## -- Begin function i2o_dma_map_sg
	.p2align	4, 0x90
_i2o_dma_map_sg:                        ## @i2o_dma_map_sg
	.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
	movq	%rsi, %r15
	movq	(%r8), %r13
	xorl	%r12d, %r12d
	cmpl	$128, %ecx
	je	LBB0_1
## %bb.2:
	cmpl	$129, %ecx
	jne	LBB0_9
## %bb.3:
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	$268435456, %r14d               ## imm = 0x10000000
	jmp	LBB0_4
LBB0_1:
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	$335544320, %r14d               ## imm = 0x14000000
LBB0_4:
	movq	8(%rdi), %rdi
	movq	%r15, %rsi
	callq	_dma_map_sg
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	jle	LBB0_8
## %bb.6:
	movl	%eax, %ebx
	incl	%ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %eax
	orl	$-1073741824, %eax              ## imm = 0xC0000000
	cmpl	$2, %ebx
	cmovel	%eax, %r14d
	movq	%r15, %rdi
	callq	_sg_dma_len
	orl	%r14d, %eax
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, (%r13)
	movq	%r15, %rdi
	callq	_sg_dma_address
	movl	%eax, %edi
	callq	_i2o_dma_low
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%r13)
	addq	$8, %r13
	movq	%r15, %rdi
	callq	_sg_next
	movq	%rax, %r15
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_7
LBB0_8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movl	$1, %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2o_dma_map_sg                 ; -- Begin function i2o_dma_map_sg
	.p2align	2
_i2o_dma_map_sg:                        ; @i2o_dma_map_sg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x4
	mov	x20, x1
	ldr	x21, [x4]
	cmp	w3, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w3, #129
	b.ne	LBB0_10
; %bb.2:
	mov	w22, #268435456
	b	LBB0_4
LBB0_3:
	mov	w22, #335544320
LBB0_4:
	ldr	x0, [x0, #8]
	mov	x1, x20
	bl	_dma_map_sg
	cbz	w0, LBB0_11
; %bb.5:
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.6:
	add	w23, w0, #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	orr	w8, w22, #0xc0000000
	cmp	w23, #2
	csel	w22, w8, w22, eq
	mov	x0, x20
	bl	_sg_dma_len
	orr	w0, w0, w22
	bl	_cpu_to_le32
	str	w0, [x21]
	mov	x0, x20
	bl	_sg_dma_address
	bl	_i2o_dma_low
	bl	_cpu_to_le32
	add	x24, x21, #8
	str	w0, [x21, #4]
	mov	x0, x20
	bl	_sg_next
	mov	x20, x0
	sub	w23, w23, #1
	mov	x21, x24
	cmp	w23, #1
	b.hi	LBB0_7
; %bb.8:
	mov	x21, x24
LBB0_9:
	str	x21, [x19]
	mov	w0, #1
	b	LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
