	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx4_ib_query_pkey           ## -- Begin function __mlx4_ib_query_pkey
	.p2align	4, 0x90
___mlx4_ib_query_pkey:                  ## @__mlx4_ib_query_pkey
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r15
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	_MLX4_MAD_IFC_IGNORE_KEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$16, %edi
	callq	_kzalloc
	movq	%rax, %r13
	movl	(%rbx), %esi
	movl	$16, %edi
	callq	_kmalloc
	movq	%rax, %r12
	testq	%r13, %r13
	je	LBB0_6
## %bb.1:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	je	LBB0_6
## %bb.2:
	movq	%r13, %rdi
	callq	_init_query_mad
	movq	_IB_SMP_ATTR_PKEY_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r13)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	31(%rax), %r15d
	testl	%eax, %eax
	cmovnsl	%eax, %r15d
	movl	%r15d, %edi
	sarl	$5, %edi
	callq	_cpu_to_be32
	movl	%eax, 8(%r13)
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_to_mdev
	movl	(%rax), %edi
	callq	_mlx4_is_mfunc
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_MLX4_MAD_IFC_NET_VIEW@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_4:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	cmovel	%eax, %ebx
	orl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	%r14, %rdi
	callq	_to_mdev
	movq	%r12, (%rsp)
	movq	%rax, %rdi
	movl	%ebx, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r13, %r9
	callq	_mlx4_MAD_IFC
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	andl	$-32, %r15d
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	subl	%r15d, %ecx
	movq	(%r12), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_be16_to_cpu
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%r14d, %r14d
LBB0_6:
	movq	%r13, %rdi
	callq	_kfree
	movq	%r12, %rdi
	callq	_kfree
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_MAD_IFC_IGNORE_KEYS,4,2   ## @MLX4_MAD_IFC_IGNORE_KEYS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_IB_SMP_ATTR_PKEY_TABLE,4,2     ## @IB_SMP_ATTR_PKEY_TABLE
	.comm	_MLX4_MAD_IFC_NET_VIEW,4,2      ## @MLX4_MAD_IFC_NET_VIEW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx4_ib_query_pkey           ; -- Begin function __mlx4_ib_query_pkey
	.p2align	2
___mlx4_ib_query_pkey:                  ; @__mlx4_ib_query_pkey
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x4
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _MLX4_MAD_IFC_IGNORE_KEYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_MAD_IFC_IGNORE_KEYS@GOTPAGEOFF]
Lloh2:
	ldr	w27, [x8]
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
Lloh6:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #16
	bl	_kzalloc
	mov	x20, x0
	ldr	w1, [x21]
	mov	w0, #16
	bl	_kmalloc
	mov	x21, x0
	cmp	x20, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	neg	w23, w26
	b	LBB0_4
LBB0_2:
	mov	x0, x20
	bl	_init_query_mad
Lloh8:
	adrp	x8, _IB_SMP_ATTR_PKEY_TABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IB_SMP_ATTR_PKEY_TABLE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	add	w8, w22, #31
	cmp	w22, #0
	csel	w8, w8, w22, lt
	asr	w26, w8, #5
	mov	x0, x26
	bl	_cpu_to_be32
	str	w0, [x20, #8]
	mov	x0, x24
	bl	_to_mdev
	ldr	w0, [x0]
	bl	_mlx4_is_mfunc
	cmp	x0, #0
	ccmp	w25, #0, #4, ne
Lloh11:
	adrp	x8, _MLX4_MAD_IFC_NET_VIEW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MLX4_MAD_IFC_NET_VIEW@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	csel	w8, w8, wzr, ne
	orr	w25, w8, w27
	mov	x0, x24
	bl	_to_mdev
	mov	x1, x25
	mov	x2, x23
	mov	x3, #0
	mov	x4, #0
	mov	x5, x20
	mov	x6, x21
	bl	_mlx4_MAD_IFC
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	x8, [x21]
	sub	w9, w22, w26, lsl #5
	ldr	w0, [x8, w9, sxtw #2]
	bl	_be16_to_cpu
	str	w0, [x19]
LBB0_4:
	mov	x0, x20
	bl	_kfree
	mov	x0, x21
	bl	_kfree
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_MAD_IFC_IGNORE_KEYS,4,2   ; @MLX4_MAD_IFC_IGNORE_KEYS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_IB_SMP_ATTR_PKEY_TABLE,4,2     ; @IB_SMP_ATTR_PKEY_TABLE
	.comm	_MLX4_MAD_IFC_NET_VIEW,4,2      ; @MLX4_MAD_IFC_NET_VIEW
.subsections_via_symbols
