	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx_irq_type
_zx_irq_type:                           ## @zx_irq_type
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rdi
	callq	_gpiochip_get_data
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_irqd_to_hwirq
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_BIT
	testl	%ebx, %ebx
	js	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	movq	_ZX_GPIO_NR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	callq	_raw_spin_lock_irqsave
	movq	_ZX_GPIO_IV@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	callq	_readw_relaxed
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_ZX_GPIO_IVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	callq	_readw_relaxed
	movl	%eax, %ebx
	movq	_ZX_GPIO_IEP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	callq	_readw_relaxed
	movl	%eax, %r13d
	movq	_ZX_GPIO_IEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	callq	_readw_relaxed
	movl	%eax, %edx
	movq	_IRQ_TYPE_LEVEL_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IRQ_TYPE_LEVEL_LOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	testl	%r15d, %ecx
	je	LBB0_7
## %bb.4:
	orl	%r12d, %ebx
	testl	%r15d, %eax
	movl	%ebx, %edi
	je	LBB0_6
## %bb.5:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	orl	%r12d, %esi
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_7:
	movl	%r12d, %eax
	notl	%eax
	andl	%eax, %ebx
	movl	%ebx, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_8
LBB0_6:
	movl	%r12d, %eax
	notl	%eax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	andl	%eax, %esi
LBB0_8:
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rax
	movl	%r15d, %ecx
	notl	%ecx
	testl	%ecx, (%rax)
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_10
## %bb.9:
	orl	%r12d, %r13d
	orl	%r12d, %edx
	jmp	LBB0_14
LBB0_10:
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.11:
	orl	%r12d, %r13d
	notl	%r12d
	andl	%r12d, %edx
	jmp	LBB0_14
LBB0_12:
	movq	_IRQ_TYPE_EDGE_FALLING@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_14
## %bb.13:
	orl	%r12d, %edx
	notl	%r12d
	andl	%r12d, %r13d
LBB0_14:
	movq	_ZX_GPIO_IVE@GOTPCREL(%rip), %rax
	movq	_ZX_GPIO_IEP@GOTPCREL(%rip), %rbx
	movq	_ZX_GPIO_IEN@GOTPCREL(%rip), %r12
	movl	%edx, %r15d
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	callq	_writew_relaxed
	movq	(%rbx), %rsi
	addq	8(%r14), %rsi
	movl	%r13d, %edi
	callq	_writew_relaxed
	movq	(%r12), %rsi
	addq	8(%r14), %rsi
	movl	%r15d, %edi
	callq	_writew_relaxed
	movq	_ZX_GPIO_IV@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_writew_relaxed
	movq	%r14, %rdi
	callq	_raw_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ZX_GPIO_NR,4,2                 ## @ZX_GPIO_NR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ZX_GPIO_IV,8,3                 ## @ZX_GPIO_IV
	.comm	_ZX_GPIO_IVE,8,3                ## @ZX_GPIO_IVE
	.comm	_ZX_GPIO_IEP,8,3                ## @ZX_GPIO_IEP
	.comm	_ZX_GPIO_IEN,8,3                ## @ZX_GPIO_IEN
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ## @IRQ_TYPE_LEVEL_HIGH
	.comm	_IRQ_TYPE_LEVEL_LOW,4,2         ## @IRQ_TYPE_LEVEL_LOW
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ## @IRQ_TYPE_EDGE_FALLING
	.no_dead_strip	_zx_irq_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx_irq_type
_zx_irq_type:                           ; @zx_irq_type
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
	bl	_irq_data_get_irq_chip_data
	bl	_gpiochip_get_data
	mov	x19, x0
	mov	x0, x21
	bl	_irqd_to_hwirq
	mov	x22, x0
	bl	_BIT
	tbnz	w22, #31, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _ZX_GPIO_NR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ZX_GPIO_NR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ge	LBB0_4
; %bb.2:
	mov	x21, x0
	mov	x0, x19
	bl	_raw_spin_lock_irqsave
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x25, _ZX_GPIO_IV@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ZX_GPIO_IV@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readw_relaxed
	mov	x22, x0
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x26, _ZX_GPIO_IVE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _ZX_GPIO_IVE@GOTPAGEOFF]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readw_relaxed
	mov	x24, x0
	ldr	x8, [x19, #8]
Lloh7:
	adrp	x27, _ZX_GPIO_IEP@GOTPAGE
Lloh8:
	ldr	x27, [x27, _ZX_GPIO_IEP@GOTPAGEOFF]
	ldr	x9, [x27]
	add	x0, x9, x8
	bl	_readw_relaxed
	mov	x23, x0
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x28, _ZX_GPIO_IEN@GOTPAGE
Lloh10:
	ldr	x28, [x28, _ZX_GPIO_IEN@GOTPAGEOFF]
	ldr	x9, [x28]
	add	x0, x9, x8
	bl	_readw_relaxed
	mov	x8, x0
Lloh11:
	adrp	x9, _IRQ_TYPE_LEVEL_HIGH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IRQ_TYPE_LEVEL_HIGH@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _IRQ_TYPE_LEVEL_LOW@GOTPAGE
Lloh15:
	ldr	x10, [x10, _IRQ_TYPE_LEVEL_LOW@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w10, w10, w9
	bic	w11, w24, w21
	orr	w12, w24, w21
	tst	w9, w20
	bic	w9, w22, w21
	orr	w13, w22, w21
	csel	w9, w9, w13, eq
	tst	w10, w20
	csel	w0, w11, w12, eq
	csel	w22, w22, w9, eq
Lloh17:
	adrp	x9, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	bics	wzr, w9, w20
	b.ne	LBB0_5
; %bb.3:
	orr	w23, w23, w21
	orr	w20, w8, w21
	b	LBB0_8
LBB0_4:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
Lloh23:
	adrp	x9, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w20
	b.eq	LBB0_7
; %bb.6:
	orr	w23, w23, w21
	bic	w20, w8, w21
	b	LBB0_8
LBB0_7:
Lloh26:
	adrp	x9, _IRQ_TYPE_EDGE_FALLING@GOTPAGE
Lloh27:
	ldr	x9, [x9, _IRQ_TYPE_EDGE_FALLING@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w20
	orr	w9, w8, w21
	bic	w10, w23, w21
	csel	w23, w23, w10, eq
	csel	w20, w8, w9, eq
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	x9, [x26]
	add	x1, x9, x8
	bl	_writew_relaxed
	ldr	x8, [x19, #8]
	ldr	x9, [x27]
	add	x1, x9, x8
	mov	x0, x23
	bl	_writew_relaxed
	ldr	x8, [x19, #8]
	ldr	x9, [x28]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writew_relaxed
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writew_relaxed
	mov	x0, x19
	bl	_raw_spin_unlock_irqrestore
	mov	w0, #0
LBB0_9:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ZX_GPIO_NR,4,2                 ; @ZX_GPIO_NR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ZX_GPIO_IV,8,3                 ; @ZX_GPIO_IV
	.comm	_ZX_GPIO_IVE,8,3                ; @ZX_GPIO_IVE
	.comm	_ZX_GPIO_IEP,8,3                ; @ZX_GPIO_IEP
	.comm	_ZX_GPIO_IEN,8,3                ; @ZX_GPIO_IEN
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ; @IRQ_TYPE_LEVEL_HIGH
	.comm	_IRQ_TYPE_LEVEL_LOW,4,2         ; @IRQ_TYPE_LEVEL_LOW
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ; @IRQ_TYPE_EDGE_FALLING
	.no_dead_strip	_zx_irq_type
.subsections_via_symbols
