xunge/DecIR huggingface dataset:
/* Variables and functions */
int a_cas(int volatile *, int, int);
void a_and(volatile int *p, int v) {
  int old;
  do
    old = *p;
  while (a_cas(p, old, old & v) != old);
}


x86 assembly (clang, -O0):
<a_and>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x10(%rbp),%edx
and    -0xc(%rbp),%edx
call   1030 <a_cas@plt>
cmp    -0x10(%rbp),%eax
jne    111f <a_and+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_and>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    (%rbx),%ebp
mov    %ebp,%edx
and    %r14d,%edx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <a_cas@plt>
cmp    %ebp,%eax
jne    1120 <a_and+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @a_and(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
br label %6
6: ; preds = %9, %2
%7 = load i32*, i32** %3
%8 = load volatile i32, i32* %7
store i32 %8, i32* %5
br label %9
9: ; preds = %6
%10 = load i32*, i32** %3
%11 = load i32, i32* %5
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = and i32 %12, %13
%15 = call i32 @a_cas(i32* %10, i32 %11, i32 %14)
%16 = load i32, i32* %5
%17 = icmp ne i32 %15, %16
br i1 %17, label %6, label %18
18: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @a_and(i32* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = load volatile i32, i32* %0
%5 = and i32 %4, %1
%6 = tail call i32 @a_cas(i32* %0, i32 %4, i32 %5)
%7 = icmp eq i32 %6, %4
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void swap(char *p, char *q) {
  assert((p != NULL) && (q != NULL));
  char tmp = *p;
  *p = *q;
  *q = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x12(%rbp)
je     113b <swap+0x2b>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    (%rbx),%al
mov    (%r14),%cl
mov    %cl,(%rbx)
mov    %al,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br label %11
11: ; preds = %8, %2
%12 = phi i1 [ false, %2 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
store i8 %16, i8* %5
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = load i8*, i8** %3
store i8 %18, i8* %19
%20 = load i8, i8* %5
%21 = load i8*, i8** %4
store i8 %20, i8* %21
ret void
}

LLVM IR (-O2):
define void @swap(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = load i8, i8* %0
%9 = load i8, i8* %1
store i8 %9, i8* %0
store i8 %8, i8* %1
ret void
}
/* Variables and functions */
char *txtquery(const char *domain, unsigned int *ttl) { return NULL; }


x86 assembly (clang, -O0):
<txtquery>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<txtquery>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @txtquery(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @txtquery(i8* nocapture readnone %0, i32* nocapture readnone %1) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ tell(int, char *, char *, char *, int /*<<< orphan*/, char *,
                        char *);
void fatal(char *label) {
  tell(2, "term: ", label, ": ", strerror(errno), "\n", ((char *)NULL));
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x10(%rbp),%rdx
mov    %eax,%r8d
mov    $0x2,%edi
lea    0xe9b(%rip),%rsi
lea    0xe98(%rip),%rcx
lea    0xe94(%rip),%r9
xor    %eax,%eax
movq   $0x0,(%rsp)
call   1030 <tell@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
movq   $0x0,(%rsp)
lea    0xeab(%rip),%rsi
lea    0xea8(%rip),%rcx
lea    0xea4(%rip),%r9
mov    $0x2,%edi
mov    %rbx,%rdx
mov    %eax,%r8d
call   1030 <tell@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"term: \00"
@.str.1 = [3 x i8] c": \00"
@errno = global i32 0
@.str.2 = [2 x i8] c"\0A\00"
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @errno
%5 = call i32 @strerror(i32 %4)
%6 = call i32 @tell(i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* null)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"term: \00"
@.str.1 = [3 x i8] c": \00"
@errno = global i32 0
@.str.2 = [2 x i8] c"\0A\00"
define void @fatal(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i32 @strerror(i32 %2)
%4 = tail call i32 @tell(i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* null)
%5 = tail call i32 @exit(i32 1)
unreachable
}
int fun879() { return 879; }


x86 assembly (clang, -O0):
<fun879>:
push   %rbp
mov    %rsp,%rbp
mov    $0x36f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun879>:
mov    $0x36f,%eax
ret

LLVM IR (-O0):
define i32 @fun879() {
ret i32 879
}

LLVM IR (-O2):
define i32 @fun879() {
ret i32 879
}
/* Variables and functions */
int /*<<< orphan*/ TOSH_MAKE_HUM_SCL_OUTPUT();
void HUMIDITY_MAKE_CLOCK_OUTPUT() { TOSH_MAKE_HUM_SCL_OUTPUT(); }


x86 assembly (clang, -O0):
<HUMIDITY_MAKE_CLOCK_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <TOSH_MAKE_HUM_SCL_OUTPUT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HUMIDITY_MAKE_CLOCK_OUTPUT>:
xor    %eax,%eax
jmp    1030 <TOSH_MAKE_HUM_SCL_OUTPUT@plt>

LLVM IR (-O0):
define void @HUMIDITY_MAKE_CLOCK_OUTPUT() {
%1 = call i32 (...) @TOSH_MAKE_HUM_SCL_OUTPUT()
ret void
}

LLVM IR (-O2):
define void @HUMIDITY_MAKE_CLOCK_OUTPUT() {
%1 = tail call i32 (...) @TOSH_MAKE_HUM_SCL_OUTPUT()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int scanf(char *, double *, double *);
int /*<<< orphan*/ stderr;
void checkInput(double *a, double *b) {
  if ((scanf("%lf%lf", a, b)) != 2) {
    fprintf(stderr, "Wrong input values!");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<checkInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb1(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x2,%eax
je     1180 <checkInput+0x50>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
lea    0xe9a(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkInput>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xec2(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    114a <checkInput+0x1a>
pop    %rax
ret
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%lf%lf\00"
@stderr = global i32 0
@.str.1 = [20 x i8] c"Wrong input values!\00"
@EXIT_FAILURE = global i32 0
define void @checkInput(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %5, double* %6)
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%lf%lf\00"
@stderr = global i32 0
@.str.1 = [20 x i8] c"Wrong input values!\00"
@EXIT_FAILURE = global i32 0
define void @checkInput(double* %0, double* %1) {
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %0, double* %1)
%4 = icmp eq i32 %3, 2
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ get_uint16(int /*<<< orphan*/ *, int);
uint16_t read_defect_data_10_len(uint8_t *data) { return get_uint16(data, 2); }


x86 assembly (clang, -O0):
<read_defect_data_10_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <get_uint16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_defect_data_10_len>:
mov    $0x2,%esi
jmp    1030 <get_uint16@plt>

LLVM IR (-O0):
define i32 @read_defect_data_10_len(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @get_uint16(i32* %3, i32 2)
ret i32 %4
}

LLVM IR (-O2):
define i32 @read_defect_data_10_len(i32* %0) {
%2 = tail call i32 @get_uint16(i32* %0, i32 2)
ret i32 %2
}
void dsk_reportfunc_set(void *f1, void *f2) {}


x86 assembly (clang, -O0):
<dsk_reportfunc_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dsk_reportfunc_set>:
ret

LLVM IR (-O0):
define void @dsk_reportfunc_set(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @dsk_reportfunc_set(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_JMP();
void do0xC3() { _I8080_JMP(); }


x86 assembly (clang, -O0):
<do0xC3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <_I8080_JMP@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do0xC3>:
xor    %eax,%eax
jmp    1030 <_I8080_JMP@plt>

LLVM IR (-O0):
define void @do0xC3() {
%1 = call i32 (...) @_I8080_JMP()
ret void
}

LLVM IR (-O2):
define void @do0xC3() {
%1 = tail call i32 (...) @_I8080_JMP()
ret void
}
int fun1316() { return 1316; }


x86 assembly (clang, -O0):
<fun1316>:
push   %rbp
mov    %rsp,%rbp
mov    $0x524,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1316>:
mov    $0x524,%eax
ret

LLVM IR (-O0):
define i32 @fun1316() {
ret i32 1316
}

LLVM IR (-O2):
define i32 @fun1316() {
ret i32 1316
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
void print_test_outcome(char *test_name, char *result) {
  char msg_output[512];
  snprintf(msg_output, 512 - 2, "Test %s : %s\n", test_name, result);
  printf(msg_output);
}


x86 assembly (clang, -O0):
<print_test_outcome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    $0x1fe,%esi
lea    0xeb2(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x210(%rbp),%rdi
call   1030 <printf@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_test_outcome>:
push   %rbx
sub    $0x200,%rsp
mov    %rsi,%r8
mov    %rdi,%rcx
lea    0xecb(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1fe,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Test %s : %s\0A\00"
define void @print_test_outcome(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [512 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @snprintf(i8* %6, i32 510, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%11 = call i32 @printf(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Test %s : %s\0A\00"
define void @print_test_outcome(i8* %0, i8* %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 510, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @printf(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void ignore_ctrl_c() { signal(SIGINT, SIG_IGN); }


x86 assembly (clang, -O0):
<ignore_ctrl_c>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore_ctrl_c>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
define void @ignore_ctrl_c() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_IGN
%3 = call i32 @signal(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
define void @ignore_ctrl_c() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
ret void
}
void _Locale_collate_destroy(void *__DUMMY_PAR) {}


x86 assembly (clang, -O0):
<_Locale_collate_destroy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Locale_collate_destroy>:
ret

LLVM IR (-O0):
define void @_Locale_collate_destroy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @_Locale_collate_destroy(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pr_year(char *);
int main() {
  pr_year("99");
  pr_year("2000");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <pr_year@plt>
lea    0xed1(%rip),%rdi
call   1030 <pr_year@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <pr_year@plt>
lea    0xedf(%rip),%rdi
call   1030 <pr_year@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"99\00"
@.str.1 = [5 x i8] c"2000\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @pr_year(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @pr_year(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"99\00"
@.str.1 = [5 x i8] c"2000\00"
define i32 @main() {
%1 = tail call i32 @pr_year(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @pr_year(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int gmp_mpz_sizeof() { return sizeof(mpz_t); }


x86 assembly (clang, -O0):
<gmp_mpz_sizeof>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmp_mpz_sizeof>:
mov    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @gmp_mpz_sizeof() {
ret i32 4
}

LLVM IR (-O2):
define i32 @gmp_mpz_sizeof() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ timlib_strcpy(char *, char *, int);
char *piece_trim(char *s_here, char *s, int piece_offset) {
  if (piece_offset == 0) {
    timlib_strcpy(s_here, s + 1, 9999);
    return s_here;
  } else {
    timlib_strcpy(s_here, s, 9999);
    return s_here;
  }
}


x86 assembly (clang, -O0):
<piece_trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1150 <piece_trim+0x40>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
mov    $0x270f,%edx
call   1030 <timlib_strcpy@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116a <piece_trim+0x5a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x270f,%edx
call   1030 <timlib_strcpy@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piece_trim>:
push   %rbx
mov    %rdi,%rbx
test   %edx,%edx
jne    111c <piece_trim+0xc>
add    $0x1,%rsi
mov    %rbx,%rdi
mov    $0x270f,%edx
call   1030 <timlib_strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @piece_trim(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = call i32 @timlib_strcpy(i8* %11, i8* %13, i32 9999)
%15 = load i8*, i8** %5
store i8* %15, i8** %4
br label %21
16: ; preds = %3
%17 = load i8*, i8** %5
%18 = load i8*, i8** %6
%19 = call i32 @timlib_strcpy(i8* %17, i8* %18, i32 9999)
%20 = load i8*, i8** %5
store i8* %20, i8** %4
br label %21
21: ; preds = %16, %10
%22 = load i8*, i8** %4
ret i8* %22
}

LLVM IR (-O2):
define i8* @piece_trim(i8* returned %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = getelementptr inbounds i8, i8* %1, i64 1
%7 = tail call i32 @timlib_strcpy(i8* %0, i8* %6, i32 9999)
br label %10
8: ; preds = %3
%9 = tail call i32 @timlib_strcpy(i8* %0, i8* %1, i32 9999)
br label %10
10: ; preds = %8, %5
ret i8* %0
}
/* Variables and functions */
int write(int, unsigned char *, int);
int write_port(int fd, unsigned char *pData, int len) {
  int bytesWritten;
  bytesWritten = write(fd, pData, len);
  return bytesWritten;
}


x86 assembly (clang, -O0):
<write_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_port>:
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @write_port(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @write(i32 %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @write_port(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ initialize_string(char *);
int /*<<< orphan*/ realpath(char const *, char *);
void set_real_path(char *variable, const char *stipulated_path) {
  initialize_string(variable);
  realpath(stipulated_path, variable);
}


x86 assembly (clang, -O0):
<set_real_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <initialize_string@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <realpath@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_real_path>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <initialize_string@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <realpath@plt>

LLVM IR (-O0):
define void @set_real_path(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @initialize_string(i8* %5)
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = call i32 @realpath(i8* %7, i8* %8)
ret void
}

LLVM IR (-O2):
define void @set_real_path(i8* %0, i8* nocapture %1) {
%3 = tail call i32 @initialize_string(i8* %0)
%4 = tail call i32 @realpath(i8* %1, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x03() {
  Assert_real((isxdigit(3) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              20, ("isxdigit should be 0 for 0x03"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x03>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x14,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x03>:
push   %rax
mov    $0x3,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x14,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x03\00"
define void @t_isxdigit_0x03() {
%1 = call i64 @isxdigit(i32 3)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x03\00"
define void @t_isxdigit_0x03() {
%1 = tail call i64 @isxdigit(i32 3)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int LOG_CONS;
int /*<<< orphan*/ LOG_LOCAL1;
int /*<<< orphan*/ LOG_NOTICE;
int LOG_PERROR;
int LOG_PID;
int /*<<< orphan*/ LOG_UPTO(int /*<<< orphan*/);
int /*<<< orphan*/ openlog(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ setlogmask(int /*<<< orphan*/);
__attribute__((constructor)) void init() {
  openlog("luisavm", LOG_CONS | LOG_PERROR | LOG_PID, LOG_LOCAL1);
  setlogmask(LOG_UPTO(LOG_NOTICE));
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
mov    0x2ea4(%rip),%rax
or     (%rax),%esi
mov    0x2e8b(%rip),%rax
or     (%rax),%esi
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
lea    0xea1(%rip),%rdi
call   1050 <openlog@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1030 <LOG_UPTO@plt>
mov    %eax,%edi
call   1040 <setlogmask@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    0x2e98(%rip),%rax
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e8e(%rip),%rax
or     (%rax),%esi
mov    0x2e75(%rip),%rax
mov    (%rax),%edx
lea    0xea4(%rip),%rdi
call   1050 <openlog@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
call   1030 <LOG_UPTO@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <setlogmask@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"luisavm\00"
@LOG_CONS = global i32 0
@LOG_PERROR = global i32 0
@LOG_PID = global i32 0
@LOG_LOCAL1 = global i32 0
@LOG_NOTICE = global i32 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init, i8* null }]
define void @init() {
%1 = load i32, i32* @LOG_CONS
%2 = load i32, i32* @LOG_PERROR
%3 = or i32 %1, %2
%4 = load i32, i32* @LOG_PID
%5 = or i32 %3, %4
%6 = load i32, i32* @LOG_LOCAL1
%7 = call i32 @openlog(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* @LOG_NOTICE
%9 = call i32 @LOG_UPTO(i32 %8)
%10 = call i32 @setlogmask(i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"luisavm\00"
@LOG_CONS = global i32 0
@LOG_PERROR = global i32 0
@LOG_PID = global i32 0
@LOG_LOCAL1 = global i32 0
@LOG_NOTICE = global i32 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init, i8* null }]
define void @init() {
%1 = load i32, i32* @LOG_CONS
%2 = load i32, i32* @LOG_PERROR
%3 = or i32 %2, %1
%4 = load i32, i32* @LOG_PID
%5 = or i32 %3, %4
%6 = load i32, i32* @LOG_LOCAL1
%7 = tail call i32 @openlog(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* @LOG_NOTICE
%9 = tail call i32 @LOG_UPTO(i32 %8)
%10 = tail call i32 @setlogmask(i32 %9)
ret void
}
unsigned long bar(unsigned long a) { return a ^ 0xffff0000; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xffff0000,%rax
xor    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    $0xffff0000,%eax
xor    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @bar(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, 4294901760
ret i64 %4
}

LLVM IR (-O2):
define i64 @bar(i64 %0) {
%2 = xor i64 %0, 4294901760
ret i64 %2
}
unsigned xrop3_128_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T & S;
  stk1 = D & stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_128_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_128_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
and    %esi,%edi
not    %eax
and    %esi,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_128_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = and i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = load i32, i32* %6
%30 = and i32 %28, %29
%31 = load i32, i32* %8
%32 = load i32, i32* %7
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = or i32 %30, %34
%36 = load i32, i32* %7
%37 = load i32, i32* %6
%38 = xor i32 %37, -1
%39 = and i32 %36, %38
%40 = load i32, i32* %5
%41 = and i32 %39, %40
%42 = or i32 %35, %41
ret i32 %42
}

LLVM IR (-O2):
define i32 @xrop3_128_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = and i8 %1, %0
%7 = zext i8 %6 to i32
%8 = xor i32 %4, -1
%9 = and i32 %8, %5
%10 = or i32 %9, %7
ret i32 %10
}
void exchange_ptrs(int **p1, int **p2) {
  int *t = *p1;
  *p1 = *p2;
  *p2 = t;
}


x86 assembly (clang, -O0):
<exchange_ptrs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<exchange_ptrs>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
mov    %rcx,(%rdi)
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @exchange_ptrs(i32** %0, i32** %1) {
%3 = alloca i32**
%4 = alloca i32**
%5 = alloca i32*
store i32** %0, i32*** %3
store i32** %1, i32*** %4
%6 = load i32**, i32*** %3
%7 = load i32*, i32** %6
store i32* %7, i32** %5
%8 = load i32**, i32*** %4
%9 = load i32*, i32** %8
%10 = load i32**, i32*** %3
store i32* %9, i32** %10
%11 = load i32*, i32** %5
%12 = load i32**, i32*** %4
store i32* %11, i32** %12
ret void
}

LLVM IR (-O2):
define void @exchange_ptrs(i32** nocapture %0, i32** nocapture %1) {
%3 = load i32*, i32** %0
%4 = load i32*, i32** %1
store i32* %4, i32** %0
store i32* %3, i32** %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bail(char *);
char *getpass(char *);
scalar_t__ strlen(char *);
int update_keyfile(char *);
int init_keyfile() {
  char *pw = getpass("Enter pass phrase: ");
  if (strlen(pw) <= 0)
    bail("Cannot cache an empty pass phrase.");
  return update_keyfile(pw);
}


x86 assembly (clang, -O0):
<init_keyfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1050 <getpass@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
jg     1177 <init_keyfile+0x37>
lea    0xea2(%rip),%rdi
call   1060 <bail@plt>
mov    -0x8(%rbp),%rdi
call   1030 <update_keyfile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_keyfile>:
push   %rbx
lea    0xeb8(%rip),%rdi
call   1050 <getpass@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
test   %rax,%rax
jg     1169 <init_keyfile+0x29>
lea    0xeb0(%rip),%rdi
call   1060 <bail@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <update_keyfile@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Enter pass phrase: \00"
@.str.1 = [35 x i8] c"Cannot cache an empty pass phrase.\00"
define i32 @init_keyfile() {
%1 = alloca i8*
%2 = call i8* @getpass(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i64 @strlen(i8* %3)
%5 = icmp sle i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @bail(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = load i8*, i8** %1
%10 = call i32 @update_keyfile(i8* %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter pass phrase: \00"
@.str.1 = [35 x i8] c"Cannot cache an empty pass phrase.\00"
define i32 @init_keyfile() {
%1 = tail call i8* @getpass(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%3 = icmp slt i64 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @bail(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = tail call i32 @update_keyfile(i8* %1)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void print_usage(const char *program) {
  printf("[Usage:] %s --program-kind [textual | binary] --program binary "
         "[--single-stepping]\n",
         program);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [84 x i8] c"[Usage:] %s --program-kind [textual | binary] --program binary [--single-stepping]\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [84 x i8] c"[Usage:] %s --program-kind [textual | binary] --program binary [--single-stepping]\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
void *string_dup(char *);
void *traceslang_rawnamenode_hook_copy(void *hook) {
  char *rawname = (char *)hook;
  if (rawname) {
    return string_dup(rawname);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<traceslang_rawnamenode_hook_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1141 <traceslang_rawnamenode_hook_copy+0x31>
mov    -0x18(%rbp),%rdi
call   1030 <string_dup@plt>
mov    %rax,-0x8(%rbp)
jmp    1149 <traceslang_rawnamenode_hook_copy+0x39>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<traceslang_rawnamenode_hook_copy>:
test   %rdi,%rdi
je     111a <traceslang_rawnamenode_hook_copy+0xa>
jmp    1030 <string_dup@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @traceslang_rawnamenode_hook_copy(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %4
%10 = call i8* @string_dup(i8* %9)
store i8* %10, i8** %2
br label %12
11: ; preds = %1
store i8* null, i8** %2
br label %12
12: ; preds = %11, %8
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define i8* @traceslang_rawnamenode_hook_copy(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @string_dup(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ psd_free(void *);
void psd_freeif(void *block) {
  if (block != NULL) {
    psd_free(block);
  }
}


x86 assembly (clang, -O0):
<psd_freeif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <psd_freeif+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <psd_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psd_freeif>:
test   %rdi,%rdi
je     111a <psd_freeif+0xa>
jmp    1030 <psd_free@plt>
ret

LLVM IR (-O0):
define void @psd_freeif(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @psd_free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @psd_freeif(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @psd_free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
struct arena {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct arena *);
void arena_destroy(struct arena *a) {
  ;
  free(a);
}


x86 assembly (clang, -O0):
<arena_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arena_destroy>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.arena = type { i32 }
define void @arena_destroy(%struct.arena* %0) {
%2 = alloca %struct.arena*
store %struct.arena* %0, %struct.arena** %2
%3 = load %struct.arena*, %struct.arena** %2
%4 = call i32 @free(%struct.arena* %3)
ret void
}

LLVM IR (-O2):
%struct.arena = type { i32 }
define void @arena_destroy(%struct.arena* nocapture %0) {
%2 = tail call i32 @free(%struct.arena* %0)
ret void
}
void setval_209(unsigned *p) { *p = 3222851977U; }


x86 assembly (clang, -O0):
<setval_209>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xc018d189,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setval_209>:
movl   $0xc018d189,(%rdi)
ret

LLVM IR (-O0):
define void @setval_209(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
store i32 -1072115319, i32* %3
ret void
}

LLVM IR (-O2):
define void @setval_209(i32* nocapture writeonly %0) {
store i32 -1072115319, i32* %0
ret void
}
int Q_islower(int c) {
  if (c >= 'a' && c <= 'z') {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<Q_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1127 <Q_islower+0x27>
cmpl   $0x7a,-0x8(%rbp)
jg     1127 <Q_islower+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <Q_islower+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @Q_islower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %11
10: ; preds = %6, %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @Q_islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
int main() {
  int a = 1;
  int b = 2;
  int c = 0;
  int d = 5;
  int e;
  while (a) {
    a += b;
    a += d;
    for (e = 0; e < 10; e++)
      b += c;
    c += 1;
    d += 9;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1182 <main+0x82>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0xa,-0x18(%rbp)
jge    116b <main+0x6b>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114a <main+0x4a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x9,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <main+0x27>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
store i32 0, i32* %4
store i32 5, i32* %5
br label %7
7: ; preds = %27, %0
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %32
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = add nsw i32 %12, %11
store i32 %13, i32* %2
%14 = load i32, i32* %5
%15 = load i32, i32* %2
%16 = add nsw i32 %15, %14
store i32 %16, i32* %2
store i32 0, i32* %6
br label %17
17: ; preds = %24, %10
%18 = load i32, i32* %6
%19 = icmp slt i32 %18, 10
br i1 %19, label %20, label %27
20: ; preds = %17
%21 = load i32, i32* %4
%22 = load i32, i32* %3
%23 = add nsw i32 %22, %21
store i32 %23, i32* %3
br label %24
24: ; preds = %20
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %6
br label %17
27: ; preds = %17
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 9
store i32 %31, i32* %5
br label %7
32: ; preds = %7
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c;
  char bukva = 'a' + (('z' - 'a') / 2);
  scanf("%c", &c);
  printf("%c\n", bukva - c + bukva + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x6d,-0x6(%rbp)
lea    0xec6(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x6(%rbp),%eax
movsbl -0x5(%rbp),%ecx
sub    %ecx,%eax
movsbl -0x6(%rbp),%ecx
add    %ecx,%eax
add    $0x1,%eax
lea    0xea6(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0x7(%rsp),%al
movsbl %al,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
store i8 109, i8* %3
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %6, %8
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = add nsw i32 %9, %11
%13 = add nsw i32 %12, 1
%14 = trunc i32 %13 to i8
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ printf(char *, void *);
int /*<<< orphan*/ read(int /*<<< orphan*/, void **, int);
int /*<<< orphan*/ stdout;
int main(int argc) {
  void *ptr;
  fprintf(stdout, "What address do you want to free()? ");
  fflush(stdout);
  read(0, &ptr, 8);
  printf("OK, free()ing %p\n", ptr);
  free(ptr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xe95(%rip),%rsi
call   1060 <fprintf@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
xor    %edi,%edi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1050 <read@plt>
mov    -0x10(%rbp),%rsi
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2e84(%rip),%rbx
mov    (%rbx),%edi
lea    0xe9b(%rip),%rsi
call   1060 <fprintf@plt>
mov    (%rbx),%edi
call   1070 <fflush@plt>
lea    0x8(%rsp),%rsi
xor    %edi,%edi
mov    $0x8,%edx
call   1050 <read@plt>
mov    0x8(%rsp),%rbx
lea    0xe97(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [37 x i8] c"What address do you want to free()? \00"
@.str.1 = [18 x i8] c"OK, free()ing %p\0A\00"
define i32 @main(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* @stdout
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
%8 = call i32 @read(i32 0, i8** %3, i32 8)
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @free(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [37 x i8] c"What address do you want to free()? \00"
@.str.1 = [18 x i8] c"OK, free()ing %p\0A\00"
define i32 @main(i32 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
%8 = call i32 @read(i32 0, i8** %2, i32 8)
%9 = load i8*, i8** %2
%10 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = tail call i32 @free(i8* %9)
ret i32 0
}
void dmaInit(void) {}


x86 assembly (clang, -O0):
<dmaInit>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmaInit>:
ret

LLVM IR (-O0):
define void @dmaInit() {
ret void
}

LLVM IR (-O2):
define void @dmaInit() {
ret void
}
/* Variables and functions */
int strcasecmp(char *, char *);
int func_qsort_strcasecmp(const void *a, const void *b) {
  return strcasecmp(*(char **)a, *(char **)b);
}


x86 assembly (clang, -O0):
<func_qsort_strcasecmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcasecmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_qsort_strcasecmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @func_qsort_strcasecmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcasecmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @func_qsort_strcasecmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcasecmp(i8* %4, i8* %6)
ret i32 %7
}
void SHAREMIND_MAP_KEY_FREE_unsigned_int(unsigned int *const dest) {
  (void)dest;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_FREE_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_FREE_unsigned_int>:
ret

LLVM IR (-O0):
define void @SHAREMIND_MAP_KEY_FREE_unsigned_int(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
ret void
}

LLVM IR (-O2):
define void @SHAREMIND_MAP_KEY_FREE_unsigned_int(i32* nocapture %0) {
ret void
}