	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function send_pkg
_send_pkg:                              ## @send_pkg
	.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
	movl	%r8d, %r13d
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_dsi_error_handler
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	movq	(%rbx), %rax
	movq	_MDFLD_DSI_PKG_SENDER_BUSY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_DRM_ERROR
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_send_pkg_prepare
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_14
LBB0_7:
	movl	%r14d, %ecx
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	leal	-128(%r12), %eax
	cmpl	$10, %eax
	ja	LBB0_8
## %bb.9:
	movl	$959, %ecx                      ## imm = 0x3BF
	btl	%eax, %ecx
	jae	LBB0_11
## %bb.10:
	movl	(%r15), %edx
	movl	4(%r15), %ecx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%r13d, %r8d
	callq	_send_short_pkg
LBB0_12:
	movl	%eax, %r14d
LBB0_13:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_send_pkg_done
	jmp	LBB0_14
LBB0_11:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	callq	_send_long_pkg
	jmp	LBB0_12
LBB0_8:
	xorl	%r14d, %r14d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error handling failed\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_MDFLD_DSI_PKG_SENDER_BUSY,8,3  ## @MDFLD_DSI_PKG_SENDER_BUSY
L_.str.1:                               ## @.str.1
	.asciz	"sender is busy\n"

L_.str.2:                               ## @.str.2
	.asciz	"send_pkg_prepare error\n"

	.no_dead_strip	_send_pkg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function send_pkg
_send_pkg:                              ; @send_pkg
	.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	x23, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_dsi_error_handler
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _MDFLD_DSI_PKG_SENDER_BUSY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MDFLD_DSI_PKG_SENDER_BUSY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_DRM_ERROR
Lloh7:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_5:
	mov	x0, x24
	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
LBB0_6:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_send_pkg_prepare
	cbz	w0, LBB0_8
; %bb.7:
	mov	x24, x0
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_5
LBB0_8:
	sub	w8, w21, #128
	cmp	w8, #10
	b.hi	LBB0_14
; %bb.9:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #959
	tst	w8, w9
	b.eq	LBB0_13
; %bb.10:
	ldp	w2, w3, [x20]
	mov	x0, x22
	mov	x1, x21
	mov	x4, x23
	bl	_send_short_pkg
LBB0_11:
	mov	x24, x0
LBB0_12:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_send_pkg_done
	b	LBB0_5
LBB0_13:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	x4, x23
	bl	_send_long_pkg
	b	LBB0_11
LBB0_14:
	mov	w24, #0
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error handling failed\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_MDFLD_DSI_PKG_SENDER_BUSY,8,3  ; @MDFLD_DSI_PKG_SENDER_BUSY
l_.str.1:                               ; @.str.1
	.asciz	"sender is busy\n"

l_.str.2:                               ; @.str.2
	.asciz	"send_pkg_prepare error\n"

	.no_dead_strip	_send_pkg
.subsections_via_symbols
