	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ub_cmd_build_packet
_ub_cmd_build_packet:                   ## @ub_cmd_build_packet
	.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	%rcx, %r15
	movq	%rdx, %rbx
	movq	8(%rcx), %r14
	movq	%r14, %rdi
	callq	_blk_rq_bytes
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_rq_data_dir
	movq	_WRITE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	_UB_DIR_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_UB_DIR_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_UB_DIR_READ@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movl	(%r15), %edx
	movl	%edx, (%rbx)
	movq	32(%rbx), %rdi
	movl	4(%r15), %esi
	shll	$2, %edx
	callq	_memcpy
	leaq	24(%rbx), %rdi
	movl	(%r14), %edx
	movl	8(%r14), %esi
	callq	_memcpy
	movl	(%r14), %eax
	movl	%eax, 4(%rbx)
	movq	%r14, %rdi
	callq	_blk_rq_bytes
	movq	%rax, 16(%rbx)
	movl	4(%r14), %eax
	movl	%eax, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UB_DIR_NONE,4,2                ## @UB_DIR_NONE
	.comm	_WRITE,8,3                      ## @WRITE
	.comm	_UB_DIR_WRITE,4,2               ## @UB_DIR_WRITE
	.comm	_UB_DIR_READ,4,2                ## @UB_DIR_READ
	.no_dead_strip	_ub_cmd_build_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ub_cmd_build_packet
_ub_cmd_build_packet:                   ; @ub_cmd_build_packet
	.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	x21, x3
	mov	x19, x2
	ldr	x20, [x3, #8]
	mov	x0, x20
	bl	_blk_rq_bytes
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_rq_data_dir
Lloh0:
	adrp	x8, _WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WRITE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _UB_DIR_READ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _UB_DIR_READ@GOTPAGEOFF]
Lloh5:
	adrp	x10, _UB_DIR_WRITE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _UB_DIR_WRITE@GOTPAGEOFF]
	cmp	x0, x8
	csel	x8, x10, x9, eq
	b	LBB0_3
LBB0_2:
Lloh7:
	adrp	x8, _UB_DIR_NONE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _UB_DIR_NONE@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	ldp	w8, w1, [x21]
	str	w8, [x19]
	ldr	x0, [x19, #32]
	lsl	w2, w8, #2
	bl	_memcpy
	add	x0, x19, #24
	ldr	w1, [x20, #8]
	ldr	w2, [x20]
	bl	_memcpy
	ldr	w8, [x20]
	str	w8, [x19, #4]
	mov	x0, x20
	bl	_blk_rq_bytes
	str	x0, [x19, #16]
	ldr	w8, [x20, #4]
	str	w8, [x19, #8]
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_UB_DIR_NONE,4,2                ; @UB_DIR_NONE
	.comm	_WRITE,8,3                      ; @WRITE
	.comm	_UB_DIR_WRITE,4,2               ; @UB_DIR_WRITE
	.comm	_UB_DIR_READ,4,2                ; @UB_DIR_READ
	.no_dead_strip	_ub_cmd_build_packet
.subsections_via_symbols
