	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mock_map_dma_buf
_mock_map_dma_buf:                      ## @mock_map_dma_buf
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	callq	_to_mock
	movq	%rax, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	(%r13), %esi
	movl	(%rbx), %edx
	movq	%rax, %rdi
	callq	_sg_alloc_table
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
LBB0_8:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	cmpl	$0, (%r13)
	jle	LBB0_6
## %bb.4:
	movq	8(%r12), %rbx
	xorl	%r14d, %r14d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%r14,4), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_sg_set_page
	movq	%rbx, %rdi
	callq	_sg_next
	movq	%rax, %rbx
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jl	LBB0_5
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	8(%r12), %rsi
	movl	(%r12), %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_dma_map_sg
	testl	%eax, %eax
	je	LBB0_7
## %bb.10:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_sg_free_table
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_mock_map_dma_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mock_map_dma_buf
_mock_map_dma_buf:                      ; @mock_map_dma_buf
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_to_mock
	mov	x22, x0
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w1, [x22]
	ldr	w2, [x23]
	bl	_sg_alloc_table
	mov	x23, x0
	cbz	w0, LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_kfree
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_5:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x24, #0
	ldr	x23, [x19, #8]
Lloh5:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w1, [x8, x24, lsl #2]
	ldr	w2, [x25]
	mov	x0, x23
	mov	w3, #0
	bl	_sg_set_page
	mov	x0, x23
	bl	_sg_next
	mov	x23, x0
	add	x24, x24, #1
	ldrsw	x8, [x22]
	cmp	x24, x8
	b.lt	LBB0_7
LBB0_8:
	ldr	w0, [x21]
	ldr	x1, [x19, #8]
	ldr	w2, [x19]
	mov	x3, x20
	bl	_dma_map_sg
	cbz	w0, LBB0_10
; %bb.9:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
	mov	x0, x19
	bl	_sg_free_table
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_mock_map_dma_buf
.subsections_via_symbols
