	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vb2_dma_sg_dmabuf_ops_attach
_vb2_dma_sg_dmabuf_ops_attach:          ## @vb2_dma_sg_dmabuf_ops_attach
	.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, %r13
	movq	(%rdi), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %r12
	addq	$8, %r12
	movq	(%r14), %rax
	movl	8(%rax), %esi
	movl	(%rbx), %edx
	movq	%r12, %rdi
	callq	_sg_alloc_table
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_kfree
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_4:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r12)
	je	LBB0_7
## %bb.5:
	movq	16(%r15), %r13
	movq	(%r14), %rax
	movq	(%rax), %rbx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_sg_page
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sg_set_page
	movq	%rbx, %rdi
	callq	_sg_next
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_sg_next
	movq	%rax, %r13
	incl	%r14d
	cmpl	(%r12), %r14d
	jb	LBB0_6
LBB0_7:
	movq	_DMA_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_NONE,4,2                   ## @DMA_NONE
	.no_dead_strip	_vb2_dma_sg_dmabuf_ops_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vb2_dma_sg_dmabuf_ops_attach
_vb2_dma_sg_dmabuf_ops_attach:          ; @vb2_dma_sg_dmabuf_ops_attach
	.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, x1
	ldr	x23, [x0]
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	add	x21, x0, #8
	ldr	x8, [x23]
	ldr	w1, [x8, #8]
	ldr	w2, [x22]
	mov	x0, x21
	bl	_sg_alloc_table
	cbz	w0, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_kfree
LBB0_3:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_4:
	ldr	w8, [x21]
	cbz	w8, LBB0_7
; %bb.5:
	mov	w24, #0
	ldr	x22, [x20, #16]
	ldr	x8, [x23]
	ldr	x23, [x8]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_sg_page
	mov	x1, x0
	ldp	w3, w2, [x23]
	mov	x0, x22
	bl	_sg_set_page
	mov	x0, x23
	bl	_sg_next
	mov	x23, x0
	mov	x0, x22
	bl	_sg_next
	mov	x22, x0
	add	w24, w24, #1
	ldr	w8, [x21]
	cmp	w24, w8
	b.lo	LBB0_6
LBB0_7:
	mov	w0, #0
Lloh5:
	adrp	x8, _DMA_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA_NONE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x20]
	str	x20, [x19]
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_NONE,4,2                   ; @DMA_NONE
	.no_dead_strip	_vb2_dma_sg_dmabuf_ops_attach
.subsections_via_symbols
