	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiochip_sysfs_register        ## -- Begin function gpiochip_sysfs_register
	.p2align	4, 0x90
_gpiochip_sysfs_register:               ## @gpiochip_sysfs_register
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_gpio_class@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	movq	8(%r15), %rax
	leaq	8(%rdi), %rbx
	testq	%rax, %rax
	cmovneq	%rax, %rbx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_MKDEV
	movq	_gpiochip_groups@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	(%r15), %ecx
	movl	%ecx, (%rsp)
	movq	_gpio_class@GOTPCREL(%rip), %rdi
	leaq	L_.str(%rip), %r9
	movq	%rbx, %rsi
	movl	%eax, %edx
	movq	%r15, %rcx
	callq	_device_create_with_groups
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	movq	_sysfs_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%rbx, (%r14)
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gpio_class,4,2                 ## @gpio_class
	.comm	_gpiochip_groups,4,2            ## @gpiochip_groups
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gpiochip%d"

	.comm	_sysfs_lock,4,2                 ## @sysfs_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiochip_sysfs_register        ; -- Begin function gpiochip_sysfs_register
	.p2align	2
_gpiochip_sysfs_register:               ; @gpiochip_sysfs_register
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _gpio_class@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gpio_class@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	x8, [x20, #8]
	add	x9, x0, #8
	cmp	x8, #0
	csel	x21, x9, x8, eq
	mov	w0, #0
	mov	w1, #0
	bl	_MKDEV
	mov	x2, x0
Lloh3:
	adrp	x8, _gpiochip_groups@GOTPAGE
Lloh4:
	ldr	x8, [x8, _gpiochip_groups@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	ldr	w6, [x20]
Lloh6:
	adrp	x0, _gpio_class@GOTPAGE
Lloh7:
	ldr	x0, [x0, _gpio_class@GOTPAGEOFF]
Lloh8:
	adrp	x5, l_.str@PAGE
Lloh9:
	add	x5, x5, l_.str@PAGEOFF
	mov	x1, x21
	mov	x3, x20
	bl	_device_create_with_groups
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_3:
Lloh10:
	adrp	x21, _sysfs_lock@GOTPAGE
Lloh11:
	ldr	x21, [x21, _sysfs_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_mutex_lock
	str	x20, [x19]
	mov	x0, x21
	bl	_mutex_unlock
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_gpio_class,4,2                 ; @gpio_class
	.comm	_gpiochip_groups,4,2            ; @gpiochip_groups
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gpiochip%d"

	.comm	_sysfs_lock,4,2                 ; @sysfs_lock
.subsections_via_symbols
