	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_gpiochip_alloc_event
_acpi_gpiochip_alloc_event:             ## @acpi_gpiochip_alloc_event
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	8(%rsi), %r13
	leaq	-56(%rbp), %rsi
	callq	_acpi_gpio_get_irq_resource
	movq	_AE_OK@GOTPCREL(%rip), %r14
	testl	%eax, %eax
	je	LBB0_19
## %bb.1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	callq	_ACPI_HANDLE
	movl	%eax, %ebx
	movq	-56(%rbp), %rax
	movq	(%rax), %rcx
	movl	(%rcx), %r15d
	cmpl	$255, %r15d
	jg	LBB0_4
## %bb.2:
	movq	8(%rax), %rax
	movq	_ACPI_EDGE_SENSITIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$69, %eax
	movl	$76, %edx
	cmovel	%eax, %edx
	leaq	L_.str(%rip), %rsi
	leaq	-69(%rbp), %r12
	movq	%r12, %rdi
	movl	%r15d, %ecx
	callq	_sprintf
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_acpi_get_handle
	movl	%eax, %edi
	callq	_ACPI_SUCCESS
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_acpi_gpio_irq_handler@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	jne	LBB0_6
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	callq	_acpi_get_handle
	movl	%eax, %edi
	callq	_ACPI_SUCCESS
	testq	%rax, %rax
	je	LBB0_19
## %bb.5:
	movq	_acpi_gpio_irq_handler_evt@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	je	LBB0_19
LBB0_6:
	movq	_GPIO_ACTIVE_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GPIOD_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_gpiochip_request_own_desc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_18
LBB0_8:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_gpiochip_lock_as_irq
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_17
LBB0_10:
	movq	%rbx, %rdi
	callq	_gpiod_to_irq
	testl	%eax, %eax
	js	LBB0_15
## %bb.11:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%rax)
	movq	-56(%rbp), %rcx
	movq	8(%rcx), %rdi
	movq	_ACPI_LEVEL_SENSITIVE@GOTPCREL(%rip), %r8
	movl	16(%rcx), %esi
	cmpq	(%r8), %rdi
	jne	LBB0_20
## %bb.13:
	cmpl	$129, %esi
	jne	LBB0_23
## %bb.14:
	movq	_IRQF_TRIGGER_HIGH@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	jmp	LBB0_26
LBB0_15:
	movl	(%r13), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_err
LBB0_16:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_gpiochip_unlock_as_irq
LBB0_17:
	movq	%rbx, %rdi
	callq	_gpiochip_free_own_desc
LBB0_18:
	movq	_AE_ERROR@GOTPCREL(%rip), %r14
LBB0_19:
	movl	(%r14), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	cmpl	$128, %esi
	je	LBB0_24
## %bb.21:
	cmpl	$129, %esi
	jne	LBB0_25
## %bb.22:
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	jmp	LBB0_26
LBB0_23:
	movq	_IRQF_TRIGGER_LOW@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	jmp	LBB0_26
LBB0_24:
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	jmp	LBB0_26
LBB0_25:
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %rsi
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rdi
	orl	(%rsi), %edx
	orl	(%rdi), %edx
LBB0_26:
	movl	%edx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, 40(%rax)
	movq	%r12, 32(%rax)
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, 4(%rax)
	movq	24(%rcx), %rcx
	movq	_ACPI_WAKE_CAPABLE@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	cmpq	(%rdx), %rcx
	sete	%sil
	movl	%esi, 8(%rax)
	movl	%r15d, 12(%rax)
	movq	%rbx, 24(%rax)
	addq	$16, %rax
	movq	%rax, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add_tail
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_AE_OK,4,2                      ## @AE_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_%c%02hhX"

	.comm	_ACPI_EDGE_SENSITIVE,8,3        ## @ACPI_EDGE_SENSITIVE
	.comm	_acpi_gpio_irq_handler,8,3      ## @acpi_gpio_irq_handler
L_.str.1:                               ## @.str.1
	.asciz	"_EVT"

	.comm	_acpi_gpio_irq_handler_evt,8,3  ## @acpi_gpio_irq_handler_evt
L_.str.2:                               ## @.str.2
	.asciz	"ACPI:Event"

	.comm	_GPIO_ACTIVE_HIGH,4,2           ## @GPIO_ACTIVE_HIGH
	.comm	_GPIOD_IN,4,2                   ## @GPIOD_IN
L_.str.3:                               ## @.str.3
	.asciz	"Failed to request GPIO\n"

	.comm	_AE_ERROR,4,2                   ## @AE_ERROR
L_.str.4:                               ## @.str.4
	.asciz	"Failed to lock GPIO as interrupt\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to translate GPIO to IRQ\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
	.comm	_ACPI_LEVEL_SENSITIVE,8,3       ## @ACPI_LEVEL_SENSITIVE
	.comm	_IRQF_TRIGGER_HIGH,4,2          ## @IRQF_TRIGGER_HIGH
	.comm	_IRQF_TRIGGER_LOW,4,2           ## @IRQF_TRIGGER_LOW
	.comm	_IRQF_TRIGGER_RISING,4,2        ## @IRQF_TRIGGER_RISING
	.comm	_IRQF_TRIGGER_FALLING,4,2       ## @IRQF_TRIGGER_FALLING
	.comm	_ACPI_WAKE_CAPABLE,8,3          ## @ACPI_WAKE_CAPABLE
	.no_dead_strip	_acpi_gpiochip_alloc_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_gpiochip_alloc_event
_acpi_gpiochip_alloc_event:             ; @acpi_gpiochip_alloc_event
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	ldr	x21, [x1, #8]
	add	x1, sp, #24
	bl	_acpi_gpio_get_irq_resource
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x21]
	bl	_ACPI_HANDLE
	mov	x22, x0
	ldr	x8, [sp, #24]
	ldr	x9, [x8]
	ldr	w20, [x9]
	cmp	w20, #255
	b.gt	LBB0_3
; %bb.2:
Lloh0:
	adrp	x9, _ACPI_EDGE_SENSITIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ACPI_EDGE_SENSITIVE@GOTPAGEOFF]
	ldr	x8, [x8, #8]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #76
	mov	w9, #69
	csel	w2, w9, w8, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #15
	mov	x3, x20
	bl	_sprintf
	add	x1, sp, #15
	add	x2, sp, #20
	mov	x0, x22
	bl	_acpi_get_handle
	bl	_ACPI_SUCCESS
Lloh5:
	adrp	x8, _acpi_gpio_irq_handler@GOTPAGE
Lloh6:
	ldr	x8, [x8, _acpi_gpio_irq_handler@GOTPAGEOFF]
Lloh7:
	ldr	x24, [x8]
	cmp	x0, #0
	ccmp	x24, #0, #4, ne
	b.ne	LBB0_5
LBB0_3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #20
	mov	x0, x22
	bl	_acpi_get_handle
	bl	_ACPI_SUCCESS
Lloh10:
	adrp	x8, _acpi_gpio_irq_handler_evt@GOTPAGE
Lloh11:
	ldr	x8, [x8, _acpi_gpio_irq_handler_evt@GOTPAGEOFF]
Lloh12:
	ldr	x24, [x8]
	cmp	x0, #0
	ccmp	x24, #0, #4, ne
	b.ne	LBB0_5
LBB0_4:
Lloh13:
	adrp	x8, _AE_OK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
	b	LBB0_18
LBB0_5:
Lloh15:
	adrp	x8, _GPIO_ACTIVE_HIGH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GPIO_ACTIVE_HIGH@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
Lloh18:
	adrp	x8, _GPIOD_IN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GPIOD_IN@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
Lloh21:
	adrp	x2, l_.str.2@PAGE
Lloh22:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x1, x20
	bl	_gpiochip_request_own_desc
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x21]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_17
LBB0_7:
	mov	x0, x21
	mov	x1, x20
	bl	_gpiochip_lock_as_irq
	cbz	w0, LBB0_9
; %bb.8:
	ldr	w0, [x21]
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	b	LBB0_16
LBB0_9:
	mov	x0, x22
	bl	_gpiod_to_irq
	tbnz	w0, #31, LBB0_14
; %bb.10:
	mov	x23, x0
Lloh27:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_15
; %bb.11:
Lloh30:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x8]
	str	w9, [x0]
	ldr	x8, [sp, #24]
	ldr	x11, [x8, #8]
Lloh33:
	adrp	x10, _ACPI_LEVEL_SENSITIVE@GOTPAGE
Lloh34:
	ldr	x10, [x10, _ACPI_LEVEL_SENSITIVE@GOTPAGEOFF]
Lloh35:
	ldr	x12, [x10]
	ldr	w10, [x8, #16]
	cmp	x11, x12
	b.ne	LBB0_19
; %bb.12:
	cmp	w10, #129
	b.ne	LBB0_22
; %bb.13:
Lloh36:
	adrp	x10, _IRQF_TRIGGER_HIGH@GOTPAGE
Lloh37:
	ldr	x10, [x10, _IRQF_TRIGGER_HIGH@GOTPAGEOFF]
	b	LBB0_24
LBB0_14:
	ldr	w0, [x21]
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
LBB0_15:
	mov	x0, x21
	mov	x1, x20
	bl	_gpiochip_unlock_as_irq
LBB0_16:
	mov	x0, x22
	bl	_gpiochip_free_own_desc
LBB0_17:
Lloh40:
	adrp	x8, _AE_ERROR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _AE_ERROR@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_19:
	cmp	w10, #128
	b.eq	LBB0_23
; %bb.20:
	cmp	w10, #129
	b.ne	LBB0_26
; %bb.21:
Lloh42:
	adrp	x10, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh43:
	ldr	x10, [x10, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
	b	LBB0_24
LBB0_22:
Lloh44:
	adrp	x10, _IRQF_TRIGGER_LOW@GOTPAGE
Lloh45:
	ldr	x10, [x10, _IRQF_TRIGGER_LOW@GOTPAGEOFF]
	b	LBB0_24
LBB0_23:
Lloh46:
	adrp	x10, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh47:
	ldr	x10, [x10, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
LBB0_24:
	ldr	w10, [x10]
	orr	w9, w10, w9
LBB0_25:
	stp	w9, w23, [x0]
	ldr	w9, [sp, #20]
	str	w9, [x0, #40]
	str	x24, [x0, #32]
	ldr	x8, [x8, #24]
Lloh48:
	adrp	x9, _ACPI_WAKE_CAPABLE@GOTPAGE
Lloh49:
	ldr	x9, [x9, _ACPI_WAKE_CAPABLE@GOTPAGEOFF]
Lloh50:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
	stp	w8, w20, [x0, #8]
	str	x22, [x0, #24]
	add	x0, x0, #16
	mov	x1, x19
	bl	_list_add_tail
	b	LBB0_4
LBB0_26:
Lloh51:
	adrp	x10, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh52:
	ldr	x10, [x10, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
Lloh53:
	ldr	w10, [x10]
Lloh54:
	adrp	x11, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh55:
	ldr	x11, [x11, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
Lloh56:
	ldr	w11, [x11]
	orr	w9, w10, w9
	orr	w9, w9, w11
	b	LBB0_25
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_AE_OK,4,2                      ; @AE_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_%c%02hhX"

	.comm	_ACPI_EDGE_SENSITIVE,8,3        ; @ACPI_EDGE_SENSITIVE
	.comm	_acpi_gpio_irq_handler,8,3      ; @acpi_gpio_irq_handler
l_.str.1:                               ; @.str.1
	.asciz	"_EVT"

	.comm	_acpi_gpio_irq_handler_evt,8,3  ; @acpi_gpio_irq_handler_evt
l_.str.2:                               ; @.str.2
	.asciz	"ACPI:Event"

	.comm	_GPIO_ACTIVE_HIGH,4,2           ; @GPIO_ACTIVE_HIGH
	.comm	_GPIOD_IN,4,2                   ; @GPIOD_IN
l_.str.3:                               ; @.str.3
	.asciz	"Failed to request GPIO\n"

	.comm	_AE_ERROR,4,2                   ; @AE_ERROR
l_.str.4:                               ; @.str.4
	.asciz	"Failed to lock GPIO as interrupt\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to translate GPIO to IRQ\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
	.comm	_ACPI_LEVEL_SENSITIVE,8,3       ; @ACPI_LEVEL_SENSITIVE
	.comm	_IRQF_TRIGGER_HIGH,4,2          ; @IRQF_TRIGGER_HIGH
	.comm	_IRQF_TRIGGER_LOW,4,2           ; @IRQF_TRIGGER_LOW
	.comm	_IRQF_TRIGGER_RISING,4,2        ; @IRQF_TRIGGER_RISING
	.comm	_IRQF_TRIGGER_FALLING,4,2       ; @IRQF_TRIGGER_FALLING
	.comm	_ACPI_WAKE_CAPABLE,8,3          ; @ACPI_WAKE_CAPABLE
	.no_dead_strip	_acpi_gpiochip_alloc_event
.subsections_via_symbols
