	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibv_get_sysfs_path             ## -- Begin function ibv_get_sysfs_path
	.p2align	4, 0x90
_ibv_get_sysfs_path:                    ## @ibv_get_sysfs_path
	.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
	movq	_sysfs_path@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	xorl	%eax, %eax
	callq	_getuid
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_geteuid
	cmpq	%rax, %rbx
	jne	LBB0_7
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	_IBV_SYSFS_PATH_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_strndup
	movq	%rax, %rbx
	movq	%rax, (%r14)
	movq	%rax, %rdi
	callq	_strlen
	testl	%eax, %eax
	jle	LBB0_8
## %bb.4:
	movl	%eax, %eax
	incq	%rax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rax), %ecx
	cmpb	$47, (%rbx,%rcx)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movb	$0, (%rbx,%rcx)
	decq	%rax
	cmpq	$1, %rax
	ja	LBB0_5
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r14)
LBB0_8:
	movq	(%r14), %rax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sysfs_path,8,3                 ## @sysfs_path
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SYSFS_PATH"

	.comm	_IBV_SYSFS_PATH_MAX,4,2         ## @IBV_SYSFS_PATH_MAX
L_.str.1:                               ## @.str.1
	.asciz	"/sys"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibv_get_sysfs_path             ; -- Begin function ibv_get_sysfs_path
	.p2align	2
_ibv_get_sysfs_path:                    ; @ibv_get_sysfs_path
	.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
Lloh0:
	adrp	x20, _sysfs_path@GOTPAGE
Lloh1:
	ldr	x20, [x20, _sysfs_path@GOTPAGEOFF]
	ldr	x0, [x20]
	cbnz	x0, LBB0_9
; %bb.1:
	bl	_getuid
	mov	x19, x0
	bl	_geteuid
	cmp	x19, x0
	b.ne	LBB0_7
; %bb.2:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_7
; %bb.3:
Lloh4:
	adrp	x8, _IBV_SYSFS_PATH_MAX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IBV_SYSFS_PATH_MAX@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_strndup
	mov	x19, x0
	str	x0, [x20]
	bl	_strlen
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.4:
	mov	w8, w0
	add	x8, x8, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	w9, w8, #2
	ldrb	w10, [x19, x9]
	cmp	w10, #47
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	strb	wzr, [x19, x9]
	sub	x8, x8, #1
	cmp	x8, #1
	b.hi	LBB0_5
	b	LBB0_8
LBB0_7:
Lloh7:
	adrp	x8, l_.str.1@PAGE
Lloh8:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x20]
LBB0_8:
	ldr	x0, [x20]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_sysfs_path,8,3                 ; @sysfs_path
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SYSFS_PATH"

	.comm	_IBV_SYSFS_PATH_MAX,4,2         ; @IBV_SYSFS_PATH_MAX
l_.str.1:                               ; @.str.1
	.asciz	"/sys"

.subsections_via_symbols
