	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_query_device
_i40iw_query_device:                    ## @i40iw_query_device
	.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	%rdx, %rbx
	movq	%rsi, %r12
	callq	_to_iwdev
	cmpq	$0, 8(%rbx)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_4:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rax, %r15
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$128, %edx
	callq	_memset
	leaq	120(%r12), %rdi
	movq	96(%r15), %rax
	movl	(%rax), %esi
	callq	_ether_addr_copy
	movq	_I40IW_FW_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 116(%r12)
	movl	88(%r15), %eax
	movl	%eax, 112(%r12)
	movq	80(%r15), %rax
	movq	(%rax), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 108(%r12)
	movl	(%rax), %eax
	movl	%eax, 104(%r12)
	movq	72(%r15), %rax
	movq	%rax, 96(%r12)
	movq	_I40IW_MAX_OUTBOUND_MESSAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 88(%r12)
	movq	64(%r15), %rax
	subq	56(%r15), %rax
	movq	%rax, 80(%r12)
	movq	_I40IW_MAX_QP_WRS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%r12)
	movq	_I40IW_MAX_WQ_FRAGMENT_COUNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 64(%r12)
	movq	%rax, 56(%r12)
	movq	48(%r15), %rax
	subq	40(%r15), %rax
	movq	%rax, 48(%r12)
	movl	32(%r15), %eax
	movl	%eax, 40(%r12)
	movq	24(%r15), %rax
	subq	16(%r15), %rax
	movq	%rax, 32(%r12)
	movq	8(%r15), %rax
	subq	(%r15), %rax
	movq	%rax, 24(%r12)
	movq	_I40IW_MAX_SGE_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
	movq	_I40IW_MAX_IRD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movl	%eax, 16(%r12)
	movq	_IB_ATOMIC_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movl	$1, (%r12)
	movq	_I40IW_MAX_PAGES_PER_FMR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I40IW_FW_VERSION,4,2           ## @I40IW_FW_VERSION
	.comm	_I40IW_MAX_OUTBOUND_MESSAGE_SIZE,4,2 ## @I40IW_MAX_OUTBOUND_MESSAGE_SIZE
	.comm	_I40IW_MAX_QP_WRS,4,2           ## @I40IW_MAX_QP_WRS
	.comm	_I40IW_MAX_WQ_FRAGMENT_COUNT,8,3 ## @I40IW_MAX_WQ_FRAGMENT_COUNT
	.comm	_I40IW_MAX_SGE_RD,4,2           ## @I40IW_MAX_SGE_RD
	.comm	_I40IW_MAX_IRD_SIZE,4,2         ## @I40IW_MAX_IRD_SIZE
	.comm	_IB_ATOMIC_NONE,4,2             ## @IB_ATOMIC_NONE
	.comm	_I40IW_MAX_PAGES_PER_FMR,4,2    ## @I40IW_MAX_PAGES_PER_FMR
	.no_dead_strip	_i40iw_query_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_query_device
_i40iw_query_device:                    ; @i40iw_query_device
	.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	x21, x2
	mov	x19, x1
	bl	_to_iwdev
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x21]
	cbz	x8, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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_4:
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #128
	bl	_memset
	add	x0, x19, #120
	ldr	x8, [x20, #96]
	ldr	w1, [x8]
	bl	_ether_addr_copy
	mov	w0, #0
Lloh3:
	adrp	x8, _I40IW_FW_VERSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40IW_FW_VERSION@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x20, #88]
	stp	w9, w8, [x19, #112]
	ldp	x9, x8, [x20, #72]
	ldr	x8, [x8]
	ldr	d0, [x8]
	str	d0, [x19, #104]
	str	x9, [x19, #96]
Lloh6:
	adrp	x8, _I40IW_MAX_OUTBOUND_MESSAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I40IW_MAX_OUTBOUND_MESSAGE_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #88]
	ldp	x9, x8, [x20, #56]
	sub	x8, x8, x9
	str	x8, [x19, #80]
Lloh9:
	adrp	x8, _I40IW_MAX_QP_WRS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I40IW_MAX_QP_WRS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #72]
	ldp	x9, x8, [x20, #40]
	sub	x8, x8, x9
Lloh12:
	adrp	x9, _I40IW_MAX_WQ_FRAGMENT_COUNT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _I40IW_MAX_WQ_FRAGMENT_COUNT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	stp	x9, x9, [x19, #56]
	str	x8, [x19, #48]
	ldr	w8, [x20, #32]
	str	w8, [x19, #40]
	ldp	x9, x8, [x20, #16]
	sub	x8, x8, x9
	ldp	x10, x9, [x20]
	sub	x9, x9, x10
Lloh15:
	adrp	x10, _I40IW_MAX_SGE_RD@GOTPAGE
Lloh16:
	ldr	x10, [x10, _I40IW_MAX_SGE_RD@GOTPAGEOFF]
	stp	x9, x8, [x19, #24]
Lloh17:
	ldr	w8, [x10]
	str	w8, [x19, #20]
Lloh18:
	adrp	x8, _I40IW_MAX_IRD_SIZE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _I40IW_MAX_IRD_SIZE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	stp	w8, w8, [x19, #12]
Lloh21:
	adrp	x8, _IB_ATOMIC_NONE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IB_ATOMIC_NONE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	mov	w9, #1
	str	w9, [x19]
Lloh24:
	adrp	x9, _I40IW_MAX_PAGES_PER_FMR@GOTPAGE
Lloh25:
	ldr	x9, [x9, _I40IW_MAX_PAGES_PER_FMR@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #4]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I40IW_FW_VERSION,4,2           ; @I40IW_FW_VERSION
	.comm	_I40IW_MAX_OUTBOUND_MESSAGE_SIZE,4,2 ; @I40IW_MAX_OUTBOUND_MESSAGE_SIZE
	.comm	_I40IW_MAX_QP_WRS,4,2           ; @I40IW_MAX_QP_WRS
	.comm	_I40IW_MAX_WQ_FRAGMENT_COUNT,8,3 ; @I40IW_MAX_WQ_FRAGMENT_COUNT
	.comm	_I40IW_MAX_SGE_RD,4,2           ; @I40IW_MAX_SGE_RD
	.comm	_I40IW_MAX_IRD_SIZE,4,2         ; @I40IW_MAX_IRD_SIZE
	.comm	_IB_ATOMIC_NONE,4,2             ; @IB_ATOMIC_NONE
	.comm	_I40IW_MAX_PAGES_PER_FMR,4,2    ; @I40IW_MAX_PAGES_PER_FMR
	.no_dead_strip	_i40iw_query_device
.subsections_via_symbols
