#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ checkEnvironmentAndFill(char *, char *, int, char *, char *);
void getSettingFromEnvironmentInto(char *string_to_fill, char *key,
                                   int key_length) {
  checkEnvironmentAndFill(string_to_fill, key, key_length, "HTTP",
                          "http_proxy");
  checkEnvironmentAndFill(string_to_fill, key, key_length, "HTTPS",
                          "http_proxy");
  checkEnvironmentAndFill(string_to_fill, key, key_length, "FTP", "ftp_proxy");
}


x86 assembly (clang, -O0):
<getSettingFromEnvironmentInto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xecb(%rip),%rcx
lea    0xec9(%rip),%r8
call   1030 <checkEnvironmentAndFill@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xebd(%rip),%rcx
lea    0xeab(%rip),%r8
call   1030 <checkEnvironmentAndFill@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xea5(%rip),%rcx
lea    0xea2(%rip),%r8
call   1030 <checkEnvironmentAndFill@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSettingFromEnvironmentInto>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xed9(%rip),%rcx
lea    0xed7(%rip),%r15
mov    %r15,%r8
call   1030 <checkEnvironmentAndFill@plt>
lea    0xed3(%rip),%rcx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %r15,%r8
call   1030 <checkEnvironmentAndFill@plt>
lea    0xec1(%rip),%rcx
lea    0xebe(%rip),%r8
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <checkEnvironmentAndFill@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"HTTP\00"
@.str.1 = [11 x i8] c"http_proxy\00"
@.str.2 = [6 x i8] c"HTTPS\00"
@.str.3 = [4 x i8] c"FTP\00"
@.str.4 = [10 x i8] c"ftp_proxy\00"
define void @getSettingFromEnvironmentInto(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @checkEnvironmentAndFill(i8* %7, i8* %8, i32 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @checkEnvironmentAndFill(i8* %11, i8* %12, i32 %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = load i32, i32* %6
%18 = call i32 @checkEnvironmentAndFill(i8* %15, i8* %16, i32 %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"HTTP\00"
@.str.1 = [11 x i8] c"http_proxy\00"
@.str.2 = [6 x i8] c"HTTPS\00"
@.str.3 = [4 x i8] c"FTP\00"
@.str.4 = [10 x i8] c"ftp_proxy\00"
define void @getSettingFromEnvironmentInto(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @checkEnvironmentAndFill(i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @checkEnvironmentAndFill(i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @checkEnvironmentAndFill(i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
ret void
}