	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gic_set_type
_gic_set_type:                          ## @gic_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, %ebx
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_GIC_HWIRQ_TO_SHARED
	movl	%eax, %r15d
	movq	_gic_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_IRQ_TYPE_SENSE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_GIC_TRIG_EDGE@GOTPCREL(%rip), %r13
	addl	$-128, %ebx
	cmpl	$4, %ebx
	ja	LBB0_6
## %bb.1:
	movq	_GIC_DUAL_DUAL@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	addq	%rcx, %rdx
	movq	%r13, %rcx
	jmpq	*%rdx
LBB0_5:
	movq	_GIC_POL_ACTIVE_LOW@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_GIC_POL_ACTIVE_HIGH@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	_GIC_DUAL_SINGLE@GOTPCREL(%rip), %rax
	movq	_GIC_TRIG_LEVEL@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_4:
	movq	_GIC_POL_RISING_EDGE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_GIC_POL_FALLING_EDGE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movq	_GIC_DUAL_SINGLE@GOTPCREL(%rip), %rax
	movq	%r13, %rcx
LBB0_8:
	movl	(%rax), %r12d
	movl	(%rcx), %ebx
	movl	%r15d, %edi
	callq	_change_gic_pol
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_change_gic_trig
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_change_gic_dual
	cmpl	(%r13), %ebx
	movq	_gic_level_irq_controller@GOTPCREL(%rip), %rsi
	cmoveq	_gic_edge_irq_controller@GOTPCREL(%rip), %rsi
	movq	_handle_level_irq@GOTPCREL(%rip), %rax
	cmoveq	_handle_edge_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_irq_set_chip_handler_name_locked
	movq	_gic_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_gic_lock,4,2                   ## @gic_lock
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ## @IRQ_TYPE_SENSE_MASK
	.comm	_GIC_POL_FALLING_EDGE,4,2       ## @GIC_POL_FALLING_EDGE
	.comm	_GIC_TRIG_EDGE,4,2              ## @GIC_TRIG_EDGE
	.comm	_GIC_DUAL_SINGLE,4,2            ## @GIC_DUAL_SINGLE
	.comm	_GIC_POL_RISING_EDGE,4,2        ## @GIC_POL_RISING_EDGE
	.comm	_GIC_DUAL_DUAL,4,2              ## @GIC_DUAL_DUAL
	.comm	_GIC_POL_ACTIVE_LOW,4,2         ## @GIC_POL_ACTIVE_LOW
	.comm	_GIC_TRIG_LEVEL,4,2             ## @GIC_TRIG_LEVEL
	.comm	_GIC_POL_ACTIVE_HIGH,4,2        ## @GIC_POL_ACTIVE_HIGH
	.comm	_gic_edge_irq_controller,4,2    ## @gic_edge_irq_controller
	.comm	_handle_edge_irq,4,2            ## @handle_edge_irq
	.comm	_gic_level_irq_controller,4,2   ## @gic_level_irq_controller
	.comm	_handle_level_irq,4,2           ## @handle_level_irq
	.no_dead_strip	_gic_set_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gic_set_type
_gic_set_type:                          ; @gic_set_type
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_GIC_HWIRQ_TO_SHARED
	mov	x20, x0
Lloh0:
	adrp	x0, _gic_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _gic_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x8, _IRQ_TYPE_SENSE_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IRQ_TYPE_SENSE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh5:
	adrp	x23, _GIC_TRIG_EDGE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _GIC_TRIG_EDGE@GOTPAGEOFF]
	sub	w9, w8, #128
	cmp	w9, #4
	b.hi	LBB0_3
; %bb.1:
	mov	w1, #0
Lloh7:
	adrp	x8, _GIC_DUAL_DUAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GIC_DUAL_DUAL@GOTPAGEOFF]
Lloh9:
	adrp	x10, lJTI0_0@PAGE
Lloh10:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	mov	x9, x23
	br	x11
LBB0_2:
Lloh11:
	adrp	x8, _GIC_POL_ACTIVE_LOW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GIC_POL_ACTIVE_LOW@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh13:
	adrp	x8, _GIC_POL_ACTIVE_HIGH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GIC_POL_ACTIVE_HIGH@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _GIC_DUAL_SINGLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GIC_DUAL_SINGLE@GOTPAGEOFF]
Lloh17:
	adrp	x9, _GIC_TRIG_LEVEL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _GIC_TRIG_LEVEL@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh19:
	adrp	x8, _GIC_POL_RISING_EDGE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GIC_POL_RISING_EDGE@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh21:
	adrp	x8, _GIC_POL_FALLING_EDGE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GIC_POL_FALLING_EDGE@GOTPAGEOFF]
LBB0_7:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _GIC_DUAL_SINGLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _GIC_DUAL_SINGLE@GOTPAGEOFF]
Lloh25:
	adrp	x9, _GIC_TRIG_EDGE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _GIC_TRIG_EDGE@GOTPAGEOFF]
LBB0_8:
	ldr	w21, [x8]
	ldr	w22, [x9]
	mov	x0, x20
	bl	_change_gic_pol
	mov	x0, x20
	mov	x1, x22
	bl	_change_gic_trig
	mov	x0, x20
	mov	x1, x21
	bl	_change_gic_dual
	ldr	w8, [x23]
Lloh27:
	adrp	x9, _gic_level_irq_controller@GOTPAGE
Lloh28:
	ldr	x9, [x9, _gic_level_irq_controller@GOTPAGEOFF]
Lloh29:
	adrp	x10, _gic_edge_irq_controller@GOTPAGE
Lloh30:
	ldr	x10, [x10, _gic_edge_irq_controller@GOTPAGEOFF]
	cmp	w22, w8
	csel	x1, x10, x9, eq
Lloh31:
	adrp	x8, _handle_edge_irq@GOTPAGE
Lloh32:
	ldr	x8, [x8, _handle_edge_irq@GOTPAGEOFF]
Lloh33:
	adrp	x9, _handle_level_irq@GOTPAGE
Lloh34:
	ldr	x9, [x9, _handle_level_irq@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, #0
	bl	_irq_set_chip_handler_name_locked
Lloh35:
	adrp	x0, _gic_lock@GOTPAGE
Lloh36:
	ldr	x0, [x0, _gic_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.comm	_gic_lock,4,2                   ; @gic_lock
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ; @IRQ_TYPE_SENSE_MASK
	.comm	_GIC_POL_FALLING_EDGE,4,2       ; @GIC_POL_FALLING_EDGE
	.comm	_GIC_TRIG_EDGE,4,2              ; @GIC_TRIG_EDGE
	.comm	_GIC_DUAL_SINGLE,4,2            ; @GIC_DUAL_SINGLE
	.comm	_GIC_POL_RISING_EDGE,4,2        ; @GIC_POL_RISING_EDGE
	.comm	_GIC_DUAL_DUAL,4,2              ; @GIC_DUAL_DUAL
	.comm	_GIC_POL_ACTIVE_LOW,4,2         ; @GIC_POL_ACTIVE_LOW
	.comm	_GIC_TRIG_LEVEL,4,2             ; @GIC_TRIG_LEVEL
	.comm	_GIC_POL_ACTIVE_HIGH,4,2        ; @GIC_POL_ACTIVE_HIGH
	.comm	_gic_edge_irq_controller,4,2    ; @gic_edge_irq_controller
	.comm	_handle_edge_irq,4,2            ; @handle_edge_irq
	.comm	_gic_level_irq_controller,4,2   ; @gic_level_irq_controller
	.comm	_handle_level_irq,4,2           ; @handle_level_irq
	.no_dead_strip	_gic_set_type
.subsections_via_symbols
