	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idt_ntb_msg_read
_idt_ntb_msg_read:                      ## @idt_ntb_msg_read
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	callq	_to_ndev_ntb
	testl	%ebx, %ebx
	js	LBB0_6
## %bb.1:
	movq	%rax, %r14
	movq	_IDT_MSG_CNT@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jle	LBB0_6
## %bb.2:
	testq	%r15, %r15
	je	LBB0_3
## %bb.4:
	movq	_ntdata_tbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ebx
	movl	4(%rax,%rbx,8), %esi
	movq	%r14, %rdi
	callq	_idt_nt_read
	movq	(%r14), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%r15)
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	cmovnel	%eax, %edx
	movl	%edx, (%r15)
	jmp	LBB0_5
LBB0_6:
	movq	$-1, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%ebx, %ebx
LBB0_5:
	movq	_ntdata_tbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,8), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_idt_nt_read                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IDT_MSG_CNT,4,2                ## @IDT_MSG_CNT
	.comm	_ntdata_tbl,8,3                 ## @ntdata_tbl
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_idt_ntb_msg_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function idt_ntb_msg_read
_idt_ntb_msg_read:                      ; @idt_ntb_msg_read
	.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	x21, x2
	mov	x20, x1
	bl	_to_ndev_ntb
	tbnz	w21, #31, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _IDT_MSG_CNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IDT_MSG_CNT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.le	LBB0_4
; %bb.2:
	mov	x19, x0
Lloh3:
	adrp	x22, _ntdata_tbl@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ntdata_tbl@GOTPAGEOFF]
	cbz	x20, LBB0_5
; %bb.3:
	ldr	x8, [x22]
	mov	w23, w21
	add	x8, x8, w21, uxtw #3
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_idt_nt_read
	ldr	x8, [x19]
	ldr	w8, [x8, x0, lsl #2]
	str	w8, [x20]
Lloh5:
	adrp	x9, _EINVAL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmn	w8, w9
	csel	w8, wzr, w8, eq
	str	w8, [x20]
	b	LBB0_6
LBB0_4:
	mov	x0, #-1
	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
LBB0_5:
	mov	w23, w21
LBB0_6:
	ldr	x8, [x22]
	lsl	x9, x23, #3
	ldr	w1, [x8, x9]
	mov	x0, x19
	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
	b	_idt_nt_read
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_IDT_MSG_CNT,4,2                ; @IDT_MSG_CNT
	.comm	_ntdata_tbl,8,3                 ; @ntdata_tbl
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_idt_ntb_msg_read
.subsections_via_symbols
