xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int BN_mod(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
           int /*<<< orphan*/ const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_sqr(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int /*<<< orphan*/ *);
int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx) {
  if (!BN_sqr(r, a, ctx))
    return 0;
  return BN_mod(r, r, m, ctx);
}


x86 assembly (clang, -O0):
<BN_mod_sqr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <BN_sqr@plt>
cmp    $0x0,%eax
jne    115e <BN_mod_sqr+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1176 <BN_mod_sqr+0x56>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1040 <BN_mod@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BN_mod_sqr>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rcx,%rdx
call   1030 <BN_sqr@plt>
test   %eax,%eax
je     1150 <BN_mod_sqr+0x30>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <BN_mod@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @BN_mod_sqr(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %9
%13 = call i32 @BN_sqr(i32* %10, i32* %11, i32* %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %4
store i32 0, i32* %5
br label %22
16: ; preds = %4
%17 = load i32*, i32** %6
%18 = load i32*, i32** %6
%19 = load i32*, i32** %8
%20 = load i32*, i32** %9
%21 = call i32 @BN_mod(i32* %17, i32* %18, i32* %19, i32* %20)
store i32 %21, i32* %5
br label %22
22: ; preds = %16, %15
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @BN_mod_sqr(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i32 @BN_sqr(i32* %0, i32* %1, i32* %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @BN_mod(i32* %0, i32* %0, i32* %2, i32* %3)
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ %8, %7 ], [ 0, %4 ]
ret i32 %10
}
int test_imm_69uint32_mem(unsigned int *val) {
  return ((*val) & (0x69 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_69uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 105
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void SmartMac_Input() {}


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

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

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

LLVM IR (-O2):
define void @SmartMac_Input() {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ e_ident;
};
typedef TYPE_1__ Elf32_Ehdr;

/* Variables and functions */
int /*<<< orphan*/ ELFMAG;
int /*<<< orphan*/ memcmp(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int is_elf_mem(Elf32_Ehdr *header) {
  if (!memcmp(&header->e_ident, ELFMAG, 4))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_elf_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
jne    1148 <is_elf_mem+0x38>
movl   $0x1,-0x4(%rbp)
jmp    114f <is_elf_mem+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_elf_mem>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@ELFMAG = global i32 0
define i32 @is_elf_mem(%struct.TYPE_3__* %0) {
%2 = alloca i32
%3 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %3
%4 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %4, i32 0, i32 0
%6 = load i32, i32* @ELFMAG
%7 = call i32 @memcmp(i32* %5, i32 %6, i32 4)
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@ELFMAG = global i32 0
define i32 @is_elf_mem(%struct.TYPE_3__* %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i32, i32* @ELFMAG
%4 = tail call i32 @memcmp(i32* %2, i32 %3, i32 4)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int do_597() { return 597; }


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

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

LLVM IR (-O0):
define i32 @do_597() {
ret i32 597
}

LLVM IR (-O2):
define i32 @do_597() {
ret i32 597
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
void write_u32(uint8_t *buffer, uint32_t value) {
  buffer[0] = (uint8_t)(value >> 24);
  buffer[1] = (uint8_t)(value >> 16);
  buffer[2] = (uint8_t)(value >> 8);
  buffer[3] = (uint8_t)(value >> 0);
}


x86 assembly (clang, -O0):
<write_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0xc(%rbp),%eax
sar    $0x0,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_u32>:
mov    %esi,%eax
sar    $0x18,%eax
cltq
mov    %rax,(%rdi)
mov    %esi,%eax
sar    $0x10,%eax
cltq
mov    %rax,0x8(%rdi)
movslq %esi,%rax
sar    $0x8,%esi
movslq %esi,%rcx
mov    %rcx,0x10(%rdi)
mov    %rax,0x18(%rdi)
ret

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

LLVM IR (-O2):
define void @write_u32(i64* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
%4 = sext i32 %3 to i64
store i64 %4, i64* %0
%5 = ashr i32 %1, 16
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %6, i64* %7
%8 = ashr i32 %1, 8
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %9, i64* %10
%11 = sext i32 %1 to i64
%12 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %11, i64* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xc3() {
  Assert_real((isgraph(195) == 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_isgraph.c",
              980, ("isgraph should be 0 for 0xc3"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xc3>:
push   %rax
mov    $0xc3,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3d4,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc3\00"
define void @t_isgraph_0xc3() {
%1 = call i64 @isgraph(i32 195)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 980, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc3\00"
define void @t_isgraph_0xc3() {
%1 = tail call i64 @isgraph(i32 195)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 980, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ create_stop();
int /*<<< orphan*/ create_sync();
void create_cease() {
  create_stop();
  create_sync();
}


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

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

LLVM IR (-O0):
define void @create_cease() {
%1 = call i32 (...) @create_stop()
%2 = call i32 (...) @create_sync()
ret void
}

LLVM IR (-O2):
define void @create_cease() {
%1 = tail call i32 (...) @create_stop()
%2 = tail call i32 (...) @create_sync()
ret void
}
/* Type definitions */
struct keyboardDevice {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeDevice(struct device *);
void keyboardFreeDevice(struct keyboardDevice *dev) {
  freeDevice((struct device *)dev);
}


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

x86 assembly (clang, -O2):
<keyboardFreeDevice>:
jmp    1030 <freeDevice@plt>

LLVM IR (-O0):
%struct.keyboardDevice = type { i32 }
%struct.device = type { i32 }
define void @keyboardFreeDevice(%struct.keyboardDevice* %0) {
%2 = alloca %struct.keyboardDevice*
store %struct.keyboardDevice* %0, %struct.keyboardDevice** %2
%3 = load %struct.keyboardDevice*, %struct.keyboardDevice** %2
%4 = bitcast %struct.keyboardDevice* %3 to %struct.device*
%5 = call i32 @freeDevice(%struct.device* %4)
ret void
}

LLVM IR (-O2):
%struct.keyboardDevice = type { i32 }
%struct.device = type { i32 }
define void @keyboardFreeDevice(%struct.keyboardDevice* %0) {
%2 = bitcast %struct.keyboardDevice* %0 to %struct.device*
%3 = tail call i32 @freeDevice(%struct.device* %2)
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int count = 0;
  printf("Type whatever you want: ");
  while (getchar() != '\n')
    count++;
  printf("\nYou typed %d keystrokes (including the return/enter key)", ++count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1165 <main+0x45>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x24>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%ebx
cmp    $0xa,%al
jne    1140 <main+0x20>
lea    0xec4(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Type whatever you want: \00"
@.str.1 = [58 x i8] c"\0AYou typed %d keystrokes (including the return/enter key)\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %8, %0
%5 = call signext i8 (...) @getchar()
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 10
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Type whatever you want: \00"
@.str.1 = [58 x i8] c"\0AYou typed %d keystrokes (including the return/enter key)\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ 1, %0 ], [ %6, %2 ]
%4 = tail call signext i8 (...) @getchar()
%5 = icmp eq i8 %4, 10
%6 = add i32 %3, 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
adrreg0adrreg1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((p0[10000000]) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrreg0adrreg1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x4c4b400(%rax),%xmm1
04
mov    -0x30(%rbp),%rax
movsd  0x21e888(%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     114a <adrreg0adrreg1+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <adrreg0adrreg1+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0adrreg1>:
movsd  0x21e888(%rcx),%xmm0
xor    %eax,%eax
ucomisd 0x4c4b400(%rdx),%xmm0
04
setae  %al
ret

LLVM IR (-O0):
define i32 @adrreg0adrreg1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double*, double** %12
%15 = getelementptr inbounds double, double* %14, i64 10000000
%16 = load double, double* %15
%17 = load double*, double** %13
%18 = getelementptr inbounds double, double* %17, i64 277777
%19 = load double, double* %18
%20 = fcmp ole double %16, %19
br i1 %20, label %21, label %22
21: ; preds = %6
store i32 1, i32* %7
br label %23
22: ; preds = %6
store i32 0, i32* %7
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @adrreg0adrreg1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture %5) {
%7 = getelementptr inbounds double, double* %4, i64 10000000
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %5, i64 277777
%10 = load double, double* %9
%11 = fcmp ole double %8, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ one;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_KEEPALIVE;
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              int *, int);
void set_socket_keepalive(int fd) {
  int one = 1;
  setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &one, sizeof(one));
}


x86 assembly (clang, -O0):
<set_socket_keepalive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_socket_keepalive>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rax
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_KEEPALIVE = global i32 0
define void @set_socket_keepalive(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @SOL_SOCKET
%6 = load i32, i32* @SO_KEEPALIVE
%7 = call i32 @setsockopt(i32 %4, i32 %5, i32 %6, i32* %3, i32 4)
ret void
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_KEEPALIVE = global i32 0
define void @set_socket_keepalive(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_KEEPALIVE
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %2, i32 4)
ret void
}
void XtUnregisterDrawable() {}


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

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

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

LLVM IR (-O2):
define void @XtUnregisterDrawable() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int iswalnum(int /*<<< orphan*/);
int __iswalnum_l(wint_t c, locale_t l) { return iswalnum(c); }


x86 assembly (clang, -O0):
<__iswalnum_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <iswalnum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__iswalnum_l>:
jmp    1030 <iswalnum@plt>

LLVM IR (-O0):
define i32 @__iswalnum_l(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @iswalnum(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @__iswalnum_l(i32 %0, i32 %1) {
%3 = tail call i32 @iswalnum(i32 %0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ i2d_of_void;
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int PEM_ASN1_write_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *);
int /*<<< orphan*/ PEM_STRING_PUBLIC;
scalar_t__ i2d_PUBKEY;
int PEM_write_bio_PUBKEY(BIO *bp, EVP_PKEY *x) {
  return PEM_ASN1_write_bio((i2d_of_void *)i2d_PUBKEY, PEM_STRING_PUBLIC, bp, x,
                            NULL, NULL, 0, NULL, NULL);
}


x86 assembly (clang, -O0):
<PEM_write_bio_PUBKEY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%rdi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
mov    %r9,%r8
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_write_bio_PUBKEY>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ebf(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movl   $0x0,(%rsp)
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@i2d_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32 @PEM_write_bio_PUBKEY(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i64, i64* @i2d_PUBKEY
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PUBLIC
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = call i32 @PEM_ASN1_write_bio(i32* %6, i32 %7, i32* %8, i32* %9, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %10
}

LLVM IR (-O2):
@i2d_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32 @PEM_write_bio_PUBKEY(i32* %0, i32* %1) {
%3 = load i64, i64* @i2d_PUBKEY
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* @PEM_STRING_PUBLIC
%6 = tail call i32 @PEM_ASN1_write_bio(i32* %4, i32 %5, i32* %0, i32* %1, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ xop(char *, long double, long double, long double);
void fmul(long double a, long double b) { xop("mul", a, b, a * b); }


x86 assembly (clang, -O0):
<fmul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fld    %st(0)
fldt   -0x20(%rbp)
fld    %st(0)
fxch   %st(3)
fmulp  %st,%st(1)
mov    %rsp,%rax
fstpt  0x20(%rax)
fxch   %st(1)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xeba(%rip),%rdi
call   1030 <xop@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmul>:
sub    $0x38,%rsp
fldt   0x50(%rsp)
fldt   0x40(%rsp)
fld    %st(0)
fmul   %st(2),%st
fstpt  0x20(%rsp)
fxch   %st(1)
fstpt  0x10(%rsp)
fstpt  (%rsp)
lea    0xecc(%rip),%rdi
call   1030 <xop@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"mul\00"
define void @fmul(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = load x86_fp80, x86_fp80* %3
%8 = load x86_fp80, x86_fp80* %4
%9 = fmul x86_fp80 %7, %8
%10 = call i32 @xop(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %5, x86_fp80 %6, x86_fp80 %9)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"mul\00"
define void @fmul(x86_fp80 %0, x86_fp80 %1) {
%3 = fmul x86_fp80 %0, %1
%4 = tail call i32 @xop(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %0, x86_fp80 %1, x86_fp80 %3)
ret void
}
int _read_r(struct _reent *r, int file, char *ptr, int len) {
  (void)r;
  (void)file;
  (void)ptr;
  (void)len;
  return -1;
}


x86 assembly (clang, -O0):
<_read_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._reent = type opaque
define i32 @_read_r(%struct._reent* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca %struct._reent*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store %struct._reent* %0, %struct._reent** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct._reent*, %struct._reent** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
ret i32 -1
}

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_read_r(%struct._reent* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3) {
ret i32 -1
}
/* Variables and functions */
bool c_ret_bool() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @c_ret_bool() {
ret i32 1
}
int fn4(int a, int b) {
  int tem1 = b | a;
  int tem2 = b ^ a;
  return tem1 - tem2;
}


x86 assembly (clang, -O0):
<fn4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn4>:
mov    %edi,%eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @fn4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = or i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = xor i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn4(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
void TIM1_TRG_COM_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @TIM1_TRG_COM_IRQHandler() {
ret void
}
void termios_cfmakeraw(struct termios *t) {}


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

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

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

LLVM IR (-O2):
%struct.termios = type opaque
define void @termios_cfmakeraw(%struct.termios* nocapture %0) {
ret void
}
unsigned ror32(unsigned x, int s) {
  asm("rorl %%cl,%0" : "=r"(x) : "0"(x), "c"(s));
  return x;
}


x86 assembly (clang, -O0):
<ror32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
ror    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ror32>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @ror32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 asm "rorl %cl,$0", "=r,0,{cx},~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @ror32(i32 %0, i32 %1) {
%3 = tail call i32 asm "rorl %cl,$0", "=r,0,{cx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1)
ret i32 %3
}
int property_get(const char *name, const char *val, const char *x) { return 0; }


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

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

LLVM IR (-O0):
define i32 @property_get(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @property_get(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
unsigned char t12(unsigned input) {
  unsigned char output;
  __asm__("nop" : "=a"(output) : "0"(input));
  return output;
}


x86 assembly (clang, -O0):
<t12>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
nop
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t12>:
mov    %edi,%eax
nop
ret

LLVM IR (-O0):
define zeroext i8 @t12(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 asm "nop", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i32 %4)
%6 = trunc i32 %5 to i8
store i8 %6, i8* %3
%7 = load i8, i8* %3
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @t12(i32 %0) {
%2 = tail call i32 asm "nop", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i32 %0)
%3 = trunc i32 %2 to i8
ret i8 %3
}
/* Type definitions */
struct ptspair {
  int dummy;
};
struct pts {
  int dummy;
};

/* Variables and functions */
int EPOLLIN;
int EPOLLOUT;
int /*<<< orphan*/ EPOLL_CTL_MOD;
int pts_epoll_ctl(struct ptspair const *, struct pts *, int /*<<< orphan*/,
                  int);
int register_pts_write(const struct ptspair *ptspair, struct pts *pts) {
  return pts_epoll_ctl(ptspair, pts, EPOLL_CTL_MOD, EPOLLIN | EPOLLOUT);
}


x86 assembly (clang, -O0):
<register_pts_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
mov    0x2eb0(%rip),%rax
mov    (%rax),%ecx
mov    0x2e8f(%rip),%rax
or     (%rax),%ecx
call   1030 <pts_epoll_ctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<register_pts_write>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
mov    0x2ec8(%rip),%rax
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
jmp    1030 <pts_epoll_ctl@plt>

LLVM IR (-O0):
%struct.ptspair = type { i32 }
%struct.pts = type { i32 }
@EPOLL_CTL_MOD = global i32 0
@EPOLLIN = global i32 0
@EPOLLOUT = global i32 0
define i32 @register_pts_write(%struct.ptspair* %0, %struct.pts* %1) {
%3 = alloca %struct.ptspair*
%4 = alloca %struct.pts*
store %struct.ptspair* %0, %struct.ptspair** %3
store %struct.pts* %1, %struct.pts** %4
%5 = load %struct.ptspair*, %struct.ptspair** %3
%6 = load %struct.pts*, %struct.pts** %4
%7 = load i32, i32* @EPOLL_CTL_MOD
%8 = load i32, i32* @EPOLLIN
%9 = load i32, i32* @EPOLLOUT
%10 = or i32 %8, %9
%11 = call i32 @pts_epoll_ctl(%struct.ptspair* %5, %struct.pts* %6, i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.ptspair = type { i32 }
%struct.pts = type { i32 }
@EPOLL_CTL_MOD = global i32 0
@EPOLLIN = global i32 0
@EPOLLOUT = global i32 0
define i32 @register_pts_write(%struct.ptspair* %0, %struct.pts* %1) {
%3 = load i32, i32* @EPOLL_CTL_MOD
%4 = load i32, i32* @EPOLLIN
%5 = load i32, i32* @EPOLLOUT
%6 = or i32 %5, %4
%7 = tail call i32 @pts_epoll_ctl(%struct.ptspair* %0, %struct.pts* %1, i32 %3, i32 %6)
ret i32 %7
}
/* Variables and functions */
int rand();
int geraAleatorio(int min, int max) {
  return ((rand() % (max - min)) + min) + 1;
}


x86 assembly (clang, -O0):
<geraAleatorio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geraAleatorio>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%r14d
xor    %eax,%eax
call   1030 <rand@plt>
sub    %r14d,%ebx
cltd
idiv   %ebx
lea    (%r14,%rdx,1),%eax
add    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @geraAleatorio(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = srem i32 %5, %8
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
%12 = add nsw i32 %11, 1
ret i32 %12
}

LLVM IR (-O2):
define i32 @geraAleatorio(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub nsw i32 %1, %0
%5 = srem i32 %3, %4
%6 = add i32 %0, 1
%7 = add i32 %6, %5
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
size_t write_FD_BE(int, int /*<<< orphan*/ const *, int);
size_t int32WriteToFD(int fd, const int32_t *data) {
  return write_FD_BE(fd, data, sizeof(int32_t));
}


x86 assembly (clang, -O0):
<int32WriteToFD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write_FD_BE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int32WriteToFD>:
mov    $0x4,%edx
jmp    1030 <write_FD_BE@plt>

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

LLVM IR (-O2):
define i64 @int32WriteToFD(i32 %0, i32* %1) {
%3 = tail call i64 @write_FD_BE(i32 %0, i32* %1, i32 4)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void errArchive(void) { error("Corrupted archive\n"); }


x86 assembly (clang, -O0):
<errArchive>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <error@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"Corrupted archive\0A\00"
define void @errArchive() {
%1 = call i32 @error(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Corrupted archive\0A\00"
define void @errArchive() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
void __clear_bit(int nr, volatile void *addr) {
  asm volatile("btrl %1,%0"
               : "=m"((*(volatile long *)addr))
               : "Ir"(nr), "m"((*(volatile long *)addr))
               : "memory");
}


x86 assembly (clang, -O0):
<__clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rdx
btr    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__clear_bit>:
btr    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @__clear_bit(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i64*
tail call void asm sideeffect "btrl $1,$0", "=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %3, i32 %0, i64* elementtype(i64) %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, size_t);
void *malloc(size_t);
void *rrp_malloc(size_t size) {
  void *p = malloc(size);
  if (!p)
    die("Could not allocate %u bytes\n", size);
  return p;
}


x86 assembly (clang, -O0):
<rrp_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <rrp_malloc+0x34>
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rrp_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <rrp_malloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <die@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Could not allocate %u bytes\0A\00"
define i8* @rrp_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i64, i64* %2
%10 = call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [29 x i8] c"Could not allocate %u bytes\0A\00"
define noalias i8* @rrp_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float drand(float n) { return (float)rand() / ((float)RAND_MAX / n); }


x86 assembly (clang, -O0):
<drand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2eb8(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drand>:
push   %rax
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mov    0x2ebb(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  0x4(%rsp),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @drand(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to float
%7 = load float, float* %2
%8 = fdiv float %6, %7
%9 = fdiv float %4, %8
ret float %9
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @drand(float %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to float
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to float
%6 = fdiv float %5, %0
%7 = fdiv float %3, %6
ret float %7
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_setgroups;
int syscall(int /*<<< orphan*/, size_t, int /*<<< orphan*/ *);
int _setgroups(size_t size, gid_t *list) {
  return syscall(SYS_setgroups, size, list);
}


x86 assembly (clang, -O0):
<_setgroups>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_setgroups>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_setgroups = global i32 0
define i32 @_setgroups(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
store i64 %0, i64* %3
store i32* %1, i32** %4
%5 = load i32, i32* @SYS_setgroups
%6 = load i64, i64* %3
%7 = load i32*, i32** %4
%8 = call i32 @syscall(i32 %5, i64 %6, i32* %7)
ret i32 %8
}

LLVM IR (-O2):
@SYS_setgroups = global i32 0
define i32 @_setgroups(i64 %0, i32* %1) {
%3 = load i32, i32* @SYS_setgroups
%4 = tail call i32 @syscall(i32 %3, i64 %0, i32* %1)
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
scalar_t__ unknown_function();
int unknown_nat();
void two_safety_conditions2_Bad(uint32_t s) {
  uint32_t x = unknown_nat();
  uint32_t y, z;
  if (unknown_function()) {
    y = 0;
  } else {
    y = 80;
  }
  z = x + y;
  if (s >= 10 && s <= 20) {
    z = x + s;
  }
}


x86 assembly (clang, -O0):
<two_safety_conditions2_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <unknown_nat@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <unknown_function@plt>
cmp    $0x0,%rax
je     1152 <two_safety_conditions2_Bad+0x32>
movl   $0x0,-0xc(%rbp)
jmp    1159 <two_safety_conditions2_Bad+0x39>
movl   $0x50,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     117f <two_safety_conditions2_Bad+0x5f>
cmpl   $0x14,-0x4(%rbp)
jg     117f <two_safety_conditions2_Bad+0x5f>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @two_safety_conditions2_Bad(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = call i32 (...) @unknown_nat()
store i32 %6, i32* %3
%7 = call i64 (...) @unknown_function()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %4
br label %11
10: ; preds = %1
store i32 80, i32* %4
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
store i32 %14, i32* %5
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 10
br i1 %16, label %17, label %24
17: ; preds = %11
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 20
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i32, i32* %3
%22 = load i32, i32* %2
%23 = add nsw i32 %21, %22
store i32 %23, i32* %5
br label %24
24: ; preds = %20, %17, %11
ret void
}

LLVM IR (-O2):
define void @two_safety_conditions2_Bad(i32 %0) {
%2 = tail call i32 (...) @unknown_nat()
%3 = tail call i64 (...) @unknown_function()
ret void
}
/* Variables and functions */
int send(int, void *, size_t, int /*<<< orphan*/);
int send_info(int fd, void *buff, size_t buff_len) {
  return send(fd, buff, buff_len, 0);
}


x86 assembly (clang, -O0):
<send_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_info>:
xor    %ecx,%ecx
jmp    1030 <send@plt>

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

LLVM IR (-O2):
define i32 @send_info(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @send(i32 %0, i8* %1, i64 %2, i32 0)
ret i32 %4
}
int c_isdigit(int c) {
  switch (c) {
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
  case '8':
  case '9':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<c_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffd0,%eax
sub    $0x9,%eax
ja     1127 <c_isdigit+0x27>
jmp    111b <c_isdigit+0x1b>
movl   $0x1,-0x4(%rbp)
jmp    112e <c_isdigit+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @c_isdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 48, label %5
i32 49, label %5
i32 50, label %5
i32 51, label %5
i32 52, label %5
i32 53, label %5
i32 54, label %5
i32 55, label %5
i32 56, label %5
i32 57, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @c_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
int get_led_3(void) {
  unsigned int mode = (*(volatile unsigned int *)(0x7F008824)) & 4;
  if (mode)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<get_led_3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008824,%eax
mov    (%rax),%eax
and    $0x4,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1127 <get_led_3+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <get_led_3+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_led_3>:
mov    0x7f008824,%eax
shr    $0x2,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @get_led_3() {
%1 = alloca i32
%2 = alloca i32
%3 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%4 = and i32 %3, 4
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_led_3() {
%1 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%2 = lshr i32 %1, 2
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
char *escape_single_quotes(char *);
char *escape_single_quote(char *data) { return escape_single_quotes(data); }


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

x86 assembly (clang, -O2):
<escape_single_quote>:
jmp    1030 <escape_single_quotes@plt>

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

LLVM IR (-O2):
define i8* @escape_single_quote(i8* %0) {
%2 = tail call i8* @escape_single_quotes(i8* %0)
ret i8* %2
}
/* Variables and functions */
int placearea(char const *, int /*<<< orphan*/, int /*<<< orphan*/,
              int /*<<< orphan*/);
int getbasefromID(const char *name) { return placearea(name, 0, 0, 0); }


x86 assembly (clang, -O0):
<getbasefromID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <placearea@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbasefromID>:
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <placearea@plt>

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

LLVM IR (-O2):
define i32 @getbasefromID(i8* %0) {
%2 = tail call i32 @placearea(i8* %0, i32 0, i32 0, i32 0)
ret i32 %2
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, int);
void rtutils_time_copy(struct timespec *dst, const struct timespec *src) {
  memcpy((void *)dst, (const void *)src, sizeof(struct timespec));
}


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

x86 assembly (clang, -O2):
<rtutils_time_copy>:
mov    $0x4,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
define void @rtutils_time_copy(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %3
%6 = bitcast %struct.timespec* %5 to i8*
%7 = load %struct.timespec*, %struct.timespec** %4
%8 = bitcast %struct.timespec* %7 to i8*
%9 = call i32 @memcpy(i8* %6, i8* %8, i32 4)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define void @rtutils_time_copy(%struct.timespec* %0, %struct.timespec* %1) {
%3 = bitcast %struct.timespec* %0 to i8*
%4 = bitcast %struct.timespec* %1 to i8*
%5 = tail call i32 @memcpy(i8* %3, i8* %4, i32 4)
ret void
}