	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_gpio_irq_set_type
_cdns_gpio_irq_set_type:                ## @cdns_gpio_irq_set_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_gpiochip_get_data
	movq	%rax, %r12
	movl	(%r14), %edi
	callq	_BIT
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%eax, %ebx
	callq	_spin_lock_irqsave
	movq	_CDNS_GPIO_IRQ_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_ioread32
	movl	%eax, %r13d
	movl	%ebx, %r15d
	notl	%r15d
	movq	_CDNS_GPIO_IRQ_TYPE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_ioread32
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r14d
	movq	_IRQ_TYPE_LEVEL_HIGH@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_2
## %bb.1:
	andl	%r15d, %r14d
	orl	%ebx, %r13d
	jmp	LBB0_4
LBB0_2:
	movq	_IRQ_TYPE_LEVEL_LOW@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_6
## %bb.3:
	andl	%r15d, %r13d
LBB0_4:
	orl	%ebx, %r14d
	movq	_CDNS_GPIO_IRQ_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movl	%r13d, %edi
	callq	_iowrite32
	movq	_CDNS_GPIO_IRQ_TYPE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movl	%r14d, %edi
	callq	_iowrite32
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDNS_GPIO_IRQ_VALUE,8,3        ## @CDNS_GPIO_IRQ_VALUE
	.comm	_CDNS_GPIO_IRQ_TYPE,8,3         ## @CDNS_GPIO_IRQ_TYPE
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ## @IRQ_TYPE_LEVEL_HIGH
	.comm	_IRQ_TYPE_LEVEL_LOW,4,2         ## @IRQ_TYPE_LEVEL_LOW
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cdns_gpio_irq_set_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_gpio_irq_set_type
_cdns_gpio_irq_set_type:                ; @cdns_gpio_irq_set_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	x22, x1
	mov	x21, x0
	bl	_irq_data_get_irq_chip_data
	mov	x19, x0
	bl	_gpiochip_get_data
	mov	x20, x0
	ldr	w0, [x21]
	bl	_BIT
	mov	x21, x0
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
Lloh0:
	adrp	x24, _CDNS_GPIO_IRQ_VALUE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _CDNS_GPIO_IRQ_VALUE@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_ioread32
	mov	x23, x0
	mvn	w26, w21
	ldr	x8, [x20]
Lloh2:
	adrp	x25, _CDNS_GPIO_IRQ_TYPE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _CDNS_GPIO_IRQ_TYPE@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_ioread32
Lloh4:
	adrp	x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_2
; %bb.1:
	and	w0, w0, w26
	orr	w8, w23, w21
	b	LBB0_4
LBB0_2:
Lloh7:
	adrp	x8, _IRQ_TYPE_LEVEL_LOW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IRQ_TYPE_LEVEL_LOW@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_5
; %bb.3:
	and	w8, w23, w26
LBB0_4:
	orr	w21, w0, w21
	ldr	x9, [x20]
	ldr	x10, [x24]
	add	x1, x10, x9
	mov	x0, x8
	bl	_iowrite32
	ldr	x8, [x20]
	ldr	x9, [x25]
	add	x1, x9, x8
	mov	x0, x21
	bl	_iowrite32
	mov	w20, #0
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CDNS_GPIO_IRQ_VALUE,8,3        ; @CDNS_GPIO_IRQ_VALUE
	.comm	_CDNS_GPIO_IRQ_TYPE,8,3         ; @CDNS_GPIO_IRQ_TYPE
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ; @IRQ_TYPE_LEVEL_HIGH
	.comm	_IRQ_TYPE_LEVEL_LOW,4,2         ; @IRQ_TYPE_LEVEL_LOW
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cdns_gpio_irq_set_type
.subsections_via_symbols
