	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_QP_ATTACH
_mlx4_QP_ATTACH:                        ## @mlx4_QP_ATTACH
	.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
	movl	%r9d, %r14d
	movq	%r8, %r15
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	callq	_mlx4_is_mfunc
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_EBADF@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_3:
	movl	4(%r15), %edi
	movq	%r13, %rsi
	movl	$16, %edx
	callq	_memcpy
	shll	$28, %r14d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	orl	(%rax), %r14d
	movl	%r14d, %edx
	orl	$-2147483648, %edx              ## imm = 0x80000000
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	cmovel	%r14d, %edx
	movq	%rbx, %r13
	testq	%rbx, %rbx
	cmovel	%r14d, %edx
	movl	(%r15), %esi
	movq	_MLX4_CMD_QP_ATTACH@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_CMD_TIME_CLASS_A@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_WRAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r12, %rdi
	movq	%rbx, %rcx
	callq	_mlx4_cmd
	movl	%eax, %ebx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_mlx4_free_cmd_mailbox
	testq	%r13, %r13
	jne	LBB0_6
## %bb.4:
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	movq	(%r12), %rax
	movq	_MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	testl	%ecx, (%rax)
	cmovnel	%edx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBADF,4,2                      ## @EBADF
	.comm	_MLX4_CMD_QP_ATTACH,4,2         ## @MLX4_CMD_QP_ATTACH
	.comm	_MLX4_CMD_TIME_CLASS_A,4,2      ## @MLX4_CMD_TIME_CLASS_A
	.comm	_MLX4_CMD_WRAPPED,4,2           ## @MLX4_CMD_WRAPPED
	.comm	_MLX4_DEVICE_STATE_INTERNAL_ERROR,4,2 ## @MLX4_DEVICE_STATE_INTERNAL_ERROR
	.no_dead_strip	_mlx4_QP_ATTACH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_QP_ATTACH
_mlx4_QP_ATTACH:                        ; @mlx4_QP_ATTACH
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x23, x5
	mov	x22, x4
	mov	x20, x3
	mov	x25, x2
	mov	x24, x1
	mov	x19, x0
	bl	_mlx4_is_mfunc
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_mlx4_alloc_cmd_mailbox
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_3:
Lloh0:
	adrp	x8, _EBADF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_4:
	ldr	w0, [x21, #4]
	mov	x1, x25
	mov	w2, #16
	bl	_memcpy
	ldr	w8, [x24]
	orr	w8, w8, w23, lsl #28
	cmp	x22, #0
	ccmp	x20, #0, #4, ne
	orr	w9, w8, #0x80000000
	csel	w2, w9, w8, ne
	ldr	w1, [x21]
Lloh3:
	adrp	x8, _MLX4_CMD_QP_ATTACH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_CMD_QP_ATTACH@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
Lloh6:
	adrp	x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
Lloh9:
	adrp	x8, _MLX4_CMD_WRAPPED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLX4_CMD_WRAPPED@GOTPAGEOFF]
Lloh11:
	ldr	w6, [x8]
	mov	x0, x19
	mov	x3, x20
	bl	_mlx4_cmd
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_mlx4_free_cmd_mailbox
	cbnz	x20, LBB0_7
; %bb.5:
	cbz	w22, LBB0_7
; %bb.6:
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	csel	w22, w22, wzr, eq
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_MLX4_CMD_QP_ATTACH,4,2         ; @MLX4_CMD_QP_ATTACH
	.comm	_MLX4_CMD_TIME_CLASS_A,4,2      ; @MLX4_CMD_TIME_CLASS_A
	.comm	_MLX4_CMD_WRAPPED,4,2           ; @MLX4_CMD_WRAPPED
	.comm	_MLX4_DEVICE_STATE_INTERNAL_ERROR,4,2 ; @MLX4_DEVICE_STATE_INTERNAL_ERROR
	.no_dead_strip	_mlx4_QP_ATTACH
.subsections_via_symbols
