	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_query_ext_port_caps       ## -- Begin function mlx5_query_ext_port_caps
	.p2align	4, 0x90
_mlx5_query_ext_port_caps:              ## @mlx5_query_ext_port_caps
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$12, %edi
	callq	_kzalloc
	movq	%rax, %r13
	movl	(%r14), %esi
	movl	$12, %edi
	callq	_kmalloc
	movq	%rax, %r12
	testq	%r13, %r13
	je	LBB0_5
## %bb.1:
	testq	%r12, %r12
	je	LBB0_5
## %bb.2:
	movq	%r13, %rdi
	callq	_init_query_mad
	movq	_MLX5_ATTR_EXTENDED_PORT_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movl	%r15d, %edi
	callq	_cpu_to_be32
	movl	%eax, 4(%r13)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r12
	pushq	%r13
	callq	_mlx5_MAD_IFC
	addq	$16, %rsp
	movl	%eax, %ebx
	movl	(%r12), %edi
	callq	_be16_to_cpu
	xorl	%edx, %edx
	orl	%ebx, %eax
	jne	LBB0_4
## %bb.3:
	movq	_MLX_EXT_PORT_CAP_FLAG_EXTENDED_PORT_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_4:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movl	%edx, -4(%rax,%rcx,4)
LBB0_5:
	movq	%r13, %rdi
	callq	_kfree
	movq	%r12, %rdi
	callq	_kfree
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_MLX5_ATTR_EXTENDED_PORT_INFO,4,2 ## @MLX5_ATTR_EXTENDED_PORT_INFO
	.comm	_MLX_EXT_PORT_CAP_FLAG_EXTENDED_PORT_INFO,4,2 ## @MLX_EXT_PORT_CAP_FLAG_EXTENDED_PORT_INFO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_query_ext_port_caps       ; -- Begin function mlx5_query_ext_port_caps
	.p2align	2
_mlx5_query_ext_port_caps:              ; @mlx5_query_ext_port_caps
	.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	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #12
	bl	_kzalloc
	mov	x19, x0
	ldr	w1, [x22]
	mov	w0, #12
	bl	_kmalloc
	mov	x22, x0
	cmp	x19, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	neg	w23, w23
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_init_query_mad
Lloh5:
	adrp	x8, _MLX5_ATTR_EXTENDED_PORT_INFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MLX5_ATTR_EXTENDED_PORT_INFO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_cpu_to_be32
	str	w0, [x19, #4]
	mov	x0, x21
	mov	w1, #1
	mov	w2, #1
	mov	w3, #1
	mov	x4, #0
	mov	x5, #0
	mov	x6, x19
	mov	x7, x22
	bl	_mlx5_MAD_IFC
	mov	x23, x0
	ldr	w0, [x22]
	bl	_be16_to_cpu
	orr	w8, w23, w0
Lloh8:
	adrp	x9, _MLX_EXT_PORT_CAP_FLAG_EXTENDED_PORT_INFO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MLX_EXT_PORT_CAP_FLAG_EXTENDED_PORT_INFO@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, wzr, w9, ne
	ldr	x9, [x21]
	ldr	x9, [x9]
	add	x9, x9, w20, sxtw #2
	stur	w8, [x9, #-4]
LBB0_3:
	mov	x0, x19
	bl	_kfree
	mov	x0, x22
	bl	_kfree
	mov	x0, x23
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_MLX5_ATTR_EXTENDED_PORT_INFO,4,2 ; @MLX5_ATTR_EXTENDED_PORT_INFO
	.comm	_MLX_EXT_PORT_CAP_FLAG_EXTENDED_PORT_INFO,4,2 ; @MLX_EXT_PORT_CAP_FLAG_EXTENDED_PORT_INFO
.subsections_via_symbols
