	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ucb1x00_irq_set_type
_ucb1x00_irq_set_type:                  ## @ucb1x00_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rbx
	movl	(%r14), %ecx
	subl	(%rax), %ecx
	movl	$1, %r12d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	movq	%rax, %r14
	addq	$16, %r14
	movq	%r14, %rdi
	callq	_raw_spin_lock
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_2
## %bb.1:
	movl	4(%rbx), %edx
	orl	%r12d, %edx
	jmp	LBB0_3
LBB0_2:
	movl	%r12d, %edx
	notl	%edx
	andl	4(%rbx), %edx
LBB0_3:
	movl	%edx, 4(%rbx)
	movq	_IRQ_TYPE_EDGE_FALLING@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_5
## %bb.4:
	orl	%r12d, 8(%rbx)
	jmp	LBB0_6
LBB0_5:
	movl	%r12d, %eax
	notl	%eax
	andl	%eax, 8(%rbx)
LBB0_6:
	movl	12(%rbx), %eax
	testl	%r12d, %eax
	je	LBB0_8
## %bb.7:
	movq	_UCB_IE_RIS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	%eax, %edx
	movq	%rbx, %rdi
	callq	_ucb1x00_reg_write
	movq	_UCB_IE_FAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%rbx), %edx
	andl	8(%rbx), %edx
	movq	%rbx, %rdi
	callq	_ucb1x00_reg_write
LBB0_8:
	movq	%r14, %rdi
	callq	_raw_spin_unlock
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ## @IRQ_TYPE_EDGE_FALLING
	.comm	_UCB_IE_RIS,4,2                 ## @UCB_IE_RIS
	.comm	_UCB_IE_FAL,4,2                 ## @UCB_IE_FAL
	.no_dead_strip	_ucb1x00_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 ucb1x00_irq_set_type
_ucb1x00_irq_set_type:                  ; @ucb1x00_irq_set_type
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_irq_data_get_irq_chip_data
	mov	x20, x0
	ldr	w8, [x19]
	mov	x19, x0
	ldr	w9, [x19], #16
	sub	w8, w8, w9
	mov	w9, #1
	lsl	w22, w9, w8
	mov	x0, x19
	bl	_raw_spin_lock
Lloh0:
	adrp	x8, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x20, #4]
	orr	w8, w8, w22
	b	LBB0_3
LBB0_2:
	ldr	w8, [x20, #4]
	bic	w8, w8, w22
LBB0_3:
	str	w8, [x20, #4]
Lloh3:
	adrp	x9, _IRQ_TYPE_EDGE_FALLING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IRQ_TYPE_EDGE_FALLING@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_5
; %bb.4:
	ldr	w9, [x20, #8]
	orr	w9, w9, w22
	b	LBB0_6
LBB0_5:
	ldr	w9, [x20, #8]
	bic	w9, w9, w22
LBB0_6:
	str	w9, [x20, #8]
	ldr	w9, [x20, #12]
	tst	w9, w22
	b.eq	LBB0_8
; %bb.7:
Lloh6:
	adrp	x10, _UCB_IE_RIS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _UCB_IE_RIS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x10]
	and	w2, w8, w9
	mov	x0, x20
	bl	_ucb1x00_reg_write
Lloh9:
	adrp	x8, _UCB_IE_FAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _UCB_IE_FAL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldp	w8, w9, [x20, #8]
	and	w2, w9, w8
	mov	x0, x20
	bl	_ucb1x00_reg_write
LBB0_8:
	mov	x0, x19
	bl	_raw_spin_unlock
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ; @IRQ_TYPE_EDGE_FALLING
	.comm	_UCB_IE_RIS,4,2                 ; @UCB_IE_RIS
	.comm	_UCB_IE_FAL,4,2                 ; @UCB_IE_FAL
	.no_dead_strip	_ucb1x00_irq_set_type
.subsections_via_symbols
