	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_QP_FLOW_STEERING_DETACH_wrapper ## -- Begin function mlx4_QP_FLOW_STEERING_DETACH_wrapper
	.p2align	4, 0x90
_mlx4_QP_FLOW_STEERING_DETACH_wrapper:  ## @mlx4_QP_FLOW_STEERING_DETACH_wrapper
	.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	(%rdi), %rax
	movq	_MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	(%rdx), %edx
	movq	_RES_FS_RULE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	leaq	-48(%rbp), %r8
	callq	_get_res
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movl	(%r15), %edx
	movl	(%r13), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_put_res
	movq	-48(%rbp), %rax
	movl	(%rax), %edx
	movq	_RES_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %r8
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_get_res
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movl	(%r15), %edx
	movl	(%r13), %r8d
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	_rem_res_range
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_mlx4_err
	movq	_RES_QP@GOTPCREL(%rip), %r15
	jmp	LBB0_8
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r15), %esi
	movq	_MLX4_QP_FLOW_STEERING_DETACH@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_CMD_TIME_CLASS_A@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_NATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_mlx4_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	movq	_RES_QP@GOTPCREL(%rip), %r15
	jne	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rdi
	addq	$4, %rdi
	callq	_atomic_dec
	xorl	%ebx, %ebx
LBB0_8:
	movq	-48(%rbp), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_put_res
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_STEERING_MODE_DEVICE_MANAGED,8,3 ## @MLX4_STEERING_MODE_DEVICE_MANAGED
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_RES_FS_RULE,4,2                ## @RES_FS_RULE
	.comm	_RES_QP,4,2                     ## @RES_QP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fail to remove flow steering resources.\n "

	.comm	_MLX4_QP_FLOW_STEERING_DETACH,4,2 ## @MLX4_QP_FLOW_STEERING_DETACH
	.comm	_MLX4_CMD_TIME_CLASS_A,4,2      ## @MLX4_CMD_TIME_CLASS_A
	.comm	_MLX4_CMD_NATIVE,4,2            ## @MLX4_CMD_NATIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_QP_FLOW_STEERING_DETACH_wrapper ; -- Begin function mlx4_QP_FLOW_STEERING_DETACH_wrapper
	.p2align	2
_mlx4_QP_FLOW_STEERING_DETACH_wrapper:  ; @mlx4_QP_FLOW_STEERING_DETACH_wrapper
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w2, [x2]
Lloh3:
	adrp	x24, _RES_FS_RULE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _RES_FS_RULE@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x4, sp
	bl	_get_res
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w2, [x21]
	ldr	w3, [x24]
	mov	x0, x20
	mov	x1, x19
	bl	_put_res
	ldr	x8, [sp]
	ldr	w2, [x8]
Lloh5:
	adrp	x23, _RES_QP@GOTPAGE
Lloh6:
	ldr	x23, [x23, _RES_QP@GOTPAGEOFF]
	ldr	w3, [x23]
	add	x4, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_get_res
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w2, [x21]
	ldr	w4, [x24]
	mov	x0, x20
	mov	x1, x19
	mov	w3, #1
	mov	w5, #0
	bl	_rem_res_range
	cbz	w0, LBB0_7
; %bb.4:
	mov	x22, x0
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx4_err
	b	LBB0_9
LBB0_5:
Lloh9:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	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
	add	sp, sp, #80
	ret
LBB0_7:
	ldr	w1, [x21]
Lloh12:
	adrp	x8, _MLX4_QP_FLOW_STEERING_DETACH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX4_QP_FLOW_STEERING_DETACH@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
Lloh15:
	adrp	x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGEOFF]
Lloh17:
	ldr	w5, [x8]
Lloh18:
	adrp	x8, _MLX4_CMD_NATIVE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MLX4_CMD_NATIVE@GOTPAGEOFF]
Lloh20:
	ldr	w6, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_mlx4_cmd
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.8:
	ldr	x8, [sp, #8]
	add	x0, x8, #4
	bl	_atomic_dec
LBB0_9:
	ldr	x8, [sp]
	ldr	w2, [x8]
	ldr	w3, [x23]
	mov	x0, x20
	mov	x1, x19
	bl	_put_res
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_STEERING_MODE_DEVICE_MANAGED,8,3 ; @MLX4_STEERING_MODE_DEVICE_MANAGED
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_RES_FS_RULE,4,2                ; @RES_FS_RULE
	.comm	_RES_QP,4,2                     ; @RES_QP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fail to remove flow steering resources.\n "

	.comm	_MLX4_QP_FLOW_STEERING_DETACH,4,2 ; @MLX4_QP_FLOW_STEERING_DETACH
	.comm	_MLX4_CMD_TIME_CLASS_A,4,2      ; @MLX4_CMD_TIME_CLASS_A
	.comm	_MLX4_CMD_NATIVE,4,2            ; @MLX4_CMD_NATIVE
.subsections_via_symbols
