	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfcomm_tty_write
_rfcomm_tty_write:                      ## @rfcomm_tty_write
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rsi
	movq	(%rdi), %r13
	movq	(%r13), %r15
	leaq	L_.str(%rip), %rdi
	callq	_BT_DBG
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	movq	_uint@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_min_t
	movl	%eax, %r14d
	movslq	%eax, %rsi
	movq	_RFCOMM_SKB_RESERVE@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_rfcomm_wmalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	%r15, %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_RFCOMM_SKB_HEAD_RESERVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_skb_reserve
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_skb_put
	movslq	%ebx, %rsi
	addq	-64(%rbp), %rsi                 ## 8-byte Folded Reload
	movl	%eax, %edi
	movl	%r14d, %edx
	callq	_memcpy
	movq	%r13, %r15
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_rfcomm_dlc_send
	testl	%eax, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	addl	%r14d, %ebx
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	subl	%r14d, %esi
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_uint@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %r13
	movl	(%r15), %edx
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	callq	_min_t
	movl	%eax, %r14d
	movslq	%eax, %rsi
	movq	_RFCOMM_SKB_RESERVE@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_rfcomm_wmalloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_6
	jmp	LBB0_9
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_3:
	xorl	%ebx, %ebx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_9
LBB0_7:
	movq	%r12, %rdi
	callq	_kfree_skb
LBB0_9:
	testl	%ebx, %ebx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jne	LBB0_11
LBB0_10:
	movl	%eax, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tty %p count %d"

	.comm	_uint,4,2                       ## @uint
	.comm	_RFCOMM_SKB_RESERVE,8,3         ## @RFCOMM_SKB_RESERVE
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_RFCOMM_SKB_HEAD_RESERVE,4,2    ## @RFCOMM_SKB_HEAD_RESERVE
	.no_dead_strip	_rfcomm_tty_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfcomm_tty_write
_rfcomm_tty_write:                      ; @rfcomm_tty_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x1, x0
	ldr	x21, [x0]
	ldr	x22, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_DBG
	cbz	w19, LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _uint@GOTPAGE
Lloh3:
	ldr	x8, [x8, _uint@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w2, [x22]
	mov	x1, x19
	bl	_min_t
	mov	x24, x0
Lloh5:
	adrp	x8, _RFCOMM_SKB_RESERVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RFCOMM_SKB_RESERVE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x1, x8, w0, sxtw
Lloh8:
	adrp	x27, _GFP_ATOMIC@GOTPAGE
Lloh9:
	ldr	x27, [x27, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w2, [x27]
	mov	x0, x21
	bl	_rfcomm_wmalloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x26, x0
	mov	w23, #0
Lloh10:
	adrp	x28, _RFCOMM_SKB_HEAD_RESERVE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _RFCOMM_SKB_HEAD_RESERVE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x28]
	mov	x0, x26
	bl	_skb_reserve
	mov	x0, x26
	mov	x1, x24
	bl	_skb_put
	add	x1, x20, w23, sxtw
	mov	x2, x24
	bl	_memcpy
	mov	x0, x22
	mov	x1, x26
	bl	_rfcomm_dlc_send
	mov	x25, x0
	tbnz	w0, #31, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w24, w23
	subs	w19, w19, w24
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh12:
	adrp	x8, _uint@GOTPAGE
Lloh13:
	ldr	x8, [x8, _uint@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w2, [x22]
	mov	x1, x19
	bl	_min_t
	mov	x24, x0
Lloh15:
	adrp	x8, _RFCOMM_SKB_RESERVE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RFCOMM_SKB_RESERVE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	add	x1, x8, w0, sxtw
	ldr	w2, [x27]
	mov	x0, x21
	bl	_rfcomm_wmalloc
	mov	x26, x0
	cbnz	x0, LBB0_3
	b	LBB0_8
LBB0_6:
	mov	w25, #0
	b	LBB0_9
LBB0_7:
	mov	w23, #0
	mov	w25, #0
LBB0_8:
	cbnz	w23, LBB0_10
LBB0_9:
	mov	x23, x25
LBB0_10:
	mov	x0, x23
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x0, x26
	bl	_kfree_skb
	cbnz	w23, LBB0_10
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tty %p count %d"

	.comm	_uint,4,2                       ; @uint
	.comm	_RFCOMM_SKB_RESERVE,8,3         ; @RFCOMM_SKB_RESERVE
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_RFCOMM_SKB_HEAD_RESERVE,4,2    ; @RFCOMM_SKB_HEAD_RESERVE
	.no_dead_strip	_rfcomm_tty_write
.subsections_via_symbols
