	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmveth_set_csum_offload
_ibmveth_set_csum_offload:              ## @ibmveth_set_csum_offload
	.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	%esi, %r14d
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_netif_running
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$1, (%r13)
	movq	%rbx, %rdi
	callq	_ibmveth_close
	movl	$0, (%r13)
LBB0_2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	movq	_IBMVETH_ILLAN_IPV4_TCP_CSUM@GOTPCREL(%rip), %rcx
	movq	_IBMVETH_ILLAN_IPV6_TCP_CSUM@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rbx
	movl	$0, %r14d
	cmoveq	%rbx, %r14
	cmoveq	%rax, %rbx
	movq	(%rcx), %r12
	movl	$0, %r15d
	cmoveq	%r12, %r15
	cmoveq	%rax, %r12
	movq	16(%r13), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_h_illan_attributes
	movq	_H_SUCCESS@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %r8
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.3:
	movq	_IBMVETH_ILLAN_PADDED_PKT_CSUM@GOTPCREL(%rip), %rcx
	testq	%r8, (%rcx)
	je	LBB0_16
## %bb.4:
	movq	16(%r13), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rcx
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_h_illan_attributes
	movq	_H_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	jne	LBB0_5
## %bb.7:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r13)
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_16:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_netdev_err
LBB0_17:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_18
## %bb.19:
	movq	%r12, %rdi
	callq	_ibmveth_open
	jmp	LBB0_20
LBB0_18:
	xorl	%eax, %eax
LBB0_20:
	testl	%ebx, %ebx
	cmovnel	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_netdev_err
	movq	16(%r13), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rcx
	movq	%r12, %rsi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_h_illan_attributes
	cmpl	$1, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_8
## %bb.6:
	movq	_NETIF_F_IP_CSUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r12)
LBB0_8:
	movq	16(%r13), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rcx
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_h_illan_attributes
	movq	%rax, %r15
	movq	_H_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.11:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, 8(%r13)
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_netdev_err
	movq	16(%r13), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rcx
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	callq	_h_illan_attributes
	movq	_H_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	$1, %ebx
	jne	LBB0_12
## %bb.10:
	movq	_NETIF_F_IPV6_CSUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r12)
LBB0_12:
	movq	(%rcx), %rax
	cmpq	%rax, -80(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_14
## %bb.13:
	cmpq	%rax, %r15
	je	LBB0_14
## %bb.15:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_14:
	movl	%ebx, 12(%r13)
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_IBMVETH_ILLAN_IPV4_TCP_CSUM,8,3 ## @IBMVETH_ILLAN_IPV4_TCP_CSUM
	.comm	_IBMVETH_ILLAN_IPV6_TCP_CSUM,8,3 ## @IBMVETH_ILLAN_IPV6_TCP_CSUM
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
	.comm	_IBMVETH_ILLAN_PADDED_PKT_CSUM,8,3 ## @IBMVETH_ILLAN_PADDED_PKT_CSUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to change IPv4 checksum offload settings. %d rc=%ld\n"

	.comm	_NETIF_F_IP_CSUM,4,2            ## @NETIF_F_IP_CSUM
L_.str.1:                               ## @.str.1
	.asciz	"unable to change IPv6 checksum offload settings. %d rc=%ld\n"

	.comm	_NETIF_F_IPV6_CSUM,4,2          ## @NETIF_F_IPV6_CSUM
	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"unable to change checksum offload settings. %d rc=%ld ret_attr=%lx\n"

	.no_dead_strip	_ibmveth_set_csum_offload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmveth_set_csum_offload
_ibmveth_set_csum_offload:              ; @ibmveth_set_csum_offload
	.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, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x22, x0
	mov	x0, x19
	bl	_netif_running
	mov	x20, x0
	cbz	x0, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x22]
	mov	x0, x19
	bl	_ibmveth_close
	str	wzr, [x22]
LBB0_2:
Lloh0:
	adrp	x8, _IBMVETH_ILLAN_IPV4_TCP_CSUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IBMVETH_ILLAN_IPV4_TCP_CSUM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _IBMVETH_ILLAN_IPV6_TCP_CSUM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IBMVETH_ILLAN_IPV6_TCP_CSUM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	w21, #0
	csel	x23, x9, xzr, eq
	csel	x24, xzr, x9, eq
	csel	x26, x8, xzr, eq
	csel	x27, xzr, x8, eq
	ldr	x8, [x22, #16]
	ldr	w0, [x8]
	add	x3, sp, #8
	mov	x1, #0
	mov	x2, #0
	bl	_h_illan_attributes
	mov	x3, x0
Lloh6:
	adrp	x28, _H_SUCCESS@GOTPAGE
Lloh7:
	ldr	x28, [x28, _H_SUCCESS@GOTPAGEOFF]
	ldr	x9, [x28]
	ldr	x8, [sp, #8]
	cmp	x0, x9
	b.ne	LBB0_6
; %bb.3:
Lloh8:
	adrp	x9, _IBMVETH_ILLAN_PADDED_PKT_CSUM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IBMVETH_ILLAN_PADDED_PKT_CSUM@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	tst	x9, x8
	b.eq	LBB0_6
; %bb.4:
	ldr	x8, [x22, #16]
	ldr	w0, [x8]
	add	x3, sp, #8
	mov	x1, x26
	mov	x2, x27
	bl	_h_illan_attributes
	mov	x25, x0
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.5:
	str	w21, [x22, #4]
	b	LBB0_13
LBB0_6:
Lloh11:
	adrp	x9, _EIO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	neg	w23, w9
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_netdev_err
LBB0_7:
	cbz	x20, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_ibmveth_open
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	cmp	w23, #0
	csel	w0, w0, w23, eq
	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_11:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x25
	bl	_netdev_err
	ldr	x8, [x22, #16]
	ldr	w0, [x8]
	add	x3, sp, #8
	mov	x1, x27
	mov	x2, x26
	bl	_h_illan_attributes
	cmp	w21, #1
	b.ne	LBB0_13
; %bb.12:
Lloh18:
	adrp	x8, _NETIF_F_IP_CSUM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NETIF_F_IP_CSUM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_13:
	ldr	x8, [x22, #16]
	ldr	w0, [x8]
	add	x3, sp, #8
	mov	x1, x23
	mov	x2, x24
	bl	_h_illan_attributes
	mov	x26, x0
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.14:
	str	w21, [x22, #8]
	b	LBB0_17
LBB0_15:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x26
	bl	_netdev_err
	ldr	x8, [x22, #16]
	ldr	w0, [x8]
	add	x3, sp, #8
	mov	x1, x24
	mov	x2, x23
	bl	_h_illan_attributes
	cmp	w21, #1
	b.ne	LBB0_17
; %bb.16:
Lloh23:
	adrp	x8, _NETIF_F_IPV6_CSUM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NETIF_F_IPV6_CSUM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_17:
	ldr	x8, [x28]
	cmp	x25, x8
	b.eq	LBB0_20
; %bb.18:
	cmp	x26, x8
	b.eq	LBB0_20
; %bb.19:
Lloh26:
	adrp	x8, _EIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_7
LBB0_20:
	mov	w23, #0
	str	w21, [x22, #12]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_IBMVETH_ILLAN_IPV4_TCP_CSUM,8,3 ; @IBMVETH_ILLAN_IPV4_TCP_CSUM
	.comm	_IBMVETH_ILLAN_IPV6_TCP_CSUM,8,3 ; @IBMVETH_ILLAN_IPV6_TCP_CSUM
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
	.comm	_IBMVETH_ILLAN_PADDED_PKT_CSUM,8,3 ; @IBMVETH_ILLAN_PADDED_PKT_CSUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to change IPv4 checksum offload settings. %d rc=%ld\n"

	.comm	_NETIF_F_IP_CSUM,4,2            ; @NETIF_F_IP_CSUM
l_.str.1:                               ; @.str.1
	.asciz	"unable to change IPv6 checksum offload settings. %d rc=%ld\n"

	.comm	_NETIF_F_IPV6_CSUM,4,2          ; @NETIF_F_IPV6_CSUM
	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"unable to change checksum offload settings. %d rc=%ld ret_attr=%lx\n"

	.no_dead_strip	_ibmveth_set_csum_offload
.subsections_via_symbols
