	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function z80_sms_out
_z80_sms_out:                           ## @z80_sms_out
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_EL_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_elprintf
	andb	$-63, %bl
	cmpb	$63, %bl
	jg	LBB0_9
## %bb.1:
	cmpb	$-128, %bl
	je	LBB0_7
## %bb.2:
	cmpb	$-127, %bl
	je	LBB0_8
## %bb.3:
	cmpb	$1, %bl
	jne	LBB0_10
## %bb.4:
	movq	_Pico@GOTPCREL(%rip), %rax
	movb	%r14b, (%rax)
	jmp	LBB0_10
LBB0_9:
	addb	$-64, %bl
	cmpb	$2, %bl
	jae	LBB0_10
## %bb.5:
	movq	_PicoOpt@GOTPCREL(%rip), %rax
	movq	_POPT_EN_PSG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_10
## %bb.6:
	movzbl	%r14b, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_SN76496Write                   ## TAILCALL
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	movzbl	%r14b, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_vdp_data_write                 ## TAILCALL
LBB0_8:
	movzbl	%r14b, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_vdp_ctl_write                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EL_IO,4,2                      ## @EL_IO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"z80 port %04x write %02x"

	.comm	_Pico,1,0                       ## @Pico
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_POPT_EN_PSG,4,2                ## @POPT_EN_PSG
	.no_dead_strip	_z80_sms_out
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function z80_sms_out
_z80_sms_out:                           ; @z80_sms_out
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _EL_IO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EL_IO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_elprintf
	mov	w8, #193
	and	w8, w20, w8
	cmp	w8, #127
	b.gt	LBB0_4
; %bb.1:
	sub	w9, w8, #64
	cmp	w9, #2
	b.hs	LBB0_7
; %bb.2:
Lloh5:
	adrp	x8, _PicoOpt@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PicoOpt@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _POPT_EN_PSG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _POPT_EN_PSG@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_SN76496Write
LBB0_4:
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.5:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_vdp_ctl_write
LBB0_7:
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _Pico@GOTPAGE
Lloh12:
	ldr	x8, [x8, _Pico@GOTPAGEOFF]
Lloh13:
	strb	w19, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_vdp_data_write
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EL_IO,4,2                      ; @EL_IO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"z80 port %04x write %02x"

	.comm	_Pico,1,0                       ; @Pico
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_POPT_EN_PSG,4,2                ; @POPT_EN_PSG
	.no_dead_strip	_z80_sms_out
.subsections_via_symbols
