	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function transmit_allocate
_transmit_allocate:                     ## @transmit_allocate
	.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, %r15d
	movq	%rdi, %r12
	movq	_CMD_ALLOCATETX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movl	%esi, -64(%rbp)
	callq	_down_interruptible
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_14
LBB0_2:
	leaq	-64(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_issuecommand
	movq	_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	cmpb	$0, -47(%rbp)
	jne	LBB0_3
## %bb.5:
	movl	$-3000, %ebx                    ## imm = 0xF448
	movq	_EVSTAT@GOTPCREL(%rip), %r14
	movq	_EV_ALLOC@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_IN4500
	testl	%eax, (%r13)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	jne	LBB0_6
	jmp	LBB0_3
LBB0_8:
	movq	_TXALLOCFID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_IN4500
	movl	%eax, %r14d
	movq	_EVACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r12, %rdi
	callq	_OUT4500
	movq	_TXCTL_TXOK@GOTPCREL(%rip), %rax
	movq	_TXCTL_TXEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	testl	%r15d, %r15d
	jne	LBB0_9
## %bb.10:
	movq	_TXCTL_802_3@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_TXCTL_802_11@GOTPCREL(%rip), %rax
LBB0_11:
	orl	(%rax), %edi
	movq	_TXCTL_ETHERNET@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_TXCTL_NORELEASE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le16
	movl	%eax, -52(%rbp)
	movq	_BAP1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$8, %edx
	callq	_bap_setup
	movq	_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.12:
	movl	(%rbx), %ecx
	leaq	-52(%rbp), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_bap_write
	jmp	LBB0_13
LBB0_3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_13:
	movq	%r12, %rdi
	callq	_up
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_ALLOCATETX,4,2             ## @CMD_ALLOCATETX
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_SUCCESS,8,3                    ## @SUCCESS
	.comm	_EVSTAT,4,2                     ## @EVSTAT
	.comm	_EV_ALLOC,4,2                   ## @EV_ALLOC
	.comm	_TXALLOCFID,4,2                 ## @TXALLOCFID
	.comm	_EVACK,4,2                      ## @EVACK
	.comm	_TXCTL_TXOK,4,2                 ## @TXCTL_TXOK
	.comm	_TXCTL_TXEX,4,2                 ## @TXCTL_TXEX
	.comm	_TXCTL_802_11,4,2               ## @TXCTL_802_11
	.comm	_TXCTL_ETHERNET,4,2             ## @TXCTL_ETHERNET
	.comm	_TXCTL_NORELEASE,4,2            ## @TXCTL_NORELEASE
	.comm	_TXCTL_802_3,4,2                ## @TXCTL_802_3
	.comm	_BAP1,4,2                       ## @BAP1
	.no_dead_strip	_transmit_allocate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function transmit_allocate
_transmit_allocate:                     ; @transmit_allocate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _CMD_ALLOCATETX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_ALLOCATETX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w1, w8, [sp, #24]
	bl	_down_interruptible
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	b	LBB0_11
LBB0_2:
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x0, x19
	bl	_issuecommand
Lloh6:
	adrp	x22, _SUCCESS@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.3:
	ldrb	w8, [sp, #17]
	cbnz	w8, LBB0_9
; %bb.4:
	mov	w20, #-3000
Lloh8:
	adrp	x24, _EVSTAT@GOTPAGE
Lloh9:
	ldr	x24, [x24, _EVSTAT@GOTPAGEOFF]
Lloh10:
	adrp	x23, _EV_ALLOC@GOTPAGE
Lloh11:
	ldr	x23, [x23, _EV_ALLOC@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_IN4500
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	adds	w20, w20, #1
	b.lo	LBB0_5
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _TXALLOCFID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TXALLOCFID@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_IN4500
	mov	x20, x0
Lloh15:
	adrp	x8, _EVACK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EVACK@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_OUT4500
Lloh18:
	adrp	x8, _TXCTL_TXOK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TXCTL_TXOK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _TXCTL_TXEX@GOTPAGE
Lloh22:
	ldr	x9, [x9, _TXCTL_TXEX@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _TXCTL_802_3@GOTPAGE
Lloh25:
	ldr	x9, [x9, _TXCTL_802_3@GOTPAGEOFF]
Lloh26:
	adrp	x10, _TXCTL_802_11@GOTPAGE
Lloh27:
	ldr	x10, [x10, _TXCTL_802_11@GOTPAGEOFF]
	cmp	w21, #0
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh28:
	adrp	x9, _TXCTL_ETHERNET@GOTPAGE
Lloh29:
	ldr	x9, [x9, _TXCTL_ETHERNET@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh31:
	adrp	x9, _TXCTL_NORELEASE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _TXCTL_NORELEASE@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_cpu_to_le16
	str	w0, [sp, #12]
Lloh34:
	adrp	x21, _BAP1@GOTPAGE
Lloh35:
	ldr	x21, [x21, _BAP1@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #8
	bl	_bap_setup
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
	ldr	w3, [x21]
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_bap_write
	b	LBB0_10
LBB0_9:
Lloh36:
	adrp	x8, _ERROR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh38:
	ldr	w20, [x8]
LBB0_10:
	mov	x0, x19
	bl	_up
LBB0_11:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_ALLOCATETX,4,2             ; @CMD_ALLOCATETX
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_SUCCESS,8,3                    ; @SUCCESS
	.comm	_EVSTAT,4,2                     ; @EVSTAT
	.comm	_EV_ALLOC,4,2                   ; @EV_ALLOC
	.comm	_TXALLOCFID,4,2                 ; @TXALLOCFID
	.comm	_EVACK,4,2                      ; @EVACK
	.comm	_TXCTL_TXOK,4,2                 ; @TXCTL_TXOK
	.comm	_TXCTL_TXEX,4,2                 ; @TXCTL_TXEX
	.comm	_TXCTL_802_11,4,2               ; @TXCTL_802_11
	.comm	_TXCTL_ETHERNET,4,2             ; @TXCTL_ETHERNET
	.comm	_TXCTL_NORELEASE,4,2            ; @TXCTL_NORELEASE
	.comm	_TXCTL_802_3,4,2                ; @TXCTL_802_3
	.comm	_BAP1,4,2                       ; @BAP1
	.no_dead_strip	_transmit_allocate
.subsections_via_symbols
