	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_phypacket
_write_phypacket:                       ## @write_phypacket
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	16(%rsi), %edi
	callq	_be32_to_cpu
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DBGMSG
	movl	8(%r14), %edi
	movl	%ebx, %esi
	callq	_hpsb_make_phypacket
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	$0, (%r15)
	movq	%rax, 32(%r15)
	movq	_queue_complete_cb@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_hpsb_set_packet_complete_task
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	leaq	24(%r15), %rdi
	leaq	4(%r14), %rsi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	12(%r15), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_hpsb_send_packet
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_DBGMSG
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	jns	LBB0_4
## %bb.3:
	movq	_RAW1394_ERROR_SEND_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	$0, (%r15)
	movq	%r15, %rdi
	callq	_queue_complete_req
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write_phypacket called - quadlet 0x%8.8x "

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_queue_complete_cb,8,3          ## @queue_complete_cb
L_.str.1:                               ## @.str.1
	.asciz	"write_phypacket send_packet called => retval: %d "

	.comm	_RAW1394_ERROR_SEND_ERROR,4,2   ## @RAW1394_ERROR_SEND_ERROR
	.no_dead_strip	_write_phypacket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_phypacket
_write_phypacket:                       ; @write_phypacket
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #16]
	bl	_be32_to_cpu
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DBGMSG
	ldr	w0, [x20, #8]
	mov	x1, x21
	bl	_hpsb_make_phypacket
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	str	xzr, [x19]
	str	x0, [x19, #32]
Lloh2:
	adrp	x8, _queue_complete_cb@GOTPAGE
Lloh3:
	ldr	x8, [x8, _queue_complete_cb@GOTPAGEOFF]
Lloh4:
	ldr	x1, [x8]
	mov	x2, x19
	bl	_hpsb_set_packet_complete_task
	mov	x0, x20
	bl	_spin_lock_irqsave
	add	x0, x19, #24
	add	x1, x20, #4
	bl	_list_add_tail
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w8, [x19, #12]
	str	w8, [x21]
	mov	x0, x21
	bl	_hpsb_send_packet
	mov	x20, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_DBGMSG
	tbz	w20, #31, LBB0_3
; %bb.2:
Lloh7:
	adrp	x8, _RAW1394_ERROR_SEND_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RAW1394_ERROR_SEND_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	str	xzr, [x19]
	mov	x0, x19
	bl	_queue_complete_req
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write_phypacket called - quadlet 0x%8.8x "

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_queue_complete_cb,8,3          ; @queue_complete_cb
l_.str.1:                               ; @.str.1
	.asciz	"write_phypacket send_packet called => retval: %d "

	.comm	_RAW1394_ERROR_SEND_ERROR,4,2   ; @RAW1394_ERROR_SEND_ERROR
	.no_dead_strip	_write_phypacket
.subsections_via_symbols
