	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pl061_irq_type
_pl061_irq_type:                        ## @pl061_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, %r12d
	movl	%edi, %ebx
	callq	_get_irq_chip_data
	subl	(%rax), %ebx
	js	LBB0_2
## %bb.1:
	movq	%rax, %r13
	movq	_PL061_GPIO_NR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jg	LBB0_2
## %bb.3:
	movq	%r13, %r14
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_GPIOIEV@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r13), %rdi
	callq	_readb
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_GPIOIS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r13), %rdi
	callq	_readb
	movq	_IRQ_TYPE_LEVEL_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_IRQ_TYPE_LEVEL_LOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	%edx, %esi
	movl	$1, %r15d
	movl	%ebx, %ecx
	shll	%cl, %r15d
	testl	%r12d, %esi
	je	LBB0_7
## %bb.4:
	orl	%r15d, %eax
	testl	%r12d, %edx
	je	LBB0_6
## %bb.5:
	orl	%r15d, -44(%rbp)                ## 4-byte Folded Spill
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_7:
	movl	%r15d, %ecx
	notl	%ecx
	andl	%ecx, %eax
	jmp	LBB0_8
LBB0_6:
	movl	%r15d, %ecx
	notl	%ecx
	andl	%ecx, -44(%rbp)                 ## 4-byte Folded Spill
LBB0_8:
	movq	_GPIOIS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	8(%r13), %rsi
	movl	%eax, %edi
	callq	_writeb
	movq	_GPIOIBE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r13), %rdi
	callq	_readb
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rcx
	movl	%r12d, %edx
	notl	%edx
	testl	%edx, (%rcx)
	jne	LBB0_10
## %bb.9:
	orl	%r15d, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_13
LBB0_10:
	movl	%r15d, %ecx
	notl	%ecx
	andl	%ecx, %eax
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	je	LBB0_12
## %bb.11:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	orl	%r15d, %ebx
	jmp	LBB0_13
LBB0_12:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	andl	%ecx, %ebx
LBB0_13:
	movq	_GPIOIBE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	8(%r13), %rsi
	movl	%eax, %edi
	callq	_writeb
	movq	_GPIOIEV@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r13), %rsi
	movl	%ebx, %edi
	callq	_writeb
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PL061_GPIO_NR,4,2              ## @PL061_GPIO_NR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GPIOIEV,8,3                    ## @GPIOIEV
	.comm	_GPIOIS,8,3                     ## @GPIOIS
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ## @IRQ_TYPE_LEVEL_HIGH
	.comm	_IRQ_TYPE_LEVEL_LOW,4,2         ## @IRQ_TYPE_LEVEL_LOW
	.comm	_GPIOIBE,8,3                    ## @GPIOIBE
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.no_dead_strip	_pl061_irq_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pl061_irq_type
_pl061_irq_type:                        ; @pl061_irq_type
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x20, x0
	bl	_get_irq_chip_data
	ldr	w8, [x0]
	subs	w24, w20, w8
	b.mi	LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _PL061_GPIO_NR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PL061_GPIO_NR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w24, w8
	b.gt	LBB0_4
; %bb.2:
	mov	x19, x0
	add	x20, x0, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x23, _GPIOIEV@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GPIOIEV@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readb
	mov	x22, x0
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x25, _GPIOIS@GOTPAGE
Lloh6:
	ldr	x25, [x25, _GPIOIS@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readb
Lloh7:
	adrp	x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGEOFF]
Lloh9:
	adrp	x9, _IRQ_TYPE_LEVEL_LOW@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IRQ_TYPE_LEVEL_LOW@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	ldr	w9, [x9]
	orr	w9, w9, w8
	mov	w10, #1
	lsl	w24, w10, w24
	tst	w9, w21
	b.eq	LBB0_5
; %bb.3:
	orr	w0, w0, w24
	tst	w8, w21
	bic	w8, w22, w24
	orr	w9, w22, w24
	csel	w22, w8, w9, eq
	b	LBB0_6
LBB0_4:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_5:
	bic	w0, w0, w24
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writeb
	ldr	x8, [x19, #8]
Lloh16:
	adrp	x25, _GPIOIBE@GOTPAGE
Lloh17:
	ldr	x25, [x25, _GPIOIBE@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readb
Lloh18:
	adrp	x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	bics	wzr, w8, w21
	b.ne	LBB0_8
; %bb.7:
	orr	w0, w0, w24
	b	LBB0_9
LBB0_8:
	mvn	w8, w24
Lloh21:
	adrp	x9, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
	bic	w0, w0, w24
Lloh23:
	ldr	w9, [x9]
	tst	w9, w21
	and	w8, w22, w8
	orr	w9, w22, w24
	csel	w22, w8, w9, eq
LBB0_9:
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writeb
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writeb
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_PL061_GPIO_NR,4,2              ; @PL061_GPIO_NR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GPIOIEV,8,3                    ; @GPIOIEV
	.comm	_GPIOIS,8,3                     ; @GPIOIS
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ; @IRQ_TYPE_LEVEL_HIGH
	.comm	_IRQ_TYPE_LEVEL_LOW,4,2         ; @IRQ_TYPE_LEVEL_LOW
	.comm	_GPIOIBE,8,3                    ; @GPIOIBE
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.no_dead_strip	_pl061_irq_type
.subsections_via_symbols
