	.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	$40, %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.3:
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	(%rdx), %edx
	movq	_RES_FS_RULE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	leaq	-56(%rbp), %r8
	callq	_get_res
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.4:
	movq	%r13, %r15
	movq	-56(%rbp), %rax
	movl	12(%rax), %edi
	testl	%edi, %edi
	je	LBB0_5
## %bb.6:
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	callq	_kfree
	movq	-56(%rbp), %rax
	movl	4(%rax), %r13d
	movl	(%r12), %edx
	movl	(%r15), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_put_res
	movq	_RES_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-72(%rbp), %r8
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	_get_res
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.7:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	movq	_RES_FS_RULE@GOTPCREL(%rip), %r15
	je	LBB0_12
## %bb.8:
	movq	%rbx, %rdi
	movl	%eax, %r13d
	callq	_mlx4_is_bonded
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movl	(%r15), %ecx
	leaq	-56(%rbp), %r8
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	_get_res
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mlx4_err
	jmp	LBB0_12
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mlx4_err
	movl	(%r12), %edx
	movl	(%r15), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_put_res
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_11:
	movl	(%r15), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	_put_res
	movq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_mlx4_undo_mirror_rule
LBB0_12:
	movl	(%r12), %edx
	movl	(%r15), %r8d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	_rem_res_range
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mlx4_err
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_16
LBB0_14:
	movl	(%r12), %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	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_mlx4_cmd
	movl	%eax, %r15d
	testl	%eax, %eax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jne	LBB0_16
## %bb.15:
	movq	-72(%rbp), %rdi
	addq	$8, %rdi
	callq	_atomic_dec
	xorl	%r15d, %r15d
LBB0_16:
	movq	_RES_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	callq	_put_res
	jmp	LBB0_17
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Mirror rules cannot be removed explicitly\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RES_QP,4,2                     ## @RES_QP
L_.str.1:                               ## @.str.1
	.asciz	"Fail to get resource of mirror rule\n"

L_.str.2:                               ## @.str.2
	.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, #96
	.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
	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_8
; %bb.1:
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w2, [x2]
Lloh3:
	adrp	x26, _RES_FS_RULE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _RES_FS_RULE@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	x4, sp
	bl	_get_res
	mov	x24, x0
	cbnz	w0, LBB0_10
; %bb.2:
	ldr	x8, [sp]
	ldr	w0, [x8, #12]
	cbz	w0, LBB0_11
; %bb.3:
	ldr	w23, [x8]
	bl	_kfree
	ldr	x8, [sp]
	ldr	w21, [x8, #4]
	ldr	w2, [x22]
	ldr	w3, [x26]
	mov	x0, x20
	mov	x1, x19
	bl	_put_res
Lloh5:
	adrp	x25, _RES_QP@GOTPAGE
Lloh6:
	ldr	x25, [x25, _RES_QP@GOTPAGEOFF]
	ldr	w3, [x25]
	add	x4, sp, #8
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_get_res
	mov	x24, x0
	cbnz	w0, LBB0_10
; %bb.4:
	cbz	w23, LBB0_13
; %bb.5:
	mov	x0, x20
	bl	_mlx4_is_bonded
	cbz	x0, LBB0_13
; %bb.6:
	ldr	w3, [x26]
	mov	x4, sp
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_get_res
	cbz	w0, LBB0_12
; %bb.7:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_mlx4_err
	b	LBB0_13
LBB0_8:
Lloh9:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_10:
	mov	x0, x24
	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
	add	sp, sp, #96
	ret
LBB0_11:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx4_err
	ldr	w2, [x22]
	ldr	w3, [x26]
	mov	x0, x20
	mov	x1, x19
	bl	_put_res
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_12:
	ldr	w3, [x26]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_put_res
	ldr	x1, [sp]
	mov	x0, x20
	bl	_mlx4_undo_mirror_rule
LBB0_13:
	ldr	w2, [x22]
	ldr	w4, [x26]
	mov	x0, x20
	mov	x1, x19
	mov	w3, #1
	mov	w5, #0
	bl	_rem_res_range
	cbz	w0, LBB0_15
; %bb.14:
	mov	x24, x0
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_mlx4_err
	b	LBB0_17
LBB0_15:
	ldr	w1, [x22]
Lloh17:
	adrp	x8, _MLX4_QP_FLOW_STEERING_DETACH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MLX4_QP_FLOW_STEERING_DETACH@GOTPAGEOFF]
Lloh19:
	ldr	w4, [x8]
Lloh20:
	adrp	x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGEOFF]
Lloh22:
	ldr	w5, [x8]
Lloh23:
	adrp	x8, _MLX4_CMD_NATIVE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MLX4_CMD_NATIVE@GOTPAGEOFF]
Lloh25:
	ldr	w6, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_mlx4_cmd
	mov	x24, x0
	cbnz	w0, LBB0_17
; %bb.16:
	ldr	x8, [sp, #8]
	add	x0, x8, #8
	bl	_atomic_dec
LBB0_17:
	ldr	w3, [x25]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_put_res
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Mirror rules cannot be removed explicitly\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RES_QP,4,2                     ; @RES_QP
l_.str.1:                               ; @.str.1
	.asciz	"Fail to get resource of mirror rule\n"

l_.str.2:                               ; @.str.2
	.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
