	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_gpio_irq_set_type
_bcm2835_gpio_irq_set_type:             ## @bcm2835_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
	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, %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_irqd_to_hwirq
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_GPIO_REG_SHIFT
	movl	%eax, %r14d
	movl	%r13d, %edi
	callq	_GPIO_REG_OFFSET
	movl	%eax, %ebx
	shlq	$2, %rbx
	movq	(%r12), %rdi
	addq	%rbx, %rdi
	callq	_raw_spin_lock_irqsave
	movq	8(%r12), %rsi
	addq	%rbx, %rsi
	movl	%r14d, %edi
	callq	_test_bit
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	callq	___bcm2835_gpio_irq_set_type_enabled
	jmp	LBB0_3
LBB0_2:
	callq	___bcm2835_gpio_irq_set_type_disabled
LBB0_3:
	movl	%eax, %r13d
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	jne	LBB0_4
## %bb.5:
	movq	_handle_level_irq@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_handle_edge_irq@GOTPCREL(%rip), %rax
LBB0_6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rax), %esi
	callq	_irq_set_handler_locked
	addq	(%r12), %rbx
	movq	%rbx, %rdi
	callq	_raw_spin_unlock_irqrestore
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_handle_edge_irq,4,2            ## @handle_edge_irq
	.comm	_handle_level_irq,4,2           ## @handle_level_irq
	.no_dead_strip	_bcm2835_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 bcm2835_gpio_irq_set_type
_bcm2835_gpio_irq_set_type:             ; @bcm2835_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	x20, x1
	mov	x19, x0
	bl	_irq_data_get_irq_chip_data
	bl	_gpiochip_get_data
	mov	x21, x0
	mov	x0, x19
	bl	_irqd_to_hwirq
	mov	x22, x0
	bl	_GPIO_REG_SHIFT
	mov	x23, x0
	mov	x0, x22
	bl	_GPIO_REG_OFFSET
	ldr	x8, [x21]
	mov	w24, w0
	lsl	x25, x24, #2
	add	x0, x8, x25
	bl	_raw_spin_lock_irqsave
	ldr	x8, [x21, #8]
	add	x1, x8, x25
	mov	x0, x23
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	___bcm2835_gpio_irq_set_type_enabled
	b	LBB0_3
LBB0_2:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	___bcm2835_gpio_irq_set_type_disabled
LBB0_3:
	mov	x22, x0
Lloh0:
	adrp	x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh2:
	adrp	x9, _handle_level_irq@GOTPAGE
Lloh3:
	ldr	x9, [x9, _handle_level_irq@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x10, _handle_edge_irq@GOTPAGE
Lloh6:
	ldr	x10, [x10, _handle_edge_irq@GOTPAGEOFF]
	tst	w8, w20
	csel	x8, x9, x10, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irq_set_handler_locked
	ldr	x8, [x21]
	add	x0, x8, x24, lsl #2
	bl	_raw_spin_unlock_irqrestore
	mov	x0, x22
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_handle_edge_irq,4,2            ; @handle_edge_irq
	.comm	_handle_level_irq,4,2           ; @handle_level_irq
	.no_dead_strip	_bcm2835_gpio_irq_set_type
.subsections_via_symbols
