#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int S_IRGRP;
int S_IRUSR;
int S_IWUSR;
int S_IXGRP;
int S_IXUSR;
int /*<<< orphan*/ mkdir(char *, int);
int /*<<< orphan*/ rs_warn(char *, char *);
void record_init() {
  if (!mkdir("records", S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP)) {
    rs_warn("mkdir %s\n for recording", "records");
  }
}


x86 assembly (clang, -O0):
<record_init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
mov    0x2eac(%rip),%rax
or     (%rax),%esi
mov    0x2eab(%rip),%rax
or     (%rax),%esi
mov    0x2e82(%rip),%rax
or     (%rax),%esi
mov    0x2e89(%rip),%rax
or     (%rax),%esi
lea    0xea8(%rip),%rdi
call   1030 <mkdir@plt>
cmp    $0x0,%eax
jne    1179 <record_init+0x59>
lea    0xe9b(%rip),%rdi
lea    0xe8c(%rip),%rsi
call   1040 <rs_warn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<record_init>:
push   %rax
mov    0x2e98(%rip),%rax
mov    0x2eb1(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2eae(%rip),%rax
or     (%rax),%esi
mov    0x2e85(%rip),%rax
or     (%rax),%esi
mov    0x2e8c(%rip),%rax
or     (%rax),%esi
lea    0xeab(%rip),%rdi
call   1030 <mkdir@plt>
test   %eax,%eax
je     1160 <record_init+0x40>
pop    %rax
ret
lea    0xea1(%rip),%rdi
lea    0xe92(%rip),%rsi
pop    %rax
jmp    1040 <rs_warn@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"records\00"
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IXGRP = global i32 0
@.str.1 = [24 x i8] c"mkdir %s\0A for recording\00"
define void @record_init() {
%1 = load i32, i32* @S_IRUSR
%2 = load i32, i32* @S_IWUSR
%3 = or i32 %1, %2
%4 = load i32, i32* @S_IXUSR
%5 = or i32 %3, %4
%6 = load i32, i32* @S_IRGRP
%7 = or i32 %5, %6
%8 = load i32, i32* @S_IXGRP
%9 = or i32 %7, %8
%10 = call i32 @mkdir(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %0
%13 = call i32 @rs_warn(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %0
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"records\00"
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IXUSR = global i32 0
@S_IRGRP = global i32 0
@S_IXGRP = global i32 0
@.str.1 = [24 x i8] c"mkdir %s\0A for recording\00"
define void @record_init() {
%1 = load i32, i32* @S_IRUSR
%2 = load i32, i32* @S_IWUSR
%3 = or i32 %2, %1
%4 = load i32, i32* @S_IXUSR
%5 = or i32 %3, %4
%6 = load i32, i32* @S_IRGRP
%7 = or i32 %5, %6
%8 = load i32, i32* @S_IXGRP
%9 = or i32 %7, %8
%10 = tail call i32 @mkdir(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = tail call i32 @rs_warn(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %0
ret void
}