	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARD_SetGamecode               ## -- Begin function CARD_SetGamecode
	.p2align	4, 0x90
_CARD_SetGamecode:                      ## @CARD_SetGamecode
	.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
	movq	%rdi, %rbx
	callq	__CPU_ISR_Disable
	movq	_card_gamecode@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	leaq	L_.memset_pattern(%rip), %rsi
	movl	$16, %edx
	callq	_memset_pattern16
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_strlen
	cmpl	$4, %eax
	jg	LBB0_3
## %bb.2:
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_memcpy
LBB0_3:
	callq	__CPU_ISR_Restore
	movq	_CARD_ERROR_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_card_gamecode,8,3              ## @card_gamecode
	.comm	_CARD_ERROR_READY,4,2           ## @CARD_ERROR_READY
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARD_SetGamecode               ; -- Begin function CARD_SetGamecode
	.p2align	2
_CARD_SetGamecode:                      ; @CARD_SetGamecode
	.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
	bl	__CPU_ISR_Disable
Lloh0:
	adrp	x20, _card_gamecode@GOTPAGE
Lloh1:
	ldr	x20, [x20, _card_gamecode@GOTPAGEOFF]
	ldr	x0, [x20]
Lloh2:
	adrp	x1, l_.memset_pattern@PAGE
Lloh3:
	add	x1, x1, l_.memset_pattern@PAGEOFF
	mov	w2, #16
	bl	_memset_pattern16
	cbz	x19, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_strlen
	cmp	w0, #4
	b.gt	LBB0_3
; %bb.2:
	ldr	x0, [x20]
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
LBB0_3:
	bl	__CPU_ISR_Restore
Lloh4:
	adrp	x8, _CARD_ERROR_READY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CARD_ERROR_READY@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_card_gamecode,8,3              ; @card_gamecode
	.comm	_CARD_ERROR_READY,4,2           ; @CARD_ERROR_READY
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff

.subsections_via_symbols
