	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_CLOSE_PORT_wrapper        ## -- Begin function mlx4_CLOSE_PORT_wrapper
	.p2align	4, 0x90
_mlx4_CLOSE_PORT_wrapper:               ## @mlx4_CLOSE_PORT_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	%rdx, %rbx
	movl	%esi, %r13d
	movq	%rdi, %r15
	callq	_mlx4_priv
	movq	%rax, %r14
	movslq	(%rbx), %r12
	movq	8(%rax), %rdx
	movl	$1, %ebx
	movl	%r12d, %ecx
	shll	%cl, %ebx
	movslq	%r13d, %rdi
	movl	(%rdx,%rdi,4), %ecx
	xorl	%eax, %eax
	btl	%r12d, %ecx
	jae	LBB0_13
## %bb.1:
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movq	_MLX4_PORT_TYPE_IB@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	jne	LBB0_2
## %bb.6:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_mlx4_master_func_num
	cmpl	%r13d, %eax
	jne	LBB0_11
## %bb.7:
	movq	16(%r14), %rax
	movq	%r12, %r13
	shlq	$4, %r13
	cmpl	$0, 8(%rax,%r13)
	jne	LBB0_12
## %bb.8:
	cmpq	$0, (%rax,%r13)
	je	LBB0_12
## %bb.9:
	movq	_MLX4_CMD_CLOSE_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_CMD_NATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	movl	$1000, %r9d                     ## imm = 0x3E8
	callq	_mlx4_cmd
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	notl	%ebx
	movq	8(%r14), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	andl	%ebx, (%rax,%rcx,4)
	movq	16(%r14), %rax
	movq	$0, (%rax,%r13)
	jmp	LBB0_12
LBB0_2:
	movq	(%r14), %rax
	cmpl	$1, (%rax,%r12,4)
	jne	LBB0_5
## %bb.3:
	movq	%rdi, %r13
	movq	_MLX4_CMD_CLOSE_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_CMD_NATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	movl	$1000, %r9d                     ## imm = 0x3E8
	callq	_mlx4_cmd
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movq	8(%r14), %rdx
	movq	%r13, %rdi
	movl	(%rdx,%r13,4), %ecx
LBB0_5:
	notl	%ebx
	andl	%ecx, %ebx
	movl	%ebx, (%rdx,%rdi,4)
	jmp	LBB0_12
LBB0_11:
	notl	%ebx
	movq	8(%r14), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	andl	%ebx, (%rax,%rcx,4)
LBB0_12:
	movq	(%r14), %rax
	decl	(%rax,%r12,4)
	xorl	%eax, %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_PORT_TYPE_IB,8,3          ## @MLX4_PORT_TYPE_IB
	.comm	_MLX4_CMD_CLOSE_PORT,4,2        ## @MLX4_CMD_CLOSE_PORT
	.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_CLOSE_PORT_wrapper        ; -- Begin function mlx4_CLOSE_PORT_wrapper
	.p2align	2
_mlx4_CLOSE_PORT_wrapper:               ; @mlx4_CLOSE_PORT_wrapper
	.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, x2
	mov	x22, x1
	mov	x21, x0
	bl	_mlx4_priv
	ldr	w10, [x20]
	ldr	x8, [x0, #8]
	ldr	w9, [x8, w22, sxtw #2]
	mov	w11, #1
	lsl	w23, w11, w10
	tst	w9, w23
	b.eq	LBB0_7
; %bb.1:
	mov	x19, x0
	sxtw	x20, w10
	sxtw	x24, w22
	ldr	x10, [x21]
	ldr	x10, [x10, x20, lsl #3]
Lloh0:
	adrp	x11, _MLX4_PORT_TYPE_IB@GOTPAGE
Lloh1:
	ldr	x11, [x11, _MLX4_PORT_TYPE_IB@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_8
; %bb.2:
	mov	x0, x21
	bl	_mlx4_master_func_num
	cmp	w0, w22
	b.ne	LBB0_12
; %bb.3:
	ldr	x8, [x19, #16]
	add	x9, x8, x20, lsl #4
	ldr	w9, [x9, #8]
	cbnz	w9, LBB0_13
; %bb.4:
	lsl	x22, x20, #4
	ldr	x8, [x8, x22]
	cbz	x8, LBB0_13
; %bb.5:
Lloh3:
	adrp	x8, _MLX4_CMD_CLOSE_PORT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_CMD_CLOSE_PORT@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
Lloh6:
	adrp	x8, _MLX4_CMD_NATIVE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_CMD_NATIVE@GOTPAGEOFF]
Lloh8:
	ldr	w6, [x8]
	mov	x0, x21
	mov	w1, #0
	mov	x2, x20
	mov	w3, #0
	mov	w5, #1000
	bl	_mlx4_cmd
	cbnz	w0, LBB0_14
; %bb.6:
	lsl	x8, x24, #2
	ldp	x9, x10, [x19, #8]
	ldr	w11, [x9, x8]
	bic	w11, w11, w23
	str	w11, [x9, x8]
	str	xzr, [x10, x22]
	b	LBB0_13
LBB0_7:
	mov	w0, #0
	b	LBB0_14
LBB0_8:
	ldr	x10, [x19]
	ldr	w10, [x10, x20, lsl #2]
	cmp	w10, #1
	b.ne	LBB0_11
; %bb.9:
Lloh9:
	adrp	x8, _MLX4_CMD_CLOSE_PORT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLX4_CMD_CLOSE_PORT@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
Lloh12:
	adrp	x8, _MLX4_CMD_NATIVE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX4_CMD_NATIVE@GOTPAGEOFF]
Lloh14:
	ldr	w6, [x8]
	mov	x0, x21
	mov	w1, #0
	mov	x2, x20
	mov	w3, #0
	mov	w5, #1000
	bl	_mlx4_cmd
	cbnz	w0, LBB0_14
; %bb.10:
	ldr	x8, [x19, #8]
	ldr	w9, [x8, x24, lsl #2]
LBB0_11:
	bic	w9, w9, w23
	str	w9, [x8, x24, lsl #2]
	b	LBB0_13
LBB0_12:
	ldr	x8, [x19, #8]
	lsl	x9, x24, #2
	ldr	w10, [x8, x9]
	bic	w10, w10, w23
	str	w10, [x8, x9]
LBB0_13:
	mov	w0, #0
	ldr	x8, [x19]
	lsl	x9, x20, #2
	ldr	w10, [x8, x9]
	sub	w10, w10, #1
	str	w10, [x8, x9]
LBB0_14:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_PORT_TYPE_IB,8,3          ; @MLX4_PORT_TYPE_IB
	.comm	_MLX4_CMD_CLOSE_PORT,4,2        ; @MLX4_CMD_CLOSE_PORT
	.comm	_MLX4_CMD_NATIVE,4,2            ; @MLX4_CMD_NATIVE
.subsections_via_symbols
