	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z80_unpack                     ## -- Begin function z80_unpack
	.p2align	4, 0x90
_z80_unpack:                            ## @z80_unpack
	.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
	movl	144(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_z80_unpack_legacy
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	_EL_STATUS@GOTPCREL(%rip), %rax
	movq	_EL_ANOMALY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_elprintf
	xorl	%eax, %eax
	callq	_z80_reset
	xorl	%eax, %eax
	callq	_z80_int
	movl	$-1, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_EL_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elprintf
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Z80"

	.comm	_EL_STATUS,4,2                  ## @EL_STATUS
L_.str.1:                               ## @.str.1
	.asciz	"legacy z80 state"

	.comm	_EL_ANOMALY,4,2                 ## @EL_ANOMALY
L_.str.2:                               ## @.str.2
	.asciz	"z80_unpack failed"

	.comm	_A,4,2                          ## @A
	.comm	_A2,4,2                         ## @A2
	.comm	_BC,4,2                         ## @BC
	.comm	_BC2,4,2                        ## @BC2
	.comm	_CLEAR_LINE,8,3                 ## @CLEAR_LINE
	.comm	_CZ80,24,2                      ## @CZ80
	.comm	_CZ80_HALT,4,2                  ## @CZ80_HALT
	.comm	_CZ80_IFF1,4,2                  ## @CZ80_IFF1
	.comm	_CZ80_IFF2,4,2                  ## @CZ80_IFF2
	.comm	_CZ80_IRQ,4,2                   ## @CZ80_IRQ
	.comm	_CZ80_PC,4,2                    ## @CZ80_PC
	.comm	_CZ80_SP,4,2                    ## @CZ80_SP
	.comm	_DE,4,2                         ## @DE
	.comm	_DE2,4,2                        ## @DE2
	.comm	_HL,4,2                         ## @HL
	.comm	_HL2,4,2                        ## @HL2
	.comm	_HOLD_LINE,8,3                  ## @HOLD_LINE
	.comm	_I,4,2                          ## @I
	.comm	_IX,4,2                         ## @IX
	.comm	_IY,4,2                         ## @IY
	.comm	_drZ80,32,3                     ## @drZ80
	.comm	_zA,4,2                         ## @zA
	.comm	_zA2,4,2                        ## @zA2
	.comm	_zB,4,2                         ## @zB
	.comm	_zC,4,2                         ## @zC
	.comm	_zD,4,2                         ## @zD
	.comm	_zE,4,2                         ## @zE
	.comm	_zF,4,2                         ## @zF
	.comm	_zF2,4,2                        ## @zF2
	.comm	_zH,4,2                         ## @zH
	.comm	_zI,4,2                         ## @zI
	.comm	_zIM,4,2                        ## @zIM
	.comm	_zIX,4,2                        ## @zIX
	.comm	_zIY,4,2                        ## @zIY
	.comm	_zL,4,2                         ## @zL
	.comm	_zR,4,2                         ## @zR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z80_unpack                     ; -- Begin function z80_unpack
	.p2align	2
_z80_unpack:                            ; @z80_unpack
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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	w0, [x0, #144]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_z80_unpack_legacy
	cbz	x0, LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _EL_STATUS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EL_STATUS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _EL_ANOMALY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EL_ANOMALY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_elprintf
	bl	_z80_reset
	bl	_z80_int
	mov	w0, #-1
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _EL_STATUS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EL_STATUS@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elprintf
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Z80"

	.comm	_EL_STATUS,4,2                  ; @EL_STATUS
l_.str.1:                               ; @.str.1
	.asciz	"legacy z80 state"

	.comm	_EL_ANOMALY,4,2                 ; @EL_ANOMALY
l_.str.2:                               ; @.str.2
	.asciz	"z80_unpack failed"

	.comm	_A,4,2                          ; @A
	.comm	_A2,4,2                         ; @A2
	.comm	_BC,4,2                         ; @BC
	.comm	_BC2,4,2                        ; @BC2
	.comm	_CLEAR_LINE,8,3                 ; @CLEAR_LINE
	.comm	_CZ80,24,2                      ; @CZ80
	.comm	_CZ80_HALT,4,2                  ; @CZ80_HALT
	.comm	_CZ80_IFF1,4,2                  ; @CZ80_IFF1
	.comm	_CZ80_IFF2,4,2                  ; @CZ80_IFF2
	.comm	_CZ80_IRQ,4,2                   ; @CZ80_IRQ
	.comm	_CZ80_PC,4,2                    ; @CZ80_PC
	.comm	_CZ80_SP,4,2                    ; @CZ80_SP
	.comm	_DE,4,2                         ; @DE
	.comm	_DE2,4,2                        ; @DE2
	.comm	_HL,4,2                         ; @HL
	.comm	_HL2,4,2                        ; @HL2
	.comm	_HOLD_LINE,8,3                  ; @HOLD_LINE
	.comm	_I,4,2                          ; @I
	.comm	_IX,4,2                         ; @IX
	.comm	_IY,4,2                         ; @IY
	.comm	_drZ80,32,3                     ; @drZ80
	.comm	_zA,4,2                         ; @zA
	.comm	_zA2,4,2                        ; @zA2
	.comm	_zB,4,2                         ; @zB
	.comm	_zC,4,2                         ; @zC
	.comm	_zD,4,2                         ; @zD
	.comm	_zE,4,2                         ; @zE
	.comm	_zF,4,2                         ; @zF
	.comm	_zF2,4,2                        ; @zF2
	.comm	_zH,4,2                         ; @zH
	.comm	_zI,4,2                         ; @zI
	.comm	_zIM,4,2                        ; @zIM
	.comm	_zIX,4,2                        ; @zIX
	.comm	_zIY,4,2                        ; @zIY
	.comm	_zL,4,2                         ; @zL
	.comm	_zR,4,2                         ; @zR
.subsections_via_symbols
