	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiochip_remove                ## -- Begin function gpiochip_remove
	.p2align	4, 0x90
_gpiochip_remove:                       ## @gpiochip_remove
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_gpio_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movl	(%r15), %esi
	movl	4(%r15), %edx
	leal	(%rdx,%rsi), %eax
	cmpl	%eax, %esi
	jae	LBB0_6
## %bb.1:
	movq	%rsi, %r13
	shlq	$4, %r13
	orq	$8, %r13
	movq	_FLAG_REQUESTED@GOTPCREL(%rip), %r14
	movq	_gpio_desc@GOTPCREL(%rip), %r12
	movq	%rsi, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	(%r12), %rsi
	addq	%r13, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movl	(%r15), %esi
	movl	4(%r15), %edx
	leal	(%rdx,%rsi), %eax
	addq	$16, %r13
	cmpq	%rax, %rbx
	jb	LBB0_3
	jmp	LBB0_6
LBB0_4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.15:
	negl	%r14d
	movq	_gpio_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_16
LBB0_5:
	movl	(%r15), %esi
	movl	4(%r15), %edx
LBB0_6:
	addl	%esi, %edx
	cmpl	%edx, %esi
	jae	LBB0_14
## %bb.7:
	movl	%esi, %eax
	movl	%edx, %ecx
	subl	%esi, %edx
	movq	%rax, %r8
	notq	%r8
	addq	%rcx, %r8
	andq	$3, %rdx
	je	LBB0_11
## %bb.8:
	movq	%rax, %rdi
	shlq	$4, %rdi
	negq	%rdx
	xorl	%ebx, %ebx
	movq	_gpio_desc@GOTPCREL(%rip), %r9
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r9), %rsi
	movq	$0, (%rsi,%rdi)
	decq	%rbx
	addq	$16, %rdi
	cmpq	%rbx, %rdx
	jne	LBB0_9
## %bb.10:
	subq	%rbx, %rax
LBB0_11:
	cmpq	$3, %r8
	jb	LBB0_14
## %bb.12:
	subq	%rax, %rcx
	shlq	$4, %rax
	movq	_gpio_desc@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rsi
	movq	$0, (%rsi,%rax)
	movq	(%rdx), %rsi
	movq	$0, 16(%rsi,%rax)
	movq	(%rdx), %rsi
	movq	$0, 32(%rsi,%rax)
	movq	(%rdx), %rsi
	movq	$0, 48(%rsi,%rax)
	addq	$64, %rax
	addq	$-4, %rcx
	jne	LBB0_13
LBB0_14:
	movq	_gpio_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	callq	_gpiochip_unexport
	xorl	%r14d, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gpio_lock,4,2                  ## @gpio_lock
	.comm	_FLAG_REQUESTED,4,2             ## @FLAG_REQUESTED
	.comm	_gpio_desc,8,3                  ## @gpio_desc
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gpiochip_remove                ; -- Begin function gpiochip_remove
	.p2align	2
_gpiochip_remove:                       ; @gpiochip_remove
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, _gpio_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _gpio_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	ldp	w20, w8, [x19]
	add	w9, w8, w20
	cmp	w20, w9
	b.hs	LBB0_8
; %bb.1:
	mov	w21, #8
	bfi	x21, x20, #4, #32
Lloh2:
	adrp	x22, _FLAG_REQUESTED@GOTPAGE
Lloh3:
	ldr	x22, [x22, _FLAG_REQUESTED@GOTPAGEOFF]
Lloh4:
	adrp	x23, _gpio_desc@GOTPAGE
Lloh5:
	ldr	x23, [x23, _gpio_desc@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	ldr	x8, [x23]
	add	x1, x8, x21
	bl	_test_bit
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	ldp	w9, w8, [x19]
	add	x21, x21, #16
	add	w10, w8, w9
	cmp	x20, x10
	b.lo	LBB0_2
; %bb.4:
	mov	x20, x9
	b	LBB0_8
LBB0_5:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbz	w8, LBB0_7
; %bb.6:
	neg	w19, w8
Lloh9:
	adrp	x0, _gpio_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _gpio_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	b	LBB0_12
LBB0_7:
	ldp	w20, w8, [x19]
LBB0_8:
	add	w9, w8, w20
	cmp	w20, w9
	b.hs	LBB0_11
; %bb.9:
	mov	w10, w20
	lsl	x8, x10, #4
	sub	x9, x9, x10
Lloh11:
	adrp	x10, _gpio_desc@GOTPAGE
Lloh12:
	ldr	x10, [x10, _gpio_desc@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	str	xzr, [x11, x8]
	add	x8, x8, #16
	subs	x9, x9, #1
	b.ne	LBB0_10
LBB0_11:
Lloh13:
	adrp	x0, _gpio_lock@GOTPAGE
Lloh14:
	ldr	x0, [x0, _gpio_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_gpiochip_unexport
	mov	w19, #0
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_gpio_lock,4,2                  ; @gpio_lock
	.comm	_FLAG_REQUESTED,4,2             ; @FLAG_REQUESTED
	.comm	_gpio_desc,8,3                  ; @gpio_desc
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
