	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function trainer_start_search
_trainer_start_search:                  ## @trainer_start_search
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -40(%rbp)
	leaq	-40(%rbp), %rdi
	callq	_get_hex
	movl	%eax, %r14d
	movq	_trainer_memory@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	jne	LBB0_4
## %bb.1:
	movl	$131072, %edi                   ## imm = 0x20000
	callq	_malloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	addq	$524288, %rax                   ## imm = 0x80000
	movq	_trainer_flags@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_4
LBB0_3:
	leaq	L_str(%rip), %rdi
	callq	_puts
	cmpq	$0, (%r15)
	je	LBB0_13
LBB0_4:
	movl	$65535, %ebx                    ## imm = 0xFFFF
	movq	_trainer_flags@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_MEMORY_SafeGetByte
	movq	(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	(%r12), %rax
	movl	$255, (%rax,%rbx,4)
	addq	$-1, %rbx
	jb	LBB0_5
## %bb.6:
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.7:
	movl	$65534, %edx                    ## imm = 0xFFFE
	movq	-40(%rbp), %rsi
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	addq	$-2, %rdx
	cmpq	$-2, %rdx
	je	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	8(%rcx,%rdx,8), %rsi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	$0, 4(%rax,%rdx,4)
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpq	(%rcx,%rdx,8), %rsi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	$0, (%rax,%rdx,4)
	jmp	LBB0_12
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_trainer_memory,8,3             ## @trainer_memory
	.comm	_trainer_flags,8,3              ## @trainer_flags
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"Memory allocation failed!\nTrainer not available."

	.no_dead_strip	_trainer_start_search
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function trainer_start_search
_trainer_start_search:                  ; @trainer_start_search
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	str	xzr, [sp, #8]
	add	x0, sp, #8
	bl	_get_hex
	mov	x19, x0
Lloh0:
	adrp	x21, _trainer_memory@GOTPAGE
Lloh1:
	ldr	x21, [x21, _trainer_memory@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x22, _trainer_flags@GOTPAGE
Lloh3:
	ldr	x22, [x22, _trainer_flags@GOTPAGEOFF]
	cbnz	x8, LBB0_4
; %bb.1:
	mov	w0, #131072
	bl	_malloc
	str	x0, [x21]
	cbz	x0, LBB0_3
; %bb.2:
	add	x8, x0, #128, lsl #12           ; =524288
	str	x8, [x22]
	b	LBB0_4
LBB0_3:
Lloh4:
	adrp	x0, l_str@PAGE
Lloh5:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	ldr	x8, [x21]
	cbz	x8, LBB0_30
LBB0_4:
	mov	w20, #65535
	mov	w23, #255
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_MEMORY_SafeGetByte
	ldr	x9, [x21]
	str	x0, [x9, x20, lsl #3]
	ldr	x10, [x22]
	str	w23, [x10, x20, lsl #2]
	sub	x20, x20, #1
	cmn	x20, #1
	b.ne	LBB0_5
; %bb.6:
	cbz	w19, LBB0_30
; %bb.7:
	ldr	x11, [sp, #8]
	add	x8, x10, #64, lsl #12           ; =262144
	add	x12, x9, #128, lsl #12          ; =524288
	cmp	x10, x12
	ccmp	x9, x8, #2, lo
	b.lo	LBB0_26
; %bb.8:
	mov	x8, #0
	dup.2d	v0, x11
	mov	w11, #524272
	add	x9, x9, x11
	mov	w11, #262128
	add	x10, x10, x11
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	sub	x8, x8, #64
	sub	x10, x10, #32
	cmn	x8, #128, lsl #12               ; =524288
	b.eq	LBB0_30
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x11, x9, x8
	ldp	q3, q1, [x11, #-16]
	ext.16b	v4, v1, v1, #8
	ldp	q1, q2, [x11, #-48]
	cmeq.2d	v4, v0, v4
	mvn.16b	v4, v4
	xtn.2s	v4, v4
	fmov	w11, s4
	tbz	w11, #0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	str	wzr, [x10, #12]
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=1
	mov.s	w11, v4[1]
	tbz	w11, #0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	str	wzr, [x10, #8]
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	ext.16b	v3, v3, v3, #8
	cmeq.2d	v3, v0, v3
	mvn.16b	v3, v3
	xtn.2s	v3, v3
	fmov	w11, s3
	tbz	w11, #0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	str	wzr, [x10, #4]
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=1
	mov.s	w11, v3[1]
	tbz	w11, #0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_10 Depth=1
	str	wzr, [x10]
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=1
	ext.16b	v2, v2, v2, #8
	cmeq.2d	v2, v0, v2
	mvn.16b	v2, v2
	xtn.2s	v2, v2
	fmov	w11, s2
	tbz	w11, #0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_10 Depth=1
	stur	wzr, [x10, #-4]
LBB0_20:                                ;   in Loop: Header=BB0_10 Depth=1
	mov.s	w11, v2[1]
	tbz	w11, #0, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_10 Depth=1
	stur	wzr, [x10, #-8]
LBB0_22:                                ;   in Loop: Header=BB0_10 Depth=1
	ext.16b	v1, v1, v1, #8
	cmeq.2d	v1, v0, v1
	mvn.16b	v1, v1
	xtn.2s	v1, v1
	fmov	w11, s1
	tbz	w11, #0, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_10 Depth=1
	stur	wzr, [x10, #-12]
LBB0_24:                                ;   in Loop: Header=BB0_10 Depth=1
	mov.s	w11, v1[1]
	tbz	w11, #0, LBB0_9
; %bb.25:                               ;   in Loop: Header=BB0_10 Depth=1
	stur	wzr, [x10, #-16]
	b	LBB0_9
LBB0_26:
	mov	w8, #65535
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=1
	sub	x8, x8, #1
	cmn	x8, #1
	b.eq	LBB0_30
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9, x8, lsl #3]
	cmp	x11, x12
	b.eq	LBB0_27
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	str	wzr, [x10, x8, lsl #2]
	b	LBB0_27
LBB0_30:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_trainer_memory,8,3             ; @trainer_memory
	.comm	_trainer_flags,8,3              ; @trainer_flags
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"Memory allocation failed!\nTrainer not available."

	.no_dead_strip	_trainer_start_search
.subsections_via_symbols
