	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwmbt_send_fragment
_iwmbt_send_fragment:                   ## @iwmbt_send_fragment
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -68(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r13
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_IWMBT_HCI_MAX_CMD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	leal	(,%r12,8), %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	movl	$64521, %edi                    ## imm = 0xFC09
	callq	_htole16
	movl	%eax, 16(%rbx)
	leaq	1(%r13), %rax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rax
	movq	%r14, (%rax)
	movq	(%rbx), %rdi
	addq	$8, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	movl	-68(%rbp), %r13d                ## 4-byte Reload
	callq	_memcpy
	movq	_IWMBT_BULK_OUT_ENDPOINT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_IWMBT_HCI_CMD_SIZE
	leaq	-52(%rbp), %r8
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	movl	%r13d, %r9d
	callq	_libusb_bulk_transfer
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movl	-52(%rbp), %r15d
	movq	%rbx, %rdi
	callq	_IWMBT_HCI_CMD_SIZE
	cmpl	%eax, %r15d
	jne	LBB0_2
## %bb.3:
	movq	_IWMBT_BULK_IN_ENDPOINT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %r8
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	movl	%r13d, %r9d
	callq	_libusb_bulk_transfer
	movl	%eax, %edi
	xorl	%eax, %eax
	testl	%edi, %edi
	jns	LBB0_6
## %bb.4:
	callq	_libusb_strerror
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_iwmbt_err
	jmp	LBB0_5
LBB0_2:
	movl	%r14d, %edi
	callq	_libusb_strerror
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_IWMBT_HCI_CMD_SIZE
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_iwmbt_err
LBB0_5:
	movl	$-1, %eax
LBB0_6:
	movq	-80(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IWMBT_HCI_MAX_CMD_SIZE,4,2     ## @IWMBT_HCI_MAX_CMD_SIZE
	.comm	_IWMBT_BULK_OUT_ENDPOINT_ADDR,4,2 ## @IWMBT_BULK_OUT_ENDPOINT_ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"libusb_bulk_transfer() failed: err=%s, size=%zu"

	.comm	_IWMBT_BULK_IN_ENDPOINT_ADDR,4,2 ## @IWMBT_BULK_IN_ENDPOINT_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"libusb_bulk_transfer() failed: err=%s"

	.no_dead_strip	_iwmbt_send_fragment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwmbt_send_fragment
_iwmbt_send_fragment:                   ; @iwmbt_send_fragment
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x19, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x20, x0
	mov	x26, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _IWMBT_HCI_MAX_CMD_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IWMBT_HCI_MAX_CMD_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x21, x9, x8
	mov	sp, x21
	lsl	w22, w12, #3
	mov	x0, x21
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	mov	w0, #64521
	bl	_htole16
	str	w0, [x21, #16]
	add	x8, x23, #1
	str	x8, [x21, #8]
	ldr	x8, [x21]
	str	x25, [x8]
	ldr	x8, [x21]
	add	x0, x8, #8
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
Lloh8:
	adrp	x8, _IWMBT_BULK_OUT_ENDPOINT_ADDR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IWMBT_BULK_OUT_ENDPOINT_ADDR@GOTPAGEOFF]
Lloh10:
	ldr	w23, [x8]
	mov	x0, x21
	bl	_IWMBT_HCI_CMD_SIZE
	mov	x3, x0
	sub	x4, x29, #76
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	mov	x5, x19
	bl	_libusb_bulk_transfer
	mov	x23, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldur	w24, [x29, #-76]
	mov	x0, x21
	bl	_IWMBT_HCI_CMD_SIZE
	cmp	w24, w0
	b.ne	LBB0_4
; %bb.2:
Lloh11:
	adrp	x8, _IWMBT_BULK_IN_ENDPOINT_ADDR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IWMBT_BULK_IN_ENDPOINT_ADDR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	sub	x4, x29, #76
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	mov	x5, x19
	bl	_libusb_bulk_transfer
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	w0, #0
	b	LBB0_6
LBB0_4:
	mov	x0, x23
	bl	_libusb_strerror
	mov	x19, x0
	mov	x0, x21
	bl	_IWMBT_HCI_CMD_SIZE
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_iwmbt_err
	add	sp, sp, #16
LBB0_5:
	mov	w0, #-1
LBB0_6:
	mov	sp, x26
	ldur	x8, [x29, #-72]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.7:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
	bl	_libusb_strerror
	mov	x1, x0
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_iwmbt_err
	b	LBB0_5
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IWMBT_HCI_MAX_CMD_SIZE,4,2     ; @IWMBT_HCI_MAX_CMD_SIZE
	.comm	_IWMBT_BULK_OUT_ENDPOINT_ADDR,4,2 ; @IWMBT_BULK_OUT_ENDPOINT_ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"libusb_bulk_transfer() failed: err=%s, size=%zu"

	.comm	_IWMBT_BULK_IN_ENDPOINT_ADDR,4,2 ; @IWMBT_BULK_IN_ENDPOINT_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"libusb_bulk_transfer() failed: err=%s"

	.no_dead_strip	_iwmbt_send_fragment
.subsections_via_symbols
