	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ofwo_oemlogo
_ofwo_oemlogo:                          ## @ofwo_oemlogo
	.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
	movq	%r8, %rbx
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_OFWO_LOGO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.1:
	cmpb	$0, (%rbx)
	je	LBB0_2
## %bb.3:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r13d
	movq	_OFWO_LOGO@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_read
	cmpl	(%r14), %eax
	jne	LBB0_7
## %bb.6:
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_lseek
	cmpl	(%r14), %eax
	jne	LBB0_7
## %bb.8:
	movl	%r13d, %edi
	callq	_close
	movslq	(%r14), %rax
	movb	$0, (%r12,%rax)
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_ofw_optnode
	movq	(%r15), %rdx
	movl	(%r14), %r8d
	incl	%r8d
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r12, %rcx
	callq	_ofw_setprop
	movq	_EX_OK@GOTPCREL(%rip), %rbx
	cmpl	(%r14), %eax
	je	LBB0_14
## %bb.9:
	movq	_EX_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_errx
	jmp	LBB0_14
LBB0_10:
	movq	(%r15), %rsi
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	callq	_printf
	jmp	LBB0_13
LBB0_2:
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_ofw_optnode
	movq	(%r15), %rdx
	leaq	L_.str(%rip), %rcx
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$1, %r8d
	callq	_ofw_setprop
	jmp	LBB0_13
LBB0_7:
	movl	%r13d, %edi
	callq	_close
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	callq	_warnx
	movq	_EX_USAGE@GOTPCREL(%rip), %rbx
	jmp	LBB0_14
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_warn
	movq	_EX_USAGE@GOTPCREL(%rip), %rbx
	jmp	LBB0_14
LBB0_12:
	movq	%rsi, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_ofwo_printprop
LBB0_13:
	movq	_EX_OK@GOTPCREL(%rip), %rbx
LBB0_14:
	movl	(%rbx), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_OFWO_LOGO,4,2                  ## @OFWO_LOGO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"could not open '%s'"

	.comm	_EX_USAGE,4,2                   ## @EX_USAGE
	.comm	_SEEK_END,4,2                   ## @SEEK_END
L_.str.2:                               ## @.str.2
	.asciz	"logo '%s' has wrong size."

	.comm	_EX_IOERR,4,2                   ## @EX_IOERR
L_.str.3:                               ## @.str.3
	.asciz	"writing logo failed."

L_.str.4:                               ## @.str.4
	.asciz	"%s: <logo data>\n"

	.comm	_EX_OK,4,2                      ## @EX_OK
	.no_dead_strip	_ofwo_oemlogo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ofwo_oemlogo
_ofwo_oemlogo:                          ; @ofwo_oemlogo
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x21, x4
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x24, _OFWO_LOGO@GOTPAGE
Lloh4:
	ldr	x24, [x24, _OFWO_LOGO@GOTPAGEOFF]
	ldr	w8, [x24]
	add	w8, w8, #1
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	cbz	x4, LBB0_7
; %bb.1:
	ldrb	w8, [x21]
	cbz	w8, LBB0_9
; %bb.2:
Lloh7:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.3:
	mov	x23, x0
	ldr	w2, [x24]
	mov	x1, x22
	bl	_read
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.4:
Lloh10:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x23
	mov	w1, #0
	bl	_lseek
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x23
	bl	_close
	ldrsw	x8, [x24]
	strb	wzr, [x22, x8]
	mov	x0, x19
	bl	_ofw_optnode
	mov	x1, x0
	ldr	x2, [x20]
	ldr	w8, [x24]
	add	w4, w8, #1
	mov	x0, x19
	mov	x3, x22
	bl	_ofw_setprop
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_14
; %bb.6:
Lloh13:
	adrp	x8, _EX_IOERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EX_IOERR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_errx
	b	LBB0_14
LBB0_7:
	ldr	x1, [x20]
	cbz	w3, LBB0_13
; %bb.8:
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printf
	b	LBB0_14
LBB0_9:
	mov	x0, x19
	bl	_ofw_optnode
	mov	x1, x0
	ldr	x2, [x20]
Lloh20:
	adrp	x3, l_.str@PAGE
Lloh21:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w4, #1
	bl	_ofw_setprop
	b	LBB0_14
LBB0_10:
	mov	x0, x23
	bl	_close
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_warnx
	b	LBB0_12
LBB0_11:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_warn
LBB0_12:
Lloh26:
	adrp	x8, _EX_USAGE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EX_USAGE@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
	mov	x0, x1
	mov	x1, x2
	mov	w2, #0
	bl	_ofwo_printprop
LBB0_14:
Lloh28:
	adrp	x8, _EX_OK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EX_OK@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
	ldur	x8, [x29, #-56]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_OFWO_LOGO,4,2                  ; @OFWO_LOGO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"could not open '%s'"

	.comm	_EX_USAGE,4,2                   ; @EX_USAGE
	.comm	_SEEK_END,4,2                   ; @SEEK_END
l_.str.2:                               ; @.str.2
	.asciz	"logo '%s' has wrong size."

	.comm	_EX_IOERR,4,2                   ; @EX_IOERR
l_.str.3:                               ; @.str.3
	.asciz	"writing logo failed."

l_.str.4:                               ; @.str.4
	.asciz	"%s: <logo data>\n"

	.comm	_EX_OK,4,2                      ; @EX_OK
	.no_dead_strip	_ofwo_oemlogo
.subsections_via_symbols
