	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_wfile
_init_wfile:                            ## @init_wfile
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_w_arg@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_TRUNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_S_IRUSR@GOTPCREL(%rip), %rax
	movq	_S_IWUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_open
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	leaq	-40(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_USBCAP_FILEHDR_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htole32
	movl	%eax, -24(%rbp)
	movq	$0, -32(%rbp)
	movl	$3, -40(%rbp)
	movq	(%rbx), %rdi
	movq	%r14, %rsi
	movl	$24, %edx
	callq	_write
	cmpl	$24, %eax
	je	LBB0_4
## %bb.3:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_4:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_w_arg,4,2                      ## @w_arg
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not open '%s' for write"

	.comm	_USBCAP_FILEHDR_MAGIC,4,2       ## @USBCAP_FILEHDR_MAGIC
L_.str.1:                               ## @.str.1
	.asciz	"Could not write USB capture header"

	.no_dead_strip	_init_wfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_wfile
_init_wfile:                            ; @init_wfile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
Lloh0:
	adrp	x20, _w_arg@GOTPAGE
Lloh1:
	ldr	x20, [x20, _w_arg@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _S_IRUSR@GOTPAGE
Lloh12:
	ldr	x10, [x10, _S_IRUSR@GOTPAGEOFF]
	orr	w1, w8, w9
Lloh13:
	ldr	w8, [x10]
Lloh14:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_open
	str	x0, [x19]
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh17:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_2:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh22:
	adrp	x8, _USBCAP_FILEHDR_MAGIC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _USBCAP_FILEHDR_MAGIC@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_htole32
	str	w0, [sp, #24]
	str	xzr, [sp, #16]
	mov	w8, #3
	str	w8, [sp, #8]
	ldr	x0, [x19]
	add	x1, sp, #8
	mov	w2, #24
	bl	_write
	cmp	w0, #24
	b.eq	LBB0_4
; %bb.3:
Lloh25:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_w_arg,4,2                      ; @w_arg
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not open '%s' for write"

	.comm	_USBCAP_FILEHDR_MAGIC,4,2       ; @USBCAP_FILEHDR_MAGIC
l_.str.1:                               ; @.str.1
	.asciz	"Could not write USB capture header"

	.no_dead_strip	_init_wfile
.subsections_via_symbols
