	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_detect_serial_ascii_game       ## -- Begin function detect_serial_ascii_game
	.p2align	4, 0x90
_detect_serial_ascii_game:              ## @detect_serial_ascii_game
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	movq	_SEEK_SET@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %r12
	jmp	LBB0_1
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	decq	%rax
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	leal	-4(%rax), %ecx
	cmpl	$4, %ecx
	jbe	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	cmpl	$10000, %ebx                    ## imm = 0x2710
	je	LBB0_16
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_intfstream_seek
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$15, %edx
	callq	_intfstream_read
	testq	%rax, %rax
	jle	LBB0_15
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movb	$0, 15(%r15)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_string_is_equal
	testq	%rax, %rax
	jne	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %eax
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	addq	$2, %rax
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	-1(%r15,%rax), %ecx
	leal	-65(%rcx), %edx
	cmpb	$26, %dl
	jb	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpb	$45, %cl
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	addb	$-48, %cl
	cmpb	$9, %cl
	ja	LBB0_12
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	cmpq	$15, %rax
	je	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movzbl	(%r15,%rax), %ecx
	leal	-65(%rcx), %edx
	cmpb	$26, %dl
	jb	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpb	$45, %cl
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	addb	$-48, %cl
	cmpb	$9, %cl
	jbe	LBB0_11
	jmp	LBB0_13
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	%eax, %eax
	movb	$0, (%r15,%rax)
	movl	$1, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WBFS"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_detect_serial_ascii_game       ; -- Begin function detect_serial_ascii_game
	.p2align	2
_detect_serial_ascii_game:              ; @detect_serial_ascii_game
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	mov	w21, #0
Lloh0:
	adrp	x23, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SEEK_SET@GOTPAGEOFF]
	mov	w24, #10000
Lloh2:
	adrp	x22, l_.str@PAGE
Lloh3:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w21, w21, #1
	cmp	w21, w24
	b.eq	LBB0_10
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x21
	bl	_intfstream_seek
	mov	x0, x20
	mov	x1, x19
	mov	w2, #15
	bl	_intfstream_read
	cmp	x0, #1
	b.lt	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	strb	wzr, [x19, #15]
	mov	x0, x19
	mov	x1, x22
	bl	_string_is_equal
	cbnz	x0, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x8, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x8, x8, #1
	cmp	x8, #15
	b.eq	LBB0_1
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w9, [x19, x8]
	sub	w10, w9, #65
	cmp	w10, #26
	b.lo	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	sub	w10, w9, #48
	cmp	w9, #45
	ccmp	w10, #9, #0, ne
	b.ls	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w9, w8, #4
	cmp	w9, #4
	b.hi	LBB0_1
; %bb.9:
	strb	wzr, [x19, x8]
	mov	w0, #1
	b	LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WBFS"

.subsections_via_symbols
