	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_sendmsg
_bcm_sendmsg:                           ## @bcm_sendmsg
	.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
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	(%rsi), %r15
	movq	%r15, %rdi
	callq	_bcm_sk
	cmpl	$0, 12(%rax)
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	_MHSIZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%r13, %rcx
	ja	LBB0_8
## %bb.4:
	movl	(%rbx), %edi
	movq	%r13, %rax
	subq	%rcx, %rax
	movq	_CFSIZ@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_5
## %bb.6:
	xorl	%edx, %edx
	divq	%rsi
	testq	%rdx, %rdx
	jne	LBB0_8
	jmp	LBB0_9
LBB0_1:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	je	LBB0_9
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_36:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	testl	%edi, %edi
	je	LBB0_10
LBB0_17:
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	(%r14), %esi
	leaq	-64(%rbp), %rdi
	movq	%rcx, %rdx
	callq	_memcpy_fromiovec
	testl	%eax, %eax
	js	LBB0_18
## %bb.19:
	movq	%r15, %rdi
	callq	_lock_sock
	movl	-64(%rbp), %eax
	addl	$-128, %eax
	cmpl	$6, %eax
	ja	LBB0_27
## %bb.20:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_21:
	leaq	-64(%rbp), %rdi
	movq	%r14, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%r15, %rcx
	callq	_bcm_tx_setup
	jmp	LBB0_34
LBB0_10:
	movq	8(%r14), %rax
	xorl	%edi, %edi
	testq	%rax, %rax
	je	LBB0_17
## %bb.11:
	movq	(%rax), %rdx
	movq	_AF_CAN@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_8
## %bb.12:
	movl	8(%rax), %r12d
	testl	%r12d, %r12d
	je	LBB0_17
## %bb.13:
	movq	_init_net@GOTPCREL(%rip), %rdi
	movl	%r12d, %esi
	callq	_dev_get_by_index
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	(%rax), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	_ARPHRD_CAN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_dev_put
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_14
## %bb.16:
	movq	_MHSIZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	%r12d, %edi
	jmp	LBB0_17
LBB0_18:
	movl	%eax, %r12d
	jmp	LBB0_36
LBB0_28:
	movq	_TX_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	addq	$8, %rbx
	jmp	LBB0_29
LBB0_23:
	addq	$8, %rbx
	movl	-56(%rbp), %esi
	movq	%rbx, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_bcm_delete_tx_op
	jmp	LBB0_24
LBB0_22:
	leaq	-64(%rbp), %rdi
	movq	%r14, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%r15, %rcx
	callq	_bcm_rx_setup
	jmp	LBB0_34
LBB0_31:
	cmpl	$1, -60(%rbp)
	jne	LBB0_27
## %bb.32:
	movq	_MHSIZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CFSIZ@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	cmpq	%r13, %rax
	jne	LBB0_27
## %bb.33:
	movq	%r14, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	%r15, %rdx
	callq	_bcm_tx_send
	jmp	LBB0_34
LBB0_30:
	movq	_RX_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	addq	$4, %rbx
LBB0_29:
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_bcm_read_op
LBB0_34:
	movl	%eax, %r12d
	jmp	LBB0_35
LBB0_26:
	addq	$4, %rbx
	movl	-56(%rbp), %esi
	movq	%rbx, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_bcm_delete_rx_op
LBB0_24:
	testl	%eax, %eax
	je	LBB0_27
## %bb.25:
	movq	_MHSIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_35
LBB0_27:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_35:
	movq	%r15, %rdi
	callq	_release_sock
	jmp	LBB0_36
LBB0_14:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_31, LBB0_31-LJTI0_0
.set L0_0_set_28, LBB0_28-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_30, LBB0_30-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
LJTI0_0:
	.long	L0_0_set_21
	.long	L0_0_set_31
	.long	L0_0_set_28
	.long	L0_0_set_23
	.long	L0_0_set_22
	.long	L0_0_set_30
	.long	L0_0_set_26
	.end_data_region
                                        ## -- End function
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_MHSIZ,8,3                      ## @MHSIZ
	.comm	_CFSIZ,8,3                      ## @CFSIZ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AF_CAN,8,3                     ## @AF_CAN
	.comm	_init_net,4,2                   ## @init_net
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ARPHRD_CAN,8,3                 ## @ARPHRD_CAN
	.comm	_TX_STATUS,4,2                  ## @TX_STATUS
	.comm	_RX_STATUS,4,2                  ## @RX_STATUS
	.no_dead_strip	_bcm_sendmsg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_sendmsg
_bcm_sendmsg:                           ; @bcm_sendmsg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x3
	mov	x20, x2
	ldr	x19, [x1]
	mov	x0, x19
	bl	_bcm_sk
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x25, _MHSIZ@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MHSIZ@GOTPAGEOFF]
	ldr	x2, [x25]
	cmp	x2, x21
	b.hi	LBB0_3
; %bb.2:
	sub	x8, x21, x2
Lloh2:
	adrp	x26, _CFSIZ@GOTPAGE
Lloh3:
	ldr	x26, [x26, _CFSIZ@GOTPAGEOFF]
	ldr	x9, [x26]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	cbz	x8, LBB0_7
LBB0_3:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_6:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	mov	x23, x0
	ldr	w22, [x0]
	cbz	w22, LBB0_12
LBB0_8:
	ldr	w1, [x20]
	mov	x0, sp
	bl	_memcpy_fromiovec
	tbnz	w0, #31, LBB0_18
; %bb.9:
	mov	x0, x19
	bl	_lock_sock
	ldr	w8, [sp]
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_30
; %bb.10:
Lloh8:
	adrp	x9, lJTI0_0@PAGE
Lloh9:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_11
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_11:
	mov	x0, sp
	mov	x1, x20
	mov	x2, x22
	mov	x3, x19
	bl	_bcm_tx_setup
	mov	x24, x0
	b	LBB0_31
LBB0_12:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_19
; %bb.13:
	ldr	x9, [x8]
Lloh10:
	adrp	x10, _AF_CAN@GOTPAGE
Lloh11:
	ldr	x10, [x10, _AF_CAN@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.14:
	ldr	w22, [x8, #8]
	cbz	w22, LBB0_8
; %bb.15:
Lloh13:
	adrp	x0, _init_net@GOTPAGE
Lloh14:
	ldr	x0, [x0, _init_net@GOTPAGEOFF]
	mov	x1, x22
	bl	_dev_get_by_index
	cbz	x0, LBB0_32
; %bb.16:
	ldr	x24, [x0]
Lloh15:
	adrp	x8, _ARPHRD_CAN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ARPHRD_CAN@GOTPAGEOFF]
Lloh17:
	ldr	x27, [x8]
	bl	_dev_put
	cmp	x24, x27
	b.ne	LBB0_32
; %bb.17:
	ldr	x2, [x25]
	b	LBB0_8
LBB0_18:
	mov	x24, x0
	b	LBB0_6
LBB0_19:
	mov	w22, #0
	b	LBB0_8
LBB0_20:
Lloh18:
	adrp	x8, _TX_STATUS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TX_STATUS@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [sp]
	add	x0, x23, #8
	b	LBB0_27
LBB0_21:
	add	x0, x23, #8
	ldr	w1, [sp, #8]
	mov	x2, x22
	bl	_bcm_delete_tx_op
	cbnz	w0, LBB0_29
	b	LBB0_30
LBB0_22:
	mov	x0, sp
	mov	x1, x20
	mov	x2, x22
	mov	x3, x19
	bl	_bcm_rx_setup
	mov	x24, x0
	b	LBB0_31
LBB0_23:
	ldr	w8, [sp, #4]
	cmp	w8, #1
	b.ne	LBB0_30
; %bb.24:
	ldr	x8, [x26]
	ldr	x9, [x25]
	add	x8, x9, x8
	cmp	x8, x21
	b.ne	LBB0_30
; %bb.25:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_bcm_tx_send
	mov	x24, x0
	b	LBB0_31
LBB0_26:
Lloh21:
	adrp	x8, _RX_STATUS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RX_STATUS@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [sp]
	add	x0, x23, #4
LBB0_27:
	mov	x1, sp
	mov	x2, x22
	bl	_bcm_read_op
	mov	x24, x0
	b	LBB0_31
LBB0_28:
	add	x0, x23, #4
	ldr	w1, [sp, #8]
	mov	x2, x22
	bl	_bcm_delete_rx_op
	cbz	w0, LBB0_30
LBB0_29:
	ldr	w24, [x25]
	b	LBB0_31
LBB0_30:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_31:
	mov	x0, x19
	bl	_release_sock
	b	LBB0_6
LBB0_32:
Lloh27:
	adrp	x8, _ENODEV@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_23-LBB0_11)>>2
	.byte	(LBB0_20-LBB0_11)>>2
	.byte	(LBB0_21-LBB0_11)>>2
	.byte	(LBB0_22-LBB0_11)>>2
	.byte	(LBB0_26-LBB0_11)>>2
	.byte	(LBB0_28-LBB0_11)>>2
                                        ; -- End function
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_MHSIZ,8,3                      ; @MHSIZ
	.comm	_CFSIZ,8,3                      ; @CFSIZ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AF_CAN,8,3                     ; @AF_CAN
	.comm	_init_net,4,2                   ; @init_net
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ARPHRD_CAN,8,3                 ; @ARPHRD_CAN
	.comm	_TX_STATUS,4,2                  ; @TX_STATUS
	.comm	_RX_STATUS,4,2                  ; @RX_STATUS
	.no_dead_strip	_bcm_sendmsg
.subsections_via_symbols
