	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readenv
_readenv:                               ## @readenv
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	movq	_env_HTTP_PROXY@GOTPCREL(%rip), %rbx
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_10
LBB0_2:
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdi
	movl	$7, %edx
	callq	_strncmp
	movq	(%rbx), %rdi
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	addq	$28, %rdi
	movq	%rdi, (%rbx)
LBB0_4:
	movl	$47, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movb	$0, (%rax)
LBB0_6:
	movq	(%rbx), %rdi
	movl	$58, %esi
	callq	_strchr
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movb	$0, (%rax)
	incq	%rax
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str.3(%rip), %rax
LBB0_9:
	movq	_proxyport@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_10:
	leaq	L_.str.4(%rip), %rdi
	callq	_getenv
	movq	_env_HTTP_PROXY_AUTH@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_22
## %bb.11:
	cmpq	$0, (%rbx)
	je	LBB0_22
## %bb.12:
	leaq	L_.str.5(%rip), %rsi
	movq	%rax, %rdi
	movl	$6, %edx
	callq	_strncasecmp
	testq	%rax, %rax
	je	LBB0_13
LBB0_22:
	movq	_proxyauth@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_23:
	leaq	L_.str.11(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	leaq	L_.str.12(%rip), %rcx
	cmovneq	%rax, %rcx
	movq	_env_HTTP_USER_AGENT@GOTPCREL(%rip), %rax
	movq	%rcx, (%rax)
	leaq	L_.str.13(%rip), %rdi
	callq	_getenv
	movq	_env_HTTP_TIMEOUT@GOTPCREL(%rip), %rbx
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_29
## %bb.24:
	leaq	-40(%rbp), %rsi
	movq	%rax, %rdi
	movl	$10, %edx
	callq	_strtol
	movq	(%rbx), %rsi
	cmpb	$0, (%rsi)
	je	LBB0_27
## %bb.25:
	movq	-40(%rbp), %rcx
	cmpb	$0, (%rcx)
	jne	LBB0_27
## %bb.26:
	testq	%rax, %rax
	js	LBB0_27
## %bb.28:
	movq	_timo@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_29
LBB0_27:
	leaq	L_.str.14(%rip), %rdi
	callq	_warnx
LBB0_29:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	leaq	L_.str.6(%rip), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_strsep
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_strsep
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_strsep
	testq	%rax, %rax
	je	LBB0_22
## %bb.14:
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_22
## %bb.15:
	leaq	L_.str.7(%rip), %rsi
	leaq	-32(%rbp), %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_asprintf
	movq	-32(%rbp), %rdi
	testq	%rdi, %rdi
	jne	LBB0_17
## %bb.16:
	leaq	L_.str.8(%rip), %rsi
	movl	$1, %edi
	callq	_err
	movq	-32(%rbp), %rdi
LBB0_17:
	callq	_b64enc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:
	leaq	L_.str.9(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_19:
	movq	_proxyauth@GOTPCREL(%rip), %r14
	leaq	L_.str.10(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_asprintf
	cmpq	$0, (%r14)
	jne	LBB0_21
## %bb.20:
	leaq	L_.str.8(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_21:
	movq	-32(%rbp), %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HTTP_PROXY"

	.comm	_env_HTTP_PROXY,8,3             ## @env_HTTP_PROXY
L_.str.1:                               ## @.str.1
	.asciz	"http_proxy"

L_.str.2:                               ## @.str.2
	.asciz	"http://"

	.comm	_proxyport,8,3                  ## @proxyport
L_.str.3:                               ## @.str.3
	.asciz	"3128"

L_.str.4:                               ## @.str.4
	.asciz	"HTTP_PROXY_AUTH"

	.comm	_env_HTTP_PROXY_AUTH,8,3        ## @env_HTTP_PROXY_AUTH
L_.str.5:                               ## @.str.5
	.asciz	"basic:"

L_.str.6:                               ## @.str.6
	.asciz	":"

L_.str.7:                               ## @.str.7
	.asciz	"%s:%s"

L_.str.8:                               ## @.str.8
	.asciz	"asprintf"

L_.str.9:                               ## @.str.9
	.asciz	"malloc"

	.comm	_proxyauth,8,3                  ## @proxyauth
L_.str.10:                              ## @.str.10
	.asciz	"Proxy-Authorization: Basic %s\r\n"

L_.str.11:                              ## @.str.11
	.asciz	"HTTP_USER_AGENT"

	.comm	_env_HTTP_USER_AGENT,8,3        ## @env_HTTP_USER_AGENT
L_.str.12:                              ## @.str.12
	.asciz	"phttpget/0.1"

L_.str.13:                              ## @.str.13
	.asciz	"HTTP_TIMEOUT"

	.comm	_env_HTTP_TIMEOUT,8,3           ## @env_HTTP_TIMEOUT
L_.str.14:                              ## @.str.14
	.asciz	"HTTP_TIMEOUT (%s) is not a positive integer"

	.comm	_timo,8,3                       ## @timo
	.no_dead_strip	_readenv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readenv
_readenv:                               ; @readenv
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
Lloh2:
	adrp	x20, _env_HTTP_PROXY@GOTPAGE
Lloh3:
	ldr	x20, [x20, _env_HTTP_PROXY@GOTPAGEOFF]
	str	x0, [x20]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	str	x0, [x20]
	cbz	x0, LBB0_10
LBB0_2:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #7
	bl	_strncmp
	mov	x8, x0
	ldr	x0, [x20]
	cbnz	x8, LBB0_4
; %bb.3:
	add	x0, x0, #28
	str	x0, [x20]
LBB0_4:
	mov	w1, #47
	bl	_strchr
	cbz	x0, LBB0_6
; %bb.5:
	strb	wzr, [x0]
LBB0_6:
	ldr	x0, [x20]
	mov	w1, #58
	bl	_strchr
	str	x0, [sp, #16]
	cbz	x0, LBB0_8
; %bb.7:
	strb	wzr, [x0], #1
	b	LBB0_9
LBB0_8:
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
Lloh10:
	adrp	x8, _proxyport@GOTPAGE
Lloh11:
	ldr	x8, [x8, _proxyport@GOTPAGEOFF]
Lloh12:
	str	x0, [x8]
LBB0_10:
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_getenv
Lloh15:
	adrp	x19, _env_HTTP_PROXY_AUTH@GOTPAGE
Lloh16:
	ldr	x19, [x19, _env_HTTP_PROXY_AUTH@GOTPAGEOFF]
	str	x0, [x19]
	cbz	x0, LBB0_13
; %bb.11:
	ldr	x8, [x20]
	cbz	x8, LBB0_13
; %bb.12:
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w2, #6
	bl	_strncasecmp
	cbz	x0, LBB0_21
LBB0_13:
Lloh19:
	adrp	x8, _proxyauth@GOTPAGE
Lloh20:
	ldr	x8, [x8, _proxyauth@GOTPAGEOFF]
Lloh21:
	str	xzr, [x8]
LBB0_14:
Lloh22:
	adrp	x0, l_.str.11@PAGE
Lloh23:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_getenv
Lloh24:
	adrp	x8, l_.str.12@PAGE
Lloh25:
	add	x8, x8, l_.str.12@PAGEOFF
	cmp	x0, #0
	csel	x8, x8, x0, eq
Lloh26:
	adrp	x9, _env_HTTP_USER_AGENT@GOTPAGE
Lloh27:
	ldr	x9, [x9, _env_HTTP_USER_AGENT@GOTPAGEOFF]
Lloh28:
	str	x8, [x9]
Lloh29:
	adrp	x0, l_.str.13@PAGE
Lloh30:
	add	x0, x0, l_.str.13@PAGEOFF
	bl	_getenv
Lloh31:
	adrp	x19, _env_HTTP_TIMEOUT@GOTPAGE
Lloh32:
	ldr	x19, [x19, _env_HTTP_TIMEOUT@GOTPAGEOFF]
	str	x0, [x19]
	cbz	x0, LBB0_20
; %bb.15:
	add	x1, sp, #16
	mov	w2, #10
	bl	_strtol
	ldr	x1, [x19]
	ldrb	w8, [x1]
	cbz	w8, LBB0_19
; %bb.16:
	ldr	x8, [sp, #16]
	ldrb	w8, [x8]
	cbnz	w8, LBB0_19
; %bb.17:
	tbnz	x0, #63, LBB0_19
; %bb.18:
Lloh33:
	adrp	x8, _timo@GOTPAGE
Lloh34:
	ldr	x8, [x8, _timo@GOTPAGEOFF]
Lloh35:
	str	x0, [x8]
	b	LBB0_20
LBB0_19:
Lloh36:
	adrp	x0, l_.str.14@PAGE
Lloh37:
	add	x0, x0, l_.str.14@PAGEOFF
	bl	_warnx
LBB0_20:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_21:
Lloh38:
	adrp	x20, l_.str.6@PAGE
Lloh39:
	add	x20, x20, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_strsep
	mov	x0, x19
	mov	x1, x20
	bl	_strsep
	mov	x0, x19
	mov	x1, x20
	bl	_strsep
	cbz	x0, LBB0_13
; %bb.22:
	ldr	x8, [x19]
	cbz	x8, LBB0_13
; %bb.23:
	mov	x2, x0
	str	x8, [sp]
Lloh40:
	adrp	x1, l_.str.7@PAGE
Lloh41:
	add	x1, x1, l_.str.7@PAGEOFF
	add	x0, sp, #24
	bl	_asprintf
	ldr	x0, [sp, #24]
	cbnz	x0, LBB0_25
; %bb.24:
Lloh42:
	adrp	x1, l_.str.8@PAGE
Lloh43:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	w0, #1
	bl	_err
	ldr	x0, [sp, #24]
LBB0_25:
	bl	_b64enc
	mov	x19, x0
	cbnz	x0, LBB0_27
; %bb.26:
Lloh44:
	adrp	x1, l_.str.9@PAGE
Lloh45:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_27:
Lloh46:
	adrp	x20, _proxyauth@GOTPAGE
Lloh47:
	ldr	x20, [x20, _proxyauth@GOTPAGEOFF]
Lloh48:
	adrp	x1, l_.str.10@PAGE
Lloh49:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_asprintf
	ldr	x8, [x20]
	cbnz	x8, LBB0_29
; %bb.28:
Lloh50:
	adrp	x1, l_.str.8@PAGE
Lloh51:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_29:
	ldr	x0, [sp, #24]
	bl	_free
	mov	x0, x19
	bl	_free
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HTTP_PROXY"

	.comm	_env_HTTP_PROXY,8,3             ; @env_HTTP_PROXY
l_.str.1:                               ; @.str.1
	.asciz	"http_proxy"

l_.str.2:                               ; @.str.2
	.asciz	"http://"

	.comm	_proxyport,8,3                  ; @proxyport
l_.str.3:                               ; @.str.3
	.asciz	"3128"

l_.str.4:                               ; @.str.4
	.asciz	"HTTP_PROXY_AUTH"

	.comm	_env_HTTP_PROXY_AUTH,8,3        ; @env_HTTP_PROXY_AUTH
l_.str.5:                               ; @.str.5
	.asciz	"basic:"

l_.str.6:                               ; @.str.6
	.asciz	":"

l_.str.7:                               ; @.str.7
	.asciz	"%s:%s"

l_.str.8:                               ; @.str.8
	.asciz	"asprintf"

l_.str.9:                               ; @.str.9
	.asciz	"malloc"

	.comm	_proxyauth,8,3                  ; @proxyauth
l_.str.10:                              ; @.str.10
	.asciz	"Proxy-Authorization: Basic %s\r\n"

l_.str.11:                              ; @.str.11
	.asciz	"HTTP_USER_AGENT"

	.comm	_env_HTTP_USER_AGENT,8,3        ; @env_HTTP_USER_AGENT
l_.str.12:                              ; @.str.12
	.asciz	"phttpget/0.1"

l_.str.13:                              ; @.str.13
	.asciz	"HTTP_TIMEOUT"

	.comm	_env_HTTP_TIMEOUT,8,3           ; @env_HTTP_TIMEOUT
l_.str.14:                              ; @.str.14
	.asciz	"HTTP_TIMEOUT (%s) is not a positive integer"

	.comm	_timo,8,3                       ; @timo
	.no_dead_strip	_readenv
.subsections_via_symbols
