	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efa_query_device               ## -- Begin function efa_query_device
	.p2align	4, 0x90
_efa_query_device:                      ## @efa_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, -64(%rbp)
	callq	_to_edev
	movq	%rax, %r13
	testq	%r12, %r12
	je	LBB0_4
## %bb.1:
	movq	8(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.2:
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ib_is_udata_cleared
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	8(%r13), %eax
	movl	%eax, (%rbx)
	movl	52(%r13), %eax
	movl	%eax, 52(%rbx)
	movq	(%r13), %rax
	movl	8(%rax), %ecx
	movl	%ecx, 48(%rbx)
	movq	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movq	44(%r13), %xmm1                 ## xmm1 = mem[0],zero
	punpcklqdq	%xmm0, %xmm1            ## xmm1 = xmm1[0],xmm0[0]
	movdqu	%xmm1, 32(%rbx)
	movdqu	28(%r13), %xmm0
	movdqu	%xmm0, 16(%rbx)
	movq	_u32@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r13), %edx
	movl	16(%r13), %esi
	callq	_min_t
	movl	%eax, 12(%rbx)
	movq	20(%r13), %rax
	movq	%rax, %rcx
	shrq	$32, %rcx
	movl	%ecx, 8(%rbx)
	movl	%eax, 4(%rbx)
	testq	%r12, %r12
	je	LBB0_8
## %bb.5:
	movq	(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.6:
	movq	%rax, %xmm0
	movq	12(%r13), %xmm1                 ## xmm1 = mem[0],zero
	punpcklqdq	%xmm0, %xmm1            ## xmm1 = xmm1[0],xmm0[0]
	movdqa	%xmm1, -64(%rbp)
	movl	$16, %edi
	callq	_min
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_ib_copy_to_udata
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_ibdev_dbg
	movl	%ebx, %r15d
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_ibdev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incompatible ABI params, udata not cleared\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_u32,4,2                        ## @u32
L_.str.1:                               ## @.str.1
	.asciz	"Failed to copy udata for query_device\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efa_query_device               ; -- Begin function efa_query_device
	.p2align	2
_efa_query_device:                      ; @efa_query_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	stp	xzr, xzr, [sp]
	bl	_to_edev
	mov	x21, x0
	cbz	x20, LBB0_3
; %bb.1:
	ldr	x2, [x20, #8]
	cbz	x2, LBB0_3
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	bl	_ib_is_udata_cleared
	cbz	w0, LBB0_8
LBB0_3:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #56
	bl	_memset
	ldr	w8, [x21, #8]
Lloh0:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mul	w8, w9, w8
	str	w8, [x22]
	ldr	w8, [x21, #52]
	str	w8, [x22, #52]
	ldr	x8, [x21]
	ldr	w9, [x8, #8]
	str	w9, [x22, #48]
	ldr	d0, [x8]
	ldur	d1, [x21, #44]
	mov.d	v1[1], v0[0]
	str	q1, [x22, #32]
	ldur	q0, [x21, #28]
	str	q0, [x22, #16]
Lloh3:
	adrp	x8, _u32@GOTPAGE
Lloh4:
	ldr	x8, [x8, _u32@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	w2, w1, [x21, #12]
	bl	_min_t
	str	w0, [x22, #12]
	ldr	w8, [x21, #24]
	str	w8, [x22, #8]
	ldr	w9, [x21, #20]
	str	w9, [x22, #4]
	cbz	x20, LBB0_9
; %bb.4:
	ldr	x1, [x20]
	cbz	x1, LBB0_7
; %bb.5:
	stp	w9, w8, [sp, #8]
	ldur	d0, [x21, #12]
	str	d0, [sp]
	mov	w0, #16
	bl	_min
	mov	x2, x0
	mov	x1, sp
	mov	x0, x20
	bl	_ib_copy_to_udata
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.6:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ibdev_dbg
	b	LBB0_9
LBB0_7:
	mov	w20, #0
	b	LBB0_9
LBB0_8:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ibdev_dbg
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_9:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incompatible ABI params, udata not cleared\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_u32,4,2                        ; @u32
l_.str.1:                               ; @.str.1
	.asciz	"Failed to copy udata for query_device\n"

.subsections_via_symbols
