	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mthca_query_gid
_mthca_query_gid:                       ## @mthca_query_gid
	.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	%rcx, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %r12
	movl	(%rbx), %esi
	movl	$24, %edi
	callq	_kmalloc
	movq	%rax, %r15
	testq	%r12, %r12
	je	LBB0_5
## %bb.1:
	testq	%r15, %r15
	je	LBB0_5
## %bb.2:
	movq	%r12, %rdi
	callq	_init_query_mad
	movq	_IB_SMP_ATTR_PORT_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movl	%r13d, %edi
	callq	_cpu_to_be32
	movq	%rax, 8(%r12)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_to_mdev
	movl	%eax, %edi
	movl	$1, %esi
	movl	$1, %edx
	movl	%r13d, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r15
	pushq	%r12
	callq	_mthca_MAD_IFC
	addq	$16, %rsp
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	(%r15), %rsi
	addq	$8, %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	%r12, %rdi
	callq	_init_query_mad
	movq	_IB_SMP_ATTR_GUID_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	7(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	movl	%ebx, %edi
	sarl	$3, %edi
	callq	_cpu_to_be32
	movq	%rax, 8(%r12)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_to_mdev
	movl	%eax, %edi
	movl	$1, %esi
	movl	$1, %edx
	movl	%r13d, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r15
	pushq	%r12
	callq	_mthca_MAD_IFC
	addq	$16, %rsp
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	andl	$-8, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	subl	%ebx, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdi
	addq	$8, %rdi
	shll	$3, %eax
	movslq	%eax, %rsi
	addq	(%r15), %rsi
	movl	$8, %edx
	callq	_memcpy
	xorl	%r14d, %r14d
LBB0_5:
	movq	%r12, %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_kfree
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_IB_SMP_ATTR_PORT_INFO,4,2      ## @IB_SMP_ATTR_PORT_INFO
	.comm	_IB_SMP_ATTR_GUID_INFO,4,2      ## @IB_SMP_ATTR_GUID_INFO
	.no_dead_strip	_mthca_query_gid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mthca_query_gid
_mthca_query_gid:                       ; @mthca_query_gid
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
Lloh3:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w0, #24
	bl	_kzalloc
	mov	x19, x0
	ldr	w1, [x20]
	mov	w0, #24
	bl	_kmalloc
	mov	x20, x0
	cmp	x19, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	neg	w26, w25
	b	LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_init_query_mad
Lloh5:
	adrp	x8, _IB_SMP_ATTR_PORT_INFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IB_SMP_ATTR_PORT_INFO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	x0, x23
	bl	_cpu_to_be32
	str	x0, [x19, #8]
	mov	x0, x24
	bl	_to_mdev
	mov	w1, #1
	mov	w2, #1
	mov	x3, x23
	mov	x4, #0
	mov	x5, #0
	mov	x6, x19
	mov	x7, x20
	bl	_mthca_MAD_IFC
	mov	x26, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	x0, [x22]
	ldr	x8, [x20]
	add	x1, x8, #8
	mov	w2, #8
	bl	_memcpy
	mov	x0, x19
	bl	_init_query_mad
Lloh8:
	adrp	x8, _IB_SMP_ATTR_GUID_INFO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IB_SMP_ATTR_GUID_INFO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	add	w8, w21, #7
	cmp	w21, #0
	csel	w8, w8, w21, lt
	asr	w25, w8, #3
	mov	x0, x25
	bl	_cpu_to_be32
	str	x0, [x19, #8]
	mov	x0, x24
	bl	_to_mdev
	mov	w1, #1
	mov	w2, #1
	mov	x3, x23
	mov	x4, #0
	mov	x5, #0
	mov	x6, x19
	mov	x7, x20
	bl	_mthca_MAD_IFC
	mov	x26, x0
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	x8, [x22]
	add	x0, x8, #8
	ldr	x8, [x20]
	sub	w9, w21, w25, lsl #3
	lsl	w9, w9, #3
	add	x1, x8, w9, sxtw
	mov	w2, #8
	bl	_memcpy
LBB0_5:
	mov	x0, x19
	bl	_kfree
	mov	x0, x20
	bl	_kfree
	mov	x0, x26
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_IB_SMP_ATTR_PORT_INFO,4,2      ; @IB_SMP_ATTR_PORT_INFO
	.comm	_IB_SMP_ATTR_GUID_INFO,4,2      ; @IB_SMP_ATTR_GUID_INFO
	.no_dead_strip	_mthca_query_gid
.subsections_via_symbols
