	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parse_satb_tms                 ## -- Begin function parse_satb_tms
	.p2align	4, 0x90
_parse_satb_tms:                        ## @parse_satb_tms
	.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
	.cfi_offset %rbx, -24
	movq	_reg@GOTPCREL(%rip), %r8
	movq	(%r8), %rcx
	movl	4(%rcx), %eax
	xorl	%r11d, %r11d
	movl	$0, %edx
	testb	$16, %al
	jne	LBB0_12
## %bb.1:
	movq	_vram@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	20(%rcx), %esi
	andl	$127, %esi
	shlq	$7, %rsi
	movl	%eax, %ecx
	shrb	%cl
	andb	$1, %cl
	movl	$8, %r9d
	shll	%cl, %r9d
	andb	$1, %al
	movl	%eax, %ecx
	shll	%cl, %r9d
	leaq	(%rdx,%rsi,8), %rax
	addq	$24, %rax
	xorl	%edx, %edx
	movq	_object_info@GOTPCREL(%rip), %r10
	xorl	%r11d, %r11d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	addq	$32, %rax
	cmpq	$32, %rdx
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	-24(%rax), %ecx
	cmpl	$208, %ecx
	je	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-256(%rcx), %ebx
	cmpl	$224, %ecx
	cmovll	%ecx, %ebx
	movl	%edi, %esi
	subl	%ebx, %esi
	js	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r9d, %esi
	jge	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$4, %r11d
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r8), %rcx
	movzbl	4(%rcx), %ecx
	andb	$1, %cl
	shrl	%cl, %esi
	movq	(%r10), %rcx
	movslq	%r11d, %rbx
	shlq	$5, %rbx
	movl	%esi, (%rcx,%rbx)
	movq	-16(%rax), %rsi
	movq	%rsi, 24(%rcx,%rbx)
	movq	-8(%rax), %rcx
	movq	(%r10), %rsi
	movq	%rcx, 16(%rsi,%rbx)
	movq	(%rax), %rcx
	movq	(%r10), %rsi
	movq	%rcx, 8(%rsi,%rbx)
	incl	%r11d
	jmp	LBB0_2
LBB0_8:
	movl	$32, %edx
	jmp	LBB0_12
LBB0_9:
	movq	_bitmap@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_11
## %bb.10:
	movq	_spr_ovr@GOTPCREL(%rip), %rax
	movl	$64, (%rax)
LBB0_11:
	movl	$4, %r11d
LBB0_12:
	movq	_object_count@GOTPCREL(%rip), %rax
	movq	_status@GOTPCREL(%rip), %rcx
	movl	$224, %esi
	andl	(%rcx), %esi
	movl	%r11d, (%rax)
	andl	$31, %edx
	orl	%esi, %edx
	movl	%edx, (%rcx)
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_reg,8,3                        ## @reg
	.comm	_vram,8,3                       ## @vram
	.comm	_bitmap,4,2                     ## @bitmap
	.comm	_spr_ovr,4,2                    ## @spr_ovr
	.comm	_object_info,8,3                ## @object_info
	.comm	_object_count,4,2               ## @object_count
	.comm	_status,4,2                     ## @status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parse_satb_tms                 ; -- Begin function parse_satb_tms
	.p2align	2
_parse_satb_tms:                        ; @parse_satb_tms
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x10, _reg@GOTPAGE
Lloh1:
	ldr	x10, [x10, _reg@GOTPAGEOFF]
	ldr	x12, [x10]
	ldr	w11, [x12, #4]
	tbnz	w11, #4, LBB0_8
; %bb.1:
	mov	x8, #0
	mov	w9, #0
	ubfx	w13, w11, #1, #1
	mov	w14, #8
	lsl	w13, w14, w13
	and	w11, w11, #0x1
	lsl	w11, w13, w11
Lloh2:
	adrp	x13, _vram@GOTPAGE
Lloh3:
	ldr	x13, [x13, _vram@GOTPAGEOFF]
Lloh4:
	ldr	x13, [x13]
	ldr	w12, [x12, #20]
	lsl	w12, w12, #7
	and	x12, x12, #0x3f80
	add	x12, x13, x12, lsl #3
	add	x12, x12, #16
Lloh5:
	adrp	x13, _object_info@GOTPAGE
Lloh6:
	ldr	x13, [x13, _object_info@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	add	x12, x12, #32
	cmp	x8, #32
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w14, [x12, #-16]
	cmp	w14, #208
	b.eq	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w15, w14, #256
	cmp	w14, #223
	csel	w14, w15, w14, gt
	subs	w14, w0, w14
	b.mi	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w14, w11
	b.ge	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w9, #4
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x15, [x10]
	ldr	w15, [x15, #4]
	and	x15, x15, #0x1
	lsr	w14, w14, w15
	ldr	x15, [x13]
	sbfiz	x16, x9, #5, #32
	add	x15, x15, x16
	str	w14, [x15]
	ldur	x14, [x12, #-8]
	str	x14, [x15, #24]
	ldr	x14, [x12]
	ldr	x15, [x13]
	add	x15, x15, x16
	str	x14, [x15, #16]
	ldr	x14, [x12, #8]
	ldr	x15, [x13]
	add	x15, x15, x16
	str	x14, [x15, #8]
	add	w9, w9, #1
	b	LBB0_2
LBB0_8:
	mov	w9, #0
	mov	w8, #0
LBB0_9:
Lloh7:
	adrp	x10, _object_count@GOTPAGE
Lloh8:
	ldr	x10, [x10, _object_count@GOTPAGEOFF]
Lloh9:
	str	w9, [x10]
Lloh10:
	adrp	x9, _status@GOTPAGE
Lloh11:
	ldr	x9, [x9, _status@GOTPAGEOFF]
	ldr	w10, [x9]
	and	w10, w10, #0xe0
	bfxil	w10, w8, #0, #5
	str	w10, [x9]
	ret
LBB0_10:
Lloh12:
	adrp	x9, _bitmap@GOTPAGE
Lloh13:
	ldr	x9, [x9, _bitmap@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w9, w0
	b.le	LBB0_12
; %bb.11:
Lloh15:
	adrp	x9, _spr_ovr@GOTPAGE
Lloh16:
	ldr	x9, [x9, _spr_ovr@GOTPAGEOFF]
	mov	w10, #64
Lloh17:
	str	w10, [x9]
LBB0_12:
	mov	w9, #4
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_reg,8,3                        ; @reg
	.comm	_vram,8,3                       ; @vram
	.comm	_bitmap,4,2                     ; @bitmap
	.comm	_spr_ovr,4,2                    ; @spr_ovr
	.comm	_object_info,8,3                ; @object_info
	.comm	_object_count,4,2               ; @object_count
	.comm	_status,4,2                     ; @status
.subsections_via_symbols
