	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mixart_load_elf
_mixart_load_elf:                       ## @mixart_load_elf
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %r14
	movq	(%r14), %rax
	cmpb	$127, (%rax)
	jne	LBB0_12
## %bb.1:
	cmpb	$69, 1(%rax)
	jne	LBB0_12
## %bb.2:
	cmpb	$76, 2(%rax)
	jne	LBB0_12
## %bb.3:
	cmpb	$70, 3(%rax)
	jne	LBB0_12
## %bb.4:
	xorl	%r13d, %r13d
	cmpq	$0, 8(%r14)
	je	LBB0_11
## %bb.5:
	movq	%rsi, %r12
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	20(%r14), %edi
	callq	_be16_to_cpu
	testl	%eax, %eax
	jle	LBB0_11
## %bb.6:
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incl	%r15d
	movl	20(%r14), %edi
	callq	_be16_to_cpu
	cmpl	%eax, %r15d
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rdi
	callq	_be32_to_cpu
	movq	%rax, %rbx
	movl	16(%r14), %edi
	callq	_be16_to_cpu
	imull	%r15d, %eax
	cltq
	addq	(%r12), %rbx
	addq	%rax, %rbx
	leaq	-88(%rbp), %rdi
	movq	%rbx, %rsi
	movl	$32, %edx
	callq	_memcpy
	cmpq	$0, -88(%rbp)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, -80(%rbp)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-72(%rbp), %rdi
	callq	_be32_to_cpu
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	callq	_MIXART_MEM
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rbx
	movq	(%r12), %r12
	movq	-64(%rbp), %rdi
	callq	_be32_to_cpu
	addq	%rax, %r12
	movq	-80(%rbp), %rdi
	callq	_be32_to_cpu
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rsi
	movq	%rbx, %r12
	movq	%rax, %rdx
	callq	_memcpy_toio
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mixart_load_elf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mixart_load_elf
_mixart_load_elf:                       ; @mixart_load_elf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x23, [x1]
	ldr	x8, [x23]
	ldrb	w9, [x8]
	cmp	w9, #127
	b.ne	LBB0_7
; %bb.1:
	ldrb	w9, [x8, #1]
	cmp	w9, #69
	b.ne	LBB0_7
; %bb.2:
	ldrb	w9, [x8, #2]
	cmp	w9, #76
	b.ne	LBB0_7
; %bb.3:
	ldrb	w8, [x8, #3]
	cmp	w8, #70
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_12
; %bb.5:
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x23, #20]
	bl	_be16_to_cpu
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.6:
	mov	w24, #0
	b	LBB0_10
LBB0_7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w24, w24, #1
	ldr	w0, [x23, #20]
	bl	_be16_to_cpu
	cmp	w24, w0
	b.ge	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23, #8]
	bl	_be32_to_cpu
	mov	x21, x0
	ldr	w0, [x23, #16]
	bl	_be16_to_cpu
	mul	w8, w0, w24
	ldr	x9, [x19]
	add	x9, x9, x21
	add	x1, x9, w8, sxtw
	mov	x0, sp
	mov	w2, #32
	bl	_memcpy
	ldp	x8, x9, [sp]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x0, [sp, #16]
	bl	_be32_to_cpu
	mov	x1, x0
	mov	x0, x20
	bl	_MIXART_MEM
	mov	x21, x0
	ldr	x22, [x19]
	ldr	x0, [sp, #24]
	bl	_be32_to_cpu
	add	x22, x0, x22
	ldr	x0, [sp, #8]
	bl	_be32_to_cpu
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_memcpy_toio
	b	LBB0_9
LBB0_12:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mixart_load_elf
.subsections_via_symbols
