	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibv_query_gid_type             ## -- Begin function ibv_query_gid_type
	.p2align	4, 0x90
_ibv_query_gid_type:                    ## @ibv_query_gid_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r8d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdx
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$32, %esi
	movl	%r15d, %ecx
	callq	_snprintf
	movq	_errno@GOTPCREL(%rip), %r13
	movq	$0, (%r13)
	movq	(%r12), %rax
	movl	(%rax), %edi
	leaq	-91(%rbp), %rdx
	movq	%rbx, %rsi
	movl	$11, %ecx
	callq	_ibv_read_sysfs_file
	testq	%rax, %rax
	jle	LBB0_1
## %bb.8:
	movq	_V1_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-91(%rbp), %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_5
## %bb.9:
	movq	_V2_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-91(%rbp), %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	_ENOTSUP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	movl	$-1, %ebx
	jmp	LBB0_12
LBB0_1:
	movq	(%r13), %rax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_5:
	movq	_IBV_GID_TYPE_IB_ROCE_V1@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	movq	(%r12), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.3(%rip), %r9
	leaq	-104(%rbp), %rdi
	movl	%r15d, %r8d
	callq	_asprintf
	movl	$-1, %ebx
	testq	%rax, %rax
	js	LBB0_12
## %bb.3:
	movq	-104(%rbp), %rdi
	callq	_opendir
	movq	%rax, %r15
	movq	-104(%rbp), %rdi
	callq	_free
	testq	%r15, %r15
	je	LBB0_4
## %bb.7:
	movq	%r15, %rdi
	callq	_closedir
	movq	_EFAULT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	jmp	LBB0_12
LBB0_10:
	movq	_IBV_GID_TYPE_ROCE_V2@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	(%r13), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
	jmp	LBB0_12
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ports/%d/gid_attrs/types/%d"

	.comm	_errno,8,3                      ## @errno
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_IBV_GID_TYPE_IB_ROCE_V1,4,2    ## @IBV_GID_TYPE_IB_ROCE_V1
L_.str.1:                               ## @.str.1
	.asciz	"%s/%s/%d/%s/"

L_.str.2:                               ## @.str.2
	.asciz	"ports"

L_.str.3:                               ## @.str.3
	.asciz	"gid_attrs"

	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_EFAULT,8,3                     ## @EFAULT
	.comm	_V1_TYPE,4,2                    ## @V1_TYPE
	.comm	_V2_TYPE,4,2                    ## @V2_TYPE
	.comm	_IBV_GID_TYPE_ROCE_V2,4,2       ## @IBV_GID_TYPE_ROCE_V2
	.comm	_ENOTSUP,8,3                    ## @ENOTSUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibv_query_gid_type             ; -- Begin function ibv_query_gid_type
	.p2align	2
_ibv_query_gid_type:                    ; @ibv_query_gid_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x3
	mov	x4, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #24
	mov	w1, #32
	mov	x3, x20
	bl	_snprintf
Lloh5:
	adrp	x22, _errno@GOTPAGE
Lloh6:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	str	xzr, [x22]
	ldr	x8, [x21]
	ldr	w0, [x8]
	add	x1, sp, #24
	add	x2, sp, #13
	mov	w3, #11
	bl	_ibv_read_sysfs_file
	cmp	x0, #0
	b.le	LBB0_4
; %bb.1:
Lloh7:
	adrp	x8, _V1_TYPE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _V1_TYPE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x0, sp, #13
	bl	_strcmp
	cbz	w0, LBB0_6
; %bb.2:
Lloh10:
	adrp	x8, _V2_TYPE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _V2_TYPE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x0, sp, #13
	bl	_strcmp
	cbz	w0, LBB0_12
; %bb.3:
Lloh13:
	adrp	x8, _ENOTSUP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOTSUP@GOTPAGEOFF]
	b	LBB0_10
LBB0_4:
	ldr	x8, [x22]
Lloh15:
	adrp	x9, _EINVAL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
LBB0_5:
	mov	w0, #0
LBB0_6:
Lloh18:
	adrp	x8, _IBV_GID_TYPE_IB_ROCE_V1@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IBV_GID_TYPE_IB_ROCE_V1@GOTPAGEOFF]
	b	LBB0_13
LBB0_7:
	ldr	x8, [x21]
	ldr	w2, [x8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh22:
	adrp	x3, l_.str.2@PAGE
Lloh23:
	add	x3, x3, l_.str.2@PAGEOFF
Lloh24:
	adrp	x5, l_.str.3@PAGE
Lloh25:
	add	x5, x5, l_.str.3@PAGEOFF
	mov	x0, sp
	mov	x4, x20
	bl	_asprintf
	tbnz	x0, #63, LBB0_11
; %bb.8:
	ldr	x0, [sp]
	bl	_opendir
	mov	x20, x0
	ldr	x0, [sp]
	bl	_free
	cbz	x20, LBB0_16
; %bb.9:
	mov	x0, x20
	bl	_closedir
Lloh26:
	adrp	x8, _EFAULT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
	str	x8, [x22]
LBB0_11:
	mov	w0, #-1
	b	LBB0_14
LBB0_12:
Lloh28:
	adrp	x8, _IBV_GID_TYPE_ROCE_V2@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IBV_GID_TYPE_ROCE_V2@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_14:
	ldur	x8, [x29, #-40]
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_17
; %bb.15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_16:
	ldr	x8, [x22]
Lloh33:
	adrp	x9, _ENOENT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
	b	LBB0_11
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ports/%d/gid_attrs/types/%d"

	.comm	_errno,8,3                      ; @errno
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_IBV_GID_TYPE_IB_ROCE_V1,4,2    ; @IBV_GID_TYPE_IB_ROCE_V1
l_.str.1:                               ; @.str.1
	.asciz	"%s/%s/%d/%s/"

l_.str.2:                               ; @.str.2
	.asciz	"ports"

l_.str.3:                               ; @.str.3
	.asciz	"gid_attrs"

	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_EFAULT,8,3                     ; @EFAULT
	.comm	_V1_TYPE,4,2                    ; @V1_TYPE
	.comm	_V2_TYPE,4,2                    ; @V2_TYPE
	.comm	_IBV_GID_TYPE_ROCE_V2,4,2       ; @IBV_GID_TYPE_ROCE_V2
	.comm	_ENOTSUP,8,3                    ; @ENOTSUP
.subsections_via_symbols
