	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fw_device_op_mmap
_fw_device_op_mmap:                     ## @fw_device_op_mmap
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %r12
	movq	8(%r12), %rdi
	callq	_fw_device_is_shutdown
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	cmpq	$0, 16(%r12)
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movl	(%r14), %eax
	movq	_VM_SHARED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.7:
	movl	4(%r14), %edx
	movq	_PAGE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	testl	%esi, %edx
	jne	LBB0_6
## %bb.8:
	movslq	%edx, %rsi
	movl	%esi, (%r12)
	movq	8(%r14), %rdx
	subq	%rsi, %rdx
	movslq	(%rcx), %rcx
	notq	%rcx
	testq	%rcx, %rdx
	je	LBB0_9
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rdx
	leaq	16(%r12), %r15
	movq	_VM_WRITE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	jne	LBB0_10
## %bb.11:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %ecx
	movq	8(%r12), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_fw_iso_buffer_init
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_fw_iso_buffer_map
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_16
## %bb.15:
	movq	8(%r12), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_fw_iso_buffer_destroy
	jmp	LBB0_16
LBB0_13:
	movl	%eax, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_VM_SHARED,4,2                  ## @VM_SHARED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_VM_WRITE,4,2                   ## @VM_WRITE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_fw_device_op_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fw_device_op_mmap
_fw_device_op_mmap:                     ; @fw_device_op_mmap
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	x22, [x0]
	ldr	x0, [x22, #8]
	bl	_fw_device_is_shutdown
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	mov	x20, x22
	ldr	x8, [x20, #16]!
	cbz	x8, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _VM_SHARED@GOTPAGE
Lloh5:
	ldr	x9, [x9, _VM_SHARED@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
	ldr	w10, [x19, #4]
Lloh7:
	adrp	x9, _PAGE_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PAGE_MASK@GOTPAGEOFF]
	ldr	w11, [x9]
	bics	wzr, w10, w11
	b.ne	LBB0_7
; %bb.6:
	sxtw	x11, w10
	str	w10, [x22]
	ldr	x10, [x19, #8]
	sub	x10, x10, x11
	ldr	w9, [x9]
	mvn	w9, w9
	sxtw	x9, w9
	tst	x10, x9
	b.eq	LBB0_10
LBB0_7:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh11:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	lsr	x2, x10, x9
Lloh14:
	adrp	x9, _VM_WRITE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _VM_WRITE@GOTPAGEOFF]
Lloh16:
	adrp	x10, _DMA_FROM_DEVICE@GOTPAGE
Lloh17:
	ldr	x10, [x10, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh18:
	adrp	x11, _DMA_TO_DEVICE@GOTPAGE
Lloh19:
	ldr	x11, [x11, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w3, [x8]
	ldr	x8, [x22, #8]
	ldr	w1, [x8]
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_fw_iso_buffer_init
	tbnz	w0, #31, LBB0_13
; %bb.11:
	mov	x0, x20
	mov	x1, x19
	bl	_fw_iso_buffer_map
	mov	x21, x0
	tbz	w0, #31, LBB0_9
; %bb.12:
	ldr	x8, [x22, #8]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fw_iso_buffer_destroy
	b	LBB0_9
LBB0_13:
	mov	x21, x0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh20
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_VM_SHARED,4,2                  ; @VM_SHARED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_VM_WRITE,4,2                   ; @VM_WRITE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_fw_device_op_mmap
.subsections_via_symbols
