	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spu_set_interrupt_mode
_spu_set_interrupt_mode:                ## @spu_set_interrupt_mode
	.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
	movl	%edx, %r14d
	movl	%esi, %eax
	movq	%rdi, %rbx
	movq	_IF_SPI_HOST_INT_STATUS_MASK_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	xorl	%edx, %edx
	jmp	LBB0_3
LBB0_2:
	movq	_IF_SPI_HISM_TX_DOWNLOAD_RDY@GOTPCREL(%rip), %rax
	movq	_IF_SPI_HISM_RX_UPLOAD_RDY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_IF_SPI_HISM_CMD_DOWNLOAD_RDY@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_IF_SPI_HISM_CARDEVENT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_IF_SPI_HISM_CMD_UPLOAD_RDY@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
LBB0_3:
	callq	_spu_write_u16
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	movq	_IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO@GOTPCREL(%rip), %rax
	movq	_IF_SPI_HICT_RX_UPLOAD_OVER_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_IF_SPI_HOST_INT_CTRL_REG@GOTPCREL(%rip), %rax
	movq	_IF_SPI_HICT_CMD_DOWNLOAD_OVER_AUTO@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_IF_SPI_HICT_CMD_UPLOAD_OVER_AUTO@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	jmp	LBB0_7
LBB0_6:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
LBB0_7:
	callq	_spu_write_u16
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IF_SPI_HOST_INT_STATUS_MASK_REG,4,2 ## @IF_SPI_HOST_INT_STATUS_MASK_REG
	.comm	_IF_SPI_HISM_TX_DOWNLOAD_RDY,4,2 ## @IF_SPI_HISM_TX_DOWNLOAD_RDY
	.comm	_IF_SPI_HISM_RX_UPLOAD_RDY,4,2  ## @IF_SPI_HISM_RX_UPLOAD_RDY
	.comm	_IF_SPI_HISM_CMD_DOWNLOAD_RDY,4,2 ## @IF_SPI_HISM_CMD_DOWNLOAD_RDY
	.comm	_IF_SPI_HISM_CARDEVENT,4,2      ## @IF_SPI_HISM_CARDEVENT
	.comm	_IF_SPI_HISM_CMD_UPLOAD_RDY,4,2 ## @IF_SPI_HISM_CMD_UPLOAD_RDY
	.comm	_IF_SPI_HOST_INT_CTRL_REG,4,2   ## @IF_SPI_HOST_INT_CTRL_REG
	.comm	_IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO,4,2 ## @IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO
	.comm	_IF_SPI_HICT_RX_UPLOAD_OVER_AUTO,4,2 ## @IF_SPI_HICT_RX_UPLOAD_OVER_AUTO
	.comm	_IF_SPI_HICT_CMD_DOWNLOAD_OVER_AUTO,4,2 ## @IF_SPI_HICT_CMD_DOWNLOAD_OVER_AUTO
	.comm	_IF_SPI_HICT_CMD_UPLOAD_OVER_AUTO,4,2 ## @IF_SPI_HICT_CMD_UPLOAD_OVER_AUTO
	.no_dead_strip	_spu_set_interrupt_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spu_set_interrupt_mode
_spu_set_interrupt_mode:                ; @spu_set_interrupt_mode
	.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	x20, x2
	mov	x8, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _IF_SPI_HOST_INT_STATUS_MASK_REG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _IF_SPI_HOST_INT_STATUS_MASK_REG@GOTPAGEOFF]
	ldr	w1, [x21]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w2, #0
	bl	_spu_write_u16
	cbnz	w0, LBB0_6
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _IF_SPI_HISM_TX_DOWNLOAD_RDY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IF_SPI_HISM_TX_DOWNLOAD_RDY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _IF_SPI_HISM_RX_UPLOAD_RDY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IF_SPI_HISM_RX_UPLOAD_RDY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _IF_SPI_HISM_CMD_DOWNLOAD_RDY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IF_SPI_HISM_CMD_DOWNLOAD_RDY@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh11:
	adrp	x9, _IF_SPI_HISM_CARDEVENT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IF_SPI_HISM_CARDEVENT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _IF_SPI_HISM_CMD_UPLOAD_RDY@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IF_SPI_HISM_CMD_UPLOAD_RDY@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_spu_write_u16
	cbnz	w0, LBB0_6
LBB0_3:
	cbz	w20, LBB0_7
; %bb.4:
Lloh17:
	adrp	x8, _IF_SPI_HOST_INT_CTRL_REG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IF_SPI_HOST_INT_CTRL_REG@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _IF_SPI_HICT_RX_UPLOAD_OVER_AUTO@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IF_SPI_HICT_RX_UPLOAD_OVER_AUTO@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh26:
	adrp	x9, _IF_SPI_HICT_CMD_DOWNLOAD_OVER_AUTO@GOTPAGE
Lloh27:
	ldr	x9, [x9, _IF_SPI_HICT_CMD_DOWNLOAD_OVER_AUTO@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh29:
	adrp	x9, _IF_SPI_HICT_CMD_UPLOAD_OVER_AUTO@GOTPAGE
Lloh30:
	ldr	x9, [x9, _IF_SPI_HICT_CMD_UPLOAD_OVER_AUTO@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_spu_write_u16
	cbnz	w0, LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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_7:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_spu_write_u16
	cbnz	w0, LBB0_6
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IF_SPI_HOST_INT_STATUS_MASK_REG,4,2 ; @IF_SPI_HOST_INT_STATUS_MASK_REG
	.comm	_IF_SPI_HISM_TX_DOWNLOAD_RDY,4,2 ; @IF_SPI_HISM_TX_DOWNLOAD_RDY
	.comm	_IF_SPI_HISM_RX_UPLOAD_RDY,4,2  ; @IF_SPI_HISM_RX_UPLOAD_RDY
	.comm	_IF_SPI_HISM_CMD_DOWNLOAD_RDY,4,2 ; @IF_SPI_HISM_CMD_DOWNLOAD_RDY
	.comm	_IF_SPI_HISM_CARDEVENT,4,2      ; @IF_SPI_HISM_CARDEVENT
	.comm	_IF_SPI_HISM_CMD_UPLOAD_RDY,4,2 ; @IF_SPI_HISM_CMD_UPLOAD_RDY
	.comm	_IF_SPI_HOST_INT_CTRL_REG,4,2   ; @IF_SPI_HOST_INT_CTRL_REG
	.comm	_IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO,4,2 ; @IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO
	.comm	_IF_SPI_HICT_RX_UPLOAD_OVER_AUTO,4,2 ; @IF_SPI_HICT_RX_UPLOAD_OVER_AUTO
	.comm	_IF_SPI_HICT_CMD_DOWNLOAD_OVER_AUTO,4,2 ; @IF_SPI_HICT_CMD_DOWNLOAD_OVER_AUTO
	.comm	_IF_SPI_HICT_CMD_UPLOAD_OVER_AUTO,4,2 ; @IF_SPI_HICT_CMD_UPLOAD_OVER_AUTO
	.no_dead_strip	_spu_set_interrupt_mode
.subsections_via_symbols
