	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_siw_query_device               ## -- Begin function siw_query_device
	.p2align	4, 0x90
_siw_query_device:                      ## @siw_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_siw_dev
	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	$112, %edx
	callq	_memset
	movq	$0, 104(%r12)
	movq	_IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPCREL(%rip), %rax
	movq	_IB_DEVICE_ALLOW_USER_UNREG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r12)
	movl	68(%r15), %eax
	movl	%eax, 100(%r12)
	movl	64(%r15), %eax
	movl	%eax, 96(%r12)
	movq	_SIW_MAX_SGE_PBL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 92(%r12)
	movl	60(%r15), %eax
	movl	%eax, 88(%r12)
	movl	56(%r15), %eax
	movl	%eax, 84(%r12)
	movl	52(%r15), %eax
	movl	%eax, 80(%r12)
	movq	$-1, 8(%r12)
	movl	12(%r15), %eax
	movl	%eax, 16(%r12)
	movl	16(%r15), %ecx
	movl	%ecx, 20(%r12)
	movups	36(%r15), %xmm0
	movups	%xmm0, 64(%r12)
	imull	%eax, %ecx
	movl	%ecx, 24(%r12)
	movss	%xmm0, 60(%r12)
	movups	20(%r15), %xmm0
	movups	%xmm0, 44(%r12)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r12)
	movq	_SIW_VENDOR_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r12)
	movl	8(%r15), %eax
	movl	%eax, 32(%r12)
	addq	$28, %r12
	movq	(%r15), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$6, %edx
	callq	_memcpy
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_DEVICE_MEM_MGT_EXTENSIONS,4,2 ## @IB_DEVICE_MEM_MGT_EXTENSIONS
	.comm	_IB_DEVICE_ALLOW_USER_UNREG,4,2 ## @IB_DEVICE_ALLOW_USER_UNREG
	.comm	_SIW_MAX_SGE_PBL,4,2            ## @SIW_MAX_SGE_PBL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_SIW_VENDOR_ID,4,2              ## @SIW_VENDOR_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_siw_query_device               ; -- Begin function siw_query_device
	.p2align	2
_siw_query_device:                      ; @siw_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_siw_dev
	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, #112
	bl	_memset
	str	xzr, [x19, #104]
Lloh3:
	adrp	x8, _IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _IB_DEVICE_ALLOW_USER_UNREG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IB_DEVICE_ALLOW_USER_UNREG@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	d0, [x20, #64]
	str	d0, [x19, #96]
Lloh9:
	adrp	x8, _SIW_MAX_SGE_PBL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SIW_MAX_SGE_PBL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20, #60]
	stp	w9, w8, [x19, #88]
	ldur	d0, [x20, #52]
	str	d0, [x19, #80]
	mov	x8, #-1
	str	x8, [x19, #8]
	ldp	w8, w9, [x20, #12]
	stp	w8, w9, [x19, #16]
	ldur	q0, [x20, #36]
	str	q0, [x19, #64]
	mul	w8, w9, w8
	str	w8, [x19, #24]
	str	s0, [x19, #60]
	ldur	q0, [x20, #20]
Lloh12:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
	stur	q0, [x19, #44]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #40]
Lloh15:
	adrp	x8, _SIW_VENDOR_ID@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SIW_VENDOR_ID@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	stp	w9, w8, [x19, #32]
	add	x0, x19, #28
	ldr	x8, [x20]
	ldr	w1, [x8]
	mov	w2, #6
	bl	_memcpy
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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	_IB_DEVICE_MEM_MGT_EXTENSIONS,4,2 ; @IB_DEVICE_MEM_MGT_EXTENSIONS
	.comm	_IB_DEVICE_ALLOW_USER_UNREG,4,2 ; @IB_DEVICE_ALLOW_USER_UNREG
	.comm	_SIW_MAX_SGE_PBL,4,2            ; @SIW_MAX_SGE_PBL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_SIW_VENDOR_ID,4,2              ; @SIW_VENDOR_ID
.subsections_via_symbols
