	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_irq                     ## -- Begin function handle_irq
	.p2align	4, 0x90
_handle_irq:                            ## @handle_irq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_IRQ_PENDING_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get32
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movl	%eax, %ebx
	movq	_SYSTEM_TIMER_IRQ_1@GOTPCREL(%rip), %r14
	movq	_AUX_IRQ@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_handle_timer_irq
	movq	%r14, %rax
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, (%r14)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, (%r15)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_handle_uart_irq
	movq	%r15, %rax
	jmp	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printf                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_PENDING_1,4,2              ## @IRQ_PENDING_1
	.comm	_SYSTEM_TIMER_IRQ_1,4,2         ## @SYSTEM_TIMER_IRQ_1
	.comm	_AUX_IRQ,4,2                    ## @AUX_IRQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown pending irq: %x\r\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_irq                     ; -- Begin function handle_irq
	.p2align	2
_handle_irq:                            ; @handle_irq
	.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
Lloh0:
	adrp	x8, _IRQ_PENDING_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_PENDING_1@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_get32
	cbz	w0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x20, _SYSTEM_TIMER_IRQ_1@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SYSTEM_TIMER_IRQ_1@GOTPAGEOFF]
Lloh5:
	adrp	x21, _AUX_IRQ@GOTPAGE
Lloh6:
	ldr	x21, [x21, _AUX_IRQ@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_handle_timer_irq
	mov	x8, x20
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x8]
	bics	w19, w19, w8
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	tst	w8, w19
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21]
	tst	w8, w19
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_handle_uart_irq
	mov	x8, x21
	b	LBB0_3
LBB0_7:
	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
LBB0_8:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	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
	b	_printf
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_PENDING_1,4,2              ; @IRQ_PENDING_1
	.comm	_SYSTEM_TIMER_IRQ_1,4,2         ; @SYSTEM_TIMER_IRQ_1
	.comm	_AUX_IRQ,4,2                    ; @AUX_IRQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown pending irq: %x\r\n"

.subsections_via_symbols
