	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_gpiochip_add              ## -- Begin function acpi_gpiochip_add
	.p2align	4, 0x90
_acpi_gpiochip_add:                     ## @acpi_gpiochip_add
	.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
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_8
## %bb.2:
	callq	_ACPI_HANDLE
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	movl	%eax, %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	%rax, %r15
	movq	%rbx, 8(%rax)
	movq	%rax, %rdi
	addq	$4, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r15, %rdi
	callq	_INIT_LIST_HEAD
	movq	_acpi_gpio_chip_dh@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	movq	%r15, %rdx
	callq	_acpi_attach_data
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_5
## %bb.10:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_5:
	cmpl	$0, 4(%rbx)
	jne	LBB0_7
## %bb.6:
	movl	(%rbx), %edi
	callq	_dev_fwnode
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_devprop_gpiochip_set_names
LBB0_7:
	movq	%r15, %rdi
	callq	_acpi_gpiochip_request_regions
	movq	%r15, %rdi
	callq	_acpi_gpiochip_scan_gpios
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_acpi_walk_dep_device_list      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate memory for ACPI GPIO chip\n"

	.comm	_acpi_gpio_chip_dh,4,2          ## @acpi_gpio_chip_dh
L_.str.1:                               ## @.str.1
	.asciz	"Failed to attach ACPI GPIO chip\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_gpiochip_add              ; -- Begin function acpi_gpiochip_add
	.p2align	2
_acpi_gpiochip_add:                     ; @acpi_gpiochip_add
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0]
	cbz	w0, LBB0_6
; %bb.2:
	bl	_ACPI_HANDLE
	cbz	w0, LBB0_6
; %bb.3:
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x21, x0
	str	x19, [x0, #8]
	add	x0, x0, #4
	bl	_INIT_LIST_HEAD
	mov	x0, x21
	bl	_INIT_LIST_HEAD
Lloh3:
	adrp	x8, _acpi_gpio_chip_dh@GOTPAGE
Lloh4:
	ldr	x8, [x8, _acpi_gpio_chip_dh@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_acpi_attach_data
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_8
; %bb.5:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x21
	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	_kfree
LBB0_6:
	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
LBB0_7:
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	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	_dev_err
LBB0_8:
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_10
; %bb.9:
	ldr	w0, [x19]
	bl	_dev_fwnode
	mov	x1, x0
	mov	x0, x19
	bl	_devprop_gpiochip_set_names
LBB0_10:
	mov	x0, x21
	bl	_acpi_gpiochip_request_regions
	mov	x0, x21
	bl	_acpi_gpiochip_scan_gpios
	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	_acpi_walk_dep_device_list
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate memory for ACPI GPIO chip\n"

	.comm	_acpi_gpio_chip_dh,4,2          ; @acpi_gpio_chip_dh
l_.str.1:                               ; @.str.1
	.asciz	"Failed to attach ACPI GPIO chip\n"

.subsections_via_symbols
