	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_dev_gpio_irq_get          ## -- Begin function acpi_dev_gpio_irq_get
	.p2align	4, 0x90
_acpi_dev_gpio_irq_get:                 ## @acpi_dev_gpio_irq_get
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testl	%esi, %esi
	js	LBB0_9
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r14
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	%r15d, %r12d
	jg	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	leaq	-104(%rbp), %rcx
	callq	_acpi_get_gpiod_by_index
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_PTR_ERR
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, -88(%rbp)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r15d, %r12d
	jne	LBB0_7
## %bb.10:
	movq	_GPIO_LOOKUP_FLAGS_DEFAULT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
LBB0_4:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	jmp	LBB0_17
LBB0_9:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r13, %rdi
	callq	_gpiod_to_irq
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_17
## %bb.12:
	leaq	L_.str(%rip), %rdx
	leaq	-80(%rbp), %r12
	movq	%r12, %rdi
	movl	$32, %esi
	movl	%r15d, %ecx
	callq	_snprintf
	movl	-96(%rbp), %ecx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_gpiod_configure_flags
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	movl	-104(%rbp), %esi
	movl	-100(%rbp), %edi
	callq	_acpi_dev_get_irq_type
	movl	%eax, %ebx
	movq	_IRQ_TYPE_NONE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_17
## %bb.15:
	movl	%r14d, %edi
	callq	_irq_get_trigger_type
	cmpl	%eax, %ebx
	je	LBB0_17
## %bb.16:
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_irq_set_irq_type
	jmp	LBB0_17
LBB0_13:
	movl	%eax, %r14d
	jmp	LBB0_17
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_GPIO_LOOKUP_FLAGS_DEFAULT,8,3  ## @GPIO_LOOKUP_FLAGS_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GpioInt() %d"

	.comm	_IRQ_TYPE_NONE,4,2              ## @IRQ_TYPE_NONE
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_dev_gpio_irq_get          ; -- Begin function acpi_dev_gpio_irq_get
	.p2align	2
_acpi_dev_gpio_irq_get:                 ; @acpi_dev_gpio_irq_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	tbnz	w1, #31, LBB0_10
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	w23, #0
	mov	w22, #0
Lloh3:
	adrp	x24, _EPROBE_DEFER@GOTPAGE
Lloh4:
	ldr	x24, [x24, _EPROBE_DEFER@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w23, w23, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	cmp	w23, w19
	b.gt	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x3, sp
	mov	x0, x20
	mov	x1, #0
	mov	x2, x22
	bl	_acpi_get_gpiod_by_index
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_PTR_ERR
	ldr	w8, [x24]
	cmn	w0, w8
	b.ne	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w23, w19
	b.ne	LBB0_2
; %bb.8:
Lloh5:
	adrp	x8, _GPIO_LOOKUP_FLAGS_DEFAULT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GPIO_LOOKUP_FLAGS_DEFAULT@GOTPAGEOFF]
Lloh7:
	ldr	x22, [x8]
	mov	x0, x21
	bl	_IS_ERR
	cbz	x0, LBB0_13
LBB0_9:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x20, x0
	b	LBB0_11
LBB0_10:
Lloh8:
	adrp	x8, _ENOENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	ldr	x8, [sp, #56]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.12:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_13:
	mov	x0, x21
	bl	_gpiod_to_irq
	mov	x20, x0
	tbnz	w0, #31, LBB0_11
; %bb.14:
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #24
	mov	w1, #32
	mov	x3, x19
	bl	_snprintf
	ldr	w3, [sp, #8]
	add	x1, sp, #24
	mov	x0, x21
	mov	x2, x22
	bl	_gpiod_configure_flags
	tbnz	w0, #31, LBB0_18
; %bb.15:
	ldp	w1, w0, [sp]
	bl	_acpi_dev_get_irq_type
Lloh16:
	adrp	x8, _IRQ_TYPE_NONE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_TYPE_NONE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_11
; %bb.16:
	mov	x19, x0
	mov	x0, x20
	bl	_irq_get_trigger_type
	cmp	w19, w0
	b.eq	LBB0_11
; %bb.17:
	mov	x0, x20
	mov	x1, x19
	bl	_irq_set_irq_type
	b	LBB0_11
LBB0_18:
	mov	x20, x0
	b	LBB0_11
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_GPIO_LOOKUP_FLAGS_DEFAULT,8,3  ; @GPIO_LOOKUP_FLAGS_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GpioInt() %d"

	.comm	_IRQ_TYPE_NONE,4,2              ; @IRQ_TYPE_NONE
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
