#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*/ checkGConfAndFill(void *, char *, char *, int, char *,
                                     char *, char *);
scalar_t__ get_bool(void *, char *, int /*<<< orphan*/ *);
void *get_client();
int /*<<< orphan*/ get_string(void *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ strcmp(char *, int /*<<< orphan*/);
void getSettingFromGConfInto(char *string_to_fill, char *key, int key_length) {
  void *client = get_client();
  if (!get_bool(client, "/system/http_proxy/use_http_proxy", NULL) &&
      !!strcmp("manual", get_string(client, "/system/proxy/mode", NULL))) {
    return;
  }
  if (get_bool(client, "/system/http_proxy/use_same_proxy", NULL)) {
    checkGConfAndFill(client, string_to_fill, key, key_length, "HTTP",
                      "/system/http_proxy/host", "/system/http_proxy/port");
    checkGConfAndFill(client, string_to_fill, key, key_length, "HTTPS",
                      "/system/http_proxy/host", "/system/http_proxy/port");
    checkGConfAndFill(client, string_to_fill, key, key_length, "FTP",
                      "/system/http_proxy/host", "/system/http_proxy/port");
    checkGConfAndFill(client, string_to_fill, key, key_length, "SOCKS",
                      "/system/http_proxy/host", "/system/http_proxy/port");
  } else {
    checkGConfAndFill(client, string_to_fill, key, key_length, "HTTP",
                      "/system/http_proxy/host", "/system/http_proxy/port");
    checkGConfAndFill(client, string_to_fill, key, key_length, "HTTPS",
                      "/system/proxy/secure_host", "/system/proxy/secure_port");
    checkGConfAndFill(client, string_to_fill, key, key_length, "FTP",
                      "/system/proxy/ftp_host", "/system/proxy/ftp_port");
    checkGConfAndFill(client, string_to_fill, key, key_length, "SOCKS",
                      "/system/proxy/socks_host", "/system/proxy/socks_port");
  }
}


x86 assembly (clang, -O0):
<getSettingFromGConfInto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1050 <get_client@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe87(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1060 <get_bool@plt>
cmp    $0x0,%rax
jne    11bc <getSettingFromGConfInto+0x6c>
mov    -0x20(%rbp),%rdi
lea    0xe92(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <get_string@plt>
mov    %eax,%esi
lea    0xe79(%rip),%rdi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
je     11bc <getSettingFromGConfInto+0x6c>
jmp    1347 <getSettingFromGConfInto+0x1f7>
mov    -0x20(%rbp),%rdi
lea    0xe75(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1060 <get_bool@plt>
cmp    $0x0,%rax
je     1293 <getSettingFromGConfInto+0x143>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xe6e(%rip),%r8
lea    0xe6c(%rip),%r9
lea    0xe7d(%rip),%rax
mov    %rax,(%rsp)
call   1040 <checkGConfAndFill@plt>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xe76(%rip),%r8
lea    0xe3f(%rip),%r9
lea    0xe50(%rip),%rax
mov    %rax,(%rsp)
call   1040 <checkGConfAndFill@plt>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xe4f(%rip),%r8
lea    0xe12(%rip),%r9
lea    0xe23(%rip),%rax
mov    %rax,(%rsp)
call   1040 <checkGConfAndFill@plt>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xe26(%rip),%r8
lea    0xde5(%rip),%r9
lea    0xdf6(%rip),%rax
mov    %rax,(%rsp)
call   1040 <checkGConfAndFill@plt>
jmp    1347 <getSettingFromGConfInto+0x1f7>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xdb5(%rip),%r8
lea    0xdb3(%rip),%r9
lea    0xdc4(%rip),%rax
mov    %rax,(%rsp)
call   1040 <checkGConfAndFill@plt>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xdbd(%rip),%r8
lea    0xdc6(%rip),%r9
lea    0xdd9(%rip),%rax
mov    %rax,(%rsp)
call   1040 <checkGConfAndFill@plt>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xd96(%rip),%r8
lea    0xdcd(%rip),%r9
lea    0xddd(%rip),%rax
mov    %rax,(%rsp)
call   1040 <checkGConfAndFill@plt>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xd6d(%rip),%r8
lea    0xdce(%rip),%r9
lea    0xde0(%rip),%rax
mov    %rax,(%rsp)
call   1040 <checkGConfAndFill@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSettingFromGConfInto>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rdi,%r12
xor    %eax,%eax
call   1050 <get_client@plt>
mov    %rax,%rbx
lea    0xe8b(%rip),%rsi
mov    %rax,%rdi
xor    %edx,%edx
call   1060 <get_bool@plt>
test   %rax,%rax
je     1233 <getSettingFromGConfInto+0xe3>
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
xor    %edx,%edx
call   1060 <get_bool@plt>
mov    %rax,%rbp
lea    0xed8(%rip),%r13
mov    %r13,(%rsp)
lea    0xeb0(%rip),%r8
lea    0xeae(%rip),%r9
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1040 <checkGConfAndFill@plt>
test   %rbp,%rbp
je     125f <getSettingFromGConfInto+0x10f>
mov    %r13,(%rsp)
lea    0xeb9(%rip),%r8
lea    0xe82(%rip),%rbp
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %rbp,%r9
call   1040 <checkGConfAndFill@plt>
mov    %r13,(%rsp)
lea    0xe99(%rip),%r8
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %rbp,%r9
call   1040 <checkGConfAndFill@plt>
mov    %r13,(%rsp)
lea    0xe7e(%rip),%r8
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %rbp,%r9
jmp    12d8 <getSettingFromGConfInto+0x188>
lea    0xdef(%rip),%rsi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <get_string@plt>
lea    0xdd7(%rip),%rdi
mov    %eax,%esi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    12dd <getSettingFromGConfInto+0x18d>
jmp    1188 <getSettingFromGConfInto+0x38>
lea    0xe57(%rip),%rax
mov    %rax,(%rsp)
lea    0xe22(%rip),%r8
lea    0xe2b(%rip),%r9
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1040 <checkGConfAndFill@plt>
lea    0xe5e(%rip),%rax
mov    %rax,(%rsp)
lea    0xdfe(%rip),%r8
lea    0xe35(%rip),%r9
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1040 <checkGConfAndFill@plt>
lea    0xe64(%rip),%rax
mov    %rax,(%rsp)
lea    0xdd8(%rip),%r8
lea    0xe39(%rip),%r9
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1040 <checkGConfAndFill@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"/system/http_proxy/use_http_proxy\00"
@.str.1 = [7 x i8] c"manual\00"
@.str.2 = [19 x i8] c"/system/proxy/mode\00"
@.str.3 = [34 x i8] c"/system/http_proxy/use_same_proxy\00"
@.str.4 = [5 x i8] c"HTTP\00"
@.str.5 = [24 x i8] c"/system/http_proxy/host\00"
@.str.6 = [24 x i8] c"/system/http_proxy/port\00"
@.str.7 = [6 x i8] c"HTTPS\00"
@.str.8 = [4 x i8] c"FTP\00"
@.str.9 = [6 x i8] c"SOCKS\00"
@.str.10 = [26 x i8] c"/system/proxy/secure_host\00"
@.str.11 = [26 x i8] c"/system/proxy/secure_port\00"
@.str.12 = [23 x i8] c"/system/proxy/ftp_host\00"
@.str.13 = [23 x i8] c"/system/proxy/ftp_port\00"
@.str.14 = [25 x i8] c"/system/proxy/socks_host\00"
@.str.15 = [25 x i8] c"/system/proxy/socks_port\00"
define void @getSettingFromGConfInto(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = call i8* (...) @get_client()
store i8* %8, i8** %7
%9 = load i8*, i8** %7
%10 = call i64 @get_bool(i8* %9, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32* null)
%11 = icmp ne i64 %10, 0
br i1 %11, label %18, label %12
12: ; preds = %3
%13 = load i8*, i8** %7
%14 = call i32 @get_string(i8* %13, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32* null)
%15 = call i32 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %12
br label %64
18: ; preds = %12, %3
%19 = load i8*, i8** %7
%20 = call i64 @get_bool(i8* %19, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32* null)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %43
22: ; preds = %18
%23 = load i8*, i8** %7
%24 = load i8*, i8** %4
%25 = load i8*, i8** %5
%26 = load i32, i32* %6
%27 = call i32 @checkGConfAndFill(i8* %23, i8* %24, i8* %25, i32 %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%28 = load i8*, i8** %7
%29 = load i8*, i8** %4
%30 = load i8*, i8** %5
%31 = load i32, i32* %6
%32 = call i32 @checkGConfAndFill(i8* %28, i8* %29, i8* %30, i32 %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%33 = load i8*, i8** %7
%34 = load i8*, i8** %4
%35 = load i8*, i8** %5
%36 = load i32, i32* %6
%37 = call i32 @checkGConfAndFill(i8* %33, i8* %34, i8* %35, i32 %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%38 = load i8*, i8** %7
%39 = load i8*, i8** %4
%40 = load i8*, i8** %5
%41 = load i32, i32* %6
%42 = call i32 @checkGConfAndFill(i8* %38, i8* %39, i8* %40, i32 %41, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
br label %64
43: ; preds = %18
%44 = load i8*, i8** %7
%45 = load i8*, i8** %4
%46 = load i8*, i8** %5
%47 = load i32, i32* %6
%48 = call i32 @checkGConfAndFill(i8* %44, i8* %45, i8* %46, i32 %47, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%49 = load i8*, i8** %7
%50 = load i8*, i8** %4
%51 = load i8*, i8** %5
%52 = load i32, i32* %6
%53 = call i32 @checkGConfAndFill(i8* %49, i8* %50, i8* %51, i32 %52, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%54 = load i8*, i8** %7
%55 = load i8*, i8** %4
%56 = load i8*, i8** %5
%57 = load i32, i32* %6
%58 = call i32 @checkGConfAndFill(i8* %54, i8* %55, i8* %56, i32 %57, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%59 = load i8*, i8** %7
%60 = load i8*, i8** %4
%61 = load i8*, i8** %5
%62 = load i32, i32* %6
%63 = call i32 @checkGConfAndFill(i8* %59, i8* %60, i8* %61, i32 %62, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
br label %64
64: ; preds = %17, %43, %22
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"/system/http_proxy/use_http_proxy\00"
@.str.1 = [7 x i8] c"manual\00"
@.str.2 = [19 x i8] c"/system/proxy/mode\00"
@.str.3 = [34 x i8] c"/system/http_proxy/use_same_proxy\00"
@.str.4 = [5 x i8] c"HTTP\00"
@.str.5 = [24 x i8] c"/system/http_proxy/host\00"
@.str.6 = [24 x i8] c"/system/http_proxy/port\00"
@.str.7 = [6 x i8] c"HTTPS\00"
@.str.8 = [4 x i8] c"FTP\00"
@.str.9 = [6 x i8] c"SOCKS\00"
@.str.10 = [26 x i8] c"/system/proxy/secure_host\00"
@.str.11 = [26 x i8] c"/system/proxy/secure_port\00"
@.str.12 = [23 x i8] c"/system/proxy/ftp_host\00"
@.str.13 = [23 x i8] c"/system/proxy/ftp_port\00"
@.str.14 = [25 x i8] c"/system/proxy/socks_host\00"
@.str.15 = [25 x i8] c"/system/proxy/socks_port\00"
define void @getSettingFromGConfInto(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* (...) @get_client()
%5 = tail call i64 @get_bool(i8* %4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32* null)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = tail call i32 @get_string(i8* %4, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32* null)
%9 = tail call i32 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %23
11: ; preds = %7, %3
%12 = tail call i64 @get_bool(i8* %4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32* null)
%13 = icmp eq i64 %12, 0
%14 = tail call i32 @checkGConfAndFill(i8* %4, i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
br i1 %13, label %19, label %15
15: ; preds = %11
%16 = tail call i32 @checkGConfAndFill(i8* %4, i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%17 = tail call i32 @checkGConfAndFill(i8* %4, i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%18 = tail call i32 @checkGConfAndFill(i8* %4, i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
br label %23
19: ; preds = %11
%20 = tail call i32 @checkGConfAndFill(i8* %4, i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%21 = tail call i32 @checkGConfAndFill(i8* %4, i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%22 = tail call i32 @checkGConfAndFill(i8* %4, i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
br label %23
23: ; preds = %15, %19, %7
ret void
}