	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_gpiochip_request_irq
_acpi_gpiochip_request_irq:             ## @acpi_gpiochip_request_irq
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %ecx
	movl	8(%rsi), %edi
	movq	16(%rsi), %rdx
	leaq	L_.str(%rip), %r8
	xorl	%esi, %esi
	movq	%rbx, %r9
	callq	_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_1
## %bb.10:
	movq	(%r14), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_1:
	cmpq	$0, 32(%rbx)
	je	LBB0_3
## %bb.2:
	movl	8(%rbx), %edi
	callq	_enable_irq_wake
LBB0_3:
	movl	$1, 4(%rbx)
	movq	_run_edge_events_on_boot@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.4:
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %r15
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	orl	(%r15), %eax
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.5:
	movl	24(%rbx), %edi
	callq	_gpiod_get_raw_value_cansleep
	movl	(%rbx), %ecx
	testl	%ecx, (%r15)
	je	LBB0_7
## %bb.6:
	cmpl	$1, %eax
	je	LBB0_11
LBB0_7:
	testl	%ecx, (%r14)
	je	LBB0_9
## %bb.8:
	testl	%eax, %eax
	jne	LBB0_9
LBB0_11:
	movq	16(%rbx), %rax
	movl	8(%rbx), %edi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ACPI:Event"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to setup interrupt handler for %d\n"

	.comm	_run_edge_events_on_boot,8,3    ## @run_edge_events_on_boot
	.comm	_IRQF_TRIGGER_RISING,4,2        ## @IRQF_TRIGGER_RISING
	.comm	_IRQF_TRIGGER_FALLING,4,2       ## @IRQF_TRIGGER_FALLING
	.no_dead_strip	_acpi_gpiochip_request_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_gpiochip_request_irq
_acpi_gpiochip_request_irq:             ; @acpi_gpiochip_request_irq
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #8]
	ldr	x2, [x1, #16]
	ldr	w3, [x1]
Lloh0:
	adrp	x4, l_.str@PAGE
Lloh1:
	add	x4, x4, l_.str@PAGEOFF
	mov	x1, #0
	mov	x5, x19
	bl	_request_threaded_irq
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldr	w2, [x19, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@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_2:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_enable_irq_wake
LBB0_4:
	mov	w8, #1
	str	w8, [x19, #4]
Lloh4:
	adrp	x8, _run_edge_events_on_boot@GOTPAGE
Lloh5:
	ldr	x8, [x8, _run_edge_events_on_boot@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.5:
	ldr	w8, [x19]
Lloh7:
	adrp	x21, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh8:
	ldr	x21, [x21, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh9:
	adrp	x20, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh10:
	ldr	x20, [x20, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
	ldr	w10, [x20]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	ldr	w0, [x19, #24]
	bl	_gpiod_get_raw_value_cansleep
	ldr	w8, [x19]
	ldr	w9, [x21]
	and	w9, w9, w8
	cmp	w9, #0
	ccmp	w0, #1, #0, ne
	b.eq	LBB0_9
; %bb.7:
	ldr	w9, [x20]
	and	w8, w9, w8
	cmp	w8, #0
	ccmp	w0, #0, #0, ne
	b.eq	LBB0_9
LBB0_8:
	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_9:
	ldr	x2, [x19, #16]
	ldr	w0, [x19, #8]
	mov	x1, x19
	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
	br	x2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ACPI:Event"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to setup interrupt handler for %d\n"

	.comm	_run_edge_events_on_boot,8,3    ; @run_edge_events_on_boot
	.comm	_IRQF_TRIGGER_RISING,4,2        ; @IRQF_TRIGGER_RISING
	.comm	_IRQF_TRIGGER_FALLING,4,2       ; @IRQF_TRIGGER_FALLING
	.no_dead_strip	_acpi_gpiochip_request_irq
.subsections_via_symbols
