	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function to_mlx5_access_flags
_to_mlx5_access_flags:                  ## @to_mlx5_access_flags
	.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
	movq	%rcx, %r14
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	callq	_to_mdev
	movq	_IB_QP_MAX_DEST_RD_ATOMIC@GOTPCREL(%rip), %rcx
	leaq	8(%r15), %rdx
	testl	%r12d, (%rcx)
	movq	%r13, %rcx
	cmoveq	%rdx, %rcx
	movq	_IB_QP_ACCESS_FLAGS@GOTPCREL(%rip), %rsi
	testl	%r12d, (%rsi)
	cmoveq	%rdx, %r13
	movq	_IB_ACCESS_REMOTE_WRITE@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	cmpl	4(%rcx), %ebx
	sbbl	%ebx, %ebx
	movl	(%rdx), %edi
	orl	%edi, %ebx
	andl	(%r13), %ebx
	movq	_IB_ACCESS_REMOTE_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	andl	%ebx, %r12d
	je	LBB0_2
## %bb.1:
	movq	_MLX5_QP_BIT_RRE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
LBB0_2:
	movq	_IB_ACCESS_REMOTE_ATOMIC@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_6
## %bb.3:
	movq	%rdx, %r13
	movl	(%r15), %esi
	movq	%rax, %rdi
	callq	_get_atomic_mode
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_MLX5_ATOMIC_MODE_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_MLX5_QP_BIT_RAE@GOTPCREL(%rip), %rdx
	shll	%cl, %eax
	orl	(%rdx), %r12d
	orl	%eax, %r12d
	movl	(%r13), %edi
LBB0_6:
	andl	%ebx, %edi
	je	LBB0_8
## %bb.7:
	movq	_MLX5_QP_BIT_RWE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_8:
	orl	%r12d, %edi
	callq	_cpu_to_be32
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QP_MAX_DEST_RD_ATOMIC,4,2   ## @IB_QP_MAX_DEST_RD_ATOMIC
	.comm	_IB_QP_ACCESS_FLAGS,4,2         ## @IB_QP_ACCESS_FLAGS
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ## @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ## @IB_ACCESS_REMOTE_READ
	.comm	_MLX5_QP_BIT_RRE,4,2            ## @MLX5_QP_BIT_RRE
	.comm	_IB_ACCESS_REMOTE_ATOMIC,4,2    ## @IB_ACCESS_REMOTE_ATOMIC
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_MLX5_QP_BIT_RAE,4,2            ## @MLX5_QP_BIT_RAE
	.comm	_MLX5_ATOMIC_MODE_OFFSET,4,2    ## @MLX5_ATOMIC_MODE_OFFSET
	.comm	_MLX5_QP_BIT_RWE,4,2            ## @MLX5_QP_BIT_RWE
	.no_dead_strip	_to_mlx5_access_flags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function to_mlx5_access_flags
_to_mlx5_access_flags:                  ; @to_mlx5_access_flags
	.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	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_to_mdev
Lloh0:
	adrp	x8, _IB_QP_MAX_DEST_RD_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_QP_MAX_DEST_RD_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	x9, x22, #4
	add	x10, x20, #8
	add	x11, x20, #12
	tst	w8, w21
	csel	x8, x11, x9, eq
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _IB_QP_ACCESS_FLAGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_QP_ACCESS_FLAGS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w21
	csel	x8, x10, x22, eq
	ldr	w10, [x8]
Lloh6:
	adrp	x23, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w9, #0
	csinv	w9, w8, wzr, eq
	and	w21, w9, w10
Lloh8:
	adrp	x9, _IB_ACCESS_REMOTE_READ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_READ@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _MLX5_QP_BIT_RRE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MLX5_QP_BIT_RRE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	tst	w21, w9
	csel	w22, wzr, w10, eq
Lloh14:
	adrp	x9, _IB_ACCESS_REMOTE_ATOMIC@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_ATOMIC@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_3
; %bb.1:
	ldr	w1, [x20]
	bl	_get_atomic_mode
	tbnz	w0, #31, LBB0_4
; %bb.2:
Lloh17:
	adrp	x8, _MLX5_QP_BIT_RAE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MLX5_QP_BIT_RAE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w8, w8, w22
Lloh20:
	adrp	x9, _MLX5_ATOMIC_MODE_OFFSET@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MLX5_ATOMIC_MODE_OFFSET@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	lsl	w9, w0, w9
	orr	w22, w8, w9
	ldr	w8, [x23]
LBB0_3:
Lloh23:
	adrp	x9, _MLX5_QP_BIT_RWE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MLX5_QP_BIT_RWE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w8, w21
	csel	w8, wzr, w9, eq
	orr	w0, w8, w22
	bl	_cpu_to_be32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_5
LBB0_4:
Lloh26:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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 AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QP_MAX_DEST_RD_ATOMIC,4,2   ; @IB_QP_MAX_DEST_RD_ATOMIC
	.comm	_IB_QP_ACCESS_FLAGS,4,2         ; @IB_QP_ACCESS_FLAGS
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ; @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ; @IB_ACCESS_REMOTE_READ
	.comm	_MLX5_QP_BIT_RRE,4,2            ; @MLX5_QP_BIT_RRE
	.comm	_IB_ACCESS_REMOTE_ATOMIC,4,2    ; @IB_ACCESS_REMOTE_ATOMIC
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_MLX5_QP_BIT_RAE,4,2            ; @MLX5_QP_BIT_RAE
	.comm	_MLX5_ATOMIC_MODE_OFFSET,4,2    ; @MLX5_ATOMIC_MODE_OFFSET
	.comm	_MLX5_QP_BIT_RWE,4,2            ; @MLX5_QP_BIT_RWE
	.no_dead_strip	_to_mlx5_access_flags
.subsections_via_symbols
