#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 */
scalar_t__ gpio_request(int, char *);
int /*<<< orphan*/ pr_err(char *);
void lcdc_lead_gpio_init(void) {
  if (gpio_request(124, "spi_clk"))
    pr_err("failed to request gpio spi_clk\n");
  if (gpio_request(122, "spi_cs"))
    pr_err("failed to request gpio spi_cs\n");
  if (gpio_request(132, "spi_sdi"))
    pr_err("failed to request gpio spi_sdi\n");
  if (gpio_request(123, "spi_sdoi"))
    pr_err("failed to request gpio spi_sdoi\n");
  if (gpio_request(91, "gpio_dac"))
    pr_err("failed to request gpio_dac\n");
}


x86 assembly (clang, -O0):
<lcdc_lead_gpio_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7c,%edi
lea    0xed0(%rip),%rsi
call   1030 <gpio_request@plt>
cmp    $0x0,%rax
je     114b <lcdc_lead_gpio_init+0x2b>
lea    0xec2(%rip),%rdi
call   1040 <pr_err@plt>
mov    $0x7a,%edi
lea    0xed1(%rip),%rsi
call   1030 <gpio_request@plt>
cmp    $0x0,%rax
je     1172 <lcdc_lead_gpio_init+0x52>
lea    0xec2(%rip),%rdi
call   1040 <pr_err@plt>
mov    $0x84,%edi
lea    0xed0(%rip),%rsi
call   1030 <gpio_request@plt>
cmp    $0x0,%rax
je     1199 <lcdc_lead_gpio_init+0x79>
lea    0xec2(%rip),%rdi
call   1040 <pr_err@plt>
mov    $0x7b,%edi
lea    0xed1(%rip),%rsi
call   1030 <gpio_request@plt>
cmp    $0x0,%rax
je     11c0 <lcdc_lead_gpio_init+0xa0>
lea    0xec4(%rip),%rdi
call   1040 <pr_err@plt>
mov    $0x5b,%edi
lea    0xed4(%rip),%rsi
call   1030 <gpio_request@plt>
cmp    $0x0,%rax
je     11e7 <lcdc_lead_gpio_init+0xc7>
lea    0xec7(%rip),%rdi
call   1040 <pr_err@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcdc_lead_gpio_init>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x7c,%edi
call   1030 <gpio_request@plt>
test   %rax,%rax
je     1143 <lcdc_lead_gpio_init+0x23>
lea    0xeca(%rip),%rdi
call   1040 <pr_err@plt>
lea    0xede(%rip),%rsi
mov    $0x7a,%edi
call   1030 <gpio_request@plt>
test   %rax,%rax
je     1165 <lcdc_lead_gpio_init+0x45>
lea    0xecf(%rip),%rdi
call   1040 <pr_err@plt>
lea    0xee2(%rip),%rsi
mov    $0x84,%edi
call   1030 <gpio_request@plt>
test   %rax,%rax
je     1187 <lcdc_lead_gpio_init+0x67>
lea    0xed4(%rip),%rdi
call   1040 <pr_err@plt>
lea    0xee8(%rip),%rsi
mov    $0x7b,%edi
call   1030 <gpio_request@plt>
test   %rax,%rax
je     11a9 <lcdc_lead_gpio_init+0x89>
lea    0xedb(%rip),%rdi
call   1040 <pr_err@plt>
lea    0xef0(%rip),%rsi
mov    $0x5b,%edi
call   1030 <gpio_request@plt>
test   %rax,%rax
je     11cc <lcdc_lead_gpio_init+0xac>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1040 <pr_err@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"spi_clk\00"
@.str.1 = [32 x i8] c"failed to request gpio spi_clk\0A\00"
@.str.2 = [7 x i8] c"spi_cs\00"
@.str.3 = [31 x i8] c"failed to request gpio spi_cs\0A\00"
@.str.4 = [8 x i8] c"spi_sdi\00"
@.str.5 = [32 x i8] c"failed to request gpio spi_sdi\0A\00"
@.str.6 = [9 x i8] c"spi_sdoi\00"
@.str.7 = [33 x i8] c"failed to request gpio spi_sdoi\0A\00"
@.str.8 = [9 x i8] c"gpio_dac\00"
@.str.9 = [28 x i8] c"failed to request gpio_dac\0A\00"
define void @lcdc_lead_gpio_init() {
%1 = call i64 @gpio_request(i32 124, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @pr_err(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = call i64 @gpio_request(i32 122, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @pr_err(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = call i64 @gpio_request(i32 132, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @pr_err(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
%16 = call i64 @gpio_request(i32 123, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @pr_err(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %20
20: ; preds = %18, %15
%21 = call i64 @gpio_request(i32 91, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @pr_err(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
br label %25
25: ; preds = %23, %20
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"spi_clk\00"
@.str.1 = [32 x i8] c"failed to request gpio spi_clk\0A\00"
@.str.2 = [7 x i8] c"spi_cs\00"
@.str.3 = [31 x i8] c"failed to request gpio spi_cs\0A\00"
@.str.4 = [8 x i8] c"spi_sdi\00"
@.str.5 = [32 x i8] c"failed to request gpio spi_sdi\0A\00"
@.str.6 = [9 x i8] c"spi_sdoi\00"
@.str.7 = [33 x i8] c"failed to request gpio spi_sdoi\0A\00"
@.str.8 = [9 x i8] c"gpio_dac\00"
@.str.9 = [28 x i8] c"failed to request gpio_dac\0A\00"
define void @lcdc_lead_gpio_init() {
%1 = tail call i64 @gpio_request(i32 124, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @pr_err(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i64 @gpio_request(i32 122, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @pr_err(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = tail call i64 @gpio_request(i32 132, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 @pr_err(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
%16 = tail call i64 @gpio_request(i32 123, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 @pr_err(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %20
20: ; preds = %18, %15
%21 = tail call i64 @gpio_request(i32 91, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 @pr_err(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
br label %25
25: ; preds = %23, %20
ret void
}