	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __set_port_type
___set_port_type:                       ## @__set_port_type
	.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	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_mlx4_priv
	movq	%rax, %r14
	movq	_MLX4_MAX_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	shlq	$2, %r13
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	(%r15), %rdx
	movl	(%rax,%rdx,4), %eax
	notl	%eax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	testl	%eax, %ecx
	jne	LBB0_1
## %bb.2:
	movl	%ecx, %r13d
	movq	%rbx, %rdi
	callq	_mlx4_stop_sense
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	%r13d, 8(%r15)
	movq	8(%rbx), %rax
	movq	(%r15), %rcx
	movl	%r13d, (%rax,%rcx,4)
	movl	16(%rbx), %eax
	testl	%eax, %eax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_9
## %bb.3:
	movq	_MLX4_PORT_TYPE_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edx, %edx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movslq	16(%rbx), %rax
	movq	%rsi, %rdx
	cmpq	%rax, %rsi
	jge	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	4(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbx), %rax
	movl	4(%rax,%rdx,4), %eax
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	leaq	1(%rdx), %rsi
	movl	%eax, (%r12,%rdx,4)
	cmpl	%ecx, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%rbx), %rax
	movl	4(%rax,%rdx,4), %eax
	movl	%eax, (%r12,%rdx,4)
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mlx4_err
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_23
LBB0_9:
	movl	32(%rbx), %ecx
	movq	_MLX4_DEV_CAP_FLAG_DPDP@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_10
LBB0_18:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_mlx4_do_sense_ports
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mlx4_check_port_params
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.19:
	movl	16(%rbx), %esi
	testl	%esi, %esi
	jle	LBB0_21
## %bb.20:
	movq	8(%r14), %rdi
	addq	$4, %rdi
	shlq	$2, %rsi
	callq	___bzero
LBB0_21:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mlx4_change_port_types
	movl	%eax, %r13d
	jmp	LBB0_22
LBB0_10:
	movq	_MLX4_DEV_CAP_FLAG_SENSE_SUPPORT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_18
## %bb.11:
	testl	%eax, %eax
	jle	LBB0_18
## %bb.12:
	movq	8(%rbx), %rcx
	xorl	%edx, %edx
	movq	_MLX4_PORT_TYPE_AUTO@GOTPCREL(%rip), %rsi
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %r8
	xorl	%r13d, %r13d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movslq	%eax, %rdi
	incq	%rdx
	cmpq	%rdi, %rdx
	jge	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%rcx,%rdx,4), %edi
	cmpl	(%rsi), %edi
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	24(%rbx), %rax
	movl	4(%rax,%rdx,4), %eax
	movl	%eax, 4(%rcx,%rdx,4)
	xorl	%r13d, %r13d
	subl	(%r8), %r13d
	movl	16(%rbx), %eax
	jmp	LBB0_15
LBB0_16:
	testl	%r13d, %r13d
	je	LBB0_18
## %bb.17:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mlx4_err
LBB0_22:
	movq	%rbx, %rdi
	callq	_mlx4_start_sense
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_MAX_PORTS,4,2             ## @MLX4_MAX_PORTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Requested port type for port %d is not supported on this HCA\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_MLX4_PORT_TYPE_AUTO,4,2        ## @MLX4_PORT_TYPE_AUTO
	.comm	_MLX4_DEV_CAP_FLAG_DPDP,4,2     ## @MLX4_DEV_CAP_FLAG_DPDP
	.comm	_MLX4_DEV_CAP_FLAG_SENSE_SUPPORT,4,2 ## @MLX4_DEV_CAP_FLAG_SENSE_SUPPORT
L_.str.1:                               ## @.str.1
	.asciz	"Auto sensing is not supported on this HCA. Set only 'eth' or 'ib' for both ports (should be the same)\n"

	.no_dead_strip	___set_port_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __set_port_type
___set_port_type:                       ; @__set_port_type
	.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
	sub	sp, sp, #16
	mov	x23, x1
	mov	x24, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_mlx4_priv
	mov	x20, x0
Lloh3:
	adrp	x8, _MLX4_MAX_PORTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_MAX_PORTS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x22, x9, x12
	mov	sp, x22
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x21, x8, x12
	mov	sp, x21
	ldr	x9, [x19]
	ldr	x8, [x24]
	ldr	w9, [x9, x8, lsl #2]
	bics	wzr, w23, w9
	b.ne	LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_mlx4_stop_sense
	mov	x0, x20
	bl	_mutex_lock
	str	w23, [x24, #8]
	ldr	x8, [x19, #8]
	ldr	x9, [x24]
	str	w23, [x8, x9, lsl #2]
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x9, #0
Lloh10:
	adrp	x8, _MLX4_PORT_TYPE_AUTO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MLX4_PORT_TYPE_AUTO@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x8]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	ldrsw	x8, [x19, #16]
	cmp	x9, x8
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, x9, lsl #2
	ldr	w8, [x8, #4]
	cbnz	w8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x9, lsl #2
	ldr	w8, [x8, #4]
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x22, x9, lsl #2]
	cmp	w8, w10
	b.ne	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #24]
	lsl	x11, x9, #2
	add	x8, x8, x11
	ldr	w8, [x8, #4]
	str	w8, [x22, x11]
	b	LBB0_3
LBB0_8:
	str	x8, [sp, #-16]!
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx4_err
	add	sp, sp, #16
Lloh15:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_22
LBB0_9:
	ldr	w9, [x19, #32]
Lloh18:
	adrp	x10, _MLX4_DEV_CAP_FLAG_DPDP@GOTPAGE
Lloh19:
	ldr	x10, [x10, _MLX4_DEV_CAP_FLAG_DPDP@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_17
; %bb.10:
Lloh21:
	adrp	x10, _MLX4_DEV_CAP_FLAG_SENSE_SUPPORT@GOTPAGE
Lloh22:
	ldr	x10, [x10, _MLX4_DEV_CAP_FLAG_SENSE_SUPPORT@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	and	w9, w10, w9
	cmp	w9, #0
	ccmp	w8, #1, #8, eq
	b.lt	LBB0_17
; %bb.11:
	mov	w23, #0
	ldr	x9, [x19, #8]
	mov	w10, #1
Lloh24:
	adrp	x11, _MLX4_PORT_TYPE_AUTO@GOTPAGE
Lloh25:
	ldr	x11, [x11, _MLX4_PORT_TYPE_AUTO@GOTPAGEOFF]
Lloh26:
	adrp	x12, _EOPNOTSUPP@GOTPAGE
Lloh27:
	ldr	x12, [x12, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	cmp	x10, w8, sxtw
	add	x10, x10, #1
	b.ge	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x9, x10, lsl #2]
	ldr	w14, [x11]
	cmp	w13, w14
	b.ne	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x19, #24]
	lsl	x13, x10, #2
	ldr	w8, [x8, x13]
	str	w8, [x9, x13]
	ldr	w8, [x12]
	neg	w23, w8
	ldr	w8, [x19, #16]
	b	LBB0_12
LBB0_15:
	cbz	w23, LBB0_17
; %bb.16:
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx4_err
	b	LBB0_21
LBB0_17:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_mlx4_do_sense_ports
	mov	x0, x19
	mov	x1, x21
	bl	_mlx4_check_port_params
	mov	x23, x0
	cbnz	w0, LBB0_21
; %bb.18:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.19:
	ldr	x9, [x20, #8]
	add	x0, x9, #4
	lsl	x1, x8, #2
	bl	_bzero
LBB0_20:
	mov	x0, x19
	mov	x1, x21
	bl	_mlx4_change_port_types
	mov	x23, x0
LBB0_21:
	mov	x0, x19
	bl	_mlx4_start_sense
	mov	x0, x20
	bl	_mutex_unlock
LBB0_22:
	ldur	x8, [x29, #-56]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	mov	x0, x23
	sub	sp, x29, #48
	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
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_MAX_PORTS,4,2             ; @MLX4_MAX_PORTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Requested port type for port %d is not supported on this HCA\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_MLX4_PORT_TYPE_AUTO,4,2        ; @MLX4_PORT_TYPE_AUTO
	.comm	_MLX4_DEV_CAP_FLAG_DPDP,4,2     ; @MLX4_DEV_CAP_FLAG_DPDP
	.comm	_MLX4_DEV_CAP_FLAG_SENSE_SUPPORT,4,2 ; @MLX4_DEV_CAP_FLAG_SENSE_SUPPORT
l_.str.1:                               ; @.str.1
	.asciz	"Auto sensing is not supported on this HCA. Set only 'eth' or 'ib' for both ports (should be the same)\n"

	.no_dead_strip	___set_port_type
.subsections_via_symbols
