xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x01() {
  Assert_real((isodigit(1) == 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_isodigit.c",
              10, ("isodigit should be 0 for 0x01"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x01>:
push   %rax
mov    $0x1,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xa,%edx
pop    %rax
jmp    1030 <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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x01\00"
define void @t_isodigit_0x01() {
%1 = call i64 @isodigit(i32 1)
%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 10, 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x01\00"
define void @t_isodigit_0x01() {
%1 = tail call i64 @isodigit(i32 1)
%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 10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void PUT_UAA16LE(void *p, unsigned short v, unsigned int i) {
  unsigned char *_p = (unsigned char *)&((unsigned short *)p)[i];
  _p[0] = (unsigned char)(v);
  _p[1] = (unsigned char)(v >> 8);
}


x86 assembly (clang, -O0):
<PUT_UAA16LE>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
shl    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0xa(%rbp),%ax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PUT_UAA16LE>:
mov    %edx,%eax
mov    %si,(%rdi,%rax,2)
ret

LLVM IR (-O0):
define void @PUT_UAA16LE(i8* %0, i16 zeroext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i16 %1, i16* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i16*
%10 = load i32, i32* %6
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i16, i16* %9, i64 %11
%13 = bitcast i16* %12 to i8*
store i8* %13, i8** %7
%14 = load i16, i16* %5
%15 = trunc i16 %14 to i8
%16 = load i8*, i8** %7
%17 = getelementptr inbounds i8, i8* %16, i64 0
store i8 %15, i8* %17
%18 = load i16, i16* %5
%19 = zext i16 %18 to i32
%20 = ashr i32 %19, 8
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %7
%23 = getelementptr inbounds i8, i8* %22, i64 1
store i8 %21, i8* %23
ret void
}

LLVM IR (-O2):
define void @PUT_UAA16LE(i8* nocapture writeonly %0, i16 zeroext %1, i32 %2) {
%4 = bitcast i8* %0 to i16*
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds i16, i16* %4, i64 %5
%7 = bitcast i16* %6 to i8*
%8 = trunc i16 %1 to i8
store i8 %8, i8* %7
%9 = lshr i16 %1, 8
%10 = trunc i16 %9 to i8
%11 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %10, i8* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m4_comm_init();
int /*<<< orphan*/ m4_comm_submit();
void m4_comm_cancel() {
  m4_comm_init();
  m4_comm_submit();
}


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

x86 assembly (clang, -O2):
<m4_comm_cancel>:
push   %rax
xor    %eax,%eax
call   1040 <m4_comm_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <m4_comm_submit@plt>

LLVM IR (-O0):
define void @m4_comm_cancel() {
%1 = call i32 (...) @m4_comm_init()
%2 = call i32 (...) @m4_comm_submit()
ret void
}

LLVM IR (-O2):
define void @m4_comm_cancel() {
%1 = tail call i32 (...) @m4_comm_init()
%2 = tail call i32 (...) @m4_comm_submit()
ret void
}
int test_imm_CDuint8_mem(unsigned char *val) {
  return ((*val) & (0xCD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CDuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xcd,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CDuint8_mem>:
testb  $0xcd,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_CDuint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 205
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_CDuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -51
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void multidir_pre_slope_lim_linetype_weno(void) { int i, j, k, pl, pliter; }


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

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

LLVM IR (-O0):
define void @multidir_pre_slope_lim_linetype_weno() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
ret void
}

LLVM IR (-O2):
define void @multidir_pre_slope_lim_linetype_weno() {
ret void
}
unsigned int pwm_tdiv_has_div1(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @pwm_tdiv_has_div1() {
ret i32 1
}

LLVM IR (-O2):
define i32 @pwm_tdiv_has_div1() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
int /*<<< orphan*/ omp_destroy_lock(int /*<<< orphan*/ *);
int omp_get_thread_num();
int /*<<< orphan*/ omp_init_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_set_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_unset_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  omp_lock_t lock;
  omp_init_lock(&lock);
#pragma omp parallel
  {
    int id = omp_get_thread_num();
    omp_set_lock(&lock);
    printf("id = %d\n", id);
    omp_unset_lock(&lock);
  }
  omp_destroy_lock(&lock);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1070 <omp_init_lock@plt>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
call   1060 <omp_set_lock@plt>
mov    -0x8(%rbp),%esi
lea    0xe72(%rip),%rdi
call   1050 <printf@plt>
lea    -0x4(%rbp),%rdi
call   1040 <omp_unset_lock@plt>
lea    -0x4(%rbp),%rdi
call   1080 <omp_destroy_lock@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1070 <omp_init_lock@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1060 <omp_set_lock@plt>
lea    0xe78(%rip),%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <omp_unset_lock@plt>
mov    %rbx,%rdi
call   1080 <omp_destroy_lock@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"id = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @omp_init_lock(i32* %1)
%4 = call i32 (...) @omp_get_thread_num()
store i32 %4, i32* %2
%5 = call i32 @omp_set_lock(i32* %1)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @omp_unset_lock(i32* %1)
%9 = call i32 @omp_destroy_lock(i32* %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"id = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @omp_init_lock(i32* %1)
%4 = call i32 (...) @omp_get_thread_num()
%5 = call i32 @omp_set_lock(i32* %1)
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = call i32 @omp_unset_lock(i32* %1)
%8 = call i32 @omp_destroy_lock(i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void DES_ecb3_encrypt(void *input, void *output, void *ks1, void *ks2,
                      void *ks3, int enc) {
  printf("DES_ecb3_encrypt stubbed\n");
  (void)&(input);
  (void)&(output);
  (void)&(ks1);
  (void)&(ks2);
  (void)&(ks3);
  (void)&(enc);
}


x86 assembly (clang, -O0):
<DES_ecb3_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DES_ecb3_encrypt>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"DES_ecb3_encrypt stubbed\0A\00"
define void @DES_ecb3_encrypt(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"DES_ecb3_encrypt stubbed\00"
define void @DES_ecb3_encrypt(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i32 %5) {
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
void REMR3NotifyTimerPending(void) {}


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

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

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

LLVM IR (-O2):
define void @REMR3NotifyTimerPending() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_replace_standard_solution(int n, int k, int m, double *sol) {
  int b[2], fail;
  b[0] = n;
  b[1] = m;
  fail = _ada_use_c2phc4c(35, &k, b, sol, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_replace_standard_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x23,%edi
lea    -0x8(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_replace_standard_solution>:
sub    $0x18,%rsp
mov    %esi,0xc(%rsp)
mov    %edi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x23,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @solcon_replace_standard_solution(i32 %0, i32 %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca [2 x i32]
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double* %3, double** %8
%11 = load i32, i32* %5
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
store i32 %11, i32* %12
%13 = load i32, i32* %7
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %13, i32* %14
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%16 = load double*, double** %8
%17 = call i32 @_ada_use_c2phc4c(i32 35, i32* %6, i32* %15, double* %16, i32 0)
store i32 %17, i32* %10
%18 = load i32, i32* %10
ret i32 %18
}

LLVM IR (-O2):
define i32 @solcon_replace_standard_solution(i32 %0, i32 %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca [2 x i32]
store i32 %1, i32* %5
%7 = bitcast [2 x i32]* %6 to i8*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 %0, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 %2, i32* %9
%10 = call i32 @_ada_use_c2phc4c(i32 35, i32* %5, i32* %8, double* %3, i32 0)
ret i32 %10
}
int sn_do_rr_setup_schedvalue(struct sn_context *snc) { return 0; }


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

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

LLVM IR (-O0):
%struct.sn_context = type opaque
define i32 @sn_do_rr_setup_schedvalue(%struct.sn_context* %0) {
%2 = alloca %struct.sn_context*
store %struct.sn_context* %0, %struct.sn_context** %2
ret i32 0
}

LLVM IR (-O2):
%struct.sn_context = type opaque
define i32 @sn_do_rr_setup_schedvalue(%struct.sn_context* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char *bc_strdup(char *);
char *bc_strdup_printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ bgr_settings_get_base_dir();
char *getenv(char *);
char *bgr_settings_get_builds_dir(void) {
  char *rv = getenv("BLOGC_GIT_RECEIVER_BUILDS_DIR");
  if (rv != NULL) {
    return bc_strdup(rv);
  }
  return bc_strdup_printf("%s/builds", bgr_settings_get_base_dir());
}


x86 assembly (clang, -O0):
<bgr_settings_get_builds_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1175 <bgr_settings_get_builds_dir+0x35>
mov    -0x10(%rbp),%rdi
call   1060 <bc_strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    118e <bgr_settings_get_builds_dir+0x4e>
mov    $0x0,%al
call   1050 <bgr_settings_get_base_dir@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1040 <bc_strdup_printf@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bgr_settings_get_builds_dir>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     115b <bgr_settings_get_builds_dir+0x1b>
mov    %rax,%rdi
pop    %rax
jmp    1060 <bc_strdup@plt>
xor    %eax,%eax
call   1050 <bgr_settings_get_base_dir@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <bc_strdup_printf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"BLOGC_GIT_RECEIVER_BUILDS_DIR\00"
@.str.1 = [10 x i8] c"%s/builds\00"
define i8* @bgr_settings_get_builds_dir() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @getenv(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i8*, i8** %2
%8 = call i8* @bc_strdup(i8* %7)
store i8* %8, i8** %1
br label %12
9: ; preds = %0
%10 = call i32 (...) @bgr_settings_get_base_dir()
%11 = call i8* @bc_strdup_printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %10)
store i8* %11, i8** %1
br label %12
12: ; preds = %9, %6
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [30 x i8] c"BLOGC_GIT_RECEIVER_BUILDS_DIR\00"
@.str.1 = [10 x i8] c"%s/builds\00"
define i8* @bgr_settings_get_builds_dir() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i8* @bc_strdup(i8* %1)
br label %8
5: ; preds = %0
%6 = tail call i32 (...) @bgr_settings_get_base_dir()
%7 = tail call i8* @bc_strdup_printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %3
%9 = phi i8* [ %4, %3 ], [ %7, %5 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ backspace();
void clear_line(unsigned int len) {
  while (len--) {
    backspace();
  }
}


x86 assembly (clang, -O0):
<clear_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     113b <clear_line+0x2b>
mov    $0x0,%al
call   1030 <backspace@plt>
jmp    111b <clear_line+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_line>:
push   %rbx
test   %edi,%edi
je     112c <clear_line+0x1c>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <backspace@plt>
add    $0xffffffff,%ebx
jne    1120 <clear_line+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @clear_line(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add i32 %4, -1
%6 = tail call i32 (...) @backspace()
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
int is_prime(int number) {
  int counter = 2;
  while (number % counter != 0) {
    counter++;
  }
  return counter;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
je     112c <is_prime+0x2c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <is_prime+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ecx
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
jne    1110 <is_prime+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @is_prime(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 2, %1 ], [ %6, %2 ]
%4 = srem i32 %0, %3
%5 = icmp eq i32 %4, 0
%6 = add nuw nsw i32 %3, 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i32 %3
}
unsigned char f71(unsigned char x, unsigned int y) {
  return (x << y) + (x >> ((-y) & (8 - 1)));
}


x86 assembly (clang, -O0):
<f71>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
and    $0x7,%ecx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f71>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
and    $0x7,%cl
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f71(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = shl i32 %6, %7
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = load i32, i32* %4
%12 = sub i32 0, %11
%13 = and i32 %12, 7
%14 = ashr i32 %10, %13
%15 = add nsw i32 %8, %14
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
define zeroext i8 @f71(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = shl i32 %3, %1
%5 = sub i32 0, %1
%6 = and i32 %5, 7
%7 = lshr i32 %3, %6
%8 = add nsw i32 %7, %4
%9 = trunc i32 %8 to i8
ret i8 %9
}
int xmlUCSIsSupplementaryPrivateUseAreaB(int code) {
  return (((code >= 0x100000) && (code <= 0x10FFFF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsSupplementaryPrivateUseAreaB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x100000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsSupplementaryPrivateUseAreaB+0x26>
cmpl   $0x10ffff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsSupplementaryPrivateUseAreaB>:
and    $0xffff0000,%edi
xor    %eax,%eax
cmp    $0x100000,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsSupplementaryPrivateUseAreaB(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 1048576
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 1114111
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsSupplementaryPrivateUseAreaB(i32 %0) {
%2 = and i32 %0, -65536
%3 = icmp eq i32 %2, 1048576
%4 = zext i1 %3 to i32
ret i32 %4
}
int const_error(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @const_error() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @const_error() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ RamWrite32A(int, int);
unsigned char RdStatus(int);
void OisEnaDrCl(void) {
  unsigned char UcStRd = 1;
  RamWrite32A(0xF012, 0x00000004 | 0x00000001);
  while (UcStRd) {
    UcStRd = RdStatus(1);
  }
}


x86 assembly (clang, -O0):
<OisEnaDrCl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x1,-0x1(%rbp)
mov    $0xf012,%edi
mov    $0x5,%esi
call   1030 <RamWrite32A@plt>
cmpb   $0x0,-0x1(%rbp)
je     1157 <OisEnaDrCl+0x37>
mov    $0x1,%edi
call   1040 <RdStatus@plt>
mov    %al,-0x1(%rbp)
jmp    113b <OisEnaDrCl+0x1b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OisEnaDrCl>:
push   %rax
mov    $0xf012,%edi
mov    $0x5,%esi
call   1030 <RamWrite32A@plt>
mov    $0x1,%edi
call   1040 <RdStatus@plt>
test   %al,%al
jne    1130 <OisEnaDrCl+0x10>
pop    %rax
ret

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

LLVM IR (-O2):
define void @OisEnaDrCl() {
%1 = tail call i32 @RamWrite32A(i32 61458, i32 5)
br label %2
2: ; preds = %0, %2
%3 = tail call zeroext i8 @RdStatus(i32 1)
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret void
}
int bar(void) {
  int a = 0;
  return _Generic(0, int : a);
}


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

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

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

LLVM IR (-O2):
define i32 @bar() {
ret i32 0
}
adrx0indreg1_set(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (((short *)10000000)[x0]) = (*p1); }


x86 assembly (clang, -O0):
<adrx0indreg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%dx
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
mov    %dx,(%rax,%rcx,2)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0indreg1_set>:
movzwl (%r9),%eax
movslq %edx,%rcx
mov    %ax,0x989680(%rcx,%rcx,1)
ret

LLVM IR (-O0):
define i32 @adrx0indreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %13
%17 = load i16, i16* %16
%18 = load i32, i32* %10
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %19
store i16 %17, i16* %20
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @adrx0indreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = load i16, i16* %5
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %8
store i16 %7, i16* %9
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
size_t integer_equals(uint64_t const left, uint64_t const right) {
  return (left == right);
}


x86 assembly (clang, -O0):
<integer_equals>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<integer_equals>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i64 @integer_equals(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @integer_equals(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ parse_args(int, char **);
int main(int argc, char **argv) {
  if (parse_args(argc, argv)) {
    exit(2);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <parse_args@plt>
cmp    $0x0,%rax
je     1156 <main+0x36>
mov    $0x2,%edi
call   1040 <exit@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <parse_args@plt>
test   %rax,%rax
jne    1132 <main+0x12>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @parse_args(i32 %0, i8** %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @exit(i32 2)
unreachable
7: ; preds = %2
%8 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ d2i_of_void;
typedef int /*<<< orphan*/ X509;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ *PEM_ASN1_read_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      int /*<<< orphan*/ *, void **,
                                      int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ PEM_STRING_X509_TRUSTED;
scalar_t__ d2i_X509_AUX;
X509 *PEM_read_bio_X509_AUX(BIO *bp, X509 **x, pem_password_cb *cb, void *u) {
  return PEM_ASN1_read_bio((d2i_of_void *)d2i_X509_AUX, PEM_STRING_X509_TRUSTED,
                           bp, (void **)x, cb, u);
}


x86 assembly (clang, -O0):
<PEM_read_bio_X509_AUX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%rdi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <PEM_ASN1_read_bio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_bio_X509_AUX>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PEM_ASN1_read_bio@plt>

LLVM IR (-O0):
@d2i_X509_AUX = global i64 0
@PEM_STRING_X509_TRUSTED = global i32 0
define i32* @PEM_read_bio_X509_AUX(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i64, i64* @d2i_X509_AUX
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* @PEM_STRING_X509_TRUSTED
%12 = load i32*, i32** %5
%13 = load i32**, i32*** %6
%14 = bitcast i32** %13 to i8**
%15 = load i32*, i32** %7
%16 = load i8*, i8** %8
%17 = call i32* @PEM_ASN1_read_bio(i32* %10, i32 %11, i32* %12, i8** %14, i32* %15, i8* %16)
ret i32* %17
}

LLVM IR (-O2):
@d2i_X509_AUX = global i64 0
@PEM_STRING_X509_TRUSTED = global i32 0
define i32* @PEM_read_bio_X509_AUX(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = load i64, i64* @d2i_X509_AUX
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_X509_TRUSTED
%8 = bitcast i32** %1 to i8**
%9 = tail call i32* @PEM_ASN1_read_bio(i32* %6, i32 %7, i32* %0, i8** %8, i32* %2, i8* %3)
ret i32* %9
}
int quads_in_map(int res) {
  int across;
  across = (1 << (res + 1));
  return (across * across) >> 2;
}


x86 assembly (clang, -O0):
<quads_in_map>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
sar    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quads_in_map>:
lea    0x1(%rdi),%ecx
mov    $0x1,%eax
shl    %cl,%eax
shl    %cl,%eax
sar    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @quads_in_map(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = shl i32 1, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* %3
%9 = mul nsw i32 %7, %8
%10 = ashr i32 %9, 2
ret i32 %10
}

LLVM IR (-O2):
define i32 @quads_in_map(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = shl nuw i32 1, %2
%4 = shl i32 %3, %2
%5 = ashr i32 %4, 2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fork();
int main(void) {
  int j = 22;
  fork();
  int i = 7;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x16,-0x8(%rbp)
mov    $0x0,%al
call   1030 <fork@plt>
movl   $0x7,-0xc(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <fork@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 22, i32* %2
%4 = call i32 (...) @fork()
store i32 7, i32* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fork()
ret i32 0
}
void effect(void) {}


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

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

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

LLVM IR (-O2):
define void @effect() {
ret void
}
void sha256_finish(struct sha256 *sha) {}


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

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

LLVM IR (-O0):
%struct.sha256 = type opaque
define void @sha256_finish(%struct.sha256* %0) {
%2 = alloca %struct.sha256*
store %struct.sha256* %0, %struct.sha256** %2
ret void
}

LLVM IR (-O2):
%struct.sha256 = type opaque
define void @sha256_finish(%struct.sha256* nocapture %0) {
ret void
}
reg0adrx1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if (r0 <= (((int *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0adrx1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%eax
movslq -0x14(%rbp),%rdx
mov    $0xa98ac7,%ecx
cmp    (%rcx,%rdx,4),%eax
jg     1139 <reg0adrx1+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1140 <reg0adrx1+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0adrx1>:
movslq %ecx,%rcx
xor    %eax,%eax
cmp    %edi,0xa98ac7(,%rcx,4)
setge  %al
ret

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

LLVM IR (-O2):
define i32 @reg0adrx1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %7
%9 = load i32, i32* %8
%10 = icmp sge i32 %9, %0
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Type definitions */
struct frame {
  int dummy;
};
struct fcgi {
  int dummy;
};

/* Variables and functions */
int process_stderr(struct frame *f, struct fcgi *fcgi, const char *str,
                   size_t num) {
  return 1;
}


x86 assembly (clang, -O0):
<process_stderr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.frame = type { i32 }
%struct.fcgi = type { i32 }
define i32 @process_stderr(%struct.frame* %0, %struct.fcgi* %1, i8* %2, i64 %3) {
%5 = alloca %struct.frame*
%6 = alloca %struct.fcgi*
%7 = alloca i8*
%8 = alloca i64
store %struct.frame* %0, %struct.frame** %5
store %struct.fcgi* %1, %struct.fcgi** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
ret i32 1
}

LLVM IR (-O2):
%struct.frame = type { i32 }
%struct.fcgi = type { i32 }
define i32 @process_stderr(%struct.frame* nocapture readnone %0, %struct.fcgi* nocapture readnone %1, i8* nocapture readnone %2, i64 %3) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ forward_backward_belief_propagation();
int /*<<< orphan*/ loopy_belief_propagation();
int main() {
  forward_backward_belief_propagation();
  loopy_belief_propagation();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <forward_backward_belief_propagation@plt>
mov    $0x0,%al
call   1030 <loopy_belief_propagation@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <forward_backward_belief_propagation@plt>
xor    %eax,%eax
call   1030 <loopy_belief_propagation@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @forward_backward_belief_propagation()
%3 = call i32 (...) @loopy_belief_propagation()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @forward_backward_belief_propagation()
%2 = tail call i32 (...) @loopy_belief_propagation()
ret i32 0
}
void exynos5_ppmu_trace(void) {}


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

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

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

LLVM IR (-O2):
define void @exynos5_ppmu_trace() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fb_write(char *, int);
void putc(char c) { fb_write(&c, 1); }


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <fb_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <fb_write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @putc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @fb_write(i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @putc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @fb_write(i8* %2, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ acumen();
main() { acumen(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <acumen@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @acumen()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @acumen()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int chmod(char const *, int /*<<< orphan*/);
__attribute__((__weak__, __always___)) int softboundmpx_chmod(const char *path,
                                                              mode_t mode) {
  return chmod(path, mode);
}


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

x86 assembly (clang, -O2):
<softboundmpx_chmod>:
jmp    1030 <chmod@plt>

LLVM IR (-O0):
define weak i32 @softboundmpx_chmod(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @chmod(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define weak i32 @softboundmpx_chmod(i8* %0, i32 %1) {
%3 = tail call i32 @chmod(i8* %0, i32 %1)
ret i32 %3
}
void prdone() {}


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

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

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

LLVM IR (-O2):
define void @prdone() {
ret void
}
/* Variables and functions */
scalar_t__ _gettemp(char *, int *, int /*<<< orphan*/, int /*<<< orphan*/,
                    int /*<<< orphan*/);
int mkstemp(char *path) {
  int fd;
  return (_gettemp(path, &fd, 0, 0, 0) ? fd : -1);
}


x86 assembly (clang, -O0):
<mkstemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <_gettemp@plt>
cmp    $0x0,%rax
je     1147 <mkstemp+0x37>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1154 <mkstemp+0x44>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1154 <mkstemp+0x44>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemp>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <_gettemp@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mkstemp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @_gettemp(i8* %4, i32* %3, i32 0, i32 0, i32 0)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %3
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %7
%11 = phi i32 [ %8, %7 ], [ -1, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @mkstemp(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i64 @_gettemp(i8* %0, i32* %2, i32 0, i32 0, i32 0)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* %2
%7 = select i1 %5, i32 -1, i32 %6
ret i32 %7
}
/* Variables and functions */
scalar_t__ nCr(int, int /*<<< orphan*/);
float nKr(int n, int r) {
  float result = 0;
  while (r >= 0) {
    result += nCr(n, r--);
  }
  return result;
}


x86 assembly (clang, -O0):
<nKr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1157 <nKr+0x47>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
call   1030 <nCr@plt>
cvtsi2ss %rax,%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1126 <nKr+0x16>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nKr>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
js     1154 <nKr+0x44>
mov    %esi,%ebx
mov    %edi,%ebp
xorps  %xmm0,%xmm0
xchg   %ax,%ax
movss  %xmm0,0x4(%rsp)
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <nCr@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  0x4(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x4(%rsp)
movss  0x4(%rsp),%xmm0
add    $0xffffffff,%ebx
jb     1120 <nKr+0x10>
jmp    1157 <nKr+0x47>
xorps  %xmm0,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define float @nKr(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
store float 0.000000e+00, float* %5
br label %6
6: ; preds = %9, %2
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = add nsw i32 %11, -1
store i32 %12, i32* %4
%13 = call i64 @nCr(i32 %10, i32 %11)
%14 = sitofp i64 %13 to float
%15 = load float, float* %5
%16 = fadd float %15, %14
store float %16, float* %5
br label %6
17: ; preds = %6
%18 = load float, float* %5
ret float %18
}

LLVM IR (-O2):
define float @nKr(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi float [ %10, %4 ], [ 0.000000e+00, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = add nsw i32 %6, -1
%8 = tail call i64 @nCr(i32 %0, i32 %6)
%9 = sitofp i64 %8 to float
%10 = fadd float %5, %9
%11 = icmp eq i32 %6, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %2
%13 = phi float [ 0.000000e+00, %2 ], [ %10, %4 ]
ret float %13
}
int __attribute__((no)) ypit_sod(int soy) { return (unsigned)soy % 86400; }


x86 assembly (clang, -O0):
<ypit_sod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x15180,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ypit_sod>:
mov    %edi,%eax
mov    %edi,%ecx
mov    $0xc22e4507,%edx
imul   %rcx,%rdx
shr    $0x30,%rdx
imul   $0x15180,%edx,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ypit_sod(i32 %0) {
%2 = urem i32 %0, 86400
ret i32 %2
}
unsigned int constant_time_msb(unsigned int a) {
  return (unsigned int)((int)(a) >> (sizeof(int) * 8 - 1));
}


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

x86 assembly (clang, -O2):
<constant_time_msb>:
mov    %edi,%eax
sar    $0x1f,%eax
ret

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

LLVM IR (-O2):
define i32 @constant_time_msb(i32 %0) {
%2 = ashr i32 %0, 31
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ writeDebugStreamLine(char *);
void debugmsg(char *msg) { writeDebugStreamLine(msg); }


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

x86 assembly (clang, -O2):
<debugmsg>:
jmp    1030 <writeDebugStreamLine@plt>

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

LLVM IR (-O2):
define void @debugmsg(i8* %0) {
%2 = tail call i32 @writeDebugStreamLine(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  int i, sum = 0;
  for (i = 1; i <= 50; i++) {
    if (i % 2 != 0) {
      sum += i;
    }
  }
  printf("%d \n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0x4(%rbp)
cmpl   $0x32,-0x4(%rbp)
jg     1160 <main+0x50>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     114d <main+0x3d>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <main+0x42>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x271,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%d \0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
store i32 1, i32* %1
br label %3
3: ; preds = %15, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 50
br i1 %5, label %6, label %18
6: ; preds = %3
%7 = load i32, i32* %1
%8 = srem i32 %7, 2
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = add nsw i32 %12, %11
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %6
br label %15
15: ; preds = %14
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %3
18: ; preds = %3
%19 = load i32, i32* %2
%20 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 625)
ret void
}
void XtAddWorkProc() {}


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

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

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

LLVM IR (-O2):
define void @XtAddWorkProc() {
ret void
}
void f(int x[]) { x[3] = x[5] + 7; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
add    $0x7,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    0x14(%rdi),%eax
add    $0x7,%eax
mov    %eax,0xc(%rdi)
ret

LLVM IR (-O0):
define void @f(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 5
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 7
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 3
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @f(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 7
%5 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %4, i32* %5
ret void
}