	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generate_kernel_header         ## -- Begin function generate_kernel_header
	.p2align	4, 0x90
_generate_kernel_header:                ## @generate_kernel_header
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r14d
	movq	_KERNEL_HEADER_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_zyxel_chksm
	movl	%eax, -32(%rbp)
	movl	%r14d, %edi
	callq	_htonl
	movl	%eax, -28(%rbp)
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	addq	$4, %rdi
	leaq	-28(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_KERNEL_HEADER_LEN,4,2          ## @KERNEL_HEADER_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't allocate memory for kernel header!"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generate_kernel_header         ; -- Begin function generate_kernel_header
	.p2align	2
_generate_kernel_header:                ; @generate_kernel_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _KERNEL_HEADER_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KERNEL_HEADER_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_malloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	mov	x0, x21
	mov	x1, x20
	bl	_zyxel_chksm
	str	w0, [sp, #12]
	mov	x0, x20
	bl	_htonl
	str	w0, [sp, #8]
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_memcpy
	add	x0, x19, #4
	add	x1, sp, #8
	mov	w2, #4
	bl	_memcpy
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
Lloh5:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_KERNEL_HEADER_LEN,4,2          ; @KERNEL_HEADER_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't allocate memory for kernel header!"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
.subsections_via_symbols
