	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idt_ntb_peer_mw_set_trans
_idt_ntb_peer_mw_set_trans:             ## @idt_ntb_peer_mw_set_trans
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	callq	_to_ndev_ntb
	testl	%r13d, %r13d
	js	LBB0_2
## %bb.1:
	movq	%rax, %r12
	cmpl	%r13d, (%rax)
	jle	LBB0_2
## %bb.3:
	testl	%r14d, %r14d
	js	LBB0_2
## %bb.4:
	cmpl	%r14d, 4(%r12)
	jle	LBB0_2
## %bb.5:
	movq	24(%r12), %rcx
	movl	%r14d, %eax
	movslq	-64(%rbp), %rdi                 ## 4-byte Folded Reload
	leaq	(%rax,%rax,4), %rax
	movq	%rcx, %r14
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	36(%rcx,%rax,8), %esi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_2
## %bb.6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	32(%r14,%rax,8), %esi
	movq	%r15, %rdi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_2
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%r15, (%r14,%rax,8)
	jge	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%r14,%rax,8), %rax
	movq	_IDT_MW_DIR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.9:
	movq	_ntdata_tbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%r14,%rcx,8), %r14
	shlq	$4, %r14
	movl	12(%rax,%r14), %esi
	movq	%r12, %rdi
	callq	_idt_nt_read
	movq	_BARSETUP_TPART@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	16(%r12), %rcx
	movl	%r13d, %edx
	movq	(%rcx,%rdx,8), %rdx
	movl	%eax, %esi
	callq	_SET_FIELD
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movl	12(%r13,%r14), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_idt_nt_write
	movl	8(%r13,%r14), %esi
	movq	%r12, %rdi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	callq	_idt_nt_write
	movl	4(%r13,%r14), %esi
	movq	%r12, %rdi
	callq	_idt_nt_write
	movl	(%rbx), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx,%rax,8), %rsi
	callq	_pci_bus_address
	addl	%eax, %r15d
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	(%r13,%r14), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_idt_nt_write
	movq	_BARSETUP_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	$64, %edx
	callq	_IS_FLD_SET
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	addq	-64(%rbp), %r13                 ## 8-byte Folded Reload
	movl	16(%r13), %esi
	movq	%r12, %rdi
	callq	_idt_nt_write
	jmp	LBB0_12
LBB0_11:
	movq	_LUTOFFSET_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	24(%r14,%r15,8), %rdx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_SET_FIELD
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_LUTOFFSET_BAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14,%r15,8), %rdx
	xorl	%esi, %esi
	callq	_SET_FIELD
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	orl	%eax, %r14d
	movq	_LUTUDATA_PART@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r12), %rax
	movl	%r13d, %ecx
	movq	(%rax,%rcx,8), %rdx
	xorl	%esi, %esi
	callq	_SET_FIELD
	movl	%eax, %r13d
	movq	_IDT_LUTUDATA_VALID@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	%r12, %r15
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_IDT_NT_LUTOFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_idt_nt_write
	movq	_IDT_NT_LUTLDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	callq	_idt_nt_write
	movq	_IDT_NT_LUTMDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_idt_nt_write
	movq	_IDT_NT_LUTUDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_idt_nt_write
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IDT_MW_DIR,8,3                 ## @IDT_MW_DIR
	.comm	_ntdata_tbl,8,3                 ## @ntdata_tbl
	.comm	_BARSETUP_TPART,4,2             ## @BARSETUP_TPART
	.comm	_BARSETUP_TYPE,4,2              ## @BARSETUP_TYPE
	.comm	_LUTOFFSET_INDEX,4,2            ## @LUTOFFSET_INDEX
	.comm	_LUTOFFSET_BAR,4,2              ## @LUTOFFSET_BAR
	.comm	_LUTUDATA_PART,4,2              ## @LUTUDATA_PART
	.comm	_IDT_LUTUDATA_VALID,4,2         ## @IDT_LUTUDATA_VALID
	.comm	_IDT_NT_LUTOFFSET,4,2           ## @IDT_NT_LUTOFFSET
	.comm	_IDT_NT_LUTLDATA,4,2            ## @IDT_NT_LUTLDATA
	.comm	_IDT_NT_LUTMDATA,4,2            ## @IDT_NT_LUTMDATA
	.comm	_IDT_NT_LUTUDATA,4,2            ## @IDT_NT_LUTUDATA
	.no_dead_strip	_idt_ntb_peer_mw_set_trans
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function idt_ntb_peer_mw_set_trans
_idt_ntb_peer_mw_set_trans:             ; @idt_ntb_peer_mw_set_trans
	.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	x21, x4
	mov	x20, x3
	mov	x24, x2
	mov	x22, x1
	mov	x23, x0
	bl	_to_ndev_ntb
	tbnz	w22, #31, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, w22
	b.le	LBB0_7
; %bb.2:
	tbnz	w24, #31, LBB0_7
; %bb.3:
	ldr	w8, [x19, #4]
	cmp	w8, w24
	b.le	LBB0_7
; %bb.4:
	ldr	x25, [x19, #24]
	sxtw	x0, w20
	mov	w8, #40
	umaddl	x8, w24, w8, x25
	ldr	w1, [x8, #36]
	bl	_IS_ALIGNED
	cbz	w0, LBB0_7
; %bb.5:
	mov	w24, w24
	mov	w8, #40
	madd	x8, x24, x8, x25
	ldr	w1, [x8, #32]
	mov	x0, x21
	bl	_IS_ALIGNED
	cbz	w0, LBB0_7
; %bb.6:
	mov	w8, #40
	mul	x8, x24, x8
	ldr	x8, [x25, x8]
	cmp	x8, x21
	b.ge	LBB0_9
LBB0_7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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_9:
	mov	w8, #40
	madd	x8, x24, x8, x25
	ldr	x8, [x8, #8]
Lloh3:
	adrp	x9, _IDT_MW_DIR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IDT_MW_DIR@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
Lloh6:
	adrp	x8, _ntdata_tbl@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ntdata_tbl@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	mov	w9, #40
	madd	x25, x24, x9, x25
	ldr	x9, [x25, #16]
	add	x24, x8, x9, lsl #4
	ldr	w1, [x24, #12]
	mov	x0, x19
	bl	_idt_nt_read
	mov	x1, x0
Lloh9:
	adrp	x8, _BARSETUP_TPART@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BARSETUP_TPART@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x8, [x19, #16]
	ldr	x2, [x8, w22, uxtw #3]
	bl	_SET_FIELD
	mov	x22, x0
	ldr	w1, [x24, #12]
	mov	x0, x19
	mov	x2, x22
	bl	_idt_nt_write
	ldr	w1, [x24, #8]
	mov	x0, x19
	mov	x2, x20
	bl	_idt_nt_write
	ldr	w1, [x24, #4]
	mov	x0, x19
	bl	_idt_nt_write
	ldr	w0, [x23]
	ldr	x1, [x25, #16]
	bl	_pci_bus_address
	add	w2, w0, w21
	ldr	w1, [x24]
	mov	x0, x19
	bl	_idt_nt_write
Lloh12:
	adrp	x8, _BARSETUP_TYPE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BARSETUP_TYPE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, x22
	mov	w2, #64
	bl	_IS_FLD_SET
	cbz	x0, LBB0_8
; %bb.11:
	ldr	w1, [x24, #16]
	mov	x0, x19
	bl	_idt_nt_write
	b	LBB0_13
LBB0_12:
Lloh15:
	adrp	x8, _LUTOFFSET_INDEX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LUTOFFSET_INDEX@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	w8, #40
	madd	x23, x24, x8, x25
	ldr	x2, [x23, #24]
	mov	w1, #0
	bl	_SET_FIELD
	mov	x21, x0
Lloh18:
	adrp	x8, _LUTOFFSET_BAR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LUTOFFSET_BAR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	x2, [x23, #16]
	mov	w1, #0
	bl	_SET_FIELD
	orr	w21, w0, w21
Lloh21:
	adrp	x8, _LUTUDATA_PART@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LUTUDATA_PART@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	x8, [x19, #16]
	ldr	x2, [x8, w22, uxtw #3]
	mov	w1, #0
	bl	_SET_FIELD
Lloh24:
	adrp	x8, _IDT_LUTUDATA_VALID@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IDT_LUTUDATA_VALID@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w22, w8, w0
	add	x23, x19, #8
	mov	x0, x23
	bl	_spin_lock_irqsave
Lloh27:
	adrp	x8, _IDT_NT_LUTOFFSET@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IDT_NT_LUTOFFSET@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_idt_nt_write
Lloh30:
	adrp	x8, _IDT_NT_LUTLDATA@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IDT_NT_LUTLDATA@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_idt_nt_write
Lloh33:
	adrp	x8, _IDT_NT_LUTMDATA@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IDT_NT_LUTMDATA@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_idt_nt_write
Lloh36:
	adrp	x8, _IDT_NT_LUTUDATA@GOTPAGE
Lloh37:
	ldr	x8, [x8, _IDT_NT_LUTUDATA@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_idt_nt_write
	mov	x0, x23
	bl	_spin_unlock_irqrestore
LBB0_13:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IDT_MW_DIR,8,3                 ; @IDT_MW_DIR
	.comm	_ntdata_tbl,8,3                 ; @ntdata_tbl
	.comm	_BARSETUP_TPART,4,2             ; @BARSETUP_TPART
	.comm	_BARSETUP_TYPE,4,2              ; @BARSETUP_TYPE
	.comm	_LUTOFFSET_INDEX,4,2            ; @LUTOFFSET_INDEX
	.comm	_LUTOFFSET_BAR,4,2              ; @LUTOFFSET_BAR
	.comm	_LUTUDATA_PART,4,2              ; @LUTUDATA_PART
	.comm	_IDT_LUTUDATA_VALID,4,2         ; @IDT_LUTUDATA_VALID
	.comm	_IDT_NT_LUTOFFSET,4,2           ; @IDT_NT_LUTOFFSET
	.comm	_IDT_NT_LUTLDATA,4,2            ; @IDT_NT_LUTLDATA
	.comm	_IDT_NT_LUTMDATA,4,2            ; @IDT_NT_LUTMDATA
	.comm	_IDT_NT_LUTUDATA,4,2            ; @IDT_NT_LUTUDATA
	.no_dead_strip	_idt_ntb_peer_mw_set_trans
.subsections_via_symbols
