	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kadm5_log_reinit               ## -- Begin function kadm5_log_reinit
	.p2align	4, 0x90
_kadm5_log_reinit:                      ## @kadm5_log_reinit
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	cmpl	$-1, %edi
	je	LBB0_2
## %bb.1:
	movq	_LOCK_UN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_flock
	movl	(%r14), %edi
	callq	_close
	movl	$-1, (%r14)
LBB0_2:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	16(%r14), %edi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$384, %edx                      ## imm = 0x180
	callq	_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movq	_LOCK_EX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_flock
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movq	$0, 8(%r14)
	movl	%ebx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movl	%ebx, %edi
	callq	_close
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOCK_UN,4,2                    ## @LOCK_UN
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_errno,4,2                      ## @errno
	.comm	_LOCK_EX,4,2                    ## @LOCK_EX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kadm5_log_reinit               ; -- Begin function kadm5_log_reinit
	.p2align	2
_kadm5_log_reinit:                      ; @kadm5_log_reinit
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0]
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _LOCK_UN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOCK_UN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_flock
	ldr	w0, [x19]
	bl	_close
	mov	w8, #-1
	str	w8, [x19]
LBB0_2:
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w2, #384
	bl	_open
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	x20, x0
Lloh12:
	adrp	x8, _LOCK_EX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LOCK_EX@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_flock
	tbnz	x0, #63, LBB0_5
; %bb.4:
	mov	w0, #0
	str	xzr, [x19, #8]
	str	w20, [x19]
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	bl	_close
LBB0_6:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LOCK_UN,4,2                    ; @LOCK_UN
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_errno,4,2                      ; @errno
	.comm	_LOCK_EX,4,2                    ; @LOCK_EX
.subsections_via_symbols
