	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function macronix_set_4byte
_macronix_set_4byte:                    ## @macronix_set_4byte
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	je	LBB0_5
## %bb.1:
	testl	%esi, %esi
	jne	LBB0_2
## %bb.3:
	movq	_SPINOR_OP_EX4B@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_5:
	movq	(%rbx), %rax
	testl	%esi, %esi
	jne	LBB0_6
## %bb.7:
	movq	_SPINOR_OP_EX4B@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_2:
	movq	_SPINOR_OP_EN4B@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_SPI_MEM_OP_CMD
	movq	_SPI_MEM_OP_NO_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_SPI_MEM_OP_NO_DUMMY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_SPI_MEM_OP_NO_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edi
	callq	_SPI_MEM_OP
	movl	%eax, -16(%rbp)
	movq	8(%rbx), %rdi
	leaq	-16(%rbp), %rsi
	callq	_spi_mem_exec_op
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movq	_SPINOR_OP_EN4B@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SPINOR_OP_EN4B,4,2             ## @SPINOR_OP_EN4B
	.comm	_SPINOR_OP_EX4B,4,2             ## @SPINOR_OP_EX4B
	.comm	_SPI_MEM_OP_NO_ADDR,4,2         ## @SPI_MEM_OP_NO_ADDR
	.comm	_SPI_MEM_OP_NO_DUMMY,4,2        ## @SPI_MEM_OP_NO_DUMMY
	.comm	_SPI_MEM_OP_NO_DATA,4,2         ## @SPI_MEM_OP_NO_DATA
	.no_dead_strip	_macronix_set_4byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macronix_set_4byte
_macronix_set_4byte:                    ; @macronix_set_4byte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _SPINOR_OP_EN4B@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPINOR_OP_EN4B@GOTPAGEOFF]
Lloh2:
	adrp	x9, _SPINOR_OP_EX4B@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SPINOR_OP_EX4B@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w0, [x8]
	mov	w1, #1
	bl	_SPI_MEM_OP_CMD
Lloh4:
	adrp	x8, _SPI_MEM_OP_NO_ADDR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SPI_MEM_OP_NO_ADDR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _SPI_MEM_OP_NO_DUMMY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SPI_MEM_OP_NO_DUMMY@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x8, _SPI_MEM_OP_NO_DATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SPI_MEM_OP_NO_DATA@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	bl	_SPI_MEM_OP
	str	w0, [sp, #8]
	ldr	x0, [x19, #8]
	add	x1, sp, #8
	bl	_spi_mem_exec_op
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	ldr	x4, [x19]
Lloh13:
	adrp	x8, _SPINOR_OP_EN4B@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SPINOR_OP_EN4B@GOTPAGEOFF]
Lloh15:
	adrp	x9, _SPINOR_OP_EX4B@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SPINOR_OP_EX4B@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	br	x4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SPINOR_OP_EN4B,4,2             ; @SPINOR_OP_EN4B
	.comm	_SPINOR_OP_EX4B,4,2             ; @SPINOR_OP_EX4B
	.comm	_SPI_MEM_OP_NO_ADDR,4,2         ; @SPI_MEM_OP_NO_ADDR
	.comm	_SPI_MEM_OP_NO_DUMMY,4,2        ; @SPI_MEM_OP_NO_DUMMY
	.comm	_SPI_MEM_OP_NO_DATA,4,2         ; @SPI_MEM_OP_NO_DATA
	.no_dead_strip	_macronix_set_4byte
.subsections_via_symbols
