#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 */
struct dcc_hostdef {
  int dummy;
};

/* Variables and functions */
scalar_t__ atoi(char *);
int dcc_mark_timefile(char *, struct dcc_hostdef const *);
char *getenv(char *);
int dcc_disliked_host(const struct dcc_hostdef *host) {
  char *bp;
  bp = getenv("DISTCC_BACKOFF_PERIOD");
  if (bp && (atoi(bp) == 0))
    return 0;
  return dcc_mark_timefile("backoff", host);
}


x86 assembly (clang, -O0):
<dcc_disliked_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1176 <dcc_disliked_host+0x46>
mov    -0x18(%rbp),%rdi
call   1050 <atoi@plt>
cmp    $0x0,%rax
jne    1176 <dcc_disliked_host+0x46>
movl   $0x0,-0x4(%rbp)
jmp    1189 <dcc_disliked_host+0x59>
mov    -0x10(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1040 <dcc_mark_timefile@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcc_disliked_host>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1152 <dcc_disliked_host+0x22>
mov    %rax,%rdi
call   1050 <atoi@plt>
test   %rax,%rax
je     1162 <dcc_disliked_host+0x32>
lea    0xebd(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <dcc_mark_timefile@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.dcc_hostdef = type { i32 }
@.str = [22 x i8] c"DISTCC_BACKOFF_PERIOD\00"
@.str.1 = [8 x i8] c"backoff\00"
define i32 @dcc_disliked_host(%struct.dcc_hostdef* %0) {
%2 = alloca i32
%3 = alloca %struct.dcc_hostdef*
%4 = alloca i8*
store %struct.dcc_hostdef* %0, %struct.dcc_hostdef** %3
%5 = call i8* @getenv(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i8*, i8** %4
%10 = call i64 @atoi(i8* %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 0, i32* %2
br label %16
13: ; preds = %8, %1
%14 = load %struct.dcc_hostdef*, %struct.dcc_hostdef** %3
%15 = call i32 @dcc_mark_timefile(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %struct.dcc_hostdef* %14)
store i32 %15, i32* %2
br label %16
16: ; preds = %13, %12
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.dcc_hostdef = type { i32 }
@.str = [22 x i8] c"DISTCC_BACKOFF_PERIOD\00"
@.str.1 = [8 x i8] c"backoff\00"
define i32 @dcc_disliked_host(%struct.dcc_hostdef* %0) {
%2 = tail call i8* @getenv(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @atoi(i8* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4, %1
%8 = tail call i32 @dcc_mark_timefile(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %struct.dcc_hostdef* %0)
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ %8, %7 ], [ 0, %4 ]
ret i32 %10
}