	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_set_mtu                    ## -- Begin function qib_set_mtu
	.p2align	4, 0x90
_qib_set_mtu:                           ## @qib_set_mtu
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	cmpl	$1023, %esi                     ## imm = 0x3FF
	jle	LBB0_1
## %bb.8:
	cmpl	$1024, %ebx                     ## imm = 0x400
	je	LBB0_3
## %bb.9:
	cmpl	$2048, %ebx                     ## imm = 0x800
	je	LBB0_3
## %bb.10:
	cmpl	$4096, %ebx                     ## imm = 0x1000
	je	LBB0_3
	jmp	LBB0_11
LBB0_1:
	cmpl	$256, %ebx                      ## imm = 0x100
	je	LBB0_3
## %bb.2:
	cmpl	$512, %ebx                      ## imm = 0x200
	jne	LBB0_11
LBB0_3:
	movq	_qib_ibmtu@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ib_mtu_enum_to_int
	testl	%eax, %eax
	jle	LBB0_5
## %bb.4:
	cmpl	%ebx, %eax
	jge	LBB0_5
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_5:
	movl	(%r14), %ecx
	movl	%ebx, 4(%r14)
	movq	_QIB_PIO_MAXIBHDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ecx, %edx
	subl	%eax, %edx
	cmpl	%ebx, %edx
	jle	LBB0_6
## %bb.12:
	addl	%ebx, %eax
	cmpl	%ecx, %eax
	je	LBB0_15
## %bb.13:
	addl	$-8, %eax
	jmp	LBB0_14
LBB0_6:
	movl	8(%r14), %edx
	cmpl	%edx, %ecx
	je	LBB0_15
## %bb.7:
	leal	-8(%rdx), %eax
	cmpl	%ebx, %edx
	cmovll	%ecx, %eax
	cmpl	%ebx, %ecx
	cmovgel	%ecx, %eax
LBB0_14:
	movl	%eax, (%r14)
LBB0_15:
	movq	16(%r14), %rax
	movq	_QIB_IB_CFG_MTU@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	*(%rax)
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_qib_ibmtu,4,2                  ## @qib_ibmtu
	.comm	_QIB_PIO_MAXIBHDR,4,2           ## @QIB_PIO_MAXIBHDR
	.comm	_QIB_IB_CFG_MTU,4,2             ## @QIB_IB_CFG_MTU
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_set_mtu                    ; -- Begin function qib_set_mtu
	.p2align	2
_qib_set_mtu:                           ; @qib_set_mtu
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	cmp	w1, #1023
	b.le	LBB0_4
; %bb.1:
	cmp	w20, #1024
	b.eq	LBB0_6
; %bb.2:
	cmp	w20, #2048
	b.eq	LBB0_6
; %bb.3:
	cmp	w20, #1, lsl #12                ; =4096
	b.eq	LBB0_6
	b	LBB0_10
LBB0_4:
	cmp	w20, #256
	b.eq	LBB0_6
; %bb.5:
	cmp	w20, #512
	b.ne	LBB0_10
LBB0_6:
Lloh0:
	adrp	x8, _qib_ibmtu@GOTPAGE
Lloh1:
	ldr	x8, [x8, _qib_ibmtu@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ib_mtu_enum_to_int
	cmp	w0, #1
	ccmp	w0, w20, #0, ge
	b.lt	LBB0_10
; %bb.7:
	ldr	w8, [x19]
	str	w20, [x19, #4]
Lloh3:
	adrp	x9, _QIB_PIO_MAXIBHDR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QIB_PIO_MAXIBHDR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sub	w10, w8, w9
	cmp	w10, w20
	b.le	LBB0_11
; %bb.8:
	add	w9, w9, w20
	cmp	w9, w8
	b.eq	LBB0_14
; %bb.9:
	sub	w8, w9, #8
	b	LBB0_13
LBB0_10:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_11:
	ldr	w9, [x19, #8]
	cmp	w8, w9
	b.eq	LBB0_14
; %bb.12:
	sub	w10, w9, #8
	cmp	w9, w20
	ccmp	w8, w20, #0, ge
	csel	w8, w8, w10, ge
LBB0_13:
	str	w8, [x19]
LBB0_14:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _QIB_IB_CFG_MTU@GOTPAGE
Lloh10:
	ldr	x9, [x9, _QIB_IB_CFG_MTU@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	mov	x0, x19
	mov	w2, #0
	blr	x8
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_qib_ibmtu,4,2                  ; @qib_ibmtu
	.comm	_QIB_PIO_MAXIBHDR,4,2           ; @QIB_PIO_MAXIBHDR
	.comm	_QIB_IB_CFG_MTU,4,2             ; @QIB_IB_CFG_MTU
.subsections_via_symbols
