	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atpic_startup                  ## -- Begin function atpic_startup
	.p2align	4, 0x90
_atpic_startup:                         ## @atpic_startup
	.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
	movq	_atpics@GOTPCREL(%rip), %rbx
	movq	_MASTER@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	shlq	$2, %rdi
	addq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	_i8259_init
	movq	_SLAVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	shlq	$2, %rdi
	addq	(%rbx), %rdi
	movl	$1, %esi
	callq	_i8259_init
	movq	_atintrs@GOTPCREL(%rip), %rbx
	movq	_ICU_SLAVEID@GOTPCREL(%rip), %r12
	imulq	$56, (%r12), %rdi
	addq	(%rbx), %rdi
	callq	_atpic_enable_source
	movq	_NUM_ISA_IRQS@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	(%rbx), %rbx
	addq	$52, %rbx
	xorl	%r13d, %r13d
	movq	_GSEL_ATPIC@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movslq	%eax, %rcx
	addq	$56, %rbx
	cmpq	%rcx, %r13
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%r12), %r13
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, -12(%rbx)
	leaq	-4(%rbx), %rax
	movq	%rax, -20(%rbx)
	movq	-36(%rbx), %rdi
	movq	-28(%rbx), %rax
	addq	(%rax), %rdi
	xorl	%eax, %eax
	movq	_pti@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	setne	%al
	movl	-48(%rbx,%rax,4), %esi
	movq	_SDT_ATPIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SEL_KPL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r15), %r8d
	callq	_setidt
	movl	(%r14), %eax
	jmp	LBB0_4
LBB0_5:
	movq	_elcr_found@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_9
## %bb.6:
	testl	%eax, %eax
	jle	LBB0_15
## %bb.7:
	movq	_atintrs@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_elcr_read_trigger
	movl	%eax, (%r15)
	incl	%ebx
	addq	$56, %r15
	cmpl	(%r14), %ebx
	jl	LBB0_8
	jmp	LBB0_15
LBB0_9:
	testl	%eax, %eax
	jle	LBB0_15
## %bb.10:
	movq	_atintrs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%ecx, %ecx
	movq	_INTR_TRIGGER_EDGE@GOTPCREL(%rip), %rbx
	movq	_INTR_TRIGGER_LEVEL@GOTPCREL(%rip), %rsi
	movl	$8455, %edi                     ## imm = 0x2107
	jmp	LBB0_11
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%rsi, %rdx
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	(%rdx), %edx
	movl	%edx, (%rax)
	incl	%ecx
	addq	$56, %rax
	cmpl	(%r14), %ecx
	jge	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$13, %ecx
	ja	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	btl	%ecx, %edi
	movq	%rbx, %rdx
	jb	LBB0_14
	jmp	LBB0_13
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_atpics,8,3                     ## @atpics
	.comm	_MASTER,8,3                     ## @MASTER
	.comm	_SLAVE,8,3                      ## @SLAVE
	.comm	_atintrs,8,3                    ## @atintrs
	.comm	_ICU_SLAVEID,8,3                ## @ICU_SLAVEID
	.comm	_NUM_ISA_IRQS,4,2               ## @NUM_ISA_IRQS
	.comm	_pti,8,3                        ## @pti
	.comm	_SDT_ATPIC,4,2                  ## @SDT_ATPIC
	.comm	_SEL_KPL,4,2                    ## @SEL_KPL
	.comm	_GSEL_ATPIC,4,2                 ## @GSEL_ATPIC
	.comm	_elcr_found,8,3                 ## @elcr_found
	.comm	_INTR_TRIGGER_EDGE,4,2          ## @INTR_TRIGGER_EDGE
	.comm	_INTR_TRIGGER_LEVEL,4,2         ## @INTR_TRIGGER_LEVEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atpic_startup                  ; -- Begin function atpic_startup
	.p2align	2
_atpic_startup:                         ; @atpic_startup
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x19, _atpics@GOTPAGE
Lloh1:
	ldr	x19, [x19, _atpics@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _MASTER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MASTER@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x0, x8, x9, lsl #2
	mov	w1, #0
	bl	_i8259_init
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _SLAVE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SLAVE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x0, x8, x9, lsl #2
	mov	w1, #1
	bl	_i8259_init
Lloh8:
	adrp	x21, _atintrs@GOTPAGE
Lloh9:
	ldr	x21, [x21, _atintrs@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh10:
	adrp	x19, _ICU_SLAVEID@GOTPAGE
Lloh11:
	ldr	x19, [x19, _ICU_SLAVEID@GOTPAGEOFF]
	ldr	x9, [x19]
	mov	w10, #56
	madd	x0, x9, x10, x8
	bl	_atpic_enable_source
Lloh12:
	adrp	x20, _NUM_ISA_IRQS@GOTPAGE
Lloh13:
	ldr	x20, [x20, _NUM_ISA_IRQS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	ldr	x9, [x21]
	add	x23, x9, #52
Lloh14:
	adrp	x24, _pti@GOTPAGE
Lloh15:
	ldr	x24, [x24, _pti@GOTPAGEOFF]
	mov	x25, #-44
	mov	x26, #-48
Lloh16:
	adrp	x27, _SDT_ATPIC@GOTPAGE
Lloh17:
	ldr	x27, [x27, _SDT_ATPIC@GOTPAGEOFF]
Lloh18:
	adrp	x28, _SEL_KPL@GOTPAGE
Lloh19:
	ldr	x28, [x28, _SEL_KPL@GOTPAGEOFF]
Lloh20:
	adrp	x21, _GSEL_ATPIC@GOTPAGE
Lloh21:
	ldr	x21, [x21, _GSEL_ATPIC@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	add	x23, x23, #56
	cmp	x22, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	cmp	x22, x9
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	stur	x23, [x23, #-12]
	sub	x8, x23, #4
	stur	x8, [x23, #-20]
	ldur	x8, [x23, #-28]
	ldr	x8, [x8]
	ldur	x9, [x23, #-36]
	add	x0, x9, x8
	ldr	x8, [x24]
	cmp	x8, #0
	csel	x8, x26, x25, eq
	ldr	w1, [x23, x8]
	ldr	w2, [x27]
	ldr	w3, [x28]
	ldr	w4, [x21]
	bl	_setidt
	ldr	w8, [x20]
	b	LBB0_2
LBB0_5:
Lloh22:
	adrp	x9, _elcr_found@GOTPAGE
Lloh23:
	ldr	x9, [x9, _elcr_found@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cbz	x9, LBB0_9
; %bb.6:
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.7:
	mov	w19, #0
Lloh25:
	adrp	x8, _atintrs@GOTPAGE
Lloh26:
	ldr	x8, [x8, _atintrs@GOTPAGEOFF]
Lloh27:
	ldr	x21, [x8]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_elcr_read_trigger
	str	w0, [x21], #56
	add	w19, w19, #1
	ldr	w8, [x20]
	cmp	w19, w8
	b.lt	LBB0_8
	b	LBB0_15
LBB0_9:
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.10:
	mov	w8, #0
Lloh28:
	adrp	x9, _atintrs@GOTPAGE
Lloh29:
	ldr	x9, [x9, _atintrs@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
Lloh31:
	adrp	x10, _INTR_TRIGGER_EDGE@GOTPAGE
Lloh32:
	ldr	x10, [x10, _INTR_TRIGGER_EDGE@GOTPAGEOFF]
	mov	w11, #1
	mov	w12, #8455
Lloh33:
	adrp	x13, _INTR_TRIGGER_LEVEL@GOTPAGE
Lloh34:
	ldr	x13, [x13, _INTR_TRIGGER_LEVEL@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x14, x13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w14, [x14]
	str	w14, [x9], #56
	add	w8, w8, #1
	ldr	w14, [x20]
	cmp	w8, w14
	b.ge	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	cmp	w8, #13
	b.hi	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	lsl	w15, w11, w8
	mov	x14, x10
	tst	w15, w12
	b.ne	LBB0_12
	b	LBB0_11
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_atpics,8,3                     ; @atpics
	.comm	_MASTER,8,3                     ; @MASTER
	.comm	_SLAVE,8,3                      ; @SLAVE
	.comm	_atintrs,8,3                    ; @atintrs
	.comm	_ICU_SLAVEID,8,3                ; @ICU_SLAVEID
	.comm	_NUM_ISA_IRQS,4,2               ; @NUM_ISA_IRQS
	.comm	_pti,8,3                        ; @pti
	.comm	_SDT_ATPIC,4,2                  ; @SDT_ATPIC
	.comm	_SEL_KPL,4,2                    ; @SEL_KPL
	.comm	_GSEL_ATPIC,4,2                 ; @GSEL_ATPIC
	.comm	_elcr_found,8,3                 ; @elcr_found
	.comm	_INTR_TRIGGER_EDGE,4,2          ; @INTR_TRIGGER_EDGE
	.comm	_INTR_TRIGGER_LEVEL,4,2         ; @INTR_TRIGGER_LEVEL
.subsections_via_symbols
